x_ite 8.6.17 → 8.6.19
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/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 +28 -28
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -21
- 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 -39
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +18 -18
- 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 +27 -27
- 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 +23 -25
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +25 -26
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +20 -20
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +121 -195
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +30 -31
- 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 +174 -174
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +35 -33
- 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/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +512 -519
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/_posts/getting-started.md +1 -1
- package/docs/_posts/reference/prototype-services.md +2 -2
- package/docs/_posts/setup-a-localhost-server.md +2 -2
- package/package.json +4 -4
- package/src/example.html +1 -1
- package/src/standard/Math/Algorithm.js +1 -1
- package/src/standard/Math/Algorithms/MergeSort.js +7 -5
- package/src/standard/Math/Algorithms/PartialSort.js +3 -1
- package/src/standard/Math/Algorithms/QuickSort.js +1 -3
- package/src/standard/Math/Geometry/Box2.js +1 -1
- package/src/standard/Math/Geometry/Box3.js +1 -1
- package/src/standard/Math/Numbers/Quaternion.js +4 -3
- package/src/standard/Math/Numbers/Rotation4.js +4 -3
- package/src/x_ite/Base/X3DBaseNode.js +9 -24
- package/src/x_ite/Base/X3DEventObject.js +4 -3
- package/src/x_ite/Base/X3DField.js +19 -20
- package/src/x_ite/Base/X3DObject.js +5 -1
- package/src/x_ite/Base/X3DObjectArrayField.js +12 -11
- package/src/x_ite/Base/X3DTypedArrayField.js +3 -3
- package/src/x_ite/Browser/Core/Context.js +1 -1
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +1 -1
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +14 -9
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +2 -2
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +2 -2
- package/src/x_ite/Browser/X3DBrowser.js +44 -77
- package/src/x_ite/Browser/X3DBrowserContext.js +3 -3
- package/src/x_ite/Components/Core/X3DNode.js +2 -2
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +3 -8
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +3 -3
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +0 -8
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +14 -12
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +3 -3
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoMetadata.js +0 -6
- package/src/x_ite/Components/Networking/Anchor.js +36 -33
- package/src/x_ite/Components/Networking/Inline.js +3 -3
- package/src/x_ite/Components/Networking/X3DUrlObject.js +74 -23
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +6 -5
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +2 -2
- package/src/x_ite/Components/Scripting/Script.js +93 -167
- package/src/x_ite/Components/Shaders/ComposedShader.js +3 -18
- package/src/x_ite/Components/Shaders/PackagedShader.js +0 -2
- package/src/x_ite/Components/Shaders/ShaderPart.js +4 -4
- package/src/x_ite/Components/Shaders/ShaderProgram.js +0 -2
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +4 -5
- package/src/x_ite/Components/Sound/AudioClip.js +6 -6
- package/src/x_ite/Components/Sound/DynamicsCompressor.js +4 -4
- package/src/x_ite/Components/Text/Text.js +2 -3
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +4 -4
- package/src/x_ite/Components/Texturing/ImageTexture.js +3 -3
- package/src/x_ite/Components/Texturing/MovieTexture.js +6 -6
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +3 -3
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +3 -3
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +31 -25
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +11 -9
- package/src/x_ite/Execution/Scene.js +1 -1
- package/src/x_ite/Execution/X3DExecutionContext.js +30 -32
- package/src/x_ite/Execution/X3DScene.js +6 -6
- package/src/x_ite/Fields/ArrayFields.js +2 -1
- package/src/x_ite/Fields/SFImage.js +0 -1
- package/src/x_ite/Fields/SFNode.js +9 -8
- package/src/x_ite/Fields/SFRotation.js +2 -4
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +3 -3
- package/src/x_ite/InputOutput/FileLoader.js +3 -4
- package/src/x_ite/InputOutput/Generator.js +1 -1
- package/src/x_ite/Parser/GLTF2Parser.js +45 -45
- package/src/x_ite/Parser/VRMLParser.js +2 -2
- package/src/x_ite/Parser/X3DParser.js +4 -4
- package/src/x_ite/Parser/XMLParser.js +16 -22
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +2 -2
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
- package/docs/_tabs/imprint.md +0 -52
|
@@ -105,7 +105,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
105
105
|
{
|
|
106
106
|
X3DBaseNode .prototype .initialize .call (this);
|
|
107
107
|
|
|
108
|
-
if (!
|
|
108
|
+
if (!this .isScene ())
|
|
109
109
|
this ._sceneGraph_changed .addInterest ("set_sceneGraph", this)
|
|
110
110
|
},
|
|
111
111
|
set_sceneGraph: function ()
|
|
@@ -141,13 +141,13 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
141
141
|
{
|
|
142
142
|
return this .getExecutionContext () .getProfile ();
|
|
143
143
|
},
|
|
144
|
-
|
|
144
|
+
hasComponent: function (name)
|
|
145
145
|
{
|
|
146
|
-
return this .getExecutionContext () .
|
|
146
|
+
return this .getExecutionContext () .hasComponent (name);
|
|
147
147
|
},
|
|
148
|
-
|
|
148
|
+
getComponents: function ()
|
|
149
149
|
{
|
|
150
|
-
return this .getExecutionContext () .
|
|
150
|
+
return this .getExecutionContext () .getComponents ();
|
|
151
151
|
},
|
|
152
152
|
fromUnit: function (category, value)
|
|
153
153
|
{
|
|
@@ -161,7 +161,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
161
161
|
{
|
|
162
162
|
return this .getExecutionContext () .getUnits ();
|
|
163
163
|
},
|
|
164
|
-
createNode: function (typeName,
|
|
164
|
+
createNode: function (typeName, setup = true /* non-public argument */)
|
|
165
165
|
{
|
|
166
166
|
typeName = String (typeName);
|
|
167
167
|
|
|
@@ -169,7 +169,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
169
169
|
{
|
|
170
170
|
const Type = this .getBrowser () .getSupportedNode (typeName);
|
|
171
171
|
|
|
172
|
-
if (!
|
|
172
|
+
if (!Type)
|
|
173
173
|
return null;
|
|
174
174
|
|
|
175
175
|
const specificationRange = Type .prototype .getSpecificationRange ();
|
|
@@ -180,7 +180,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
180
180
|
if (this .getSpecificationVersion () > specificationRange [1])
|
|
181
181
|
return null;
|
|
182
182
|
|
|
183
|
-
if (
|
|
183
|
+
if (!this .hasComponent (Type .prototype .getComponentName ()))
|
|
184
184
|
console .warn (`Node type '${typeName}' does not match component/profile statements in '${this .getWorldURL ()}'.`);
|
|
185
185
|
|
|
186
186
|
return new Type (this);
|
|
@@ -189,7 +189,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
189
189
|
{
|
|
190
190
|
const Type = this .getBrowser () .getSupportedNode (typeName);
|
|
191
191
|
|
|
192
|
-
if (!
|
|
192
|
+
if (!Type)
|
|
193
193
|
throw new Error (`Unknown node type '${typeName}'.`);
|
|
194
194
|
|
|
195
195
|
const specificationRange = Type .prototype .getSpecificationRange ();
|
|
@@ -200,7 +200,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
200
200
|
if (this .getSpecificationVersion () > specificationRange [1])
|
|
201
201
|
throw new Error (`Node type '${typeName}' does not match specification version in '${this .getWorldURL ()}.`);
|
|
202
202
|
|
|
203
|
-
if (
|
|
203
|
+
if (!this .hasComponent (Type .prototype .getComponentName ()))
|
|
204
204
|
console .warn (`Node type '${typeName}' does not match component/profile statements in '${this .getWorldURL ()}'.`);
|
|
205
205
|
|
|
206
206
|
const baseNode = new Type (this);
|
|
@@ -210,7 +210,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
210
210
|
return SFNodeCache .get (baseNode);
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
|
-
createProto: function (name,
|
|
213
|
+
createProto: function (name, setup = true /* non-public argument */)
|
|
214
214
|
{
|
|
215
215
|
name = String (name);
|
|
216
216
|
|
|
@@ -221,12 +221,12 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
221
221
|
const proto = executionContext .protos .get (name);
|
|
222
222
|
|
|
223
223
|
if (proto)
|
|
224
|
-
return proto .createInstance (this,
|
|
224
|
+
return proto .createInstance (this, setup);
|
|
225
225
|
|
|
226
226
|
const externproto = executionContext .externprotos .get (name);
|
|
227
227
|
|
|
228
228
|
if (externproto)
|
|
229
|
-
return externproto .createInstance (this,
|
|
229
|
+
return externproto .createInstance (this, setup);
|
|
230
230
|
|
|
231
231
|
if (executionContext .isScene ())
|
|
232
232
|
break;
|
|
@@ -251,7 +251,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
251
251
|
name = String (name);
|
|
252
252
|
node = X3DCast (X3DConstants .X3DNode, node, false);
|
|
253
253
|
|
|
254
|
-
if (!
|
|
254
|
+
if (!node)
|
|
255
255
|
throw new Error ("Couldn't update named node: node must be of type X3DNode.");
|
|
256
256
|
|
|
257
257
|
if (node .getExecutionContext () !== this)
|
|
@@ -279,7 +279,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
279
279
|
|
|
280
280
|
const node = this [_namedNodes] .get (name);
|
|
281
281
|
|
|
282
|
-
if (!
|
|
282
|
+
if (!node)
|
|
283
283
|
return;
|
|
284
284
|
|
|
285
285
|
node .setName ("");
|
|
@@ -326,7 +326,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
326
326
|
exportedName = String (exportedName);
|
|
327
327
|
importedName = importedName === undefined ? exportedName : String (importedName);
|
|
328
328
|
|
|
329
|
-
if (!
|
|
329
|
+
if (!inlineNode)
|
|
330
330
|
throw new Error ("Node must be of type Inline node.");
|
|
331
331
|
|
|
332
332
|
if (inlineNode .getExecutionContext () !== this)
|
|
@@ -354,7 +354,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
354
354
|
|
|
355
355
|
const importedNode = this [_importedNodes] .get (importedName);
|
|
356
356
|
|
|
357
|
-
if (!
|
|
357
|
+
if (!importedNode)
|
|
358
358
|
return;
|
|
359
359
|
|
|
360
360
|
importedNode .dispose ();
|
|
@@ -400,7 +400,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
400
400
|
{
|
|
401
401
|
node = X3DCast (X3DConstants .X3DNode, node, false);
|
|
402
402
|
|
|
403
|
-
if (!
|
|
403
|
+
if (!node)
|
|
404
404
|
throw new Error ("Couldn't get local name: node must be of type X3DNode.");
|
|
405
405
|
|
|
406
406
|
if (node .getExecutionContext () === this)
|
|
@@ -441,7 +441,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
441
441
|
{
|
|
442
442
|
name = String (name);
|
|
443
443
|
|
|
444
|
-
if (!
|
|
444
|
+
if (!(proto instanceof X3DProtoDeclaration))
|
|
445
445
|
throw new Error ("Couldn't add proto declaration: proto must be of type X3DProtoDeclaration.");
|
|
446
446
|
|
|
447
447
|
if (this [_protos] .get (name))
|
|
@@ -461,7 +461,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
461
461
|
{
|
|
462
462
|
name = String (name);
|
|
463
463
|
|
|
464
|
-
if (!
|
|
464
|
+
if (!(proto instanceof X3DProtoDeclaration))
|
|
465
465
|
throw new Error ("Couldn't add proto declaration: proto must be of type X3DProtoDeclaration.");
|
|
466
466
|
|
|
467
467
|
name = String (name);
|
|
@@ -505,7 +505,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
505
505
|
{
|
|
506
506
|
name = String (name);
|
|
507
507
|
|
|
508
|
-
if (!
|
|
508
|
+
if (!(externproto instanceof X3DExternProtoDeclaration))
|
|
509
509
|
throw new Error ("Couldn't add extern proto declaration: extern proto must be of type X3DExternProtoDeclaration.");
|
|
510
510
|
|
|
511
511
|
if (this [_externprotos] .get (name))
|
|
@@ -525,7 +525,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
525
525
|
{
|
|
526
526
|
name = String (name);
|
|
527
527
|
|
|
528
|
-
if (!
|
|
528
|
+
if (!(externproto instanceof X3DExternProtoDeclaration))
|
|
529
529
|
throw new Error ("Couldn't add extern proto declaration: extern proto must be of type X3DExternProtoDeclaration.");
|
|
530
530
|
|
|
531
531
|
name = String (name);
|
|
@@ -561,10 +561,10 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
561
561
|
destinationNode = X3DCast (X3DConstants .X3DNode, destinationNode, false);
|
|
562
562
|
destinationField = String (destinationField);
|
|
563
563
|
|
|
564
|
-
if (!
|
|
564
|
+
if (!sourceNode)
|
|
565
565
|
throw new Error ("Bad ROUTE specification: source node must be of type X3DNode.");
|
|
566
566
|
|
|
567
|
-
if (!
|
|
567
|
+
if (!destinationNode)
|
|
568
568
|
throw new Error ("Bad ROUTE specification: destination node must be of type X3DNode.");
|
|
569
569
|
|
|
570
570
|
// Imported nodes handling.
|
|
@@ -629,10 +629,10 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
629
629
|
sourceField = sourceNode .getField (sourceField),
|
|
630
630
|
destinationField = destinationNode .getField (destinationField);
|
|
631
631
|
|
|
632
|
-
if (!
|
|
632
|
+
if (!sourceField .isOutput ())
|
|
633
633
|
throw new Error ("Field named '" + sourceField .getName () + "' in node named '" + sourceNode .getName () + "' of type " + sourceNode .getTypeName () + " is not an output field.");
|
|
634
634
|
|
|
635
|
-
if (!
|
|
635
|
+
if (!destinationField .isInput ())
|
|
636
636
|
throw new Error ("Field named '" + destinationField .getName () + "' in node named '" + destinationNode .getName () + "' of type " + destinationNode .getTypeName () + " is not an input field.");
|
|
637
637
|
|
|
638
638
|
if (sourceField .getType () !== destinationField .getType ())
|
|
@@ -665,7 +665,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
665
665
|
{
|
|
666
666
|
route = this .getRoute .apply (this, arguments);
|
|
667
667
|
|
|
668
|
-
if (!
|
|
668
|
+
if (!route)
|
|
669
669
|
return false;
|
|
670
670
|
}
|
|
671
671
|
|
|
@@ -745,10 +745,10 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
745
745
|
destinationNode = X3DCast (X3DConstants .X3DNode, destinationNode, false);
|
|
746
746
|
destinationField = String (destinationField)
|
|
747
747
|
|
|
748
|
-
if (!
|
|
748
|
+
if (!sourceNode)
|
|
749
749
|
throw new Error ("Bad ROUTE specification: sourceNode must be of type X3DNode.");
|
|
750
750
|
|
|
751
|
-
if (!
|
|
751
|
+
if (!destinationNode)
|
|
752
752
|
throw new Error ("Bad ROUTE specification: destinationNode must be of type X3DNode.");
|
|
753
753
|
|
|
754
754
|
sourceField = sourceNode .getField (sourceField);
|
|
@@ -930,9 +930,7 @@ X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
930
930
|
},
|
|
931
931
|
dispose: function ()
|
|
932
932
|
{
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
for (const route of this [_routes])
|
|
933
|
+
for (const route of [... this [_routes]])
|
|
936
934
|
this .deleteRoute (route);
|
|
937
935
|
|
|
938
936
|
X3DBaseNode .prototype .dispose .call (this);
|
|
@@ -153,15 +153,19 @@ X3DScene .prototype = Object .assign (Object .create (X3DExecutionContext .proto
|
|
|
153
153
|
{
|
|
154
154
|
return this [_profile];
|
|
155
155
|
},
|
|
156
|
+
hasComponent: function (name)
|
|
157
|
+
{
|
|
158
|
+
return (this [_profile] ?.components .has (name) ?? true) || this [_components] .has (name);
|
|
159
|
+
},
|
|
156
160
|
addComponent: function (component)
|
|
157
161
|
{
|
|
158
162
|
this [_components] .add (component .name, component);
|
|
159
163
|
|
|
160
164
|
this ._components_changed = this .getBrowser () .getCurrentTime ();
|
|
161
165
|
},
|
|
162
|
-
removeComponent: function (
|
|
166
|
+
removeComponent: function (name)
|
|
163
167
|
{
|
|
164
|
-
this [_components] .remove (
|
|
168
|
+
this [_components] .remove (name);
|
|
165
169
|
|
|
166
170
|
this ._components_changed = this .getBrowser () .getCurrentTime ();
|
|
167
171
|
},
|
|
@@ -169,10 +173,6 @@ X3DScene .prototype = Object .assign (Object .create (X3DExecutionContext .proto
|
|
|
169
173
|
{
|
|
170
174
|
return this [_components];
|
|
171
175
|
},
|
|
172
|
-
hasComponent: function (componentName)
|
|
173
|
-
{
|
|
174
|
-
return (this [_profile] ?.components .has (componentName) ?? true) || this [_components] .has (componentName);
|
|
175
|
-
},
|
|
176
176
|
updateUnit: function (category, name, conversionFactor)
|
|
177
177
|
{
|
|
178
178
|
// Private function.
|
|
@@ -409,7 +409,8 @@ MFNode .prototype = Object .assign (Object .create (X3DObjectArrayField .prototy
|
|
|
409
409
|
{
|
|
410
410
|
const target = this .getTarget ();
|
|
411
411
|
|
|
412
|
-
target .resize (0);
|
|
412
|
+
target .resize (0, undefined, true);
|
|
413
|
+
target .processInterests ();
|
|
413
414
|
|
|
414
415
|
X3DObjectArrayField .prototype .dispose .call (target);
|
|
415
416
|
},
|
|
@@ -67,7 +67,8 @@ const handler =
|
|
|
67
67
|
return value;
|
|
68
68
|
|
|
69
69
|
const
|
|
70
|
-
|
|
70
|
+
node = target .getValue (),
|
|
71
|
+
field = node .getField (key),
|
|
71
72
|
accessType = field .getAccessType ();
|
|
72
73
|
|
|
73
74
|
// Specification conform would be: accessType & X3DConstants .outputOnly.
|
|
@@ -93,13 +94,14 @@ const handler =
|
|
|
93
94
|
try
|
|
94
95
|
{
|
|
95
96
|
const
|
|
96
|
-
|
|
97
|
+
node = target .getValue (),
|
|
98
|
+
field = node .getField (key),
|
|
97
99
|
accessType = field .getAccessType ();
|
|
98
100
|
|
|
99
101
|
if (accessType !== X3DConstants .outputOnly)
|
|
100
102
|
field .setValue (value);
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
return true;
|
|
103
105
|
}
|
|
104
106
|
catch (error)
|
|
105
107
|
{
|
|
@@ -347,8 +349,7 @@ SFNode .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
|
347
349
|
|
|
348
350
|
target [_cloneCount] += count;
|
|
349
351
|
|
|
350
|
-
|
|
351
|
-
value .addCloneCount (count);
|
|
352
|
+
value ?.addCloneCount (count);
|
|
352
353
|
},
|
|
353
354
|
removeCloneCount: function (count)
|
|
354
355
|
{
|
|
@@ -358,8 +359,7 @@ SFNode .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
|
358
359
|
|
|
359
360
|
target [_cloneCount] -= count;
|
|
360
361
|
|
|
361
|
-
|
|
362
|
-
value .removeCloneCount (count);
|
|
362
|
+
value ?.removeCloneCount (count);
|
|
363
363
|
},
|
|
364
364
|
getNodeUserData: function (key)
|
|
365
365
|
{
|
|
@@ -471,7 +471,8 @@ SFNode .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
|
471
471
|
{
|
|
472
472
|
const target = this [_target];
|
|
473
473
|
|
|
474
|
-
target .
|
|
474
|
+
target .set (null);
|
|
475
|
+
target .processInterests ();
|
|
475
476
|
|
|
476
477
|
X3DField .prototype .dispose .call (target);
|
|
477
478
|
},
|
|
@@ -49,9 +49,7 @@ import X3DField from "../Base/X3DField.js";
|
|
|
49
49
|
import SFVec3 from "./SFVec3.js";
|
|
50
50
|
import SFMatrix3 from "./SFMatrix3.js";
|
|
51
51
|
import X3DConstants from "../Base/X3DConstants.js";
|
|
52
|
-
import Vector3 from "../../standard/Math/Numbers/Vector3.js";
|
|
53
52
|
import Rotation4 from "../../standard/Math/Numbers/Rotation4.js";
|
|
54
|
-
import Matrix3 from "../../standard/Math/Numbers/Matrix3.js";
|
|
55
53
|
|
|
56
54
|
const
|
|
57
55
|
SFVec3f = SFVec3 .SFVec3f,
|
|
@@ -126,7 +124,7 @@ SFRotation .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
|
126
124
|
},
|
|
127
125
|
getAxis: function ()
|
|
128
126
|
{
|
|
129
|
-
return new SFVec3f (this .getValue () .getAxis (
|
|
127
|
+
return new SFVec3f (this .getValue () .getAxis ());
|
|
130
128
|
},
|
|
131
129
|
setMatrix: function (matrix)
|
|
132
130
|
{
|
|
@@ -135,7 +133,7 @@ SFRotation .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
|
135
133
|
},
|
|
136
134
|
getMatrix: function ()
|
|
137
135
|
{
|
|
138
|
-
return new SFMatrix3f (this .getValue () .getMatrix (
|
|
136
|
+
return new SFMatrix3f (this .getValue () .getMatrix ());
|
|
139
137
|
},
|
|
140
138
|
inverse: function ()
|
|
141
139
|
{
|
|
@@ -181,9 +181,9 @@ function SFVecPrototypeTemplate (TypeName, Type, ValueType, double)
|
|
|
181
181
|
toJSONStreamValue: function (generator)
|
|
182
182
|
{
|
|
183
183
|
const
|
|
184
|
-
value
|
|
185
|
-
last
|
|
186
|
-
category
|
|
184
|
+
value = this .getValue (),
|
|
185
|
+
last = value .length - 1,
|
|
186
|
+
category = generator .Unit (this .getUnit ());
|
|
187
187
|
|
|
188
188
|
for (let i = 0; i < last; ++ i)
|
|
189
189
|
{
|
|
@@ -55,7 +55,7 @@ const
|
|
|
55
55
|
ECMAScript = /^\s*(?:vrmlscript|javascript|ecmascript)\:(.*)$/s,
|
|
56
56
|
dataURL = /^data:(.*?)(?:;charset=(.*?))?(?:;(base64))?,(.*)$/s;
|
|
57
57
|
|
|
58
|
-
const foreignExtensions = new RegExp ("\.(?:html|xhtml)$");
|
|
58
|
+
const foreignExtensions = new RegExp ("\.(?:html|htm|xhtml)$");
|
|
59
59
|
|
|
60
60
|
const foreign = {
|
|
61
61
|
"text/html": true,
|
|
@@ -167,7 +167,7 @@ FileLoader .prototype = Object .assign (Object .create (X3DObject .prototype),
|
|
|
167
167
|
|
|
168
168
|
// Wait for instances to be created.
|
|
169
169
|
|
|
170
|
-
setTimeout (
|
|
170
|
+
setTimeout (() =>
|
|
171
171
|
{
|
|
172
172
|
try
|
|
173
173
|
{
|
|
@@ -180,8 +180,7 @@ FileLoader .prototype = Object .assign (Object .create (X3DObject .prototype),
|
|
|
180
180
|
else
|
|
181
181
|
throw exception;
|
|
182
182
|
}
|
|
183
|
-
}
|
|
184
|
-
0);
|
|
183
|
+
});
|
|
185
184
|
|
|
186
185
|
if (DEBUG)
|
|
187
186
|
{
|
|
@@ -72,7 +72,7 @@ function Generator ({ style = "TIDY", precision = 7, doublePrecision = 15 })
|
|
|
72
72
|
this .units = true;
|
|
73
73
|
this .unitCategories = [ ];
|
|
74
74
|
|
|
75
|
-
this .names .set (null, new Set ());
|
|
75
|
+
this .names .set (null, Object .assign (new Set (), { index: 0 }));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
Generator .prototype =
|