x_ite 8.7.4 → 8.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/.vscode/tasks.json +1 -1
  2. package/dist/assets/components/Annotation.js +13 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +13 -13
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +25 -25
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +13 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +9 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +21 -23
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +35 -36
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +18 -18
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +37 -32
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +24 -24
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +22 -22
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +20 -20
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +25 -25
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +28 -28
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +26 -27
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjector.js +15 -15
  35. package/dist/assets/components/TextureProjector.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +30 -30
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +19 -19
  39. package/dist/assets/components/VolumeRendering.min.js +1 -1
  40. package/dist/assets/components/X_ITE.js +9 -9
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.js +1187 -1686
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +1 -1
  47. package/docs/_includes/scripts.html +0 -1
  48. package/docs/_posts/components/CADGeometry/QuadSet.md +1 -1
  49. package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +1 -1
  50. package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +1 -1
  51. package/docs/_posts/components/EnvironmentalEffects/Background.md +1 -1
  52. package/docs/_posts/components/EnvironmentalEffects/Fog.md +1 -1
  53. package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +1 -1
  54. package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +1 -1
  55. package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +1 -1
  56. package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +1 -1
  57. package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +1 -1
  58. package/docs/_posts/components/EventUtilities/IntegerSequencer.md +1 -1
  59. package/docs/_posts/components/Followers/ColorChaser.md +1 -1
  60. package/docs/_posts/components/Followers/ColorDamper.md +1 -1
  61. package/docs/_posts/components/Followers/CoordinateChaser.md +1 -1
  62. package/docs/_posts/components/Followers/ScalarChaser.md +1 -1
  63. package/docs/_posts/components/Geometry2D/Arc2D.md +1 -1
  64. package/docs/_posts/components/Geometry2D/ArcClose2D.md +1 -1
  65. package/docs/_posts/components/Geometry2D/Circle2D.md +1 -1
  66. package/docs/_posts/components/Geometry2D/Disk2D.md +1 -1
  67. package/docs/_posts/components/Geometry2D/Polyline2D.md +1 -1
  68. package/docs/_posts/components/Geometry2D/Polypoint2D.md +1 -1
  69. package/docs/_posts/components/Geometry2D/Rectangle2D.md +1 -1
  70. package/docs/_posts/components/Geometry2D/TriangleSet2D.md +1 -1
  71. package/docs/_posts/components/Geometry3D/Box.md +1 -1
  72. package/docs/_posts/components/Geometry3D/Cone.md +1 -1
  73. package/docs/_posts/components/Geometry3D/Cylinder.md +1 -1
  74. package/docs/_posts/components/Geometry3D/ElevationGrid.md +1 -1
  75. package/docs/_posts/components/Geometry3D/Extrusion.md +1 -1
  76. package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +1 -1
  77. package/docs/_posts/components/Geometry3D/Sphere.md +1 -1
  78. package/docs/_posts/components/Geospatial/GeoElevationGrid.md +1 -1
  79. package/docs/_posts/components/Geospatial/GeoLOD.md +1 -1
  80. package/docs/_posts/components/Geospatial/GeoViewpoint.md +1 -1
  81. package/docs/_posts/components/Grouping/Group.md +1 -1
  82. package/docs/_posts/components/Grouping/Switch.md +1 -1
  83. package/docs/_posts/components/Grouping/Transform.md +1 -1
  84. package/docs/_posts/components/HAnim/HAnimHumanoid.md +1 -1
  85. package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
  86. package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +1 -1
  87. package/docs/_posts/components/Interpolation/OrientationInterpolator.md +1 -1
  88. package/docs/_posts/components/Interpolation/PositionInterpolator.md +1 -1
  89. package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +1 -1
  90. package/docs/_posts/components/Interpolation/ScalarInterpolator.md +1 -1
  91. package/docs/_posts/components/Interpolation/SplineScalarInterpolator.md +1 -1
  92. package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.md +1 -1
  93. package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +1 -1
  94. package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +1 -1
  95. package/docs/_posts/components/Layering/LayerSet.md +1 -1
  96. package/docs/_posts/components/Layering/Viewport.md +1 -1
  97. package/docs/_posts/components/Lighting/DirectionalLight.md +1 -1
  98. package/docs/_posts/components/Lighting/PointLight.md +1 -1
  99. package/docs/_posts/components/Lighting/SpotLight.md +1 -1
  100. package/docs/_posts/components/NURBS/NurbsCurve.md +1 -1
  101. package/docs/_posts/components/NURBS/NurbsPatchSurface.md +1 -1
  102. package/docs/_posts/components/NURBS/NurbsSweptSurface.md +1 -1
  103. package/docs/_posts/components/Navigation/Billboard.md +1 -1
  104. package/docs/_posts/components/Navigation/Collision.md +1 -1
  105. package/docs/_posts/components/Navigation/NavigationInfo.md +1 -1
  106. package/docs/_posts/components/Navigation/OrthoViewpoint.md +1 -1
  107. package/docs/_posts/components/Navigation/Viewpoint.md +1 -1
  108. package/docs/_posts/components/Networking/Anchor.md +1 -1
  109. package/docs/_posts/components/Networking/Inline.md +1 -1
  110. package/docs/_posts/components/Networking/LoadSensor.md +1 -1
  111. package/docs/_posts/components/ParticleSystems/ConeEmitter.md +1 -1
  112. package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +1 -1
  113. package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +1 -1
  114. package/docs/_posts/components/ParticleSystems/ParticleSystem.md +1 -1
  115. package/docs/_posts/components/ParticleSystems/PointEmitter.md +1 -1
  116. package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +1 -1
  117. package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +1 -1
  118. package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +1 -1
  119. package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +1 -1
  120. package/docs/_posts/components/Picking/LinePickSensor.md +1 -1
  121. package/docs/_posts/components/Picking/PointPickSensor.md +1 -1
  122. package/docs/_posts/components/Picking/PrimitivePickSensor.md +1 -1
  123. package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +1 -1
  124. package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +1 -1
  125. package/docs/_posts/components/Rendering/ClipPlane.md +1 -1
  126. package/docs/_posts/components/Rendering/Color.md +1 -1
  127. package/docs/_posts/components/Rendering/ColorRGBA.md +1 -1
  128. package/docs/_posts/components/Rendering/Coordinate.md +1 -1
  129. package/docs/_posts/components/Rendering/IndexedLineSet.md +1 -1
  130. package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +1 -1
  131. package/docs/_posts/components/Rendering/IndexedTriangleSet.md +1 -1
  132. package/docs/_posts/components/Rendering/LineSet.md +1 -1
  133. package/docs/_posts/components/Rendering/PointSet.md +1 -1
  134. package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +1 -1
  135. package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +1 -1
  136. package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +1 -1
  137. package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +1 -1
  138. package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +1 -1
  139. package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +1 -1
  140. package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +1 -1
  141. package/docs/_posts/components/Shaders/ComposedShader.md +1 -1
  142. package/docs/_posts/components/Shaders/FloatVertexAttribute.md +1 -1
  143. package/docs/_posts/components/Shaders/ShaderPart.md +1 -1
  144. package/docs/_posts/components/Shape/Appearance.md +1 -1
  145. package/docs/_posts/components/Shape/FillProperties.md +1 -1
  146. package/docs/_posts/components/Shape/LineProperties.md +1 -1
  147. package/docs/_posts/components/Shape/Material.md +1 -1
  148. package/docs/_posts/components/Shape/TwoSidedMaterial.md +1 -1
  149. package/docs/_posts/components/Sound/AudioClip.md +1 -1
  150. package/docs/_posts/components/Text/FontStyle.md +1 -1
  151. package/docs/_posts/components/Text/Text.md +1 -1
  152. package/docs/_posts/components/Texturing/ImageTexture.md +1 -1
  153. package/docs/_posts/components/Texturing/MovieTexture.md +1 -1
  154. package/docs/_posts/components/Texturing/MultiTexture.md +1 -1
  155. package/docs/_posts/components/Texturing/PixelTexture.md +1 -1
  156. package/docs/_posts/components/Texturing3D/ImageTexture3D.md +1 -1
  157. package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +1 -1
  158. package/docs/_posts/components/Time/TimeSensor.md +1 -1
  159. package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +1 -1
  160. package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +1 -1
  161. package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +1 -1
  162. package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +1 -1
  163. package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +1 -1
  164. package/docs/_posts/components/VolumeRendering/VolumeData.md +1 -1
  165. package/docs/_posts/components/X_ITE/BlendMode.md +1 -1
  166. package/docs/_posts/custom-shaders.md +1 -1
  167. package/docs/_posts/getting-started.md +7 -2
  168. package/docs/_posts/reference/browser-services.md +6 -0
  169. package/docs/_posts/reference/field-services-and-objects.md +26 -6
  170. package/docs/_posts/tutorials/adding-backgrounds.md +2 -2
  171. package/docs/_posts/tutorials/adding-sound.md +1 -1
  172. package/docs/_posts/tutorials/building-a-x3d-world.md +1 -1
  173. package/docs/_posts/tutorials/building-elevation-grids.md +1 -1
  174. package/docs/_posts/tutorials/building-primitive-shapes.md +2 -2
  175. package/docs/_posts/tutorials/controlling-appearance-with-materials.md +1 -1
  176. package/docs/_posts/tutorials/controlling-detail.md +1 -1
  177. package/docs/_posts/tutorials/hello-world.md +1 -1
  178. package/docs/_posts/tutorials/naming-nodes.md +1 -1
  179. package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +1 -1
  180. package/package.json +3 -3
  181. package/src/lib/jquery.js +13 -0
  182. package/src/standard/Geospatial/UniversalTransverseMercator.js +0 -1
  183. package/src/standard/Math/Algorithms/eigen_decomposition.js +9 -9
  184. package/src/standard/Math/Geometry/Box2.js +37 -24
  185. package/src/standard/Math/Geometry/Box3.js +37 -24
  186. package/src/standard/Math/Geometry/Cylinder3.js +1 -1
  187. package/src/standard/Math/Geometry/Line2.js +1 -1
  188. package/src/standard/Math/Geometry/Line3.js +1 -1
  189. package/src/standard/Math/Geometry/Plane3.js +1 -1
  190. package/src/standard/Math/Geometry/Sphere3.js +14 -14
  191. package/src/standard/Math/Numbers/Color3.js +10 -18
  192. package/src/standard/Math/Numbers/Color4.js +12 -23
  193. package/src/standard/Math/Numbers/Complex.js +59 -58
  194. package/src/standard/Math/Numbers/Matrix2.js +31 -45
  195. package/src/standard/Math/Numbers/Matrix3.js +59 -94
  196. package/src/standard/Math/Numbers/Matrix4.js +73 -114
  197. package/src/standard/Math/Numbers/Quaternion.js +70 -132
  198. package/src/standard/Math/Numbers/Rotation4.js +15 -42
  199. package/src/standard/Math/Numbers/Vector2.js +12 -78
  200. package/src/standard/Math/Numbers/Vector3.js +17 -94
  201. package/src/standard/Math/Numbers/Vector4.js +22 -94
  202. package/src/x_ite/Base/X3DInfoArray.js +9 -7
  203. package/src/x_ite/Base/X3DObject.js +9 -32
  204. package/src/x_ite/Base/X3DObjectArrayField.js +35 -64
  205. package/src/x_ite/Browser/Core/BrowserOptions.js +37 -0
  206. package/src/x_ite/Browser/Core/X3DCoreContext.js +21 -3
  207. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +4 -4
  208. package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +12 -7
  209. package/src/x_ite/Browser/Layout/ScreenText.js +9 -4
  210. package/src/x_ite/Browser/Navigation/ExamineViewer.js +9 -9
  211. package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -3
  212. package/src/x_ite/Browser/Navigation/WalkViewer.js +2 -2
  213. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +7 -7
  214. package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
  215. package/src/x_ite/Browser/Shaders/X3DShadersContext.js +0 -1
  216. package/src/x_ite/Browser/Text/X3DTextGeometry.js +2 -3
  217. package/src/x_ite/Browser/VERSION.js +1 -1
  218. package/src/x_ite/Browser/X3DBrowser.js +61 -68
  219. package/src/x_ite/Browser/X3DBrowserContext.js +8 -8
  220. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +1 -1
  221. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +1 -1
  222. package/src/x_ite/Components/Followers/OrientationChaser.js +3 -3
  223. package/src/x_ite/Components/Followers/OrientationDamper.js +3 -3
  224. package/src/x_ite/Components/Geometry2D/Rectangle2D.js +2 -3
  225. package/src/x_ite/Components/Geometry3D/Box.js +3 -10
  226. package/src/x_ite/Components/Geometry3D/Cone.js +1 -1
  227. package/src/x_ite/Components/Geometry3D/Cylinder.js +2 -2
  228. package/src/x_ite/Components/Geometry3D/Extrusion.js +3 -3
  229. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
  230. package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +2 -2
  231. package/src/x_ite/Components/Layering/X3DLayerNode.js +1 -1
  232. package/src/x_ite/Components/Layout/Layout.js +1 -1
  233. package/src/x_ite/Components/Navigation/Billboard.js +1 -1
  234. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +12 -13
  235. package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
  236. package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +7 -7
  237. package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +1 -1
  238. package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +9 -9
  239. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +1 -1
  240. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +2 -2
  241. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +1 -1
  242. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +1 -1
  243. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +3 -3
  244. package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +1 -1
  245. package/src/x_ite/Execution/X3DExecutionContext.js +52 -58
  246. package/src/x_ite/Execution/X3DExportedNode.js +13 -11
  247. package/src/x_ite/Execution/X3DImportedNode.js +25 -25
  248. package/src/x_ite/Execution/X3DScene.js +129 -53
  249. package/src/x_ite/Fields/ArrayFields.js +1 -1
  250. package/src/x_ite/Fields/SFColor.js +10 -15
  251. package/src/x_ite/Fields/SFColorRGBA.js +11 -18
  252. package/src/x_ite/Fields/SFImage.js +38 -33
  253. package/src/x_ite/Fields/SFMatrix3.js +1 -3
  254. package/src/x_ite/Fields/SFMatrix4.js +1 -5
  255. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +6 -5
  256. package/src/x_ite/Fields/SFNodeCache.js +2 -2
  257. package/src/x_ite/Fields/SFRotation.js +14 -21
  258. package/src/x_ite/Fields/SFString.js +0 -1
  259. package/src/x_ite/Fields/SFVec2.js +8 -15
  260. package/src/x_ite/Fields/SFVec3.js +11 -18
  261. package/src/x_ite/Fields/SFVec4.js +12 -23
  262. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +17 -16
  263. package/src/x_ite/Parser/SVGParser.js +3 -3
  264. package/src/x_ite/Parser/X3DOptimizer.js +1 -1
  265. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +26 -27
  266. package/src/x_ite/Prototype/X3DProtoDeclaration.js +16 -15
  267. package/src/x_ite/Rendering/X3DRenderObject.js +3 -3
  268. package/src/x_ite/Routing/X3DRoute.js +26 -25
  269. package/src/x_ite/X3DCanvasElement.js +1 -0
  270. package/docs/assets/js/autoupdate.js +0 -25
  271. package/src/x_ite/Execution/Scene.js +0 -145
@@ -68,13 +68,9 @@ function Matrix4 ()
68
68
  Matrix4 .prototype =
69
69
  {
70
70
  constructor: Matrix4,
71
- order: 4,
72
- length: 16,
73
71
  [Symbol .iterator]: function* ()
74
72
  {
75
- const length = this .length;
76
-
77
- for (let i = 0; i < length; ++ i)
73
+ for (let i = 0; i < 16; ++ i)
78
74
  yield this [i];
79
75
  },
80
76
  copy: function ()
@@ -672,118 +668,97 @@ Matrix4 .prototype =
672
668
  },
673
669
  };
674
670
 
675
- Object .defineProperty (Matrix4 .prototype, "x",
671
+ Object .defineProperties (Matrix4 .prototype,
676
672
  {
677
- get: (function ()
673
+ order: { value: 4 },
674
+ length: { value: 16 },
675
+ x:
678
676
  {
679
- const vector = new Vector4 (0, 0, 0, 0);
680
-
681
- return function () { return vector .set (this [0], this [1], this [2], this [3]); };
682
- })(),
683
- enumerable: false,
684
- configurable: false
685
- });
677
+ get: (function ()
678
+ {
679
+ const vector = new Vector4 (0, 0, 0, 0);
686
680
 
687
- Object .defineProperty (Matrix4 .prototype, "y",
688
- {
689
- get: (function ()
681
+ return function () { return vector .set (this [0], this [1], this [2], this [3]); };
682
+ })(),
683
+ },
684
+ y:
690
685
  {
691
- const vector = new Vector4 (0, 0, 0, 0);
692
-
693
- return function () { return vector .set (this [4], this [5], this [6], this [7]); };
694
- })(),
695
- enumerable: false,
696
- configurable: false
697
- });
686
+ get: (function ()
687
+ {
688
+ const vector = new Vector4 (0, 0, 0, 0);
698
689
 
699
- Object .defineProperty (Matrix4 .prototype, "z",
700
- {
701
- get: (function ()
690
+ return function () { return vector .set (this [4], this [5], this [6], this [7]); };
691
+ })(),
692
+ },
693
+ z:
702
694
  {
703
- const vector = new Vector4 (0, 0, 0, 0);
704
-
705
- return function () { return vector .set (this [8], this [9], this [10], this [11]); };
706
- })(),
707
- enumerable: false,
708
- configurable: false
709
- });
695
+ get: (function ()
696
+ {
697
+ const vector = new Vector4 (0, 0, 0, 0);
710
698
 
711
- Object .defineProperty (Matrix4 .prototype, "w",
712
- {
713
- get: (function ()
699
+ return function () { return vector .set (this [8], this [9], this [10], this [11]); };
700
+ })(),
701
+ },
702
+ w:
714
703
  {
715
- const vector = new Vector4 (0, 0, 0, 0);
716
-
717
- return function () { return vector .set (this [12], this [13], this [14], this [15]); };
718
- })(),
719
- enumerable: false,
720
- configurable: false
721
- });
704
+ get: (function ()
705
+ {
706
+ const vector = new Vector4 (0, 0, 0, 0);
722
707
 
723
- Object .defineProperty (Matrix4 .prototype, "xAxis",
724
- {
725
- get: (function ()
708
+ return function () { return vector .set (this [12], this [13], this [14], this [15]); };
709
+ })(),
710
+ },
711
+ xAxis:
726
712
  {
727
- const vector = new Vector3 (0, 0, 0);
728
-
729
- return function () { return vector .set (this [0], this [1], this [2]); };
730
- })(),
731
- enumerable: false,
732
- configurable: false
733
- });
713
+ get: (function ()
714
+ {
715
+ const vector = new Vector3 (0, 0, 0);
734
716
 
735
- Object .defineProperty (Matrix4 .prototype, "yAxis",
736
- {
737
- get: (function ()
717
+ return function () { return vector .set (this [0], this [1], this [2]); };
718
+ })(),
719
+ },
720
+ yAxis:
738
721
  {
739
- const vector = new Vector3 (0, 0, 0);
740
-
741
- return function () { return vector .set (this [4], this [5], this [6]); };
742
- })(),
743
- enumerable: false,
744
- configurable: false
745
- });
722
+ get: (function ()
723
+ {
724
+ const vector = new Vector3 (0, 0, 0);
746
725
 
747
- Object .defineProperty (Matrix4 .prototype, "zAxis",
748
- {
749
- get: (function ()
726
+ return function () { return vector .set (this [4], this [5], this [6]); };
727
+ })(),
728
+ },
729
+ zAxis:
750
730
  {
751
- const vector = new Vector3 (0, 0, 0);
752
-
753
- return function () { return vector .set (this [8], this [9], this [10]); };
754
- })(),
755
- enumerable: false,
756
- configurable: false
757
- });
731
+ get: (function ()
732
+ {
733
+ const vector = new Vector3 (0, 0, 0);
758
734
 
759
- Object .defineProperty (Matrix4 .prototype, "origin",
760
- {
761
- get: (function ()
735
+ return function () { return vector .set (this [8], this [9], this [10]); };
736
+ })(),
737
+ },
738
+ origin:
762
739
  {
763
- const vector = new Vector3 (0, 0, 0);
764
-
765
- return function () { return vector .set (this [12], this [13], this [14]); };
766
- })(),
767
- enumerable: false,
768
- configurable: false
769
- });
740
+ get: (function ()
741
+ {
742
+ const vector = new Vector3 (0, 0, 0);
770
743
 
771
- Object .defineProperty (Matrix4 .prototype, "submatrix",
772
- {
773
- get: (function ()
744
+ return function () { return vector .set (this [12], this [13], this [14]); };
745
+ })(),
746
+ },
747
+ submatrix:
774
748
  {
775
- const matrix = new Matrix3 ();
776
-
777
- return function ()
749
+ get: (function ()
778
750
  {
779
- matrix [0] = this [0]; matrix [1] = this [1]; matrix [2] = this [ 2];
780
- matrix [3] = this [4]; matrix [4] = this [5]; matrix [5] = this [ 6];
781
- matrix [6] = this [8]; matrix [7] = this [9]; matrix [8] = this [10];
782
- return matrix;
783
- };
784
- })(),
785
- enumerable: false,
786
- configurable: false
751
+ const matrix = new Matrix3 ();
752
+
753
+ return function ()
754
+ {
755
+ matrix [0] = this [0]; matrix [1] = this [1]; matrix [2] = this [ 2];
756
+ matrix [3] = this [4]; matrix [4] = this [5]; matrix [5] = this [ 6];
757
+ matrix [6] = this [8]; matrix [7] = this [9]; matrix [8] = this [10];
758
+ return matrix;
759
+ };
760
+ })(),
761
+ },
787
762
  });
788
763
 
789
764
  Object .assign (Matrix4,
@@ -811,22 +786,6 @@ Object .assign (Matrix4,
811
786
  matrix [6], matrix [7], matrix [8], 0,
812
787
  0, 0, 0, 1);
813
788
  },
814
- transpose: function (matrix)
815
- {
816
- return matrix .copy () .transpose ();
817
- },
818
- inverse: function (matrix)
819
- {
820
- return matrix .copy () .inverse ();
821
- },
822
- multLeft: function (lhs, rhs)
823
- {
824
- return lhs .copy () .multLeft (rhs);
825
- },
826
- multRight: function (lhs, rhs)
827
- {
828
- return lhs .copy () .multRight (rhs);
829
- },
830
789
  });
831
790
 
832
791
  const
@@ -60,7 +60,6 @@ function Quaternion (x, y, z, w)
60
60
  Quaternion .prototype =
61
61
  {
62
62
  constructor: Quaternion,
63
- length: 4,
64
63
  [Symbol .iterator]: function* ()
65
64
  {
66
65
  yield this .x;
@@ -95,24 +94,22 @@ Quaternion .prototype =
95
94
  },
96
95
  setMatrix: function (matrix)
97
96
  {
98
- let i;
99
-
100
97
  // First, find largest diagonal in matrix:
101
98
  if (matrix [0] > matrix [4])
102
99
  {
103
- i = matrix [0] > matrix [8] ? 0 : 2;
100
+ var i = matrix [0] > matrix [8] ? 0 : 2;
104
101
  }
105
102
  else
106
103
  {
107
- i = matrix [4] > matrix [8] ? 1 : 2;
104
+ var i = matrix [4] > matrix [8] ? 1 : 2;
108
105
  }
109
106
 
110
- const scalerow = matrix [0] + matrix [4] + matrix [8];
107
+ const scaleRow = matrix [0] + matrix [4] + matrix [8];
111
108
 
112
- if (scalerow > matrix [i * 3 + i])
109
+ if (scaleRow > matrix [i * 3 + i])
113
110
  {
114
111
  // Compute w first:
115
- this [3] = Math .sqrt (scalerow + 1) / 2;
112
+ this [3] = Math .sqrt (scaleRow + 1) / 2;
116
113
 
117
114
  // And compute other values:
118
115
  const d = 4 * this [3];
@@ -260,9 +257,9 @@ Quaternion .prototype =
260
257
  const
261
258
  { x: qx, y: qy, z: qz, w: qw } = this,
262
259
  { x: vx, y: vy, z: vz } = vector,
263
- a = qw * qw - qx * qx - qy * qy - qz * qz,
264
- b = 2 * (vx * qx + vy * qy + vz * qz),
265
- c = 2 * qw;
260
+ a = qw * qw - qx * qx - qy * qy - qz * qz,
261
+ b = 2 * (vx * qx + vy * qy + vz * qz),
262
+ c = 2 * qw;
266
263
 
267
264
  vector .x = a * vx + b * qx + c * (qy * vz - qz * vy);
268
265
  vector .y = a * vy + b * qy + c * (qz * vx - qx * vz);
@@ -275,9 +272,9 @@ Quaternion .prototype =
275
272
  const
276
273
  { x: qx, y: qy, z: qz, w: qw } = this,
277
274
  { x: vx, y: vy, z: vz } = vector,
278
- a = qw * qw - qx * qx - qy * qy - qz * qz,
279
- b = 2 * (vx * qx + vy * qy + vz * qz),
280
- c = 2 * qw;
275
+ a = qw * qw - qx * qx - qy * qy - qz * qz,
276
+ b = 2 * (vx * qx + vy * qy + vz * qz),
277
+ c = 2 * qw;
281
278
 
282
279
  vector .x = a * vx + b * qx - c * (qy * vz - qz * vy);
283
280
  vector .y = a * vy + b * qy - c * (qz * vx - qx * vz);
@@ -402,138 +399,85 @@ Quaternion .prototype =
402
399
  },
403
400
  };
404
401
 
405
- Object .defineProperty (Quaternion .prototype, "0",
406
- {
407
- get: function () { return this .x; },
408
- set: function (value) { this .x = value; },
409
- enumerable: false,
410
- configurable: false
411
- });
412
-
413
- Object .defineProperty (Quaternion .prototype, "1",
414
- {
415
- get: function () { return this .y; },
416
- set: function (value) { this .y = value; },
417
- enumerable: false,
418
- configurable: false
419
- });
420
-
421
- Object .defineProperty (Quaternion .prototype, "2",
422
- {
423
- get: function () { return this .z; },
424
- set: function (value) { this .z = value; },
425
- enumerable: false,
426
- configurable: false
427
- });
428
-
429
- Object .defineProperty (Quaternion .prototype, "3",
430
- {
431
- get: function () { return this .w; },
432
- set: function (value) { this .w = value; },
433
- enumerable: false,
434
- configurable: false
435
- });
436
-
437
- Object .defineProperty (Quaternion .prototype, "real",
402
+ Object .defineProperties (Quaternion .prototype,
438
403
  {
439
- get: function () { return this .w; },
440
- enumerable: false,
441
- configurable: false
442
- });
443
-
444
- Object .defineProperty (Quaternion .prototype, "imag",
445
- {
446
- get: (function ()
404
+ length: { value: 4 },
405
+ 0:
447
406
  {
448
- const result = new Vector3 (0, 0, 0);
449
-
450
- return function ()
451
- {
452
- return result .set (this .x,
453
- this .y,
454
- this .z);
455
- };
456
- })(),
457
- enumerable: false,
458
- configurable: false
459
- });
460
-
461
- Object .assign (Quaternion,
462
- {
463
- negate: function (quat)
464
- {
465
- return quat .copy () .negate ();
407
+ get: function () { return this .x; },
408
+ set: function (value) { this .x = value; },
466
409
  },
467
- inverse: function (quat)
410
+ 1:
468
411
  {
469
- return quat .copy () .inverse ();
412
+ get: function () { return this .y; },
413
+ set: function (value) { this .y = value; },
470
414
  },
471
- add: function (lhs, rhs)
415
+ 2:
472
416
  {
473
- return lhs .copy () .add (rhs);
417
+ get: function () { return this .z; },
418
+ set: function (value) { this .z = value; },
474
419
  },
475
- subtract: function (lhs, rhs)
420
+ 3:
476
421
  {
477
- return lhs .copy () .subtract (rhs);
422
+ get: function () { return this .w; },
423
+ set: function (value) { this .w = value; },
478
424
  },
479
- multiply: function (lhs, rhs)
425
+ real:
480
426
  {
481
- return lhs .copy () .multiply (rhs);
427
+ get: function () { return this .w; },
482
428
  },
483
- multLeft: function (lhs, rhs)
429
+ imag:
484
430
  {
485
- return lhs .copy () .multLeft (rhs);
486
- },
487
- multRight: function (lhs, rhs)
488
- {
489
- return lhs .copy () .multRight (rhs);
490
- },
491
- divide: function (lhs, rhs)
492
- {
493
- return lhs .copy () .divide (rhs);
494
- },
495
- normalize: function (quat)
496
- {
497
- return quat .copy () .normalize ();
498
- },
499
- slerp: function (source, destination, t)
500
- {
501
- return source .copy () .slerp (destination, t);
502
- },
503
- squad: function (source, a, b, destination, t)
504
- {
505
- return source .copy () .squad (a, b, destination, t);
506
- },
507
- /*
508
- bezier: function (q0, a, b, q1, t)
509
- {
510
- return q0 .copy () .squad (a, b, q1, t);
431
+ get: (function ()
432
+ {
433
+ const result = new Vector3 (0, 0, 0);
434
+
435
+ return function ()
436
+ {
437
+ return result .set (this .x,
438
+ this .y,
439
+ this .z);
440
+ };
441
+ })(),
511
442
  },
512
- */
513
- spline: function (Q0, Q1, Q2)
443
+ });
444
+
445
+ Object .assign (Quaternion,
446
+ {
447
+ Identity: new Quaternion (0, 0, 0, 1),
448
+ spline: (function ()
514
449
  {
515
- q0 .assign (Q0);
516
- q1 .assign (Q1);
517
- q2 .assign (Q2);
450
+ const
451
+ q0 = new Quaternion (0, 0, 0, 1),
452
+ q1 = new Quaternion (0, 0, 0, 1),
453
+ q2 = new Quaternion (0, 0, 0, 1),
454
+ q1_i = new Quaternion (0, 0, 0, 1);
455
+
456
+ return function (Q0, Q1, Q2)
457
+ {
458
+ q0 .assign (Q0);
459
+ q1 .assign (Q1);
460
+ q2 .assign (Q2);
518
461
 
519
- // If the dot product is smaller than 0 we must negate the quaternion to prevent flipping. If we negate all
520
- // the terms we get a different quaternion but it represents the same rotation.
462
+ // If the dot product is smaller than 0 we must negate the quaternion to prevent flipping. If we negate all
463
+ // the terms we get a different quaternion but it represents the same rotation.
521
464
 
522
- if (q0 .dot (q1) < 0)
523
- q0 .negate ();
465
+ if (q0 .dot (q1) < 0)
466
+ q0 .negate ();
524
467
 
525
- if (q2 .dot (q1) < 0)
526
- q2 .negate ();
468
+ if (q2 .dot (q1) < 0)
469
+ q2 .negate ();
527
470
 
528
- q1_i .assign (q1) .inverse ();
471
+ q1_i .assign (q1) .inverse ();
529
472
 
530
- // The result must be normalized as it will be used in slerp and we can only slerp normalized vectors.
473
+ // The result must be normalized as it will be used in slerp and we can only slerp normalized vectors.
531
474
 
532
- return q1 .multRight (
533
- t1 .assign (q1_i) .multRight (q0) .log () .add (t2 .assign (q1_i) .multRight (q2) .log ()) .divide (-4) .exp ()
534
- )
535
- .normalize () .copy ();
536
- },
475
+ return q1 .multRight (
476
+ t1 .assign (q1_i) .multRight (q0) .log () .add (t2 .assign (q1_i) .multRight (q2) .log ()) .divide (-4) .exp ()
477
+ )
478
+ .normalize () .copy ();
479
+ };
480
+ })(),
537
481
  });
538
482
 
539
483
  const
@@ -541,10 +485,4 @@ const
541
485
  t2 = new Quaternion (0, 0, 0, 1),
542
486
  t3 = new Quaternion (0, 0, 0, 1);
543
487
 
544
- const
545
- q0 = new Quaternion (0, 0, 0, 1),
546
- q1 = new Quaternion (0, 0, 0, 1),
547
- q2 = new Quaternion (0, 0, 0, 1),
548
- q1_i = new Quaternion (0, 0, 0, 1);
549
-
550
488
  export default Quaternion;
@@ -108,7 +108,6 @@ function Rotation4 (x, y, z, angle)
108
108
  Rotation4 .prototype =
109
109
  {
110
110
  constructor: Rotation4,
111
- length: 4,
112
111
  [Symbol .iterator]: function* ()
113
112
  {
114
113
  yield this [_x];
@@ -379,7 +378,6 @@ const x = {
379
378
  this .set (x, this [_y], this [_z], this [_angle]);
380
379
  },
381
380
  enumerable: true,
382
- configurable: false
383
381
  };
384
382
 
385
383
  const y = {
@@ -393,7 +391,6 @@ const y = {
393
391
  this .set (this [_x], y, this [_z], this [_angle]);
394
392
  },
395
393
  enumerable: true,
396
- configurable: false
397
394
  };
398
395
 
399
396
  const z = {
@@ -407,7 +404,6 @@ const z = {
407
404
  this .set (this [_x], this [_y], z, this [_angle]);
408
405
  },
409
406
  enumerable: true,
410
- configurable: false
411
407
  };
412
408
 
413
409
  const angle = {
@@ -421,56 +417,33 @@ const angle = {
421
417
  this .set (this [_x], this [_y], this [_z], angle);
422
418
  },
423
419
  enumerable: true,
424
- configurable: false
425
420
  };
426
421
 
427
- Object .defineProperty (Rotation4 .prototype, "x", x);
428
- Object .defineProperty (Rotation4 .prototype, "y", y);
429
- Object .defineProperty (Rotation4 .prototype, "z", z);
430
- Object .defineProperty (Rotation4 .prototype, "angle", angle);
422
+ Object .defineProperties (Rotation4 .prototype,
423
+ {
424
+ length: { value: 4 },
425
+ x: x,
426
+ y: y,
427
+ z: z,
428
+ angle: angle,
429
+ });
431
430
 
432
431
  x .enumerable = false;
433
432
  y .enumerable = false;
434
433
  z .enumerable = false;
435
434
  angle .enumerable = false;
436
435
 
437
- Object .defineProperty (Rotation4 .prototype, "0", x);
438
- Object .defineProperty (Rotation4 .prototype, "1", y);
439
- Object .defineProperty (Rotation4 .prototype, "2", z);
440
- Object .defineProperty (Rotation4 .prototype, "3", angle);
436
+ Object .defineProperties (Rotation4 .prototype,
437
+ {
438
+ 0: x,
439
+ 1: y,
440
+ 2: z,
441
+ 3: angle,
442
+ });
441
443
 
442
444
  Object .assign (Rotation4,
443
445
  {
444
446
  Identity: new Rotation4 (),
445
- inverse: function (rotation)
446
- {
447
- return rotation .copy () .inverse ();
448
- },
449
- multRight: function (lhs, rhs)
450
- {
451
- return lhs .copy () .multRight (rhs);
452
- },
453
- normalize: function (rotation)
454
- {
455
- return rotation .copy () .normalize ();
456
- },
457
- slerp: function (source, destination, t)
458
- {
459
- return source .copy () .slerp (destination, t);
460
- },
461
- squad: function (source, a, b, destination, t)
462
- {
463
- return source .copy () .squad (a, b, destination, t);
464
- },
465
- /*
466
- bezier: function (source, a, b, destination, t)
467
- {
468
- const copy = Object .create (this .prototype);
469
- copy [_quaternion] = Quaternion .bezier (source [_quaternion], a, b, destination [_quaternion], t);
470
- copy .update ();
471
- return copy;
472
- },
473
- */
474
447
  spline: function (r0, r1, r2)
475
448
  {
476
449
  const copy = Object .create (this .prototype);