x_ite 8.8.2 → 8.8.4

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 (246) 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 +29 -29
  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 +22 -22
  12. package/dist/assets/components/Geometry2D.min.js +1 -1
  13. package/dist/assets/components/Geospatial.js +48 -48
  14. package/dist/assets/components/Geospatial.min.js +1 -1
  15. package/dist/assets/components/HAnim.js +19 -19
  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 +32 -32
  20. package/dist/assets/components/Layout.min.js +1 -1
  21. package/dist/assets/components/NURBS.js +35 -35
  22. package/dist/assets/components/NURBS.min.js +1 -1
  23. package/dist/assets/components/ParticleSystems.js +33 -33
  24. package/dist/assets/components/ParticleSystems.min.js +1 -1
  25. package/dist/assets/components/Picking.js +32 -35
  26. package/dist/assets/components/Picking.min.js +1 -1
  27. package/dist/assets/components/RigidBodyPhysics.js +47 -56
  28. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  29. package/dist/assets/components/Scripting.js +46 -56
  30. package/dist/assets/components/Scripting.min.js +1 -1
  31. package/dist/assets/components/Text.js +26 -26
  32. package/dist/assets/components/Text.min.js +1 -1
  33. package/dist/assets/components/TextureProjector.js +16 -16
  34. package/dist/assets/components/TextureProjector.min.js +1 -1
  35. package/dist/assets/components/Texturing3D.js +37 -37
  36. package/dist/assets/components/Texturing3D.min.js +1 -1
  37. package/dist/assets/components/VolumeRendering.js +18 -18
  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 +1762 -1827
  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/package.json +2 -2
  47. package/src/bookmarks.js +1 -1
  48. package/src/lib/jquery.js +8 -0
  49. package/src/lib/nurbs/src/utils/create-accessors.js +4 -4
  50. package/src/lib/nurbs/src/utils/variable.js +1 -1
  51. package/src/shim.js +1 -1
  52. package/src/standard/Math/Algorithms/Bezier.js +2 -2
  53. package/src/standard/Math/Geometry/Box2.js +4 -4
  54. package/src/standard/Math/Geometry/Box3.js +8 -8
  55. package/src/standard/Math/Geometry/Camera.js +1 -1
  56. package/src/standard/Math/Geometry/Line2.js +2 -2
  57. package/src/standard/Math/Geometry/Line3.js +4 -4
  58. package/src/standard/Math/Geometry/Sphere3.js +1 -1
  59. package/src/standard/Math/Geometry/Triangle3.js +2 -2
  60. package/src/standard/Math/Geometry/ViewVolume.js +10 -10
  61. package/src/standard/Math/Numbers/Matrix2.js +2 -2
  62. package/src/standard/Math/Numbers/Matrix3.js +10 -10
  63. package/src/standard/Math/Numbers/Matrix4.js +12 -12
  64. package/src/standard/Math/Numbers/Quaternion.js +2 -2
  65. package/src/standard/Math/Numbers/Rotation4.js +2 -2
  66. package/src/standard/Math/Numbers/Vector3.js +1 -1
  67. package/src/standard/Utility/MapUtilities.js +2 -2
  68. package/src/x_ite/Base/Events.js +6 -33
  69. package/src/x_ite/Base/FieldArray.js +1 -1
  70. package/src/x_ite/Base/FieldDefinitionArray.js +1 -1
  71. package/src/x_ite/Base/X3DArrayField.js +1 -1
  72. package/src/x_ite/Base/X3DBaseNode.js +58 -69
  73. package/src/x_ite/Base/X3DChildObject.js +46 -14
  74. package/src/x_ite/Base/X3DConstants.js +1 -1
  75. package/src/x_ite/Base/X3DField.js +4 -6
  76. package/src/x_ite/Base/X3DFieldDefinition.js +1 -1
  77. package/src/x_ite/Base/X3DInfoArray.js +1 -1
  78. package/src/x_ite/Base/X3DObject.js +5 -5
  79. package/src/x_ite/Base/X3DObjectArrayField.js +1 -1
  80. package/src/x_ite/Base/X3DTypedArrayField.js +1 -1
  81. package/src/x_ite/Browser/Core/BrowserOptions.js +7 -3
  82. package/src/x_ite/Browser/Core/BrowserTimings.js +1 -1
  83. package/src/x_ite/Browser/Core/ContextMenu.js +1 -12
  84. package/src/x_ite/Browser/Core/X3DCoreContext.js +1 -2
  85. package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +1 -1
  86. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator.js +2 -2
  87. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +1 -1
  88. package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +1 -1
  89. package/src/x_ite/Browser/Layout/ScreenText.js +4 -4
  90. package/src/x_ite/Browser/Layout/X3DLayoutContext.js +1 -1
  91. package/src/x_ite/Browser/NURBS/NURBS.js +3 -3
  92. package/src/x_ite/Browser/Navigation/ExamineViewer.js +9 -13
  93. package/src/x_ite/Browser/Navigation/LookAtViewer.js +4 -7
  94. package/src/x_ite/Browser/Navigation/WalkViewer.js +1 -1
  95. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +5 -6
  96. package/src/x_ite/Browser/Navigation/X3DViewer.js +2 -2
  97. package/src/x_ite/Browser/Networking/URLs.js +17 -9
  98. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +0 -2
  99. package/src/x_ite/Browser/Picking/VolumePicker.js +2 -2
  100. package/src/x_ite/Browser/Text/PolygonText.js +2 -2
  101. package/src/x_ite/Browser/Texturing3D/DICOMParser.js +3 -3
  102. package/src/x_ite/Browser/Texturing3D/NRRDParser.js +2 -2
  103. package/src/x_ite/Browser/Time/X3DTimeContext.js +1 -1
  104. package/src/x_ite/Browser/VERSION.js +1 -1
  105. package/src/x_ite/Browser/X3DBrowser.js +148 -67
  106. package/src/x_ite/Browser/X3DBrowserContext.js +52 -16
  107. package/src/x_ite/Components/Core/X3DNode.js +21 -2
  108. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +38 -42
  109. package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +2 -2
  110. package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +1 -1
  111. package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +4 -4
  112. package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +1 -1
  113. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +2 -2
  114. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +2 -2
  115. package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +1 -1
  116. package/src/x_ite/Components/Followers/X3DFollowerNode.js +1 -1
  117. package/src/x_ite/Components/Geometry2D/ArcClose2D.js +1 -1
  118. package/src/x_ite/Components/Geometry2D/Rectangle2D.js +1 -1
  119. package/src/x_ite/Components/Geometry3D/Box.js +1 -1
  120. package/src/x_ite/Components/Geometry3D/Extrusion.js +3 -3
  121. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +3 -3
  122. package/src/x_ite/Components/Geospatial/GeoCoordinate.js +6 -6
  123. package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +1 -1
  124. package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +1 -1
  125. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +7 -7
  126. package/src/x_ite/Components/Grouping/StaticGroup.js +1 -1
  127. package/src/x_ite/Components/Grouping/X3DBoundedObject.js +2 -2
  128. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +1 -1
  129. package/src/x_ite/Components/Interpolation/ColorInterpolator.js +1 -1
  130. package/src/x_ite/Components/Interpolation/NormalInterpolator.js +1 -1
  131. package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +1 -1
  132. package/src/x_ite/Components/Interpolation/PositionInterpolator.js +1 -1
  133. package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +1 -1
  134. package/src/x_ite/Components/Layering/X3DLayerNode.js +1 -1
  135. package/src/x_ite/Components/Lighting/X3DLightNode.js +1 -1
  136. package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +1 -1
  137. package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +2 -2
  138. package/src/x_ite/Components/Navigation/Billboard.js +1 -1
  139. package/src/x_ite/Components/Navigation/LOD.js +2 -2
  140. package/src/x_ite/Components/Navigation/OrthoViewpoint.js +1 -1
  141. package/src/x_ite/Components/Navigation/Viewpoint.js +1 -1
  142. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +3 -3
  143. package/src/x_ite/Components/Networking/Inline.js +0 -4
  144. package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +1 -1
  145. package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +2 -2
  146. package/src/x_ite/Components/ParticleSystems/PointEmitter.js +1 -1
  147. package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +2 -2
  148. package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +1 -1
  149. package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +2 -2
  150. package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +1 -1
  151. package/src/x_ite/Components/Picking/LinePickSensor.js +1 -1
  152. package/src/x_ite/Components/Picking/PickableGroup.js +1 -1
  153. package/src/x_ite/Components/Picking/PointPickSensor.js +2 -2
  154. package/src/x_ite/Components/Picking/PrimitivePickSensor.js +1 -1
  155. package/src/x_ite/Components/Picking/VolumePickSensor.js +1 -1
  156. package/src/x_ite/Components/Picking/X3DPickSensorNode.js +6 -9
  157. package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +1 -1
  158. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +1 -1
  159. package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +2 -2
  160. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +8 -11
  161. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +2 -2
  162. package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +2 -2
  163. package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +3 -3
  164. package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +1 -1
  165. package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +5 -14
  166. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +3 -3
  167. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +9 -9
  168. package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +1 -1
  169. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +3 -3
  170. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +1 -1
  171. package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +1 -1
  172. package/src/x_ite/Components/Scripting/Script.js +9 -19
  173. package/src/x_ite/Components/Shaders/ShaderPart.js +2 -2
  174. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +385 -382
  175. package/src/x_ite/Components/Shape/Appearance.js +1 -1
  176. package/src/x_ite/Components/Shape/Material.js +1 -1
  177. package/src/x_ite/Components/Shape/PhysicalMaterial.js +1 -1
  178. package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +1 -1
  179. package/src/x_ite/Components/Sound/Sound.js +2 -2
  180. package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +2 -2
  181. package/src/x_ite/Components/Texturing/MultiTexture.js +3 -3
  182. package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +1 -1
  183. package/src/x_ite/Components/Texturing/TextureProperties.js +4 -4
  184. package/src/x_ite/Components/Texturing/TextureTransform.js +1 -1
  185. package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +2 -2
  186. package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +1 -1
  187. package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +1 -1
  188. package/src/x_ite/Components.js +1 -20
  189. package/src/x_ite/Configuration/AbstractNodesArray.js +1 -1
  190. package/src/x_ite/Configuration/ComponentInfo.js +1 -1
  191. package/src/x_ite/Configuration/ComponentInfoArray.js +1 -1
  192. package/src/x_ite/Configuration/ConcreteNodesArray.js +1 -1
  193. package/src/x_ite/Configuration/ProfileInfo.js +1 -1
  194. package/src/x_ite/Configuration/ProfileInfoArray.js +1 -1
  195. package/src/x_ite/Configuration/UnitInfo.js +1 -1
  196. package/src/x_ite/Configuration/UnitInfoArray.js +1 -1
  197. package/src/x_ite/Execution/BindableList.js +1 -1
  198. package/src/x_ite/Execution/BindableStack.js +1 -1
  199. package/src/x_ite/Execution/ExportedNodesArray.js +1 -1
  200. package/src/x_ite/Execution/ImportedNodesArray.js +1 -1
  201. package/src/x_ite/Execution/NamedNodesArray.js +1 -1
  202. package/src/x_ite/Execution/X3DExecutionContext.js +9 -11
  203. package/src/x_ite/Execution/X3DExportedNode.js +1 -1
  204. package/src/x_ite/Execution/X3DImportedNode.js +1 -1
  205. package/src/x_ite/Execution/X3DScene.js +2 -6
  206. package/src/x_ite/Execution/X3DWorld.js +1 -2
  207. package/src/x_ite/{Browser/Networking/Features.js → Features.js} +9 -2
  208. package/src/x_ite/Fields/ArrayFields.js +9 -51
  209. package/src/x_ite/Fields/SFBool.js +1 -1
  210. package/src/x_ite/Fields/SFColor.js +2 -2
  211. package/src/x_ite/Fields/SFColorRGBA.js +2 -2
  212. package/src/x_ite/Fields/SFDouble.js +1 -1
  213. package/src/x_ite/Fields/SFFloat.js +1 -1
  214. package/src/x_ite/Fields/SFImage.js +2 -2
  215. package/src/x_ite/Fields/SFInt32.js +1 -1
  216. package/src/x_ite/Fields/SFMatrix3.js +1 -1
  217. package/src/x_ite/Fields/SFMatrix4.js +1 -1
  218. package/src/x_ite/Fields/SFNode.js +3 -25
  219. package/src/x_ite/Fields/SFNodeCache.js +24 -3
  220. package/src/x_ite/Fields/SFRotation.js +1 -1
  221. package/src/x_ite/Fields/SFString.js +1 -1
  222. package/src/x_ite/Fields/SFTime.js +1 -1
  223. package/src/x_ite/Fields/SFVec2.js +1 -1
  224. package/src/x_ite/Fields/SFVec3.js +1 -1
  225. package/src/x_ite/Fields/SFVec4.js +1 -1
  226. package/src/x_ite/InputOutput/FileLoader.js +1 -1
  227. package/src/x_ite/InputOutput/Generator.js +8 -8
  228. package/src/x_ite/Parser/GLTF2Parser.js +5 -5
  229. package/src/x_ite/Parser/HTMLSupport.js +3 -0
  230. package/src/x_ite/Parser/SVGParser.js +2 -2
  231. package/src/x_ite/Parser/VRMLParser.js +1 -1
  232. package/src/x_ite/Parser/XMLParser.js +1 -1
  233. package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +1 -1
  234. package/src/x_ite/Prototype/ProtoDeclarationArray.js +1 -1
  235. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +1 -3
  236. package/src/x_ite/Prototype/X3DProtoDeclaration.js +1 -2
  237. package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -2
  238. package/src/x_ite/Rendering/DependentRenderer.js +1 -1
  239. package/src/x_ite/Rendering/TextureBuffer.js +2 -2
  240. package/src/x_ite/Rendering/X3DRenderObject.js +11 -11
  241. package/src/x_ite/Routing/RouteArray.js +1 -1
  242. package/src/x_ite/Routing/X3DRoute.js +1 -1
  243. package/src/x_ite/X3D.js +2 -2
  244. package/src/x_ite.html +3 -3
  245. package/x_ite.min.html +3 -3
  246. package/src/x_ite/Base/X3DEventObject.js +0 -115
@@ -64,18 +64,22 @@ import XMLParser from "../Parser/XMLParser.js";
64
64
  import JSONParser from "../Parser/JSONParser.js";
65
65
  import X3DCast from "../Base/X3DCast.js";
66
66
  import X3DConstants from "../Base/X3DConstants.js";
67
- import Features from "./Networking/Features.js";
67
+ import Features from "../Features.js";
68
68
  import Algorithm from "../../standard/Math/Algorithm.js";
69
69
  import MapUtilities from "../../standard/Utility/MapUtilities.js";
70
70
  import _ from "../../locale/gettext.js";
71
71
 
72
72
  const
73
- _DOMIntegration = Symbol (),
74
- _reject = Symbol (),
75
- _fileLoader = Symbol (),
76
- _browserCallbacks = Symbol (),
77
- _console = Symbol (),
78
- _processEvents = Symbol .for ("X_ITE.X3DRoutingContext.processEvents");
73
+ _DOMIntegration = Symbol (),
74
+ _supportedProfiles = Symbol (),
75
+ _supportedComponents = Symbol (),
76
+ _concreteNodes = Symbol (),
77
+ _abstractNodes = Symbol (),
78
+ _reject = Symbol (),
79
+ _fileLoader = Symbol (),
80
+ _browserCallbacks = Symbol (),
81
+ _console = Symbol (),
82
+ _processEvents = Symbol .for ("X_ITE.X3DRoutingContext.processEvents");
79
83
 
80
84
  function X3DBrowser (element)
81
85
  {
@@ -88,8 +92,12 @@ function X3DBrowser (element)
88
92
 
89
93
  this .addType (X3DConstants .X3DBrowser);
90
94
 
91
- this [_browserCallbacks] = new Map ();
92
- this [_console] = document .getElementsByClassName ("x_ite-console");
95
+ this [_supportedProfiles] = SupportedProfiles .copy ();
96
+ this [_supportedComponents] = SupportedComponents .copy ();
97
+ this [_concreteNodes] = ConcreteNodes .copy ();
98
+ this [_abstractNodes] = AbstractNodes .copy ();
99
+ this [_browserCallbacks] = new Map ();
100
+ this [_console] = document .getElementsByClassName ("x_ite-console");
93
101
 
94
102
  this .setup ();
95
103
  };
@@ -118,30 +126,30 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, X3DBrowserContext
118
126
  if (!this .getBrowserOption ("Debug"))
119
127
  return;
120
128
 
121
- this .printWelcomeMessage ();
122
- },
123
- printWelcomeMessage ()
124
- {
125
- this .print (`Welcome to ${this .name} X3D Browser v${this .version}:\n` +
126
- ` Current Graphics Renderer\n` +
127
- ` Name: ${this .getVendor ()} ${this .getRenderer ()}\n` +
128
- ` WebGL version: ${this .getWebGLVersion ()}\n` +
129
- ` Shading language: ${this .getShadingLanguageVersion ()}\n` +
130
- ` Rendering Properties\n` +
131
- ` Antialiased: ${this .getAntialiased ()}\n` +
132
- ` Max samples: ${this .getMaxSamples ()}\n` +
133
- ` Depth size: ${this .getDepthSize ()} bits\n` +
134
- ` Color depth: ${this .getColorDepth ()} bits\n` +
135
- ` Max clip planes per shape: ${this .getMaxClipPlanes ()}\n` +
136
- ` Max lights per shape: ${this .getMaxLights ()}\n` +
137
- ` Max multi textures per shape: ${this .getMaxTextures ()}\n` +
138
- ` Texture units: ${this .getMaxCombinedTextureUnits ()}\n` +
139
- ` Max texture size: ${this .getMaxTextureSize ()} × ${this .getMaxTextureSize ()} pixels\n` +
140
- ` Texture memory: ${this .getTextureMemory ()}\n` +
141
- ` Max vertex uniform vectors: ${this .getMaxVertexUniformVectors ()}\n` +
142
- ` Max fragment uniform vectors: ${this .getMaxFragmentUniformVectors ()}\n` +
143
- ` Max vertex attribs: ${this .getMaxVertexAttribs ()}\n` +
144
- ` Max varying vectors: ${this .getMaxVaryingVectors ()}\n`);
129
+ this .print (this .getWelcomeMessage ());
130
+ },
131
+ getWelcomeMessage ()
132
+ {
133
+ return `Welcome to ${this .name} X3D Browser v${this .version}:\n` +
134
+ ` Current Graphics Renderer\n` +
135
+ ` Name: ${this .getVendor ()} ${this .getRenderer ()}\n` +
136
+ ` WebGL version: ${this .getWebGLVersion ()}\n` +
137
+ ` Shading language: ${this .getShadingLanguageVersion ()}\n` +
138
+ ` Rendering Properties\n` +
139
+ ` Antialiased: ${this .getAntialiased ()}\n` +
140
+ ` Max samples: ${this .getMaxSamples ()}\n` +
141
+ ` Depth size: ${this .getDepthSize ()} bits\n` +
142
+ ` Color depth: ${this .getColorDepth ()} bits\n` +
143
+ ` Max clip planes per shape: ${this .getMaxClipPlanes ()}\n` +
144
+ ` Max lights per shape: ${this .getMaxLights ()}\n` +
145
+ ` Max multi textures per shape: ${this .getMaxTextures ()}\n` +
146
+ ` Texture units: ${this .getMaxCombinedTextureUnits ()}\n` +
147
+ ` Max texture size: ${this .getMaxTextureSize ()} × ${this .getMaxTextureSize ()} pixels\n` +
148
+ ` Texture memory: ${this .getTextureMemory ()}\n` +
149
+ ` Max vertex uniform vectors: ${this .getMaxVertexUniformVectors ()}\n` +
150
+ ` Max fragment uniform vectors: ${this .getMaxFragmentUniformVectors ()}\n` +
151
+ ` Max vertex attribs: ${this .getMaxVertexAttribs ()}\n` +
152
+ ` Max varying vectors: ${this .getMaxVaryingVectors ()}\n`;
145
153
  },
146
154
  getName ()
147
155
  {
@@ -167,23 +175,44 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, X3DBrowserContext
167
175
  {
168
176
  name = String (name);
169
177
 
170
- const profile = SupportedProfiles .get (name);
178
+ const profile = this [_supportedProfiles] .get (name);
171
179
 
172
180
  if (profile)
173
181
  return profile;
174
182
 
175
183
  throw Error (`Profile '${name}' is not supported.`);
176
184
  },
185
+ addSupportedProfile: function (profile)
186
+ {
187
+ this [_supportedProfiles] .add (profile .name, profile);
188
+ },
189
+ updateSupportedProfile: function (profile)
190
+ {
191
+ this [_supportedProfiles] .update (profile .name, profile .name, profile);
192
+ },
193
+ removeSupportedProfile (name)
194
+ {
195
+ return this [_supportedProfiles] .remove (String (name));
196
+ },
197
+ getSupportedProfile (name)
198
+ {
199
+ const profile = this [_supportedProfiles] .get (String (name));
200
+
201
+ if (profile)
202
+ return profile;
203
+
204
+ throw new Error (`Supported profile '${name}' does not exists.`);
205
+ },
177
206
  getSupportedProfiles ()
178
207
  {
179
- return SupportedProfiles;
208
+ return this [_supportedProfiles];
180
209
  },
181
- getComponent (name, level = 0)
210
+ getComponent (name, level)
182
211
  {
183
212
  name = String (name);
184
213
  level |= 0;
185
214
 
186
- const component = SupportedComponents .get (name);
215
+ const component = this [_supportedComponents] .get (name);
187
216
 
188
217
  if (component)
189
218
  {
@@ -197,30 +226,60 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, X3DBrowserContext
197
226
 
198
227
  throw Error (`Component '${name}' at level '${level}' is not supported.`);
199
228
  },
229
+ addSupportedComponent (component)
230
+ {
231
+ this [_supportedComponents] .add (component .name, component);
232
+ },
233
+ updateSupportedComponent (component)
234
+ {
235
+ this [_supportedComponents] .update (component .name, component .name, component);
236
+ },
237
+ removeSupportedComponent (name)
238
+ {
239
+ this [_supportedComponents] .remove (String (name));
240
+ },
241
+ getSupportedComponent (name)
242
+ {
243
+ const component = this [_supportedComponents] .get (String (name));
244
+
245
+ if (component)
246
+ return component;
247
+
248
+ throw new Error (`Supported component '${name}' does not exists.`);
249
+ },
200
250
  getSupportedComponents ()
201
251
  {
202
- return SupportedComponents;
252
+ return this [_supportedComponents];
203
253
  },
204
- loadComponents: (function ()
254
+ loadComponents: (() =>
205
255
  {
206
256
  function loadComponents (components, seen)
207
257
  {
208
- return Promise .all (components .map (component => loadComponent (component, seen)))
258
+ return Promise .all (components .map (component => loadComponent .call (this, component, seen)))
209
259
  }
210
260
 
211
261
  async function loadComponent ({ name, providerUrl, external, dependencies }, seen)
212
262
  {
213
263
  if (seen .has (name)) return; seen .add (name);
214
264
 
215
- await loadComponents (dependencies .map (name => SupportedComponents .get (name)), seen);
265
+ await loadComponents .call (this, dependencies .map (name => this [_supportedComponents] .get (name)), seen);
216
266
 
217
267
  if (!external)
218
268
  return;
219
269
 
220
- if (Features .NODE_ENV)
221
- global .require (global .require ("url") .fileURLToPath (providerUrl))
222
- else
223
- await import (/* webpackIgnore: true */ providerUrl);
270
+ switch (Features .ENVIRONMENT)
271
+ {
272
+ case "NODE":
273
+ {
274
+ global .require (global .require ("url") .fileURLToPath (providerUrl))
275
+ break;
276
+ }
277
+ case "BROWSER":
278
+ {
279
+ await import (/* webpackIgnore: true */ providerUrl);
280
+ break;
281
+ }
282
+ }
224
283
  }
225
284
 
226
285
  return function (... args)
@@ -239,52 +298,62 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, X3DBrowserContext
239
298
  component .push (arg);
240
299
 
241
300
  else if (typeof arg === "string")
242
- component .push (SupportedComponents .get (arg))
301
+ component .push (this [_supportedComponents] .get (arg))
243
302
  }
244
303
 
245
304
  // Load array of component names.
246
- return loadComponents (component, new Set ());
305
+ return loadComponents .call (this, component, new Set ());
247
306
  };
248
307
  })(),
249
- addConcreteNode (typeName, ConcreteNode)
308
+ addConcreteNode (ConcreteNode)
250
309
  {
251
- ConcreteNodes .add (String (typeName), ConcreteNode);
310
+ this [_concreteNodes] .add (ConcreteNode .typeName, ConcreteNode);
252
311
  },
253
- updateConcreteNode (typeName, ConcreteNode)
312
+ updateConcreteNode (ConcreteNode)
254
313
  {
255
- ConcreteNodes .update (String (typeName), String (typeName), ConcreteNode);
314
+ this [_concreteNodes] .update (ConcreteNode .typeName, ConcreteNode .typeName, ConcreteNode);
256
315
  },
257
316
  removeConcreteNode (typeName)
258
317
  {
259
- ConcreteNodes .remove (String (typeName));
318
+ this [_concreteNodes] .remove (String (typeName));
260
319
  },
261
320
  getConcreteNode (typeName)
262
321
  {
263
- return ConcreteNodes .get (String (typeName));
322
+ const concreteNode = this [_concreteNodes] .get (String (typeName));
323
+
324
+ if (concreteNode)
325
+ return concreteNode;
326
+
327
+ throw new Error (`Concrete node '${typeName}' does not exists.`);
264
328
  },
265
329
  getConcreteNodes ()
266
330
  {
267
- return ConcreteNodes;
331
+ return this [_concreteNodes];
268
332
  },
269
- addAbstractNode (typeName, AbstractNode)
333
+ addAbstractNode (AbstractNode)
270
334
  {
271
- AbstractNodes .add (String (typeName), AbstractNode);
335
+ this [_abstractNodes] .add (AbstractNode .typeName, AbstractNode);
272
336
  },
273
- updateAbstractNode (typeName, AbstractNode)
337
+ updateAbstractNode (AbstractNode)
274
338
  {
275
- AbstractNodes .update (String (typeName), String (typeName), AbstractNode);
339
+ this [_abstractNodes] .update (AbstractNode .typeName, AbstractNode .typeName, AbstractNode);
276
340
  },
277
341
  removeAbstractNode (typeName)
278
342
  {
279
- AbstractNodes .remove (String (typeName));
343
+ this [_abstractNodes] .remove (String (typeName));
280
344
  },
281
345
  getAbstractNode (typeName)
282
346
  {
283
- return AbstractNodes .get (String (typeName));
347
+ const abstractNode = this [_abstractNodes] .get (String (typeName));
348
+
349
+ if (abstractNode)
350
+ return abstractNode;
351
+
352
+ throw new Error (`Abstract node '${typeName}' does not exists.`);
284
353
  },
285
354
  getAbstractNodes ()
286
355
  {
287
- return AbstractNodes;
356
+ return this [_abstractNodes];
288
357
  },
289
358
  createScene (profile, ... components)
290
359
  {
@@ -609,7 +678,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, X3DBrowserContext
609
678
  {
610
679
  return this [_browserCallbacks];
611
680
  },
612
- callBrowserCallbacks: (function ()
681
+ callBrowserCallbacks: (() =>
613
682
  {
614
683
  const browserCallbacks = [ ];
615
684
 
@@ -867,7 +936,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, X3DBrowserContext
867
936
  },
868
937
  });
869
938
 
870
- for (const key of Reflect .ownKeys (X3DBrowser .prototype))
939
+ for (const key of Object .keys (X3DBrowser .prototype))
871
940
  Object .defineProperty (X3DBrowser .prototype, key, { enumerable: false });
872
941
 
873
942
  Object .defineProperties (X3DBrowser .prototype,
@@ -914,22 +983,34 @@ Object .defineProperties (X3DBrowser .prototype,
914
983
  },
915
984
  supportedProfiles:
916
985
  {
917
- value: SupportedProfiles,
986
+ get ()
987
+ {
988
+ return this [_supportedProfiles];
989
+ },
918
990
  enumerable: true,
919
991
  },
920
992
  supportedComponents:
921
993
  {
922
- value: SupportedComponents,
994
+ get ()
995
+ {
996
+ return this [_supportedComponents];
997
+ },
923
998
  enumerable: true,
924
999
  },
925
1000
  concreteNodes:
926
1001
  {
927
- value: ConcreteNodes,
1002
+ get ()
1003
+ {
1004
+ return this [_concreteNodes];
1005
+ },
928
1006
  enumerable: true,
929
1007
  },
930
1008
  abstractNodes:
931
1009
  {
932
- value: AbstractNodes,
1010
+ get ()
1011
+ {
1012
+ return this [_abstractNodes];
1013
+ },
933
1014
  enumerable: true,
934
1015
  },
935
1016
  });
@@ -65,9 +65,12 @@ import X3DSoundContext from "./Sound/X3DSoundContext.js";
65
65
  import X3DTexturingContext from "./Texturing/X3DTexturingContext.js";
66
66
  import X3DTimeContext from "./Time/X3DTimeContext.js";
67
67
  import X3DRoutingContext from "../Routing/X3DRoutingContext.js";
68
+ import AbstractNodes from "../Configuration/AbstractNodes.js"
69
+ import ConcreteNodes from "../Configuration/ConcreteNodes.js"
68
70
  import X3DWorld from "../Execution/X3DWorld.js";
69
71
  import TraverseType from "../Rendering/TraverseType.js";
70
72
  import StopWatch from "../../standard/Time/StopWatch.js";
73
+ import DEVELOPMENT from "../DEVELOPMENT.js";
71
74
 
72
75
  const
73
76
  _world = Symbol (),
@@ -367,37 +370,70 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, X3DBaseNod
367
370
  },
368
371
  });
369
372
 
370
- for (const key of Reflect .ownKeys (X3DBrowserContext .prototype))
373
+ for (const key of Object .keys (X3DBrowserContext .prototype))
371
374
  Object .defineProperty (X3DBrowserContext .prototype, key, { enumerable: false });
372
375
 
373
376
  Object .assign (X3DBrowserContext,
374
377
  {
375
- addBrowserContext (browserContext)
378
+ addComponent ({ name, concreteNodes, abstractNodes, browserContext, external })
376
379
  {
377
- browserContexts .push (browserContext);
380
+ if (concreteNodes)
381
+ {
382
+ for (const ConcreteNode of concreteNodes)
383
+ ConcreteNodes .add (ConcreteNode .typeName, ConcreteNode);
384
+ }
378
385
 
379
- const keys = Object .keys (browserContext .prototype)
380
- .filter (k => !k .match (/^(initialize|dispose)$/))
381
- .concat (Object .getOwnPropertySymbols (browserContext .prototype));
386
+ if (abstractNodes)
387
+ {
388
+ for (const AbstractNode of abstractNodes)
389
+ AbstractNodes .add (AbstractNode .typeName, AbstractNode);
390
+ }
382
391
 
383
- for (const key of keys)
392
+ if (browserContext)
384
393
  {
385
- Object .defineProperty (X3DBrowserContext .prototype, key,
394
+ browserContexts .push (browserContext);
395
+
396
+ const keys = Object .keys (browserContext .prototype)
397
+ .filter (k => !k .match (/^(?:initialize|dispose)$/))
398
+ .concat (Object .getOwnPropertySymbols (browserContext .prototype));
399
+
400
+ for (const key of keys)
386
401
  {
387
- value: browserContext .prototype [key],
388
- writable: true,
389
- });
402
+ Object .defineProperty (X3DBrowserContext .prototype, key,
403
+ {
404
+ value: browserContext .prototype [key],
405
+ writable: true,
406
+ });
407
+ }
390
408
  }
391
409
 
392
410
  for (const browser of browsers)
393
411
  {
394
- browserContext .call (browser);
395
- browserContext .prototype .initialize ?.call (browser);
412
+ if (concreteNodes)
413
+ {
414
+ for (const ConcreteNode of concreteNodes)
415
+ browser .addConcreteNode (ConcreteNode);
416
+ }
417
+
418
+ if (abstractNodes)
419
+ {
420
+ for (const AbstractNode of abstractNodes)
421
+ browser .addAbstractNode (AbstractNode);
422
+ }
396
423
 
397
- // Process events from context creation. This will setup nodes like
398
- // geometry option nodes before any node is created.
399
- browser [_processEvents] ();
424
+ if (browserContext)
425
+ {
426
+ browserContext .call (browser);
427
+ browserContext .prototype .initialize ?.call (browser);
428
+
429
+ // Process events from context creation. This will setup nodes like
430
+ // geometry option nodes before any node is created.
431
+ browser [_processEvents] ();
432
+ }
400
433
  }
434
+
435
+ if (external && DEVELOPMENT)
436
+ console .info (`Done loading external component '${name}'.`);
401
437
  },
402
438
  });
403
439
 
@@ -48,13 +48,16 @@
48
48
  import Fields from "../../Fields.js";
49
49
  import X3DBaseNode from "../../Base/X3DBaseNode.js";
50
50
  import X3DConstants from "../../Base/X3DConstants.js";
51
- import SFNodeCache from "../../Fields/SFNodeCache.js";
51
+
52
+ const _private = Symbol ()
52
53
 
53
54
  function X3DNode (executionContext)
54
55
  {
55
56
  X3DBaseNode .call (this, executionContext);
56
57
 
57
58
  this .addType (X3DConstants .X3DNode);
59
+
60
+ this [_private] = false;
58
61
  }
59
62
 
60
63
  Object .assign (Object .setPrototypeOf (X3DNode .prototype, X3DBaseNode .prototype),
@@ -219,6 +222,22 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, X3DBaseNode .prototy
219
222
 
220
223
  return false;
221
224
  },
225
+ isPrivate ()
226
+ {
227
+ return this [_private];
228
+ },
229
+ setPrivate (value)
230
+ {
231
+ this [_private] = value;
232
+ },
233
+ getCloneCount ()
234
+ {
235
+ return X3DBaseNode .prototype .collectCloneCount .call (this);
236
+ },
237
+ collectCloneCount ()
238
+ {
239
+ return this .isPrivate () ? 0 : 1;
240
+ },
222
241
  getSourceText ()
223
242
  {
224
243
  return null;
@@ -1354,7 +1373,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, X3DBaseNode .prototy
1354
1373
  },
1355
1374
  });
1356
1375
 
1357
- for (const key of Reflect .ownKeys (X3DNode .prototype))
1376
+ for (const key of Object .keys (X3DNode .prototype))
1358
1377
  Object .defineProperty (X3DNode .prototype, key, { enumerable: false });
1359
1378
 
1360
1379
  Object .defineProperties (X3DNode,
@@ -88,22 +88,29 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
88
88
  {
89
89
  this [_body] ?.dispose ();
90
90
 
91
- const proto = this [_protoNode] .getProtoDeclaration ();
91
+ const protoNode = this [_protoNode];
92
92
 
93
- if (!proto)
93
+ if (protoNode .isExternProto)
94
94
  {
95
- this [_body] = new X3DExecutionContext (this .getExecutionContext (), this);
96
- this [_body] .setup ();
95
+ if (protoNode .checkLoadState () !== X3DConstants .COMPLETE_STATE)
96
+ {
97
+ this [_body] = null;
97
98
 
98
- if (this .isInitialized ())
99
- X3DChildObject .prototype .addEvent .call (this);
99
+ if (this .isInitialized ())
100
+ X3DChildObject .prototype .addEvent .call (this);
101
+
102
+ protoNode ._updateInstances .addInterest ("construct", this);
103
+ protoNode .requestImmediateLoad () .catch (Function .prototype);
100
104
 
101
- return;
105
+ return;
106
+ }
102
107
  }
103
108
 
104
- // If there is a proto the externproto is completely loaded.
109
+ const proto = protoNode .getProtoDeclaration ();
110
+
111
+ // If there is a proto, the externproto is completely loaded.
105
112
 
106
- if (this [_protoNode] .isExternProto)
113
+ if (protoNode .isExternProto)
107
114
  {
108
115
  for (const protoField of proto .getUserDefinedFields ())
109
116
  {
@@ -162,8 +169,8 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
162
169
  if (this .isInitialized ())
163
170
  X3DChildObject .prototype .addEvent .call (this);
164
171
 
165
- this [_protoNode] ._updateInstances .removeInterest ("construct", this);
166
- this [_protoNode] ._updateInstances .addInterest ("update", this);
172
+ protoNode ._updateInstances .removeInterest ("construct", this);
173
+ protoNode ._updateInstances .addInterest ("update", this);
167
174
  },
168
175
  update ()
169
176
  {
@@ -206,9 +213,6 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
206
213
 
207
214
  this .getPredefinedFields () .update (newField .getName (), newField .getName (), oldField);
208
215
 
209
- if (!this .isPrivate ())
210
- oldField .addCloneCount (1);
211
-
212
216
  oldFields .delete (oldFieldName);
213
217
  newField .dispose ();
214
218
  }
@@ -232,9 +236,11 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
232
236
  {
233
237
  // Disconnect old proto node.
234
238
 
235
- this [_protoNode] ._name_changed .removeFieldInterest (this ._typeName_changed);
236
- this [_protoNode] ._updateInstances .removeInterest ("construct", this);
237
- this [_protoNode] ._updateInstances .removeInterest ("update", this);
239
+ const oldProtoNode = this [_protoNode];
240
+
241
+ oldProtoNode ._name_changed .removeFieldInterest (this ._typeName_changed);
242
+ oldProtoNode ._updateInstances .removeInterest ("construct", this);
243
+ oldProtoNode ._updateInstances .removeInterest ("update", this);
238
244
 
239
245
  // Get fields from new proto node.
240
246
 
@@ -243,22 +249,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
243
249
 
244
250
  protoNode ._name_changed .addFieldInterest (this ._typeName_changed);
245
251
 
246
- if (protoNode .isExternProto)
247
- {
248
- if (this [_protoNode] .checkLoadState () === X3DConstants .COMPLETE_STATE)
249
- {
250
- this .construct ();
251
- }
252
- else
253
- {
254
- protoNode ._updateInstances .addInterest ("construct", this);
255
- protoNode .requestImmediateLoad () .catch (Function .prototype);
256
- }
257
- }
258
- else
259
- {
260
- this .construct ();
261
- }
252
+ this .construct ();
262
253
  },
263
254
  getBody ()
264
255
  {
@@ -266,14 +257,17 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
266
257
  },
267
258
  getInnerNode ()
268
259
  {
269
- const rootNodes = this [_body] .getRootNodes ();
270
-
271
- if (rootNodes .length)
260
+ if (this [_body])
272
261
  {
273
- const rootNode = rootNodes [0];
262
+ const rootNodes = this [_body] .getRootNodes ();
274
263
 
275
- if (rootNode)
276
- return rootNode .getValue () .getInnerNode ();
264
+ if (rootNodes .length)
265
+ {
266
+ const rootNode = rootNodes [0];
267
+
268
+ if (rootNode)
269
+ return rootNode .getValue () .getInnerNode ();
270
+ }
277
271
  }
278
272
 
279
273
  throw new Error ("Root node not available.");
@@ -979,9 +973,11 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
979
973
  },
980
974
  dispose ()
981
975
  {
982
- this [_protoNode] ._name_changed .removeFieldInterest (this ._typeName_changed);
983
- this [_protoNode] ._updateInstances .removeInterest ("construct", this);
984
- this [_protoNode] ._updateInstances .removeInterest ("update", this);
976
+ const protoNode = this [_protoNode];
977
+
978
+ protoNode ._name_changed .removeFieldInterest (this ._typeName_changed);
979
+ protoNode ._updateInstances .removeInterest ("construct", this);
980
+ protoNode ._updateInstances .removeInterest ("update", this);
985
981
 
986
982
  this [_body] ?.dispose ();
987
983
 
@@ -137,7 +137,7 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, X3DE
137
137
 
138
138
  this .modelMatrix .assign (renderObject .getModelViewMatrix () .get ()) .multRight (renderObject .getCameraSpaceMatrix () .get ());
139
139
  },
140
- renderTexture: (function ()
140
+ renderTexture: (() =>
141
141
  {
142
142
  // Rotations to negated normals of the texture cube.
143
143
 
@@ -243,7 +243,7 @@ Object .assign (Object .setPrototypeOf (GeneratedCubeMapTexture .prototype, X3DE
243
243
  this ._update = "NONE";
244
244
  };
245
245
  })(),
246
- setShaderUniforms: (function ()
246
+ setShaderUniforms: (() =>
247
247
  {
248
248
  const zeros = new Float32Array (16); // Trick: zero model view matrix to hide object.
249
249
 
@@ -86,7 +86,7 @@ Object .assign (Object .setPrototypeOf (X3DEnvironmentTextureNode .prototype, X3
86
86
  {
87
87
  return this .targets;
88
88
  },
89
- clearTexture: (function ()
89
+ clearTexture: (() =>
90
90
  {
91
91
  const defaultData = new Uint8Array ([ 255, 255, 255, 255 ]);
92
92