x_ite 8.9.6 → 8.10.0

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 (195) 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/laboratory/gltf-sample-viewer.html +1 -1
  87. package/package.json +1 -1
  88. package/src/assets/shaders/webgl1/Depth.vs.js +4 -4
  89. package/src/assets/shaders/webgl1/Pointing.fs.js +1 -1
  90. package/src/assets/shaders/webgl2/Depth.vs.js +7 -4
  91. package/src/assets/shaders/webgl2/LineTransform.vs.js +24 -12
  92. package/src/assets/shaders/webgl2/Pointing.fs.js +1 -1
  93. package/src/assets/shaders/webgl2/Pointing.vs.js +12 -9
  94. package/src/assets/shaders/webgl2/include/Particle.glsl.js +5 -15
  95. package/src/assets/shaders/webgl2/include/Skin.glsl.js +88 -0
  96. package/src/assets/shaders/webgl2/include/Utils.glsl.js +13 -0
  97. package/src/assets/shaders/webgl2/include/Vertex.glsl.js +17 -8
  98. package/src/bookmarks.js +54 -2
  99. package/src/tests.js +0 -360
  100. package/src/x_ite/Base/X3DArrayField.js +18 -3
  101. package/src/x_ite/Base/X3DBaseNode.js +73 -56
  102. package/src/x_ite/Base/X3DObjectArrayField.js +6 -4
  103. package/src/x_ite/Browser/Core/Context.js +14 -4
  104. package/src/x_ite/Browser/Core/Notification.js +4 -3
  105. package/src/x_ite/Browser/Core/X3DCoreContext.js +8 -8
  106. package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +4 -3
  107. package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +4 -3
  108. package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +6 -6
  109. package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +9 -10
  110. package/src/x_ite/Browser/Geometry3D/ConeOptions.js +5 -4
  111. package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +5 -4
  112. package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +3 -2
  113. package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +3 -2
  114. package/src/x_ite/Browser/Layout/ScreenText.js +2 -2
  115. package/src/x_ite/Browser/Navigation/ExamineViewer.js +4 -4
  116. package/src/x_ite/Browser/Navigation/LookAtViewer.js +4 -4
  117. package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -3
  118. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -3
  119. package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +6 -5
  120. package/src/x_ite/Browser/Navigation/X3DViewer.js +2 -13
  121. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +5 -4
  122. package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +8 -18
  123. package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +17 -5
  124. package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +6 -5
  125. package/src/x_ite/Browser/Shaders/Shaders.js +4 -0
  126. package/src/x_ite/Browser/Shape/X3DShapeContext.js +3 -3
  127. package/src/x_ite/Browser/Sound/X3DSoundContext.js +4 -3
  128. package/src/x_ite/Browser/Text/PolygonText.js +2 -2
  129. package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +1 -1
  130. package/src/x_ite/Browser/VERSION.js +1 -1
  131. package/src/x_ite/Browser/X3DBrowser.js +49 -17
  132. package/src/x_ite/Browser/X3DBrowserContext.js +8 -7
  133. package/src/x_ite/Components/Core/X3DChildNode.js +2 -5
  134. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +14 -14
  135. package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +1 -1
  136. package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +1 -1
  137. package/src/x_ite/Components/Geometry3D/ElevationGrid.js +5 -2
  138. package/src/x_ite/Components/Geometry3D/Extrusion.js +24 -13
  139. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +5 -2
  140. package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +2 -2
  141. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
  142. package/src/x_ite/Components/Grouping/X3DBoundedObject.js +1 -2
  143. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +314 -161
  144. package/src/x_ite/Components/HAnim/HAnimJoint.js +37 -25
  145. package/src/x_ite/Components/Layering/X3DLayerNode.js +2 -2
  146. package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +1 -1
  147. package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +1 -1
  148. package/src/x_ite/Components/Navigation/NavigationInfo.js +4 -4
  149. package/src/x_ite/Components/Navigation/OrthoViewpoint.js +1 -1
  150. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +12 -12
  151. package/src/x_ite/Components/Networking/X3DUrlObject.js +18 -11
  152. package/src/x_ite/Components/Rendering/IndexedLineSet.js +17 -14
  153. package/src/x_ite/Components/Rendering/LineSet.js +16 -13
  154. package/src/x_ite/Components/Rendering/PointSet.js +16 -12
  155. package/src/x_ite/Components/Rendering/X3DColorNode.js +1 -3
  156. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +3 -0
  157. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +48 -77
  158. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +31 -12
  159. package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +3 -0
  160. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +3 -3
  161. package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +2 -2
  162. package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +1 -1
  163. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +24 -7
  164. package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +1 -1
  165. package/src/x_ite/Components/Shape/FillProperties.js +1 -3
  166. package/src/x_ite/Components/Shape/X3DAppearanceNode.js +1 -3
  167. package/src/x_ite/Components/Shape/X3DMaterialNode.js +8 -6
  168. package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +0 -2
  169. package/src/x_ite/Components/Sound/AudioClip.js +1 -1
  170. package/src/x_ite/Components/Sound/BufferAudioSource.js +1 -1
  171. package/src/x_ite/Components/Sound/ListenerPointSource.js +2 -2
  172. package/src/x_ite/Components/Sound/MicrophoneSource.js +2 -2
  173. package/src/x_ite/Components/Sound/OscillatorSource.js +2 -2
  174. package/src/x_ite/Components/Sound/Sound.js +1 -1
  175. package/src/x_ite/Components/Sound/StreamAudioSource.js +2 -2
  176. package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +1 -1
  177. package/src/x_ite/Components/Text/X3DFontStyleNode.js +4 -4
  178. package/src/x_ite/Components/Texturing/MultiTexture.js +1 -1
  179. package/src/x_ite/Components/Texturing/PixelTexture.js +1 -1
  180. package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +2 -2
  181. package/src/x_ite/Components/Texturing/X3DTextureNode.js +1 -3
  182. package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +2 -2
  183. package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +1 -1
  184. package/src/x_ite/Components/Time/TimeSensor.js +1 -1
  185. package/src/x_ite/Components/Time/X3DTimeDependentNode.js +2 -2
  186. package/src/x_ite/Execution/X3DExecutionContext.js +3 -4
  187. package/src/x_ite/Execution/X3DScene.js +4 -4
  188. package/src/x_ite/Execution/X3DWorld.js +1 -1
  189. package/src/x_ite/Parser/GLTF2Parser.js +196 -116
  190. package/src/x_ite/Parser/X3DOptimizer.js +47 -18
  191. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +4 -4
  192. package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
  193. package/src/x_ite/Rendering/X3DRenderObject.js +20 -12
  194. package/src/x_ite.html +36 -10
  195. package/x_ite.min.html +36 -10
@@ -58,8 +58,6 @@ import Plane3 from "../../../standard/Math/Geometry/Plane3.js";
58
58
  import Triangle3 from "../../../standard/Math/Geometry/Triangle3.js";
59
59
  import Algorithm from "../../../standard/Math/Algorithm.js";
60
60
 
61
- const ARRAY_TYPE = "Array"; // For color, texCoord, normal, and vertex array, can be MFFloat or Array;
62
-
63
61
  // Box normals for bbox / line intersection.
64
62
  const boxNormals = [
65
63
  new Vector3 (0, 0, 1), // front
@@ -76,13 +74,9 @@ function X3DGeometryNode (executionContext)
76
74
 
77
75
  this .addType (X3DConstants .X3DGeometryNode);
78
76
 
79
- this .addChildObjects ("transparent", new Fields .SFBool (),
80
- "bbox_changed", new Fields .SFTime (),
81
- "rebuild", new Fields .SFTime ());
82
-
83
- this ._transparent .setAccessType (X3DConstants .outputOnly);
84
- this ._bbox_changed .setAccessType (X3DConstants .outputOnly);
85
- this ._rebuild .setAccessType (X3DConstants .outputOnly);
77
+ this .addChildObjects (X3DConstants .outputOnly, "transparent", new Fields .SFBool (),
78
+ X3DConstants .outputOnly, "bbox_changed", new Fields .SFTime (),
79
+ X3DConstants .outputOnly, "rebuild", new Fields .SFTime ());
86
80
 
87
81
  // Members
88
82
 
@@ -100,12 +94,13 @@ function X3DGeometryNode (executionContext)
100
94
  this .attribArrays = [ ];
101
95
  this .textureCoordinateMapping = new Map ();
102
96
  this .multiTexCoords = [ ];
103
- this .texCoords = X3DGeometryNode .createArray ();
104
- this .fogDepths = X3DGeometryNode .createArray ();
105
- this .colors = X3DGeometryNode .createArray ();
106
- this .normals = X3DGeometryNode .createArray ();
107
- this .flatNormals = X3DGeometryNode .createArray ();
108
- this .vertices = X3DGeometryNode .createArray ();
97
+ this .coordIndices = new Fields .MFFloat ();
98
+ this .texCoords = new Fields .MFFloat ();
99
+ this .fogDepths = new Fields .MFFloat ();
100
+ this .colors = new Fields .MFFloat ();
101
+ this .normals = new Fields .MFFloat ();
102
+ this .flatNormals = new Fields .MFFloat ();
103
+ this .vertices = new Fields .MFFloat ();
109
104
  this .hasFogCoords = false;
110
105
  this .hasNormals = false;
111
106
  this .geometryKey = "";
@@ -116,45 +111,6 @@ function X3DGeometryNode (executionContext)
116
111
  this .planes [i] = new Plane3 (Vector3 .Zero, Vector3 .zAxis);
117
112
  }
118
113
 
119
- Object .defineProperty (X3DGeometryNode, "createArray",
120
- {
121
- // Function to select ether Array or MFFloat for color/normal/vertex arrays.
122
- value ()
123
- {
124
- if (ARRAY_TYPE == "MFFloat")
125
- return new Fields .MFFloat ();
126
-
127
- const array = [ ];
128
-
129
- array .typedArray = new Float32Array ();
130
-
131
- array .assign = function (value)
132
- {
133
- const length = value .length;
134
-
135
- for (let i = 0; i < length; ++ i)
136
- this [i] = value [i];
137
-
138
- this .length = length;
139
- };
140
-
141
- array .getValue = function ()
142
- {
143
- return this .typedArray;
144
- };
145
-
146
- array .shrinkToFit = function ()
147
- {
148
- if (this .length === this .typedArray .length)
149
- this .typedArray .set (this);
150
- else
151
- this .typedArray = new Float32Array (this);
152
- };
153
-
154
- return array;
155
- },
156
- })
157
-
158
114
  Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .prototype),
159
115
  {
160
116
  setup ()
@@ -178,6 +134,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
178
134
 
179
135
  this .frontFace = gl .CCW;
180
136
  this .backFace = new Map ([[gl .CCW, gl .CW], [gl .CW, gl .CCW]]);
137
+ this .coordIndexBuffer = gl .createBuffer ();
181
138
  this .attribBuffers = [ ];
182
139
  this .textureCoordinateNode = browser .getDefaultTextureCoordinate ();
183
140
  this .texCoordBuffers = Array .from ({length: browser .getMaxTexCoords ()}, () => gl .createBuffer ());
@@ -257,6 +214,10 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
257
214
 
258
215
  this .frontFace = value ? gl .CCW : gl .CW;
259
216
  },
217
+ getCoordIndices ()
218
+ {
219
+ return this .coordIndices;
220
+ },
260
221
  getAttrib ()
261
222
  {
262
223
  return this .attribNodes;
@@ -312,10 +273,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
312
273
  {
313
274
  this .textureCoordinateNode .removeInterest ("updateTextureCoordinateMapping", this);
314
275
 
315
- if (value)
316
- this .textureCoordinateNode = value;
317
- else
318
- this .textureCoordinateNode = this .getBrowser () .getDefaultTextureCoordinate ();
276
+ this .textureCoordinateNode = value ?? this .getBrowser () .getDefaultTextureCoordinate ();
319
277
 
320
278
  this .textureCoordinateNode .addInterest ("updateTextureCoordinateMapping", this);
321
279
 
@@ -731,7 +689,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
731
689
 
732
690
  if (flatShading)
733
691
  {
734
- if (! this .flatNormals .length)
692
+ if (!this .flatNormals .length)
735
693
  {
736
694
  const
737
695
  cw = this .frontFace === gl .CW,
@@ -741,16 +699,16 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
741
699
  for (let i = 0, length = vertices .length; i < length; i += 12)
742
700
  {
743
701
  Triangle3 .normal (v0 .set (vertices [i], vertices [i + 1], vertices [i + 2]),
744
- v1 .set (vertices [i + 4], vertices [i + 5], vertices [i + 6]),
745
- v2 .set (vertices [i + 8], vertices [i + 9], vertices [i + 10]),
746
- normal);
702
+ v1 .set (vertices [i + 4], vertices [i + 5], vertices [i + 6]),
703
+ v2 .set (vertices [i + 8], vertices [i + 9], vertices [i + 10]),
704
+ normal);
747
705
 
748
706
  if (cw)
749
707
  normal .negate ();
750
708
 
751
709
  flatNormals .push (normal .x, normal .y, normal .z,
752
- normal .x, normal .y, normal .z,
753
- normal .x, normal .y, normal .z);
710
+ normal .x, normal .y, normal .z,
711
+ normal .x, normal .y, normal .z);
754
712
  }
755
713
 
756
714
  flatNormals .shrinkToFit ();
@@ -777,7 +735,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
777
735
  this .clear ();
778
736
  this .build ();
779
737
 
780
- // Shrink arrays before transfer to graphics card.
738
+ // Shrink arrays before transferring them to graphics card.
781
739
 
782
740
  for (const attribArray of this .attribArrays)
783
741
  attribArray .shrinkToFit ();
@@ -785,17 +743,18 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
785
743
  for (const multiTexCoord of this .multiTexCoords)
786
744
  multiTexCoord .shrinkToFit ();
787
745
 
788
- this .fogDepths .shrinkToFit ();
789
- this .colors .shrinkToFit ();
790
- this .normals .shrinkToFit ();
791
- this .vertices .shrinkToFit ();
746
+ this .coordIndices .shrinkToFit ();
747
+ this .fogDepths .shrinkToFit ();
748
+ this .colors .shrinkToFit ();
749
+ this .normals .shrinkToFit ();
750
+ this .vertices .shrinkToFit ();
792
751
 
793
752
  // Determine bbox.
794
753
 
795
754
  const
755
+ vertices = this .vertices .getValue (),
796
756
  min = this .min,
797
- max = this .max,
798
- vertices = this .vertices .getValue ();
757
+ max = this .max;
799
758
 
800
759
  if (vertices .length)
801
760
  {
@@ -851,7 +810,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
851
810
  const length = this .attribNodes .length;
852
811
 
853
812
  for (let a = attribArrays .length; a < length; ++ a)
854
- attribArrays [a] = X3DGeometryNode .createArray ();
813
+ attribArrays [a] = new Fields .MFFloat ();
855
814
 
856
815
  attribArrays .length = length;
857
816
  }
@@ -860,6 +819,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
860
819
 
861
820
  this .flatShading = undefined;
862
821
 
822
+ this .coordIndices .length = 0;
863
823
  this .fogDepths .length = 0;
864
824
  this .colors .length = 0;
865
825
  this .multiTexCoords .length = 0;
@@ -872,6 +832,11 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
872
832
  {
873
833
  const gl = this .getBrowser () .getContext ();
874
834
 
835
+ // Transfer coord indices.
836
+
837
+ gl .bindBuffer (gl .ARRAY_BUFFER, this .coordIndexBuffer);
838
+ gl .bufferData (gl .ARRAY_BUFFER, this .coordIndices .getValue (), gl .DYNAMIC_DRAW);
839
+
875
840
  // Transfer attribArrays.
876
841
 
877
842
  for (let i = this .attribBuffers .length, length = this .attribArrays .length; i < length; ++ i)
@@ -968,6 +933,9 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
968
933
  {
969
934
  if (this .vertexArrayObject .enable (shaderNode))
970
935
  {
936
+ if (this .coordIndices .length)
937
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
938
+
971
939
  if (this .multiTexCoords .length)
972
940
  shaderNode .enableTexCoordAttribute (gl, this .texCoordBuffers, 0, 0);
973
941
 
@@ -985,13 +953,13 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
985
953
  appearanceNode = renderContext .appearanceNode,
986
954
  shaderNode = appearanceNode .getShader (this, renderContext);
987
955
 
988
- if (this .solid || ! appearanceNode .getBackMaterial () || this .getBrowser () .getWireframe ())
956
+ if (this .solid || !appearanceNode .getBackMaterial () || this .getBrowser () .getWireframe ())
989
957
  {
990
958
  this .displayGeometry (gl, renderContext, appearanceNode, shaderNode, true, true);
991
959
  }
992
960
  else
993
961
  {
994
- const backShaderNode = appearanceNode .getBackShader (this, renderContext)
962
+ const backShaderNode = appearanceNode .getBackShader (this, renderContext);
995
963
 
996
964
  this .displayGeometry (gl, renderContext, appearanceNode, backShaderNode, true, false);
997
965
  this .displayGeometry (gl, renderContext, appearanceNode, shaderNode, false, true);
@@ -1015,6 +983,9 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
1015
983
 
1016
984
  if (this .vertexArrayObject .enable (shaderNode))
1017
985
  {
986
+ if (this .coordIndices .length)
987
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
988
+
1018
989
  for (let i = 0, length = attribNodes .length; i < length; ++ i)
1019
990
  attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
1020
991
 
@@ -1050,7 +1021,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
1050
1021
 
1051
1022
  // Render back.
1052
1023
 
1053
- if (back && ! this .solid)
1024
+ if (back && !this .solid)
1054
1025
  {
1055
1026
  gl .cullFace (gl .FRONT);
1056
1027
  gl .drawArrays (primitiveMode, 0, this .vertexCount);
@@ -1104,7 +1075,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
1104
1075
  appearanceNode = renderContext .appearanceNode,
1105
1076
  shaderNode = appearanceNode .getShader (this, renderContext);
1106
1077
 
1107
- if (this .solid || ! appearanceNode .getBackMaterial () || this .getBrowser () .getWireframe ())
1078
+ if (this .solid || !appearanceNode .getBackMaterial () || this .getBrowser () .getWireframe ())
1108
1079
  {
1109
1080
  this .displayParticlesGeometry (gl, renderContext, appearanceNode, shaderNode, true, true, particleSystem);
1110
1081
  }
@@ -1171,7 +1142,7 @@ Object .assign (Object .setPrototypeOf (X3DGeometryNode .prototype, X3DNode .pro
1171
1142
 
1172
1143
  gl .enable (gl .CULL_FACE);
1173
1144
 
1174
- if (back && ! this .solid)
1145
+ if (back && !this .solid)
1175
1146
  {
1176
1147
  gl .cullFace (gl .FRONT);
1177
1148
  gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, particleSystem .numParticles);
@@ -104,7 +104,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, X3DGeome
104
104
  gl .bufferData (gl .ARRAY_BUFFER, this .lineStipples, gl .DYNAMIC_DRAW);
105
105
 
106
106
  gl .bindBuffer (gl .ARRAY_BUFFER, this .trianglesBuffer);
107
- gl .bufferData (gl .ARRAY_BUFFER, new Float32Array (15 * 6 * numLines), gl .DYNAMIC_DRAW);
107
+ gl .bufferData (gl .ARRAY_BUFFER, new Float32Array (16 * 6 * numLines), gl .DYNAMIC_DRAW);
108
108
  },
109
109
  updateLengthSoFar: (() =>
110
110
  {
@@ -163,11 +163,13 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, X3DGeome
163
163
  if (this .thickVertexArrayObject .enable (shaderNode))
164
164
  {
165
165
  const
166
- stride = 15 * Float32Array .BYTES_PER_ELEMENT,
167
- lineStippleOffset = 0,
168
- normalOffset = 8 * Float32Array .BYTES_PER_ELEMENT,
169
- vertexOffset = 11 * Float32Array .BYTES_PER_ELEMENT;
166
+ stride = 16 * Float32Array .BYTES_PER_ELEMENT,
167
+ coordIndexOffset = 0,
168
+ lineStippleOffset = 1 * Float32Array .BYTES_PER_ELEMENT,
169
+ normalOffset = 9 * Float32Array .BYTES_PER_ELEMENT,
170
+ vertexOffset = 12 * Float32Array .BYTES_PER_ELEMENT;
170
171
 
172
+ shaderNode .enableCoordIndexAttribute (gl, this .trianglesBuffer, stride, coordIndexOffset);
171
173
  shaderNode .enableLineStippleAttribute (gl, this .trianglesBuffer, stride, lineStippleOffset);
172
174
 
173
175
  if (this .hasNormals)
@@ -188,6 +190,9 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, X3DGeome
188
190
 
189
191
  if (this .vertexArrayObject .enable (shaderNode))
190
192
  {
193
+ if (this .coordIndices .length)
194
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
195
+
191
196
  shaderNode .enableLineStippleAttribute (gl, this .lineStippleBuffer, 0, 0);
192
197
 
193
198
  if (this .hasNormals)
@@ -248,6 +253,9 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, X3DGeome
248
253
  if (this .thickVertexArrayObject .enable (transformShaderNode))
249
254
  {
250
255
  const
256
+ coordIndexStride = 2 * Float32Array .BYTES_PER_ELEMENT,
257
+ coordIndexOffset0 = 0,
258
+ coordIndexOffset1 = 1 * Float32Array .BYTES_PER_ELEMENT,
251
259
  lineStippleStride = 6 * Float32Array .BYTES_PER_ELEMENT,
252
260
  lineStippleOffset0 = 0,
253
261
  lineStippleOffset1 = 3 * Float32Array .BYTES_PER_ELEMENT,
@@ -267,6 +275,12 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, X3DGeome
267
275
  // for (let i = 0, length = attribNodes .length; i < length; ++ i)
268
276
  // attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
269
277
 
278
+ if (this .coordIndices .length)
279
+ {
280
+ transformShaderNode .enableFloatAttrib (gl, "x3d_CoordIndex0", this .coordIndexBuffer, 1, coordIndexStride, coordIndexOffset0);
281
+ transformShaderNode .enableFloatAttrib (gl, "x3d_CoordIndex1", this .coordIndexBuffer, 1, coordIndexStride, coordIndexOffset1);
282
+ }
283
+
270
284
  transformShaderNode .enableFloatAttrib (gl, "x3d_LineStipple0", this .lineStippleBuffer, 3, lineStippleStride, lineStippleOffset0);
271
285
  transformShaderNode .enableFloatAttrib (gl, "x3d_LineStipple1", this .lineStippleBuffer, 3, lineStippleStride, lineStippleOffset1);
272
286
 
@@ -305,7 +319,7 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, X3DGeome
305
319
 
306
320
  // DEBUG
307
321
 
308
- // const data = new Float32Array (13 * 6 * this .vertexCount / 2);
322
+ // const data = new Float32Array (16 * 6 * this .vertexCount / 2);
309
323
  // gl .bindBuffer (gl .ARRAY_BUFFER, this .trianglesBuffer);
310
324
  // gl .getBufferSubData (gl .ARRAY_BUFFER, 0, data);
311
325
  // console .log (data);
@@ -324,16 +338,18 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, X3DGeome
324
338
  if (this .thickVertexArrayObject .enable (shaderNode))
325
339
  {
326
340
  const
327
- stride = 15 * Float32Array .BYTES_PER_ELEMENT,
328
- lineStippleOffset = 0,
329
- fogCoordOffset = 3 * Float32Array .BYTES_PER_ELEMENT,
330
- colorOffset = 4 * Float32Array .BYTES_PER_ELEMENT,
331
- normalOffset = 8 * Float32Array .BYTES_PER_ELEMENT,
332
- vertexOffset = 11 * Float32Array .BYTES_PER_ELEMENT;
341
+ stride = 16 * Float32Array .BYTES_PER_ELEMENT,
342
+ coordIndexOffset = 0,
343
+ lineStippleOffset = 1 * Float32Array .BYTES_PER_ELEMENT,
344
+ fogCoordOffset = 4 * Float32Array .BYTES_PER_ELEMENT,
345
+ colorOffset = 5 * Float32Array .BYTES_PER_ELEMENT,
346
+ normalOffset = 9 * Float32Array .BYTES_PER_ELEMENT,
347
+ vertexOffset = 12 * Float32Array .BYTES_PER_ELEMENT;
333
348
 
334
349
  // for (let i = 0, length = attribNodes .length; i < length; ++ i)
335
350
  // attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
336
351
 
352
+ shaderNode .enableCoordIndexAttribute (gl, this .trianglesBuffer, stride, coordIndexOffset);
337
353
  shaderNode .enableLineStippleAttribute (gl, this .trianglesBuffer, stride, lineStippleOffset);
338
354
 
339
355
  if (this .hasFogCoords)
@@ -373,6 +389,9 @@ Object .assign (Object .setPrototypeOf (X3DLineGeometryNode .prototype, X3DGeome
373
389
 
374
390
  if (this .vertexArrayObject .enable (shaderNode))
375
391
  {
392
+ if (this .coordIndices .length)
393
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
394
+
376
395
  for (let i = 0, length = attribNodes .length; i < length; ++ i)
377
396
  attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
378
397
 
@@ -91,6 +91,9 @@ Object .assign (Object .setPrototypeOf (X3DPointGeometryNode .prototype, X3DGeom
91
91
 
92
92
  if (this .vertexArrayObject .enable (shaderNode))
93
93
  {
94
+ if (this .coordIndices .length)
95
+ shaderNode .enableCoordIndexAttribute (gl, this .coordIndexBuffer, 0, 0);
96
+
94
97
  for (let i = 0, length = attribNodes .length; i < length; ++ i)
95
98
  attribNodes [i] .enable (gl, shaderNode, attribBuffers [i]);
96
99
 
@@ -63,9 +63,9 @@ function RigidBody (executionContext)
63
63
 
64
64
  this .addType (X3DConstants .RigidBody);
65
65
 
66
- this .addChildObjects ("collection", new Fields .SFNode (),
67
- "transform", new Fields .SFTime (),
68
- "otherGeometry", new Fields .MFNode ());
66
+ this .addChildObjects (X3DConstants .inputOutput, "collection", new Fields .SFNode (),
67
+ X3DConstants .inputOutput, "transform", new Fields .SFTime (),
68
+ X3DConstants .inputOutput, "otherGeometry", new Fields .MFNode ());
69
69
 
70
70
  this ._position .setUnit ("length");
71
71
  this ._linearVelocity .setUnit ("speed");
@@ -60,8 +60,8 @@ function X3DNBodyCollidableNode (executionContext)
60
60
 
61
61
  this .addType (X3DConstants .X3DNBodyCollidableNode);
62
62
 
63
- this .addChildObjects ("body", new Fields .SFNode (),
64
- "compoundShape_changed", new Fields .SFTime ());
63
+ this .addChildObjects (X3DConstants .inputOutput, "body", new Fields .SFNode (),
64
+ X3DConstants .outputOnly, "compoundShape_changed", new Fields .SFTime ());
65
65
 
66
66
  // Units
67
67
 
@@ -57,7 +57,7 @@ function X3DRigidJointNode (executionContext)
57
57
 
58
58
  this .addType (X3DConstants .X3DRigidJointNode);
59
59
 
60
- this .addChildObjects ("collection", new Fields .SFNode ());
60
+ this .addChildObjects (X3DConstants .inputOutput, "collection", new Fields .SFNode ());
61
61
 
62
62
  this .bodyNode1 = null;
63
63
  this .bodyNode2 = null;
@@ -274,7 +274,10 @@ Object .assign (X3DProgrammableShaderObject .prototype,
274
274
  this .x3d_TexCoord .push ([i, x3d_TexCoord]);
275
275
  }
276
276
 
277
- this .x3d_TexCoordRamp = gl .getUniformLocation (program, "x3d_TexCoordRamp");
277
+ this .x3d_TexCoordRamp = gl .getUniformLocation (program, "x3d_TexCoordRamp");
278
+ this .x3d_JointsTexture = gl .getUniformLocation (program, "x3d_JointsTexture");
279
+ this .x3d_DisplacementsTexture = gl .getUniformLocation (program, "x3d_DisplacementsTexture");
280
+ this .x3d_JointMatricesTexture = gl .getUniformLocation (program, "x3d_JointMatricesTexture");
278
281
 
279
282
  this .x3d_Viewport = gl .getUniformLocation (program, "x3d_Viewport");
280
283
  this .x3d_ProjectionMatrix = gl .getUniformLocation (program, "x3d_ProjectionMatrix");
@@ -287,6 +290,7 @@ Object .assign (X3DProgrammableShaderObject .prototype,
287
290
  */
288
291
 
289
292
  const attributes = [
293
+ "CoordIndex",
290
294
  "LineStipple",
291
295
  "FogDepth",
292
296
  "Color",
@@ -357,7 +361,10 @@ Object .assign (X3DProgrammableShaderObject .prototype,
357
361
  for (const uniform of this .x3d_ProjectiveTexture)
358
362
  gl .uniform1i (uniform, browser .getDefaultTexture2DUnit ());
359
363
 
360
- gl .uniform1i (this .x3d_TexCoordRamp, browser .getDefaultTexture2DUnit ());
364
+ gl .uniform1i (this .x3d_TexCoordRamp, browser .getDefaultTexture2DUnit ());
365
+ gl .uniform1i (this .x3d_JoinsTexture, browser .getDefaultTexture2DUnit ());
366
+ gl .uniform1i (this .x3d_DisplacementsTexture, browser .getDefaultTexture2DUnit ());
367
+ gl .uniform1i (this .x3d_JointMatricesTexture, browser .getDefaultTexture2DUnit ());
361
368
  },
362
369
  getUniformLocation (gl, program, name, depreciated)
363
370
  {
@@ -972,14 +979,12 @@ Object .assign (X3DProgrammableShaderObject .prototype,
972
979
 
973
980
  return function (gl, geometryContext, renderContext, front = true)
974
981
  {
982
+ const { renderObject, fogNode, appearanceNode, humanoidNode, modelViewMatrix } = renderContext;
983
+
975
984
  const
976
- renderObject = renderContext .renderObject,
977
- fogNode = renderContext .fogNode,
978
- appearanceNode = renderContext .appearanceNode,
979
985
  stylePropertiesNode = appearanceNode .getStyleProperties (geometryContext .geometryType),
980
986
  materialNode = front ? appearanceNode .getMaterial () : appearanceNode .getBackMaterial (),
981
- textureNode = renderContext .textureNode || appearanceNode .getTexture (),
982
- modelViewMatrix = renderContext .modelViewMatrix;
987
+ textureNode = renderContext .textureNode || appearanceNode .getTexture ();
983
988
 
984
989
  // Set global uniforms.
985
990
 
@@ -1075,6 +1080,10 @@ Object .assign (X3DProgrammableShaderObject .prototype,
1075
1080
 
1076
1081
  appearanceNode .getTextureTransform () .setShaderUniforms (gl, this);
1077
1082
  geometryContext .getTextureCoordinate () .setShaderUniforms (gl, this);
1083
+
1084
+ // Skinning
1085
+
1086
+ humanoidNode ?.setShaderUniforms (gl, this);
1078
1087
  };
1079
1088
  })(),
1080
1089
  enable (gl)
@@ -1147,6 +1156,14 @@ Object .assign (X3DProgrammableShaderObject .prototype,
1147
1156
  gl .vertexAttribPointer (location, 4, gl .FLOAT, false, stride, offset + 16 * i);
1148
1157
  }
1149
1158
  },
1159
+ enableCoordIndexAttribute (gl, buffer, stride, offset)
1160
+ {
1161
+ const location = this .x3d_CoordIndex;
1162
+
1163
+ gl .bindBuffer (gl .ARRAY_BUFFER, buffer);
1164
+ gl .enableVertexAttribArray (location);
1165
+ gl .vertexAttribPointer (location, 1, gl .FLOAT, false, stride, offset); // gl .UNSIGNED_INT
1166
+ },
1150
1167
  enableLineStippleAttribute (gl, buffer, stride, offset)
1151
1168
  {
1152
1169
  const location = this .x3d_LineStipple;
@@ -55,7 +55,7 @@ function X3DVertexAttributeNode (executionContext)
55
55
 
56
56
  this .addType (X3DConstants .X3DVertexAttributeNode);
57
57
 
58
- this .addChildObjects ("attribute_changed", new Fields .SFTime ());
58
+ this .addChildObjects (X3DConstants .outputOnly, "attribute_changed", new Fields .SFTime ());
59
59
  }
60
60
 
61
61
  Object .assign (Object .setPrototypeOf (X3DVertexAttributeNode .prototype, X3DGeometricPropertyNode .prototype),
@@ -57,9 +57,7 @@ function FillProperties (executionContext)
57
57
 
58
58
  this .addType (X3DConstants .FillProperties);
59
59
 
60
- this .addChildObjects ("transparent", new Fields .SFBool ());
61
-
62
- this ._transparent .setAccessType (X3DConstants .outputOnly);
60
+ this .addChildObjects (X3DConstants .outputOnly, "transparent", new Fields .SFBool ());
63
61
 
64
62
  this .hatchColor = new Float32Array (3);
65
63
  }
@@ -55,9 +55,7 @@ function X3DAppearanceNode (executionContext)
55
55
 
56
56
  this .addType (X3DConstants .X3DAppearanceNode);
57
57
 
58
- this .addChildObjects ("transparent", new Fields .SFBool ());
59
-
60
- this ._transparent .setAccessType (X3DConstants .outputOnly);
58
+ this .addChildObjects (X3DConstants .outputOnly, "transparent", new Fields .SFBool ());
61
59
  }
62
60
 
63
61
  Object .assign (Object .setPrototypeOf (X3DAppearanceNode .prototype, X3DNode .prototype),
@@ -57,9 +57,7 @@ function X3DMaterialNode (executionContext)
57
57
 
58
58
  this .addType (X3DConstants .X3DMaterialNode);
59
59
 
60
- this .addChildObjects ("transparent", new Fields .SFBool ());
61
-
62
- this ._transparent .setAccessType (X3DConstants .outputOnly);
60
+ this .addChildObjects (X3DConstants .outputOnly, "transparent", new Fields .SFBool ());
63
61
 
64
62
  this .textureBits = new BitSet ();
65
63
  this .shaderNodes = this .getBrowser () .getShaders ();
@@ -113,7 +111,7 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, X3DAppearanc
113
111
 
114
112
  if (renderContext)
115
113
  {
116
- const { renderObject, transparent, shadows, fogNode, shapeNode, appearanceNode, textureNode, objectsCount } = renderContext;
114
+ const { renderObject, transparent, shadows, fogNode, shapeNode, appearanceNode, textureNode, humanoidNode, objectsCount } = renderContext;
117
115
 
118
116
  key += this .logarithmicDepthBuffer || renderObject .getViewpoint () .getLogarithmicDepthBuffer () ? 1 : 0;
119
117
  key += appearanceNode .getNormalizedAlphaMode (transparent);
@@ -124,6 +122,7 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, X3DAppearanc
124
122
  key += appearanceNode .getStyleProperties (geometryContext .geometryType) ? 1 : 0;
125
123
  key += appearanceNode .getTextureTransformMapping () .size || 1;
126
124
  key += geometryContext .textureCoordinateMapping .size || 1;
125
+ key += humanoidNode ? 1 : 0;
127
126
  key += ".";
128
127
  key += objectsCount [0]; // Clip planes
129
128
  key += ".";
@@ -140,7 +139,7 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, X3DAppearanc
140
139
  key += this .logarithmicDepthBuffer ? 1 : 0;
141
140
  key += geometryContext .alphaMode;
142
141
  key += this .getMaterialKey (false);
143
- key += "000011";
142
+ key += "0000110";
144
143
  key += ".";
145
144
  key += objectsCount [0]; // Clip planes
146
145
  key += ".";
@@ -172,7 +171,7 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, X3DAppearanc
172
171
 
173
172
  if (renderContext)
174
173
  {
175
- const { renderObject, fogNode, shapeNode, appearanceNode, objectsCount } = renderContext;
174
+ const { renderObject, fogNode, shapeNode, appearanceNode, humanoidNode, objectsCount } = renderContext;
176
175
 
177
176
  if (this .logarithmicDepthBuffer || renderObject .getViewpoint () .getLogarithmicDepthBuffer ())
178
177
  options .push ("X3D_LOGARITHMIC_DEPTH_BUFFER");
@@ -203,6 +202,9 @@ Object .assign (Object .setPrototypeOf (X3DMaterialNode .prototype, X3DAppearanc
203
202
  break;
204
203
  }
205
204
 
205
+ if (humanoidNode)
206
+ options .push ("X3D_SKINNING");
207
+
206
208
  if (objectsCount [0])
207
209
  {
208
210
  options .push ("X3D_CLIP_PLANES")
@@ -57,8 +57,6 @@ function X3DOneSidedMaterialNode (executionContext)
57
57
 
58
58
  this .addType (X3DConstants .X3DOneSidedMaterialNode);
59
59
 
60
- this .addChildObjects ("textures", new Fields .SFTime ());
61
-
62
60
  this .emissiveColor = new Float32Array (3);
63
61
  }
64
62
 
@@ -60,7 +60,7 @@ function AudioClip (executionContext)
60
60
 
61
61
  this .addType (X3DConstants .AudioClip);
62
62
 
63
- this .addChildObjects ("speed", new Fields .SFFloat (1));
63
+ this .addChildObjects (X3DConstants .inputOutput, "speed", new Fields .SFFloat (1));
64
64
 
65
65
  this .audio = $("<audio></audio>");
66
66
  this .urlStack = new Fields .MFString ();
@@ -59,7 +59,7 @@ function BufferAudioSource (executionContext)
59
59
 
60
60
  this .addType (X3DConstants .BufferAudioSource);
61
61
 
62
- this .addChildObjects ("speed", new Fields .SFFloat (1));
62
+ this .addChildObjects (X3DConstants .inputOutput, "speed", new Fields .SFFloat (1));
63
63
  }
64
64
 
65
65
  Object .assign (Object .setPrototypeOf (BufferAudioSource .prototype, X3DSoundSourceNode .prototype),
@@ -57,8 +57,8 @@ function ListenerPointSource (executionContext)
57
57
 
58
58
  this .addType (X3DConstants .ListenerPointSource);
59
59
 
60
- this .addChildObjects ("loop", new Fields .SFBool (),
61
- "speed", new Fields .SFFloat (1));
60
+ this .addChildObjects (X3DConstants .inputOutput, "loop", new Fields .SFBool (),
61
+ X3DConstants .inputOutput, "speed", new Fields .SFFloat (1));
62
62
 
63
63
  this ._position .setUnit ("length");
64
64
  }
@@ -57,8 +57,8 @@ function MicrophoneSource (executionContext)
57
57
 
58
58
  this .addType (X3DConstants .MicrophoneSource);
59
59
 
60
- this .addChildObjects ("loop", new Fields .SFBool (),
61
- "speed", new Fields .SFFloat (1));
60
+ this .addChildObjects (X3DConstants .inputOutput, "loop", new Fields .SFBool (),
61
+ X3DConstants .inputOutput, "speed", new Fields .SFFloat (1));
62
62
  }
63
63
 
64
64
  Object .setPrototypeOf (MicrophoneSource .prototype, X3DSoundSourceNode .prototype);
@@ -57,8 +57,8 @@ function OscillatorSource (executionContext)
57
57
 
58
58
  this .addType (X3DConstants .OscillatorSource);
59
59
 
60
- this .addChildObjects ("loop", new Fields .SFBool (),
61
- "speed", new Fields .SFFloat (1));
60
+ this .addChildObjects (X3DConstants .inputOutput, "loop", new Fields .SFBool (),
61
+ X3DConstants .inputOutput, "speed", new Fields .SFFloat (1));
62
62
  }
63
63
 
64
64
  Object .setPrototypeOf (OscillatorSource .prototype, X3DSoundSourceNode .prototype);