x_ite 16.4.3 → 16.5.0
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/README.md +6 -6
- package/dist/assets/components/AnnotationComponent.js +1 -1
- package/dist/assets/components/AnnotationComponent.min.js +1 -1
- package/dist/assets/components/CADGeometryComponent.js +1 -1
- package/dist/assets/components/CADGeometryComponent.min.js +1 -1
- package/dist/assets/components/CubeMapTexturingComponent.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +1 -1
- package/dist/assets/components/DISComponent.min.js +1 -1
- package/dist/assets/components/EventUtilitiesComponent.js +1 -1
- package/dist/assets/components/EventUtilitiesComponent.min.js +1 -1
- package/dist/assets/components/GaussianSplatsComponent.js +1 -1
- package/dist/assets/components/GaussianSplatsComponent.min.js +1 -1
- package/dist/assets/components/Geometry2DComponent.js +1 -1
- package/dist/assets/components/Geometry2DComponent.min.js +1 -1
- package/dist/assets/components/Geometry3DComponent.js +1 -1
- package/dist/assets/components/Geometry3DComponent.min.js +1 -1
- package/dist/assets/components/GeospatialComponent.js +1 -1
- package/dist/assets/components/GeospatialComponent.min.js +1 -1
- package/dist/assets/components/HAnimComponent.js +5 -5
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +1 -1
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +1 -1
- package/dist/assets/components/LayoutComponent.js +1 -1
- package/dist/assets/components/LayoutComponent.min.js +1 -1
- package/dist/assets/components/NURBSComponent.js +1 -1
- package/dist/assets/components/NURBSComponent.min.js +1 -1
- package/dist/assets/components/ParticleSystemsComponent.js +1 -1
- package/dist/assets/components/ParticleSystemsComponent.min.js +1 -1
- package/dist/assets/components/PickingComponent.js +1 -1
- package/dist/assets/components/PickingComponent.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysicsComponent.js +1 -1
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +1 -1
- package/dist/assets/components/ScriptingComponent.js +1 -1
- package/dist/assets/components/ScriptingComponent.min.js +1 -1
- package/dist/assets/components/TextComponent.js +1 -1
- package/dist/assets/components/TextComponent.min.js +1 -1
- package/dist/assets/components/TextureProjectionComponent.js +1 -1
- package/dist/assets/components/TextureProjectionComponent.min.js +1 -1
- package/dist/assets/components/Texturing3DComponent.js +10 -10
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +1 -1
- package/dist/assets/components/VolumeRenderingComponent.min.js +1 -1
- package/dist/assets/components/WebXRComponent.js +1 -1
- package/dist/assets/components/WebXRComponent.min.js +1 -1
- package/dist/assets/components/X_ITEComponent.js +1 -1
- package/dist/assets/components/X_ITEComponent.min.js +1 -1
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +4 -0
- package/dist/x_ite.js +475 -483
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +475 -483
- package/dist/x_ite.zip +0 -0
- package/package.json +2 -1
package/dist/x_ite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* X_ITE v16.
|
|
1
|
+
/* X_ITE v16.5.0 */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
4
|
module.exports = factory();
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
return /******/ (() => { // webpackBootstrap
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
15
|
-
/***/
|
|
15
|
+
/***/ 829
|
|
16
16
|
(module, exports) {
|
|
17
17
|
|
|
18
18
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -1017,7 +1017,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1017
1017
|
|
|
1018
1018
|
/***/ },
|
|
1019
1019
|
|
|
1020
|
-
/***/
|
|
1020
|
+
/***/ 247
|
|
1021
1021
|
(module) {
|
|
1022
1022
|
|
|
1023
1023
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -2013,7 +2013,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
2013
2013
|
|
|
2014
2014
|
/***/ },
|
|
2015
2015
|
|
|
2016
|
-
/***/
|
|
2016
|
+
/***/ 67
|
|
2017
2017
|
(module) {
|
|
2018
2018
|
|
|
2019
2019
|
/**
|
|
@@ -7581,21 +7581,21 @@ Object .assign (Generator .prototype,
|
|
|
7581
7581
|
|
|
7582
7582
|
return false;
|
|
7583
7583
|
},
|
|
7584
|
-
ImportedName (
|
|
7584
|
+
ImportedName (importedNodeInstance)
|
|
7585
7585
|
{
|
|
7586
7586
|
const importedNames = this .importedNames .get (this .ExecutionContext ());
|
|
7587
7587
|
|
|
7588
|
-
if (importedNames .has (
|
|
7589
|
-
return importedNames .get (
|
|
7588
|
+
if (importedNames .has (importedNodeInstance))
|
|
7589
|
+
return importedNames .get (importedNodeInstance);
|
|
7590
7590
|
|
|
7591
7591
|
const
|
|
7592
7592
|
names = this .names .get (this .ExecutionContext ()),
|
|
7593
|
-
newName = getUniqueName (names,
|
|
7593
|
+
newName = getUniqueName (names, importedNodeInstance .getName ());
|
|
7594
7594
|
|
|
7595
7595
|
// Add to indices.
|
|
7596
7596
|
|
|
7597
7597
|
names .add (newName);
|
|
7598
|
-
importedNames .set (
|
|
7598
|
+
importedNames .set (importedNodeInstance, newName);
|
|
7599
7599
|
|
|
7600
7600
|
return newName;
|
|
7601
7601
|
},
|
|
@@ -7820,7 +7820,7 @@ Object .assign (Object .setPrototypeOf (JSONGenerator .prototype, X3DGenerator .
|
|
|
7820
7820
|
},
|
|
7821
7821
|
RemoveComma ()
|
|
7822
7822
|
{
|
|
7823
|
-
this .string = this .string .replace (/,\s
|
|
7823
|
+
this .string = this .string .replace (/,\s*$/, "");
|
|
7824
7824
|
},
|
|
7825
7825
|
stringProperty (key, value, comma = true)
|
|
7826
7826
|
{
|
|
@@ -8273,14 +8273,14 @@ Object .assign (X3DObject .prototype,
|
|
|
8273
8273
|
{
|
|
8274
8274
|
return this .constructor .typeName;
|
|
8275
8275
|
},
|
|
8276
|
-
setName (value)
|
|
8277
|
-
{
|
|
8278
|
-
this [_name] = value;
|
|
8279
|
-
},
|
|
8280
8276
|
getName ()
|
|
8281
8277
|
{
|
|
8282
8278
|
return this [_name];
|
|
8283
8279
|
},
|
|
8280
|
+
setName (value)
|
|
8281
|
+
{
|
|
8282
|
+
this [_name] = value;
|
|
8283
|
+
},
|
|
8284
8284
|
getDisplayName ()
|
|
8285
8285
|
{
|
|
8286
8286
|
return this [_name];
|
|
@@ -14361,14 +14361,14 @@ const SFNode_handler =
|
|
|
14361
14361
|
{
|
|
14362
14362
|
get (target, key)
|
|
14363
14363
|
{
|
|
14364
|
-
|
|
14364
|
+
try
|
|
14365
14365
|
{
|
|
14366
|
-
|
|
14367
|
-
node = target .getValue (),
|
|
14368
|
-
field = node ?.getField (key, false);
|
|
14369
|
-
|
|
14370
|
-
if (field)
|
|
14366
|
+
if (typeof key === "string")
|
|
14371
14367
|
{
|
|
14368
|
+
const
|
|
14369
|
+
node = target .getValue (),
|
|
14370
|
+
field = node ?.getField (key);
|
|
14371
|
+
|
|
14372
14372
|
// Specification conform would be: `accessType & X3DConstants .outputOnly`.
|
|
14373
14373
|
// However, we also allow read access to initializeOnly fields.
|
|
14374
14374
|
if (field .getAccessType () === Base_X3DConstants .inputOnly)
|
|
@@ -14377,19 +14377,21 @@ const SFNode_handler =
|
|
|
14377
14377
|
return field .valueOf ();
|
|
14378
14378
|
}
|
|
14379
14379
|
}
|
|
14380
|
+
catch
|
|
14381
|
+
{ }
|
|
14380
14382
|
|
|
14381
14383
|
return Reflect .get (target, key);
|
|
14382
14384
|
},
|
|
14383
14385
|
set (target, key, value)
|
|
14384
14386
|
{
|
|
14385
|
-
|
|
14387
|
+
try
|
|
14386
14388
|
{
|
|
14387
|
-
|
|
14388
|
-
node = target .getValue (),
|
|
14389
|
-
field = node ?.getField (key, false);
|
|
14390
|
-
|
|
14391
|
-
if (field)
|
|
14389
|
+
if (typeof key === "string")
|
|
14392
14390
|
{
|
|
14391
|
+
const
|
|
14392
|
+
node = target .getValue (),
|
|
14393
|
+
field = node ?.getField (key);
|
|
14394
|
+
|
|
14393
14395
|
if (field .getAccessType () === Base_X3DConstants .outputOnly)
|
|
14394
14396
|
return false;
|
|
14395
14397
|
|
|
@@ -14397,13 +14399,21 @@ const SFNode_handler =
|
|
|
14397
14399
|
return true;
|
|
14398
14400
|
}
|
|
14399
14401
|
}
|
|
14402
|
+
catch
|
|
14403
|
+
{ }
|
|
14400
14404
|
|
|
14401
14405
|
return Reflect .set (target, key, value);
|
|
14402
14406
|
},
|
|
14403
14407
|
has (target, key)
|
|
14404
14408
|
{
|
|
14405
|
-
|
|
14406
|
-
|
|
14409
|
+
try
|
|
14410
|
+
{
|
|
14411
|
+
return Boolean (target .getValue () ?.getField (key));
|
|
14412
|
+
}
|
|
14413
|
+
catch
|
|
14414
|
+
{
|
|
14415
|
+
return Reflect .has (target, key);
|
|
14416
|
+
}
|
|
14407
14417
|
},
|
|
14408
14418
|
ownKeys (target)
|
|
14409
14419
|
{
|
|
@@ -18444,7 +18454,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
|
|
|
18444
18454
|
{
|
|
18445
18455
|
return this [_fieldDefinitions];
|
|
18446
18456
|
},
|
|
18447
|
-
getField (name
|
|
18457
|
+
getField (name)
|
|
18448
18458
|
{
|
|
18449
18459
|
const field = getFieldFromArray (this [_userDefinedFields], name)
|
|
18450
18460
|
?? getFieldFromArray (this [_predefinedFields], name);
|
|
@@ -18452,8 +18462,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
|
|
|
18452
18462
|
if (field)
|
|
18453
18463
|
return field;
|
|
18454
18464
|
|
|
18455
|
-
|
|
18456
|
-
throw new Error (`Unknown field '${name}' in node class ${this .getTypeName ()}.`);
|
|
18465
|
+
throw new Error (`Unknown field '${name}' in node class ${this .getTypeName ()}.`);
|
|
18457
18466
|
},
|
|
18458
18467
|
getFields ()
|
|
18459
18468
|
{
|
|
@@ -18885,7 +18894,7 @@ const Legacy_default_ = Legacy;
|
|
|
18885
18894
|
|
|
18886
18895
|
/* harmony default export */ const Browser_Legacy = (x_ite_Namespace .add ("Legacy", Legacy_default_));
|
|
18887
18896
|
;// ./src/x_ite/BROWSER_VERSION.js
|
|
18888
|
-
const BROWSER_VERSION_default_ = "16.
|
|
18897
|
+
const BROWSER_VERSION_default_ = "16.5.0";
|
|
18889
18898
|
;
|
|
18890
18899
|
|
|
18891
18900
|
/* harmony default export */ const BROWSER_VERSION = (x_ite_Namespace .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
|
|
@@ -21398,6 +21407,7 @@ const URLs_default_ = URLs;
|
|
|
21398
21407
|
|
|
21399
21408
|
|
|
21400
21409
|
|
|
21410
|
+
|
|
21401
21411
|
const _metaDataCallbacks = Symbol ();
|
|
21402
21412
|
|
|
21403
21413
|
function X3DNode (executionContext)
|
|
@@ -21447,17 +21457,19 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
21447
21457
|
else
|
|
21448
21458
|
{
|
|
21449
21459
|
// Make a copy for a X3DPrototypeInstance.
|
|
21450
|
-
|
|
21460
|
+
|
|
21451
21461
|
const executionContext = instance .getBody ();
|
|
21452
21462
|
|
|
21453
21463
|
// First try to get a named node with the node's name.
|
|
21454
21464
|
|
|
21455
|
-
if (this .getName ()
|
|
21465
|
+
if (this .getName ())
|
|
21456
21466
|
{
|
|
21457
|
-
|
|
21458
|
-
|
|
21459
|
-
|
|
21460
|
-
|
|
21467
|
+
try
|
|
21468
|
+
{
|
|
21469
|
+
return executionContext .getLocalNode (this .getName ()) .getValue ();
|
|
21470
|
+
}
|
|
21471
|
+
catch
|
|
21472
|
+
{ }
|
|
21461
21473
|
}
|
|
21462
21474
|
|
|
21463
21475
|
// Create copy.
|
|
@@ -21468,7 +21480,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
21468
21480
|
if (this .getNeedsName ())
|
|
21469
21481
|
this .getExecutionContext () .updateNamedNode (this .getExecutionContext () .getUniqueName (), this);
|
|
21470
21482
|
|
|
21471
|
-
if (this .getName ()
|
|
21483
|
+
if (this .getName ())
|
|
21472
21484
|
executionContext .updateNamedNode (this .getName (), copy);
|
|
21473
21485
|
|
|
21474
21486
|
// Default fields
|
|
@@ -21569,7 +21581,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
21569
21581
|
},
|
|
21570
21582
|
getNeedsName ()
|
|
21571
21583
|
{
|
|
21572
|
-
if (this .getName ()
|
|
21584
|
+
if (this .getName ())
|
|
21573
21585
|
return false;
|
|
21574
21586
|
|
|
21575
21587
|
if (this .getCloneCount () > 1)
|
|
@@ -22295,7 +22307,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
22295
22307
|
if (cdata ?.length === 0)
|
|
22296
22308
|
cdata = null;
|
|
22297
22309
|
|
|
22298
|
-
if (!cdata ?.some (string => string .match (/^\s*(?:data|ecmascript|javascript|vrmlscript):/
|
|
22310
|
+
if (!cdata ?.some (string => string .match (/^\s*(?:data|ecmascript|javascript|vrmlscript):/)))
|
|
22299
22311
|
cdata = null;
|
|
22300
22312
|
|
|
22301
22313
|
generator .IncIndent ();
|
|
@@ -22574,7 +22586,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
22574
22586
|
if (sourceText ?.length !== 1)
|
|
22575
22587
|
sourceText = null;
|
|
22576
22588
|
|
|
22577
|
-
if (!sourceText ?.some (string => string .match (/^\s*(?:data|ecmascript|javascript|vrmlscript):/
|
|
22589
|
+
if (!sourceText ?.some (string => string .match (/^\s*(?:data|ecmascript|javascript|vrmlscript):/)))
|
|
22578
22590
|
sourceText = null;
|
|
22579
22591
|
|
|
22580
22592
|
// Predefined fields
|
|
@@ -22793,22 +22805,47 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
|
|
|
22793
22805
|
|
|
22794
22806
|
if (executionContext .isScene)
|
|
22795
22807
|
{
|
|
22796
|
-
//
|
|
22808
|
+
// Collect imported nodes in parent context.
|
|
22809
|
+
// This must be done before the exported nodes are removed.
|
|
22810
|
+
|
|
22811
|
+
const
|
|
22812
|
+
parentContext = executionContext .getExecutionContext (),
|
|
22813
|
+
importedNodes = [ ];
|
|
22814
|
+
|
|
22815
|
+
if (parentContext)
|
|
22816
|
+
{
|
|
22817
|
+
for (const importedNode of parentContext .getImportedNodes ())
|
|
22818
|
+
{
|
|
22819
|
+
if (helper.try (() => importedNode .getExportedNode ()) === this)
|
|
22820
|
+
importedNodes .push (importedNode);
|
|
22821
|
+
}
|
|
22822
|
+
}
|
|
22823
|
+
|
|
22824
|
+
// Remove exported nodes if any.
|
|
22797
22825
|
|
|
22798
22826
|
for (const exportedNode of Array .from (executionContext .getExportedNodes ()))
|
|
22799
22827
|
{
|
|
22800
|
-
if (exportedNode .getLocalNode ()
|
|
22801
|
-
|
|
22828
|
+
if (exportedNode .getLocalNode () !== this)
|
|
22829
|
+
continue;
|
|
22830
|
+
|
|
22831
|
+
executionContext .removeExportedNode (exportedNode .getExportedName ());
|
|
22802
22832
|
}
|
|
22803
22833
|
|
|
22804
|
-
//
|
|
22834
|
+
// Update imported node instances in parent context if any.
|
|
22835
|
+
// This must be done after the exported nodes are removed.
|
|
22805
22836
|
|
|
22806
|
-
const
|
|
22837
|
+
for (const importedNode of importedNodes)
|
|
22838
|
+
importedNode .getInstance () .update ();
|
|
22807
22839
|
|
|
22808
|
-
|
|
22840
|
+
// Update routes after the exported nodes are removed.
|
|
22841
|
+
|
|
22842
|
+
for (const field of this .getFields ())
|
|
22809
22843
|
{
|
|
22810
|
-
for (const
|
|
22811
|
-
|
|
22844
|
+
for (const route of Array .from (field .getInputRoutes ()))
|
|
22845
|
+
route .reconnect ();
|
|
22846
|
+
|
|
22847
|
+
for (const route of Array .from (field .getOutputRoutes ()))
|
|
22848
|
+
route .reconnect ();
|
|
22812
22849
|
}
|
|
22813
22850
|
}
|
|
22814
22851
|
|
|
@@ -23953,146 +23990,66 @@ const NamedNodesArray_default_ = NamedNodesArray;
|
|
|
23953
23990
|
;
|
|
23954
23991
|
|
|
23955
23992
|
/* harmony default export */ const Execution_NamedNodesArray = (x_ite_Namespace .add ("NamedNodesArray", NamedNodesArray_default_));
|
|
23956
|
-
;// ./src/x_ite/Components/Core/
|
|
23993
|
+
;// ./src/x_ite/Components/Core/X3DImportedNodeInstance.js
|
|
23957
23994
|
|
|
23958
23995
|
|
|
23959
23996
|
|
|
23960
23997
|
|
|
23961
23998
|
|
|
23962
|
-
const
|
|
23963
|
-
_importedName = Symbol (),
|
|
23964
|
-
_importedNode = Symbol (),
|
|
23965
|
-
X3DImportedNodeProxy_type = Symbol (),
|
|
23966
|
-
_functions = Symbol ();
|
|
23999
|
+
const _importedNode = Symbol ();
|
|
23967
24000
|
|
|
23968
|
-
|
|
23969
|
-
{
|
|
23970
|
-
get (target, key)
|
|
23971
|
-
{
|
|
23972
|
-
if (Reflect .has (target, key))
|
|
23973
|
-
return Reflect .get (target, key);
|
|
23974
|
-
|
|
23975
|
-
const node = target .getSharedNode ();
|
|
23976
|
-
|
|
23977
|
-
if (node)
|
|
23978
|
-
{
|
|
23979
|
-
const property = Reflect .get (node, key);
|
|
23980
|
-
|
|
23981
|
-
if (typeof property === "function")
|
|
23982
|
-
{
|
|
23983
|
-
return target [_functions] .get (key) ?? (() =>
|
|
23984
|
-
{
|
|
23985
|
-
const func = property .bind (node);
|
|
23986
|
-
|
|
23987
|
-
target [_functions] .set (key, func);
|
|
23988
|
-
|
|
23989
|
-
return func;
|
|
23990
|
-
})();
|
|
23991
|
-
}
|
|
23992
|
-
|
|
23993
|
-
return property;
|
|
23994
|
-
}
|
|
23995
|
-
},
|
|
23996
|
-
set (target, key, value)
|
|
23997
|
-
{
|
|
23998
|
-
if (Reflect .has (target, key))
|
|
23999
|
-
{
|
|
24000
|
-
return Reflect .set (target, key, value);
|
|
24001
|
-
}
|
|
24002
|
-
else
|
|
24003
|
-
{
|
|
24004
|
-
const node = target .getSharedNode ();
|
|
24005
|
-
|
|
24006
|
-
if (node)
|
|
24007
|
-
return Reflect .set (node, key, value);
|
|
24008
|
-
|
|
24009
|
-
return false;
|
|
24010
|
-
}
|
|
24011
|
-
},
|
|
24012
|
-
has (target, key)
|
|
24013
|
-
{
|
|
24014
|
-
return Reflect .has (target, key)
|
|
24015
|
-
|| Reflect .has (target .getSharedNode () ?? { }, key);
|
|
24016
|
-
},
|
|
24017
|
-
ownKeys (target)
|
|
24018
|
-
{
|
|
24019
|
-
return Array .from (new Set (Reflect .ownKeys (target)
|
|
24020
|
-
.concat (Reflect .ownKeys (target .getSharedNode () ?? { }))));
|
|
24021
|
-
},
|
|
24022
|
-
getOwnPropertyDescriptor (target, key)
|
|
24023
|
-
{
|
|
24024
|
-
return Reflect .getOwnPropertyDescriptor (target, key)
|
|
24025
|
-
?? Reflect .getOwnPropertyDescriptor (target .getSharedNode () ?? { }, key);
|
|
24026
|
-
},
|
|
24027
|
-
};
|
|
24028
|
-
|
|
24029
|
-
function X3DImportedNodeProxy (executionContext, importedName, type)
|
|
24001
|
+
function X3DImportedNodeInstance (executionContext, importedNode)
|
|
24030
24002
|
{
|
|
24031
24003
|
Core_X3DNode .call (this, executionContext);
|
|
24032
24004
|
|
|
24033
|
-
|
|
24034
|
-
|
|
24035
|
-
this [_importedName] = importedName;
|
|
24036
|
-
this [X3DImportedNodeProxy_type] = type;
|
|
24037
|
-
this [_functions] = new Map ();
|
|
24005
|
+
this .addType (Base_X3DConstants .X3DImportedNodeInstance);
|
|
24038
24006
|
|
|
24039
|
-
|
|
24007
|
+
// Private properties
|
|
24040
24008
|
|
|
24041
|
-
|
|
24009
|
+
this [_importedNode] = importedNode;
|
|
24042
24010
|
}
|
|
24043
24011
|
|
|
24044
|
-
Object .assign (Object .setPrototypeOf (
|
|
24012
|
+
Object .assign (Object .setPrototypeOf (X3DImportedNodeInstance .prototype, Core_X3DNode .prototype),
|
|
24045
24013
|
{
|
|
24046
24014
|
initialize ()
|
|
24047
24015
|
{
|
|
24048
24016
|
Core_X3DNode .prototype .initialize .call (this);
|
|
24049
24017
|
|
|
24050
|
-
this .
|
|
24018
|
+
this [_importedNode] .getInlineNode () ._loadState .addInterest ("update", this);
|
|
24051
24019
|
|
|
24052
24020
|
this .update ();
|
|
24053
24021
|
},
|
|
24054
|
-
|
|
24022
|
+
update ()
|
|
24055
24023
|
{
|
|
24056
|
-
|
|
24024
|
+
if (this [_importedNode] .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE)
|
|
24025
|
+
helper.try (() => this [_importedNode] .getExportedNode ()) ?.addInterest ("addNodeEvent", this);
|
|
24026
|
+
|
|
24027
|
+
this ._typeName_changed ?.setValue (Date .now () / 1000);
|
|
24028
|
+
|
|
24029
|
+
Base_X3DChildObject .prototype .addEvent .call (this);
|
|
24057
24030
|
},
|
|
24058
|
-
|
|
24031
|
+
getExtendedEventHandling ()
|
|
24059
24032
|
{
|
|
24060
|
-
|
|
24033
|
+
return false;
|
|
24061
24034
|
},
|
|
24062
|
-
|
|
24035
|
+
getInnerNode ()
|
|
24063
24036
|
{
|
|
24064
|
-
return
|
|
24037
|
+
return this [_importedNode] .getExportedNode () .getInnerNode ();
|
|
24065
24038
|
},
|
|
24066
24039
|
getImportedNode ()
|
|
24067
24040
|
{
|
|
24068
24041
|
return this [_importedNode];
|
|
24069
24042
|
},
|
|
24070
|
-
getInnerNode ()
|
|
24071
|
-
{
|
|
24072
|
-
return this [_importedNode] .getSharedNode () .getInnerNode ();
|
|
24073
|
-
},
|
|
24074
24043
|
getName ()
|
|
24075
24044
|
{
|
|
24076
|
-
return this [
|
|
24077
|
-
},
|
|
24078
|
-
setName (value)
|
|
24079
|
-
{
|
|
24080
|
-
this [_importedName] = value;
|
|
24081
|
-
|
|
24082
|
-
this ._name_changed ?.setValue (Date .now () / 1000);
|
|
24045
|
+
return this [_importedNode] .getImportedName ();
|
|
24083
24046
|
},
|
|
24084
24047
|
... Object .fromEntries ([
|
|
24085
|
-
|
|
24086
|
-
["getContainerField", "containerField"],
|
|
24087
|
-
["getSpecificationRange", "specificationRange"],
|
|
24088
|
-
["getTypeName", "typeName"],
|
|
24089
|
-
]
|
|
24090
|
-
.map (([fn, property]) => [fn, function ()
|
|
24091
|
-
{
|
|
24092
|
-
return this .getSharedNode () ?.[fn] () ?? this .constructor [property];
|
|
24093
|
-
}])),
|
|
24094
|
-
... Object .fromEntries ([
|
|
24048
|
+
"getTypeName",
|
|
24095
24049
|
"getType",
|
|
24050
|
+
"getComponentInfo",
|
|
24051
|
+
"getContainerField",
|
|
24052
|
+
"getSpecificationRange",
|
|
24096
24053
|
"getFieldDefinitions",
|
|
24097
24054
|
"getPredefinedField",
|
|
24098
24055
|
"getPredefinedFields",
|
|
@@ -24106,42 +24063,15 @@ Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3
|
|
|
24106
24063
|
]
|
|
24107
24064
|
.map (fn => [fn, function (... args)
|
|
24108
24065
|
{
|
|
24109
|
-
return
|
|
24066
|
+
return helper.try (() => this [_importedNode] .getExportedNode ()) ?.[fn] (... args)
|
|
24067
|
+
?? Core_X3DNode .prototype [fn] .call (this, ... args);
|
|
24110
24068
|
}])),
|
|
24111
|
-
update ()
|
|
24112
|
-
{
|
|
24113
|
-
const importedNode = this .getExecutionContext () .getImportedNodes () .get (this [_importedName])
|
|
24114
|
-
?? null;
|
|
24115
|
-
|
|
24116
|
-
this [_importedNode] ?.getInlineNode () ._loadState .removeInterest ("set_loadState__", this);
|
|
24117
|
-
|
|
24118
|
-
this [_importedNode] = importedNode;
|
|
24119
|
-
|
|
24120
|
-
this [_importedNode] ?.getInlineNode () ._loadState .addInterest ("set_loadState__", this);
|
|
24121
|
-
|
|
24122
|
-
this .set_loadState__ ();
|
|
24123
|
-
},
|
|
24124
|
-
set_loadState__ ()
|
|
24125
|
-
{
|
|
24126
|
-
if (this [_importedNode] ?.getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE)
|
|
24127
|
-
{
|
|
24128
|
-
const sharedNode = this .getSharedNode ();
|
|
24129
|
-
|
|
24130
|
-
this [X3DImportedNodeProxy_type] = sharedNode ?.constructor ?? this [X3DImportedNodeProxy_type];
|
|
24131
|
-
|
|
24132
|
-
sharedNode ?.addInterest ("addNodeEvent", this);
|
|
24133
|
-
}
|
|
24134
|
-
|
|
24135
|
-
this ._typeName_changed ?.setValue (Date .now () / 1000);
|
|
24136
|
-
|
|
24137
|
-
Base_X3DChildObject .prototype .addEvent .call (this);
|
|
24138
|
-
},
|
|
24139
24069
|
toVRMLStream (generator)
|
|
24140
24070
|
{
|
|
24141
24071
|
generator .CheckSpace ();
|
|
24142
24072
|
generator .string += "USE";
|
|
24143
24073
|
generator .Space ();
|
|
24144
|
-
generator .string += this [
|
|
24074
|
+
generator .string += this [_importedNode] .getImportedName ();
|
|
24145
24075
|
generator .NeedsSpace ();
|
|
24146
24076
|
},
|
|
24147
24077
|
toXMLStream (generator)
|
|
@@ -24151,36 +24081,48 @@ Object .assign (Object .setPrototypeOf (X3DImportedNodeProxy .prototype, Core_X3
|
|
|
24151
24081
|
if (generator .html && this .getTypeName () === "Script")
|
|
24152
24082
|
generator .attribute ("type", "model/x3d+xml");
|
|
24153
24083
|
|
|
24154
|
-
generator .attribute ("USE", this [
|
|
24084
|
+
generator .attribute ("USE", this [_importedNode] .getImportedName ());
|
|
24155
24085
|
generator .containerField (this .getContainerField ());
|
|
24156
24086
|
generator .closeTag (this .getTypeName ());
|
|
24157
24087
|
},
|
|
24158
24088
|
toJSONStream (generator)
|
|
24159
24089
|
{
|
|
24160
24090
|
generator .beginObject (this .getTypeName (), false, true);
|
|
24161
|
-
generator .stringProperty ("@USE", this [
|
|
24091
|
+
generator .stringProperty ("@USE", this [_importedNode] .getImportedName (), false);
|
|
24162
24092
|
generator .endObject ();
|
|
24163
24093
|
generator .endObject ();
|
|
24164
24094
|
},
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
Object .defineProperties (X3DImportedNodeProxy .prototype,
|
|
24168
|
-
{
|
|
24169
|
-
constructor:
|
|
24095
|
+
dispose ()
|
|
24170
24096
|
{
|
|
24171
|
-
|
|
24097
|
+
const executionContext = this .getExecutionContext ();
|
|
24098
|
+
|
|
24099
|
+
for (const route of Array .from (executionContext .getRoutes ()))
|
|
24172
24100
|
{
|
|
24173
|
-
|
|
24174
|
-
|
|
24175
|
-
|
|
24101
|
+
if (route .getSourceNode () === this)
|
|
24102
|
+
{
|
|
24103
|
+
executionContext .deleteRoute (route);
|
|
24104
|
+
continue;
|
|
24105
|
+
}
|
|
24106
|
+
|
|
24107
|
+
if (route .getDestinationNode () === this)
|
|
24108
|
+
{
|
|
24109
|
+
executionContext .deleteRoute (route);
|
|
24110
|
+
continue;
|
|
24111
|
+
}
|
|
24112
|
+
}
|
|
24113
|
+
|
|
24114
|
+
this .getImportedNode () .refreshInstance ();
|
|
24115
|
+
|
|
24116
|
+
Core_X3DNode .prototype .dispose .call (this);
|
|
24117
|
+
},
|
|
24176
24118
|
});
|
|
24177
24119
|
|
|
24178
|
-
Object .defineProperties (
|
|
24120
|
+
Object .defineProperties (X3DImportedNodeInstance, Core_X3DNode .getStaticProperties ("X3DImportedNodeInstance", "Core", 2, "children", "4.1"));
|
|
24179
24121
|
|
|
24180
|
-
const
|
|
24122
|
+
const X3DImportedNodeInstance_default_ = X3DImportedNodeInstance;
|
|
24181
24123
|
;
|
|
24182
24124
|
|
|
24183
|
-
/* harmony default export */ const
|
|
24125
|
+
/* harmony default export */ const Core_X3DImportedNodeInstance = (x_ite_Namespace .add ("X3DImportedNodeInstance", X3DImportedNodeInstance_default_));
|
|
24184
24126
|
;// ./src/x_ite/Execution/X3DImportedNode.js
|
|
24185
24127
|
|
|
24186
24128
|
|
|
@@ -24190,20 +24132,23 @@ const
|
|
|
24190
24132
|
X3DImportedNode_executionContext = Symbol (),
|
|
24191
24133
|
_inlineNode = Symbol (),
|
|
24192
24134
|
_exportedName = Symbol (),
|
|
24193
|
-
|
|
24194
|
-
|
|
24195
|
-
|
|
24135
|
+
_importedName = Symbol (),
|
|
24136
|
+
_instance = Symbol (),
|
|
24137
|
+
_description = Symbol ();
|
|
24196
24138
|
|
|
24197
24139
|
function X3DImportedNode (executionContext, inlineNode, exportedName, importedName, description)
|
|
24198
24140
|
{
|
|
24199
24141
|
Base_X3DObject .call (this);
|
|
24200
24142
|
|
|
24143
|
+
// Private properties
|
|
24144
|
+
|
|
24201
24145
|
this [X3DImportedNode_executionContext] = executionContext;
|
|
24202
24146
|
this [_inlineNode] = inlineNode;
|
|
24203
24147
|
this [_exportedName] = exportedName;
|
|
24204
|
-
this [
|
|
24148
|
+
this [_importedName] = importedName;
|
|
24205
24149
|
this [_description] = description;
|
|
24206
|
-
|
|
24150
|
+
|
|
24151
|
+
this .refreshInstance ();
|
|
24207
24152
|
}
|
|
24208
24153
|
|
|
24209
24154
|
Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObject .prototype),
|
|
@@ -24220,27 +24165,7 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
|
|
|
24220
24165
|
{
|
|
24221
24166
|
return this [_exportedName];
|
|
24222
24167
|
},
|
|
24223
|
-
getExportedNode (
|
|
24224
|
-
{
|
|
24225
|
-
const exportedNode = this [_exportedNodes] .get (this [X3DImportedNode_importedName]);
|
|
24226
|
-
|
|
24227
|
-
exportedNode ?.setTypeHint (type);
|
|
24228
|
-
|
|
24229
|
-
return exportedNode ?? this .createExportedNode (type);
|
|
24230
|
-
},
|
|
24231
|
-
createExportedNode (type)
|
|
24232
|
-
{
|
|
24233
|
-
const exportedNode = new Core_X3DImportedNodeProxy (this .getExecutionContext (), this [X3DImportedNode_importedName], type);
|
|
24234
|
-
|
|
24235
|
-
this [_exportedNodes] .set (this [X3DImportedNode_importedName], exportedNode);
|
|
24236
|
-
|
|
24237
|
-
return exportedNode;
|
|
24238
|
-
},
|
|
24239
|
-
updateExportedNode ()
|
|
24240
|
-
{
|
|
24241
|
-
this [_exportedNodes] .get (this [X3DImportedNode_importedName]) ?.update ();
|
|
24242
|
-
},
|
|
24243
|
-
getSharedNode ()
|
|
24168
|
+
getExportedNode ()
|
|
24244
24169
|
{
|
|
24245
24170
|
const exportedNode = this .getInlineNode () .getInternalScene () .getExportedNodes () .get (this [_exportedName]);
|
|
24246
24171
|
|
|
@@ -24251,20 +24176,26 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
|
|
|
24251
24176
|
},
|
|
24252
24177
|
getImportedName ()
|
|
24253
24178
|
{
|
|
24254
|
-
return this [
|
|
24179
|
+
return this [_importedName];
|
|
24255
24180
|
},
|
|
24256
|
-
|
|
24181
|
+
setImportName (importedName)
|
|
24257
24182
|
{
|
|
24258
|
-
|
|
24259
|
-
exportedNode = this .getExportedNode (),
|
|
24260
|
-
exportedNodes = this [_exportedNodes];
|
|
24183
|
+
this [_instance] .setName (importedName);
|
|
24261
24184
|
|
|
24262
|
-
|
|
24263
|
-
|
|
24185
|
+
this [_importedName] = importedName;
|
|
24186
|
+
},
|
|
24187
|
+
getInstance ()
|
|
24188
|
+
{
|
|
24189
|
+
return this [_instance];
|
|
24190
|
+
},
|
|
24191
|
+
refreshInstance ()
|
|
24192
|
+
{
|
|
24193
|
+
if (this [_instance] && !this [X3DImportedNode_executionContext] .getImportedNodes () .has (this [_importedName]))
|
|
24194
|
+
return;
|
|
24264
24195
|
|
|
24265
|
-
this [
|
|
24196
|
+
this [_instance] = new Core_X3DImportedNodeInstance (this [X3DImportedNode_executionContext], this);
|
|
24266
24197
|
|
|
24267
|
-
|
|
24198
|
+
this [_instance] .setup ();
|
|
24268
24199
|
},
|
|
24269
24200
|
getDescription ()
|
|
24270
24201
|
{
|
|
@@ -24279,9 +24210,9 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
|
|
|
24279
24210
|
if (!generator .ExistsNode (this .getInlineNode ()))
|
|
24280
24211
|
throw new Error ("X3DImportedNode.toVRMLStream: Inline node does not exist.");
|
|
24281
24212
|
|
|
24282
|
-
generator .AddRouteNode (this);
|
|
24213
|
+
generator .AddRouteNode (this .getInstance ());
|
|
24283
24214
|
|
|
24284
|
-
const importedName = generator .ImportedName (this);
|
|
24215
|
+
const importedName = generator .ImportedName (this .getInstance ());
|
|
24285
24216
|
|
|
24286
24217
|
generator .Indent ();
|
|
24287
24218
|
generator .string += "IMPORT";
|
|
@@ -24313,9 +24244,9 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
|
|
|
24313
24244
|
if (!generator .ExistsNode (this .getInlineNode ()))
|
|
24314
24245
|
throw new Error ("X3DImportedNode.toXMLStream: Inline node does not exist.");
|
|
24315
24246
|
|
|
24316
|
-
generator .AddRouteNode (this);
|
|
24247
|
+
generator .AddRouteNode (this .getInstance ());
|
|
24317
24248
|
|
|
24318
|
-
const importedName = generator .ImportedName (this);
|
|
24249
|
+
const importedName = generator .ImportedName (this .getInstance ());
|
|
24319
24250
|
|
|
24320
24251
|
generator .openTag ("IMPORT");
|
|
24321
24252
|
generator .attribute ("inlineDEF", generator .Name (this .getInlineNode ()));
|
|
@@ -24337,12 +24268,12 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
|
|
|
24337
24268
|
generator .TidyBreak ();
|
|
24338
24269
|
generator .Indent ();
|
|
24339
24270
|
|
|
24340
|
-
generator .AddRouteNode (this);
|
|
24271
|
+
generator .AddRouteNode (this .getInstance ());
|
|
24341
24272
|
generator .beginObject ("IMPORT", false, true);
|
|
24342
24273
|
generator .stringProperty ("@inlineDEF", generator .Name (this .getInlineNode ()), false);
|
|
24343
24274
|
generator .stringProperty ("@importedDEF", this .getExportedName ());
|
|
24344
24275
|
|
|
24345
|
-
const importedName = generator .ImportedName (this);
|
|
24276
|
+
const importedName = generator .ImportedName (this .getInstance ());
|
|
24346
24277
|
|
|
24347
24278
|
if (importedName !== this .getExportedName ())
|
|
24348
24279
|
generator .stringProperty ("@AS", importedName);
|
|
@@ -24355,20 +24286,9 @@ Object .assign (Object .setPrototypeOf (X3DImportedNode .prototype, Base_X3DObje
|
|
|
24355
24286
|
},
|
|
24356
24287
|
dispose ()
|
|
24357
24288
|
{
|
|
24358
|
-
|
|
24359
|
-
{
|
|
24360
|
-
if (route .getSourceNode () === this)
|
|
24361
|
-
{
|
|
24362
|
-
this [X3DImportedNode_executionContext] .deleteRoute (route);
|
|
24363
|
-
continue;
|
|
24364
|
-
}
|
|
24289
|
+
this [X3DImportedNode_executionContext] .removeImportedNode (this [_importedName]);
|
|
24365
24290
|
|
|
24366
|
-
|
|
24367
|
-
{
|
|
24368
|
-
this [X3DImportedNode_executionContext] .deleteRoute (route);
|
|
24369
|
-
continue;
|
|
24370
|
-
}
|
|
24371
|
-
}
|
|
24291
|
+
this .instance .dispose ();
|
|
24372
24292
|
|
|
24373
24293
|
Base_X3DObject .prototype .dispose .call (this);
|
|
24374
24294
|
},
|
|
@@ -24405,6 +24325,14 @@ Object .defineProperties (X3DImportedNode .prototype,
|
|
|
24405
24325
|
get: X3DImportedNode .prototype .getImportedName,
|
|
24406
24326
|
enumerable: true,
|
|
24407
24327
|
},
|
|
24328
|
+
instance:
|
|
24329
|
+
{
|
|
24330
|
+
get ()
|
|
24331
|
+
{
|
|
24332
|
+
return Fields_SFNodeCache .get (this .getInstance ());
|
|
24333
|
+
},
|
|
24334
|
+
enumerable: true,
|
|
24335
|
+
},
|
|
24408
24336
|
description:
|
|
24409
24337
|
{
|
|
24410
24338
|
get: X3DImportedNode .prototype .getDescription,
|
|
@@ -24766,11 +24694,14 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
|
|
|
24766
24694
|
|
|
24767
24695
|
this .set_live__ ();
|
|
24768
24696
|
|
|
24769
|
-
|
|
24770
|
-
|
|
24771
|
-
this .
|
|
24772
|
-
this .
|
|
24773
|
-
this .
|
|
24697
|
+
const protoBody = proto .getBody ();
|
|
24698
|
+
|
|
24699
|
+
this .addExternProtos (protoBody .externprotos);
|
|
24700
|
+
this .addProtos (protoBody .protos);
|
|
24701
|
+
this .copyNamedNodes (protoBody .namedNodes);
|
|
24702
|
+
this .copyImportedNodes (protoBody .importedNodes);
|
|
24703
|
+
this .copyRootNodes (protoBody .rootNodes);
|
|
24704
|
+
this .copyRoutes (protoBody .routes);
|
|
24774
24705
|
|
|
24775
24706
|
// Propagate events.
|
|
24776
24707
|
|
|
@@ -25030,20 +24961,25 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
|
|
|
25030
24961
|
|
|
25031
24962
|
return Core_X3DNode .prototype .isDefaultValue .call (this, field);
|
|
25032
24963
|
},
|
|
25033
|
-
|
|
24964
|
+
addExternProtos (externprotos1)
|
|
25034
24965
|
{
|
|
25035
24966
|
const externprotos2 = this [_body] .externprotos;
|
|
25036
24967
|
|
|
25037
24968
|
for (const externproto of externprotos1)
|
|
25038
24969
|
externprotos2 .add (externproto .getName (), externproto);
|
|
25039
24970
|
},
|
|
25040
|
-
|
|
24971
|
+
addProtos (protos1)
|
|
25041
24972
|
{
|
|
25042
24973
|
const protos2 = this [_body] .protos;
|
|
25043
24974
|
|
|
25044
24975
|
for (const proto of protos1)
|
|
25045
24976
|
protos2 .add (proto .getName (), proto);
|
|
25046
24977
|
},
|
|
24978
|
+
copyNamedNodes (namedNodes)
|
|
24979
|
+
{
|
|
24980
|
+
for (const node of namedNodes)
|
|
24981
|
+
node .copy (this);
|
|
24982
|
+
},
|
|
25047
24983
|
copyRootNodes (rootNodes1)
|
|
25048
24984
|
{
|
|
25049
24985
|
const rootNodes2 = this [_body] .getRootNodes ();
|
|
@@ -25051,15 +24987,17 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
|
|
|
25051
24987
|
for (const node of rootNodes1 .getValue ())
|
|
25052
24988
|
rootNodes2 .push (node .copy (this));
|
|
25053
24989
|
},
|
|
25054
|
-
|
|
24990
|
+
copyImportedNodes (importedNodes)
|
|
25055
24991
|
{
|
|
24992
|
+
const body = this [_body];
|
|
24993
|
+
|
|
25056
24994
|
for (const importedNode of importedNodes)
|
|
25057
24995
|
{
|
|
25058
24996
|
try
|
|
25059
24997
|
{
|
|
25060
|
-
const inlineNode =
|
|
24998
|
+
const inlineNode = body .getNamedNode (importedNode .getInlineNode () .getName ());
|
|
25061
24999
|
|
|
25062
|
-
|
|
25000
|
+
body .addImportedNode (inlineNode, importedNode .getExportedName (), importedNode .getImportedName ());
|
|
25063
25001
|
}
|
|
25064
25002
|
catch (error)
|
|
25065
25003
|
{
|
|
@@ -25069,19 +25007,17 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
|
|
|
25069
25007
|
},
|
|
25070
25008
|
copyRoutes (routes)
|
|
25071
25009
|
{
|
|
25010
|
+
const body = this [_body];
|
|
25011
|
+
|
|
25072
25012
|
for (const route of routes)
|
|
25073
25013
|
{
|
|
25074
25014
|
try
|
|
25075
25015
|
{
|
|
25076
|
-
const
|
|
25077
|
-
|
|
25078
|
-
|
|
25079
|
-
|
|
25080
|
-
const destinationNode = route .getDestinationNode () instanceof Core_X3DNode
|
|
25081
|
-
? this [_body] .getLocalNode (route .getDestinationNode () .getName ())
|
|
25082
|
-
: this [_body] .getLocalNode (route .getDestinationNode () .getImportedName ());
|
|
25016
|
+
const
|
|
25017
|
+
sourceNode = body .getLocalNode (route .getSourceNode () .getName ()),
|
|
25018
|
+
destinationNode = body .getLocalNode (route .getDestinationNode () .getName ());
|
|
25083
25019
|
|
|
25084
|
-
|
|
25020
|
+
body .addRoute (sourceNode, route .sourceField, destinationNode, route .destinationField);
|
|
25085
25021
|
}
|
|
25086
25022
|
catch (error)
|
|
25087
25023
|
{
|
|
@@ -26033,6 +25969,11 @@ Object .assign (X3DParser .prototype,
|
|
|
26033
25969
|
|
|
26034
25970
|
return values;
|
|
26035
25971
|
},
|
|
25972
|
+
checkColorName (color, name)
|
|
25973
|
+
{
|
|
25974
|
+
if (color .every (v => v === 1) && name .toLowerCase () !== "white" && name .match (/^[a-zA-Z]+$/))
|
|
25975
|
+
throw new Error ("Invalid color name.");
|
|
25976
|
+
},
|
|
26036
25977
|
sanitizeName (name = "")
|
|
26037
25978
|
{
|
|
26038
25979
|
// NonIdFirstChar
|
|
@@ -26236,7 +26177,7 @@ class Placeholder extends Core_X3DNode
|
|
|
26236
26177
|
localNode = this .#namedNodes .get (name) ?? this .#importedNodes .get (name);
|
|
26237
26178
|
|
|
26238
26179
|
const node = localNode instanceof Execution_X3DImportedNode
|
|
26239
|
-
? localNode .
|
|
26180
|
+
? localNode .getInstance ()
|
|
26240
26181
|
: localNode;
|
|
26241
26182
|
|
|
26242
26183
|
if (node)
|
|
@@ -26346,7 +26287,7 @@ const Grammar = Parser_Expressions ({
|
|
|
26346
26287
|
|
|
26347
26288
|
// Values
|
|
26348
26289
|
int32: /(?:0[xX][\da-fA-F]+)|(?:[+-]?\d+)/y,
|
|
26349
|
-
double: /[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/y,
|
|
26290
|
+
double: /(?!0[xX])[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?)/y,
|
|
26350
26291
|
doubleQuotes: /"/y,
|
|
26351
26292
|
noDoubleQuotes: /[^"]+/y,
|
|
26352
26293
|
|
|
@@ -26448,6 +26389,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
26448
26389
|
}
|
|
26449
26390
|
catch (error)
|
|
26450
26391
|
{
|
|
26392
|
+
if (DEVELOPMENT)
|
|
26393
|
+
console .error (error);
|
|
26394
|
+
|
|
26451
26395
|
throw new Error (this .getError (error), { cause: error });
|
|
26452
26396
|
}
|
|
26453
26397
|
},
|
|
@@ -26601,6 +26545,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
26601
26545
|
}
|
|
26602
26546
|
catch (error)
|
|
26603
26547
|
{
|
|
26548
|
+
if (DEVELOPMENT)
|
|
26549
|
+
console .error (error);
|
|
26550
|
+
|
|
26604
26551
|
throw new Error (this .getError (error), { cause: error });
|
|
26605
26552
|
}
|
|
26606
26553
|
})
|
|
@@ -26955,11 +26902,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
26955
26902
|
|
|
26956
26903
|
try
|
|
26957
26904
|
{
|
|
26958
|
-
|
|
26959
|
-
|
|
26960
|
-
return localNode instanceof Execution_X3DImportedNode
|
|
26961
|
-
? localNode .getExportedNode ()
|
|
26962
|
-
: localNode .getValue ();
|
|
26905
|
+
return this .getExecutionContext () .getLocalNode (nodeNameId) .getValue ();
|
|
26963
26906
|
}
|
|
26964
26907
|
catch
|
|
26965
26908
|
{
|
|
@@ -28000,7 +27943,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
28000
27943
|
|
|
28001
27944
|
if (Grammar .HTMLColor .parse (this))
|
|
28002
27945
|
{
|
|
28003
|
-
const color = this .convertColor (this .result [0] .replace (
|
|
27946
|
+
const color = this .convertColor (this .result [0] .replace (/^0x/i, "#"));
|
|
27947
|
+
|
|
27948
|
+
this .checkColorName (color, this .result [0]);
|
|
28004
27949
|
|
|
28005
27950
|
field .r = color [0];
|
|
28006
27951
|
field .g = color [1];
|
|
@@ -28033,12 +27978,28 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
28033
27978
|
|
|
28034
27979
|
return false;
|
|
28035
27980
|
},
|
|
27981
|
+
sfColor: new x_ite_Fields .SFColor (),
|
|
28036
27982
|
sfcolorValues (field)
|
|
28037
27983
|
{
|
|
28038
27984
|
const array = [ ];
|
|
28039
27985
|
|
|
28040
|
-
|
|
28041
|
-
|
|
27986
|
+
for (;;)
|
|
27987
|
+
{
|
|
27988
|
+
if (this .double ())
|
|
27989
|
+
{
|
|
27990
|
+
array .push (this .value);
|
|
27991
|
+
continue;
|
|
27992
|
+
}
|
|
27993
|
+
|
|
27994
|
+
// Try parse HTML/CSS color values.
|
|
27995
|
+
if (this .sfcolorValue (this .sfColor))
|
|
27996
|
+
{
|
|
27997
|
+
array .push (... this .sfColor);
|
|
27998
|
+
continue;
|
|
27999
|
+
}
|
|
28000
|
+
|
|
28001
|
+
break;
|
|
28002
|
+
}
|
|
28042
28003
|
|
|
28043
28004
|
field .setValue (array);
|
|
28044
28005
|
|
|
@@ -28081,7 +28042,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
28081
28042
|
|
|
28082
28043
|
if (Grammar .HTMLColor .parse (this))
|
|
28083
28044
|
{
|
|
28084
|
-
const color = this .convertColor (this .result [0] .replace (
|
|
28045
|
+
const color = this .convertColor (this .result [0] .replace (/^0x/i, "#"));
|
|
28046
|
+
|
|
28047
|
+
this .checkColorName (color, this .result [0]);
|
|
28085
28048
|
|
|
28086
28049
|
field .r = color [0];
|
|
28087
28050
|
field .g = color [1];
|
|
@@ -28105,7 +28068,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
28105
28068
|
|
|
28106
28069
|
if (Grammar .OpenBracket .parse (this))
|
|
28107
28070
|
{
|
|
28108
|
-
this .
|
|
28071
|
+
this .sfcolorrgbaValues (field);
|
|
28109
28072
|
|
|
28110
28073
|
if (Grammar .CloseBracket .parse (this))
|
|
28111
28074
|
return true;
|
|
@@ -28115,6 +28078,33 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
|
|
|
28115
28078
|
|
|
28116
28079
|
return false;
|
|
28117
28080
|
},
|
|
28081
|
+
sfColorRGBA: new x_ite_Fields .SFColorRGBA (),
|
|
28082
|
+
sfcolorrgbaValues (field)
|
|
28083
|
+
{
|
|
28084
|
+
const array = [ ];
|
|
28085
|
+
|
|
28086
|
+
for (;;)
|
|
28087
|
+
{
|
|
28088
|
+
if (this .double ())
|
|
28089
|
+
{
|
|
28090
|
+
array .push (this .value);
|
|
28091
|
+
continue;
|
|
28092
|
+
}
|
|
28093
|
+
|
|
28094
|
+
// Try parse HTML/CSS color values.
|
|
28095
|
+
if (this .sfcolorrgbaValue (this .sfColorRGBA))
|
|
28096
|
+
{
|
|
28097
|
+
array .push (... this .sfColorRGBA);
|
|
28098
|
+
continue;
|
|
28099
|
+
}
|
|
28100
|
+
|
|
28101
|
+
break;
|
|
28102
|
+
}
|
|
28103
|
+
|
|
28104
|
+
field .setValue (array);
|
|
28105
|
+
|
|
28106
|
+
return field .length !== 0;
|
|
28107
|
+
},
|
|
28118
28108
|
sfdoubleValue (field)
|
|
28119
28109
|
{
|
|
28120
28110
|
if (this .double ())
|
|
@@ -29885,11 +29875,7 @@ Object .assign (Object .setPrototypeOf (XMLParser .prototype, Parser_X3DParser .
|
|
|
29885
29875
|
|
|
29886
29876
|
try
|
|
29887
29877
|
{
|
|
29888
|
-
const
|
|
29889
|
-
|
|
29890
|
-
const node = localNode instanceof Execution_X3DImportedNode
|
|
29891
|
-
? localNode .getExportedNode (type)
|
|
29892
|
-
: localNode .getValue ();
|
|
29878
|
+
const node = this .getExecutionContext () .getLocalNode (name) .getValue ();
|
|
29893
29879
|
|
|
29894
29880
|
this .checkNodeType (node, name, type, typeName);
|
|
29895
29881
|
this .addNode (xmlElement, node);
|
|
@@ -29918,6 +29904,9 @@ Object .assign (Object .setPrototypeOf (XMLParser .prototype, Parser_X3DParser .
|
|
|
29918
29904
|
},
|
|
29919
29905
|
checkNodeType (node, name, type, typeName)
|
|
29920
29906
|
{
|
|
29907
|
+
if (node instanceof Core_X3DImportedNodeInstance)
|
|
29908
|
+
return;
|
|
29909
|
+
|
|
29921
29910
|
if (type === Core_X3DNode)
|
|
29922
29911
|
return;
|
|
29923
29912
|
|
|
@@ -31192,7 +31181,7 @@ const Plane3_default_ = Plane3;
|
|
|
31192
31181
|
|
|
31193
31182
|
/* harmony default export */ const Geometry_Plane3 = (x_ite_Namespace .add ("Plane3", Plane3_default_));
|
|
31194
31183
|
;// ./src/standard/Math/Geometry/Triangle3.js
|
|
31195
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
31184
|
+
/* provided dependency */ var libtess = __webpack_require__(67);
|
|
31196
31185
|
|
|
31197
31186
|
|
|
31198
31187
|
const Triangle3 =
|
|
@@ -37886,7 +37875,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
|
|
|
37886
37875
|
{
|
|
37887
37876
|
fileURL = new URL (fileURL);
|
|
37888
37877
|
|
|
37889
|
-
if (fileURL .pathname .match (/\.ktx2?(?:\.gz)?$/) || fileURL .href .match (/^\s*data:image\/ktx2[;,]/
|
|
37878
|
+
if (fileURL .pathname .match (/\.ktx2?(?:\.gz)?$/) || fileURL .href .match (/^\s*data:image\/ktx2[;,]/))
|
|
37890
37879
|
{
|
|
37891
37880
|
this .setLinear (true);
|
|
37892
37881
|
this .setMipMaps (false);
|
|
@@ -47914,7 +47903,7 @@ const Bezier_default_ = Bezier;
|
|
|
47914
47903
|
|
|
47915
47904
|
/* harmony default export */ const Algorithms_Bezier = (x_ite_Namespace .add ("Bezier", Bezier_default_));
|
|
47916
47905
|
;// ./src/x_ite/Parser/SVGParser.js
|
|
47917
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
47906
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(67);
|
|
47918
47907
|
|
|
47919
47908
|
|
|
47920
47909
|
|
|
@@ -50773,9 +50762,15 @@ class GoldenGate extends Parser_X3DParser
|
|
|
50773
50762
|
if (string === undefined)
|
|
50774
50763
|
return;
|
|
50775
50764
|
|
|
50776
|
-
|
|
50765
|
+
// An empty string should result in an empty XML (encoding) scene.
|
|
50766
|
+
if (string .match (/^\s*$/))
|
|
50777
50767
|
return "";
|
|
50778
50768
|
|
|
50769
|
+
// XML must start with markup. Do not try DOMParser on other input, because
|
|
50770
|
+
// some browsers (Firefox) log a parsing error to the console when it fails.
|
|
50771
|
+
if (!string .match (/^\s*</))
|
|
50772
|
+
return;
|
|
50773
|
+
|
|
50779
50774
|
return helper.parseXML (string);
|
|
50780
50775
|
}
|
|
50781
50776
|
case "JSON":
|
|
@@ -51196,9 +51191,6 @@ class FileLoader
|
|
|
51196
51191
|
{
|
|
51197
51192
|
const scene = new Execution_X3DScene (this .browser);
|
|
51198
51193
|
|
|
51199
|
-
if (!(this .node instanceof Execution_X3DWorld))
|
|
51200
|
-
scene .setExecutionContext (this .executionContext);
|
|
51201
|
-
|
|
51202
51194
|
scene .setWorldURL (new URL (worldURL, this .getBaseURL ()));
|
|
51203
51195
|
scene .setup ();
|
|
51204
51196
|
|
|
@@ -51303,7 +51295,7 @@ class FileLoader
|
|
|
51303
51295
|
|
|
51304
51296
|
// Script:
|
|
51305
51297
|
{
|
|
51306
|
-
const result = url .match (/^\s*(?:ecmascript|javascript|vrmlscript):/
|
|
51298
|
+
const result = url .match (/^\s*(?:ecmascript|javascript|vrmlscript):/);
|
|
51307
51299
|
|
|
51308
51300
|
if (result)
|
|
51309
51301
|
return await this .dataCallback (url .substring (result [0] .length));
|
|
@@ -51314,7 +51306,7 @@ class FileLoader
|
|
|
51314
51306
|
// Handle data URLs that are not base64 decoded here:
|
|
51315
51307
|
if (this .dataAsString)
|
|
51316
51308
|
{
|
|
51317
|
-
const result = url .match (/^\s*data:(.*?)(?:;charset=(.*?))?(?:;(base64))?,/
|
|
51309
|
+
const result = url .match (/^\s*data:(.*?)(?:;charset=(.*?))?(?:;(base64))?,/);
|
|
51318
51310
|
|
|
51319
51311
|
if (result && result [3] !== "base64")
|
|
51320
51312
|
{
|
|
@@ -51942,8 +51934,6 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
51942
51934
|
|
|
51943
51935
|
|
|
51944
51936
|
|
|
51945
|
-
|
|
51946
|
-
|
|
51947
51937
|
const
|
|
51948
51938
|
X3DRoute_executionContext = Symbol (),
|
|
51949
51939
|
_sourceNode = Symbol (),
|
|
@@ -51951,8 +51941,7 @@ const
|
|
|
51951
51941
|
_sourceField = Symbol (),
|
|
51952
51942
|
_destinationNode = Symbol (),
|
|
51953
51943
|
_destinationFieldName = Symbol (),
|
|
51954
|
-
_destinationField = Symbol ()
|
|
51955
|
-
_disposed = Symbol ();
|
|
51944
|
+
_destinationField = Symbol ();
|
|
51956
51945
|
|
|
51957
51946
|
function X3DRoute (executionContext, sourceNode, sourceFieldName, destinationNode, destinationFieldName)
|
|
51958
51947
|
{
|
|
@@ -51964,11 +51953,11 @@ function X3DRoute (executionContext, sourceNode, sourceFieldName, destinationNod
|
|
|
51964
51953
|
this [_destinationNode] = destinationNode;
|
|
51965
51954
|
this [_destinationFieldName] = destinationFieldName;
|
|
51966
51955
|
|
|
51967
|
-
if (sourceNode instanceof
|
|
51968
|
-
sourceNode .getInlineNode () ._loadState .addInterest ("reconnect", this);
|
|
51956
|
+
if (sourceNode instanceof Core_X3DImportedNodeInstance)
|
|
51957
|
+
sourceNode .getImportedNode () .getInlineNode () ._loadState .addInterest ("reconnect", this);
|
|
51969
51958
|
|
|
51970
|
-
if (destinationNode instanceof
|
|
51971
|
-
destinationNode .getInlineNode () ._loadState .addInterest ("reconnect", this);
|
|
51959
|
+
if (destinationNode instanceof Core_X3DImportedNodeInstance)
|
|
51960
|
+
destinationNode .getImportedNode () .getInlineNode () ._loadState .addInterest ("reconnect", this);
|
|
51972
51961
|
|
|
51973
51962
|
this .reconnect ();
|
|
51974
51963
|
}
|
|
@@ -51979,17 +51968,8 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
51979
51968
|
{
|
|
51980
51969
|
return this [X3DRoute_executionContext];
|
|
51981
51970
|
},
|
|
51982
|
-
getRouteId ()
|
|
51983
|
-
{
|
|
51984
|
-
return X3DRoute .getRouteId (this [_sourceNode], this [_sourceFieldName], this [_destinationNode], this [_destinationFieldName]);
|
|
51985
|
-
},
|
|
51986
51971
|
getSourceNode ()
|
|
51987
51972
|
{
|
|
51988
|
-
/// SAI
|
|
51989
|
-
|
|
51990
|
-
if (this [_sourceNode] instanceof Execution_X3DImportedNode)
|
|
51991
|
-
return this [_sourceNode] .getExportedNode ();
|
|
51992
|
-
|
|
51993
51973
|
return this [_sourceNode];
|
|
51994
51974
|
},
|
|
51995
51975
|
getSourceField ()
|
|
@@ -52010,11 +51990,6 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
52010
51990
|
},
|
|
52011
51991
|
getDestinationNode ()
|
|
52012
51992
|
{
|
|
52013
|
-
/// SAI
|
|
52014
|
-
|
|
52015
|
-
if (this [_destinationNode] instanceof Execution_X3DImportedNode)
|
|
52016
|
-
return this [_destinationNode] .getExportedNode ();
|
|
52017
|
-
|
|
52018
51993
|
return this [_destinationNode];
|
|
52019
51994
|
},
|
|
52020
51995
|
getDestinationField ()
|
|
@@ -52041,10 +52016,10 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
52041
52016
|
}
|
|
52042
52017
|
catch (error)
|
|
52043
52018
|
{
|
|
52044
|
-
if ((this [_sourceNode] instanceof
|
|
52045
|
-
this [_sourceNode] .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE) &&
|
|
52046
|
-
(this [_destinationNode] instanceof
|
|
52047
|
-
this [_destinationNode] .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE))
|
|
52019
|
+
if ((!(this [_sourceNode] instanceof Core_X3DImportedNodeInstance) ||
|
|
52020
|
+
this [_sourceNode] .getImportedNode () .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE) &&
|
|
52021
|
+
(!(this [_destinationNode] instanceof Core_X3DImportedNodeInstance) ||
|
|
52022
|
+
this [_destinationNode] .getImportedNode () .getInlineNode () .checkLoadState () === Base_X3DConstants .COMPLETE_STATE))
|
|
52048
52023
|
{
|
|
52049
52024
|
console .warn (error);
|
|
52050
52025
|
}
|
|
@@ -52052,18 +52027,11 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
52052
52027
|
},
|
|
52053
52028
|
connect ()
|
|
52054
52029
|
{
|
|
52055
|
-
if (this [_disposed])
|
|
52056
|
-
return;
|
|
52057
|
-
|
|
52058
52030
|
const errors = [ ];
|
|
52059
52031
|
|
|
52060
52032
|
try
|
|
52061
52033
|
{
|
|
52062
|
-
|
|
52063
|
-
? this [_sourceNode]
|
|
52064
|
-
: this [_sourceNode] .getExportedNode ();
|
|
52065
|
-
|
|
52066
|
-
this [_sourceField] = sourceNode .getField (this [_sourceFieldName]);
|
|
52034
|
+
this [_sourceField] = this [_sourceNode] .getField (this [_sourceFieldName]);
|
|
52067
52035
|
}
|
|
52068
52036
|
catch (error)
|
|
52069
52037
|
{
|
|
@@ -52072,11 +52040,7 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
52072
52040
|
|
|
52073
52041
|
try
|
|
52074
52042
|
{
|
|
52075
|
-
|
|
52076
|
-
? this [_destinationNode]
|
|
52077
|
-
: this [_destinationNode] .getExportedNode ();
|
|
52078
|
-
|
|
52079
|
-
this [_destinationField] = destinationNode .getField (this [_destinationFieldName]);
|
|
52043
|
+
this [_destinationField] = this [_destinationNode] .getField (this [_destinationFieldName]);
|
|
52080
52044
|
}
|
|
52081
52045
|
catch (error)
|
|
52082
52046
|
{
|
|
@@ -52115,13 +52079,13 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
52115
52079
|
if (!generator .ExistsRouteNode (this [_destinationNode]))
|
|
52116
52080
|
throw new Error (`Destination node does not exist in scene graph.`);
|
|
52117
52081
|
|
|
52118
|
-
const sourceNodeName = this [_sourceNode] instanceof
|
|
52119
|
-
? generator .
|
|
52120
|
-
: generator .
|
|
52082
|
+
const sourceNodeName = this [_sourceNode] instanceof Core_X3DImportedNodeInstance
|
|
52083
|
+
? generator .ImportedName (this [_sourceNode])
|
|
52084
|
+
: generator .Name (this [_sourceNode]);
|
|
52121
52085
|
|
|
52122
|
-
const destinationNodeName = this [_destinationNode] instanceof
|
|
52123
|
-
? generator .
|
|
52124
|
-
: generator .
|
|
52086
|
+
const destinationNodeName = this [_destinationNode] instanceof Core_X3DImportedNodeInstance
|
|
52087
|
+
? generator .ImportedName (this [_destinationNode])
|
|
52088
|
+
: generator .Name (this [_destinationNode]);
|
|
52125
52089
|
|
|
52126
52090
|
generator .Indent ();
|
|
52127
52091
|
generator .string += "ROUTE";
|
|
@@ -52144,13 +52108,13 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
52144
52108
|
if (!generator .ExistsRouteNode (this [_destinationNode]))
|
|
52145
52109
|
throw new Error (`Destination node does not exist in scene graph.`);
|
|
52146
52110
|
|
|
52147
|
-
const sourceNodeName = this [_sourceNode] instanceof
|
|
52148
|
-
? generator .
|
|
52149
|
-
: generator .
|
|
52111
|
+
const sourceNodeName = this [_sourceNode] instanceof Core_X3DImportedNodeInstance
|
|
52112
|
+
? generator .ImportedName (this [_sourceNode])
|
|
52113
|
+
: generator .Name (this [_sourceNode]);
|
|
52150
52114
|
|
|
52151
|
-
const destinationNodeName = this [_destinationNode] instanceof
|
|
52152
|
-
? generator .
|
|
52153
|
-
: generator .
|
|
52115
|
+
const destinationNodeName = this [_destinationNode] instanceof Core_X3DImportedNodeInstance
|
|
52116
|
+
? generator .ImportedName (this [_destinationNode])
|
|
52117
|
+
: generator .Name (this [_destinationNode]);
|
|
52154
52118
|
|
|
52155
52119
|
generator .openTag ("ROUTE");
|
|
52156
52120
|
generator .attribute ("fromNode", sourceNodeName);
|
|
@@ -52167,13 +52131,13 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
52167
52131
|
if (!generator .ExistsRouteNode (this [_destinationNode]))
|
|
52168
52132
|
throw new Error (`Destination node does not exist in scene graph.`);
|
|
52169
52133
|
|
|
52170
|
-
const sourceNodeName = this [_sourceNode] instanceof
|
|
52171
|
-
? generator .
|
|
52172
|
-
: generator .
|
|
52134
|
+
const sourceNodeName = this [_sourceNode] instanceof Core_X3DImportedNodeInstance
|
|
52135
|
+
? generator .ImportedName (this [_sourceNode])
|
|
52136
|
+
: generator .Name (this [_sourceNode]);
|
|
52173
52137
|
|
|
52174
|
-
const destinationNodeName = this [_destinationNode] instanceof
|
|
52175
|
-
? generator .
|
|
52176
|
-
: generator .
|
|
52138
|
+
const destinationNodeName = this [_destinationNode] instanceof Core_X3DImportedNodeInstance
|
|
52139
|
+
? generator .ImportedName (this [_destinationNode])
|
|
52140
|
+
: generator .Name (this [_destinationNode]);
|
|
52177
52141
|
|
|
52178
52142
|
generator .TidyBreak ();
|
|
52179
52143
|
generator .Indent ();
|
|
@@ -52190,18 +52154,13 @@ Object .assign (Object .setPrototypeOf (X3DRoute .prototype, Base_X3DObject .pro
|
|
|
52190
52154
|
},
|
|
52191
52155
|
dispose ()
|
|
52192
52156
|
{
|
|
52193
|
-
if (this [_disposed])
|
|
52194
|
-
return;
|
|
52195
|
-
|
|
52196
|
-
this [_disposed] = true;
|
|
52197
|
-
|
|
52198
52157
|
this .disconnect ();
|
|
52199
52158
|
|
|
52200
|
-
if (this [_sourceNode] instanceof
|
|
52201
|
-
this [_sourceNode] .getInlineNode () ._loadState .removeInterest ("reconnect", this);
|
|
52159
|
+
if (this [_sourceNode] instanceof Core_X3DImportedNodeInstance)
|
|
52160
|
+
this [_sourceNode] .getImportedNode () .getInlineNode () ._loadState .removeInterest ("reconnect", this);
|
|
52202
52161
|
|
|
52203
|
-
if (this [_destinationNode] instanceof
|
|
52204
|
-
this [_destinationNode] .getInlineNode () ._loadState .removeInterest ("reconnect", this);
|
|
52162
|
+
if (this [_destinationNode] instanceof Core_X3DImportedNodeInstance)
|
|
52163
|
+
this [_destinationNode] .getImportedNode () .getInlineNode () ._loadState .removeInterest ("reconnect", this);
|
|
52205
52164
|
|
|
52206
52165
|
this [X3DRoute_executionContext] .deleteRoute (this);
|
|
52207
52166
|
|
|
@@ -52253,36 +52212,6 @@ Object .defineProperties (X3DRoute,
|
|
|
52253
52212
|
|
|
52254
52213
|
Object .assign (X3DRoute,
|
|
52255
52214
|
{
|
|
52256
|
-
getRouteId (sourceNode, sourceFieldName, destinationNode, destinationFieldName)
|
|
52257
|
-
{
|
|
52258
|
-
const sourceField = sourceNode instanceof Core_X3DNode
|
|
52259
|
-
? sourceNode .getField (sourceFieldName)
|
|
52260
|
-
: helper.try (() => sourceNode .getExportedNode () .getField (sourceFieldName));
|
|
52261
|
-
|
|
52262
|
-
const destinationField = destinationNode instanceof Core_X3DNode
|
|
52263
|
-
? destinationNode .getField (destinationFieldName)
|
|
52264
|
-
: helper.try (() => destinationNode .getExportedNode () .getField (destinationFieldName));
|
|
52265
|
-
|
|
52266
|
-
X3DRoute .checkFields (sourceField, destinationField);
|
|
52267
|
-
|
|
52268
|
-
if (sourceField)
|
|
52269
|
-
{
|
|
52270
|
-
sourceFieldName = sourceField .getName ();
|
|
52271
|
-
|
|
52272
|
-
if (sourceField .getAccessType () === Base_X3DConstants .inputOutput)
|
|
52273
|
-
sourceFieldName += "_changed";
|
|
52274
|
-
}
|
|
52275
|
-
|
|
52276
|
-
if (destinationField)
|
|
52277
|
-
{
|
|
52278
|
-
destinationFieldName = destinationField .getName ();
|
|
52279
|
-
|
|
52280
|
-
if (destinationField .getAccessType () === Base_X3DConstants .inputOutput)
|
|
52281
|
-
destinationFieldName = "set_" + destinationFieldName;
|
|
52282
|
-
}
|
|
52283
|
-
|
|
52284
|
-
return `${sourceNode .getId ()}.${sourceFieldName}.${destinationNode .getId ()}.${destinationFieldName}`;
|
|
52285
|
-
},
|
|
52286
52215
|
checkFields (sourceField, destinationField)
|
|
52287
52216
|
{
|
|
52288
52217
|
if (sourceField && destinationField)
|
|
@@ -52355,6 +52284,7 @@ const RouteArray_default_ = RouteArray;
|
|
|
52355
52284
|
|
|
52356
52285
|
|
|
52357
52286
|
|
|
52287
|
+
|
|
52358
52288
|
const
|
|
52359
52289
|
_outerNode = Symbol (),
|
|
52360
52290
|
_namedNodes = Symbol (),
|
|
@@ -52563,10 +52493,13 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52563
52493
|
if (!node)
|
|
52564
52494
|
throw new Error ("Couldn't add named node: node must be of type X3DNode.");
|
|
52565
52495
|
|
|
52496
|
+
if (node instanceof Core_X3DImportedNodeInstance)
|
|
52497
|
+
throw new Error ("Couldn't add named node: node cannot be of type X3DImportedNodeInstance.");
|
|
52498
|
+
|
|
52566
52499
|
if (node .getExecutionContext () !== this)
|
|
52567
52500
|
throw new Error ("Couldn't add named node: node does not belong to this execution context.");
|
|
52568
52501
|
|
|
52569
|
-
if (name
|
|
52502
|
+
if (!name)
|
|
52570
52503
|
throw new Error ("Couldn't add named node: node name is empty.");
|
|
52571
52504
|
|
|
52572
52505
|
if (this [_namedNodes] .has (name))
|
|
@@ -52589,10 +52522,13 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52589
52522
|
if (!node)
|
|
52590
52523
|
throw new Error ("Couldn't update named node: node must be of type X3DNode.");
|
|
52591
52524
|
|
|
52525
|
+
if (node instanceof Core_X3DImportedNodeInstance)
|
|
52526
|
+
throw new Error ("Couldn't add named node: node cannot be of type X3DImportedNodeInstance.");
|
|
52527
|
+
|
|
52592
52528
|
if (node .getExecutionContext () !== this)
|
|
52593
52529
|
throw new Error ("Couldn't update named node: node does not belong to this execution context.");
|
|
52594
52530
|
|
|
52595
|
-
if (name
|
|
52531
|
+
if (!name)
|
|
52596
52532
|
throw new Error ("Couldn't update named node: node name is empty.");
|
|
52597
52533
|
|
|
52598
52534
|
// Remove named node.
|
|
@@ -52661,10 +52597,10 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52661
52597
|
if (inlineNode .getExecutionContext () !== this)
|
|
52662
52598
|
throw new Error ("Couldn't update imported node: Inline node does not belong to this execution context.");
|
|
52663
52599
|
|
|
52664
|
-
if (exportedName
|
|
52600
|
+
if (!exportedName)
|
|
52665
52601
|
throw new Error ("Couldn't update imported node: exported name is empty.");
|
|
52666
52602
|
|
|
52667
|
-
if (importedName
|
|
52603
|
+
if (!importedName)
|
|
52668
52604
|
throw new Error ("Couldn't update imported node: imported name is empty.");
|
|
52669
52605
|
|
|
52670
52606
|
// Update imported node.
|
|
@@ -52675,8 +52611,6 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52675
52611
|
|
|
52676
52612
|
this [_importedNodes] .add (importedName, importedNode);
|
|
52677
52613
|
|
|
52678
|
-
importedNode .updateExportedNode ();
|
|
52679
|
-
|
|
52680
52614
|
this ._sceneGraph_changed = Date .now () / 1000;
|
|
52681
52615
|
},
|
|
52682
52616
|
renameImportedNode (oldImportedName, newImportedName)
|
|
@@ -52689,7 +52623,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52689
52623
|
if (this [_importedNodes] .get (newImportedName))
|
|
52690
52624
|
throw new Error ("Couldn't rename imported node: new imported name does already exists.");
|
|
52691
52625
|
|
|
52692
|
-
importedNode
|
|
52626
|
+
importedNode .setImportName (newImportedName);
|
|
52693
52627
|
|
|
52694
52628
|
this [_importedNodes] .update (oldImportedName, newImportedName, importedNode);
|
|
52695
52629
|
|
|
@@ -52704,10 +52638,10 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52704
52638
|
if (!importedNode)
|
|
52705
52639
|
return;
|
|
52706
52640
|
|
|
52707
|
-
importedNode .dispose ();
|
|
52708
|
-
|
|
52709
52641
|
this [_importedNodes] .remove (importedName);
|
|
52710
52642
|
|
|
52643
|
+
importedNode .dispose ();
|
|
52644
|
+
|
|
52711
52645
|
this ._sceneGraph_changed = Date .now () / 1000;
|
|
52712
52646
|
},
|
|
52713
52647
|
getImportedNode (importedName)
|
|
@@ -52717,7 +52651,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52717
52651
|
const importedNode = this [_importedNodes] .get (importedName);
|
|
52718
52652
|
|
|
52719
52653
|
if (importedNode)
|
|
52720
|
-
return importedNode .
|
|
52654
|
+
return importedNode .instance;
|
|
52721
52655
|
|
|
52722
52656
|
throw new Error (`Imported node '${importedName}' not found.`);
|
|
52723
52657
|
},
|
|
@@ -52742,7 +52676,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52742
52676
|
const importedNode = this [_importedNodes] .get (name);
|
|
52743
52677
|
|
|
52744
52678
|
if (importedNode)
|
|
52745
|
-
return importedNode;
|
|
52679
|
+
return importedNode .instance;
|
|
52746
52680
|
|
|
52747
52681
|
throw new Error (`Unknown named or imported node '${name}'.`);
|
|
52748
52682
|
}
|
|
@@ -52752,28 +52686,19 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52752
52686
|
* @param {SFNode|X3DNode|X3DImportedNode} node
|
|
52753
52687
|
* @returns either an X3DImportedNode if possible or X3DNode
|
|
52754
52688
|
*/
|
|
52755
|
-
|
|
52689
|
+
getNodeOrImportedNode (node)
|
|
52756
52690
|
{
|
|
52757
|
-
node = Base_X3DCast (Base_X3DConstants .X3DNode, node, false)
|
|
52758
|
-
?? (node instanceof Execution_X3DImportedNode ? node : null);
|
|
52691
|
+
node = Base_X3DCast (Base_X3DConstants .X3DNode, node, false);
|
|
52759
52692
|
|
|
52760
52693
|
if (!node)
|
|
52761
52694
|
throw new Error ("Couldn't get localized node: node must be of type X3DNode.");
|
|
52762
52695
|
|
|
52763
|
-
if (node .getExecutionContext () === this)
|
|
52764
|
-
{
|
|
52765
|
-
if (node instanceof Core_X3DImportedNodeProxy)
|
|
52766
|
-
return node .getImportedNode ();
|
|
52767
|
-
|
|
52768
|
-
return node;
|
|
52769
|
-
}
|
|
52770
|
-
|
|
52771
52696
|
for (const importedNode of this [_importedNodes])
|
|
52772
52697
|
{
|
|
52773
52698
|
try
|
|
52774
52699
|
{
|
|
52775
|
-
if (importedNode .
|
|
52776
|
-
return importedNode;
|
|
52700
|
+
if (importedNode .getExportedNode () === node)
|
|
52701
|
+
return importedNode .getInstance ();
|
|
52777
52702
|
}
|
|
52778
52703
|
catch
|
|
52779
52704
|
{ }
|
|
@@ -52814,7 +52739,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52814
52739
|
if (this [_protos] .get (proto .getName ()) === proto)
|
|
52815
52740
|
throw new Error (`Couldn't add proto declaration: proto '${proto .getName ()}' already added.`);
|
|
52816
52741
|
|
|
52817
|
-
if (name
|
|
52742
|
+
if (!name)
|
|
52818
52743
|
throw new Error ("Couldn't add proto declaration: proto name is empty.");
|
|
52819
52744
|
|
|
52820
52745
|
if (this [_externprotos] .has (name))
|
|
@@ -52838,7 +52763,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52838
52763
|
if (proto .getExecutionContext () !== this)
|
|
52839
52764
|
throw new Error ("Couldn't update proto declaration: proto does not belong to this execution context.");
|
|
52840
52765
|
|
|
52841
|
-
if (name
|
|
52766
|
+
if (!name)
|
|
52842
52767
|
throw new Error ("Couldn't update proto declaration: proto name is empty.");
|
|
52843
52768
|
|
|
52844
52769
|
if (this [_externprotos] .has (name))
|
|
@@ -52895,7 +52820,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52895
52820
|
if (this [_externprotos] .get (externproto .getName ()) === externproto)
|
|
52896
52821
|
throw new Error (`Couldn't add extern proto declaration: extern proto '${externproto .getName ()}' already added.`);
|
|
52897
52822
|
|
|
52898
|
-
if (name
|
|
52823
|
+
if (!name)
|
|
52899
52824
|
throw new Error ("Couldn't add extern proto declaration: extern proto name is empty.");
|
|
52900
52825
|
|
|
52901
52826
|
if (this [_protos] .has (name))
|
|
@@ -52919,7 +52844,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52919
52844
|
if (externproto .getExecutionContext () !== this)
|
|
52920
52845
|
throw new Error ("Couldn't update extern proto declaration: extern proto does not belong to this execution context.");
|
|
52921
52846
|
|
|
52922
|
-
if (name
|
|
52847
|
+
if (!name)
|
|
52923
52848
|
throw new Error ("Couldn't update extern proto declaration: extern proto name is empty.");
|
|
52924
52849
|
|
|
52925
52850
|
if (this [_protos] .has (name))
|
|
@@ -52953,13 +52878,9 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52953
52878
|
{
|
|
52954
52879
|
// Normalize arguments.
|
|
52955
52880
|
|
|
52956
|
-
|
|
52957
|
-
importedSourceNode = sourceNode instanceof Execution_X3DImportedNode ? sourceNode : null,
|
|
52958
|
-
importedDestinationNode = destinationNode instanceof Execution_X3DImportedNode ? destinationNode : null;
|
|
52959
|
-
|
|
52960
|
-
sourceNode = Base_X3DCast (Base_X3DConstants .X3DNode, sourceNode, false) ?? importedSourceNode;
|
|
52881
|
+
sourceNode = Base_X3DCast (Base_X3DConstants .X3DNode, sourceNode, false);
|
|
52961
52882
|
sourceField = String (sourceField);
|
|
52962
|
-
destinationNode = Base_X3DCast (Base_X3DConstants .X3DNode, destinationNode, false)
|
|
52883
|
+
destinationNode = Base_X3DCast (Base_X3DConstants .X3DNode, destinationNode, false);
|
|
52963
52884
|
destinationField = String (destinationField);
|
|
52964
52885
|
|
|
52965
52886
|
// Check nodes.
|
|
@@ -52972,14 +52893,11 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52972
52893
|
|
|
52973
52894
|
// Resolve imported source and destination node.
|
|
52974
52895
|
|
|
52975
|
-
sourceNode = this .
|
|
52976
|
-
destinationNode = this .
|
|
52896
|
+
sourceNode = this .getNodeOrImportedNode (sourceNode);
|
|
52897
|
+
destinationNode = this .getNodeOrImportedNode (destinationNode);
|
|
52977
52898
|
|
|
52978
52899
|
// Add route.
|
|
52979
|
-
|
|
52980
|
-
const
|
|
52981
|
-
id = Routing_X3DRoute .getRouteId (sourceNode, sourceField, destinationNode, destinationField),
|
|
52982
|
-
route = this [_routes] .get (id);
|
|
52900
|
+
const route = this .getRoute (sourceNode, sourceField, destinationNode, destinationField);
|
|
52983
52901
|
|
|
52984
52902
|
if (route)
|
|
52985
52903
|
{
|
|
@@ -52989,7 +52907,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
52989
52907
|
{
|
|
52990
52908
|
const route = new Routing_X3DRoute (this, sourceNode, sourceField, destinationNode, destinationField);
|
|
52991
52909
|
|
|
52992
|
-
this [_routes] .add (
|
|
52910
|
+
this [_routes] .add (route .getId (), route);
|
|
52993
52911
|
|
|
52994
52912
|
return route;
|
|
52995
52913
|
}
|
|
@@ -53003,25 +52921,21 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
53003
52921
|
if (!(route instanceof Routing_X3DRoute))
|
|
53004
52922
|
return;
|
|
53005
52923
|
|
|
53006
|
-
if (this
|
|
52924
|
+
if (!this .routes .has (route .getId ()))
|
|
53007
52925
|
return;
|
|
53008
52926
|
|
|
53009
|
-
this [_routes] .remove (route .
|
|
52927
|
+
this [_routes] .remove (route .getId ());
|
|
53010
52928
|
|
|
53011
52929
|
route .dispose ();
|
|
53012
52930
|
},
|
|
53013
|
-
getRoute (sourceNode,
|
|
52931
|
+
getRoute (sourceNode, sourceFieldName, destinationNode, destinationFieldName)
|
|
53014
52932
|
{
|
|
53015
52933
|
// Normalize arguments.
|
|
53016
52934
|
|
|
53017
|
-
|
|
53018
|
-
|
|
53019
|
-
|
|
53020
|
-
|
|
53021
|
-
sourceNode = Base_X3DCast (Base_X3DConstants .X3DNode, sourceNode, false) ?? importedSourceNode;
|
|
53022
|
-
sourceField = String (sourceField);
|
|
53023
|
-
destinationNode = Base_X3DCast (Base_X3DConstants .X3DNode, destinationNode, false) ?? importedDestinationNode;
|
|
53024
|
-
destinationField = String (destinationField);
|
|
52935
|
+
sourceNode = Base_X3DCast (Base_X3DConstants .X3DNode, sourceNode, false);
|
|
52936
|
+
sourceFieldName = String (sourceFieldName);
|
|
52937
|
+
destinationNode = Base_X3DCast (Base_X3DConstants .X3DNode, destinationNode, false);
|
|
52938
|
+
destinationFieldName = String (destinationFieldName);
|
|
53025
52939
|
|
|
53026
52940
|
// Check nodes.
|
|
53027
52941
|
|
|
@@ -53033,12 +52947,69 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
|
|
|
53033
52947
|
|
|
53034
52948
|
// Resolve imported source and destination node.
|
|
53035
52949
|
|
|
53036
|
-
sourceNode = this .
|
|
53037
|
-
destinationNode = this .
|
|
52950
|
+
sourceNode = this .getNodeOrImportedNode (sourceNode);
|
|
52951
|
+
destinationNode = this .getNodeOrImportedNode (destinationNode);
|
|
52952
|
+
|
|
52953
|
+
// Get fields if possible.
|
|
52954
|
+
|
|
52955
|
+
const sourceField = sourceNode instanceof Core_X3DImportedNodeInstance
|
|
52956
|
+
? helper.try (() => sourceNode .getField (sourceFieldName))
|
|
52957
|
+
: sourceNode .getField (sourceFieldName);
|
|
52958
|
+
|
|
52959
|
+
const destinationField = destinationNode instanceof Core_X3DImportedNodeInstance
|
|
52960
|
+
? helper.try (() => destinationNode .getField (destinationFieldName))
|
|
52961
|
+
: destinationNode .getField (destinationFieldName);
|
|
52962
|
+
|
|
52963
|
+
Routing_X3DRoute .checkFields (sourceField, destinationField);
|
|
53038
52964
|
|
|
53039
52965
|
// Return route.
|
|
53040
52966
|
|
|
53041
|
-
return this [_routes] .
|
|
52967
|
+
return this [_routes] .find (route =>
|
|
52968
|
+
{
|
|
52969
|
+
if (route .getSourceNode () !== sourceNode)
|
|
52970
|
+
return false;
|
|
52971
|
+
|
|
52972
|
+
if (route .getDestinationNode () !== destinationNode)
|
|
52973
|
+
return false;
|
|
52974
|
+
|
|
52975
|
+
if (sourceField)
|
|
52976
|
+
{
|
|
52977
|
+
if (helper.try (() => sourceNode .getField (route .getSourceField ())) !== sourceField)
|
|
52978
|
+
return false;
|
|
52979
|
+
}
|
|
52980
|
+
else
|
|
52981
|
+
{
|
|
52982
|
+
if (sourceNode instanceof Core_X3DImportedNodeInstance)
|
|
52983
|
+
{
|
|
52984
|
+
if (route .getSourceField () !== sourceFieldName)
|
|
52985
|
+
return false;
|
|
52986
|
+
}
|
|
52987
|
+
else
|
|
52988
|
+
{
|
|
52989
|
+
return false;
|
|
52990
|
+
}
|
|
52991
|
+
}
|
|
52992
|
+
|
|
52993
|
+
if (destinationField)
|
|
52994
|
+
{
|
|
52995
|
+
if (helper.try (() => destinationNode .getField (route .getDestinationField ())) !== destinationField)
|
|
52996
|
+
return false;
|
|
52997
|
+
}
|
|
52998
|
+
else
|
|
52999
|
+
{
|
|
53000
|
+
if (destinationNode instanceof Core_X3DImportedNodeInstance)
|
|
53001
|
+
{
|
|
53002
|
+
if (route .getDestinationField () !== destinationFieldName)
|
|
53003
|
+
return false;
|
|
53004
|
+
}
|
|
53005
|
+
else
|
|
53006
|
+
{
|
|
53007
|
+
return false;
|
|
53008
|
+
}
|
|
53009
|
+
}
|
|
53010
|
+
|
|
53011
|
+
return true;
|
|
53012
|
+
});
|
|
53042
53013
|
},
|
|
53043
53014
|
getRoutes ()
|
|
53044
53015
|
{
|
|
@@ -53604,6 +53575,12 @@ Object .assign (Object .setPrototypeOf (X3DExportedNode .prototype, Base_X3DObje
|
|
|
53604
53575
|
generator .endObject ();
|
|
53605
53576
|
generator .endObject ();
|
|
53606
53577
|
},
|
|
53578
|
+
dispose ()
|
|
53579
|
+
{
|
|
53580
|
+
this [X3DExportedNode_executionContext] .removeExportedNode (this [X3DExportedNode_exportedName]);
|
|
53581
|
+
|
|
53582
|
+
Base_X3DObject .prototype .dispose .call (this);
|
|
53583
|
+
},
|
|
53607
53584
|
});
|
|
53608
53585
|
|
|
53609
53586
|
for (const key of Object .keys (X3DExportedNode .prototype))
|
|
@@ -53694,6 +53671,7 @@ const LATEST_VERSION_default_ = "4.1";
|
|
|
53694
53671
|
|
|
53695
53672
|
|
|
53696
53673
|
|
|
53674
|
+
|
|
53697
53675
|
const
|
|
53698
53676
|
_specificationVersion = Symbol (),
|
|
53699
53677
|
_encoding = Symbol (),
|
|
@@ -53702,7 +53680,7 @@ const
|
|
|
53702
53680
|
_worldURL = Symbol (),
|
|
53703
53681
|
_units = Symbol (),
|
|
53704
53682
|
_metadata = Symbol (),
|
|
53705
|
-
|
|
53683
|
+
_exportedNodes = Symbol (),
|
|
53706
53684
|
_loadingObjects = Symbol ();
|
|
53707
53685
|
|
|
53708
53686
|
function X3DScene (browser)
|
|
@@ -53734,12 +53712,12 @@ function X3DScene (browser)
|
|
|
53734
53712
|
this [_units] .add ("mass", new Configuration_UnitInfo ("mass", "kilogram", 1));
|
|
53735
53713
|
|
|
53736
53714
|
this [_metadata] = [ ];
|
|
53737
|
-
this [
|
|
53715
|
+
this [_exportedNodes] = new Execution_ExportedNodesArray ();
|
|
53738
53716
|
this [_loadingObjects] = new Set ();
|
|
53739
53717
|
|
|
53740
53718
|
this [_components] .addParent (this);
|
|
53741
53719
|
this [_units] .addParent (this);
|
|
53742
|
-
this [
|
|
53720
|
+
this [_exportedNodes] .addParent (this);
|
|
53743
53721
|
}
|
|
53744
53722
|
|
|
53745
53723
|
Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecutionContext .prototype),
|
|
@@ -53795,7 +53773,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
|
|
|
53795
53773
|
hasComponent (name, level = 0)
|
|
53796
53774
|
{
|
|
53797
53775
|
if (name instanceof Configuration_ComponentInfo)
|
|
53798
|
-
|
|
53776
|
+
({ name, level } = name);
|
|
53799
53777
|
|
|
53800
53778
|
const
|
|
53801
53779
|
browser = this .getBrowser (),
|
|
@@ -53966,7 +53944,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
|
|
|
53966
53944
|
{
|
|
53967
53945
|
exportedName = String (exportedName);
|
|
53968
53946
|
|
|
53969
|
-
if (this [
|
|
53947
|
+
if (this [_exportedNodes] .has (exportedName))
|
|
53970
53948
|
throw new Error (`Couldn't add exported node: exported name '${exportedName}' already in use.`);
|
|
53971
53949
|
|
|
53972
53950
|
this .updateExportedNode (exportedName, node, description);
|
|
@@ -53979,18 +53957,21 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
|
|
|
53979
53957
|
node = Base_X3DCast (Base_X3DConstants .X3DNode, node, false);
|
|
53980
53958
|
description = String (description);
|
|
53981
53959
|
|
|
53982
|
-
if (exportedName .length === 0)
|
|
53983
|
-
throw new Error ("Couldn't update exported node: node exported name is empty.");
|
|
53984
|
-
|
|
53985
53960
|
if (!node)
|
|
53986
53961
|
throw new Error ("Couldn't update exported node: node must be of type X3DNode.");
|
|
53987
53962
|
|
|
53988
|
-
|
|
53989
|
-
|
|
53963
|
+
if (node instanceof Core_X3DImportedNodeInstance)
|
|
53964
|
+
throw new Error ("Couldn't update exported node: node cannot be of type X3DImportedNodeInstance.");
|
|
53965
|
+
|
|
53966
|
+
if (node .getExecutionContext () !== this)
|
|
53967
|
+
throw new Error ("Couldn't update exported node: node does not belong to this execution context.");
|
|
53968
|
+
|
|
53969
|
+
if (!exportedName)
|
|
53970
|
+
throw new Error ("Couldn't update exported node: node exported name is empty.");
|
|
53990
53971
|
|
|
53991
53972
|
const exportedNode = new Execution_X3DExportedNode (this, exportedName, node, description);
|
|
53992
53973
|
|
|
53993
|
-
this [
|
|
53974
|
+
this [_exportedNodes] .update (exportedName, exportedName, exportedNode);
|
|
53994
53975
|
|
|
53995
53976
|
this ._sceneGraph_changed = Date .now () / 1000;
|
|
53996
53977
|
},
|
|
@@ -53998,7 +53979,14 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
|
|
|
53998
53979
|
{
|
|
53999
53980
|
exportedName = String (exportedName);
|
|
54000
53981
|
|
|
54001
|
-
this [
|
|
53982
|
+
const exportedNode = this [_exportedNodes] .get (exportedName);
|
|
53983
|
+
|
|
53984
|
+
if (!exportedNode)
|
|
53985
|
+
return;
|
|
53986
|
+
|
|
53987
|
+
this [_exportedNodes] .remove (exportedName);
|
|
53988
|
+
|
|
53989
|
+
exportedNode .dispose ();
|
|
54002
53990
|
|
|
54003
53991
|
this ._sceneGraph_changed = Date .now () / 1000;
|
|
54004
53992
|
},
|
|
@@ -54006,7 +53994,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
|
|
|
54006
53994
|
{
|
|
54007
53995
|
exportedName = String (exportedName);
|
|
54008
53996
|
|
|
54009
|
-
const exportedNode = this [
|
|
53997
|
+
const exportedNode = this [_exportedNodes] .get (exportedName);
|
|
54010
53998
|
|
|
54011
53999
|
if (exportedNode)
|
|
54012
54000
|
return exportedNode .localNode;
|
|
@@ -54015,11 +54003,11 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
|
|
|
54015
54003
|
},
|
|
54016
54004
|
getExportedNodes ()
|
|
54017
54005
|
{
|
|
54018
|
-
return this [
|
|
54006
|
+
return this [_exportedNodes];
|
|
54019
54007
|
},
|
|
54020
54008
|
getUniqueExportName (name)
|
|
54021
54009
|
{
|
|
54022
|
-
return getUniqueName (this [
|
|
54010
|
+
return getUniqueName (this [_exportedNodes], name);
|
|
54023
54011
|
},
|
|
54024
54012
|
addRootNode (node)
|
|
54025
54013
|
{
|
|
@@ -54295,7 +54283,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
|
|
|
54295
54283
|
|
|
54296
54284
|
generator .endArray ();
|
|
54297
54285
|
|
|
54298
|
-
headLastProperty = true;
|
|
54286
|
+
// headLastProperty = true;
|
|
54299
54287
|
}
|
|
54300
54288
|
|
|
54301
54289
|
// Head end
|
|
@@ -54624,6 +54612,7 @@ Fonts_add ("PT_Sans/PTSans-Italic.woff2", false, true);
|
|
|
54624
54612
|
|
|
54625
54613
|
|
|
54626
54614
|
|
|
54615
|
+
|
|
54627
54616
|
const
|
|
54628
54617
|
_instanceId = Symbol (),
|
|
54629
54618
|
_element = Symbol (),
|
|
@@ -54687,7 +54676,9 @@ function X3DCoreContext (element)
|
|
|
54687
54676
|
{
|
|
54688
54677
|
const link = document .createElement ("link");
|
|
54689
54678
|
|
|
54690
|
-
|
|
54679
|
+
if (!DEVELOPMENT)
|
|
54680
|
+
link .integrity = "sha384-PV+KMMYFFsD4yJSRNZxR5SQtB1+/svusY5D4rmCUw1HodNYMj3Nx2fKast5z9E0g";
|
|
54681
|
+
|
|
54691
54682
|
link .rel = "stylesheet";
|
|
54692
54683
|
link .crossOrigin = "anonymous";
|
|
54693
54684
|
link .onload = resolve;
|
|
@@ -65682,6 +65673,7 @@ const
|
|
|
65682
65673
|
_defaultFramebuffer = Symbol (),
|
|
65683
65674
|
_textureBuffers = Symbol (),
|
|
65684
65675
|
_resizer = Symbol (),
|
|
65676
|
+
_traverse = Symbol .for ("X_ITE.X3DBrowserContext.traverse"),
|
|
65685
65677
|
_localObjects = Symbol (),
|
|
65686
65678
|
_fullscreenArray = Symbol (),
|
|
65687
65679
|
_fullscreenBuffer = Symbol (),
|
|
@@ -65726,12 +65718,7 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
65726
65718
|
|
|
65727
65719
|
helper.on (this, window, "orientationchange", () => this .reshape ());
|
|
65728
65720
|
|
|
65729
|
-
this [_resizer] = new ResizeObserver (() =>
|
|
65730
|
-
{
|
|
65731
|
-
this .reshape ();
|
|
65732
|
-
|
|
65733
|
-
this [Symbol .for ("X_ITE.X3DBrowserContext.traverse")] (performance .now ());
|
|
65734
|
-
});
|
|
65721
|
+
this [_resizer] = new ResizeObserver (() => this .reshape ());
|
|
65735
65722
|
|
|
65736
65723
|
this [_resizer] .observe (this .getSurface ());
|
|
65737
65724
|
|
|
@@ -66008,6 +65995,9 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
66008
65995
|
|
|
66009
65996
|
this .reshapeFramebuffer (0, 0, 0, width, height);
|
|
66010
65997
|
|
|
65998
|
+
if (this .getWorld ())
|
|
65999
|
+
this [_traverse] (-1);
|
|
66000
|
+
|
|
66011
66001
|
this .addBrowserEvent ();
|
|
66012
66002
|
},
|
|
66013
66003
|
limitFramebufferSize (width, height)
|
|
@@ -72701,14 +72691,14 @@ Object .assign (X3DTimeContext .prototype,
|
|
|
72701
72691
|
{
|
|
72702
72692
|
const lastPosition = new Numbers_Vector3 ();
|
|
72703
72693
|
|
|
72704
|
-
return function ()
|
|
72694
|
+
return function (checkFrameRate)
|
|
72705
72695
|
{
|
|
72706
72696
|
const
|
|
72707
72697
|
time = Date .now () / 1000,
|
|
72708
72698
|
interval = time - this [_lastTime],
|
|
72709
72699
|
viewpointNode = this .getActiveViewpoint ();
|
|
72710
72700
|
|
|
72711
|
-
if (interval <= 1 / Math .max (this .getBrowserOption ("MaximumFrameRate"), 1))
|
|
72701
|
+
if (checkFrameRate && interval <= 1 / Math .max (this .getBrowserOption ("MaximumFrameRate"), 1))
|
|
72712
72702
|
return false;
|
|
72713
72703
|
|
|
72714
72704
|
this [_lastTime] = time;
|
|
@@ -72950,7 +72940,7 @@ const ConcreteNodes_default_ = new Configuration_ConcreteNodesArray ();
|
|
|
72950
72940
|
const
|
|
72951
72941
|
_world = Symbol (),
|
|
72952
72942
|
X3DBrowserContext_tainted = Symbol (),
|
|
72953
|
-
|
|
72943
|
+
X3DBrowserContext_traverse = Symbol .for ("X_ITE.X3DBrowserContext.traverse"),
|
|
72954
72944
|
_renderCallback = Symbol (),
|
|
72955
72945
|
_animFrame = Symbol (),
|
|
72956
72946
|
_previousTime = Symbol (),
|
|
@@ -73006,7 +72996,7 @@ function X3DBrowserContext (element)
|
|
|
73006
72996
|
|
|
73007
72997
|
this [X3DBrowserContext_tainted] = false;
|
|
73008
72998
|
this [_previousTime] = 0;
|
|
73009
|
-
this [_renderCallback] = this [
|
|
72999
|
+
this [_renderCallback] = this [X3DBrowserContext_traverse] .bind (this);
|
|
73010
73000
|
this [_systemTime] = new Time_StopWatch ();
|
|
73011
73001
|
this [_browserTime] = new Time_StopWatch ();
|
|
73012
73002
|
this [_cameraTime] = new Time_StopWatch ();
|
|
@@ -73117,13 +73107,15 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, Base_X3DBa
|
|
|
73117
73107
|
this .addBrowserEvent ();
|
|
73118
73108
|
});
|
|
73119
73109
|
},
|
|
73120
|
-
[
|
|
73110
|
+
[X3DBrowserContext_traverse] (now, frame)
|
|
73121
73111
|
{
|
|
73122
73112
|
// Limit frame rate.
|
|
73123
73113
|
|
|
73124
73114
|
this [X3DBrowserContext_tainted] = false;
|
|
73125
73115
|
|
|
73126
|
-
|
|
73116
|
+
// If now is negative, don't check framerate.
|
|
73117
|
+
// Now can be negative when reshape is called.
|
|
73118
|
+
if (!this .advanceTime (now >= 0))
|
|
73127
73119
|
{
|
|
73128
73120
|
this .addBrowserEvent ();
|
|
73129
73121
|
return;
|
|
@@ -74891,7 +74883,7 @@ const CoreComponent_default_ = {
|
|
|
74891
74883
|
[
|
|
74892
74884
|
Core_X3DBindableNode,
|
|
74893
74885
|
Core_X3DChildNode,
|
|
74894
|
-
|
|
74886
|
+
Core_X3DImportedNodeInstance,
|
|
74895
74887
|
Core_X3DInfoNode,
|
|
74896
74888
|
Core_X3DMetadataObject,
|
|
74897
74889
|
Core_X3DNode,
|
|
@@ -91560,8 +91552,8 @@ const PNGMedia_default_ = PNGMedia;
|
|
|
91560
91552
|
|
|
91561
91553
|
/* harmony default export */ const Texturing_PNGMedia = (x_ite_Namespace .add ("PNGMedia", PNGMedia_default_));
|
|
91562
91554
|
;// ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
91563
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
91564
|
-
/* provided dependency */ var APNG = __webpack_require__(
|
|
91555
|
+
/* provided dependency */ var SuperGif = __webpack_require__(829);
|
|
91556
|
+
/* provided dependency */ var APNG = __webpack_require__(247);
|
|
91565
91557
|
|
|
91566
91558
|
|
|
91567
91559
|
|
|
@@ -91634,7 +91626,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
|
|
|
91634
91626
|
|
|
91635
91627
|
try
|
|
91636
91628
|
{
|
|
91637
|
-
if (fileURL .pathname .endsWith (".gif") || fileURL .href .match (/^\s*data:image\/gif[;,]/
|
|
91629
|
+
if (fileURL .pathname .endsWith (".gif") || fileURL .href .match (/^\s*data:image\/gif[;,]/))
|
|
91638
91630
|
{
|
|
91639
91631
|
const
|
|
91640
91632
|
data = await this .loadDocument (fileURL),
|
|
@@ -91653,7 +91645,7 @@ Object .assign (Object .setPrototypeOf (MovieTexture .prototype, Texturing_X3DTe
|
|
|
91653
91645
|
this .setGif (gif);
|
|
91654
91646
|
return;
|
|
91655
91647
|
}
|
|
91656
|
-
else if (fileURL .pathname .endsWith (".png") || fileURL .href .match (/^\s*data:image\/png[;,]/
|
|
91648
|
+
else if (fileURL .pathname .endsWith (".png") || fileURL .href .match (/^\s*data:image\/png[;,]/))
|
|
91657
91649
|
{
|
|
91658
91650
|
const
|
|
91659
91651
|
data = await this .loadDocument (fileURL),
|
|
@@ -92912,7 +92904,7 @@ const Components_default_ = Components;
|
|
|
92912
92904
|
|
|
92913
92905
|
/* eslint no-undef: "off"
|
|
92914
92906
|
--------
|
|
92915
|
-
no-undef: global variable is used here for use in node projects.
|
|
92907
|
+
no-undef: node `global` variable is used here for use in node projects.
|
|
92916
92908
|
*/
|
|
92917
92909
|
|
|
92918
92910
|
const
|
|
@@ -94205,7 +94197,7 @@ const QuickSort_default_ = QuickSort;
|
|
|
94205
94197
|
|
|
94206
94198
|
/* harmony default export */ const Algorithms_QuickSort = (x_ite_Namespace .add ("QuickSort", QuickSort_default_));
|
|
94207
94199
|
;// ./src/lib/libtess.js
|
|
94208
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
94200
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(67);
|
|
94209
94201
|
const libtess_default_ = libtess_libtess;
|
|
94210
94202
|
;
|
|
94211
94203
|
|