x_ite 8.9.6 → 8.10.1

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 (196) hide show
  1. package/build/bin/tests.pl +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 +26 -26
  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 +35 -34
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +37 -37
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +370 -208
  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 +27 -30
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +26 -26
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +23 -23
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +18 -18
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +23 -23
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +37 -37
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +31 -31
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjector.js +14 -14
  35. package/dist/assets/components/TextureProjector.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +33 -33
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +18 -18
  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 +9157 -8799
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +5 -5
  47. package/docs/_posts/components/Core/MetadataBoolean.md +1 -1
  48. package/docs/_posts/components/Core/MetadataDouble.md +1 -1
  49. package/docs/_posts/components/Core/MetadataFloat.md +1 -1
  50. package/docs/_posts/components/Core/MetadataInteger.md +1 -1
  51. package/docs/_posts/components/Core/MetadataSet.md +1 -1
  52. package/docs/_posts/components/Core/MetadataString.md +1 -1
  53. package/docs/_posts/components/Core/WorldInfo.md +1 -1
  54. package/docs/_posts/components/EventUtilities/BooleanFilter.md +2 -2
  55. package/docs/_posts/components/EventUtilities/BooleanSequencer.md +2 -2
  56. package/docs/_posts/components/EventUtilities/BooleanToggle.md +2 -2
  57. package/docs/_posts/components/EventUtilities/BooleanTrigger.md +2 -2
  58. package/docs/_posts/components/EventUtilities/IntegerSequencer.md +2 -2
  59. package/docs/_posts/components/EventUtilities/IntegerTrigger.md +2 -2
  60. package/docs/_posts/components/EventUtilities/TimeTrigger.md +2 -2
  61. package/docs/_posts/components/Geometry2D/Arc2D.md +1 -1
  62. package/docs/_posts/components/Geometry2D/ArcClose2D.md +1 -1
  63. package/docs/_posts/components/Geometry2D/Circle2D.md +1 -1
  64. package/docs/_posts/components/Geometry2D/Disk2D.md +1 -1
  65. package/docs/_posts/components/Geometry2D/Polyline2D.md +1 -1
  66. package/docs/_posts/components/Geometry2D/Polypoint2D.md +1 -1
  67. package/docs/_posts/components/Geometry2D/Rectangle2D.md +1 -1
  68. package/docs/_posts/components/HAnim/HAnimHumanoid.md +17 -17
  69. package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
  70. package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +1 -1
  71. package/docs/_posts/components/Interpolation/CoordinateInterpolator2D.md +1 -1
  72. package/docs/_posts/components/Interpolation/NormalInterpolator.md +1 -1
  73. package/docs/_posts/components/Interpolation/OrientationInterpolator.md +1 -1
  74. package/docs/_posts/components/Interpolation/PositionInterpolator.md +1 -1
  75. package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +1 -1
  76. package/docs/_posts/components/Interpolation/ScalarInterpolator.md +1 -1
  77. package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +1 -1
  78. package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +1 -1
  79. package/docs/_posts/components/Networking/LoadSensor.md +1 -1
  80. package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +1 -1
  81. package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +1 -1
  82. package/docs/_posts/components/PointingDeviceSensor/TouchSensor.md +1 -1
  83. package/docs/_posts/components/Text/Text.md +1 -1
  84. package/docs/_posts/components/Time/TimeSensor.md +1 -1
  85. package/docs/_posts/reference/browser-services.md +6 -6
  86. package/docs/_posts/what's-new.md +23 -0
  87. package/docs/laboratory/gltf-sample-viewer.html +17 -8
  88. package/package.json +1 -1
  89. package/src/assets/shaders/webgl1/Depth.vs.js +4 -4
  90. package/src/assets/shaders/webgl1/Pointing.fs.js +1 -1
  91. package/src/assets/shaders/webgl2/Depth.vs.js +7 -4
  92. package/src/assets/shaders/webgl2/LineTransform.vs.js +24 -12
  93. package/src/assets/shaders/webgl2/Pointing.fs.js +1 -1
  94. package/src/assets/shaders/webgl2/Pointing.vs.js +12 -9
  95. package/src/assets/shaders/webgl2/include/Particle.glsl.js +5 -15
  96. package/src/assets/shaders/webgl2/include/Skin.glsl.js +88 -0
  97. package/src/assets/shaders/webgl2/include/Utils.glsl.js +13 -0
  98. package/src/assets/shaders/webgl2/include/Vertex.glsl.js +17 -8
  99. package/src/bookmarks.js +54 -2
  100. package/src/tests.js +0 -360
  101. package/src/x_ite/Base/X3DArrayField.js +18 -3
  102. package/src/x_ite/Base/X3DBaseNode.js +73 -56
  103. package/src/x_ite/Base/X3DObjectArrayField.js +6 -4
  104. package/src/x_ite/Browser/Core/Context.js +14 -4
  105. package/src/x_ite/Browser/Core/Notification.js +4 -3
  106. package/src/x_ite/Browser/Core/X3DCoreContext.js +8 -8
  107. package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +4 -3
  108. package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +4 -3
  109. package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +6 -6
  110. package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +9 -10
  111. package/src/x_ite/Browser/Geometry3D/ConeOptions.js +5 -4
  112. package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +5 -4
  113. package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +3 -2
  114. package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +3 -2
  115. package/src/x_ite/Browser/Layout/ScreenText.js +2 -2
  116. package/src/x_ite/Browser/Navigation/ExamineViewer.js +4 -4
  117. package/src/x_ite/Browser/Navigation/LookAtViewer.js +4 -4
  118. package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -3
  119. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -3
  120. package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +6 -5
  121. package/src/x_ite/Browser/Navigation/X3DViewer.js +2 -13
  122. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +5 -4
  123. package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +8 -18
  124. package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +17 -5
  125. package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +6 -5
  126. package/src/x_ite/Browser/Shaders/Shaders.js +4 -0
  127. package/src/x_ite/Browser/Shape/X3DShapeContext.js +3 -3
  128. package/src/x_ite/Browser/Sound/X3DSoundContext.js +4 -3
  129. package/src/x_ite/Browser/Text/PolygonText.js +2 -2
  130. package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +1 -1
  131. package/src/x_ite/Browser/VERSION.js +1 -1
  132. package/src/x_ite/Browser/X3DBrowser.js +49 -17
  133. package/src/x_ite/Browser/X3DBrowserContext.js +8 -7
  134. package/src/x_ite/Components/Core/X3DChildNode.js +2 -5
  135. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +14 -14
  136. package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +1 -1
  137. package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +1 -1
  138. package/src/x_ite/Components/Geometry3D/ElevationGrid.js +5 -2
  139. package/src/x_ite/Components/Geometry3D/Extrusion.js +24 -13
  140. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +5 -2
  141. package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +2 -2
  142. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
  143. package/src/x_ite/Components/Grouping/X3DBoundedObject.js +1 -2
  144. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +314 -161
  145. package/src/x_ite/Components/HAnim/HAnimJoint.js +37 -25
  146. package/src/x_ite/Components/Layering/X3DLayerNode.js +2 -2
  147. package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +1 -1
  148. package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +1 -1
  149. package/src/x_ite/Components/Navigation/NavigationInfo.js +4 -4
  150. package/src/x_ite/Components/Navigation/OrthoViewpoint.js +1 -1
  151. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +12 -12
  152. package/src/x_ite/Components/Networking/X3DUrlObject.js +18 -11
  153. package/src/x_ite/Components/Rendering/IndexedLineSet.js +17 -14
  154. package/src/x_ite/Components/Rendering/LineSet.js +16 -13
  155. package/src/x_ite/Components/Rendering/PointSet.js +16 -12
  156. package/src/x_ite/Components/Rendering/X3DColorNode.js +1 -3
  157. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +3 -0
  158. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +48 -77
  159. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +31 -12
  160. package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +3 -0
  161. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +3 -3
  162. package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +2 -2
  163. package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +1 -1
  164. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +24 -7
  165. package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +1 -1
  166. package/src/x_ite/Components/Shape/FillProperties.js +1 -3
  167. package/src/x_ite/Components/Shape/X3DAppearanceNode.js +1 -3
  168. package/src/x_ite/Components/Shape/X3DMaterialNode.js +8 -6
  169. package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +0 -2
  170. package/src/x_ite/Components/Sound/AudioClip.js +1 -1
  171. package/src/x_ite/Components/Sound/BufferAudioSource.js +1 -1
  172. package/src/x_ite/Components/Sound/ListenerPointSource.js +2 -2
  173. package/src/x_ite/Components/Sound/MicrophoneSource.js +2 -2
  174. package/src/x_ite/Components/Sound/OscillatorSource.js +2 -2
  175. package/src/x_ite/Components/Sound/Sound.js +1 -1
  176. package/src/x_ite/Components/Sound/StreamAudioSource.js +2 -2
  177. package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +1 -1
  178. package/src/x_ite/Components/Text/X3DFontStyleNode.js +4 -4
  179. package/src/x_ite/Components/Texturing/MultiTexture.js +1 -1
  180. package/src/x_ite/Components/Texturing/PixelTexture.js +1 -1
  181. package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +2 -2
  182. package/src/x_ite/Components/Texturing/X3DTextureNode.js +1 -3
  183. package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +2 -2
  184. package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +1 -1
  185. package/src/x_ite/Components/Time/TimeSensor.js +1 -1
  186. package/src/x_ite/Components/Time/X3DTimeDependentNode.js +2 -2
  187. package/src/x_ite/Execution/X3DExecutionContext.js +3 -4
  188. package/src/x_ite/Execution/X3DScene.js +4 -4
  189. package/src/x_ite/Execution/X3DWorld.js +1 -1
  190. package/src/x_ite/Parser/GLTF2Parser.js +196 -116
  191. package/src/x_ite/Parser/X3DOptimizer.js +47 -18
  192. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +4 -4
  193. package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
  194. package/src/x_ite/Rendering/X3DRenderObject.js +20 -12
  195. package/src/x_ite.html +36 -10
  196. package/x_ite.min.html +36 -10
@@ -1,4 +1,4 @@
1
- /* X_ITE v8.9.6 */(() => { // webpackBootstrap
1
+ /* X_ITE v8.10.1 */(() => { // webpackBootstrap
2
2
  /******/ "use strict";
3
3
  /******/ // The require scope
4
4
  /******/ var __webpack_require__ = {};
@@ -39,25 +39,25 @@ var __webpack_exports__ = {};
39
39
  // UNUSED EXPORTS: default
40
40
 
41
41
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components\")"
42
- const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Components");
42
+ const Components_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Components");
43
43
  var Components_default = /*#__PURE__*/__webpack_require__.n(Components_namespaceObject);
44
44
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Fields\")"
45
- const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Fields");
45
+ const Fields_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Fields");
46
46
  var Fields_default = /*#__PURE__*/__webpack_require__.n(Fields_namespaceObject);
47
47
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DFieldDefinition\")"
48
- const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Base/X3DFieldDefinition");
48
+ const X3DFieldDefinition_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Base/X3DFieldDefinition");
49
49
  var X3DFieldDefinition_default = /*#__PURE__*/__webpack_require__.n(X3DFieldDefinition_namespaceObject);
50
50
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/FieldDefinitionArray\")"
51
- const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Base/FieldDefinitionArray");
51
+ const FieldDefinitionArray_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Base/FieldDefinitionArray");
52
52
  var FieldDefinitionArray_default = /*#__PURE__*/__webpack_require__.n(FieldDefinitionArray_namespaceObject);
53
53
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Rendering/X3DGeometricPropertyNode\")"
54
- const X3DGeometricPropertyNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Components/Rendering/X3DGeometricPropertyNode");
54
+ const X3DGeometricPropertyNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Components/Rendering/X3DGeometricPropertyNode");
55
55
  var X3DGeometricPropertyNode_default = /*#__PURE__*/__webpack_require__.n(X3DGeometricPropertyNode_namespaceObject);
56
56
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DConstants\")"
57
- const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Base/X3DConstants");
57
+ const X3DConstants_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Base/X3DConstants");
58
58
  var X3DConstants_default = /*#__PURE__*/__webpack_require__.n(X3DConstants_namespaceObject);
59
59
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Namespace\")"
60
- const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Namespace");
60
+ const Namespace_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Namespace");
61
61
  var Namespace_default = /*#__PURE__*/__webpack_require__.n(Namespace_namespaceObject);
62
62
  ;// CONCATENATED MODULE: ./src/x_ite/Components/HAnim/HAnimDisplacer.js
63
63
  /*******************************************************************************
@@ -166,30 +166,25 @@ const __default__ = HAnimDisplacer;
166
166
  Namespace_default().set ("x_ite/Components/HAnim/HAnimDisplacer", __default__);
167
167
  /* harmony default export */ const HAnim_HAnimDisplacer = (__default__);
168
168
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Core/X3DChildNode\")"
169
- const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Components/Core/X3DChildNode");
169
+ const X3DChildNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Components/Core/X3DChildNode");
170
170
  var X3DChildNode_default = /*#__PURE__*/__webpack_require__.n(X3DChildNode_namespaceObject);
171
171
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Grouping/Group\")"
172
- const Group_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Components/Grouping/Group");
172
+ const Group_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Components/Grouping/Group");
173
173
  var Group_default = /*#__PURE__*/__webpack_require__.n(Group_namespaceObject);
174
174
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Grouping/Transform\")"
175
- const Transform_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Components/Grouping/Transform");
175
+ const Transform_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Components/Grouping/Transform");
176
176
  var Transform_default = /*#__PURE__*/__webpack_require__.n(Transform_namespaceObject);
177
177
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Grouping/X3DBoundedObject\")"
178
- const X3DBoundedObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Components/Grouping/X3DBoundedObject");
178
+ const X3DBoundedObject_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Components/Grouping/X3DBoundedObject");
179
179
  var X3DBoundedObject_default = /*#__PURE__*/__webpack_require__.n(X3DBoundedObject_namespaceObject);
180
180
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Rendering/TraverseType\")"
181
- const TraverseType_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Rendering/TraverseType");
181
+ const TraverseType_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Rendering/TraverseType");
182
182
  var TraverseType_default = /*#__PURE__*/__webpack_require__.n(TraverseType_namespaceObject);
183
183
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Base/X3DCast\")"
184
- const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Base/X3DCast");
184
+ const X3DCast_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Base/X3DCast");
185
185
  var X3DCast_default = /*#__PURE__*/__webpack_require__.n(X3DCast_namespaceObject);
186
- ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector3\")"
187
- const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("standard/Math/Numbers/Vector3");
188
- var Vector3_default = /*#__PURE__*/__webpack_require__.n(Vector3_namespaceObject);
189
- ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Rotation4\")"
190
- const Rotation4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("standard/Math/Numbers/Rotation4");
191
186
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Matrix4\")"
192
- const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("standard/Math/Numbers/Matrix4");
187
+ const Matrix4_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("standard/Math/Numbers/Matrix4");
193
188
  var Matrix4_default = /*#__PURE__*/__webpack_require__.n(Matrix4_namespaceObject);
194
189
  ;// CONCATENATED MODULE: ./src/x_ite/Components/HAnim/HAnimHumanoid.js
195
190
  /*******************************************************************************
@@ -251,8 +246,6 @@ var Matrix4_default = /*#__PURE__*/__webpack_require__.n(Matrix4_namespaceObject
251
246
 
252
247
 
253
248
 
254
-
255
-
256
249
  function HAnimHumanoid (executionContext)
257
250
  {
258
251
  X3DChildNode_default().call (this, executionContext);
@@ -260,6 +253,10 @@ function HAnimHumanoid (executionContext)
260
253
 
261
254
  this .addType ((X3DConstants_default()).HAnimHumanoid);
262
255
 
256
+ this .addChildObjects ((X3DConstants_default()).inputOutput, "jointTextures", new (Fields_default()).SFTime (),
257
+ (X3DConstants_default()).inputOutput, "displacementsTexture", new (Fields_default()).SFTime (),
258
+ (X3DConstants_default()).inputOutput, "displacementWeightsTexture", new (Fields_default()).SFTime ());
259
+
263
260
  this ._translation .setUnit ("length");
264
261
  this ._center .setUnit ("length");
265
262
  this ._bboxSize .setUnit ("length");
@@ -271,11 +268,10 @@ function HAnimHumanoid (executionContext)
271
268
  this .transformNode = new (Transform_default()) (executionContext);
272
269
  this .jointNodes = [ ];
273
270
  this .jointBindingMatrices = [ ];
274
- this .skinBindingNormal = null;
275
- this .skinBindingCoord = null;
276
- this .skinNormalNode = null;
271
+ this .displacementWeights = [ ];
277
272
  this .skinCoordNode = null;
278
- this .changed = false;
273
+ this .change = new Lock ();
274
+ this .skinning = Function .prototype;
279
275
  }
280
276
 
281
277
  Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, (X3DChildNode_default()).prototype),
@@ -339,25 +335,64 @@ Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, (X3DChildNode_
339
335
  this .setCameraObject (this .transformNode .isCameraObject ());
340
336
  this .setPickableObject (this .transformNode .isPickableObject ());
341
337
 
342
- // Skinning
338
+ // Check WebGL version.
339
+
340
+ const
341
+ browser = this .getBrowser (),
342
+ gl = browser .getContext ();
343
+
344
+ if (gl .getVersion () === 1)
345
+ return;
346
+
347
+ // Prepare skinNode.
348
+
349
+ this .skinNode .traverse = function (humanoidNode, type, renderObject)
350
+ {
351
+ renderObject .getHumanoids () .push (humanoidNode);
352
+
353
+ Group_default().prototype .traverse .call (this, type, renderObject);
343
354
 
344
- this ._joints .addInterest ("set_joints__", this);
345
- this ._jointBindingPositions .addInterest ("set_joints__", this);
346
- this ._jointBindingRotations .addInterest ("set_joints__", this);
347
- this ._jointBindingScales .addInterest ("set_joints__", this);
348
- this ._skinBindingNormal .addInterest ("set_skinBindingNormal__", this);
349
- this ._skinBindingCoord .addInterest ("set_skinBindingCoord__", this);
350
- this ._skinNormal .addInterest ("set_skinNormal__", this);
351
- this ._skinCoord .addInterest ("set_skinCoord__", this);
355
+ renderObject .getHumanoids () .pop ();
356
+ }
357
+ .bind (this .skinNode, this);
358
+
359
+ // Textures
360
+
361
+ this .jointsTexture = gl .createTexture ();
362
+ this .displacementsTexture = gl .createTexture ();
363
+ this .jointMatricesTexture = gl .createTexture ();
364
+
365
+ for (const texture of [this .jointsTexture, this .displacementsTexture, this .jointMatricesTexture])
366
+ {
367
+ gl .bindTexture (gl .TEXTURE_2D, texture);
368
+ gl .texParameteri (gl .TEXTURE_2D, gl .TEXTURE_WRAP_S, gl .CLAMP_TO_EDGE);
369
+ gl .texParameteri (gl .TEXTURE_2D, gl .TEXTURE_WRAP_T, gl .CLAMP_TO_EDGE);
370
+ gl .texParameteri (gl .TEXTURE_2D, gl .TEXTURE_MIN_FILTER, gl .LINEAR);
371
+ gl .texParameteri (gl .TEXTURE_2D, gl .TEXTURE_MAG_FILTER, gl .LINEAR);
372
+ }
373
+
374
+ // Events
375
+
376
+ this ._joints .addInterest ("set_joints__", this);
377
+ this ._jointBindingPositions .addInterest ("set_joints__", this);
378
+ this ._jointBindingRotations .addInterest ("set_joints__", this);
379
+ this ._jointBindingScales .addInterest ("set_joints__", this);
380
+ this ._jointTextures .addInterest ("set_jointTextures__", this);
381
+ this ._displacementsTexture .addInterest ("set_displacementsTexture__", this);
382
+ this ._displacementWeightsTexture .addInterest ("set_displacementWeightsTexture__", this);
383
+ this ._skinCoord .addInterest ("set_skinCoord__", this);
352
384
 
353
385
  this .set_joints__ ();
354
- this .set_skinBindingNormal__ ();
355
- this .set_skinBindingCoord__ ();
386
+ this .set_skinCoord__ ();
356
387
  },
357
388
  getBBox (bbox, shadows)
358
389
  {
359
390
  return this .transformNode .getBBox (bbox, shadows);
360
391
  },
392
+ getMatrix ()
393
+ {
394
+ return this .transformNode .getMatrix ();
395
+ },
361
396
  set_joints__ ()
362
397
  {
363
398
  const
@@ -368,7 +403,13 @@ Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, (X3DChildNode_
368
403
  jointBindingScales = this ._jointBindingScales;
369
404
 
370
405
  for (const jointNode of jointNodes)
371
- jointNode .removeInterest ("set_joint__", this);
406
+ {
407
+ jointNode .removeInterest ("enable", this .change);
408
+ jointNode ._skinCoordIndex .removeInterest ("addEvent", this ._jointTextures);
409
+ jointNode ._skinCoordWeight .removeInterest ("addEvent", this ._jointTextures);
410
+ jointNode ._displacements .removeInterest ("addEvent", this ._displacementsTexture);
411
+ jointNode ._displacementWeights .removeInterest ("addEvent", this ._displacementWeightsTexture);
412
+ }
372
413
 
373
414
  jointNodes .length = 0;
374
415
  jointBindingMatrices .length = 0;
@@ -377,67 +418,219 @@ Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, (X3DChildNode_
377
418
  {
378
419
  const jointNode = X3DCast_default() ((X3DConstants_default()).HAnimJoint, node);
379
420
 
380
- if (jointNode)
381
- {
382
- const jointBindingMatrix = new (Matrix4_default()) ();
421
+ if (!jointNode)
422
+ continue;
383
423
 
384
- if (jointBindingPositions .length)
385
- jointBindingMatrix .translate (jointBindingPositions [Math .min (i, jointBindingPositions .length - 1)] .getValue ());
424
+ const jointBindingMatrix = new (Matrix4_default()) ();
386
425
 
387
- if (jointBindingRotations .length)
388
- jointBindingMatrix .rotate (jointBindingRotations [Math .min (i, jointBindingRotations .length - 1)] .getValue ());
426
+ if (jointBindingPositions .length)
427
+ jointBindingMatrix .translate (jointBindingPositions [Math .min (i, jointBindingPositions .length - 1)] .getValue ());
389
428
 
390
- if (jointBindingScales .length)
391
- jointBindingMatrix .scale (jointBindingScales [Math .min (i, jointBindingScales .length - 1)] .getValue ());
429
+ if (jointBindingRotations .length)
430
+ jointBindingMatrix .rotate (jointBindingRotations [Math .min (i, jointBindingRotations .length - 1)] .getValue ());
392
431
 
393
- jointNodes .push (jointNode);
394
- jointBindingMatrices .push (jointBindingMatrix);
395
- }
432
+ if (jointBindingScales .length)
433
+ jointBindingMatrix .scale (jointBindingScales [Math .min (i, jointBindingScales .length - 1)] .getValue ());
434
+
435
+ jointNodes .push (jointNode);
436
+ jointBindingMatrices .push (jointBindingMatrix);
396
437
  }
397
438
 
398
439
  for (const jointNode of jointNodes)
399
- jointNode .addInterest ("set_joint__", this);
440
+ {
441
+ jointNode .addInterest ("enable", this .change);
442
+ jointNode ._skinCoordIndex .addInterest ("addEvent", this ._jointTextures);
443
+ jointNode ._skinCoordWeight .addInterest ("addEvent", this ._jointTextures);
444
+ jointNode ._displacements .addInterest ("addEvent", this ._displacementsTexture);
445
+ jointNode ._displacementWeights .addInterest ("addEvent", this ._displacementWeightsTexture);
446
+ }
400
447
 
401
- this .set_joint__ ();
402
- },
403
- set_joint__ ()
404
- {
405
- this .changed = true;
448
+ const size = Math .ceil (Math .sqrt (jointNodes .length * 8));
449
+
450
+ this .jointMatricesArray = new Float32Array (size * size * 4),
451
+
452
+ this ._jointTextures .addEvent ();
453
+ this ._displacementsTexture .addEvent ();
454
+ this ._displacementWeightsTexture .addEvent ();
406
455
  },
407
- set_skinBindingNormal__ ()
456
+ set_jointTextures__ ()
408
457
  {
409
- this .skinBindingNormal = X3DCast_default() ((X3DConstants_default()).X3DNormalNode, this ._skinBindingNormal);
458
+ // Create arrays.
459
+
460
+ const
461
+ length = this .skinCoordNode ?._point .length || 1,
462
+ joints = Array .from ({ length }, () => [ ]),
463
+ weights = Array .from ({ length }, () => [ ]);
464
+
465
+ for (const [j, jointNode] of this .jointNodes .entries ())
466
+ {
467
+ const skinCoordWeight = jointNode ._skinCoordWeight .getValue ();
468
+
469
+ for (const [i, index] of jointNode ._skinCoordIndex .entries ())
470
+ {
471
+ joints [index] ?.push (j);
472
+ weights [index] ?.push (skinCoordWeight [i])
473
+ }
474
+ }
475
+
476
+ const
477
+ size = Math .ceil (Math .sqrt (length * 2)) || 1,
478
+ jointsArray = new Float32Array (size * size * 4);
479
+
480
+ for (let i = 0; i < length; ++ i)
481
+ {
482
+ const j = joints [i], w = weights [i];
483
+
484
+ j .length = w .length = Math .min (j .length, 4);
485
+
486
+ jointsArray .set (j, i * 8 + 0);
487
+ jointsArray .set (w, i * 8 + 4);
488
+ }
489
+
490
+ // Upload textures.
410
491
 
411
- this .set_skinNormal__ ();
492
+ const
493
+ browser = this .getBrowser (),
494
+ gl = browser .getContext ();
495
+
496
+ gl .bindTexture (gl .TEXTURE_2D, this .jointsTexture);
497
+ gl .texImage2D (gl .TEXTURE_2D, 0, gl .RGBA32F, size, size, 0, gl .RGBA, gl .FLOAT, jointsArray);
498
+
499
+ // Trigger update.
500
+
501
+ this .change .enable ();
412
502
  },
413
- set_skinBindingCoord__ ()
503
+ set_displacementsTexture__ ()
414
504
  {
415
- this .skinBindingCoord = X3DCast_default() ((X3DConstants_default()).X3DCoordinateNode, this ._skinBindingCoord);
505
+ // Create array.
416
506
 
417
- this .set_skinCoord__ ();
507
+ const
508
+ length = this .skinCoordNode ?._point .length || 1,
509
+ displacements = Array .from ({ length }, () => [ ]);
510
+
511
+ for (const [j, jointNode] of this .jointNodes .entries ())
512
+ {
513
+ for (const displacerNode of jointNode .getDisplacers ())
514
+ {
515
+ const d = displacerNode ._displacements;
516
+
517
+ for (const [i, index] of displacerNode ._coordIndex .entries ())
518
+ displacements [index] ?.push (... d [i]);
519
+ }
520
+ }
521
+
522
+ const
523
+ size = even (Math .ceil (Math .sqrt (length * 2)) || 1),
524
+ displacementsArray = new Float32Array (size * size * 8);
525
+
526
+ for (let i = 0; i < length; ++ i)
527
+ {
528
+ const d = displacements [i];
529
+
530
+ d .length = Math .min (d .length, 8);
531
+
532
+ displacementsArray .set (d, i * 8);
533
+ }
534
+
535
+ // Upload texture.
536
+
537
+ const
538
+ browser = this .getBrowser (),
539
+ gl = browser .getContext ();
540
+
541
+ gl .bindTexture (gl .TEXTURE_2D, this .displacementsTexture);
542
+ gl .texImage2D (gl .TEXTURE_2D, 0, gl .RGBA32F, size, size, 0, gl .RGBA, gl .FLOAT, displacementsArray);
543
+
544
+ // Weights
545
+
546
+ const displacementWeights = this .displacementWeights;
547
+
548
+ for (let i = displacementWeights .length; i < length; ++ i)
549
+ displacementWeights [i] = [ ];
550
+
551
+ displacementWeights .length = length;
552
+
553
+ this .displacementWeightsArray = new Float32Array (size * size * 4);
554
+
555
+ // Trigger update.
556
+
557
+ this .change .enable ();
418
558
  },
419
- set_skinNormal__ ()
559
+ set_displacementWeightsTexture__ ()
420
560
  {
421
- this .skinNormalNode = X3DCast_default() ((X3DConstants_default()).X3DNormalNode, this ._skinNormal);
561
+ // Create array.
562
+
563
+ const
564
+ length = this .skinCoordNode ?._point .length || 1,
565
+ displacementWeights = this .displacementWeights;
422
566
 
423
- if (!this .skinBindingNormal && this .skinNormalNode)
424
- this .skinBindingNormal = this .skinNormalNode .copy ();
567
+ for (const d of displacementWeights)
568
+ d .length = 0;
425
569
 
426
- this .changed = true;
570
+ for (const jointNode of this .jointNodes)
571
+ {
572
+ for (const displacerNode of jointNode .getDisplacers ())
573
+ {
574
+ const weight = displacerNode ._weight;
575
+
576
+ for (const index of displacerNode ._coordIndex)
577
+ displacementWeights [index] ?.push (weight);
578
+ }
579
+ }
580
+
581
+ const
582
+ size = even (Math .ceil (Math .sqrt (length * 2)) || 1),
583
+ displacementWeightsArray = this .displacementWeightsArray;
584
+
585
+ for (let i = 0; i < length; ++ i)
586
+ {
587
+ const d = displacementWeights [i];
588
+
589
+ d .length = Math .min (d .length, 8);
590
+
591
+ displacementWeightsArray .set (d, i * 8);
592
+ }
593
+
594
+ // Upload texture.
595
+
596
+ const
597
+ browser = this .getBrowser (),
598
+ gl = browser .getContext ();
599
+
600
+ gl .bindTexture (gl .TEXTURE_2D, this .displacementsTexture);
601
+ gl .texSubImage2D (gl .TEXTURE_2D, 0, 0, size / 2, size, size / 2, gl .RGBA, gl .FLOAT, displacementWeightsArray)
602
+
603
+ // Trigger update.
604
+
605
+ this .change .enable ();
427
606
  },
428
607
  set_skinCoord__ ()
429
608
  {
430
- this .skinCoordNode = X3DCast_default() ((X3DConstants_default()).X3DCoordinateNode, this ._skinCoord);
609
+ if (this .skinCoordNode)
610
+ {
611
+ this .skinCoordNode .removeInterest ("addEvent", this ._jointTextures);
612
+ this .skinCoordNode .removeInterest ("addEvent", this ._displacementsTexture);
613
+ this .skinCoordNode .removeInterest ("addEvent", this ._displacementWeightsTexture);
614
+ }
431
615
 
432
- if (!this .skinBindingCoord && this .skinCoordNode)
433
- this .skinBindingCoord = this .skinCoordNode .copy ();
616
+ this .skinCoordNode = X3DCast_default() ((X3DConstants_default()).X3DCoordinateNode, this ._skinCoord);
434
617
 
435
618
  if (this .skinCoordNode)
619
+ {
436
620
  delete this .skinning;
621
+
622
+ this .skinCoordNode .addInterest ("addEvent", this ._jointTextures);
623
+ this .skinCoordNode .addInterest ("addEvent", this ._displacementsTexture);
624
+ this .skinCoordNode .addInterest ("addEvent", this ._displacementWeightsTexture);
625
+ }
437
626
  else
438
- this .skinning = Function .prototype
627
+ {
628
+ this .skinning = Function .prototype;
629
+ }
439
630
 
440
- this .changed = true;
631
+ this ._jointTextures .addEvent ();
632
+ this ._displacementsTexture .addEvent ();
633
+ this ._displacementWeightsTexture .addEvent ();
441
634
  },
442
635
  traverse (type, renderObject)
443
636
  {
@@ -447,136 +640,67 @@ Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, (X3DChildNode_
447
640
  },
448
641
  skinning: (() =>
449
642
  {
450
- const
451
- invModelMatrix = new (Matrix4_default()) (),
452
- rest = new (Vector3_default()) (0, 0, 0),
453
- skin = new (Vector3_default()) (0, 0, 0),
454
- vector = new (Vector3_default()) (0, 0, 0),
455
- point = new (Vector3_default()) (0, 0, 0);
643
+ const invModelViewMatrix = new (Matrix4_default()) ();
456
644
 
457
645
  return function (type, renderObject)
458
646
  {
459
- if (type !== (TraverseType_default()).CAMERA)
647
+ if (type !== (TraverseType_default()).DISPLAY || this .change .lock ())
460
648
  return;
461
649
 
462
- if (!this .changed)
463
- return;
650
+ // Determine inverse model matrix of humanoid.
651
+
652
+ invModelViewMatrix .assign (this .transformNode .getMatrix ())
653
+ .multRight (renderObject .getModelViewMatrix () .get ()) .inverse ();
464
654
 
465
- this .changed = false;
655
+ // Create joint matrices.
466
656
 
467
657
  const
468
658
  jointNodes = this .jointNodes,
469
659
  jointNodesLength = jointNodes .length,
470
660
  jointBindingMatrices = this .jointBindingMatrices,
471
- skinBindingNormal = this .skinBindingNormal,
472
- skinBindingCoord = this .skinBindingCoord,
473
- skinNormalNode = this .skinNormalNode,
474
- skinCoordNode = this .skinCoordNode;
475
-
476
- // Reset skin normals and coords.
477
-
478
- if (skinNormalNode)
479
- skinNormalNode ._vector .assign (skinBindingNormal ._vector);
480
-
481
- skinCoordNode ._point .assign (skinBindingCoord ._point);
482
-
483
- // Determine inverse model matrix of humanoid.
484
-
485
- invModelMatrix .assign (this .transformNode .getMatrix ())
486
- .multRight (renderObject .getModelViewMatrix () .get ()) .inverse ();
487
-
488
- // Apply joint transformations.
661
+ jointMatricesArray = this .jointMatricesArray,
662
+ size = Math .ceil (Math .sqrt (jointNodesLength * 8));
489
663
 
490
664
  for (let i = 0; i < jointNodesLength; ++ i)
491
665
  {
492
666
  const
493
- jointNode = jointNodes [i],
494
- jointBindingMatrix = jointBindingMatrices [i],
495
- jointMatrix = jointNode .getModelMatrix () .multRight (invModelMatrix) .multLeft (jointBindingMatrix),
496
- displacerNodes = jointNode .getDisplacers (),
497
- skinCoordIndexLength = jointNode ._skinCoordIndex .length;
498
-
499
- for (const displacerNode of displacerNodes)
500
- {
501
- const
502
- coordIndex = displacerNode ._coordIndex .getValue (),
503
- coordIndexLength = displacerNode ._coordIndex .length,
504
- weight = displacerNode ._weight .getValue (),
505
- displacements = displacerNode ._displacements .getValue (),
506
- displacementsLength = displacerNode ._displacements .length;
507
-
508
- for (let i = 0; i < coordIndexLength; ++ i)
509
- {
510
- const
511
- i3 = i * 3,
512
- index = coordIndex [i],
513
- displacement = i < displacementsLength ? point .set (displacements [i3], displacements [i3 + 1], displacements [i3 + 2]) : point .assign ((Vector3_default()).Zero);
514
-
515
- skinCoordNode .get1Point (index, skin);
516
- jointMatrix .multDirMatrix (displacement) .multiply (weight) .add (skin);
517
- skinCoordNode .set1Point (index, displacement);
518
- }
519
- }
667
+ jointNode = jointNodes [i],
668
+ jointBindingMatrix = jointBindingMatrices [i],
669
+ jointMatrix = jointNode .getModelViewMatrix () .multRight (invModelViewMatrix) .multLeft (jointBindingMatrix),
670
+ jointNormalMatrix = jointMatrix .submatrix .transpose () .inverse ();
520
671
 
521
- const
522
- normalMatrix = skinNormalNode ? jointMatrix .submatrix .transpose () .inverse () : null,
523
- skinCoordIndex = jointNode ._skinCoordIndex .getValue (),
524
- skinCoordWeight = jointNode ._skinCoordWeight .getValue (),
525
- skinCoordWeightLength = jointNode ._skinCoordWeight .length;
526
-
527
- for (let i = 0; i < skinCoordIndexLength; ++ i)
528
- {
529
- const
530
- index = skinCoordIndex [i],
531
- weight = i < skinCoordWeightLength ? skinCoordWeight [i] : 1;
532
-
533
- if (skinNormalNode)
534
- {
535
- rest .assign (skinBindingNormal .get1Vector (index, vector));
536
- skinNormalNode .get1Vector (index, skin);
537
- normalMatrix .multVecMatrix (vector) .subtract (rest) .multiply (weight) .add (skin);
538
- skinNormalNode .set1Vector (index, vector);
539
- // Let the shader normalize the normals.
540
- }
541
-
542
- //skin += (rest * J - rest) * weight
543
- rest .assign (skinBindingCoord .get1Point (index, point));
544
- skinCoordNode .get1Point (index, skin);
545
- jointMatrix .multVecMatrix (point) .subtract (rest) .multiply (weight) .add (skin);
546
- skinCoordNode .set1Point (index, point);
547
- }
672
+ jointMatricesArray .set (jointMatrix, i * 32 + 0);
673
+ jointMatricesArray .set (jointNormalMatrix, i * 32 + 16);
548
674
  }
549
- };
550
- })(),
551
- toVRMLStream (generator)
552
- {
553
- if (this .skinNormalNode)
554
- this .skinNormalNode ._vector = this .skinBindingNormal ._vector;
555
675
 
556
- if (this .skinCoordNode)
557
- this .skinCoordNode ._point = this .skinBindingCoord ._point;
676
+ // Upload textures.
558
677
 
559
- X3DChildNode_default().prototype .toVRMLStream .call (this, generator);
560
- },
561
- toXMLStream (generator)
562
- {
563
- if (this .skinNormalNode)
564
- this .skinNormalNode ._vector = this .skinBindingNormal ._vector;
565
-
566
- if (this .skinCoordNode)
567
- this .skinCoordNode ._point = this .skinBindingCoord ._point;
678
+ const
679
+ browser = this .getBrowser (),
680
+ gl = browser .getContext ();
568
681
 
569
- X3DChildNode_default().prototype .toXMLStream .call (this, generator);
570
- },
571
- toJSONStream (generator)
682
+ gl .bindTexture (gl .TEXTURE_2D, this .jointMatricesTexture);
683
+ gl .texImage2D (gl .TEXTURE_2D, 0, gl .RGBA32F, size, size, 0, gl .RGBA, gl .FLOAT, jointMatricesArray);
684
+ };
685
+ })(),
686
+ setShaderUniforms (gl, shaderObject)
572
687
  {
573
- if (this .skinNormalNode)
574
- this .skinNormalNode ._vector = this .skinBindingNormal ._vector;
688
+ const
689
+ jointsTextureTextureUnit = this .getBrowser () .getTexture2DUnit (),
690
+ displacementsTextureTextureUnit = this .getBrowser () .getTexture2DUnit (),
691
+ jointMatricesTextureUnit = this .getBrowser () .getTexture2DUnit ();
575
692
 
576
- if (this .skinCoordNode)
577
- this .skinCoordNode ._point = this .skinBindingCoord ._point;
693
+ gl .activeTexture (gl .TEXTURE0 + jointsTextureTextureUnit);
694
+ gl .bindTexture (gl .TEXTURE_2D, this .jointsTexture);
695
+ gl .uniform1i (shaderObject .x3d_JointsTexture, jointsTextureTextureUnit);
696
+
697
+ gl .activeTexture (gl .TEXTURE0 + displacementsTextureTextureUnit);
698
+ gl .bindTexture (gl .TEXTURE_2D, this .displacementsTexture);
699
+ gl .uniform1i (shaderObject .x3d_DisplacementsTexture, displacementsTextureTextureUnit);
578
700
 
579
- X3DChildNode_default().prototype .toJSONStream .call (this, generator);
701
+ gl .activeTexture (gl .TEXTURE0 + jointMatricesTextureUnit);
702
+ gl .bindTexture (gl .TEXTURE_2D, this .jointMatricesTexture);
703
+ gl .uniform1i (shaderObject .x3d_JointMatricesTexture, jointMatricesTextureUnit);
580
704
  },
581
705
  dispose ()
582
706
  {
@@ -615,6 +739,8 @@ Object .defineProperties (HAnimHumanoid,
615
739
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "description", new (Fields_default()).SFString ()),
616
740
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "name", new (Fields_default()).SFString ()),
617
741
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "info", new (Fields_default()).MFString ()),
742
+ new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "skeletalConfiguration", new (Fields_default()).SFString ("BASIC")),
743
+ new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "loa", new (Fields_default()).SFInt32 (-1)),
618
744
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "translation", new (Fields_default()).SFVec3f ()),
619
745
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "rotation", new (Fields_default()).SFRotation ()),
620
746
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "scale", new (Fields_default()).SFVec3f (1, 1, 1)),
@@ -624,8 +750,6 @@ Object .defineProperties (HAnimHumanoid,
624
750
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "bboxDisplay", new (Fields_default()).SFBool ()),
625
751
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).initializeOnly, "bboxSize", new (Fields_default()).SFVec3f (-1, -1, -1)),
626
752
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).initializeOnly, "bboxCenter", new (Fields_default()).SFVec3f ()),
627
- new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "loa", new (Fields_default()).SFInt32 (-1)),
628
- new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "skeletalConfiguration", new (Fields_default()).SFString ("BASIC")),
629
753
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "skeleton", new (Fields_default()).MFNode ()),
630
754
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "viewpoints", new (Fields_default()).MFNode ()),
631
755
  new (X3DFieldDefinition_default()) ((X3DConstants_default()).inputOutput, "sites", new (Fields_default()).MFNode ()),
@@ -646,14 +770,40 @@ Object .defineProperties (HAnimHumanoid,
646
770
  },
647
771
  });
648
772
 
773
+ class Lock
774
+ {
775
+ #locked = true;
776
+
777
+ enable ()
778
+ {
779
+ this .#locked = false;
780
+ }
781
+
782
+ lock ()
783
+ {
784
+ const locked = this .#locked;
785
+
786
+ this .#locked = true;
787
+
788
+ return locked;
789
+ }
790
+ }
791
+
792
+ function even (value)
793
+ {
794
+ return value + value % 2;
795
+ }
796
+
649
797
  const HAnimHumanoid_default_ = HAnimHumanoid;
650
798
  ;
651
799
 
652
800
  Namespace_default().set ("x_ite/Components/HAnim/HAnimHumanoid", HAnimHumanoid_default_);
653
801
  /* harmony default export */ const HAnim_HAnimHumanoid = (HAnimHumanoid_default_);
654
802
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Grouping/X3DTransformNode\")"
655
- const X3DTransformNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Components/Grouping/X3DTransformNode");
803
+ const X3DTransformNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Components/Grouping/X3DTransformNode");
656
804
  var X3DTransformNode_default = /*#__PURE__*/__webpack_require__.n(X3DTransformNode_namespaceObject);
805
+ ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"standard/Math/Numbers/Vector3\")"
806
+ const Vector3_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("standard/Math/Numbers/Vector3");
657
807
  ;// CONCATENATED MODULE: ./src/x_ite/Components/HAnim/HAnimJoint.js
658
808
  /*******************************************************************************
659
809
  *
@@ -711,18 +861,22 @@ var X3DTransformNode_default = /*#__PURE__*/__webpack_require__.n(X3DTransformNo
711
861
 
712
862
 
713
863
 
864
+
714
865
  function HAnimJoint (executionContext)
715
866
  {
716
867
  X3DTransformNode_default().call (this, executionContext);
717
868
 
718
869
  this .addType ((X3DConstants_default()).HAnimJoint);
719
870
 
871
+ this .addChildObjects ((X3DConstants_default()).outputOnly, "displacements", new (Fields_default()).SFTime (),
872
+ (X3DConstants_default()).outputOnly, "displacementWeights", new (Fields_default()).SFTime ());
873
+
720
874
  this .setAllowedTypes ((X3DConstants_default()).HAnimJoint,
721
875
  (X3DConstants_default()).HAnimSegment,
722
876
  (X3DConstants_default()).HAnimSite);
723
877
 
724
- this .displacerNodes = [ ];
725
- this .modelMatrix = new (Matrix4_default()) ();
878
+ this .displacerNodes = [ ];
879
+ this .modelViewMatrix = new (Matrix4_default()) ();
726
880
  }
727
881
 
728
882
  Object .assign (Object .setPrototypeOf (HAnimJoint .prototype, (X3DTransformNode_default()).prototype),
@@ -731,31 +885,30 @@ Object .assign (Object .setPrototypeOf (HAnimJoint .prototype, (X3DTransformNode
731
885
  {
732
886
  X3DTransformNode_default().prototype .initialize .call (this);
733
887
 
734
- this ._skinCoordIndex .addInterest ("set_skinCoordIndex__", this);
735
- this ._displacers .addInterest ("set_displacers__", this);
888
+ this ._displacers .addInterest ("set_displacers__", this);
736
889
 
737
890
  this .set_displacers__ ();
738
891
  },
739
- setCameraObject (value)
892
+ getModelViewMatrix ()
740
893
  {
741
- X3DTransformNode_default().prototype .setCameraObject .call (this, value || !! this ._skinCoordIndex .length);
742
- },
743
- getModelMatrix ()
744
- {
745
- return this .modelMatrix;
894
+ return this .modelViewMatrix;
746
895
  },
747
896
  getDisplacers ()
748
897
  {
749
898
  return this .displacerNodes;
750
899
  },
751
- set_skinCoordIndex__ ()
752
- {
753
- this .set_cameraObjects__ ();
754
- },
755
900
  set_displacers__ ()
756
901
  {
757
902
  const displacerNodes = this .displacerNodes;
758
903
 
904
+ for (const displacerNode of displacerNodes)
905
+ {
906
+ displacerNode ._coordIndex .removeInterest ("addEvent", this ._displacements);
907
+ displacerNode ._displacements .removeInterest ("addEvent", this ._displacements);
908
+ displacerNode ._coordIndex .removeInterest ("addEvent", this ._displacementWeights);
909
+ displacerNode ._weight .removeInterest ("addEvent", this ._displacementWeights);
910
+ }
911
+
759
912
  displacerNodes .length = 0;
760
913
 
761
914
  for (const node of this ._displacers)
@@ -765,24 +918,33 @@ Object .assign (Object .setPrototypeOf (HAnimJoint .prototype, (X3DTransformNode
765
918
  if (displacerNode)
766
919
  displacerNodes .push (displacerNode);
767
920
  }
921
+
922
+ for (const displacerNode of displacerNodes)
923
+ {
924
+ displacerNode ._coordIndex .addInterest ("addEvent", this ._displacements);
925
+ displacerNode ._displacements .addInterest ("addEvent", this ._displacements);
926
+ displacerNode ._coordIndex .addInterest ("addEvent", this ._displacementWeights);
927
+ displacerNode ._weight .addInterest ("addEvent", this ._displacementWeights);
928
+ }
768
929
  },
769
930
  traverse (type, renderObject)
770
931
  {
771
- if (type === (TraverseType_default()).CAMERA)
772
- {
773
- if (this ._skinCoordIndex .length)
774
- this .modelMatrix .assign (this .getMatrix ()) .multRight (renderObject .getModelViewMatrix () .get ());
775
- }
932
+ const modelViewMatrix = renderObject .getModelViewMatrix ();
933
+
934
+ modelViewMatrix .push ();
935
+ modelViewMatrix .multLeft (this .getMatrix ());
776
936
 
777
- X3DTransformNode_default().prototype .traverse .call (this, type, renderObject);
937
+ if (type === (TraverseType_default()).DISPLAY)
938
+ this .modelViewMatrix .assign (modelViewMatrix .get ());
939
+
940
+ X3DTransformNode_default().prototype .groupTraverse .call (this, type, renderObject);
941
+
942
+ modelViewMatrix .pop ();
778
943
  },
779
944
  groupTraverse (type, renderObject)
780
945
  {
781
- if (type === (TraverseType_default()).CAMERA)
782
- {
783
- if (this ._skinCoordIndex .length)
784
- this .modelMatrix .assign (renderObject .getModelViewMatrix () .get ());
785
- }
946
+ if (type === (TraverseType_default()).DISPLAY)
947
+ this .modelViewMatrix .assign (renderObject .getModelViewMatrix () .get ());
786
948
 
787
949
  X3DTransformNode_default().prototype .groupTraverse .call (this, type, renderObject);
788
950
  },
@@ -969,7 +1131,7 @@ const HAnimMotion_default_ = HAnimMotion;
969
1131
  Namespace_default().set ("x_ite/Components/HAnim/HAnimMotion", HAnimMotion_default_);
970
1132
  /* harmony default export */ const HAnim_HAnimMotion = (HAnimMotion_default_);
971
1133
  ;// CONCATENATED MODULE: external "window [Symbol .for (\"X_ITE.X3D\")] .require (\"x_ite/Components/Grouping/X3DGroupingNode\")"
972
- const X3DGroupingNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.9.6")] .require ("x_ite/Components/Grouping/X3DGroupingNode");
1134
+ const X3DGroupingNode_namespaceObject = window [Symbol .for ("X_ITE.X3D-8.10.1")] .require ("x_ite/Components/Grouping/X3DGroupingNode");
973
1135
  var X3DGroupingNode_default = /*#__PURE__*/__webpack_require__.n(X3DGroupingNode_namespaceObject);
974
1136
  ;// CONCATENATED MODULE: ./src/x_ite/Components/HAnim/HAnimSegment.js
975
1137
  /*******************************************************************************