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
|
@@ -62,13 +62,13 @@ X3DKeyDeviceSensorNode .prototype = Object .assign (Object .create (X3DSensorNod
|
|
|
62
62
|
{
|
|
63
63
|
X3DSensorNode .prototype .initialize .call (this);
|
|
64
64
|
|
|
65
|
-
this .
|
|
65
|
+
this .getLive () .addInterest ("set_live__", this);
|
|
66
66
|
|
|
67
67
|
this .set_live__ ();
|
|
68
68
|
},
|
|
69
69
|
set_live__: function ()
|
|
70
70
|
{
|
|
71
|
-
if (this .
|
|
71
|
+
if (this .getLive () .getValue ())
|
|
72
72
|
{
|
|
73
73
|
this ._enabled .addInterest ("set_enabled__", this);
|
|
74
74
|
|
|
@@ -69,9 +69,8 @@ function X3DLayerNode (executionContext, defaultViewpoint, groupNode)
|
|
|
69
69
|
if (executionContext .getSpecificationVersion () < 4.0)
|
|
70
70
|
this .addAlias ("isPickable", this ._pickable);
|
|
71
71
|
|
|
72
|
-
this .
|
|
73
|
-
this .
|
|
74
|
-
this .currentViewport = null;
|
|
72
|
+
this .groupNode = groupNode;
|
|
73
|
+
this .viewportNode = null;
|
|
75
74
|
|
|
76
75
|
this .defaultNavigationInfo = new NavigationInfo (executionContext);
|
|
77
76
|
this .defaultViewpoint = defaultViewpoint;
|
|
@@ -102,21 +101,6 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
102
101
|
X3DNode .prototype .initialize .call (this);
|
|
103
102
|
X3DRenderObject .prototype .initialize .call (this);
|
|
104
103
|
|
|
105
|
-
// if (this .pickableGroupNode)
|
|
106
|
-
// {
|
|
107
|
-
// this ._pickable .addFieldInterest (this .pickableGroupNode ._pickable);
|
|
108
|
-
// this ._objectType .addFieldInterest (this .pickableGroupNode ._objectType);
|
|
109
|
-
|
|
110
|
-
// this .pickableGroupNode ._pickable = this ._pickable;
|
|
111
|
-
// this .pickableGroupNode ._objectType = this ._objectType;
|
|
112
|
-
|
|
113
|
-
// this .pickableGroupNode .setup ();
|
|
114
|
-
// }
|
|
115
|
-
// else
|
|
116
|
-
// {
|
|
117
|
-
// this .pickableGroupNode = this .groupNode;
|
|
118
|
-
// }
|
|
119
|
-
|
|
120
104
|
this .defaultNavigationInfo .setup ();
|
|
121
105
|
this .defaultViewpoint .setup ();
|
|
122
106
|
this .defaultBackground .setup ();
|
|
@@ -153,9 +137,13 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
153
137
|
{
|
|
154
138
|
return this .groupNode;
|
|
155
139
|
},
|
|
140
|
+
setGroup: function (groupNode)
|
|
141
|
+
{
|
|
142
|
+
this .groupNode = groupNode;
|
|
143
|
+
},
|
|
156
144
|
getViewport: function ()
|
|
157
145
|
{
|
|
158
|
-
return this .
|
|
146
|
+
return this .viewportNode;
|
|
159
147
|
},
|
|
160
148
|
getBackground: function ()
|
|
161
149
|
{
|
|
@@ -235,10 +223,10 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
235
223
|
},
|
|
236
224
|
set_viewport__: function ()
|
|
237
225
|
{
|
|
238
|
-
this .
|
|
226
|
+
this .viewportNode = X3DCast (X3DConstants .X3DViewportNode, this ._viewport);
|
|
239
227
|
|
|
240
|
-
if (! this .
|
|
241
|
-
this .
|
|
228
|
+
if (! this .viewportNode)
|
|
229
|
+
this .viewportNode = this .getBrowser () .getDefaultViewport ();
|
|
242
230
|
},
|
|
243
231
|
bindBindables: function (viewpointName)
|
|
244
232
|
{
|
|
@@ -298,7 +286,7 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
298
286
|
{
|
|
299
287
|
const
|
|
300
288
|
browser = this .getBrowser (),
|
|
301
|
-
viewport = this .
|
|
289
|
+
viewport = this .viewportNode .getRectangle ();
|
|
302
290
|
|
|
303
291
|
if (browser .getPointingLayer ())
|
|
304
292
|
{
|
|
@@ -315,11 +303,11 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
315
303
|
this .getNavigationInfo () .enable (type, renderObject);
|
|
316
304
|
this .getModelViewMatrix () .pushMatrix (this .getViewMatrix () .get ());
|
|
317
305
|
|
|
318
|
-
this .
|
|
306
|
+
this .viewportNode .push (this);
|
|
319
307
|
renderObject .render (type, this .groupNode .traverse, this .groupNode);
|
|
320
|
-
this .
|
|
308
|
+
this .viewportNode .pop (this);
|
|
321
309
|
|
|
322
|
-
this .getModelViewMatrix () .pop ()
|
|
310
|
+
this .getModelViewMatrix () .pop ();
|
|
323
311
|
},
|
|
324
312
|
camera: function (type, renderObject)
|
|
325
313
|
{
|
|
@@ -327,9 +315,9 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
327
315
|
{
|
|
328
316
|
this .getModelViewMatrix () .pushMatrix (Matrix4 .Identity);
|
|
329
317
|
|
|
330
|
-
this .
|
|
318
|
+
this .viewportNode .push (this);
|
|
331
319
|
this .groupNode .traverse (type, renderObject);
|
|
332
|
-
this .
|
|
320
|
+
this .viewportNode .pop (this);
|
|
333
321
|
|
|
334
322
|
this .getModelViewMatrix () .pop ();
|
|
335
323
|
|
|
@@ -347,9 +335,9 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
347
335
|
{
|
|
348
336
|
this .getModelViewMatrix () .pushMatrix (Matrix4 .Identity);
|
|
349
337
|
|
|
350
|
-
this .
|
|
338
|
+
this .viewportNode .push (this);
|
|
351
339
|
this .groupNode .traverse (type, renderObject);
|
|
352
|
-
this .
|
|
340
|
+
this .viewportNode .pop (this);
|
|
353
341
|
|
|
354
342
|
this .getModelViewMatrix () .pop ();
|
|
355
343
|
}
|
|
@@ -360,28 +348,31 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
360
348
|
|
|
361
349
|
return function (type, renderObject)
|
|
362
350
|
{
|
|
363
|
-
|
|
351
|
+
if (this ._visible .getValue ())
|
|
352
|
+
{
|
|
353
|
+
const navigationInfo = this .getNavigationInfo ();
|
|
364
354
|
|
|
365
|
-
|
|
366
|
-
|
|
355
|
+
if (navigationInfo ._transitionActive .getValue ())
|
|
356
|
+
return;
|
|
367
357
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
358
|
+
const
|
|
359
|
+
collisionRadius = navigationInfo .getCollisionRadius (),
|
|
360
|
+
avatarHeight = navigationInfo .getAvatarHeight (),
|
|
361
|
+
size = Math .max (collisionRadius * 2, avatarHeight * 2);
|
|
372
362
|
|
|
373
|
-
|
|
363
|
+
Camera .ortho (-size, size, -size, size, -size, size, projectionMatrix);
|
|
374
364
|
|
|
375
|
-
|
|
376
|
-
|
|
365
|
+
this .getProjectionMatrix () .pushMatrix (projectionMatrix);
|
|
366
|
+
this .getModelViewMatrix () .pushMatrix (this .getViewMatrix () .get ());
|
|
377
367
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
368
|
+
// Render
|
|
369
|
+
this .viewportNode .push (this);
|
|
370
|
+
renderObject .render (type, this .groupNode .traverse, this .groupNode);
|
|
371
|
+
this .viewportNode .pop (this);
|
|
382
372
|
|
|
383
|
-
|
|
384
|
-
|
|
373
|
+
this .getModelViewMatrix () .pop ();
|
|
374
|
+
this .getProjectionMatrix () .pop ();
|
|
375
|
+
}
|
|
385
376
|
};
|
|
386
377
|
})(),
|
|
387
378
|
display: function (type, renderObject)
|
|
@@ -391,11 +382,11 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
391
382
|
this .getNavigationInfo () .enable (type, renderObject);
|
|
392
383
|
this .getModelViewMatrix () .pushMatrix (this .getViewMatrix () .get ());
|
|
393
384
|
|
|
394
|
-
this .
|
|
385
|
+
this .viewportNode .push (this);
|
|
395
386
|
renderObject .render (type, this .groupNode .traverse, this .groupNode);
|
|
396
|
-
this .
|
|
387
|
+
this .viewportNode .pop (this);
|
|
397
388
|
|
|
398
|
-
this .getModelViewMatrix () .pop ()
|
|
389
|
+
this .getModelViewMatrix () .pop ();
|
|
399
390
|
}
|
|
400
391
|
},
|
|
401
392
|
});
|
|
@@ -89,14 +89,14 @@ X3DNurbsSurfaceGeometryNode .prototype = Object .assign (Object .create (X3DPara
|
|
|
89
89
|
},
|
|
90
90
|
set_texCoord__: function ()
|
|
91
91
|
{
|
|
92
|
-
this .texCoordNode
|
|
93
|
-
this .nurbsTexCoordNode?.removeInterest ("requestRebuild", this);
|
|
92
|
+
this .texCoordNode ?.removeInterest ("requestRebuild", this);
|
|
93
|
+
this .nurbsTexCoordNode ?.removeInterest ("requestRebuild", this);
|
|
94
94
|
|
|
95
95
|
this .texCoordNode = X3DCast (X3DConstants .X3DTextureCoordinateNode, this ._texCoord);
|
|
96
96
|
this .nurbsTexCoordNode = X3DCast (X3DConstants .NurbsTextureCoordinate, this ._texCoord);
|
|
97
97
|
|
|
98
|
-
this .texCoordNode
|
|
99
|
-
this .nurbsTexCoordNode?.addInterest ("requestRebuild", this);
|
|
98
|
+
this .texCoordNode ?.addInterest ("requestRebuild", this);
|
|
99
|
+
this .nurbsTexCoordNode ?.addInterest ("requestRebuild", this);
|
|
100
100
|
},
|
|
101
101
|
set_controlPoint__: function ()
|
|
102
102
|
{
|
|
@@ -102,9 +102,9 @@ Collision .prototype = Object .assign (Object .create (X3DGroupingNode .prototyp
|
|
|
102
102
|
initialize: function ()
|
|
103
103
|
{
|
|
104
104
|
X3DGroupingNode .prototype .initialize .call (this);
|
|
105
|
-
//X3DSensorNode
|
|
105
|
+
// X3DSensorNode .prototype .initialize .call (this); // We can only call the base of a *Objects.
|
|
106
106
|
|
|
107
|
-
this .
|
|
107
|
+
this .getLive () .addInterest ("set_live__", this);
|
|
108
108
|
this ._enabled .addInterest ("set_live__", this);
|
|
109
109
|
this ._proxy .addInterest ("set_proxy__", this);
|
|
110
110
|
|
|
@@ -113,7 +113,7 @@ Collision .prototype = Object .assign (Object .create (X3DGroupingNode .prototyp
|
|
|
113
113
|
},
|
|
114
114
|
set_live__: function ()
|
|
115
115
|
{
|
|
116
|
-
if (this .
|
|
116
|
+
if (this .getLive () .getValue () && this ._enabled .getValue ())
|
|
117
117
|
this .getBrowser () .addCollision (this);
|
|
118
118
|
|
|
119
119
|
else
|
|
@@ -165,7 +165,7 @@ Collision .prototype = Object .assign (Object .create (X3DGroupingNode .prototyp
|
|
|
165
165
|
},
|
|
166
166
|
dispose: function ()
|
|
167
167
|
{
|
|
168
|
-
//X3DSensorNode
|
|
168
|
+
// X3DSensorNode .prototype .dispose .call (this); // We can only call the base of a *Objects.
|
|
169
169
|
X3DGroupingNode .prototype .dispose .call (this);
|
|
170
170
|
},
|
|
171
171
|
});
|
|
@@ -119,7 +119,7 @@ LOD .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
119
119
|
{
|
|
120
120
|
const boundedObject = X3DCast (X3DConstants .X3DBoundedObject, this .visibleNode);
|
|
121
121
|
|
|
122
|
-
return boundedObject?.getBBox (bbox, shadows) ?? bbox .set ();
|
|
122
|
+
return boundedObject ?.getBBox (bbox, shadows) ?? bbox .set ();
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
@@ -175,11 +175,11 @@ LOD .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
175
175
|
},
|
|
176
176
|
set_cameraObject__: function ()
|
|
177
177
|
{
|
|
178
|
-
this .setCameraObject (!!this .visibleNode?.isCameraObject ());
|
|
178
|
+
this .setCameraObject (!!this .visibleNode ?.isCameraObject ());
|
|
179
179
|
},
|
|
180
180
|
set_transformSensors__: function ()
|
|
181
181
|
{
|
|
182
|
-
this .setPickableObject (!!(this .getTransformSensors () .size || this .visibleNode?.isPickableObject ()));
|
|
182
|
+
this .setPickableObject (!!(this .getTransformSensors () .size || this .visibleNode ?.isPickableObject ()));
|
|
183
183
|
},
|
|
184
184
|
set_visible__: function ()
|
|
185
185
|
{
|
|
@@ -251,7 +251,7 @@ LOD .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
251
251
|
case TraverseType .CAMERA:
|
|
252
252
|
case TraverseType .SHADOW:
|
|
253
253
|
{
|
|
254
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
254
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
257
|
case TraverseType .PICKING:
|
|
@@ -283,7 +283,7 @@ LOD .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
283
283
|
}
|
|
284
284
|
case TraverseType .COLLISION:
|
|
285
285
|
{
|
|
286
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
286
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
case TraverseType .DISPLAY:
|
|
@@ -311,9 +311,9 @@ LOD .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
this .visibleNode?.traverse (type, renderObject);
|
|
314
|
+
this .visibleNode ?.traverse (type, renderObject);
|
|
315
315
|
|
|
316
|
-
this .boundedObject?.displayBBox (type, renderObject);
|
|
316
|
+
this .boundedObject ?.displayBBox (type, renderObject);
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
}
|
|
@@ -133,9 +133,9 @@ Inline .prototype = Object .assign (Object .create (X3DChildNode .prototype),
|
|
|
133
133
|
X3DUrlObject .prototype .set_live__ .call (this);
|
|
134
134
|
|
|
135
135
|
if (this .isPrivate ())
|
|
136
|
-
return
|
|
136
|
+
return;
|
|
137
137
|
|
|
138
|
-
this .scene .setLive (this .
|
|
138
|
+
this .scene .setLive (this .getLive () .getValue ());
|
|
139
139
|
},
|
|
140
140
|
unLoadNow: function ()
|
|
141
141
|
{
|
|
@@ -70,7 +70,7 @@ X3DUrlObject .prototype =
|
|
|
70
70
|
constructor: X3DUrlObject,
|
|
71
71
|
initialize: function ()
|
|
72
72
|
{
|
|
73
|
-
this .
|
|
73
|
+
this .getLive () .addInterest ("set_live__", this);
|
|
74
74
|
|
|
75
75
|
this ._load .addInterest ("set_load__", this);
|
|
76
76
|
this ._url .addInterest ("set_url__", this);
|
|
@@ -184,7 +184,7 @@ X3DUrlObject .prototype =
|
|
|
184
184
|
},
|
|
185
185
|
set_live__: function ()
|
|
186
186
|
{
|
|
187
|
-
if (this .
|
|
187
|
+
if (this .getLive () .getValue ())
|
|
188
188
|
this .set_autoRefresh__ ();
|
|
189
189
|
else
|
|
190
190
|
clearTimeout (this [_autoRefreshId]);
|
|
@@ -193,7 +193,7 @@ ParticleSystem .prototype = Object .assign (Object .create (X3DShapeNode .protot
|
|
|
193
193
|
|
|
194
194
|
// Connect fields.
|
|
195
195
|
|
|
196
|
-
this .
|
|
196
|
+
this .getLive () .addInterest ("set_live__", this);
|
|
197
197
|
|
|
198
198
|
this ._enabled .addInterest ("set_enabled__", this);
|
|
199
199
|
this ._createParticles .addInterest ("set_createParticles__", this);
|
|
@@ -280,9 +280,9 @@ ParticleSystem .prototype = Object .assign (Object .create (X3DShapeNode .protot
|
|
|
280
280
|
default:
|
|
281
281
|
{
|
|
282
282
|
this .setTransparent (!!(this .getAppearance () .isTransparent () ||
|
|
283
|
-
this .colorRampNode?.isTransparent () ||
|
|
283
|
+
this .colorRampNode ?.isTransparent () ||
|
|
284
284
|
(this .geometryType === GeometryTypes .GEOMETRY &&
|
|
285
|
-
this .geometryNode?.isTransparent ())));
|
|
285
|
+
this .geometryNode ?.isTransparent ())));
|
|
286
286
|
break;
|
|
287
287
|
}
|
|
288
288
|
}
|
|
@@ -294,7 +294,7 @@ ParticleSystem .prototype = Object .assign (Object .create (X3DShapeNode .protot
|
|
|
294
294
|
},
|
|
295
295
|
set_live__: function ()
|
|
296
296
|
{
|
|
297
|
-
if (this .
|
|
297
|
+
if (this .getLive () .getValue ())
|
|
298
298
|
{
|
|
299
299
|
if (this ._isActive .getValue () && this ._maxParticles .getValue ())
|
|
300
300
|
{
|
|
@@ -324,7 +324,7 @@ ParticleSystem .prototype = Object .assign (Object .create (X3DShapeNode .protot
|
|
|
324
324
|
{
|
|
325
325
|
if (! this ._isActive .getValue ())
|
|
326
326
|
{
|
|
327
|
-
if (this .
|
|
327
|
+
if (this .getLive () .getValue ())
|
|
328
328
|
{
|
|
329
329
|
this .getBrowser () .sensorEvents () .addInterest ("animateParticles", this);
|
|
330
330
|
|
|
@@ -344,7 +344,7 @@ ParticleSystem .prototype = Object .assign (Object .create (X3DShapeNode .protot
|
|
|
344
344
|
{
|
|
345
345
|
if (this ._isActive .getValue ())
|
|
346
346
|
{
|
|
347
|
-
if (this .
|
|
347
|
+
if (this .getLive () .getValue ())
|
|
348
348
|
this .getBrowser () .sensorEvents () .removeInterest ("animateParticles", this);
|
|
349
349
|
|
|
350
350
|
this ._isActive = false;
|
|
@@ -986,7 +986,7 @@ ParticleSystem .prototype = Object .assign (Object .create (X3DShapeNode .protot
|
|
|
986
986
|
|
|
987
987
|
const blendModeNode = appearanceNode .getBlendMode ();
|
|
988
988
|
|
|
989
|
-
blendModeNode?.enable (gl);
|
|
989
|
+
blendModeNode ?.enable (gl);
|
|
990
990
|
|
|
991
991
|
shaderNode .enable (gl);
|
|
992
992
|
shaderNode .setUniforms (gl, this .geometryContext, renderContext);
|
|
@@ -1031,7 +1031,7 @@ ParticleSystem .prototype = Object .assign (Object .create (X3DShapeNode .protot
|
|
|
1031
1031
|
|
|
1032
1032
|
gl .drawArraysInstanced (primitiveMode, 0, this .vertexCount, this .numParticles);
|
|
1033
1033
|
|
|
1034
|
-
blendModeNode?.disable (gl);
|
|
1034
|
+
blendModeNode ?.disable (gl);
|
|
1035
1035
|
}
|
|
1036
1036
|
|
|
1037
1037
|
break;
|
|
@@ -83,7 +83,7 @@ X3DPickSensorNode .prototype = Object .assign (Object .create (X3DSensorNode .pr
|
|
|
83
83
|
constructor: X3DPickSensorNode,
|
|
84
84
|
initialize: function ()
|
|
85
85
|
{
|
|
86
|
-
this .
|
|
86
|
+
this .getLive () .addInterest ("set_live__", this);
|
|
87
87
|
|
|
88
88
|
this ._enabled .addInterest ("set_live__", this);
|
|
89
89
|
this ._objectType .addInterest ("set_objectType__", this);
|
|
@@ -134,8 +134,8 @@ X3DPickSensorNode .prototype = Object .assign (Object .create (X3DSensorNode .pr
|
|
|
134
134
|
return pickShape;
|
|
135
135
|
|
|
136
136
|
var
|
|
137
|
-
shapeNode = this .getExecutionContext () .createNode ("Shape", false),
|
|
138
|
-
collidableShapeNode = this .getExecutionContext () .createNode ("CollidableShape", false);
|
|
137
|
+
shapeNode = this .getExecutionContext () .createNode ("Shape", { setup: false, warn: false }),
|
|
138
|
+
collidableShapeNode = this .getExecutionContext () .createNode ("CollidableShape", { setup: false, warn: false });
|
|
139
139
|
|
|
140
140
|
shapeNode .setPrivate (true);
|
|
141
141
|
collidableShapeNode .setPrivate (true);
|
|
@@ -263,7 +263,7 @@ X3DPickSensorNode .prototype = Object .assign (Object .create (X3DSensorNode .pr
|
|
|
263
263
|
},
|
|
264
264
|
set_live__: function ()
|
|
265
265
|
{
|
|
266
|
-
if (this .
|
|
266
|
+
if (this .getLive () .getValue () && this ._enabled .getValue () && ! this .objectType .has ("NONE"))
|
|
267
267
|
{
|
|
268
268
|
this .getBrowser () .addPickSensor (this);
|
|
269
269
|
this .setPickableObject (true);
|
|
@@ -63,22 +63,34 @@ X3DPointingDeviceSensorNode .prototype = Object .assign (Object .create (X3DSens
|
|
|
63
63
|
{
|
|
64
64
|
X3DSensorNode .prototype .initialize .call (this);
|
|
65
65
|
|
|
66
|
-
this .
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
this .getBrowser () .getBrowserOptions () ._PrivateSensors .addInterest ("set_live__", this);
|
|
67
|
+
this .getScene () .getPrivate () .addInterest ("set_live__", this);
|
|
68
|
+
this .getLive () .addInterest ("set_live__", this);
|
|
69
|
+
|
|
70
|
+
this ._enabled .addInterest ("set_live__", this);
|
|
71
|
+
|
|
72
|
+
this .set_live__ ();
|
|
71
73
|
},
|
|
72
|
-
|
|
74
|
+
set_live__: function ()
|
|
73
75
|
{
|
|
74
|
-
if (this ._enabled .getValue ())
|
|
75
|
-
|
|
76
|
+
if (((this .getLive () .getValue () && !this .getBrowser () .getBrowserOption ("PrivateSensors")) || this .getScene () .isPrivate () && this .getBrowser () .getBrowserOption ("PrivateSensors")) && this ._enabled .getValue ())
|
|
77
|
+
{
|
|
78
|
+
this .getBrowser () .addPointingDeviceSensor (this);
|
|
79
|
+
|
|
80
|
+
delete this .push;
|
|
81
|
+
}
|
|
82
|
+
else
|
|
83
|
+
{
|
|
84
|
+
this .getBrowser () .removePointingDeviceSensor (this);
|
|
85
|
+
|
|
86
|
+
if (this ._isActive .getValue ())
|
|
87
|
+
this ._isActive = false;
|
|
76
88
|
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
if (this ._isOver .getValue ())
|
|
90
|
+
this ._isOver = false;
|
|
79
91
|
|
|
80
|
-
|
|
81
|
-
|
|
92
|
+
this .push = Function .prototype;
|
|
93
|
+
}
|
|
82
94
|
},
|
|
83
95
|
set_over__: function (over, hit)
|
|
84
96
|
{
|
|
@@ -99,13 +111,10 @@ X3DPointingDeviceSensorNode .prototype = Object .assign (Object .create (X3DSens
|
|
|
99
111
|
{ },
|
|
100
112
|
push: function (renderObject, sensors)
|
|
101
113
|
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
renderObject .getProjectionMatrix () .get (),
|
|
107
|
-
renderObject .getViewVolume () .getViewport ()));
|
|
108
|
-
}
|
|
114
|
+
sensors .push (new PointingDeviceSensorContainer (this,
|
|
115
|
+
renderObject .getModelViewMatrix () .get (),
|
|
116
|
+
renderObject .getProjectionMatrix () .get (),
|
|
117
|
+
renderObject .getViewVolume () .getViewport ()));
|
|
109
118
|
},
|
|
110
119
|
});
|
|
111
120
|
|
|
@@ -144,37 +144,37 @@ IndexedLineSet .prototype = Object .assign (Object .create (X3DLineGeometryNode
|
|
|
144
144
|
},
|
|
145
145
|
set_fogCoord__: function ()
|
|
146
146
|
{
|
|
147
|
-
this .fogCoordNode?.removeInterest ("requestRebuild", this);
|
|
147
|
+
this .fogCoordNode ?.removeInterest ("requestRebuild", this);
|
|
148
148
|
|
|
149
149
|
this .fogCoordNode = X3DCast (X3DConstants .FogCoordinate, this ._fogCoord);
|
|
150
150
|
|
|
151
|
-
this .fogCoordNode?.addInterest ("requestRebuild", this);
|
|
151
|
+
this .fogCoordNode ?.addInterest ("requestRebuild", this);
|
|
152
152
|
},
|
|
153
153
|
set_color__: function ()
|
|
154
154
|
{
|
|
155
|
-
this .colorNode?.removeInterest ("requestRebuild", this);
|
|
155
|
+
this .colorNode ?.removeInterest ("requestRebuild", this);
|
|
156
156
|
|
|
157
157
|
this .colorNode = X3DCast (X3DConstants .X3DColorNode, this ._color);
|
|
158
158
|
|
|
159
|
-
this .colorNode?.addInterest ("requestRebuild", this);
|
|
159
|
+
this .colorNode ?.addInterest ("requestRebuild", this);
|
|
160
160
|
|
|
161
|
-
this .setTransparent (this .colorNode?.isTransparent () ?? false);
|
|
161
|
+
this .setTransparent (this .colorNode ?.isTransparent () ?? false);
|
|
162
162
|
},
|
|
163
163
|
set_normal__: function ()
|
|
164
164
|
{
|
|
165
|
-
this .normalNode?.removeInterest ("requestRebuild", this);
|
|
165
|
+
this .normalNode ?.removeInterest ("requestRebuild", this);
|
|
166
166
|
|
|
167
167
|
this .normalNode = X3DCast (X3DConstants .X3DNormalNode, this ._normal);
|
|
168
168
|
|
|
169
|
-
this .normalNode?.addInterest ("requestRebuild", this);
|
|
169
|
+
this .normalNode ?.addInterest ("requestRebuild", this);
|
|
170
170
|
},
|
|
171
171
|
set_coord__: function ()
|
|
172
172
|
{
|
|
173
|
-
this .coordNode?.removeInterest ("requestRebuild", this);
|
|
173
|
+
this .coordNode ?.removeInterest ("requestRebuild", this);
|
|
174
174
|
|
|
175
175
|
this .coordNode = X3DCast (X3DConstants .X3DCoordinateNode, this ._coord);
|
|
176
176
|
|
|
177
|
-
this .coordNode?.addInterest ("requestRebuild", this);
|
|
177
|
+
this .coordNode ?.addInterest ("requestRebuild", this);
|
|
178
178
|
},
|
|
179
179
|
getColorPerVertexIndex: function (index)
|
|
180
180
|
{
|
|
@@ -268,7 +268,7 @@ IndexedLineSet .prototype = Object .assign (Object .create (X3DLineGeometryNode
|
|
|
268
268
|
for (let a = 0; a < numAttribNodes; ++ a)
|
|
269
269
|
attribNodes [a] .addValue (index, attribArrays [a]);
|
|
270
270
|
|
|
271
|
-
fogCoordNode?.addDepth (index, fogDepthArray);
|
|
271
|
+
fogCoordNode ?.addDepth (index, fogDepthArray);
|
|
272
272
|
|
|
273
273
|
if (colorNode)
|
|
274
274
|
{
|
|
@@ -278,7 +278,7 @@ IndexedLineSet .prototype = Object .assign (Object .create (X3DLineGeometryNode
|
|
|
278
278
|
colorNode .addColor (this .getColorIndex (face), colorArray);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
normalNode?.addVector (index, normalArray);
|
|
281
|
+
normalNode ?.addVector (index, normalArray);
|
|
282
282
|
|
|
283
283
|
coordNode .addPoint (index, vertexArray);
|
|
284
284
|
}
|
|
@@ -138,37 +138,37 @@ LineSet .prototype = Object .assign (Object .create (X3DLineGeometryNode .protot
|
|
|
138
138
|
},
|
|
139
139
|
set_fogCoord__: function ()
|
|
140
140
|
{
|
|
141
|
-
this .fogCoordNode?.removeInterest ("requestRebuild", this);
|
|
141
|
+
this .fogCoordNode ?.removeInterest ("requestRebuild", this);
|
|
142
142
|
|
|
143
143
|
this .fogCoordNode = X3DCast (X3DConstants .FogCoordinate, this ._fogCoord);
|
|
144
144
|
|
|
145
|
-
this .fogCoordNode?.addInterest ("requestRebuild", this);
|
|
145
|
+
this .fogCoordNode ?.addInterest ("requestRebuild", this);
|
|
146
146
|
},
|
|
147
147
|
set_color__: function ()
|
|
148
148
|
{
|
|
149
|
-
this .colorNode?.removeInterest ("requestRebuild", this);
|
|
149
|
+
this .colorNode ?.removeInterest ("requestRebuild", this);
|
|
150
150
|
|
|
151
151
|
this .colorNode = X3DCast (X3DConstants .X3DColorNode, this ._color);
|
|
152
152
|
|
|
153
|
-
this .colorNode?.addInterest ("requestRebuild", this);
|
|
153
|
+
this .colorNode ?.addInterest ("requestRebuild", this);
|
|
154
154
|
|
|
155
|
-
this .setTransparent (this .colorNode?.isTransparent () ?? false);
|
|
155
|
+
this .setTransparent (this .colorNode ?.isTransparent () ?? false);
|
|
156
156
|
},
|
|
157
157
|
set_normal__: function ()
|
|
158
158
|
{
|
|
159
|
-
this .normalNode?.removeInterest ("requestRebuild", this);
|
|
159
|
+
this .normalNode ?.removeInterest ("requestRebuild", this);
|
|
160
160
|
|
|
161
161
|
this .normalNode = X3DCast (X3DConstants .X3DNormalNode, this ._normal);
|
|
162
162
|
|
|
163
|
-
this .normalNode?.addInterest ("requestRebuild", this);
|
|
163
|
+
this .normalNode ?.addInterest ("requestRebuild", this);
|
|
164
164
|
},
|
|
165
165
|
set_coord__: function ()
|
|
166
166
|
{
|
|
167
|
-
this .coordNode?.removeInterest ("requestRebuild", this);
|
|
167
|
+
this .coordNode ?.removeInterest ("requestRebuild", this);
|
|
168
168
|
|
|
169
169
|
this .coordNode = X3DCast (X3DConstants .X3DCoordinateNode, this ._coord);
|
|
170
170
|
|
|
171
|
-
this .coordNode?.addInterest ("requestRebuild", this);
|
|
171
|
+
this .coordNode ?.addInterest ("requestRebuild", this);
|
|
172
172
|
},
|
|
173
173
|
build: function ()
|
|
174
174
|
{
|
|
@@ -208,9 +208,9 @@ LineSet .prototype = Object .assign (Object .create (X3DLineGeometryNode .protot
|
|
|
208
208
|
for (let a = 0; a < numAttribNodes; ++ a)
|
|
209
209
|
attribNodes [a] .addValue (index, attribArrays [a]);
|
|
210
210
|
|
|
211
|
-
fogCoordNode?.addDepth (index, fogDepthArray);
|
|
212
|
-
colorNode
|
|
213
|
-
normalNode
|
|
211
|
+
fogCoordNode ?.addDepth (index, fogDepthArray);
|
|
212
|
+
colorNode ?.addColor (index, colorArray);
|
|
213
|
+
normalNode ?.addVector (index, normalArray);
|
|
214
214
|
|
|
215
215
|
coordNode .addPoint (index, vertexArray);
|
|
216
216
|
}
|