x_ite 8.10.1 → 8.11.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.
- package/Makefile +3 -0
- package/build/bin/version.pl +28 -20
- package/build/docs/glTF-samples.pl +151 -0
- package/build/docs/nodes.pl +1 -1
- package/build/src/nodes.pl +41 -0
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +30 -26
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +14 -14
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +394 -30
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +26 -26
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +73 -74
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +18 -18
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +18 -18
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +37 -37
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +55 -63
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +14 -14
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +35 -31
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +20 -20
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +1456 -844
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/docs/_posts/components/Core/MetadataBoolean.md +6 -4
- package/docs/_posts/components/Core/MetadataDouble.md +6 -4
- package/docs/_posts/components/Core/MetadataFloat.md +6 -4
- package/docs/_posts/components/Core/MetadataInteger.md +6 -4
- package/docs/_posts/components/Core/MetadataSet.md +6 -4
- package/docs/_posts/components/Core/MetadataString.md +6 -4
- package/docs/_posts/components/DIS/DISEntityTypeMapping.md +1 -1
- package/docs/_posts/components/HAnim/HAnimMotion.md +48 -48
- package/docs/_posts/components/RigidBodyPhysics/Contact.md +1 -1
- package/docs/_posts/getting-started.md +45 -35
- package/docs/_posts/reference/browser-services.md +6 -0
- package/docs/_tabs/playground.html +215 -15
- package/docs/assets/css/style.scss +35 -2
- package/docs/assets/js/example.js +95 -3
- package/docs/laboratory/gltf-sample-viewer.html +603 -235
- package/package.json +2 -2
- package/src/assets/shaders/Types.glsl.js +4 -0
- package/src/assets/shaders/webgl1/include/Hatch.glsl.js +2 -3
- package/src/assets/shaders/webgl2/Compose.fs.js +29 -0
- package/src/assets/shaders/webgl2/Compose.vs.js +14 -0
- package/src/assets/shaders/webgl2/include/Fragment.glsl.js +24 -2
- package/src/assets/shaders/webgl2/include/Hatch.glsl.js +2 -3
- package/src/assets/shaders/webgl2/include/Stipple.glsl.js +5 -3
- package/src/bookmarks.js +92 -5
- package/src/examples.js +1 -0
- package/src/standard/Math/Numbers/Quaternion.js +191 -13
- package/src/standard/Math/Numbers/Rotation4.js +23 -0
- package/src/standard/Time/{MicroTime.js → Time.js} +21 -28
- package/src/x_ite/Base/X3DChildObject.js +5 -4
- package/src/x_ite/Browser/Core/BrowserOptions.js +71 -60
- package/src/x_ite/Browser/Core/Context.js +2 -2
- package/src/x_ite/Browser/Core/X3DCoreContext.js +6 -0
- package/src/x_ite/Browser/DOMIntegration.js +0 -17
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +5 -4
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +7 -4
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +20 -15
- package/src/x_ite/Browser/Shaders/Shaders.js +19 -15
- package/src/x_ite/Browser/Text/X3DTextContext.js +16 -16
- package/src/x_ite/Browser/Time/X3DTimeContext.js +3 -2
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/VolumeMaterial.js +2 -2
- package/src/x_ite/Browser/X3DBrowser.js +1 -2
- package/src/x_ite/Browser/X3DBrowserContext.js +0 -5
- package/src/x_ite/Components/Core/MetadataBoolean.js +8 -1
- package/src/x_ite/Components/Core/MetadataDouble.js +8 -1
- package/src/x_ite/Components/Core/MetadataFloat.js +8 -1
- package/src/x_ite/Components/Core/MetadataInteger.js +8 -1
- package/src/x_ite/Components/Core/MetadataSet.js +8 -1
- package/src/x_ite/Components/Core/MetadataString.js +8 -1
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +9 -6
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +2 -1
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +5 -1
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +2 -0
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +34 -2
- package/src/x_ite/Components/HAnim/HAnimMotion.js +331 -15
- package/src/x_ite/Components/Lighting/DirectionalLight.js +1 -3
- package/src/x_ite/Components/Lighting/PointLight.js +1 -3
- package/src/x_ite/Components/Lighting/SpotLight.js +1 -3
- package/src/x_ite/Components/Networking/X3DUrlObject.js +5 -4
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +47 -51
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +4 -2
- package/src/x_ite/Components/RigidBodyPhysics/Contact.js +1 -1
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +1 -1
- package/src/x_ite/Components/Shape/FillProperties.js +4 -0
- package/src/x_ite/Components/Shape/LineProperties.js +4 -0
- package/src/x_ite/Components/Shape/PointProperties.js +4 -0
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +44 -20
- package/src/x_ite/Components/Sound/AudioClip.js +2 -1
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +13 -23
- package/src/x_ite/Components/Texturing/ImageTexture.js +2 -1
- package/src/x_ite/Components/Texturing/MovieTexture.js +2 -1
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +2 -1
- package/src/x_ite/Components/Time/TimeSensor.js +25 -24
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +5 -4
- package/src/x_ite/Execution/BindableList.js +3 -3
- package/src/x_ite/Execution/X3DScene.js +2 -0
- package/src/x_ite/Parser/XMLParser.js +12 -2
- package/src/x_ite/Rendering/MultiSampleFrameBuffer.js +264 -26
- package/src/x_ite/Rendering/PointingBuffer.js +5 -7
- package/src/x_ite/Rendering/TextureBuffer.js +6 -14
- package/src/x_ite/Rendering/X3DRenderObject.js +28 -28
- package/src/x_ite/X3D.js +0 -1
- package/src/x_ite/X3DCanvasElement.js +2 -0
- package/src/x_ite.html +23 -24
- package/x_ite.min.html +23 -24
- /package/build/{bin → docs}/tags.pl +0 -0
|
@@ -143,7 +143,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, X3DBrowserContext
|
|
|
143
143
|
` WebGL version: ${this .getWebGLVersion ()}\n` +
|
|
144
144
|
` Shading language: ${this .getShadingLanguageVersion ()}\n` +
|
|
145
145
|
` Rendering Properties\n` +
|
|
146
|
-
` Antialiased: ${this .
|
|
146
|
+
` Antialiased: ${this .getRenderingProperty ("Antialiased")}\n` +
|
|
147
147
|
` Max samples: ${this .getMaxSamples ()}\n` +
|
|
148
148
|
` Depth size: ${this .getDepthSize ()} bits\n` +
|
|
149
149
|
` Color depth: ${this .getColorDepth ()} bits\n` +
|
|
@@ -432,7 +432,6 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, X3DBrowserContext
|
|
|
432
432
|
// Replace.
|
|
433
433
|
|
|
434
434
|
this .setDescription ("");
|
|
435
|
-
this .getBrowserOptions () .configure ();
|
|
436
435
|
this .setBrowserLoading (true);
|
|
437
436
|
this ._loadCount .addInterest ("checkLoadCount", this, resolve);
|
|
438
437
|
|
|
@@ -301,13 +301,8 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, X3DBaseNod
|
|
|
301
301
|
this .addTaintedField (this ._displayEvents);
|
|
302
302
|
this [_processEvents] ();
|
|
303
303
|
|
|
304
|
-
const gl = this .getContext ();
|
|
305
|
-
|
|
306
304
|
this .getFrameBuffer () .bind ();
|
|
307
305
|
|
|
308
|
-
gl .clearColor (0, 0, 0, 0);
|
|
309
|
-
gl .clear (gl .COLOR_BUFFER_BIT);
|
|
310
|
-
|
|
311
306
|
this [_world] .traverse (TraverseType .DISPLAY);
|
|
312
307
|
|
|
313
308
|
this .getFrameBuffer () .blit ();
|
|
@@ -68,6 +68,13 @@ Object .assign (Object .setPrototypeOf (MetadataBoolean .prototype, X3DNode .pro
|
|
|
68
68
|
X3DNode .prototype .initialize .call (this);
|
|
69
69
|
X3DMetadataObject .prototype .initialize .call (this);
|
|
70
70
|
},
|
|
71
|
+
getContainerField (parser = false)
|
|
72
|
+
{
|
|
73
|
+
if (parser && this .getExecutionContext () .getSpecificationVersion () <= 3.3)
|
|
74
|
+
return "metadata";
|
|
75
|
+
|
|
76
|
+
return X3DNode .prototype .getContainerField .call (this);
|
|
77
|
+
},
|
|
71
78
|
dispose ()
|
|
72
79
|
{
|
|
73
80
|
X3DMetadataObject .prototype .dispose .call (this);
|
|
@@ -89,7 +96,7 @@ Object .defineProperties (MetadataBoolean,
|
|
|
89
96
|
},
|
|
90
97
|
containerField:
|
|
91
98
|
{
|
|
92
|
-
value: "
|
|
99
|
+
value: "value",
|
|
93
100
|
enumerable: true,
|
|
94
101
|
},
|
|
95
102
|
specificationRange:
|
|
@@ -68,6 +68,13 @@ Object .assign (Object .setPrototypeOf (MetadataDouble .prototype, X3DNode .prot
|
|
|
68
68
|
X3DNode .prototype .initialize .call (this);
|
|
69
69
|
X3DMetadataObject .prototype .initialize .call (this);
|
|
70
70
|
},
|
|
71
|
+
getContainerField (parser = false)
|
|
72
|
+
{
|
|
73
|
+
if (parser && this .getExecutionContext () .getSpecificationVersion () <= 3.3)
|
|
74
|
+
return "metadata";
|
|
75
|
+
|
|
76
|
+
return X3DNode .prototype .getContainerField .call (this);
|
|
77
|
+
},
|
|
71
78
|
dispose ()
|
|
72
79
|
{
|
|
73
80
|
X3DMetadataObject .prototype .dispose .call (this);
|
|
@@ -89,7 +96,7 @@ Object .defineProperties (MetadataDouble,
|
|
|
89
96
|
},
|
|
90
97
|
containerField:
|
|
91
98
|
{
|
|
92
|
-
value: "
|
|
99
|
+
value: "value",
|
|
93
100
|
enumerable: true,
|
|
94
101
|
},
|
|
95
102
|
specificationRange:
|
|
@@ -68,6 +68,13 @@ Object .assign (Object .setPrototypeOf (MetadataFloat .prototype, X3DNode .proto
|
|
|
68
68
|
X3DNode .prototype .initialize .call (this);
|
|
69
69
|
X3DMetadataObject .prototype .initialize .call (this);
|
|
70
70
|
},
|
|
71
|
+
getContainerField (parser = false)
|
|
72
|
+
{
|
|
73
|
+
if (parser && this .getExecutionContext () .getSpecificationVersion () <= 3.3)
|
|
74
|
+
return "metadata";
|
|
75
|
+
|
|
76
|
+
return X3DNode .prototype .getContainerField .call (this);
|
|
77
|
+
},
|
|
71
78
|
dispose ()
|
|
72
79
|
{
|
|
73
80
|
X3DMetadataObject .prototype .dispose .call (this);
|
|
@@ -89,7 +96,7 @@ Object .defineProperties (MetadataFloat,
|
|
|
89
96
|
},
|
|
90
97
|
containerField:
|
|
91
98
|
{
|
|
92
|
-
value: "
|
|
99
|
+
value: "value",
|
|
93
100
|
enumerable: true,
|
|
94
101
|
},
|
|
95
102
|
specificationRange:
|
|
@@ -68,6 +68,13 @@ Object .assign (Object .setPrototypeOf (MetadataInteger .prototype, X3DNode .pro
|
|
|
68
68
|
X3DNode .prototype .initialize .call (this);
|
|
69
69
|
X3DMetadataObject .prototype .initialize .call (this);
|
|
70
70
|
},
|
|
71
|
+
getContainerField (parser = false)
|
|
72
|
+
{
|
|
73
|
+
if (parser && this .getExecutionContext () .getSpecificationVersion () <= 3.3)
|
|
74
|
+
return "metadata";
|
|
75
|
+
|
|
76
|
+
return X3DNode .prototype .getContainerField .call (this);
|
|
77
|
+
},
|
|
71
78
|
dispose ()
|
|
72
79
|
{
|
|
73
80
|
X3DMetadataObject .prototype .dispose .call (this);
|
|
@@ -89,7 +96,7 @@ Object .defineProperties (MetadataInteger,
|
|
|
89
96
|
},
|
|
90
97
|
containerField:
|
|
91
98
|
{
|
|
92
|
-
value: "
|
|
99
|
+
value: "value",
|
|
93
100
|
enumerable: true,
|
|
94
101
|
},
|
|
95
102
|
specificationRange:
|
|
@@ -68,6 +68,13 @@ Object .assign (Object .setPrototypeOf (MetadataSet .prototype, X3DNode .prototy
|
|
|
68
68
|
X3DNode .prototype .initialize .call (this);
|
|
69
69
|
X3DMetadataObject .prototype .initialize .call (this);
|
|
70
70
|
},
|
|
71
|
+
getContainerField (parser = false)
|
|
72
|
+
{
|
|
73
|
+
if (parser && this .getExecutionContext () .getSpecificationVersion () <= 3.3)
|
|
74
|
+
return "metadata";
|
|
75
|
+
|
|
76
|
+
return X3DNode .prototype .getContainerField .call (this);
|
|
77
|
+
},
|
|
71
78
|
dispose ()
|
|
72
79
|
{
|
|
73
80
|
X3DMetadataObject .prototype .dispose .call (this);
|
|
@@ -89,7 +96,7 @@ Object .defineProperties (MetadataSet,
|
|
|
89
96
|
},
|
|
90
97
|
containerField:
|
|
91
98
|
{
|
|
92
|
-
value: "
|
|
99
|
+
value: "value",
|
|
93
100
|
enumerable: true,
|
|
94
101
|
},
|
|
95
102
|
specificationRange:
|
|
@@ -68,6 +68,13 @@ Object .assign (Object .setPrototypeOf (MetadataString .prototype, X3DNode .prot
|
|
|
68
68
|
X3DNode .prototype .initialize .call (this);
|
|
69
69
|
X3DMetadataObject .prototype .initialize .call (this);
|
|
70
70
|
},
|
|
71
|
+
getContainerField (parser = false)
|
|
72
|
+
{
|
|
73
|
+
if (parser && this .getExecutionContext () .getSpecificationVersion () <= 3.3)
|
|
74
|
+
return "metadata";
|
|
75
|
+
|
|
76
|
+
return X3DNode .prototype .getContainerField .call (this);
|
|
77
|
+
},
|
|
71
78
|
dispose ()
|
|
72
79
|
{
|
|
73
80
|
X3DMetadataObject .prototype .dispose .call (this);
|
|
@@ -89,7 +96,7 @@ Object .defineProperties (MetadataString,
|
|
|
89
96
|
},
|
|
90
97
|
containerField:
|
|
91
98
|
{
|
|
92
|
-
value: "
|
|
99
|
+
value: "value",
|
|
93
100
|
enumerable: true,
|
|
94
101
|
},
|
|
95
102
|
specificationRange:
|
|
@@ -92,6 +92,10 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
|
|
|
92
92
|
protoNode = this [_protoNode],
|
|
93
93
|
proto = protoNode .getProtoDeclaration ();
|
|
94
94
|
|
|
95
|
+
// Assign field definitions.
|
|
96
|
+
|
|
97
|
+
this [_fieldDefinitions] .assign (protoNode .getFieldDefinitions ());
|
|
98
|
+
|
|
95
99
|
// If there is a proto, the externproto is completely loaded.
|
|
96
100
|
|
|
97
101
|
if (protoNode .isExternProto)
|
|
@@ -171,10 +175,6 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
|
|
|
171
175
|
},
|
|
172
176
|
update ()
|
|
173
177
|
{
|
|
174
|
-
// Assign field definitions.
|
|
175
|
-
|
|
176
|
-
this [_fieldDefinitions] .assign (this [_protoNode] .getFieldDefinitions ());
|
|
177
|
-
|
|
178
178
|
// Remove old fields.
|
|
179
179
|
|
|
180
180
|
const
|
|
@@ -188,7 +188,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
|
|
|
188
188
|
|
|
189
189
|
this [_protoFields] = new Map (Array .from (this [_protoNode] .getUserDefinedFields (), f => [f, f .getName ()]));
|
|
190
190
|
|
|
191
|
-
for (const fieldDefinition of this .getFieldDefinitions ())
|
|
191
|
+
for (const fieldDefinition of this [_protoNode] .getFieldDefinitions ())
|
|
192
192
|
this .addPredefinedField (fieldDefinition);
|
|
193
193
|
|
|
194
194
|
// Reuse old fields, and therefor routes.
|
|
@@ -204,6 +204,9 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
|
|
|
204
204
|
newField = this .getPredefinedFields () .get (protoField .getName ()),
|
|
205
205
|
oldField = oldFields .get (oldFieldName);
|
|
206
206
|
|
|
207
|
+
if (!oldField)
|
|
208
|
+
continue;
|
|
209
|
+
|
|
207
210
|
oldField .addParent (this);
|
|
208
211
|
oldField .setAccessType (newField .getAccessType ());
|
|
209
212
|
oldField .setName (newField .getName ());
|
|
@@ -246,7 +249,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, X3DNode
|
|
|
246
249
|
|
|
247
250
|
protoNode ._name_changed .addFieldInterest (this ._typeName_changed);
|
|
248
251
|
|
|
249
|
-
this .construct ();
|
|
252
|
+
protoNode === oldProtoNode ? this .construct () : this .update ();
|
|
250
253
|
},
|
|
251
254
|
getBody ()
|
|
252
255
|
{
|
|
@@ -53,6 +53,7 @@ import X3DUrlObject from "../Networking/X3DUrlObject.js";
|
|
|
53
53
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
54
54
|
import Vector2 from "../../../standard/Math/Numbers/Vector2.js";
|
|
55
55
|
import Algorithm from "../../../standard/Math/Algorithm.js";
|
|
56
|
+
import Time from "../../../standard/Time/Time.js";
|
|
56
57
|
import DEVELOPMENT from "../../DEVELOPMENT.js";
|
|
57
58
|
|
|
58
59
|
const defaultData = new Uint8Array ([ 255, 255, 255, 255 ]);
|
|
@@ -128,7 +129,7 @@ Object .assign (Object .setPrototypeOf (ImageCubeMapTexture .prototype, X3DEnvir
|
|
|
128
129
|
if (this .URL .protocol !== "data:")
|
|
129
130
|
{
|
|
130
131
|
if (!this .getCache ())
|
|
131
|
-
this .URL .searchParams .set ("_",
|
|
132
|
+
this .URL .searchParams .set ("_", Time .now ());
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
this .image .attr ("src", this .URL .href);
|
|
@@ -466,8 +466,8 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, X3DBindabl
|
|
|
466
466
|
|
|
467
467
|
// Setup context.
|
|
468
468
|
|
|
469
|
-
gl .depthMask (false);
|
|
470
469
|
gl .disable (gl .DEPTH_TEST);
|
|
470
|
+
gl .depthMask (false);
|
|
471
471
|
gl .enable (gl .CULL_FACE);
|
|
472
472
|
gl .frontFace (gl .CCW);
|
|
473
473
|
|
|
@@ -492,6 +492,10 @@ Object .assign (Object .setPrototypeOf (X3DBackgroundNode .prototype, X3DBindabl
|
|
|
492
492
|
|
|
493
493
|
if (+this .textureBits)
|
|
494
494
|
this .drawCube (renderObject);
|
|
495
|
+
|
|
496
|
+
gl .depthMask (true);
|
|
497
|
+
gl .enable (gl .DEPTH_TEST);
|
|
498
|
+
gl .disable (gl .BLEND);
|
|
495
499
|
};
|
|
496
500
|
})(),
|
|
497
501
|
drawSphere (renderObject)
|
|
@@ -287,6 +287,7 @@ Object .assign (Object .setPrototypeOf (X3DGroupingNode .prototype, X3DChildNode
|
|
|
287
287
|
}
|
|
288
288
|
case X3DConstants .BooleanFilter:
|
|
289
289
|
case X3DConstants .BooleanToggle:
|
|
290
|
+
case X3DConstants .HAnimMotion:
|
|
290
291
|
case X3DConstants .NurbsOrientationInterpolator:
|
|
291
292
|
case X3DConstants .NurbsPositionInterpolator:
|
|
292
293
|
case X3DConstants .NurbsSurfaceInterpolator:
|
|
@@ -425,6 +426,7 @@ Object .assign (Object .setPrototypeOf (X3DGroupingNode .prototype, X3DChildNode
|
|
|
425
426
|
}
|
|
426
427
|
case X3DConstants .BooleanFilter:
|
|
427
428
|
case X3DConstants .BooleanToggle:
|
|
429
|
+
case X3DConstants .HAnimMotion:
|
|
428
430
|
case X3DConstants .NurbsOrientationInterpolator:
|
|
429
431
|
case X3DConstants .NurbsPositionInterpolator:
|
|
430
432
|
case X3DConstants .NurbsSurfaceInterpolator:
|
|
@@ -77,6 +77,7 @@ function HAnimHumanoid (executionContext)
|
|
|
77
77
|
this .viewpointsNode = new Group (executionContext);
|
|
78
78
|
this .skinNode = new Group (executionContext);
|
|
79
79
|
this .transformNode = new Transform (executionContext);
|
|
80
|
+
this .motionNodes = [ ];
|
|
80
81
|
this .jointNodes = [ ];
|
|
81
82
|
this .jointBindingMatrices = [ ];
|
|
82
83
|
this .displacementWeights = [ ];
|
|
@@ -184,15 +185,18 @@ Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, X3DChildNode .
|
|
|
184
185
|
|
|
185
186
|
// Events
|
|
186
187
|
|
|
187
|
-
this .
|
|
188
|
+
this ._motionsEnabled .addInterest ("set_motions__", this);
|
|
189
|
+
this ._motions .addInterest ("set_motions__", this);
|
|
188
190
|
this ._jointBindingPositions .addInterest ("set_joints__", this);
|
|
189
191
|
this ._jointBindingRotations .addInterest ("set_joints__", this);
|
|
190
192
|
this ._jointBindingScales .addInterest ("set_joints__", this);
|
|
193
|
+
this ._joints .addInterest ("set_joints__", this);
|
|
191
194
|
this ._jointTextures .addInterest ("set_jointTextures__", this);
|
|
192
195
|
this ._displacementsTexture .addInterest ("set_displacementsTexture__", this);
|
|
193
196
|
this ._displacementWeightsTexture .addInterest ("set_displacementWeightsTexture__", this);
|
|
194
197
|
this ._skinCoord .addInterest ("set_skinCoord__", this);
|
|
195
198
|
|
|
199
|
+
this .set_motions__ ();
|
|
196
200
|
this .set_joints__ ();
|
|
197
201
|
this .set_skinCoord__ ();
|
|
198
202
|
},
|
|
@@ -204,6 +208,31 @@ Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, X3DChildNode .
|
|
|
204
208
|
{
|
|
205
209
|
return this .transformNode .getMatrix ();
|
|
206
210
|
},
|
|
211
|
+
set_motions__ ()
|
|
212
|
+
{
|
|
213
|
+
const
|
|
214
|
+
motionsEnabled = this ._motionsEnabled,
|
|
215
|
+
motionNodes = this .motionNodes;
|
|
216
|
+
|
|
217
|
+
for (const motionNode of motionNodes)
|
|
218
|
+
motionNode .setJoints ([ ]);
|
|
219
|
+
|
|
220
|
+
motionNodes .length = 0;
|
|
221
|
+
|
|
222
|
+
for (const [i, node] of this ._motions .entries ())
|
|
223
|
+
{
|
|
224
|
+
if (i < motionsEnabled .length && !motionsEnabled [i])
|
|
225
|
+
continue;
|
|
226
|
+
|
|
227
|
+
const motionNode = X3DCast (X3DConstants .HAnimMotion, node);
|
|
228
|
+
|
|
229
|
+
if (motionNode)
|
|
230
|
+
motionNodes .push (motionNode);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
for (const motionNode of motionNodes)
|
|
234
|
+
motionNode .setJoints (this .jointNodes);
|
|
235
|
+
},
|
|
207
236
|
set_joints__ ()
|
|
208
237
|
{
|
|
209
238
|
const
|
|
@@ -263,6 +292,9 @@ Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, X3DChildNode .
|
|
|
263
292
|
this ._jointTextures .addEvent ();
|
|
264
293
|
this ._displacementsTexture .addEvent ();
|
|
265
294
|
this ._displacementWeightsTexture .addEvent ();
|
|
295
|
+
|
|
296
|
+
for (const motionNode of this .motionNodes)
|
|
297
|
+
motionNode .setJoints (jointNodes);
|
|
266
298
|
},
|
|
267
299
|
set_jointTextures__ ()
|
|
268
300
|
{
|
|
@@ -326,7 +358,7 @@ Object .assign (Object .setPrototypeOf (HAnimHumanoid .prototype, X3DChildNode .
|
|
|
326
358
|
const d = displacerNode ._displacements;
|
|
327
359
|
|
|
328
360
|
for (const [i, index] of displacerNode ._coordIndex .entries ())
|
|
329
|
-
displacements [index] ?.push (... d [i]);
|
|
361
|
+
displacements [index] ?.push (... d [i], j);
|
|
330
362
|
}
|
|
331
363
|
}
|
|
332
364
|
|