x_ite 8.7.5 → 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 (240) hide show
  1. package/dist/assets/components/Annotation.js +13 -13
  2. package/dist/assets/components/Annotation.min.js +1 -1
  3. package/dist/assets/components/CADGeometry.js +13 -13
  4. package/dist/assets/components/CADGeometry.min.js +1 -1
  5. package/dist/assets/components/CubeMapTexturing.js +25 -25
  6. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  7. package/dist/assets/components/DIS.js +13 -13
  8. package/dist/assets/components/DIS.min.js +1 -1
  9. package/dist/assets/components/EventUtilities.js +9 -9
  10. package/dist/assets/components/EventUtilities.min.js +1 -1
  11. package/dist/assets/components/Geometry2D.js +21 -23
  12. package/dist/assets/components/Geometry2D.min.js +1 -1
  13. package/dist/assets/components/Geospatial.js +35 -36
  14. package/dist/assets/components/Geospatial.min.js +1 -1
  15. package/dist/assets/components/HAnim.js +18 -18
  16. package/dist/assets/components/HAnim.min.js +1 -1
  17. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  18. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  19. package/dist/assets/components/Layout.js +28 -28
  20. package/dist/assets/components/Layout.min.js +1 -1
  21. package/dist/assets/components/NURBS.js +24 -24
  22. package/dist/assets/components/NURBS.min.js +1 -1
  23. package/dist/assets/components/ParticleSystems.js +22 -22
  24. package/dist/assets/components/ParticleSystems.min.js +1 -1
  25. package/dist/assets/components/Picking.js +20 -20
  26. package/dist/assets/components/Picking.min.js +1 -1
  27. package/dist/assets/components/RigidBodyPhysics.js +25 -25
  28. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  29. package/dist/assets/components/Scripting.js +28 -28
  30. package/dist/assets/components/Scripting.min.js +1 -1
  31. package/dist/assets/components/Text.js +26 -27
  32. package/dist/assets/components/Text.min.js +1 -1
  33. package/dist/assets/components/TextureProjector.js +15 -15
  34. package/dist/assets/components/TextureProjector.min.js +1 -1
  35. package/dist/assets/components/Texturing3D.js +30 -30
  36. package/dist/assets/components/Texturing3D.min.js +1 -1
  37. package/dist/assets/components/VolumeRendering.js +19 -19
  38. package/dist/assets/components/VolumeRendering.min.js +1 -1
  39. package/dist/assets/components/X_ITE.js +9 -9
  40. package/dist/assets/components/X_ITE.min.js +1 -1
  41. package/dist/x_ite.css +1 -1
  42. package/dist/x_ite.js +348 -587
  43. package/dist/x_ite.min.js +1 -1
  44. package/dist/x_ite.zip +0 -0
  45. package/docs/_config.yml +1 -1
  46. package/docs/_includes/scripts.html +0 -1
  47. package/docs/_posts/components/CADGeometry/QuadSet.md +1 -1
  48. package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +1 -1
  49. package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +1 -1
  50. package/docs/_posts/components/EnvironmentalEffects/Background.md +1 -1
  51. package/docs/_posts/components/EnvironmentalEffects/Fog.md +1 -1
  52. package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +1 -1
  53. package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +1 -1
  54. package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +1 -1
  55. package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +1 -1
  56. package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +1 -1
  57. package/docs/_posts/components/EventUtilities/IntegerSequencer.md +1 -1
  58. package/docs/_posts/components/Followers/ColorChaser.md +1 -1
  59. package/docs/_posts/components/Followers/ColorDamper.md +1 -1
  60. package/docs/_posts/components/Followers/CoordinateChaser.md +1 -1
  61. package/docs/_posts/components/Followers/ScalarChaser.md +1 -1
  62. package/docs/_posts/components/Geometry2D/Arc2D.md +1 -1
  63. package/docs/_posts/components/Geometry2D/ArcClose2D.md +1 -1
  64. package/docs/_posts/components/Geometry2D/Circle2D.md +1 -1
  65. package/docs/_posts/components/Geometry2D/Disk2D.md +1 -1
  66. package/docs/_posts/components/Geometry2D/Polyline2D.md +1 -1
  67. package/docs/_posts/components/Geometry2D/Polypoint2D.md +1 -1
  68. package/docs/_posts/components/Geometry2D/Rectangle2D.md +1 -1
  69. package/docs/_posts/components/Geometry2D/TriangleSet2D.md +1 -1
  70. package/docs/_posts/components/Geometry3D/Box.md +1 -1
  71. package/docs/_posts/components/Geometry3D/Cone.md +1 -1
  72. package/docs/_posts/components/Geometry3D/Cylinder.md +1 -1
  73. package/docs/_posts/components/Geometry3D/ElevationGrid.md +1 -1
  74. package/docs/_posts/components/Geometry3D/Extrusion.md +1 -1
  75. package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +1 -1
  76. package/docs/_posts/components/Geometry3D/Sphere.md +1 -1
  77. package/docs/_posts/components/Geospatial/GeoElevationGrid.md +1 -1
  78. package/docs/_posts/components/Geospatial/GeoLOD.md +1 -1
  79. package/docs/_posts/components/Geospatial/GeoViewpoint.md +1 -1
  80. package/docs/_posts/components/Grouping/Group.md +1 -1
  81. package/docs/_posts/components/Grouping/Switch.md +1 -1
  82. package/docs/_posts/components/Grouping/Transform.md +1 -1
  83. package/docs/_posts/components/HAnim/HAnimHumanoid.md +1 -1
  84. package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
  85. package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +1 -1
  86. package/docs/_posts/components/Interpolation/OrientationInterpolator.md +1 -1
  87. package/docs/_posts/components/Interpolation/PositionInterpolator.md +1 -1
  88. package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +1 -1
  89. package/docs/_posts/components/Interpolation/ScalarInterpolator.md +1 -1
  90. package/docs/_posts/components/Interpolation/SplineScalarInterpolator.md +1 -1
  91. package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.md +1 -1
  92. package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +1 -1
  93. package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +1 -1
  94. package/docs/_posts/components/Layering/LayerSet.md +1 -1
  95. package/docs/_posts/components/Layering/Viewport.md +1 -1
  96. package/docs/_posts/components/Lighting/DirectionalLight.md +1 -1
  97. package/docs/_posts/components/Lighting/PointLight.md +1 -1
  98. package/docs/_posts/components/Lighting/SpotLight.md +1 -1
  99. package/docs/_posts/components/NURBS/NurbsCurve.md +1 -1
  100. package/docs/_posts/components/NURBS/NurbsPatchSurface.md +1 -1
  101. package/docs/_posts/components/NURBS/NurbsSweptSurface.md +1 -1
  102. package/docs/_posts/components/Navigation/Billboard.md +1 -1
  103. package/docs/_posts/components/Navigation/Collision.md +1 -1
  104. package/docs/_posts/components/Navigation/NavigationInfo.md +1 -1
  105. package/docs/_posts/components/Navigation/OrthoViewpoint.md +1 -1
  106. package/docs/_posts/components/Navigation/Viewpoint.md +1 -1
  107. package/docs/_posts/components/Networking/Anchor.md +1 -1
  108. package/docs/_posts/components/Networking/Inline.md +1 -1
  109. package/docs/_posts/components/Networking/LoadSensor.md +1 -1
  110. package/docs/_posts/components/ParticleSystems/ConeEmitter.md +1 -1
  111. package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +1 -1
  112. package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +1 -1
  113. package/docs/_posts/components/ParticleSystems/ParticleSystem.md +1 -1
  114. package/docs/_posts/components/ParticleSystems/PointEmitter.md +1 -1
  115. package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +1 -1
  116. package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +1 -1
  117. package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +1 -1
  118. package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +1 -1
  119. package/docs/_posts/components/Picking/LinePickSensor.md +1 -1
  120. package/docs/_posts/components/Picking/PointPickSensor.md +1 -1
  121. package/docs/_posts/components/Picking/PrimitivePickSensor.md +1 -1
  122. package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +1 -1
  123. package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +1 -1
  124. package/docs/_posts/components/Rendering/ClipPlane.md +1 -1
  125. package/docs/_posts/components/Rendering/Color.md +1 -1
  126. package/docs/_posts/components/Rendering/ColorRGBA.md +1 -1
  127. package/docs/_posts/components/Rendering/Coordinate.md +1 -1
  128. package/docs/_posts/components/Rendering/IndexedLineSet.md +1 -1
  129. package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +1 -1
  130. package/docs/_posts/components/Rendering/IndexedTriangleSet.md +1 -1
  131. package/docs/_posts/components/Rendering/LineSet.md +1 -1
  132. package/docs/_posts/components/Rendering/PointSet.md +1 -1
  133. package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +1 -1
  134. package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +1 -1
  135. package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +1 -1
  136. package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +1 -1
  137. package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +1 -1
  138. package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +1 -1
  139. package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +1 -1
  140. package/docs/_posts/components/Shaders/ComposedShader.md +1 -1
  141. package/docs/_posts/components/Shaders/FloatVertexAttribute.md +1 -1
  142. package/docs/_posts/components/Shaders/ShaderPart.md +1 -1
  143. package/docs/_posts/components/Shape/Appearance.md +1 -1
  144. package/docs/_posts/components/Shape/FillProperties.md +1 -1
  145. package/docs/_posts/components/Shape/LineProperties.md +1 -1
  146. package/docs/_posts/components/Shape/Material.md +1 -1
  147. package/docs/_posts/components/Shape/TwoSidedMaterial.md +1 -1
  148. package/docs/_posts/components/Sound/AudioClip.md +1 -1
  149. package/docs/_posts/components/Text/FontStyle.md +1 -1
  150. package/docs/_posts/components/Text/Text.md +1 -1
  151. package/docs/_posts/components/Texturing/ImageTexture.md +1 -1
  152. package/docs/_posts/components/Texturing/MovieTexture.md +1 -1
  153. package/docs/_posts/components/Texturing/MultiTexture.md +1 -1
  154. package/docs/_posts/components/Texturing/PixelTexture.md +1 -1
  155. package/docs/_posts/components/Texturing3D/ImageTexture3D.md +1 -1
  156. package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +1 -1
  157. package/docs/_posts/components/Time/TimeSensor.md +1 -1
  158. package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +1 -1
  159. package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +1 -1
  160. package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +1 -1
  161. package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +1 -1
  162. package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +1 -1
  163. package/docs/_posts/components/VolumeRendering/VolumeData.md +1 -1
  164. package/docs/_posts/components/X_ITE/BlendMode.md +1 -1
  165. package/docs/_posts/custom-shaders.md +1 -1
  166. package/docs/_posts/getting-started.md +7 -2
  167. package/docs/_posts/reference/browser-services.md +6 -0
  168. package/docs/_posts/tutorials/adding-backgrounds.md +2 -2
  169. package/docs/_posts/tutorials/adding-sound.md +1 -1
  170. package/docs/_posts/tutorials/building-a-x3d-world.md +1 -1
  171. package/docs/_posts/tutorials/building-elevation-grids.md +1 -1
  172. package/docs/_posts/tutorials/building-primitive-shapes.md +2 -2
  173. package/docs/_posts/tutorials/controlling-appearance-with-materials.md +1 -1
  174. package/docs/_posts/tutorials/controlling-detail.md +1 -1
  175. package/docs/_posts/tutorials/hello-world.md +1 -1
  176. package/docs/_posts/tutorials/naming-nodes.md +1 -1
  177. package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +1 -1
  178. package/package.json +3 -3
  179. package/src/lib/jquery.js +13 -0
  180. package/src/standard/Geospatial/UniversalTransverseMercator.js +0 -1
  181. package/src/standard/Math/Geometry/Box2.js +18 -5
  182. package/src/standard/Math/Geometry/Box3.js +18 -5
  183. package/src/standard/Math/Geometry/Cylinder3.js +1 -1
  184. package/src/standard/Math/Geometry/Line2.js +1 -1
  185. package/src/standard/Math/Geometry/Line3.js +1 -1
  186. package/src/standard/Math/Geometry/Plane3.js +1 -1
  187. package/src/standard/Math/Geometry/Sphere3.js +14 -14
  188. package/src/standard/Math/Numbers/Complex.js +0 -4
  189. package/src/standard/Math/Numbers/Quaternion.js +27 -73
  190. package/src/standard/Math/Numbers/Rotation4.js +0 -29
  191. package/src/standard/Math/Numbers/Vector2.js +0 -64
  192. package/src/standard/Math/Numbers/Vector3.js +0 -72
  193. package/src/standard/Math/Numbers/Vector4.js +0 -64
  194. package/src/x_ite/Base/X3DObject.js +9 -32
  195. package/src/x_ite/Base/X3DObjectArrayField.js +35 -64
  196. package/src/x_ite/Browser/Core/BrowserOptions.js +37 -0
  197. package/src/x_ite/Browser/Core/X3DCoreContext.js +18 -0
  198. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +4 -4
  199. package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +12 -7
  200. package/src/x_ite/Browser/Navigation/ExamineViewer.js +9 -9
  201. package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -3
  202. package/src/x_ite/Browser/Navigation/WalkViewer.js +2 -2
  203. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +7 -7
  204. package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
  205. package/src/x_ite/Browser/Shaders/X3DShadersContext.js +0 -1
  206. package/src/x_ite/Browser/Text/X3DTextGeometry.js +2 -3
  207. package/src/x_ite/Browser/VERSION.js +1 -1
  208. package/src/x_ite/Browser/X3DBrowser.js +4 -4
  209. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +1 -1
  210. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +1 -1
  211. package/src/x_ite/Components/Followers/OrientationChaser.js +3 -3
  212. package/src/x_ite/Components/Followers/OrientationDamper.js +3 -3
  213. package/src/x_ite/Components/Geometry2D/Rectangle2D.js +2 -3
  214. package/src/x_ite/Components/Geometry3D/Box.js +3 -10
  215. package/src/x_ite/Components/Geometry3D/Cone.js +1 -1
  216. package/src/x_ite/Components/Geometry3D/Cylinder.js +2 -2
  217. package/src/x_ite/Components/Geometry3D/Extrusion.js +3 -3
  218. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
  219. package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +2 -2
  220. package/src/x_ite/Components/Layout/Layout.js +1 -1
  221. package/src/x_ite/Components/Navigation/Billboard.js +1 -1
  222. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +10 -10
  223. package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
  224. package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +7 -7
  225. package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +1 -1
  226. package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +9 -9
  227. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +1 -1
  228. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +2 -2
  229. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +1 -1
  230. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +1 -1
  231. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +3 -3
  232. package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +1 -1
  233. package/src/x_ite/Fields/ArrayFields.js +1 -1
  234. package/src/x_ite/Fields/SFNodeCache.js +2 -2
  235. package/src/x_ite/Fields/SFVec3.js +1 -1
  236. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +3 -3
  237. package/src/x_ite/Parser/SVGParser.js +1 -1
  238. package/src/x_ite/Rendering/X3DRenderObject.js +3 -3
  239. package/src/x_ite/X3DCanvasElement.js +1 -0
  240. package/docs/assets/js/autoupdate.js +0 -25
@@ -76,12 +76,12 @@ function ExamineViewer (executionContext, navigationInfo)
76
76
  X3DViewer .call (this, executionContext, navigationInfo);
77
77
 
78
78
  this .button = -1;
79
- this .orientationOffset = new Rotation4 (0, 0, 1, 0);
79
+ this .orientationOffset = new Rotation4 ();
80
80
  this .fromVector = new Vector3 (0, 0, 0);
81
81
  this .toVector = new Vector3 (0, 0, 0);
82
82
  this .fromPoint = new Vector3 (0, 0, 0);
83
83
  this .toPoint = new Vector3 (0, 0, 0);
84
- this .rotation = new Rotation4 (0, 0, 1, 0);
84
+ this .rotation = new Rotation4 ();
85
85
  this .direction = new Vector3 (0, 0, 0);
86
86
  this .axis = new Vector3 (0, 0, 0);
87
87
  this .pressTime = 0;
@@ -94,7 +94,7 @@ function ExamineViewer (executionContext, navigationInfo)
94
94
  this .dblTapInterval = 0.4;
95
95
 
96
96
  this .initialPositionOffset = new Vector3 (0, 0, 0);
97
- this .initialOrientationOffset = new Rotation4 (0, 0, 1, 0);
97
+ this .initialOrientationOffset = new Rotation4 ();
98
98
  this .positionChaser = new PositionChaser (executionContext);
99
99
  this .centerOfRotationChaser = new PositionChaser (executionContext);
100
100
  this .rotationChaser = new OrientationChaser (executionContext);
@@ -636,7 +636,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
636
636
  viewpoint = this .getActiveViewpoint (),
637
637
  userPosition = viewpoint .getUserPosition (),
638
638
  userCenterOfRotation = viewpoint .getUserCenterOfRotation (),
639
- direction = Vector3 .subtract (userPosition, userCenterOfRotation),
639
+ direction = userPosition .copy () .subtract (userCenterOfRotation),
640
640
  rotation = this .getHorizonRotation (rotationChange),
641
641
  axis = viewpoint .getUpVector (true);
642
642
 
@@ -755,7 +755,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
755
755
  const
756
756
  distance = new Vector3 (0, 0, 0),
757
757
  d = new Vector3 (0, 0, 0),
758
- oob = new Rotation4 (0, 0, 1, 0);
758
+ oob = new Rotation4 ();
759
759
 
760
760
  return function (positionOffsetBefore, orientationOffsetBefore, orientationOffsetAfter)
761
761
  {
@@ -773,8 +773,8 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
773
773
  getOrientationOffset: (function ()
774
774
  {
775
775
  const
776
- userOrientation = new Rotation4 (0, 0, 1, 0),
777
- orientationOffset = new Rotation4 (0, 0, 1, 0),
776
+ userOrientation = new Rotation4 (),
777
+ orientationOffset = new Rotation4 (),
778
778
  zAxis = new Vector3 (0, 0, 0);
779
779
 
780
780
  return function (rotation, orientationOffsetBefore, _throw)
@@ -822,8 +822,8 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
822
822
  {
823
823
  const
824
824
  V = rotation .multVecRot (zAxis .assign (Vector3 .zAxis)),
825
- N = Vector3 .cross (Vector3 .yAxis, V),
826
- H = Vector3 .cross (N, Vector3 .yAxis),
825
+ N = Vector3 .yAxis .copy () .cross (V),
826
+ H = N .copy () .cross (Vector3 .yAxis),
827
827
  r = new Rotation4 (Vector3 .zAxis, H);
828
828
 
829
829
  return r;
@@ -370,7 +370,7 @@ LookAtViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
370
370
 
371
371
  event .deltaY = delta;
372
372
  event .zoomFactor = Math .abs (delta) / $(window) .width ();
373
-
373
+
374
374
  event .pageX = (touches [0] .pageX + touches [1] .pageX) / 2;
375
375
  event .pageY = (touches [0] .pageY + touches [1] .pageY) / 2;
376
376
 
@@ -456,8 +456,8 @@ LookAtViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
456
456
  addRotation: (function ()
457
457
  {
458
458
  const
459
- userOrientation = new Rotation4 (0, 0, 1, 0),
460
- orientationOffset = new Rotation4 (0, 0, 1, 0);
459
+ userOrientation = new Rotation4 (),
460
+ orientationOffset = new Rotation4 ();
461
461
 
462
462
  return function (fromVector, toVector)
463
463
  {
@@ -82,8 +82,8 @@ WalkViewer .prototype = Object .assign (Object .create (X3DFlyViewer .prototype)
82
82
  {
83
83
  const
84
84
  localYAxis = new Vector3 (0, 0, 0),
85
- userOrientation = new Rotation4 (0, 0, 1, 0),
86
- rotation = new Rotation4 (0, 0, 1, 0);
85
+ userOrientation = new Rotation4 (),
86
+ rotation = new Rotation4 ();
87
87
 
88
88
  return function (velocity)
89
89
  {
@@ -410,9 +410,9 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
410
410
  upVector = new Vector3 (0, 0, 0),
411
411
  direction = new Vector3 (0, 0, 0),
412
412
  axis = new Vector3 (0, 0, 0),
413
- userOrientation = new Rotation4 (0, 0, 1, 0),
414
- orientationOffset = new Rotation4 (0, 0, 1, 0),
415
- rubberBandRotation = new Rotation4 (0, 0, 1, 0);
413
+ userOrientation = new Rotation4 (),
414
+ orientationOffset = new Rotation4 (),
415
+ rubberBandRotation = new Rotation4 ();
416
416
 
417
417
  return function ()
418
418
  {
@@ -543,8 +543,8 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
543
543
  addRoll: (function ()
544
544
  {
545
545
  const
546
- orientationOffset = new Rotation4 (0, 0, 1, 0),
547
- roll = new Rotation4 (0, 0, 1, 0);
546
+ orientationOffset = new Rotation4 (),
547
+ roll = new Rotation4 ();
548
548
 
549
549
  return function (rollAngle)
550
550
  {
@@ -580,8 +580,8 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
580
580
  addRotation: (function ()
581
581
  {
582
582
  const
583
- userOrientation = new Rotation4 (0, 0, 1, 0),
584
- orientationOffset = new Rotation4 (0, 0, 1, 0);
583
+ userOrientation = new Rotation4 (),
584
+ orientationOffset = new Rotation4 ();
585
585
 
586
586
  return function (fromVector, toVector)
587
587
  {
@@ -94,7 +94,7 @@ VolumePicker .prototype =
94
94
  {
95
95
  const
96
96
  translation = new Vector3 (0, 0, 0),
97
- rotation = new Rotation4 (0, 0, 1, 0),
97
+ rotation = new Rotation4 (),
98
98
  scale = new Vector3 (1, 1, 1),
99
99
  s = new Ammo .btVector3 (0, 0, 0);
100
100
 
@@ -53,7 +53,6 @@ import ShaderPart from "../../Components/Shaders/ShaderPart.js";
53
53
  const
54
54
  _wireframe = Symbol (),
55
55
  _primitiveModes = Symbol (),
56
- _defaultShader = Symbol (),
57
56
  _shaderNodes = Symbol ();
58
57
 
59
58
  function X3DShadersContext ()
@@ -536,9 +536,8 @@ X3DTextGeometry .prototype =
536
536
 
537
537
  text ._origin .setValue (origin .set (min .x, max .y, 0));
538
538
 
539
- this .bbox .set (min3 .set (min .x, min .y, 0),
540
- max3 .set (max .x, max .y, 0),
541
- true);
539
+ this .bbox .setExtents (min3 .set (min .x, min .y, 0),
540
+ max3 .set (max .x, max .y, 0));
542
541
  },
543
542
  stringToGlyphs: function (font, line, normal, lineNumber)
544
543
  {
@@ -45,4 +45,4 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- export default "8.7.5";
48
+ export default "8.7.6";
@@ -813,18 +813,18 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
813
813
  this .setLive (false);
814
814
  this .getExecutionContext () .setLive (false);
815
815
  },
816
- print: function ()
816
+ print: function (... args)
817
817
  {
818
- const string = Array .prototype .join .call (arguments, "");
818
+ const string = args .join ("");
819
819
 
820
820
  console .log (string);
821
821
 
822
822
  for (const element of this [_console])
823
823
  element .append (document .createTextNode (string));
824
824
  },
825
- println: function ()
825
+ println: function (... args)
826
826
  {
827
- const string = Array .prototype .join .call (arguments, "");
827
+ const string = args .join ("");
828
828
 
829
829
  console .log (string);
830
830
 
@@ -149,7 +149,7 @@ ProximitySensor .prototype = Object .assign (Object .create (X3DEnvironmentalSen
149
149
  invModelMatrix = new Matrix4 (),
150
150
  centerOfRotationMatrix = new Matrix4 (),
151
151
  position = new Vector3 (0, 0, 0),
152
- orientation = new Rotation4 (0, 0, 1, 0),
152
+ orientation = new Rotation4 (),
153
153
  centerOfRotation = new Vector3 (0, 0, 0);
154
154
 
155
155
  return function ()
@@ -213,7 +213,7 @@ TransformSensor .prototype = Object .assign (Object .create (X3DEnvironmentalSen
213
213
  {
214
214
  const
215
215
  position = new Vector3 (0, 0, 0),
216
- orientation = new Rotation4 (0, 0, 1, 0);
216
+ orientation = new Rotation4 ();
217
217
 
218
218
  return function ()
219
219
  {
@@ -53,8 +53,8 @@ import X3DConstants from "../../Base/X3DConstants.js";
53
53
  import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
54
54
 
55
55
  var
56
- a = new Rotation4 (0, 0, 1, 0),
57
- rotation = new Rotation4 (0, 0, 1, 0);
56
+ a = new Rotation4 (),
57
+ rotation = new Rotation4 ();
58
58
 
59
59
  function OrientationChaser (executionContext)
60
60
  {
@@ -100,7 +100,7 @@ OrientationChaser .prototype = Object .assign (Object .create (X3DChaserNode .pr
100
100
  },
101
101
  getVector: function ()
102
102
  {
103
- return new Rotation4 (0, 0, 1, 0);
103
+ return new Rotation4 ();
104
104
  },
105
105
  equals: function (lhs, rhs, tolerance)
106
106
  {
@@ -53,8 +53,8 @@ import X3DConstants from "../../Base/X3DConstants.js";
53
53
  import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
54
54
 
55
55
  var
56
- a = new Rotation4 (0, 0, 1, 0),
57
- rotation = new Rotation4 (0, 0, 1, 0);
56
+ a = new Rotation4 (),
57
+ rotation = new Rotation4 ();
58
58
 
59
59
  function OrientationDamper (executionContext)
60
60
  {
@@ -102,7 +102,7 @@ OrientationDamper .prototype = Object .assign (Object .create (X3DDamperNode .pr
102
102
  },
103
103
  getVector: function ()
104
104
  {
105
- return new Rotation4 (0, 0, 1, 0);
105
+ return new Rotation4 ();
106
106
  },
107
107
  equals: function (lhs, rhs, tolerance)
108
108
  {
@@ -112,9 +112,8 @@ Rectangle2D .prototype = Object .assign (Object .create (X3DGeometryNode .protot
112
112
  else
113
113
  {
114
114
  const
115
- scale = Vector3 .divide (size, 2),
116
- x = scale .x,
117
- y = scale .y,
115
+ x = Math .abs (size .x / 2),
116
+ y = Math .abs (size .y / 2),
118
117
  defaultVertices = geometry .getVertices () .getValue (),
119
118
  vertexArray = this .getVertices ();
120
119
 
@@ -109,15 +109,12 @@ Box .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
109
109
  else
110
110
  {
111
111
  const
112
- scale = Vector3 .divide (size, 2),
112
+ x = Math .abs (size .x / 2),
113
+ y = Math .abs (size .y / 2),
114
+ z = Math .abs (size .z / 2),
113
115
  defaultVertices = geometry .getVertices () .getValue (),
114
116
  vertexArray = this .getVertices ();
115
117
 
116
- let
117
- x = scale .x,
118
- y = scale .y,
119
- z = scale .z;
120
-
121
118
  for (let i = 0, length = defaultVertices .length; i < length; i += 4)
122
119
  {
123
120
  vertexArray .push (x * defaultVertices [i],
@@ -126,10 +123,6 @@ Box .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
126
123
  1);
127
124
  }
128
125
 
129
- x = Math .abs (x);
130
- y = Math .abs (y);
131
- z = Math .abs (z);
132
-
133
126
  this .getMin () .set (-x, -y, -z);
134
127
  this .getMax () .set ( x, y, z);
135
128
  }
@@ -174,7 +174,7 @@ Cone .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
174
174
  u = i / xDimension,
175
175
  theta = 2 * Math .PI * u,
176
176
  t = Complex .Polar (-1, theta),
177
- p = Complex .multiply (t, bottomRadius);
177
+ p = t .copy () .multiply (bottomRadius);
178
178
 
179
179
  texCoord .push (new Vector2 ((t .imag + 1) / 2, (t .real + 1) / 2));
180
180
  points .push (new Vector3 (p .imag, y2, p .real));
@@ -125,13 +125,13 @@ Cylinder .prototype = Object .assign (Object .create (X3DGeometryNode .prototype
125
125
  u1 = i / xDimension,
126
126
  theta1 = 2 * Math .PI * u1,
127
127
  n1 = Complex .Polar (-1, theta1),
128
- p1 = Complex .multiply (n1, radius);
128
+ p1 = n1 .copy () .multiply (radius);
129
129
 
130
130
  const
131
131
  u2 = (i + 1) / xDimension,
132
132
  theta2 = 2 * Math .PI * u2,
133
133
  n2 = Complex .Polar (-1, theta2),
134
- p2 = Complex .multiply (n2, radius);
134
+ p2 = n2 .copy () .multiply (radius);
135
135
 
136
136
  // p1 - p4
137
137
  // | \ |
@@ -184,7 +184,7 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
184
184
 
185
185
  const
186
186
  vector3 = new Vector3 (0, 0, 0),
187
- rotation = new Rotation4 (0, 0, 1, 0);
187
+ rotation = new Rotation4 ();
188
188
 
189
189
  return function ()
190
190
  {
@@ -606,7 +606,7 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
606
606
  point = points [index] .copy ();
607
607
 
608
608
  point .index = index;
609
- texCoord [index] = Vector2 .subtract (crossSection [numCapPoints - 1 - k] .getValue (), min) .divide (capMax);
609
+ texCoord [index] = crossSection [numCapPoints - 1 - k] .getValue () .copy () .subtract (min) .divide (capMax);
610
610
  polygon .push (convex ? index : point);
611
611
  }
612
612
 
@@ -646,7 +646,7 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
646
646
  point = points [index] .copy ();
647
647
 
648
648
  point .index = index;
649
- texCoord [index] = Vector2 .subtract (crossSection [k] .getValue (), min) .divide (capMax);
649
+ texCoord [index] = crossSection [k] .getValue () .copy () .subtract (min) .divide (capMax);
650
650
  polygon .push (convex ? index : point);
651
651
  }
652
652
 
@@ -183,7 +183,7 @@ GeoViewpoint .prototype = Object .assign (Object .create (X3DViewpointNode .prot
183
183
  {
184
184
  const
185
185
  locationMatrix = new Matrix4 (),
186
- geoOrientation = new Rotation4 (0, 0, 1, 0);
186
+ geoOrientation = new Rotation4 ();
187
187
 
188
188
  return function (value)
189
189
  {
@@ -200,7 +200,7 @@ GeoViewpoint .prototype = Object .assign (Object .create (X3DViewpointNode .prot
200
200
  {
201
201
  const
202
202
  locationMatrix = new Matrix4 (),
203
- orientation = new Rotation4 (0, 0, 1, 0);
203
+ orientation = new Rotation4 ();
204
204
 
205
205
  return function ()
206
206
  {
@@ -106,8 +106,8 @@ OrientationInterpolator .prototype = Object .assign (Object .create (X3DInterpol
106
106
  interpolate: (function ()
107
107
  {
108
108
  const
109
- keyValue0 = new Rotation4 (0, 0, 1, 0),
110
- keyValue1 = new Rotation4 (0, 0, 1, 0);
109
+ keyValue0 = new Rotation4 (),
110
+ keyValue1 = new Rotation4 ();
111
111
 
112
112
  return function (index0, index1, weight)
113
113
  {
@@ -103,7 +103,7 @@ Layout .prototype = Object .assign (Object .create (X3DLayoutNode .prototype),
103
103
  offset: new Vector3 (0, 0, 0),
104
104
  scale: new Vector3 (1, 1, 1),
105
105
  currentTranslation: new Vector3 (0, 0, 0),
106
- currentRotation: new Rotation4 (0, 0, 1, 0),
106
+ currentRotation: new Rotation4 (),
107
107
  currentScale: new Vector3 (0, 0, 0),
108
108
  modelViewMatrix: new Matrix4 (),
109
109
  [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
@@ -110,7 +110,7 @@ Billboard .prototype = Object .assign (Object .create (X3DGroupingNode .prototyp
110
110
  y = new Vector3 (0, 0, 0),
111
111
  N1 = new Vector3 (0, 0, 0),
112
112
  N2 = new Vector3 (0, 0, 0),
113
- rotation = new Rotation4 (0, 0, 1, 0);
113
+ rotation = new Rotation4 ();
114
114
 
115
115
  return function (modelViewMatrix)
116
116
  {
@@ -75,7 +75,7 @@ function X3DViewpointNode (executionContext)
75
75
  "fieldOfViewScale", new Fields .SFFloat (1));
76
76
 
77
77
  this .userPosition = new Vector3 (0, 1, 0);
78
- this .userOrientation = new Rotation4 (0, 0, 1, 0);
78
+ this .userOrientation = new Rotation4 ();
79
79
  this .userCenterOfRotation = new Vector3 (0, 0, 0);
80
80
  this .modelMatrix = new Matrix4 ();
81
81
  this .cameraSpaceMatrix = new Matrix4 (1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 10, 1);
@@ -384,9 +384,9 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
384
384
  {
385
385
  const
386
386
  position = new Vector3 (0, 0, 0),
387
- orientation = new Rotation4 (0, 0, 1, 0),
387
+ orientation = new Rotation4 (),
388
388
  scale = new Vector3 (0, 0, 0),
389
- scaleOrientation = new Rotation4 (0, 0, 1, 0);
389
+ scaleOrientation = new Rotation4 ();
390
390
 
391
391
  return function (fromViewpointNode)
392
392
  {
@@ -461,14 +461,14 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
461
461
  this .easeInEaseOut ._easeInEaseOut = new Fields .MFVec2f (new Fields .SFVec2f (0, 1), new Fields .SFVec2f (1, 0));
462
462
 
463
463
  const
464
- translation = Vector3 .lerp (this ._positionOffset .getValue (), offset, factor),
465
- direction = Vector3 .add (this .getPosition (), translation) .subtract (point);
464
+ translation = this ._positionOffset .getValue () .copy () .lerp (offset, factor),
465
+ direction = this .getPosition () .copy () .add (translation) .subtract (point);
466
466
 
467
- let rotation = Rotation4 .multRight (this ._orientationOffset .getValue (), new Rotation4 (this .getUserOrientation () .multVecRot (new Vector3 (0, 0, 1)), direction));
467
+ let rotation = this ._orientationOffset .getValue () .copy () .multRight (new Rotation4 (this .getUserOrientation () .multVecRot (new Vector3 (0, 0, 1)), direction));
468
468
 
469
469
  if (straighten)
470
470
  {
471
- rotation = Rotation4 .inverse (this .getOrientation ()) .multRight (this .straightenHorizon (Rotation4 .multRight (this .getOrientation (), rotation)));
471
+ rotation = this .getOrientation () .copy () .inverse () .multRight (this .straightenHorizon (this .getOrientation () .copy () .multRight (rotation)));
472
472
  }
473
473
 
474
474
  this .positionInterpolator ._keyValue = new Fields .MFVec3f (this ._positionOffset, translation);
@@ -479,7 +479,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
479
479
  const relative = this .getRelativeTransformation (this);
480
480
 
481
481
  this ._fieldOfViewScale = 1;
482
- this ._centerOfRotationOffset = Vector3 .subtract (point, this .getCenterOfRotation ());
482
+ this ._centerOfRotationOffset = point .copy () .subtract (this .getCenterOfRotation ());
483
483
  this .nearDistance = Math .min (distance / 2, 0.125);
484
484
  this .farDistance = this .nearDistance * this .getMaxFarValue () / 0.125;
485
485
 
@@ -497,7 +497,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
497
497
 
498
498
  this .easeInEaseOut ._easeInEaseOut = new Fields .MFVec2f (new Fields .SFVec2f (0, 1), new Fields .SFVec2f (1, 0));
499
499
 
500
- const rotation = Rotation4 .multRight (Rotation4 .inverse (this .getOrientation ()), this .straightenHorizon (this .getUserOrientation ()));
500
+ const rotation = this .getOrientation () .copy () .inverse () .multRight (this .straightenHorizon (this .getUserOrientation ()));
501
501
 
502
502
  this .positionInterpolator ._keyValue = new Fields .MFVec3f (this ._positionOffset, this ._positionOffset);
503
503
  this .orientationInterpolator ._keyValue = new Fields .MFRotation (this ._orientationOffset, rotation);
@@ -515,7 +515,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
515
515
  const
516
516
  localXAxis = new Vector3 (0, 0, 0),
517
517
  localZAxis = new Vector3 (0, 0, 0),
518
- rotation = new Rotation4 (0, 0, 1, 0);
518
+ rotation = new Rotation4 ();
519
519
 
520
520
  return function (orientation, upVector = this .getUpVector (true))
521
521
  {
@@ -192,7 +192,7 @@ PointPickSensor .prototype = Object .assign (Object .create (X3DPickSensorNode .
192
192
  transform = new Ammo .btTransform (),
193
193
  localScaling = new Ammo .btVector3 (),
194
194
  translation = new Vector3 (0, 0, 0),
195
- rotation = new Rotation4 (0, 0, 1, 0),
195
+ rotation = new Rotation4 (),
196
196
  scale = new Vector3 (1, 1, 1),
197
197
  pickedPoint = new Fields .MFVec3f ();
198
198
 
@@ -119,7 +119,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
119
119
  this .szNormal = null;
120
120
  this .behind = false;
121
121
  this .fromVector = new Vector3 (0, 0, 0);
122
- this .startOffset = new Rotation4 (0, 0, 1, 0);
122
+ this .startOffset = new Rotation4 ();
123
123
  },
124
124
  isBehind: function (hitRay, hitPoint)
125
125
  {
@@ -129,7 +129,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
129
129
 
130
130
  this .cylinder .intersectsLine (hitRay, enter, exit);
131
131
 
132
- return Vector3 .subtract (hitPoint, enter) .magnitude () > Vector3 .subtract (hitPoint, exit) .magnitude ();
132
+ return hitPoint .distance (enter) > hitPoint .distance (exit);
133
133
  },
134
134
  getTrackPoint: function (hitRay, trackPoint)
135
135
  {
@@ -138,7 +138,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
138
138
  this .zPlane .intersectsLine (hitRay, zPoint);
139
139
 
140
140
  const
141
- axisPoint = Vector3 .add (zPoint, this .cylinder .axis .getPerpendicularVectorToPoint (zPoint, new Vector3 (0, 0, 0))),
141
+ axisPoint = zPoint .copy () .add (this .cylinder .axis .getPerpendicularVectorToPoint (zPoint, new Vector3 (0, 0, 0))),
142
142
  distance = this .sxPlane .getDistanceToPoint (zPoint) / this .cylinder .radius,
143
143
  section = Math .floor ((distance + 1) / 2);
144
144
 
@@ -155,7 +155,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
155
155
  },
156
156
  getAngle: function (rotation)
157
157
  {
158
- if (Vector3 .dot (rotation .getAxis (new Vector3 (0, 0, 0)), this .cylinder .axis .direction) > 0)
158
+ if (rotation .getAxis (new Vector3 (0, 0, 0)) .dot (this .cylinder .axis .direction) > 0)
159
159
  return rotation .angle;
160
160
 
161
161
  else
@@ -183,7 +183,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
183
183
  radius = axis .getPerpendicularVectorToPoint (hitPoint, new Vector3 (0, 0, 0)) .magnitude ();
184
184
 
185
185
  this .cylinder = new Cylinder3 (axis, radius);
186
- this .disk = Math .abs (Vector3 .dot (cameraBack, yAxis)) > Math .cos (this ._diskAngle .getValue ());
186
+ this .disk = Math .abs (cameraBack .dot (yAxis)) > Math .cos (this ._diskAngle .getValue ());
187
187
  this .behind = this .isBehind (hitRay, hitPoint);
188
188
  this .yPlane = new Plane3 (hitPoint, yAxis); // Sensor aligned y-plane
189
189
  this .zPlane = new Plane3 (hitPoint, cameraBack); // Screen aligned z-plane
@@ -191,10 +191,10 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
191
191
  // Compute normal like in Billboard with yAxis as axis of rotation.
192
192
  const
193
193
  billboardToViewer = this .invModelViewMatrix .origin,
194
- sxNormal = Vector3 .cross (yAxis, billboardToViewer) .normalize ();
194
+ sxNormal = yAxis .copy () .cross (billboardToViewer) .normalize ();
195
195
 
196
196
  this .sxPlane = new Plane3 (new Vector3 (0, 0, 0), sxNormal); // Billboarded special x-plane made parallel to sensors axis.
197
- this .szNormal = Vector3 .cross (sxNormal, yAxis) .normalize (); // Billboarded special z-normal made parallel to sensors axis.
197
+ this .szNormal = sxNormal .copy () .cross (yAxis) .normalize (); // Billboarded special z-normal made parallel to sensors axis.
198
198
 
199
199
  const trackPoint = new Vector3 (0, 0, 0);
200
200
 
@@ -268,7 +268,7 @@ PlaneSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .prot
268
268
  {
269
269
  const
270
270
  axisRotation = this ._axisRotation .getValue (),
271
- translation = Rotation4 .inverse (axisRotation) .multVecRot (endPoint .add (this .startOffset) .subtract (this .startPoint));
271
+ translation = axisRotation .copy () .inverse () .multVecRot (endPoint .add (this .startOffset) .subtract (this .startPoint));
272
272
 
273
273
  // X component
274
274
 
@@ -107,7 +107,7 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
107
107
  this .behind = false;
108
108
  this .fromVector = new Vector3 (0, 0, 0);
109
109
  this .startPoint = new Vector3 (0, 0, 0);
110
- this .startOffset = new Rotation4 (0, 0, 1, 0);
110
+ this .startOffset = new Rotation4 ();
111
111
  },
112
112
  getTrackPoint: function (hitRay, trackPoint, behind)
113
113
  {
@@ -115,7 +115,7 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
115
115
 
116
116
  if (this .sphere .intersectsLine (hitRay, trackPoint, exit))
117
117
  {
118
- if ((Vector3 .subtract (hitRay .point, exit) .magnitude () < Vector3 .subtract (hitRay .point, trackPoint) .magnitude ()) - behind)
118
+ if ((hitRay .point .distance (exit) < hitRay .point .distance (trackPoint)) - behind)
119
119
  trackPoint .assign (exit);
120
120
 
121
121
  return true;
@@ -173,7 +173,7 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
173
173
 
174
174
  this .zPlane .intersectsLine (hitRay, tangentPoint);
175
175
 
176
- hitRay .set (tangentPoint, Vector3 .subtract (this .sphere .center, tangentPoint) .normalize ());
176
+ hitRay .set (tangentPoint, this .sphere .center .copy () .subtract (tangentPoint) .normalize ());
177
177
 
178
178
  //console .log (hitRay .toString ());
179
179
 
@@ -183,12 +183,12 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
183
183
 
184
184
  const
185
185
  triNormal = Triangle3 .normal (this .sphere .center, trackPoint, this .startPoint, new Vector3 (0, 0, 0)),
186
- dirFromCenter = Vector3 .subtract (trackPoint, this .sphere .center) .normalize (),
187
- normal = Vector3 .cross (triNormal, dirFromCenter) .normalize ();
186
+ dirFromCenter = trackPoint .copy () .subtract (this .sphere .center) .normalize (),
187
+ normal = triNormal .copy () .cross (dirFromCenter) .normalize ();
188
188
 
189
- const point1 = Vector3 .subtract (trackPoint, normal .multiply (Vector3 .subtract (tangentPoint, trackPoint) .magnitude ()));
189
+ const point1 = trackPoint .copy () .subtract (normal .multiply (tangentPoint .copy () .subtract (trackPoint) .magnitude ()));
190
190
 
191
- hitRay .set (point1, Vector3 .subtract (this .sphere .center, point1) .normalize ());
191
+ hitRay .set (point1, this .sphere .center .copy () .subtract (point1) .normalize ());
192
192
 
193
193
  this .getTrackPoint (hitRay, trackPoint, false);
194
194
  }
@@ -196,13 +196,13 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
196
196
  this ._trackPoint_changed = trackPoint;
197
197
 
198
198
  const
199
- toVector = Vector3 .subtract (trackPoint, this .sphere .center),
199
+ toVector = trackPoint .copy () .subtract (this .sphere .center),
200
200
  rotation = new Rotation4 (this .fromVector, toVector);
201
201
 
202
202
  if (this .behind)
203
203
  rotation .inverse ();
204
204
 
205
- this ._rotation_changed = Rotation4 .multRight (this .startOffset, rotation);
205
+ this ._rotation_changed = this .startOffset .copy () .multRight (rotation);
206
206
  },
207
207
  });
208
208
 
@@ -90,7 +90,7 @@ function X3DGeometryNode (executionContext)
90
90
 
91
91
  this .min = new Vector3 (0, 0, 0);
92
92
  this .max = new Vector3 (0, 0, 0);
93
- this .bbox = new Box3 (this .min, this .max, true);
93
+ this .bbox = Box3 .Extents (this .min, this .max);
94
94
  this .solid = true;
95
95
  this .primitiveMode = browser .getContext () .TRIANGLES;
96
96
  this .geometryType = 3;
@@ -223,7 +223,7 @@ DoubleAxisHingeJoint .prototype = Object .assign (Object .create (X3DRigidJointN
223
223
  localAnchorPoint1 = new Vector3 (0, 0, 0),
224
224
  localAxis1 = new Vector3 (0, 0, 0),
225
225
  difference = new Matrix4 (),
226
- rotation = new Rotation4 (0, 0, 1, 0);
226
+ rotation = new Rotation4 ();
227
227
 
228
228
  return function ()
229
229
  {
@@ -253,7 +253,7 @@ DoubleAxisHingeJoint .prototype = Object .assign (Object .create (X3DRigidJointN
253
253
  localAnchorPoint2 = new Vector3 (0, 0, 0),
254
254
  localAxis2 = new Vector3 (0, 0, 0),
255
255
  difference = new Matrix4 (),
256
- rotation = new Rotation4 (0, 0, 1, 0);
256
+ rotation = new Rotation4 ();
257
257
 
258
258
  return function ()
259
259
  {