x_ite 8.3.1 → 8.3.3
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/.github/workflows/pages-deploy.yml +1 -1
- package/.vscode/settings.json +2 -1
- package/build/bin/tests.pl +2 -0
- package/dist/LICENSE.md +4 -4
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +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 +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +61 -74
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +27 -27
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +23 -23
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +19 -19
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +17 -17
- 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/{ProjectiveTextureMapping.js → TextureProjector.js} +39 -39
- package/dist/assets/components/TextureProjector.min.js +1 -0
- package/dist/assets/components/Texturing3D.js +46 -46
- 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 +1904 -1570
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/Gemfile +1 -4
- package/docs/_config.yml +3 -2
- package/docs/_posts/custom-shaders.md +1 -1
- package/docs/_posts/dom-integration.md +52 -25
- package/docs/_posts/getting-started.md +148 -442
- package/docs/_posts/reference/field-services-and-objects.md +2 -34
- package/docs/_posts/reference/scene-services.md +13 -2
- package/docs/_posts/tutorials/basic-nodes.md +2 -2
- package/docs/_posts/tutorials/building-a-x3d-world.md +20 -4
- package/docs/_posts/tutorials/building-primitive-shapes.md +4 -4
- package/docs/_posts/tutorials/creating-new-node-types.md +22 -0
- package/docs/_posts/tutorials/hello-world.md +6 -6
- package/docs/_posts/tutorials/improving-performance.md +2 -2
- package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +2 -2
- package/docs/_posts/what's-new.md +21 -3
- package/docs/_tabs/playground.html +110 -57
- package/docs/assets/css/style.scss +25 -1
- package/package.json +2 -2
- package/src/assets/components/{ProjectiveTextureMapping.js → TextureProjector.js} +5 -5
- package/src/examples.js +1 -1
- package/src/tests.js +5 -5
- package/src/x_ite/Base/X3DArrayField.js +3 -0
- package/src/x_ite/Base/X3DBaseNode.js +4 -0
- package/src/x_ite/Base/X3DInfoArray.js +28 -24
- package/src/x_ite/Base/X3DObject.js +29 -20
- package/src/x_ite/Base/X3DObjectArrayField.js +27 -26
- package/src/x_ite/Base/X3DTypedArrayField.js +34 -32
- package/src/x_ite/Browser/Core/ContextMenu.js +5 -7
- package/src/x_ite/Browser/DOMIntegration.js +62 -54
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +44 -29
- package/src/x_ite/Browser/X3DBrowserContext.js +3 -0
- package/src/x_ite/Components/Core/X3DNode.js +196 -187
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +114 -91
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +18 -43
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +24 -25
- package/src/x_ite/Components/HAnim/HAnimJoint.js +19 -31
- package/src/x_ite/Components/Networking/Inline.js +21 -2
- package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +14 -1
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +0 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjector.js +1 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjectorParallel.js +1 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/X3DTextureProjectorNode.js +0 -0
- package/src/x_ite/Components/Time/TimeSensor.js +5 -0
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +1 -0
- package/src/x_ite/Configuration/ComponentInfo.js +20 -23
- package/src/x_ite/Configuration/ProfileInfo.js +6 -6
- package/src/x_ite/Configuration/SupportedComponents.js +22 -20
- package/src/x_ite/Configuration/SupportedNodes.js +1 -5
- package/src/x_ite/Configuration/SupportedProfiles.js +1 -1
- package/src/x_ite/Configuration/UnitInfo.js +24 -27
- package/src/x_ite/Execution/X3DExecutionContext.js +28 -59
- package/src/x_ite/Execution/X3DExportedNode.js +23 -28
- package/src/x_ite/Execution/X3DImportedNode.js +63 -67
- package/src/x_ite/Execution/X3DScene.js +98 -117
- package/src/x_ite/Fields/ArrayFields.js +57 -55
- package/src/x_ite/Fields/SFBool.js +6 -6
- package/src/x_ite/Fields/SFColor.js +10 -12
- package/src/x_ite/Fields/SFDouble.js +7 -10
- package/src/x_ite/Fields/SFFloat.js +7 -10
- package/src/x_ite/Fields/SFImage.js +33 -8
- package/src/x_ite/Fields/SFInt32.js +6 -6
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +13 -13
- package/src/x_ite/Fields/SFNode.js +42 -19
- package/src/x_ite/Fields/SFRotation.js +13 -13
- package/src/x_ite/Fields/SFString.js +6 -7
- package/src/x_ite/Fields/SFTime.js +6 -6
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +10 -10
- package/src/x_ite/InputOutput/FileLoader.js +1 -1
- package/src/x_ite/InputOutput/Generator.js +117 -17
- package/src/x_ite/Parser/VRMLParser.js +24 -27
- package/src/x_ite/Parser/X3DParser.js +0 -4
- package/src/x_ite/Parser/XMLParser.js +152 -50
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +59 -64
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +86 -93
- package/src/x_ite/Rendering/X3DRenderObject.js +6 -1
- package/src/x_ite/Routing/X3DRoute.js +37 -40
- package/src/x_ite.html +3 -3
- package/webpack.config.js +2 -2
- package/x_ite.min.html +1 -1
- package/dist/assets/components/ProjectiveTextureMapping.min.js +0 -1
- package/docs/Gemfile.lock +0 -116
|
@@ -604,17 +604,13 @@ ContextMenu .prototype = Object .assign (Object .create (X3DBaseNode .prototype)
|
|
|
604
604
|
|
|
605
605
|
// Menu
|
|
606
606
|
|
|
607
|
-
const
|
|
608
|
-
x = event .pageX - $(document) .scrollLeft (),
|
|
609
|
-
y = event .pageY - $(document) .scrollTop ();
|
|
610
|
-
|
|
611
607
|
const ul = $("<ul></ul>")
|
|
612
608
|
.hide ()
|
|
609
|
+
.addClass ("context-menu-root")
|
|
613
610
|
.addClass ("context-menu-list")
|
|
614
611
|
.addClass (menu .className)
|
|
615
|
-
.
|
|
616
|
-
.
|
|
617
|
-
.appendTo (options .appendTo);
|
|
612
|
+
.appendTo (options .appendTo)
|
|
613
|
+
.offset ({ "left": event .pageX, "top": event .pageY });
|
|
618
614
|
|
|
619
615
|
for (const k in menu .items)
|
|
620
616
|
ul .append (this .createItem (menu .items [k], "context-menu-root", k, level + 1, hide));
|
|
@@ -623,6 +619,8 @@ ContextMenu .prototype = Object .assign (Object .create (X3DBaseNode .prototype)
|
|
|
623
619
|
|
|
624
620
|
// Reposition menu if to right or to low.
|
|
625
621
|
|
|
622
|
+
ul .offset ({ "left": event .pageX, "top": event .pageY }); // Do it again!
|
|
623
|
+
|
|
626
624
|
if (ul .offset () .left - $(document) .scrollLeft () + ul .outerWidth () > $(window) .width ())
|
|
627
625
|
ul .offset ({ "left": $(document) .scrollLeft () + Math .max (0, $(window) .width () - ul .outerWidth ()) });
|
|
628
626
|
|
|
@@ -31,25 +31,23 @@ class DOMIntegration
|
|
|
31
31
|
{
|
|
32
32
|
constructor (browser)
|
|
33
33
|
{
|
|
34
|
-
this .browser
|
|
35
|
-
this .rootElement
|
|
34
|
+
this .browser = browser;
|
|
35
|
+
this .rootElement = undefined;
|
|
36
|
+
this .canvasObserver = new MutationObserver (() => this .processCanvasMutation (browser));
|
|
36
37
|
|
|
37
|
-
this .canvasObserver
|
|
38
|
-
{
|
|
39
|
-
this .observeRoot (this .browser .getElement () .children ("X3D") [0]);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
this .canvasObserver .observe (this .browser .getElement () [0], {
|
|
38
|
+
this .canvasObserver .observe (browser .getElement () [0], {
|
|
43
39
|
childList: true,
|
|
44
40
|
});
|
|
45
41
|
|
|
46
|
-
|
|
42
|
+
this .processCanvasMutation (browser)
|
|
43
|
+
}
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
processCanvasMutation (browser)
|
|
46
|
+
{
|
|
47
|
+
this .processRootElement (browser, browser .getElement () .children ("X3D") .get (-1));
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
async
|
|
50
|
+
async processRootElement (browser, rootElement)
|
|
53
51
|
{
|
|
54
52
|
try
|
|
55
53
|
{
|
|
@@ -62,21 +60,20 @@ class DOMIntegration
|
|
|
62
60
|
{
|
|
63
61
|
// Display splash screen.
|
|
64
62
|
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
browser .setBrowserLoading (true);
|
|
64
|
+
browser .addLoadingObject (this);
|
|
67
65
|
|
|
68
|
-
//
|
|
66
|
+
// Now also attached node property to each node element.
|
|
69
67
|
|
|
70
|
-
|
|
71
|
-
this .preprocessScriptElements (rootElement);
|
|
68
|
+
const scene = browser .createScene ();
|
|
72
69
|
|
|
73
|
-
|
|
70
|
+
this .parser = new XMLParser (scene);
|
|
74
71
|
|
|
75
|
-
|
|
72
|
+
this .parser .setInput (rootElement);
|
|
76
73
|
|
|
77
|
-
this .
|
|
74
|
+
await new Promise (this .parser .parseIntoScene .bind (this .parser));
|
|
78
75
|
|
|
79
|
-
|
|
76
|
+
browser .replaceWorld (scene);
|
|
80
77
|
|
|
81
78
|
// Create an observer instance.
|
|
82
79
|
|
|
@@ -101,11 +98,11 @@ class DOMIntegration
|
|
|
101
98
|
this .processInlineElements (rootElement);
|
|
102
99
|
this .addEventDispatchersAll (rootElement);
|
|
103
100
|
|
|
104
|
-
|
|
101
|
+
browser .removeLoadingObject (this);
|
|
105
102
|
}
|
|
106
103
|
else
|
|
107
104
|
{
|
|
108
|
-
|
|
105
|
+
browser .replaceWorld (null);
|
|
109
106
|
}
|
|
110
107
|
}
|
|
111
108
|
catch (error)
|
|
@@ -114,27 +111,6 @@ class DOMIntegration
|
|
|
114
111
|
}
|
|
115
112
|
}
|
|
116
113
|
|
|
117
|
-
preprocessScriptElements (rootElement)
|
|
118
|
-
{
|
|
119
|
-
const scriptElements = rootElement .querySelectorAll ("Script");
|
|
120
|
-
|
|
121
|
-
for (const scriptElement of scriptElements)
|
|
122
|
-
this .appendScriptElementChildren (scriptElement);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
appendScriptElementChildren (scriptElement)
|
|
126
|
-
{
|
|
127
|
-
const
|
|
128
|
-
domParser = new DOMParser (),
|
|
129
|
-
scriptDoc = domParser .parseFromString (scriptElement .outerHTML, "application/xml"),
|
|
130
|
-
scriptNodes = scriptDoc .children [0] .childNodes;
|
|
131
|
-
|
|
132
|
-
scriptElement .textContent = "// Content moved into childNodes.";
|
|
133
|
-
|
|
134
|
-
for (const scriptNode of scriptNodes)
|
|
135
|
-
scriptElement .appendChild (scriptNode);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
114
|
processMutation (mutation)
|
|
139
115
|
{
|
|
140
116
|
switch (mutation .type)
|
|
@@ -159,13 +135,15 @@ class DOMIntegration
|
|
|
159
135
|
|
|
160
136
|
processAttribute (mutation, element)
|
|
161
137
|
{
|
|
138
|
+
const parser = this .parser;
|
|
139
|
+
|
|
162
140
|
if ($.data (element, "node"))
|
|
163
141
|
{
|
|
164
142
|
const
|
|
165
143
|
attributeName = mutation .attributeName,
|
|
166
144
|
attribute = element .attributes .getNamedItem (attributeName);
|
|
167
145
|
|
|
168
|
-
|
|
146
|
+
parser .nodeAttribute (attribute, $.data (element, "node"));
|
|
169
147
|
}
|
|
170
148
|
else
|
|
171
149
|
{
|
|
@@ -175,11 +153,11 @@ class DOMIntegration
|
|
|
175
153
|
parentNode = element .parentNode,
|
|
176
154
|
node = $.data (parentNode, "node");
|
|
177
155
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
156
|
+
parser .pushExecutionContext (node .getExecutionContext ());
|
|
157
|
+
parser .pushParent (node);
|
|
158
|
+
parser .childElement (element);
|
|
159
|
+
parser .popParent ();
|
|
160
|
+
parser .popExecutionContext ();
|
|
183
161
|
}
|
|
184
162
|
}
|
|
185
163
|
|
|
@@ -275,6 +253,8 @@ class DOMIntegration
|
|
|
275
253
|
return;
|
|
276
254
|
|
|
277
255
|
node ._loadState .addInterest ("appendInlineChildElement", this, element);
|
|
256
|
+
|
|
257
|
+
this .appendInlineChildElement (element);
|
|
278
258
|
}
|
|
279
259
|
|
|
280
260
|
appendInlineChildElement (element)
|
|
@@ -309,12 +289,36 @@ class DOMIntegration
|
|
|
309
289
|
|
|
310
290
|
// Add Inline elements, and connect to node events.
|
|
311
291
|
|
|
312
|
-
this .processInlineElements (
|
|
313
|
-
this .addEventDispatchersAll (
|
|
292
|
+
this .processInlineElements (X3DElement);
|
|
293
|
+
this .addEventDispatchersAll (X3DElement);
|
|
314
294
|
|
|
315
295
|
break;
|
|
316
296
|
}
|
|
317
297
|
}
|
|
298
|
+
|
|
299
|
+
switch (node .checkLoadState ())
|
|
300
|
+
{
|
|
301
|
+
case X3DConstants .COMPLETE_STATE:
|
|
302
|
+
{
|
|
303
|
+
const event = new CustomEvent ("load",
|
|
304
|
+
{
|
|
305
|
+
detail: { node: SFNodeCache .get (node) },
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
element .dispatchEvent (event);
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
case X3DConstants .FAILED_STATE:
|
|
312
|
+
{
|
|
313
|
+
const event = new CustomEvent ("error",
|
|
314
|
+
{
|
|
315
|
+
detail: { node: SFNodeCache .get (node) },
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
element .dispatchEvent (event);
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
318
322
|
}
|
|
319
323
|
|
|
320
324
|
addEventDispatchersAll (element)
|
|
@@ -356,9 +360,13 @@ class DOMIntegration
|
|
|
356
360
|
{
|
|
357
361
|
const node = $.data (element, "node");
|
|
358
362
|
|
|
359
|
-
|
|
363
|
+
if (! node)
|
|
364
|
+
return;
|
|
365
|
+
|
|
366
|
+
const event = new CustomEvent (field .getName (),
|
|
367
|
+
{
|
|
360
368
|
detail: {
|
|
361
|
-
node:
|
|
369
|
+
node: SFNodeCache .get (node),
|
|
362
370
|
value: field .valueOf (),
|
|
363
371
|
},
|
|
364
372
|
});
|
|
@@ -72,7 +72,8 @@ import _ from "../../locale/gettext.js";
|
|
|
72
72
|
const
|
|
73
73
|
_DOMIntegration = Symbol (),
|
|
74
74
|
_loader = Symbol (),
|
|
75
|
-
_browserCallbacks = Symbol ()
|
|
75
|
+
_browserCallbacks = Symbol (),
|
|
76
|
+
_console = Symbol ();
|
|
76
77
|
|
|
77
78
|
function X3DBrowser (element)
|
|
78
79
|
{
|
|
@@ -86,6 +87,7 @@ function X3DBrowser (element)
|
|
|
86
87
|
X3DBrowserContext .call (this, element);
|
|
87
88
|
|
|
88
89
|
this [_browserCallbacks] = new Map ();
|
|
90
|
+
this [_console] = document .getElementsByClassName ("x_ite-console");
|
|
89
91
|
|
|
90
92
|
this .setup ();
|
|
91
93
|
};
|
|
@@ -119,25 +121,28 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
|
|
|
119
121
|
|
|
120
122
|
if (this .getInstanceId () > 1) return;
|
|
121
123
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
124
|
+
$(() =>
|
|
125
|
+
{
|
|
126
|
+
this .print ("Welcome to " + this .name + " X3D Browser v" + this .version + ":\n" +
|
|
127
|
+
" Current Graphics Renderer\n" +
|
|
128
|
+
" Name: " + this .getVendor () + " " + this .getRenderer () + "\n" +
|
|
129
|
+
" WebGL version: " + this .getWebGLVersion () + "\n" +
|
|
130
|
+
" Shading language: " + this .getShadingLanguageVersion () + "\n" +
|
|
131
|
+
" Rendering Properties\n" +
|
|
132
|
+
" Antialiased: " + this .getAntialiased () + "\n" +
|
|
133
|
+
" Depth size: " + this .getDepthSize () + " bits\n" +
|
|
134
|
+
" Color depth: " + this .getColorDepth () + " bits\n" +
|
|
135
|
+
" Max clip planes per shape: " + this .getMaxClipPlanes () + "\n" +
|
|
136
|
+
" Max lights per shape: " + this .getMaxLights () + "\n" +
|
|
137
|
+
" Max multi textures per shape: " + this .getMaxTextures () + "\n" +
|
|
138
|
+
" Texture units: " + this .getMaxCombinedTextureUnits () + "\n" +
|
|
139
|
+
" Max texture size: " + this .getMaxTextureSize () + " × " + this .getMaxTextureSize () + " pixels\n" +
|
|
140
|
+
" Texture memory: " + this .getTextureMemory () + "\n" +
|
|
141
|
+
" Max vertex uniform vectors: " + this .getMaxVertexUniformVectors () + "\n" +
|
|
142
|
+
" Max fragment uniform vectors: " + this .getMaxFragmentUniformVectors () + "\n" +
|
|
143
|
+
" Max vertex attribs: " + this .getMaxVertexAttribs () + "\n" +
|
|
144
|
+
" Max varying vectors: " + this .getMaxVaryingVectors () + "\n");
|
|
145
|
+
});
|
|
141
146
|
},
|
|
142
147
|
getName: function ()
|
|
143
148
|
{
|
|
@@ -333,7 +338,7 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
|
|
|
333
338
|
if (loadCount .getValue ())
|
|
334
339
|
return;
|
|
335
340
|
|
|
336
|
-
|
|
341
|
+
loadCount .removeInterest ("checkLoadCount", this);
|
|
337
342
|
this .initialized () .set (this .getCurrentTime ());
|
|
338
343
|
this .initialized () .processInterests ();
|
|
339
344
|
this .callBrowserCallbacks (X3DConstants .INITIALIZED_EVENT);
|
|
@@ -781,23 +786,33 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
|
|
|
781
786
|
},
|
|
782
787
|
print: function ()
|
|
783
788
|
{
|
|
784
|
-
|
|
789
|
+
const string = Array .prototype .join .call (arguments, "");
|
|
790
|
+
|
|
791
|
+
console .log (string);
|
|
792
|
+
|
|
793
|
+
for (const element of this [_console])
|
|
794
|
+
element .append (document .createTextNode (string));
|
|
785
795
|
},
|
|
786
796
|
println: function ()
|
|
787
797
|
{
|
|
788
|
-
|
|
798
|
+
const string = Array .prototype .join .call (arguments, "");
|
|
799
|
+
|
|
800
|
+
console .log (string);
|
|
801
|
+
|
|
802
|
+
for (const element of this [_console])
|
|
803
|
+
element .append (document .createTextNode (string + "\n"));
|
|
789
804
|
},
|
|
790
|
-
toVRMLStream: function (
|
|
805
|
+
toVRMLStream: function (generator)
|
|
791
806
|
{
|
|
792
|
-
this .currentScene .toVRMLStream (
|
|
807
|
+
this .currentScene .toVRMLStream (generator);
|
|
793
808
|
},
|
|
794
|
-
toXMLStream: function (
|
|
809
|
+
toXMLStream: function (generator)
|
|
795
810
|
{
|
|
796
|
-
this .currentScene .toXMLStream (
|
|
811
|
+
this .currentScene .toXMLStream (generator);
|
|
797
812
|
},
|
|
798
|
-
toJSONStream: function (
|
|
813
|
+
toJSONStream: function (generator)
|
|
799
814
|
{
|
|
800
|
-
this .currentScene .toJSONStream (
|
|
815
|
+
this .currentScene .toJSONStream (generator);
|
|
801
816
|
},
|
|
802
817
|
});
|
|
803
818
|
|
|
@@ -341,6 +341,9 @@ Object .assign (X3DBrowserContext,
|
|
|
341
341
|
X3D = window [Symbol .for ("X_ITE.X3D")],
|
|
342
342
|
browser = X3D .getBrowser (canvas);
|
|
343
343
|
|
|
344
|
+
if (! browser)
|
|
345
|
+
return;
|
|
346
|
+
|
|
344
347
|
browserContext .call (browser);
|
|
345
348
|
|
|
346
349
|
if (typeof browserContext .prototype .initialize === "function")
|