x_ite 8.6.10 → 8.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +12 -12
- package/build/bin/version.pl +6 -0
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +21 -45
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- 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 +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +40 -58
- 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 +48 -42
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +28 -34
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +140 -29
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +132 -22
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +33 -77
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +28 -28
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +24 -24
- 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 +30 -30
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +19 -19
- 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 +645 -786
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +1 -1
- package/docs/_posts/components/Lighting/DirectionalLight.md +4 -4
- package/docs/_posts/components/Lighting/EnvironmentLight.md +4 -4
- package/docs/_posts/components/Lighting/PointLight.md +4 -4
- package/docs/_posts/components/Lighting/SpotLight.md +4 -4
- package/docs/_posts/components/Rendering/IndexedLineSet.md +1 -1
- package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +3 -3
- package/docs/_posts/components/X_ITE/BlendMode.md +1 -1
- package/docs/_posts/getting-started.md +8 -3
- package/docs/_posts/reference/browser-services.md +1 -1
- package/docs/_posts/reference/ecmascript-object-and-function-definitions.md +16 -99
- package/docs/_posts/what's-new.md +1 -1
- package/docs/laboratory/gltf-sample-viewer.html +4 -2
- package/package.json +3 -3
- package/src/assets/shaders/webgl1/include/Fragment.glsl.js +11 -4
- package/src/assets/shaders/webgl2/include/Fragment.glsl.js +11 -4
- package/src/lib/jquery.js +6 -1
- package/src/standard/Math/Algorithm.js +8 -1
- package/src/standard/Math/Geometry/Box3.js +2 -5
- package/src/standard/Utility/BitSet.js +33 -0
- package/src/x_ite/Base/X3DBaseNode.js +8 -0
- package/src/x_ite/Base/X3DObject.js +14 -1
- package/src/x_ite/Browser/Core/BrowserOptions.js +27 -29
- package/src/x_ite/Browser/Core/BrowserTimings.js +4 -12
- package/src/x_ite/Browser/Core/Context.js +1 -1
- package/src/x_ite/Browser/Core/X3DCoreContext.js +5 -0
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -3
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +20 -15
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +3 -3
- package/src/x_ite/Browser/Rendering/GeometryContext.js +2 -0
- package/src/x_ite/Browser/Shape/AlphaMode.js +1 -1
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +4 -4
- package/src/x_ite/Browser/X3DBrowserContext.js +21 -12
- package/src/x_ite/Components/CADGeometry/CADFace.js +8 -32
- package/src/x_ite/Components/Core/X3DNode.js +1 -1
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +115 -139
- package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +1 -1
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +10 -31
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +3 -6
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +7 -25
- package/src/x_ite/Components/Grouping/StaticGroup.js +19 -0
- package/src/x_ite/Components/Grouping/Switch.js +7 -25
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +0 -1
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +1 -1
- package/src/x_ite/Components/Layout/Layout.js +12 -10
- package/src/x_ite/Components/Layout/LayoutGroup.js +9 -5
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +4 -10
- package/src/x_ite/Components/Navigation/LOD.js +7 -25
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +1 -11
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +4 -3
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +11 -33
- package/src/x_ite/Components/Rendering/LineSet.js +12 -37
- package/src/x_ite/Components/Rendering/PointSet.js +11 -24
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +14 -39
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +15 -8
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +7 -29
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +8 -30
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +3 -10
- package/src/x_ite/Components/Shape/Appearance.js +9 -5
- package/src/x_ite/Components/Shape/Material.js +1 -2
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +1 -2
- package/src/x_ite/Components/Shape/Shape.js +0 -5
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +1 -1
- package/src/x_ite/Components/Shape/UnlitMaterial.js +1 -1
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +24 -9
- package/src/x_ite/Components/Shape/X3DShapeNode.js +21 -18
- package/src/x_ite/Components/Texturing/ImageTexture.js +1 -1
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +2 -0
- package/src/x_ite/Fields/SFImage.js +9 -9
- package/src/x_ite/Fields/SFInt32.js +2 -2
- package/src/x_ite/Fields/SFNode.js +8 -0
- package/src/x_ite/Rendering/X3DRenderObject.js +0 -1
- package/src/x_ite/{X3DCanvas.js → X3DCanvasElement.js} +23 -4
- package/src/x_ite.js +4 -4
- package/x_ite.min.html +1 -1
|
@@ -51,7 +51,8 @@ import MapUtilities from "../../standard/Utility/MapUtilities.js";
|
|
|
51
51
|
const
|
|
52
52
|
_name = Symbol (),
|
|
53
53
|
_interests = Symbol (),
|
|
54
|
-
_values = Symbol ()
|
|
54
|
+
_values = Symbol (),
|
|
55
|
+
_userData = Symbol ();
|
|
55
56
|
|
|
56
57
|
function X3DObject () { }
|
|
57
58
|
|
|
@@ -61,6 +62,7 @@ X3DObject .prototype =
|
|
|
61
62
|
[_name]: "",
|
|
62
63
|
[_interests]: new Map (),
|
|
63
64
|
[_values]: [ ],
|
|
65
|
+
[_userData]: new Map (),
|
|
64
66
|
getId: function ()
|
|
65
67
|
{
|
|
66
68
|
return X3DObject .getId (this);
|
|
@@ -122,6 +124,17 @@ X3DObject .prototype =
|
|
|
122
124
|
interest ();
|
|
123
125
|
}
|
|
124
126
|
},
|
|
127
|
+
getUserData: function (key)
|
|
128
|
+
{
|
|
129
|
+
return this [_userData] .get (key);
|
|
130
|
+
},
|
|
131
|
+
setUserData: function (key, value)
|
|
132
|
+
{
|
|
133
|
+
if (this [_userData] === X3DObject .prototype [_userData])
|
|
134
|
+
this [_userData] = new Map ();
|
|
135
|
+
|
|
136
|
+
this [_userData] .set (key, value);
|
|
137
|
+
},
|
|
125
138
|
toString: function (options = Object .prototype)
|
|
126
139
|
{
|
|
127
140
|
const generator = new Generator (options);
|
|
@@ -91,6 +91,7 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
91
91
|
new X3DFieldDefinition (X3DConstants .inputOutput, "LogarithmicDepthBuffer", new Fields .SFBool ()),
|
|
92
92
|
new X3DFieldDefinition (X3DConstants .inputOutput, "Notifications", new Fields .SFBool (true)),
|
|
93
93
|
new X3DFieldDefinition (X3DConstants .inputOutput, "Multisampling", new Fields .SFInt32 (4)),
|
|
94
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "OptimizeStaticGroup", new Fields .SFBool (true)),
|
|
94
95
|
new X3DFieldDefinition (X3DConstants .inputOutput, "StraightenHorizon", new Fields .SFBool (true)),
|
|
95
96
|
new X3DFieldDefinition (X3DConstants .inputOutput, "Timings", new Fields .SFBool ()),
|
|
96
97
|
]),
|
|
@@ -133,7 +134,7 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
133
134
|
},
|
|
134
135
|
configure: (function ()
|
|
135
136
|
{
|
|
136
|
-
const
|
|
137
|
+
const attributes = new Set ([
|
|
137
138
|
"Antialiased",
|
|
138
139
|
"Cache",
|
|
139
140
|
"ContentScale",
|
|
@@ -144,6 +145,14 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
144
145
|
"SplashScreen",
|
|
145
146
|
]);
|
|
146
147
|
|
|
148
|
+
const restorable = new Set ([
|
|
149
|
+
"PrimitiveQuality",
|
|
150
|
+
"Rubberband",
|
|
151
|
+
"StraightenHorizon",
|
|
152
|
+
"TextureQuality",
|
|
153
|
+
"Timings",
|
|
154
|
+
]);
|
|
155
|
+
|
|
147
156
|
return function ()
|
|
148
157
|
{
|
|
149
158
|
const
|
|
@@ -152,15 +161,28 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
152
161
|
|
|
153
162
|
for (const { name, value } of this .getFieldDefinitions ())
|
|
154
163
|
{
|
|
155
|
-
if (
|
|
164
|
+
if (attributes .has (name))
|
|
156
165
|
{
|
|
157
|
-
const
|
|
158
|
-
|
|
166
|
+
const
|
|
167
|
+
attribute = $.toLowerCaseFirst (name),
|
|
168
|
+
value = browser .getElement () .attr (attribute);
|
|
169
|
+
|
|
170
|
+
browser .attributeChangedCallback (attribute, null, value);
|
|
171
|
+
|
|
159
172
|
continue;
|
|
160
173
|
}
|
|
161
174
|
|
|
162
|
-
if (
|
|
175
|
+
if (restorable .has (name))
|
|
176
|
+
{
|
|
177
|
+
const
|
|
178
|
+
value = localStorage [name],
|
|
179
|
+
field = this .getField (name);
|
|
180
|
+
|
|
181
|
+
if (value !== field .getValue ())
|
|
182
|
+
field .setValue (value);
|
|
183
|
+
|
|
163
184
|
continue;
|
|
185
|
+
}
|
|
164
186
|
|
|
165
187
|
const field = this .getField (name);
|
|
166
188
|
|
|
@@ -169,28 +191,6 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
169
191
|
|
|
170
192
|
field .assign (value);
|
|
171
193
|
}
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
rubberband = localStorage .Rubberband,
|
|
175
|
-
primitiveQuality = localStorage .PrimitiveQuality,
|
|
176
|
-
textureQuality = localStorage .TextureQuality,
|
|
177
|
-
straightenHorizon = localStorage .StraightenHorizon,
|
|
178
|
-
timings = localStorage .Timings;
|
|
179
|
-
|
|
180
|
-
if (rubberband !== this ._Rubberband .getValue ())
|
|
181
|
-
this ._Rubberband = rubberband;
|
|
182
|
-
|
|
183
|
-
if (primitiveQuality !== this ._PrimitiveQuality .getValue ())
|
|
184
|
-
this ._PrimitiveQuality = primitiveQuality;
|
|
185
|
-
|
|
186
|
-
if (textureQuality !== this ._TextureQuality .getValue ())
|
|
187
|
-
this ._TextureQuality = textureQuality;
|
|
188
|
-
|
|
189
|
-
if (straightenHorizon !== this ._StraightenHorizon .getValue ())
|
|
190
|
-
this ._StraightenHorizon = straightenHorizon;
|
|
191
|
-
|
|
192
|
-
if (timings !== this ._Timings .getValue ())
|
|
193
|
-
this ._Timings = timings;
|
|
194
194
|
};
|
|
195
195
|
})(),
|
|
196
196
|
getPrimitiveQuality: function ()
|
|
@@ -323,8 +323,6 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
323
323
|
set_timings__: function (timings)
|
|
324
324
|
{
|
|
325
325
|
this .localStorage .Timings = timings .getValue ();
|
|
326
|
-
|
|
327
|
-
this .getBrowser () .getBrowserTimings () .setEnabled (timings .getValue ());
|
|
328
326
|
},
|
|
329
327
|
});
|
|
330
328
|
|
|
@@ -54,7 +54,6 @@ function BrowserTimings (executionContext)
|
|
|
54
54
|
X3DBaseNode .call (this, executionContext);
|
|
55
55
|
|
|
56
56
|
this .localStorage = this .getBrowser () .getLocalStorage () .addNameSpace ("BrowserTimings.");
|
|
57
|
-
this .enabled = false;
|
|
58
57
|
this .fps = new StopWatch ();
|
|
59
58
|
this .localeOptions = { minimumFractionDigits: 2, maximumFractionDigits: 2 };
|
|
60
59
|
}
|
|
@@ -78,6 +77,8 @@ BrowserTimings .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
78
77
|
{
|
|
79
78
|
X3DBaseNode .prototype .initialize .call (this);
|
|
80
79
|
|
|
80
|
+
this .getBrowser () .getBrowserOptions () ._Timings .addInterest ("set_enabled__", this);
|
|
81
|
+
|
|
81
82
|
this .localStorage .addDefaultValues ({ type: "LESS" });
|
|
82
83
|
|
|
83
84
|
this .element = $("<div></div>") .hide () .addClass ("x_ite-private-browser-timings") .appendTo (this .getBrowser () .getSurface ());
|
|
@@ -92,18 +93,9 @@ BrowserTimings .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
92
93
|
|
|
93
94
|
this .set_button__ ();
|
|
94
95
|
},
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
return this .enabled;
|
|
98
|
-
},
|
|
99
|
-
setEnabled: function (enabled)
|
|
96
|
+
set_enabled__: function ()
|
|
100
97
|
{
|
|
101
|
-
if (this .
|
|
102
|
-
return;
|
|
103
|
-
|
|
104
|
-
this .enabled = enabled;
|
|
105
|
-
|
|
106
|
-
if (enabled)
|
|
98
|
+
if (this .getBrowser () .getBrowserOption ("Timings"))
|
|
107
99
|
{
|
|
108
100
|
this .element .stop (true, true) .fadeIn ();
|
|
109
101
|
this .fps .reset ();
|
|
@@ -325,6 +325,11 @@ X3DCoreContext .prototype =
|
|
|
325
325
|
this .loadURL (new Fields .MFString (newValue), new Fields .MFString ());
|
|
326
326
|
break;
|
|
327
327
|
}
|
|
328
|
+
case "timings":
|
|
329
|
+
{
|
|
330
|
+
this .setBrowserOption ("Timings", this .parseBooleanAttribute (newValue, false));
|
|
331
|
+
break;
|
|
332
|
+
}
|
|
328
333
|
case "url":
|
|
329
334
|
{
|
|
330
335
|
this .loadURL (this .parseUrlAttribute (newValue), new Fields .MFString ());
|
|
@@ -184,7 +184,7 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
184
184
|
this .addFly ();
|
|
185
185
|
|
|
186
186
|
if (this .getBrowser () .getBrowserOption ("Rubberband"))
|
|
187
|
-
this .getBrowser () .
|
|
187
|
+
this .getBrowser () .finishedEvents () .addInterest ("display", this, MOVE);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
this ._isActive = true;
|
|
@@ -215,7 +215,7 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
215
215
|
this .addPan ();
|
|
216
216
|
|
|
217
217
|
if (this .getBrowser () .getBrowserOption ("Rubberband"))
|
|
218
|
-
this .getBrowser () .
|
|
218
|
+
this .getBrowser () .finishedEvents () .addInterest ("display", this, PAN);
|
|
219
219
|
|
|
220
220
|
this ._isActive = true;
|
|
221
221
|
break;
|
|
@@ -704,7 +704,7 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
704
704
|
|
|
705
705
|
browser .prepareEvents () .removeInterest ("fly", this);
|
|
706
706
|
browser .prepareEvents () .removeInterest ("pan", this);
|
|
707
|
-
browser .
|
|
707
|
+
browser .finishedEvents () .removeInterest ("display", this);
|
|
708
708
|
|
|
709
709
|
this .orientationChaser ._value_changed .removeInterest ("set_orientationOffset__", this);
|
|
710
710
|
|
|
@@ -55,7 +55,8 @@ const
|
|
|
55
55
|
_loadingObjects = Symbol (),
|
|
56
56
|
_loading = Symbol (),
|
|
57
57
|
_location = Symbol (),
|
|
58
|
-
_defaultScene = Symbol ()
|
|
58
|
+
_defaultScene = Symbol (),
|
|
59
|
+
_set_loadCount = Symbol ();
|
|
59
60
|
|
|
60
61
|
function getBaseURI (element)
|
|
61
62
|
{
|
|
@@ -82,7 +83,9 @@ function X3DNetworkingContext ()
|
|
|
82
83
|
X3DNetworkingContext .prototype =
|
|
83
84
|
{
|
|
84
85
|
initialize: function ()
|
|
85
|
-
{
|
|
86
|
+
{
|
|
87
|
+
this ._loadCount .addInterest (_set_loadCount, this);
|
|
88
|
+
},
|
|
86
89
|
getProviderUrl: function ()
|
|
87
90
|
{
|
|
88
91
|
return URLs .getProviderUrl ();
|
|
@@ -163,12 +166,25 @@ X3DNetworkingContext .prototype =
|
|
|
163
166
|
setLoadCount: function (value)
|
|
164
167
|
{
|
|
165
168
|
this ._loadCount = value;
|
|
169
|
+
},
|
|
170
|
+
resetLoadCount: function ()
|
|
171
|
+
{
|
|
172
|
+
this ._loadCount = 0;
|
|
173
|
+
this [_loadingDisplay] = 0;
|
|
174
|
+
this [_loadingTotal] = 0;
|
|
175
|
+
|
|
176
|
+
this [_loadingObjects] .clear ();
|
|
166
177
|
|
|
178
|
+
for (const object of this .getPrivateScene () .getLoadingObjects ())
|
|
179
|
+
this .addLoadingObject (object);
|
|
180
|
+
},
|
|
181
|
+
[_set_loadCount]: function ()
|
|
182
|
+
{
|
|
167
183
|
const loadingDisplay = [... this [_loadingObjects]]
|
|
168
184
|
.filter (o => o .isPrivate)
|
|
169
185
|
.reduce ((v, o) => v + !o .isPrivate (), 0);
|
|
170
186
|
|
|
171
|
-
if (
|
|
187
|
+
if (this ._loadCount .getValue () || this [_loading])
|
|
172
188
|
{
|
|
173
189
|
var string = ((loadingDisplay || 1) === 1
|
|
174
190
|
? _ ("Loading %1 file")
|
|
@@ -184,7 +200,7 @@ X3DNetworkingContext .prototype =
|
|
|
184
200
|
{
|
|
185
201
|
this .getSplashScreen () .find (".x_ite-private-spinner-text") .text (string);
|
|
186
202
|
this .getSplashScreen () .find (".x_ite-private-progressbar div")
|
|
187
|
-
.css ("width", (100 - 100 *
|
|
203
|
+
.css ("width", (100 - 100 * this ._loadCount .getValue () / this [_loadingTotal]) + "%");
|
|
188
204
|
}
|
|
189
205
|
else
|
|
190
206
|
{
|
|
@@ -194,17 +210,6 @@ X3DNetworkingContext .prototype =
|
|
|
194
210
|
|
|
195
211
|
this [_loadingDisplay] = loadingDisplay;
|
|
196
212
|
},
|
|
197
|
-
resetLoadCount: function ()
|
|
198
|
-
{
|
|
199
|
-
this ._loadCount = 0;
|
|
200
|
-
this [_loadingDisplay] = 0;
|
|
201
|
-
this [_loadingTotal] = 0;
|
|
202
|
-
|
|
203
|
-
this [_loadingObjects] .clear ();
|
|
204
|
-
|
|
205
|
-
for (const object of this .getPrivateScene () .getLoadingObjects ())
|
|
206
|
-
this .addLoadingObject (object);
|
|
207
|
-
},
|
|
208
213
|
};
|
|
209
214
|
|
|
210
215
|
export default X3DNetworkingContext;
|
|
@@ -124,7 +124,7 @@ PointingDevice .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
124
124
|
event .stopImmediatePropagation (); // Keeps the rest of the handlers from being executed
|
|
125
125
|
|
|
126
126
|
browser .setCursor ("HAND");
|
|
127
|
-
browser .
|
|
127
|
+
browser .finishedEvents () .addInterest ("onverifymotion", this, x, y);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
},
|
|
@@ -145,7 +145,7 @@ PointingDevice .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
145
145
|
|
|
146
146
|
browser .buttonReleaseEvent ();
|
|
147
147
|
browser .setCursor (this .isOver ? "HAND" : "DEFAULT");
|
|
148
|
-
browser .
|
|
148
|
+
browser .finishedEvents () .addInterest ("onverifymotion", this, x, y);
|
|
149
149
|
browser .addBrowserEvent ();
|
|
150
150
|
|
|
151
151
|
this .cursor = "DEFAULT";
|
|
@@ -272,7 +272,7 @@ PointingDevice .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
272
272
|
// and the new child has a sensor node inside. This sensor node must be update to
|
|
273
273
|
// reflect the correct isOver state.
|
|
274
274
|
|
|
275
|
-
this .getBrowser () .
|
|
275
|
+
this .getBrowser () .finishedEvents () .removeInterest ("onverifymotion", this);
|
|
276
276
|
|
|
277
277
|
this .onmotion (x, y);
|
|
278
278
|
},
|
|
@@ -46,11 +46,13 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import X3DGeometryNode from "../../Components/Rendering/X3DGeometryNode.js";
|
|
49
|
+
import AlphaMode from "../Shape/AlphaMode.js";
|
|
49
50
|
|
|
50
51
|
function GeometryContext (options = { })
|
|
51
52
|
{
|
|
52
53
|
Object .assign (this,
|
|
53
54
|
{
|
|
55
|
+
alphaMode: AlphaMode .OPAQUE,
|
|
54
56
|
geometryType: 3,
|
|
55
57
|
hasFogCoords: false,
|
|
56
58
|
colorMaterial: false,
|
|
@@ -186,8 +186,8 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
|
|
|
186
186
|
},
|
|
187
187
|
getComponent: function (name, level)
|
|
188
188
|
{
|
|
189
|
-
name
|
|
190
|
-
level
|
|
189
|
+
name = String (name);
|
|
190
|
+
level |= 0;
|
|
191
191
|
|
|
192
192
|
const component = SupportedComponents .get (name);
|
|
193
193
|
|
|
@@ -813,14 +813,14 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
|
|
|
813
813
|
beginUpdate: function ()
|
|
814
814
|
{
|
|
815
815
|
this .setLive (true);
|
|
816
|
-
this .getExecutionContext () .
|
|
816
|
+
this .getExecutionContext () .beginUpdate ();
|
|
817
817
|
this .advanceTime ();
|
|
818
818
|
this .addBrowserEvent ();
|
|
819
819
|
},
|
|
820
820
|
endUpdate: function ()
|
|
821
821
|
{
|
|
822
822
|
this .setLive (false);
|
|
823
|
-
this .getExecutionContext () .
|
|
823
|
+
this .getExecutionContext () .endUpdate ();
|
|
824
824
|
},
|
|
825
825
|
print: function ()
|
|
826
826
|
{
|
|
@@ -114,12 +114,13 @@ function X3DBrowserContext (element)
|
|
|
114
114
|
for (const browserContext of browserContexts)
|
|
115
115
|
browserContext .call (this);
|
|
116
116
|
|
|
117
|
-
this .addChildObjects ("initialized",
|
|
118
|
-
"shutdown",
|
|
119
|
-
"prepareEvents",
|
|
120
|
-
"timeEvents",
|
|
121
|
-
"sensorEvents",
|
|
122
|
-
"
|
|
117
|
+
this .addChildObjects ("initialized", new SFTime (),
|
|
118
|
+
"shutdown", new SFTime (),
|
|
119
|
+
"prepareEvents", new SFTime (),
|
|
120
|
+
"timeEvents", new SFTime (),
|
|
121
|
+
"sensorEvents", new SFTime (),
|
|
122
|
+
"displayEvents", new SFTime (),
|
|
123
|
+
"finishedEvents", new SFTime ());
|
|
123
124
|
|
|
124
125
|
this [_changedTime] = 0;
|
|
125
126
|
this [_previousTime] = 0;
|
|
@@ -204,9 +205,13 @@ X3DBrowserContext .prototype = Object .assign (Object .create (X3DBaseNode .prot
|
|
|
204
205
|
{
|
|
205
206
|
return this ._sensorEvents;
|
|
206
207
|
},
|
|
207
|
-
|
|
208
|
+
displayEvents: function ()
|
|
208
209
|
{
|
|
209
|
-
return this .
|
|
210
|
+
return this ._displayEvents;
|
|
211
|
+
},
|
|
212
|
+
finishedEvents: function ()
|
|
213
|
+
{
|
|
214
|
+
return this ._finishedEvents;
|
|
210
215
|
},
|
|
211
216
|
getBrowser: function ()
|
|
212
217
|
{
|
|
@@ -267,10 +272,10 @@ X3DBrowserContext .prototype = Object .assign (Object .create (X3DBaseNode .prot
|
|
|
267
272
|
|
|
268
273
|
// Events
|
|
269
274
|
|
|
270
|
-
this .
|
|
275
|
+
this .addTaintedField (this ._prepareEvents);
|
|
271
276
|
this [_processEvents] ();
|
|
272
277
|
|
|
273
|
-
this .
|
|
278
|
+
this .addTaintedField (this ._timeEvents);
|
|
274
279
|
this [_processEvents] ();
|
|
275
280
|
|
|
276
281
|
// Camera
|
|
@@ -290,13 +295,16 @@ X3DBrowserContext .prototype = Object .assign (Object .create (X3DBaseNode .prot
|
|
|
290
295
|
|
|
291
296
|
// Events
|
|
292
297
|
|
|
293
|
-
this .
|
|
298
|
+
this .addTaintedField (this ._sensorEvents);
|
|
294
299
|
this [_processEvents] ();
|
|
295
300
|
|
|
296
301
|
// Display
|
|
297
302
|
|
|
298
303
|
this [_displayTime] .start ()
|
|
299
304
|
|
|
305
|
+
this .addTaintedField (this ._displayEvents);
|
|
306
|
+
this [_processEvents] ();
|
|
307
|
+
|
|
300
308
|
const gl = this .getContext ();
|
|
301
309
|
|
|
302
310
|
this .getFrameBuffer () .bind ();
|
|
@@ -312,7 +320,8 @@ X3DBrowserContext .prototype = Object .assign (Object .create (X3DBaseNode .prot
|
|
|
312
320
|
|
|
313
321
|
// Finish
|
|
314
322
|
|
|
315
|
-
this .
|
|
323
|
+
this .addTaintedField (this ._finishedEvents);
|
|
324
|
+
this [_processEvents] ();
|
|
316
325
|
|
|
317
326
|
this [_browserTime] .stop ();
|
|
318
327
|
this [_systemTime] .start ();
|
|
@@ -102,14 +102,7 @@ CADFace .prototype = Object .assign (Object .create (X3DProductStructureChildNod
|
|
|
102
102
|
getBBox: function (bbox, shadows)
|
|
103
103
|
{
|
|
104
104
|
if (this ._bboxSize .getValue () .equals (this .getDefaultBBoxSize ()))
|
|
105
|
-
|
|
106
|
-
const boundedObject = this .visibleNode;
|
|
107
|
-
|
|
108
|
-
if (boundedObject)
|
|
109
|
-
return boundedObject .getBBox (bbox, shadows);
|
|
110
|
-
|
|
111
|
-
return bbox .set ();
|
|
112
|
-
}
|
|
105
|
+
return this .visibleNode?.getBBox (bbox, shadows) ?? bbox .set ();
|
|
113
106
|
|
|
114
107
|
return bbox .set (this ._bboxSize .getValue (), this ._bboxCenter .getValue ());
|
|
115
108
|
},
|
|
@@ -173,11 +166,11 @@ CADFace .prototype = Object .assign (Object .create (X3DProductStructureChildNod
|
|
|
173
166
|
},
|
|
174
167
|
set_cameraObject__: function ()
|
|
175
168
|
{
|
|
176
|
-
this .setCameraObject (!!
|
|
169
|
+
this .setCameraObject (!!this .visibleNode?.isCameraObject ());
|
|
177
170
|
},
|
|
178
171
|
set_transformSensors__: function ()
|
|
179
172
|
{
|
|
180
|
-
this .setPickableObject (!!
|
|
173
|
+
this .setPickableObject (!!this .visibleNode?.isPickableObject ());
|
|
181
174
|
},
|
|
182
175
|
set_visible__: function ()
|
|
183
176
|
{
|
|
@@ -204,11 +197,7 @@ CADFace .prototype = Object .assign (Object .create (X3DProductStructureChildNod
|
|
|
204
197
|
case TraverseType .CAMERA:
|
|
205
198
|
case TraverseType .SHADOW:
|
|
206
199
|
{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if (visibleNode)
|
|
210
|
-
visibleNode .traverse (type, renderObject);
|
|
211
|
-
|
|
200
|
+
this .visibleNode?.traverse (type, renderObject);
|
|
212
201
|
return;
|
|
213
202
|
}
|
|
214
203
|
case TraverseType .PICKING:
|
|
@@ -219,34 +208,21 @@ CADFace .prototype = Object .assign (Object .create (X3DProductStructureChildNod
|
|
|
219
208
|
|
|
220
209
|
pickingHierarchy .push (this);
|
|
221
210
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
if (visibleNode)
|
|
225
|
-
visibleNode .traverse (type, renderObject);
|
|
211
|
+
this .visibleNode?.traverse (type, renderObject);
|
|
226
212
|
|
|
227
213
|
pickingHierarchy .pop ();
|
|
228
214
|
return;
|
|
229
215
|
}
|
|
230
216
|
case TraverseType .COLLISION:
|
|
231
217
|
{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
if (visibleNode)
|
|
235
|
-
visibleNode .traverse (type, renderObject);
|
|
218
|
+
this .visibleNode?.traverse (type, renderObject);
|
|
236
219
|
return;
|
|
237
220
|
}
|
|
238
221
|
case TraverseType .DISPLAY:
|
|
239
222
|
{
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
if (visibleNode)
|
|
243
|
-
visibleNode .traverse (type, renderObject);
|
|
244
|
-
|
|
245
|
-
const boundedObject = this .boundedObject;
|
|
246
|
-
|
|
247
|
-
if (boundedObject)
|
|
248
|
-
boundedObject .displayBBox (type, renderObject);
|
|
223
|
+
this .visibleNode?.traverse (type, renderObject);
|
|
249
224
|
|
|
225
|
+
this .boundedObject?.displayBBox (type, renderObject);
|
|
250
226
|
return;
|
|
251
227
|
}
|
|
252
228
|
}
|
|
@@ -651,7 +651,7 @@ X3DNode .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
|
651
651
|
case X3DConstants .SFNode:
|
|
652
652
|
case X3DConstants .MFNode:
|
|
653
653
|
{
|
|
654
|
-
generator .PushContainerField (
|
|
654
|
+
generator .PushContainerField (null);
|
|
655
655
|
|
|
656
656
|
generator .string += ">";
|
|
657
657
|
generator .string += generator .TidyBreak ();
|
|
@@ -533,7 +533,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
533
533
|
{
|
|
534
534
|
if (field .getValue () !== null)
|
|
535
535
|
{
|
|
536
|
-
generator .PushContainerField (
|
|
536
|
+
generator .PushContainerField (null);
|
|
537
537
|
|
|
538
538
|
generator .string += generator .Indent ();
|
|
539
539
|
generator .string += "<fieldValue";
|