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
@@ -137,11 +137,11 @@ SFRotation .prototype = Object .assign (Object .create (X3DField .prototype),
137
137
  },
138
138
  inverse: function ()
139
139
  {
140
- return new SFRotation (Rotation4 .inverse (this .getValue ()));
140
+ return new SFRotation (this .getValue () .copy () .inverse ());
141
141
  },
142
142
  multiply: function (rotation)
143
143
  {
144
- return new SFRotation (Rotation4 .multRight (this .getValue (), rotation .getValue ()));
144
+ return new SFRotation (this .getValue () .copy () .multRight (rotation .getValue ()));
145
145
  },
146
146
  multVec: function (vector)
147
147
  {
@@ -149,7 +149,7 @@ SFRotation .prototype = Object .assign (Object .create (X3DField .prototype),
149
149
  },
150
150
  slerp: function (rotation, t)
151
151
  {
152
- return new SFRotation (Rotation4 .slerp (this .getValue (), rotation .getValue (), t));
152
+ return new SFRotation (this .getValue () .copy () .slerp (rotation .getValue (), t));
153
153
  },
154
154
  toStream: function (generator)
155
155
  {
@@ -211,7 +211,6 @@ const x = {
211
211
  this .getValue () .x = +value;
212
212
  this .addEvent ();
213
213
  },
214
- enumerable: true,
215
214
  };
216
215
 
217
216
  const y = {
@@ -224,7 +223,6 @@ const y = {
224
223
  this .getValue () .y = +value;
225
224
  this .addEvent ();
226
225
  },
227
- enumerable: true,
228
226
  };
229
227
 
230
228
  const z = {
@@ -237,7 +235,6 @@ const z = {
237
235
  this .getValue () .z = +value;
238
236
  this .addEvent ();
239
237
  },
240
- enumerable: true,
241
238
  };
242
239
 
243
240
  const angle = {
@@ -250,22 +247,18 @@ const angle = {
250
247
  this .getValue () .angle = +value;
251
248
  this .addEvent ();
252
249
  },
253
- enumerable: true,
254
250
  };
255
251
 
256
- Object .defineProperty (SFRotation .prototype, "x", x);
257
- Object .defineProperty (SFRotation .prototype, "y", y);
258
- Object .defineProperty (SFRotation .prototype, "z", z);
259
- Object .defineProperty (SFRotation .prototype, "angle", angle);
260
-
261
- x .enumerable = false;
262
- y .enumerable = false;
263
- z .enumerable = false;
264
- angle .enumerable = false;
265
-
266
- Object .defineProperty (SFRotation .prototype, "0", x);
267
- Object .defineProperty (SFRotation .prototype, "1", y);
268
- Object .defineProperty (SFRotation .prototype, "2", z);
269
- Object .defineProperty (SFRotation .prototype, "3", angle);
252
+ Object .defineProperties (SFRotation .prototype,
253
+ {
254
+ 0: x,
255
+ 1: y,
256
+ 2: z,
257
+ 3: angle,
258
+ x: Object .assign ({ enumerable: true }, x),
259
+ y: Object .assign ({ enumerable: true }, y),
260
+ z: Object .assign ({ enumerable: true }, z),
261
+ angle: Object .assign ({ enumerable: true }, angle),
262
+ });
270
263
 
271
264
  export default SFRotation;
@@ -130,7 +130,6 @@ Object .defineProperty (SFString .prototype, "length",
130
130
  {
131
131
  return this .getValue () .length;
132
132
  },
133
- enumerable: true,
134
133
  });
135
134
 
136
135
  export default SFString;
@@ -69,11 +69,7 @@ function SFVec2Template (TypeName, Type, double)
69
69
  throw new Error ("Invalid arguments.");
70
70
  }
71
71
 
72
- SFVec2 .prototype = Object .assign (Object .create (X3DField .prototype),
73
- SFVecPrototypeTemplate (TypeName, Type, Vector2, double),
74
- {
75
- constructor: SFVec2,
76
- });
72
+ SFVec2 .prototype = SFVecPrototypeTemplate (SFVec2, TypeName, Type, Vector2, double);
77
73
 
78
74
  for (const key of Reflect .ownKeys (SFVec2 .prototype))
79
75
  Object .defineProperty (SFVec2 .prototype, key, { enumerable: false });
@@ -88,7 +84,6 @@ function SFVec2Template (TypeName, Type, double)
88
84
  this .getValue () .x = +value;
89
85
  this .addEvent ();
90
86
  },
91
- enumerable: true,
92
87
  };
93
88
 
94
89
  const y = {
@@ -101,17 +96,15 @@ function SFVec2Template (TypeName, Type, double)
101
96
  this .getValue () .y = +value;
102
97
  this .addEvent ();
103
98
  },
104
- enumerable: true,
105
99
  };
106
100
 
107
- Object .defineProperty (SFVec2 .prototype, "x", x);
108
- Object .defineProperty (SFVec2 .prototype, "y", y);
109
-
110
- x .enumerable = false;
111
- y .enumerable = false;
112
-
113
- Object .defineProperty (SFVec2 .prototype, "0", x);
114
- Object .defineProperty (SFVec2 .prototype, "1", y);
101
+ Object .defineProperties (SFVec2 .prototype,
102
+ {
103
+ 0: x,
104
+ 1: y,
105
+ x: Object .assign ({ enumerable: true }, x),
106
+ y: Object .assign ({ enumerable: true }, y),
107
+ });
115
108
 
116
109
  return SFVec2;
117
110
  }
@@ -69,13 +69,11 @@ function SFVec3Template (TypeName, Type, double)
69
69
  throw new Error ("Invalid arguments.");
70
70
  }
71
71
 
72
- SFVec3 .prototype = Object .assign (Object .create (X3DField .prototype),
73
- SFVecPrototypeTemplate (TypeName, Type, Vector3, double),
72
+ SFVec3 .prototype = Object .assign (SFVecPrototypeTemplate (SFVec3, TypeName, Type, Vector3, double),
74
73
  {
75
- constructor: SFVec3,
76
74
  cross: function (vector)
77
75
  {
78
- return new (this .constructor) (Vector3 .cross (this .getValue (), vector .getValue ()));
76
+ return new (this .constructor) (this .getValue () .copy () .cross (vector .getValue ()));
79
77
  },
80
78
  });
81
79
 
@@ -92,7 +90,6 @@ function SFVec3Template (TypeName, Type, double)
92
90
  this .getValue () .x = +value;
93
91
  this .addEvent ();
94
92
  },
95
- enumerable: true,
96
93
  };
97
94
 
98
95
  const y = {
@@ -105,7 +102,6 @@ function SFVec3Template (TypeName, Type, double)
105
102
  this .getValue () .y = +value;
106
103
  this .addEvent ();
107
104
  },
108
- enumerable: true,
109
105
  };
110
106
 
111
107
  const z = {
@@ -118,20 +114,17 @@ function SFVec3Template (TypeName, Type, double)
118
114
  this .getValue () .z = +value;
119
115
  this .addEvent ();
120
116
  },
121
- enumerable: true,
122
117
  };
123
118
 
124
- Object .defineProperty (SFVec3 .prototype, "x", x);
125
- Object .defineProperty (SFVec3 .prototype, "y", y);
126
- Object .defineProperty (SFVec3 .prototype, "z", z);
127
-
128
- x .enumerable = false;
129
- y .enumerable = false;
130
- z .enumerable = false;
131
-
132
- Object .defineProperty (SFVec3 .prototype, "0", x);
133
- Object .defineProperty (SFVec3 .prototype, "1", y);
134
- Object .defineProperty (SFVec3 .prototype, "2", z);
119
+ Object .defineProperties (SFVec3 .prototype,
120
+ {
121
+ 0: x,
122
+ 1: y,
123
+ 2: z,
124
+ x: Object .assign ({ enumerable: true }, x),
125
+ y: Object .assign ({ enumerable: true }, y),
126
+ z: Object .assign ({ enumerable: true }, z),
127
+ });
135
128
 
136
129
  return SFVec3;
137
130
  }
@@ -69,11 +69,7 @@ function SFVec4Template (TypeName, Type, double)
69
69
  throw new Error ("Invalid arguments.");
70
70
  }
71
71
 
72
- SFVec4 .prototype = Object .assign (Object .create (X3DField .prototype),
73
- SFVecPrototypeTemplate (TypeName, Type, Vector4, double),
74
- {
75
- constructor: SFVec4,
76
- });
72
+ SFVec4 .prototype = SFVecPrototypeTemplate (SFVec4, TypeName, Type, Vector4, double);
77
73
 
78
74
  for (const key of Reflect .ownKeys (SFVec4 .prototype))
79
75
  Object .defineProperty (SFVec4 .prototype, key, { enumerable: false });
@@ -88,7 +84,6 @@ function SFVec4Template (TypeName, Type, double)
88
84
  this .getValue () .x = +value;
89
85
  this .addEvent ();
90
86
  },
91
- enumerable: true,
92
87
  };
93
88
 
94
89
  const y = {
@@ -101,7 +96,6 @@ function SFVec4Template (TypeName, Type, double)
101
96
  this .getValue () .y = +value;
102
97
  this .addEvent ();
103
98
  },
104
- enumerable: true,
105
99
  };
106
100
 
107
101
  const z = {
@@ -114,7 +108,6 @@ function SFVec4Template (TypeName, Type, double)
114
108
  this .getValue () .z = +value;
115
109
  this .addEvent ();
116
110
  },
117
- enumerable: true,
118
111
  };
119
112
 
120
113
  const w = {
@@ -127,23 +120,19 @@ function SFVec4Template (TypeName, Type, double)
127
120
  this .getValue () .w = +value;
128
121
  this .addEvent ();
129
122
  },
130
- enumerable: true,
131
123
  };
132
124
 
133
- Object .defineProperty (SFVec4 .prototype, "x", x);
134
- Object .defineProperty (SFVec4 .prototype, "y", y);
135
- Object .defineProperty (SFVec4 .prototype, "z", z);
136
- Object .defineProperty (SFVec4 .prototype, "w", w);
137
-
138
- x .enumerable = false;
139
- y .enumerable = false;
140
- z .enumerable = false;
141
- w .enumerable = false;
142
-
143
- Object .defineProperty (SFVec4 .prototype, "0", x);
144
- Object .defineProperty (SFVec4 .prototype, "1", y);
145
- Object .defineProperty (SFVec4 .prototype, "2", z);
146
- Object .defineProperty (SFVec4 .prototype, "3", w);
125
+ Object .defineProperties (SFVec4 .prototype,
126
+ {
127
+ 0: x,
128
+ 1: y,
129
+ 2: z,
130
+ 3: w,
131
+ x: Object .assign ({ enumerable: true }, x),
132
+ y: Object .assign ({ enumerable: true }, y),
133
+ z: Object .assign ({ enumerable: true }, z),
134
+ w: Object .assign ({ enumerable: true }, w),
135
+ });
147
136
 
148
137
  return SFVec4;
149
138
  }
@@ -45,14 +45,15 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- import X3DField from "../Base/X3DField.js";
48
+ import X3DField from "../Base/X3DField.js";
49
49
 
50
- function SFVecPrototypeTemplate (TypeName, Type, ValueType, double)
50
+ function SFVecPrototypeTemplate (Constructor, TypeName, Type, Vector, double)
51
51
  {
52
52
  const _formatter = double ? "DoubleFormat" : "FloatFormat";
53
53
 
54
54
  return Object .assign (Object .create (X3DField .prototype),
55
55
  {
56
+ constructor: Constructor,
56
57
  [Symbol .iterator]: function* ()
57
58
  {
58
59
  yield* this .getValue ();
@@ -75,7 +76,7 @@ function SFVecPrototypeTemplate (TypeName, Type, ValueType, double)
75
76
  },
76
77
  isDefaultValue: function ()
77
78
  {
78
- return this .getValue () .equals (ValueType .Zero);
79
+ return this .getValue () .equals (Vector .Zero);
79
80
  },
80
81
  set: function (value)
81
82
  {
@@ -83,11 +84,11 @@ function SFVecPrototypeTemplate (TypeName, Type, ValueType, double)
83
84
  },
84
85
  abs: function ()
85
86
  {
86
- return new (this .constructor) (ValueType .abs (this .getValue ()));
87
+ return new (this .constructor) (this .getValue () .copy () .abs ());
87
88
  },
88
89
  add: function (vector)
89
90
  {
90
- return new (this .constructor) (ValueType .add (this .getValue (), vector .getValue ()));
91
+ return new (this .constructor) (this .getValue () .copy () .add (vector .getValue ()));
91
92
  },
92
93
  distance: function (vector)
93
94
  {
@@ -95,11 +96,11 @@ function SFVecPrototypeTemplate (TypeName, Type, ValueType, double)
95
96
  },
96
97
  divide: function (value)
97
98
  {
98
- return new (this .constructor) (ValueType .divide (this .getValue (), value));
99
+ return new (this .constructor) (this .getValue () .copy () .divide (value));
99
100
  },
100
101
  divVec: function (vector)
101
102
  {
102
- return new (this .constructor) (ValueType .divVec (this .getValue (), vector .getValue ()));
103
+ return new (this .constructor) (this .getValue () .copy () .divVec (vector .getValue ()));
103
104
  },
104
105
  dot: function (vector)
105
106
  {
@@ -107,7 +108,7 @@ function SFVecPrototypeTemplate (TypeName, Type, ValueType, double)
107
108
  },
108
109
  inverse: function ()
109
110
  {
110
- return new (this .constructor) (ValueType .inverse (this .getValue ()));
111
+ return new (this .constructor) (this .getValue () .copy () .inverse ());
111
112
  },
112
113
  length: function ()
113
114
  {
@@ -115,35 +116,35 @@ function SFVecPrototypeTemplate (TypeName, Type, ValueType, double)
115
116
  },
116
117
  lerp: function (destination, t)
117
118
  {
118
- return new (this .constructor) (ValueType .lerp (this .getValue (), destination, t));
119
+ return new (this .constructor) (this .getValue () .copy () .lerp (destination, t));
119
120
  },
120
121
  max: function (vector)
121
122
  {
122
- return new (this .constructor) (ValueType .max (this .getValue (), vector .getValue ()));
123
+ return new (this .constructor) (this .getValue () .copy () .max (vector .getValue ()));
123
124
  },
124
125
  min: function (vector)
125
126
  {
126
- return new (this .constructor) (ValueType .min (this .getValue (), vector .getValue ()));
127
+ return new (this .constructor) (this .getValue () .copy () .min (vector .getValue ()));
127
128
  },
128
129
  multiply: function (value)
129
130
  {
130
- return new (this .constructor) (ValueType .multiply (this .getValue (), value));
131
+ return new (this .constructor) (this .getValue () .copy () .multiply (value));
131
132
  },
132
133
  multVec: function (vector)
133
134
  {
134
- return new (this .constructor) (ValueType .multVec (this .getValue (), vector .getValue ()));
135
+ return new (this .constructor) (this .getValue () .copy () .multVec (vector .getValue ()));
135
136
  },
136
137
  negate: function ()
137
138
  {
138
- return new (this .constructor) (ValueType .negate (this .getValue ()));
139
+ return new (this .constructor) (this .getValue () .copy () .negate ());
139
140
  },
140
141
  normalize: function (vector)
141
142
  {
142
- return new (this .constructor) (ValueType .normalize (this .getValue ()));
143
+ return new (this .constructor) (this .getValue () .copy () .normalize ());
143
144
  },
144
145
  subtract: function (vector)
145
146
  {
146
- return new (this .constructor) (ValueType .subtract (this .getValue (), vector .getValue ()));
147
+ return new (this .constructor) (this .getValue () .copy () .subtract (vector .getValue ()));
147
148
  },
148
149
  toStream: function (generator)
149
150
  {
@@ -918,7 +918,7 @@ SVGParser .prototype = Object .assign (Object .create (X3DParser .prototype),
918
918
  bbox = new Box2 ();
919
919
 
920
920
  for (const points of contours)
921
- bbox .add (new Box2 (Vector2 .min (... points), Vector2 .max (... points), true));
921
+ bbox .add (Box2 .Points (... points));
922
922
 
923
923
  this .groupNodes .push (transformNode);
924
924
 
@@ -1177,7 +1177,7 @@ SVGParser .prototype = Object .assign (Object .create (X3DParser .prototype),
1177
1177
  m .scale (new Vector2 (1, -1));
1178
1178
 
1179
1179
  if (g .units === "userSpaceOnUse")
1180
- m .multLeft (Matrix3 .inverse (bbox .matrix));
1180
+ m .multLeft (bbox .matrix .copy () .inverse ());
1181
1181
  else
1182
1182
  m .multLeft (new Matrix3 (2, 0, 0, 0, 2, 0, -1, -1, 1));
1183
1183
 
@@ -2690,7 +2690,7 @@ SVGParser .prototype = Object .assign (Object .create (X3DParser .prototype),
2690
2690
  const
2691
2691
  scene = this .getExecutionContext (),
2692
2692
  texCoordNode = scene .createNode ("TextureCoordinate"),
2693
- invMatrix = Matrix3 .inverse (bbox .matrix);
2693
+ invMatrix = bbox .matrix .copy () .inverse ();
2694
2694
 
2695
2695
  for (const point of coordinateNode .point)
2696
2696
  texCoordNode .point .push (invMatrix .multVecMatrix (new Vector2 (point .x, point .y)) .add (Vector2 .One) .divide (2));
@@ -66,7 +66,7 @@ X3DOptimizer .prototype = {
66
66
  },
67
67
  optimizeNodes: function (nodes, combine, removedNodes)
68
68
  {
69
- return nodes .flatMap (node => this .optimizeNode (node, combine, removedNodes));
69
+ return [... nodes] .flatMap (node => this .optimizeNode (node, combine, removedNodes));
70
70
  },
71
71
  optimizeNode: function (node, combine, removedNodes)
72
72
  {
@@ -408,34 +408,33 @@ X3DExternProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoD
408
408
  for (const key of Reflect .ownKeys (X3DExternProtoDeclaration .prototype))
409
409
  Object .defineProperty (X3DExternProtoDeclaration .prototype, key, { enumerable: false });
410
410
 
411
- Object .defineProperty (X3DExternProtoDeclaration .prototype, "name",
411
+ Object .defineProperties (X3DExternProtoDeclaration .prototype,
412
412
  {
413
- get: X3DExternProtoDeclaration .prototype .getName,
414
- enumerable: true,
415
- });
416
-
417
- Object .defineProperty (X3DExternProtoDeclaration .prototype, "fields",
418
- {
419
- get: X3DExternProtoDeclaration .prototype .getFieldDefinitions,
420
- enumerable: true,
421
- });
422
-
423
- Object .defineProperty (X3DExternProtoDeclaration .prototype, "isExternProto",
424
- {
425
- value: true,
426
- enumerable: true,
427
- });
428
-
429
- Object .defineProperty (X3DExternProtoDeclaration .prototype, "urls",
430
- {
431
- get: function () { return this ._url; },
432
- enumerable: true,
433
- });
434
-
435
- Object .defineProperty (X3DExternProtoDeclaration .prototype, "loadState",
436
- {
437
- get: X3DExternProtoDeclaration .prototype .checkLoadState,
438
- enumerable: true,
413
+ name:
414
+ {
415
+ get: X3DExternProtoDeclaration .prototype .getName,
416
+ enumerable: true,
417
+ },
418
+ fields:
419
+ {
420
+ get: X3DExternProtoDeclaration .prototype .getFieldDefinitions,
421
+ enumerable: true,
422
+ },
423
+ isExternProto:
424
+ {
425
+ value: true,
426
+ enumerable: true,
427
+ },
428
+ urls:
429
+ {
430
+ get: function () { return this ._url; },
431
+ enumerable: true,
432
+ },
433
+ loadState:
434
+ {
435
+ get: X3DExternProtoDeclaration .prototype .checkLoadState,
436
+ enumerable: true,
437
+ },
439
438
  });
440
439
 
441
440
  export default X3DExternProtoDeclaration;
@@ -542,22 +542,23 @@ X3DProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoDeclara
542
542
  for (const key of Reflect .ownKeys (X3DProtoDeclaration .prototype))
543
543
  Object .defineProperty (X3DProtoDeclaration .prototype, key, { enumerable: false });
544
544
 
545
- Object .defineProperty (X3DProtoDeclaration .prototype, "name",
545
+ Object .defineProperties (X3DProtoDeclaration .prototype,
546
546
  {
547
- get: X3DProtoDeclaration .prototype .getName,
548
- enumerable: true,
549
- });
550
-
551
- Object .defineProperty (X3DProtoDeclaration .prototype, "fields",
552
- {
553
- get: X3DProtoDeclaration .prototype .getFieldDefinitions,
554
- enumerable: true,
555
- });
556
-
557
- Object .defineProperty (X3DProtoDeclaration .prototype, "isExternProto",
558
- {
559
- value: false,
560
- enumerable: true,
547
+ name:
548
+ {
549
+ get: X3DProtoDeclaration .prototype .getName,
550
+ enumerable: true,
551
+ },
552
+ fields:
553
+ {
554
+ get: X3DProtoDeclaration .prototype .getFieldDefinitions,
555
+ enumerable: true,
556
+ },
557
+ isExternProto:
558
+ {
559
+ value: false,
560
+ enumerable: true,
561
+ },
561
562
  });
562
563
 
563
564
  export default X3DProtoDeclaration;
@@ -349,9 +349,9 @@ X3DRenderObject .prototype =
349
349
  const
350
350
  projectionMatrix = new Matrix4 (),
351
351
  cameraSpaceProjectionMatrix = new Matrix4 (),
352
- localOrientation = new Rotation4 (0, 0, 1, 0),
352
+ localOrientation = new Rotation4 (),
353
353
  vector = new Vector3 (0, 0, 0),
354
- rotation = new Rotation4 (0, 0, 1, 0);
354
+ rotation = new Rotation4 ();
355
355
 
356
356
  return function (direction)
357
357
  {
@@ -805,7 +805,7 @@ X3DRenderObject .prototype =
805
805
  projectionMatrix = new Matrix4 (),
806
806
  cameraSpaceProjectionMatrix = new Matrix4 (),
807
807
  translation = new Vector3 (0, 0, 0),
808
- rotation = new Rotation4 (0, 0, 1, 0);
808
+ rotation = new Rotation4 ();
809
809
 
810
810
  return function ()
811
811
  {
@@ -76,6 +76,7 @@ function X3DRoute (executionContext, sourceNode, sourceField, destinationNode, d
76
76
 
77
77
  X3DRoute .prototype = Object .assign (Object .create (X3DObject .prototype),
78
78
  {
79
+ constructor: X3DRoute,
79
80
  getTypeName: function ()
80
81
  {
81
82
  return "X3DRoute";
@@ -260,40 +261,40 @@ X3DRoute .prototype = Object .assign (Object .create (X3DObject .prototype),
260
261
  for (const key of Reflect .ownKeys (X3DRoute .prototype))
261
262
  Object .defineProperty (X3DRoute .prototype, key, { enumerable: false });
262
263
 
263
- Object .defineProperty (X3DRoute .prototype, "sourceNode",
264
+ Object .defineProperties (X3DRoute .prototype,
264
265
  {
265
- get: function ()
266
+ sourceNode:
266
267
  {
267
- return SFNodeCache .get (this [_sourceNode]);
268
+ get: function ()
269
+ {
270
+ return SFNodeCache .get (this [_sourceNode]);
271
+ },
272
+ enumerable: true,
268
273
  },
269
- enumerable: true,
270
- });
271
-
272
- Object .defineProperty (X3DRoute .prototype, "sourceField",
273
- {
274
- get: function ()
274
+ sourceField:
275
275
  {
276
- return this [_sourceField] .getName ();
276
+ get: function ()
277
+ {
278
+ return this [_sourceField] .getName ();
279
+ },
280
+ enumerable: true,
277
281
  },
278
- enumerable: true,
279
- });
280
-
281
- Object .defineProperty (X3DRoute .prototype, "destinationNode",
282
- {
283
- get: function ()
282
+ destinationNode:
284
283
  {
285
- return SFNodeCache .get (this [_destinationNode]);
284
+ get: function ()
285
+ {
286
+ return SFNodeCache .get (this [_destinationNode]);
287
+ },
288
+ enumerable: true,
286
289
  },
287
- enumerable: true,
288
- });
289
-
290
- Object .defineProperty (X3DRoute .prototype, "destinationField",
291
- {
292
- get: function ()
290
+ destinationField:
293
291
  {
294
- return this [_destinationField] .getName ();
292
+ get: function ()
293
+ {
294
+ return this [_destinationField] .getName ();
295
+ },
296
+ enumerable: true,
295
297
  },
296
- enumerable: true,
297
298
  });
298
299
 
299
300
  export default X3DRoute;
@@ -81,6 +81,7 @@ class X3DCanvasElement extends HTMLElement
81
81
  "splashscreen",
82
82
  "src",
83
83
  "timings",
84
+ "update",
84
85
  "url",
85
86
  ];
86
87
  }
@@ -1,25 +0,0 @@
1
- $ .fn .isInViewport = function ()
2
- {
3
- const
4
- elementTop = $(this) .offset () .top,
5
- elementBottom = elementTop + $(this) .outerHeight (),
6
- viewportTop = $(window) .scrollTop (),
7
- viewportBottom = viewportTop + $(window) .height ();
8
-
9
- return elementBottom > viewportTop && elementTop < viewportBottom;
10
- };
11
-
12
- $(window) .on ("resize scroll load", () =>
13
- {
14
- for (const element of $("x3d-canvas"))
15
- {
16
- if ($(element) .isInViewport ())
17
- {
18
- element .browser .beginUpdate ();
19
- }
20
- else
21
- {
22
- element .browser .endUpdate ();
23
- }
24
- }
25
- });