x_ite 8.6.13 → 8.6.14
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 +21 -21
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +27 -27
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- 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 +23 -23
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +40 -40
- 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 +10 -10
- 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 +28 -28
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +30 -30
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +22 -22
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +37 -37
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +31 -31
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +25 -25
- 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 +32 -32
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +28 -28
- 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 +746 -683
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/package.json +1 -1
- package/src/standard/Math/Numbers/Matrix2.js +3 -3
- package/src/standard/Math/Numbers/Vector4.js +1 -0
- package/src/x_ite/Base/X3DBaseNode.js +58 -53
- package/src/x_ite/Browser/Core/BrowserOptions.js +2 -1
- package/src/x_ite/Browser/Core/X3DCoreContext.js +2 -3
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +0 -3
- package/src/x_ite/Browser/Navigation/FlyViewer.js +0 -2
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +10 -12
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +40 -21
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +19 -19
- package/src/x_ite/Components/CADGeometry/CADFace.js +8 -8
- package/src/x_ite/Components/Core/MetadataBoolean.js +4 -4
- package/src/x_ite/Components/Core/MetadataDouble.js +4 -4
- package/src/x_ite/Components/Core/MetadataFloat.js +4 -4
- package/src/x_ite/Components/Core/MetadataInteger.js +4 -4
- package/src/x_ite/Components/Core/MetadataSet.js +4 -4
- package/src/x_ite/Components/Core/MetadataString.js +4 -4
- package/src/x_ite/Components/Core/X3DNode.js +17 -16
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +11 -14
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +2 -2
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +2 -2
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +2 -2
- package/src/x_ite/Components/Followers/X3DFollowerNode.js +2 -2
- package/src/x_ite/Components/Geometry2D/Arc2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/ArcClose2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/Circle2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/Disk2D.js +1 -1
- package/src/x_ite/Components/Geometry3D/Cone.js +1 -1
- package/src/x_ite/Components/Geometry3D/Cylinder.js +1 -1
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +10 -10
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +3 -3
- package/src/x_ite/Components/Geometry3D/Sphere.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +7 -7
- package/src/x_ite/Components/Grouping/Switch.js +7 -7
- package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +2 -2
- package/src/x_ite/Components/Layering/X3DLayerNode.js +40 -49
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +4 -4
- package/src/x_ite/Components/Navigation/Collision.js +4 -4
- package/src/x_ite/Components/Navigation/LOD.js +7 -7
- package/src/x_ite/Components/Networking/Inline.js +2 -2
- package/src/x_ite/Components/Networking/X3DUrlObject.js +2 -2
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +8 -8
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +4 -4
- package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +28 -19
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +11 -11
- package/src/x_ite/Components/Rendering/LineSet.js +12 -12
- package/src/x_ite/Components/Rendering/PointSet.js +11 -11
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +14 -14
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +6 -6
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +6 -6
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +4 -4
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +7 -7
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +7 -7
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +3 -3
- package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +2 -2
- package/src/x_ite/Components/Scripting/Script.js +3 -3
- package/src/x_ite/Components/Shaders/ComposedShader.js +5 -7
- package/src/x_ite/Components/Shaders/ShaderPart.js +0 -2
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +3 -3
- package/src/x_ite/Components/Shape/Appearance.js +4 -4
- package/src/x_ite/Components/Shape/Material.js +1 -1
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +1 -1
- package/src/x_ite/Components/Shape/UnlitMaterial.js +1 -1
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +1 -1
- package/src/x_ite/Components/Shape/X3DShapeNode.js +1 -1
- package/src/x_ite/Components/Sound/AudioClip.js +2 -2
- package/src/x_ite/Components/Sound/Sound.js +2 -2
- package/src/x_ite/Components/Text/Text.js +1 -1
- package/src/x_ite/Components/Texturing/ImageTexture.js +2 -2
- package/src/x_ite/Components/Texturing/MovieTexture.js +2 -2
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +2 -2
- package/src/x_ite/Components/Time/TimeSensor.js +1 -1
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +6 -6
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +8 -8
- package/src/x_ite/Execution/BindableList.js +16 -19
- package/src/x_ite/Execution/X3DExecutionContext.js +19 -13
- package/src/x_ite/Execution/X3DScene.js +4 -0
- package/src/x_ite/Fields/ArrayFields.js +42 -22
- package/src/x_ite/Fields/SFNode.js +3 -6
- package/src/x_ite/Fields/SFNodeCache.js +34 -19
- package/src/x_ite/InputOutput/FileLoader.js +22 -14
- package/src/x_ite/Parser/GLTF2Parser.js +48 -48
- package/src/x_ite/Parser/VRMLParser.js +65 -33
- package/src/x_ite/Parser/X3DParser.js +9 -36
- package/src/x_ite/Parser/XMLParser.js +8 -8
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +2 -2
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +1 -2
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
|
@@ -106,7 +106,7 @@ CADFace .prototype = Object .assign (Object .create (X3DProductStructureChildNod
|
|
|
106
106
|
getBBox: function (bbox, shadows)
|
|
107
107
|
{
|
|
108
108
|
if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
|
|
109
|
-
return this .visibleNode?.getBBox (bbox, shadows) ?? bbox .set ();
|
|
109
|
+
return this .visibleNode ?.getBBox (bbox, shadows) ?? bbox .set ();
|
|
110
110
|
|
|
111
111
|
return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
112
112
|
},
|
|
@@ -170,11 +170,11 @@ CADFace .prototype = Object .assign (Object .create (X3DProductStructureChildNod
|
|
|
170
170
|
},
|
|
171
171
|
set_cameraObject__: function ()
|
|
172
172
|
{
|
|
173
|
-
this .setCameraObject (!!this .visibleNode?.isCameraObject ());
|
|
173
|
+
this .setCameraObject (!!this .visibleNode ?.isCameraObject ());
|
|
174
174
|
},
|
|
175
175
|
set_transformSensors__: function ()
|
|
176
176
|
{
|
|
177
|
-
this .setPickableObject (!!this .visibleNode?.isPickableObject ());
|
|
177
|
+
this .setPickableObject (!!this .visibleNode ?.isPickableObject ());
|
|
178
178
|
},
|
|
179
179
|
set_visible__: function ()
|
|
180
180
|
{
|
|
@@ -201,7 +201,7 @@ CADFace .prototype = Object .assign (Object .create (X3DProductStructureChildNod
|
|
|
201
201
|
case TraverseType .CAMERA:
|
|
202
202
|
case TraverseType .SHADOW:
|
|
203
203
|
{
|
|
204
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
204
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
207
|
case TraverseType .PICKING:
|
|
@@ -212,21 +212,21 @@ CADFace .prototype = Object .assign (Object .create (X3DProductStructureChildNod
|
|
|
212
212
|
|
|
213
213
|
pickingHierarchy .push (this);
|
|
214
214
|
|
|
215
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
215
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
216
216
|
|
|
217
217
|
pickingHierarchy .pop ();
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
case TraverseType .COLLISION:
|
|
221
221
|
{
|
|
222
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
222
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
225
|
case TraverseType .DISPLAY:
|
|
226
226
|
{
|
|
227
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
227
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
228
228
|
|
|
229
|
-
this .boundedObject?.displayBBox (type, renderObject);
|
|
229
|
+
this .boundedObject ?.displayBBox (type, renderObject);
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -88,13 +88,13 @@ MetadataBoolean .prototype = Object .assign (Object .create (X3DNode .prototype)
|
|
|
88
88
|
},
|
|
89
89
|
initialize: function ()
|
|
90
90
|
{
|
|
91
|
-
X3DNode .prototype .initialize .call ();
|
|
92
|
-
X3DMetadataObject .prototype .initialize .call ();
|
|
91
|
+
X3DNode .prototype .initialize .call (this);
|
|
92
|
+
X3DMetadataObject .prototype .initialize .call (this);
|
|
93
93
|
},
|
|
94
94
|
dispose: function ()
|
|
95
95
|
{
|
|
96
|
-
X3DMetadataObject .prototype .dispose .call ();
|
|
97
|
-
X3DNode .prototype .dispose .call ();
|
|
96
|
+
X3DMetadataObject .prototype .dispose .call (this);
|
|
97
|
+
X3DNode .prototype .dispose .call (this);
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -88,13 +88,13 @@ MetadataDouble .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
88
88
|
},
|
|
89
89
|
initialize: function ()
|
|
90
90
|
{
|
|
91
|
-
X3DNode .prototype .initialize .call ();
|
|
92
|
-
X3DMetadataObject .prototype .initialize .call ();
|
|
91
|
+
X3DNode .prototype .initialize .call (this);
|
|
92
|
+
X3DMetadataObject .prototype .initialize .call (this);
|
|
93
93
|
},
|
|
94
94
|
dispose: function ()
|
|
95
95
|
{
|
|
96
|
-
X3DMetadataObject .prototype .dispose .call ();
|
|
97
|
-
X3DNode .prototype .dispose .call ();
|
|
96
|
+
X3DMetadataObject .prototype .dispose .call (this);
|
|
97
|
+
X3DNode .prototype .dispose .call (this);
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -88,13 +88,13 @@ MetadataFloat .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
88
88
|
},
|
|
89
89
|
initialize: function ()
|
|
90
90
|
{
|
|
91
|
-
X3DNode .prototype .initialize .call ();
|
|
92
|
-
X3DMetadataObject .prototype .initialize .call ();
|
|
91
|
+
X3DNode .prototype .initialize .call (this);
|
|
92
|
+
X3DMetadataObject .prototype .initialize .call (this);
|
|
93
93
|
},
|
|
94
94
|
dispose: function ()
|
|
95
95
|
{
|
|
96
|
-
X3DMetadataObject .prototype .dispose .call ();
|
|
97
|
-
X3DNode .prototype .dispose .call ();
|
|
96
|
+
X3DMetadataObject .prototype .dispose .call (this);
|
|
97
|
+
X3DNode .prototype .dispose .call (this);
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -88,13 +88,13 @@ MetadataInteger .prototype = Object .assign (Object .create (X3DNode .prototype)
|
|
|
88
88
|
},
|
|
89
89
|
initialize: function ()
|
|
90
90
|
{
|
|
91
|
-
X3DNode .prototype .initialize .call ();
|
|
92
|
-
X3DMetadataObject .prototype .initialize .call ();
|
|
91
|
+
X3DNode .prototype .initialize .call (this);
|
|
92
|
+
X3DMetadataObject .prototype .initialize .call (this);
|
|
93
93
|
},
|
|
94
94
|
dispose: function ()
|
|
95
95
|
{
|
|
96
|
-
X3DMetadataObject .prototype .dispose .call ();
|
|
97
|
-
X3DNode .prototype .dispose .call ();
|
|
96
|
+
X3DMetadataObject .prototype .dispose .call (this);
|
|
97
|
+
X3DNode .prototype .dispose .call (this);
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -88,13 +88,13 @@ MetadataSet .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
88
88
|
},
|
|
89
89
|
initialize: function ()
|
|
90
90
|
{
|
|
91
|
-
X3DNode .prototype .initialize .call ();
|
|
92
|
-
X3DMetadataObject .prototype .initialize .call ();
|
|
91
|
+
X3DNode .prototype .initialize .call (this);
|
|
92
|
+
X3DMetadataObject .prototype .initialize .call (this);
|
|
93
93
|
},
|
|
94
94
|
dispose: function ()
|
|
95
95
|
{
|
|
96
|
-
X3DMetadataObject .prototype .dispose .call ();
|
|
97
|
-
X3DNode .prototype .dispose .call ();
|
|
96
|
+
X3DMetadataObject .prototype .dispose .call (this);
|
|
97
|
+
X3DNode .prototype .dispose .call (this);
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -88,13 +88,13 @@ MetadataString .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
88
88
|
},
|
|
89
89
|
initialize: function ()
|
|
90
90
|
{
|
|
91
|
-
X3DNode .prototype .initialize .call ();
|
|
92
|
-
X3DMetadataObject .prototype .initialize .call ();
|
|
91
|
+
X3DNode .prototype .initialize .call (this);
|
|
92
|
+
X3DMetadataObject .prototype .initialize .call (this);
|
|
93
93
|
},
|
|
94
94
|
dispose: function ()
|
|
95
95
|
{
|
|
96
|
-
X3DMetadataObject .prototype .dispose .call ();
|
|
97
|
-
X3DNode .prototype .dispose .call ();
|
|
96
|
+
X3DMetadataObject .prototype .dispose .call (this);
|
|
97
|
+
X3DNode .prototype .dispose .call (this);
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
import Fields from "../../Fields.js";
|
|
49
49
|
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
50
50
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
51
|
+
import SFNodeCache from "../../Fields/SFNodeCache.js";
|
|
51
52
|
|
|
52
53
|
function X3DNode (executionContext)
|
|
53
54
|
{
|
|
@@ -1260,30 +1261,30 @@ X3DNode .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
|
1260
1261
|
if (this .getName ())
|
|
1261
1262
|
executionContext .removeNamedNode (this .getName ())
|
|
1262
1263
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
if (!executionContext .isMainScene ())
|
|
1264
|
+
if (executionContext .isScene ())
|
|
1266
1265
|
{
|
|
1267
|
-
|
|
1266
|
+
// Remove imported node if any.
|
|
1268
1267
|
|
|
1269
|
-
|
|
1268
|
+
if (!executionContext .isMainScene ())
|
|
1270
1269
|
{
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
parentContext .removeImportedNode (importedNode .getImportedName ());
|
|
1275
|
-
}
|
|
1276
|
-
catch (error)
|
|
1270
|
+
const parentContext = executionContext .getExecutionContext ();
|
|
1271
|
+
|
|
1272
|
+
for (const importedNode of parentContext .getImportedNodes ())
|
|
1277
1273
|
{
|
|
1278
|
-
|
|
1274
|
+
try
|
|
1275
|
+
{
|
|
1276
|
+
if (importedNode .getExportedNode () === this)
|
|
1277
|
+
parentContext .removeImportedNode (importedNode .getImportedName ());
|
|
1278
|
+
}
|
|
1279
|
+
catch (error)
|
|
1280
|
+
{
|
|
1281
|
+
//console .error (error);
|
|
1282
|
+
}
|
|
1279
1283
|
}
|
|
1280
1284
|
}
|
|
1281
|
-
}
|
|
1282
1285
|
|
|
1283
|
-
|
|
1286
|
+
// Remove exported node if any.
|
|
1284
1287
|
|
|
1285
|
-
if (executionContext .isScene ())
|
|
1286
|
-
{
|
|
1287
1288
|
for (const exportedNode of executionContext .getExportedNodes ())
|
|
1288
1289
|
{
|
|
1289
1290
|
if (exportedNode .getLocalNode () === this)
|
|
@@ -89,7 +89,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
89
89
|
|
|
90
90
|
// const proto = this [_protoNode];
|
|
91
91
|
|
|
92
|
-
// if (!
|
|
92
|
+
// if (!proto .isExternProto)
|
|
93
93
|
// {
|
|
94
94
|
// const rootNodes = proto .getBody () .getRootNodes ();
|
|
95
95
|
|
|
@@ -112,15 +112,13 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
112
112
|
},
|
|
113
113
|
construct: function ()
|
|
114
114
|
{
|
|
115
|
-
|
|
116
|
-
this [_body] .dispose ();
|
|
115
|
+
this [_body] ?.dispose ();
|
|
117
116
|
|
|
118
117
|
const proto = this [_protoNode] .getProtoDeclaration ();
|
|
119
118
|
|
|
120
|
-
if (!
|
|
119
|
+
if (!proto)
|
|
121
120
|
{
|
|
122
|
-
this [_body] = new X3DExecutionContext (this .getExecutionContext ());
|
|
123
|
-
this [_body] .setOuterNode (this);
|
|
121
|
+
this [_body] = new X3DExecutionContext (this .getExecutionContext (), this);
|
|
124
122
|
this [_body] .setup ();
|
|
125
123
|
|
|
126
124
|
if (this .isInitialized ())
|
|
@@ -148,7 +146,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
148
146
|
continue;
|
|
149
147
|
|
|
150
148
|
// Continue if field is eventIn or eventOut.
|
|
151
|
-
if (!
|
|
149
|
+
if (!field .isInitializable ())
|
|
152
150
|
continue;
|
|
153
151
|
|
|
154
152
|
// Is set during parse.
|
|
@@ -175,8 +173,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
175
173
|
|
|
176
174
|
// Create execution context.
|
|
177
175
|
|
|
178
|
-
this [_body] = new X3DExecutionContext (proto .getExecutionContext ());
|
|
179
|
-
this [_body] .setOuterNode (this);
|
|
176
|
+
this [_body] = new X3DExecutionContext (proto .getExecutionContext (), this);
|
|
180
177
|
|
|
181
178
|
// Copy proto.
|
|
182
179
|
|
|
@@ -218,7 +215,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
218
215
|
{
|
|
219
216
|
const oldFieldName = oldProtoFields .get (protoField);
|
|
220
217
|
|
|
221
|
-
if (!
|
|
218
|
+
if (!oldFieldName)
|
|
222
219
|
continue;
|
|
223
220
|
|
|
224
221
|
const
|
|
@@ -232,7 +229,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
232
229
|
this .getPredefinedFields () .update (newField .getName (), newField .getName (), oldField);
|
|
233
230
|
this .getFields () .update (newField .getName (), newField .getName (), oldField);
|
|
234
231
|
|
|
235
|
-
if (!
|
|
232
|
+
if (!this .isPrivate ())
|
|
236
233
|
oldField .addCloneCount (1);
|
|
237
234
|
|
|
238
235
|
oldFields .delete (oldFieldName);
|
|
@@ -281,7 +278,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
281
278
|
|
|
282
279
|
const outerNode = this .getExecutionContext () .getOuterNode ();
|
|
283
280
|
|
|
284
|
-
if (outerNode
|
|
281
|
+
if (outerNode ?.getType () .includes (X3DConstants .X3DProtoDeclaration))
|
|
285
282
|
return;
|
|
286
283
|
|
|
287
284
|
if (protoNode .isExternProto)
|
|
@@ -588,7 +585,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
588
585
|
}
|
|
589
586
|
}
|
|
590
587
|
|
|
591
|
-
if (references .length && !
|
|
588
|
+
if (references .length && !sharedNode)
|
|
592
589
|
{
|
|
593
590
|
generator .string += generator .Indent ();
|
|
594
591
|
generator .string += "<IS>";
|
|
@@ -921,7 +918,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
921
918
|
|
|
922
919
|
// IS references
|
|
923
920
|
|
|
924
|
-
if (references .length && !
|
|
921
|
+
if (references .length && !sharedNode)
|
|
925
922
|
{
|
|
926
923
|
generator .string += generator .Indent ();
|
|
927
924
|
generator .string += '"';
|
|
@@ -162,7 +162,7 @@ ImageCubeMapTexture .prototype = Object .assign (Object .create (X3DEnvironmentT
|
|
|
162
162
|
setError: function ()
|
|
163
163
|
{
|
|
164
164
|
if (this .URL .protocol !== "data:")
|
|
165
|
-
console .warn (
|
|
165
|
+
console .warn (`Error loading image '${decodeURI (this .URL .href)}'`);
|
|
166
166
|
|
|
167
167
|
this .loadNext ();
|
|
168
168
|
},
|
|
@@ -171,7 +171,7 @@ ImageCubeMapTexture .prototype = Object .assign (Object .create (X3DEnvironmentT
|
|
|
171
171
|
if (DEBUG)
|
|
172
172
|
{
|
|
173
173
|
if (this .URL .protocol !== "data:")
|
|
174
|
-
console .info (
|
|
174
|
+
console .info (`Done loading image cube map texture '${decodeURI (this .URL .href)}'`);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
try
|
|
@@ -167,7 +167,7 @@ X3DBackgroundNode .prototype = Object .assign (Object .create (X3DBindableNode .
|
|
|
167
167
|
},
|
|
168
168
|
updateTexture: function (index, textureNode)
|
|
169
169
|
{
|
|
170
|
-
this .textureNodes [index]?._loadState .removeInterest ("setTextureBit", this);
|
|
170
|
+
this .textureNodes [index] ?._loadState .removeInterest ("setTextureBit", this);
|
|
171
171
|
|
|
172
172
|
this .textureNodes [index] = textureNode;
|
|
173
173
|
|
|
@@ -112,7 +112,7 @@ TransformSensor .prototype = Object .assign (Object .create (X3DEnvironmentalSen
|
|
|
112
112
|
{
|
|
113
113
|
X3DEnvironmentalSensorNode .prototype .initialize .call (this);
|
|
114
114
|
|
|
115
|
-
this .
|
|
115
|
+
this .getLive () .addInterest ("set_enabled__", this);
|
|
116
116
|
|
|
117
117
|
this ._enabled .addInterest ("set_enabled__", this);
|
|
118
118
|
this ._size .addInterest ("set_enabled__", this);
|
|
@@ -127,7 +127,7 @@ TransformSensor .prototype = Object .assign (Object .create (X3DEnvironmentalSen
|
|
|
127
127
|
{ },
|
|
128
128
|
set_enabled__: function ()
|
|
129
129
|
{
|
|
130
|
-
if (this .
|
|
130
|
+
if (this .getLive () .getValue () && this .targetObjectNode && this ._enabled .getValue () && ! this ._size. getValue () .equals (Vector3 .Zero))
|
|
131
131
|
{
|
|
132
132
|
this .setPickableObject (true);
|
|
133
133
|
this .getBrowser () .addTransformSensor (this);
|
|
@@ -72,7 +72,7 @@ X3DEnvironmentalSensorNode .prototype = Object .assign (Object .create (X3DSenso
|
|
|
72
72
|
{
|
|
73
73
|
X3DSensorNode .prototype .initialize .call (this);
|
|
74
74
|
|
|
75
|
-
this .
|
|
75
|
+
this .getLive () .addInterest ("set_live__", this);
|
|
76
76
|
|
|
77
77
|
this ._enabled .addInterest ("set_live__", this);
|
|
78
78
|
this ._size .addInterest ("set_live__", this);
|
|
@@ -82,7 +82,7 @@ X3DEnvironmentalSensorNode .prototype = Object .assign (Object .create (X3DSenso
|
|
|
82
82
|
},
|
|
83
83
|
set_live__: function ()
|
|
84
84
|
{
|
|
85
|
-
if (this ._traversed .getValue () && this .
|
|
85
|
+
if (this ._traversed .getValue () && this .getLive () .getValue () && this ._enabled .getValue () && ! (this .zeroTest && this ._size. getValue () .equals (Vector3 .Zero)))
|
|
86
86
|
{
|
|
87
87
|
this .getBrowser () .sensorEvents () .addInterest ("update", this);
|
|
88
88
|
}
|
|
@@ -68,7 +68,7 @@ X3DFollowerNode .prototype = Object .assign (Object .create (X3DChildNode .proto
|
|
|
68
68
|
{
|
|
69
69
|
X3DChildNode .prototype .initialize .call (this);
|
|
70
70
|
|
|
71
|
-
this .
|
|
71
|
+
this .getLive () .addInterest ("set_live__", this);
|
|
72
72
|
},
|
|
73
73
|
getBuffer: function ()
|
|
74
74
|
{
|
|
@@ -116,7 +116,7 @@ X3DFollowerNode .prototype = Object .assign (Object .create (X3DChildNode .proto
|
|
|
116
116
|
},
|
|
117
117
|
set_live__: function ()
|
|
118
118
|
{
|
|
119
|
-
if ((this .
|
|
119
|
+
if ((this .getLive () .getValue () || this .isPrivate ()) && this ._isActive .getValue ())
|
|
120
120
|
{
|
|
121
121
|
this .getBrowser () .prepareEvents () .addInterest ("prepareEvents", this);
|
|
122
122
|
this .getBrowser () .addBrowserEvent ();
|
|
@@ -93,7 +93,7 @@ Arc2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .prototyp
|
|
|
93
93
|
{
|
|
94
94
|
X3DLineGeometryNode .prototype .set_live__ .call (this);
|
|
95
95
|
|
|
96
|
-
if (this .
|
|
96
|
+
if (this .getLive () .getValue ())
|
|
97
97
|
this .getBrowser () .getArc2DOptions () .addInterest ("requestRebuild", this);
|
|
98
98
|
else
|
|
99
99
|
this .getBrowser () .getArc2DOptions () .removeInterest ("requestRebuild", this);
|
|
@@ -97,7 +97,7 @@ ArcClose2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototy
|
|
|
97
97
|
{
|
|
98
98
|
X3DGeometryNode .prototype .set_live__ .call (this);
|
|
99
99
|
|
|
100
|
-
if (this .
|
|
100
|
+
if (this .getLive () .getValue ())
|
|
101
101
|
this .getBrowser () .getArcClose2DOptions () .addInterest ("requestRebuild", this);
|
|
102
102
|
else
|
|
103
103
|
this .getBrowser () .getArcClose2DOptions () .removeInterest ("requestRebuild", this);
|
|
@@ -87,7 +87,7 @@ Circle2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .proto
|
|
|
87
87
|
{
|
|
88
88
|
X3DLineGeometryNode .prototype .set_live__ .call (this);
|
|
89
89
|
|
|
90
|
-
if (this .
|
|
90
|
+
if (this .getLive () .getValue ())
|
|
91
91
|
this .getBrowser () .getCircle2DOptions () .addInterest ("requestRebuild", this);
|
|
92
92
|
else
|
|
93
93
|
this .getBrowser () .getCircle2DOptions () .removeInterest ("requestRebuild", this);
|
|
@@ -96,7 +96,7 @@ Disk2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
|
|
|
96
96
|
{
|
|
97
97
|
X3DGeometryNode .prototype .set_live__ .call (this);
|
|
98
98
|
|
|
99
|
-
if (this .
|
|
99
|
+
if (this .getLive () .getValue ())
|
|
100
100
|
this .getBrowser () .getDisk2DOptions () .addInterest ("requestRebuild", this);
|
|
101
101
|
else
|
|
102
102
|
this .getBrowser () .getDisk2DOptions () .removeInterest ("requestRebuild", this);
|
|
@@ -95,7 +95,7 @@ Cone .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
|
|
|
95
95
|
{
|
|
96
96
|
X3DGeometryNode .prototype .set_live__ .call (this);
|
|
97
97
|
|
|
98
|
-
if (this .
|
|
98
|
+
if (this .getLive () .getValue ())
|
|
99
99
|
this .getBrowser () .getConeOptions () .addInterest ("requestRebuild", this);
|
|
100
100
|
else
|
|
101
101
|
this .getBrowser () .getConeOptions () .removeInterest ("requestRebuild", this);
|
|
@@ -96,7 +96,7 @@ Cylinder .prototype = Object .assign (Object .create (X3DGeometryNode .prototype
|
|
|
96
96
|
{
|
|
97
97
|
X3DGeometryNode .prototype .set_live__ .call (this);
|
|
98
98
|
|
|
99
|
-
if (this .
|
|
99
|
+
if (this .getLive () .getValue ())
|
|
100
100
|
this .getBrowser () .getCylinderOptions () .addInterest ("requestRebuild", this);
|
|
101
101
|
else
|
|
102
102
|
this .getBrowser () .getCylinderOptions () .removeInterest ("requestRebuild", this);
|
|
@@ -158,39 +158,39 @@ ElevationGrid .prototype = Object .assign (Object .create (X3DGeometryNode .prot
|
|
|
158
158
|
},
|
|
159
159
|
set_fogCoord__: function ()
|
|
160
160
|
{
|
|
161
|
-
this .fogCoordNode?.removeInterest ("requestRebuild", this);
|
|
161
|
+
this .fogCoordNode ?.removeInterest ("requestRebuild", this);
|
|
162
162
|
|
|
163
163
|
this .fogCoordNode = X3DCast (X3DConstants .FogCoordinate, this ._fogCoord);
|
|
164
164
|
|
|
165
|
-
this .fogCoordNode?.addInterest ("requestRebuild", this);
|
|
165
|
+
this .fogCoordNode ?.addInterest ("requestRebuild", this);
|
|
166
166
|
},
|
|
167
167
|
set_color__: function ()
|
|
168
168
|
{
|
|
169
|
-
this .colorNode?.removeInterest ("requestRebuild", this);
|
|
169
|
+
this .colorNode ?.removeInterest ("requestRebuild", this);
|
|
170
170
|
|
|
171
171
|
this .colorNode = X3DCast (X3DConstants .X3DColorNode, this ._color);
|
|
172
172
|
|
|
173
|
-
this .colorNode?.addInterest ("requestRebuild", this);
|
|
173
|
+
this .colorNode ?.addInterest ("requestRebuild", this);
|
|
174
174
|
|
|
175
|
-
this .setTransparent (this .colorNode?.isTransparent () ?? false);
|
|
175
|
+
this .setTransparent (this .colorNode ?.isTransparent () ?? false);
|
|
176
176
|
},
|
|
177
177
|
set_texCoord__: function ()
|
|
178
178
|
{
|
|
179
|
-
this .texCoordNode?.removeInterest ("requestRebuild", this);
|
|
179
|
+
this .texCoordNode ?.removeInterest ("requestRebuild", this);
|
|
180
180
|
|
|
181
181
|
this .texCoordNode = X3DCast (X3DConstants .X3DTextureCoordinateNode, this ._texCoord);
|
|
182
182
|
|
|
183
|
-
this .texCoordNode?.addInterest ("requestRebuild", this);
|
|
183
|
+
this .texCoordNode ?.addInterest ("requestRebuild", this);
|
|
184
184
|
|
|
185
185
|
this .setTextureCoordinate (this .texCoordNode);
|
|
186
186
|
},
|
|
187
187
|
set_normal__: function ()
|
|
188
188
|
{
|
|
189
|
-
this .normalNode?.removeInterest ("requestRebuild", this);
|
|
189
|
+
this .normalNode ?.removeInterest ("requestRebuild", this);
|
|
190
190
|
|
|
191
191
|
this .normalNode = X3DCast (X3DConstants .X3DNormalNode, this ._normal);
|
|
192
192
|
|
|
193
|
-
this .normalNode?.addInterest ("requestRebuild", this);
|
|
193
|
+
this .normalNode ?.addInterest ("requestRebuild", this);
|
|
194
194
|
},
|
|
195
195
|
getColor: function ()
|
|
196
196
|
{
|
|
@@ -368,7 +368,7 @@ ElevationGrid .prototype = Object .assign (Object .create (X3DGeometryNode .prot
|
|
|
368
368
|
for (let a = 0; a < numAttribNodes; ++ a)
|
|
369
369
|
attribNodes [a] .addValue (index, attribArrays [a]);
|
|
370
370
|
|
|
371
|
-
fogCoordNode?.addDepth (index, fogDepthArray);
|
|
371
|
+
fogCoordNode ?.addDepth (index, fogDepthArray);
|
|
372
372
|
|
|
373
373
|
if (colorNode)
|
|
374
374
|
{
|
|
@@ -180,7 +180,7 @@ IndexedFaceSet .prototype = Object .assign (Object .create (X3DComposedGeometryN
|
|
|
180
180
|
normalArray = this .getNormals (),
|
|
181
181
|
vertexArray = this .getVertices ();
|
|
182
182
|
|
|
183
|
-
texCoordNode?.init (multiTexCoordArray);
|
|
183
|
+
texCoordNode ?.init (multiTexCoordArray);
|
|
184
184
|
|
|
185
185
|
for (const polygon of polygons)
|
|
186
186
|
{
|
|
@@ -195,7 +195,7 @@ IndexedFaceSet .prototype = Object .assign (Object .create (X3DComposedGeometryN
|
|
|
195
195
|
for (let a = 0; a < numAttribNodes; ++ a)
|
|
196
196
|
attribNodes [a] .addValue (index, attribArrays [a]);
|
|
197
197
|
|
|
198
|
-
fogCoordNode?.addDepth (index, fogDepthArray);
|
|
198
|
+
fogCoordNode ?.addDepth (index, fogDepthArray);
|
|
199
199
|
|
|
200
200
|
if (colorNode)
|
|
201
201
|
{
|
|
@@ -205,7 +205,7 @@ IndexedFaceSet .prototype = Object .assign (Object .create (X3DComposedGeometryN
|
|
|
205
205
|
colorNode .addColor (this .getColorIndex (face), colorArray);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
texCoordNode?.addPoint (this .getTexCoordPerVertexIndex (i), multiTexCoordArray);
|
|
208
|
+
texCoordNode ?.addPoint (this .getTexCoordPerVertexIndex (i), multiTexCoordArray);
|
|
209
209
|
|
|
210
210
|
if (normalNode)
|
|
211
211
|
{
|
|
@@ -88,7 +88,7 @@ Sphere .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
|
|
|
88
88
|
{
|
|
89
89
|
X3DGeometryNode .prototype .set_live__ .call (this);
|
|
90
90
|
|
|
91
|
-
if (this .
|
|
91
|
+
if (this .getLive () .getValue ())
|
|
92
92
|
this .getBrowser () .getSphereOptions () .addInterest ("requestRebuild", this);
|
|
93
93
|
else
|
|
94
94
|
this .getBrowser () .getSphereOptions () .removeInterest ("requestRebuild", this);
|
|
@@ -126,31 +126,31 @@ GeoElevationGrid .prototype = Object .assign (Object .create (X3DGeometryNode .p
|
|
|
126
126
|
},
|
|
127
127
|
set_color__: function ()
|
|
128
128
|
{
|
|
129
|
-
this .colorNode?.removeInterest ("requestRebuild", this);
|
|
129
|
+
this .colorNode ?.removeInterest ("requestRebuild", this);
|
|
130
130
|
|
|
131
131
|
this .colorNode = X3DCast (X3DConstants .X3DColorNode, this ._color);
|
|
132
132
|
|
|
133
|
-
this .colorNode?.addInterest ("requestRebuild", this);
|
|
133
|
+
this .colorNode ?.addInterest ("requestRebuild", this);
|
|
134
134
|
|
|
135
|
-
this .setTransparent (this .colorNode?.isTransparent () ?? false);
|
|
135
|
+
this .setTransparent (this .colorNode ?.isTransparent () ?? false);
|
|
136
136
|
},
|
|
137
137
|
set_texCoord__: function ()
|
|
138
138
|
{
|
|
139
|
-
this .texCoordNode?.removeInterest ("requestRebuild", this);
|
|
139
|
+
this .texCoordNode ?.removeInterest ("requestRebuild", this);
|
|
140
140
|
|
|
141
141
|
this .texCoordNode = X3DCast (X3DConstants .X3DTextureCoordinateNode, this ._texCoord);
|
|
142
142
|
|
|
143
|
-
this .texCoordNode?.addInterest ("requestRebuild", this);
|
|
143
|
+
this .texCoordNode ?.addInterest ("requestRebuild", this);
|
|
144
144
|
|
|
145
145
|
this .setTextureCoordinate (this .texCoordNode);
|
|
146
146
|
},
|
|
147
147
|
set_normal__: function ()
|
|
148
148
|
{
|
|
149
|
-
this .normalNode?.removeInterest ("requestRebuild", this);
|
|
149
|
+
this .normalNode ?.removeInterest ("requestRebuild", this);
|
|
150
150
|
|
|
151
151
|
this .normalNode = X3DCast (X3DConstants .X3DNormalNode, this ._normal);
|
|
152
152
|
|
|
153
|
-
this .normalNode?.addInterest ("requestRebuild", this);
|
|
153
|
+
this .normalNode ?.addInterest ("requestRebuild", this);
|
|
154
154
|
},
|
|
155
155
|
getColor: function ()
|
|
156
156
|
{
|
|
@@ -112,7 +112,7 @@ Switch .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
112
112
|
{
|
|
113
113
|
const boundedObject = X3DCast (X3DConstants .X3DBoundedObject, this .visibleNode);
|
|
114
114
|
|
|
115
|
-
return boundedObject?.getBBox (bbox, shadows) ?? bbox .set ();
|
|
115
|
+
return boundedObject ?.getBBox (bbox, shadows) ?? bbox .set ();
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
@@ -166,11 +166,11 @@ Switch .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
166
166
|
},
|
|
167
167
|
set_cameraObject__: function ()
|
|
168
168
|
{
|
|
169
|
-
this .setCameraObject (!!this .visibleNode?.isCameraObject ());
|
|
169
|
+
this .setCameraObject (!!this .visibleNode ?.isCameraObject ());
|
|
170
170
|
},
|
|
171
171
|
set_transformSensors__: function ()
|
|
172
172
|
{
|
|
173
|
-
this .setPickableObject (!!(this .getTransformSensors () .size || this .visibleNode?.isPickableObject ()));
|
|
173
|
+
this .setPickableObject (!!(this .getTransformSensors () .size || this .visibleNode ?.isPickableObject ()));
|
|
174
174
|
},
|
|
175
175
|
set_visible__: function ()
|
|
176
176
|
{
|
|
@@ -197,7 +197,7 @@ Switch .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
197
197
|
case TraverseType .CAMERA:
|
|
198
198
|
case TraverseType .SHADOW:
|
|
199
199
|
{
|
|
200
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
200
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
203
|
case TraverseType .PICKING:
|
|
@@ -229,14 +229,14 @@ Switch .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
229
229
|
}
|
|
230
230
|
case TraverseType .COLLISION:
|
|
231
231
|
{
|
|
232
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
232
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
235
|
case TraverseType .DISPLAY:
|
|
236
236
|
{
|
|
237
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
237
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
238
238
|
|
|
239
|
-
this .boundedObject?.displayBBox (type, renderObject);
|
|
239
|
+
this .boundedObject ?.displayBBox (type, renderObject);
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
}
|