x_ite 9.6.0 → 9.6.2

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.
Files changed (49) hide show
  1. package/README.md +7 -4
  2. package/dist/assets/components/Annotation.js +13 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +14 -14
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +25 -25
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +13 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +9 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +18 -18
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +33 -33
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +23 -23
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +27 -27
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +23 -23
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +26 -26
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +18 -18
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +17 -17
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +43 -43
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +24 -24
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjection.js +15 -15
  35. package/dist/assets/components/TextureProjection.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +27 -27
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +19 -19
  39. package/dist/assets/components/VolumeRendering.min.js +1 -1
  40. package/dist/assets/components/X_ITE.js +14 -14
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.d.ts +7 -0
  44. package/dist/x_ite.js +1074 -1058
  45. package/dist/x_ite.min.js +1 -1
  46. package/dist/x_ite.min.mjs +1 -1
  47. package/dist/x_ite.mjs +1074 -1058
  48. package/dist/x_ite.zip +0 -0
  49. package/package.json +121 -115
package/dist/x_ite.mjs CHANGED
@@ -1,9 +1,9 @@
1
- /* X_ITE v9.6.0 */var __webpack_modules__ = ({
1
+ /* X_ITE v9.6.2 */var __webpack_modules__ = ({
2
2
 
3
- /***/ 600:
3
+ /***/ 195:
4
4
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
5
5
 
6
- /* provided dependency */ var jQuery = __webpack_require__(268);
6
+ /* provided dependency */ var jQuery = __webpack_require__(631);
7
7
  /**
8
8
  * @preserve jquery.fullscreen 1.1.5
9
9
  * https://github.com/code-lts/jquery-fullscreen-plugin
@@ -199,7 +199,7 @@ installFullScreenHandlers();
199
199
 
200
200
  /***/ }),
201
201
 
202
- /***/ 482:
202
+ /***/ 711:
203
203
  /***/ ((module, exports, __webpack_require__) => {
204
204
 
205
205
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -213,7 +213,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
213
213
  (function (factory) {
214
214
  if ( true ) {
215
215
  // AMD. Register as an anonymous module.
216
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(268)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
216
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(631)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
217
217
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
218
218
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
219
219
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -424,7 +424,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
424
424
 
425
425
  /***/ }),
426
426
 
427
- /***/ 268:
427
+ /***/ 631:
428
428
  /***/ (function(module, exports) {
429
429
 
430
430
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -11148,7 +11148,7 @@ return jQuery;
11148
11148
 
11149
11149
  /***/ }),
11150
11150
 
11151
- /***/ 937:
11151
+ /***/ 580:
11152
11152
  /***/ ((module) => {
11153
11153
 
11154
11154
  /**
@@ -15927,7 +15927,7 @@ if (true) {
15927
15927
 
15928
15928
  /***/ }),
15929
15929
 
15930
- /***/ 752:
15930
+ /***/ 511:
15931
15931
  /***/ (function(__unused_webpack_module, exports) {
15932
15932
 
15933
15933
 
@@ -19172,7 +19172,7 @@ if (true) {
19172
19172
 
19173
19173
  /***/ }),
19174
19174
 
19175
- /***/ 719:
19175
+ /***/ 936:
19176
19176
  /***/ (function(module, exports) {
19177
19177
 
19178
19178
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
@@ -20299,7 +20299,7 @@ Object .defineProperty (Namespace, "add",
20299
20299
  }
20300
20300
  else
20301
20301
  {
20302
- const X3D = window [Symbol .for ("X_ITE.X3D-9.6.0")];
20302
+ const X3D = window [Symbol .for ("X_ITE.X3D-9.6.2")];
20303
20303
 
20304
20304
  if (X3D)
20305
20305
  X3D [name] = module;
@@ -21435,6 +21435,151 @@ const DEVELOPMENT_default_ = false;
21435
21435
 
21436
21436
  x_ite_Namespace .add ("DEVELOPMENT", "x_ite/DEVELOPMENT", DEVELOPMENT_default_);
21437
21437
  /* harmony default export */ const DEVELOPMENT = (DEVELOPMENT_default_);
21438
+ ;// CONCATENATED MODULE: ./src/x_ite/Features.js
21439
+ /*******************************************************************************
21440
+ *
21441
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
21442
+ *
21443
+ * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
21444
+ *
21445
+ * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
21446
+ *
21447
+ * The copyright notice above does not evidence any actual of intended
21448
+ * publication of such source code, and is an unpublished work by create3000.
21449
+ * This material contains CONFIDENTIAL INFORMATION that is the property of
21450
+ * create3000.
21451
+ *
21452
+ * No permission is granted to copy, distribute, or create derivative works from
21453
+ * the contents of this software, in whole or in part, without the prior written
21454
+ * permission of create3000.
21455
+ *
21456
+ * NON-MILITARY USE ONLY
21457
+ *
21458
+ * All create3000 software are effectively free software with a non-military use
21459
+ * restriction. It is free. Well commented source is provided. You may reuse the
21460
+ * source in any way you please with the exception anything that uses it must be
21461
+ * marked to indicate is contains 'non-military use only' components.
21462
+ *
21463
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
21464
+ *
21465
+ * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
21466
+ *
21467
+ * This file is part of the X_ITE Project.
21468
+ *
21469
+ * X_ITE is free software: you can redistribute it and/or modify it under the
21470
+ * terms of the GNU General Public License version 3 only, as published by the
21471
+ * Free Software Foundation.
21472
+ *
21473
+ * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
21474
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21475
+ * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
21476
+ * details (a copy is included in the LICENSE file that accompanied this code).
21477
+ *
21478
+ * You should have received a copy of the GNU General Public License version 3
21479
+ * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
21480
+ * copy of the GPLv3 License.
21481
+ *
21482
+ * For Silvio, Joy and Adi.
21483
+ *
21484
+ ******************************************************************************/
21485
+
21486
+
21487
+
21488
+ const MODULE = true;
21489
+
21490
+ const Features =
21491
+ {
21492
+ get ENVIRONMENT ()
21493
+ {
21494
+ if (DEVELOPMENT)
21495
+ return "BROWSER";
21496
+
21497
+ if (MODULE)
21498
+ return "MODULE";
21499
+
21500
+ if ((typeof process === "object") && (process .release .name .search (/node|io.js/) !== -1))
21501
+ return "NODE";
21502
+
21503
+ return "BROWSER";
21504
+ },
21505
+ WEAK_REF: typeof WeakRef !== "undefined",
21506
+ FINALIZATION_REGISTRY: typeof FinalizationRegistry !== "undefined",
21507
+ };
21508
+
21509
+ (() =>
21510
+ {
21511
+ // Added at February 2022
21512
+ // https://github.com/tc39/proposal-relative-indexing-method#polyfill
21513
+
21514
+ function at (n)
21515
+ {
21516
+ // ToInteger() abstract op
21517
+ n = Math.trunc(n) || 0;
21518
+ // Allow negative indexing from the end
21519
+ if (n < 0) n += this.length;
21520
+ // OOB access is guaranteed to return undefined
21521
+ if (n < 0 || n >= this.length) return undefined;
21522
+ // Otherwise, this is just normal property access
21523
+ return this[n];
21524
+ }
21525
+
21526
+ const TypedArray = Reflect .getPrototypeOf (Int8Array);
21527
+ for (const C of [Array, String, TypedArray])
21528
+ {
21529
+ if (C .prototype .at === undefined)
21530
+ {
21531
+ Object .defineProperty (C .prototype, "at",
21532
+ {
21533
+ value: at,
21534
+ writable: true,
21535
+ enumerable: false,
21536
+ configurable: true,
21537
+ });
21538
+ }
21539
+ }
21540
+ })();
21541
+
21542
+ (() =>
21543
+ {
21544
+ if (!Features .WEAK_REF)
21545
+ {
21546
+ if (DEVELOPMENT)
21547
+ console .info ("Added shim for WeakRef.");
21548
+
21549
+ window .WeakRef = class WeakRef
21550
+ {
21551
+ #object;
21552
+
21553
+ constructor (object)
21554
+ {
21555
+ this .#object = object;
21556
+ }
21557
+
21558
+ deref ()
21559
+ {
21560
+ return this .#object;
21561
+ }
21562
+ };
21563
+ }
21564
+
21565
+ if (!Features .FINALIZATION_REGISTRY)
21566
+ {
21567
+ if (DEVELOPMENT)
21568
+ console .info ("Added shim for FinalizationRegistry.");
21569
+
21570
+ window .FinalizationRegistry = class FinalizationRegistry
21571
+ {
21572
+ register () { }
21573
+ unregister () { }
21574
+ };
21575
+ }
21576
+ })();
21577
+
21578
+ const Features_default_ = Features;
21579
+ ;
21580
+
21581
+ x_ite_Namespace .add ("Features", "x_ite/Features", Features_default_);
21582
+ /* harmony default export */ const x_ite_Features = (Features_default_);
21438
21583
  ;// CONCATENATED MODULE: ./src/x_ite/Base/X3DObject.js
21439
21584
  /*******************************************************************************
21440
21585
  *
@@ -21489,6 +21634,7 @@ x_ite_Namespace .add ("DEVELOPMENT", "x_ite/DEVELOPMENT", DEVELOPMENT_default_);
21489
21634
  const
21490
21635
  _name = Symbol (),
21491
21636
  _interests = Symbol (),
21637
+ _registry = Symbol (),
21492
21638
  _userData = Symbol ();
21493
21639
 
21494
21640
  function X3DObject () { }
@@ -21497,6 +21643,7 @@ Object .assign (X3DObject .prototype,
21497
21643
  {
21498
21644
  [_name]: "",
21499
21645
  [_interests]: new Map (),
21646
+ [_registry]: new FinalizationRegistry (Function .prototype),
21500
21647
  [_userData]: new Map (),
21501
21648
  getId ()
21502
21649
  {
@@ -21528,15 +21675,24 @@ Object .assign (X3DObject .prototype,
21528
21675
  interestId = X3DObject .getInterestId (callbackName, object),
21529
21676
  callback = object [callbackName];
21530
21677
 
21678
+ if (this [_registry] === X3DObject .prototype [_registry])
21679
+ this [_registry] = new FinalizationRegistry (interestId => this [_interests] .delete (interestId));
21680
+
21681
+ const weakRef = new WeakRef (object);
21682
+
21683
+ // Copy interests in case of this function is called during a `processInterests` call.
21531
21684
  this [_interests] = new Map (this [_interests]);
21532
21685
 
21533
- this [_interests] .set (interestId, callback .bind (object, ... args, this));
21686
+ this [_interests] .set (interestId, { callback, weakRef, args });
21687
+ this [_registry] .register (object, interestId, object);
21534
21688
  },
21535
21689
  removeInterest (callbackName, object)
21536
21690
  {
21691
+ // Copy interests in case of this function is called during a `processInterests` call.
21537
21692
  this [_interests] = new Map (this [_interests]);
21538
21693
 
21539
21694
  this [_interests] .delete (X3DObject .getInterestId (callbackName, object));
21695
+ this [_registry] .unregister (object);
21540
21696
  },
21541
21697
  getInterests ()
21542
21698
  {
@@ -21544,8 +21700,13 @@ Object .assign (X3DObject .prototype,
21544
21700
  },
21545
21701
  processInterests ()
21546
21702
  {
21547
- for (const interest of this [_interests] .values ())
21548
- interest ();
21703
+ for (const { callback, weakRef, args } of this [_interests] .values ())
21704
+ {
21705
+ const object = weakRef .deref ();
21706
+
21707
+ if (object)
21708
+ callback .call (object, ... args, this);
21709
+ }
21549
21710
  },
21550
21711
  getUserData (key)
21551
21712
  {
@@ -21644,7 +21805,7 @@ Object .defineProperties (X3DObject .prototype,
21644
21805
 
21645
21806
  Object .assign (X3DObject,
21646
21807
  {
21647
- getId: DEVELOPMENT ? (() =>
21808
+ getId: x_ite_Features .FINALIZATION_REGISTRY ? (() =>
21648
21809
  {
21649
21810
  const
21650
21811
  map = new WeakMap (),
@@ -21700,7 +21861,7 @@ const X3DObject_default_ = X3DObject;
21700
21861
 
21701
21862
  x_ite_Namespace .add ("X3DObject", "x_ite/Base/X3DObject", X3DObject_default_);
21702
21863
  /* harmony default export */ const Base_X3DObject = (X3DObject_default_);
21703
- ;// CONCATENATED MODULE: ./src/x_ite/Base/X3DChildObject.js
21864
+ ;// CONCATENATED MODULE: ./src/x_ite/Base/IterableWeakSet.js
21704
21865
  /*******************************************************************************
21705
21866
  *
21706
21867
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -21750,243 +21911,259 @@ x_ite_Namespace .add ("X3DObject", "x_ite/Base/X3DObject", X3DObject_default_);
21750
21911
 
21751
21912
 
21752
21913
 
21753
-
21754
- const
21755
- _modificationTime = Symbol (),
21756
- _tainted = Symbol (),
21757
- _parents = Symbol (),
21758
- _private = Symbol (),
21759
- _registry = Symbol ();
21760
-
21761
- function X3DChildObject ()
21914
+ const IterableWeakSet_default_ = x_ite_Features .WEAK_REF && x_ite_Features .FINALIZATION_REGISTRY ?
21915
+ /**
21916
+ * IterableWeakSet is a writable set-like class.
21917
+ */
21918
+ class IterableWeakSet
21762
21919
  {
21763
- Base_X3DObject .call (this);
21764
- }
21920
+ #callback = undefined;
21921
+ #map = new Map ();
21922
+ #registry = new FinalizationRegistry (id =>
21923
+ {
21924
+ this .#map .delete (id);
21925
+ this .#callback ?.();
21926
+ });
21765
21927
 
21766
- if (DEVELOPMENT)
21767
- {
21768
- Object .assign (Object .setPrototypeOf (X3DChildObject .prototype, Base_X3DObject .prototype),
21928
+ constructor (callback)
21769
21929
  {
21770
- [_modificationTime]: 0,
21771
- [_tainted]: false,
21772
- [_parents]: new Map (),
21773
- [_private]: false,
21774
- [_registry]: new FinalizationRegistry (Function .prototype),
21775
- isInitializable ()
21776
- {
21777
- return true;
21778
- },
21779
- isInput ()
21780
- {
21781
- return false;
21782
- },
21783
- isOutput ()
21784
- {
21785
- return false;
21786
- },
21787
- setModificationTime (value)
21788
- {
21789
- this [_modificationTime] = value;
21790
- },
21791
- getModificationTime ()
21792
- {
21793
- return this [_modificationTime];
21794
- },
21795
- setTainted (value)
21796
- {
21797
- this [_tainted] = value;
21798
- },
21799
- isTainted ()
21800
- {
21801
- return this [_tainted];
21802
- },
21803
- addEvent ()
21804
- {
21805
- for (const parent of this [_parents] .values ())
21806
- parent .deref () ?.addEvent (this);
21807
- },
21808
- addEventObject (field, event)
21809
- {
21810
- for (const parent of this [_parents] .values ())
21811
- parent .deref () ?.addEventObject (this, event);
21812
- },
21813
- processEvent ()
21814
- {
21815
- this .setTainted (false);
21816
- this .processInterests ();
21817
- },
21818
- isPrivate ()
21819
- {
21820
- return this [_private];
21821
- },
21822
- setPrivate (value)
21823
- {
21824
- this [_private] = value;
21825
- },
21826
- collectCloneCount ()
21827
- {
21828
- let cloneCount = 0;
21930
+ this .#callback = callback;
21931
+ }
21829
21932
 
21830
- for (const weakRef of this [_parents] .values ())
21831
- {
21832
- const parent = weakRef .deref ();
21933
+ *[Symbol .iterator] ()
21934
+ {
21935
+ yield* this .values ();
21936
+ }
21833
21937
 
21834
- if (!parent)
21835
- continue;
21938
+ get size ()
21939
+ {
21940
+ return this .#map .size;
21941
+ }
21836
21942
 
21837
- if (parent [_private])
21838
- continue;
21943
+ add (object)
21944
+ {
21945
+ this .#map .set (object .getId (), new WeakRef (object));
21946
+ this .#registry .register (object, object .getId (), object);
21947
+ this .#callback ?.();
21948
+ }
21839
21949
 
21840
- cloneCount += parent .collectCloneCount ();
21841
- }
21950
+ clear ()
21951
+ {
21952
+ for (const object of this .values ())
21953
+ this .#registry .unregister (object);
21842
21954
 
21843
- return cloneCount;
21844
- },
21845
- addParent (parent)
21846
- {
21847
- if (this [_parents] === X3DChildObject .prototype [_parents])
21848
- {
21849
- this [_parents] = new Map ();
21850
- this [_registry] = new FinalizationRegistry (id =>
21851
- {
21852
- this [_parents] .delete (id);
21853
- this .parentsChanged ();
21854
- });
21855
- }
21955
+ this .#map .clear ();
21956
+ this .#callback ?.();
21957
+ }
21856
21958
 
21857
- this [_parents] .set (parent .getId (), new WeakRef (parent));
21858
- this [_registry] .register (parent, parent .getId (), parent);
21959
+ delete (object)
21960
+ {
21961
+ this .#map .delete (object .getId ());
21962
+ this .#registry .unregister (object);
21963
+ this .#callback ?.();
21964
+ }
21859
21965
 
21860
- this .parentsChanged ();
21861
- },
21862
- removeParent (parent)
21863
- {
21864
- this [_parents] .delete (parent .getId ());
21865
- this [_registry] .unregister (parent);
21966
+ forEach (callbackFn, thisArg)
21967
+ {
21968
+ for (const object of this .values ())
21969
+ callbackFn .call (thisArg, object, object, this);
21970
+ }
21866
21971
 
21867
- this .parentsChanged ();
21868
- },
21869
- getParents ()
21870
- {
21871
- const parents = new Set ();
21972
+ has (object)
21973
+ {
21974
+ return this .#map .has (object .getId ());
21975
+ }
21872
21976
 
21873
- for (const weakRef of this [_parents] .values ())
21874
- parents .add (weakRef .deref ())
21977
+ *entries ()
21978
+ {
21979
+ for (const object of this .values ())
21980
+ yield [object, object];
21981
+ }
21875
21982
 
21876
- parents .delete (undefined);
21983
+ *keys ()
21984
+ {
21985
+ yield *this .values ();
21986
+ }
21877
21987
 
21878
- return parents;
21879
- },
21880
- parentsChanged () { },
21881
- dispose ()
21988
+ *values ()
21989
+ {
21990
+ for (const weakRef of this .#map .values ())
21882
21991
  {
21883
- this [_parents] .clear ();
21992
+ const object = weakRef .deref ();
21884
21993
 
21885
- Base_X3DObject .prototype .dispose .call (this);
21886
- },
21887
- });
21994
+ if (object)
21995
+ yield object;
21996
+ }
21997
+ }
21888
21998
  }
21889
- else
21999
+ :
22000
+ class IterableWeakSet extends Set
21890
22001
  {
21891
- Object .assign (Object .setPrototypeOf (X3DChildObject .prototype, Base_X3DObject .prototype),
22002
+ constructor ()
21892
22003
  {
21893
- [_modificationTime]: 0,
21894
- [_tainted]: false,
21895
- [_parents]: new Set (),
21896
- [_private]: false,
21897
- isInitializable ()
21898
- {
21899
- return true;
21900
- },
21901
- isInput ()
21902
- {
21903
- return false;
21904
- },
21905
- isOutput ()
21906
- {
21907
- return false;
21908
- },
21909
- setModificationTime (value)
21910
- {
21911
- this [_modificationTime] = value;
21912
- },
21913
- getModificationTime ()
21914
- {
21915
- return this [_modificationTime];
21916
- },
21917
- setTainted (value)
21918
- {
21919
- this [_tainted] = value;
21920
- },
21921
- isTainted ()
21922
- {
21923
- return this [_tainted];
21924
- },
21925
- addEvent ()
21926
- {
21927
- for (const parent of this [_parents])
21928
- parent .addEvent (this);
21929
- },
21930
- addEventObject (field, event)
21931
- {
21932
- for (const parent of this [_parents])
21933
- parent .addEventObject (this, event);
21934
- },
21935
- processEvent ()
21936
- {
21937
- this .setTainted (false);
21938
- this .processInterests ();
21939
- },
21940
- isPrivate ()
21941
- {
21942
- return this [_private];
21943
- },
21944
- setPrivate (value)
21945
- {
21946
- this [_private] = value;
21947
- },
21948
- collectCloneCount ()
21949
- {
21950
- let cloneCount = 0;
22004
+ super ();
22005
+ }
22006
+ };
22007
+ ;
21951
22008
 
21952
- for (const parent of this [_parents])
21953
- {
21954
- if (parent [_private])
21955
- continue;
22009
+ x_ite_Namespace .add ("IterableWeakSet", "x_ite/Base/IterableWeakSet", IterableWeakSet_default_);
22010
+ /* harmony default export */ const IterableWeakSet = (IterableWeakSet_default_);
22011
+ ;// CONCATENATED MODULE: ./src/x_ite/Base/X3DChildObject.js
22012
+ /*******************************************************************************
22013
+ *
22014
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
22015
+ *
22016
+ * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
22017
+ *
22018
+ * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
22019
+ *
22020
+ * The copyright notice above does not evidence any actual of intended
22021
+ * publication of such source code, and is an unpublished work by create3000.
22022
+ * This material contains CONFIDENTIAL INFORMATION that is the property of
22023
+ * create3000.
22024
+ *
22025
+ * No permission is granted to copy, distribute, or create derivative works from
22026
+ * the contents of this software, in whole or in part, without the prior written
22027
+ * permission of create3000.
22028
+ *
22029
+ * NON-MILITARY USE ONLY
22030
+ *
22031
+ * All create3000 software are effectively free software with a non-military use
22032
+ * restriction. It is free. Well commented source is provided. You may reuse the
22033
+ * source in any way you please with the exception anything that uses it must be
22034
+ * marked to indicate is contains 'non-military use only' components.
22035
+ *
22036
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
22037
+ *
22038
+ * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
22039
+ *
22040
+ * This file is part of the X_ITE Project.
22041
+ *
22042
+ * X_ITE is free software: you can redistribute it and/or modify it under the
22043
+ * terms of the GNU General Public License version 3 only, as published by the
22044
+ * Free Software Foundation.
22045
+ *
22046
+ * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
22047
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
22048
+ * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
22049
+ * details (a copy is included in the LICENSE file that accompanied this code).
22050
+ *
22051
+ * You should have received a copy of the GNU General Public License version 3
22052
+ * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
22053
+ * copy of the GPLv3 License.
22054
+ *
22055
+ * For Silvio, Joy and Adi.
22056
+ *
22057
+ ******************************************************************************/
21956
22058
 
21957
- cloneCount += parent .collectCloneCount ();
21958
- }
21959
22059
 
21960
- return cloneCount;
21961
- },
21962
- addParent (parent)
21963
- {
21964
- if (this [_parents] === X3DChildObject .prototype [_parents])
21965
- this [_parents] = new Set ();
21966
22060
 
21967
- this [_parents] .add (parent);
21968
22061
 
21969
- this .parentsChanged ();
21970
- },
21971
- removeParent (parent)
21972
- {
21973
- this [_parents] .delete (parent);
22062
+ const
22063
+ _modificationTime = Symbol (),
22064
+ _tainted = Symbol (),
22065
+ _parents = Symbol (),
22066
+ _private = Symbol ();
21974
22067
 
21975
- this .parentsChanged ();
21976
- },
21977
- getParents ()
21978
- {
21979
- return this [_parents];
21980
- },
21981
- parentsChanged () { },
21982
- dispose ()
22068
+ function X3DChildObject ()
22069
+ {
22070
+ Base_X3DObject .call (this);
22071
+ }
22072
+
22073
+ Object .assign (Object .setPrototypeOf (X3DChildObject .prototype, Base_X3DObject .prototype),
22074
+ {
22075
+ [_modificationTime]: 0,
22076
+ [_tainted]: false,
22077
+ [_parents]: new IterableWeakSet (),
22078
+ [_private]: false,
22079
+ isInitializable ()
22080
+ {
22081
+ return true;
22082
+ },
22083
+ isInput ()
22084
+ {
22085
+ return false;
22086
+ },
22087
+ isOutput ()
22088
+ {
22089
+ return false;
22090
+ },
22091
+ setModificationTime (value)
22092
+ {
22093
+ this [_modificationTime] = value;
22094
+ },
22095
+ getModificationTime ()
22096
+ {
22097
+ return this [_modificationTime];
22098
+ },
22099
+ setTainted (value)
22100
+ {
22101
+ this [_tainted] = value;
22102
+ },
22103
+ isTainted ()
22104
+ {
22105
+ return this [_tainted];
22106
+ },
22107
+ addEvent ()
22108
+ {
22109
+ for (const parent of this [_parents])
22110
+ parent .addEvent (this);
22111
+ },
22112
+ addEventObject (field, event)
22113
+ {
22114
+ for (const parent of this [_parents])
22115
+ parent .addEventObject (this, event);
22116
+ },
22117
+ processEvent ()
22118
+ {
22119
+ this .setTainted (false);
22120
+ this .processInterests ();
22121
+ },
22122
+ isPrivate ()
22123
+ {
22124
+ return this [_private];
22125
+ },
22126
+ setPrivate (value)
22127
+ {
22128
+ this [_private] = value;
22129
+ },
22130
+ collectCloneCount ()
22131
+ {
22132
+ let cloneCount = 0;
22133
+
22134
+ for (const parent of this [_parents])
21983
22135
  {
21984
- this [_parents] .clear ();
22136
+ if (parent [_private])
22137
+ continue;
21985
22138
 
21986
- Base_X3DObject .prototype .dispose .call (this);
21987
- },
21988
- });
21989
- }
22139
+ cloneCount += parent .collectCloneCount ();
22140
+ }
22141
+
22142
+ return cloneCount;
22143
+ },
22144
+ addParent (parent)
22145
+ {
22146
+ if (this [_parents] === X3DChildObject .prototype [_parents])
22147
+ this [_parents] = new IterableWeakSet (() => this .parentsChanged ());
22148
+
22149
+ this [_parents] .add (parent);
22150
+ },
22151
+ removeParent (parent)
22152
+ {
22153
+ this [_parents] .delete (parent);
22154
+ },
22155
+ getParents ()
22156
+ {
22157
+ return this [_parents];
22158
+ },
22159
+ parentsChanged () { },
22160
+ dispose ()
22161
+ {
22162
+ this [_parents] .clear ();
22163
+
22164
+ Base_X3DObject .prototype .dispose .call (this);
22165
+ },
22166
+ });
21990
22167
 
21991
22168
  for (const key of Object .keys (X3DChildObject .prototype))
21992
22169
  Object .defineProperty (X3DChildObject .prototype, key, { enumerable: false });
@@ -22682,6 +22859,7 @@ x_ite_Namespace .add ("FieldDefinitionArray", "x_ite/Base/FieldDefinitionArray",
22682
22859
 
22683
22860
 
22684
22861
 
22862
+
22685
22863
  const
22686
22864
  _value = Symbol (),
22687
22865
  _accessType = Symbol (),
@@ -22707,12 +22885,12 @@ Object .assign (Object .setPrototypeOf (X3DField .prototype, Base_X3DChildObject
22707
22885
  [_value]: null,
22708
22886
  [_accessType]: Base_X3DConstants .initializeOnly,
22709
22887
  [_unit]: null,
22710
- [_references]: new Set (),
22888
+ [_references]: new IterableWeakSet (),
22711
22889
  [_referencesCallbacks]: new Map (),
22712
- [_fieldInterests]: new Set (),
22890
+ [_fieldInterests]: new IterableWeakSet (),
22713
22891
  [_fieldCallbacks]: new Map (),
22714
- [_inputRoutes]: new Set (),
22715
- [_outputRoutes]: new Set (),
22892
+ [_inputRoutes]: new IterableWeakSet (),
22893
+ [_outputRoutes]: new IterableWeakSet (),
22716
22894
  [_routeCallbacks]: new Map (),
22717
22895
  [_uniformLocation]: null,
22718
22896
  create ()
@@ -22784,22 +22962,19 @@ Object .assign (Object .setPrototypeOf (X3DField .prototype, Base_X3DChildObject
22784
22962
  {
22785
22963
  return this [_unit];
22786
22964
  },
22787
- hasReferences ()
22788
- {
22789
- return this [_references] .size !== 0;
22790
- },
22791
22965
  isReference (accessType)
22792
22966
  {
22793
22967
  return accessType === this [_accessType] || accessType === Base_X3DConstants .inputOutput;
22794
22968
  },
22795
22969
  addReference (reference)
22796
22970
  {
22797
- const references = this .getReferences ();
22971
+ if (this [_references] === X3DField .prototype [_references])
22972
+ this [_references] = new IterableWeakSet ();
22798
22973
 
22799
- if (references .has (reference))
22974
+ if (this [_references] .has (reference))
22800
22975
  return;
22801
22976
 
22802
- references .add (reference);
22977
+ this [_references] .add (reference);
22803
22978
 
22804
22979
  // Create IS relationship
22805
22980
 
@@ -22851,9 +23026,6 @@ Object .assign (Object .setPrototypeOf (X3DField .prototype, Base_X3DChildObject
22851
23026
  },
22852
23027
  getReferences ()
22853
23028
  {
22854
- if (this [_references] === X3DField .prototype [_references])
22855
- this [_references] = new Set ();
22856
-
22857
23029
  return this [_references];
22858
23030
  },
22859
23031
  addReferencesCallback (key, object)
@@ -22880,7 +23052,7 @@ Object .assign (Object .setPrototypeOf (X3DField .prototype, Base_X3DChildObject
22880
23052
  addFieldInterest (field)
22881
23053
  {
22882
23054
  if (this [_fieldInterests] === X3DField .prototype [_fieldInterests])
22883
- this [_fieldInterests] = new Set ();
23055
+ this [_fieldInterests] = new IterableWeakSet ();
22884
23056
 
22885
23057
  this [_fieldInterests] .add (field);
22886
23058
  },
@@ -22911,7 +23083,7 @@ Object .assign (Object .setPrototypeOf (X3DField .prototype, Base_X3DChildObject
22911
23083
  addInputRoute (route)
22912
23084
  {
22913
23085
  if (this [_inputRoutes] === X3DField .prototype [_inputRoutes])
22914
- this [_inputRoutes] = new Set ();
23086
+ this [_inputRoutes] = new IterableWeakSet ();
22915
23087
 
22916
23088
  this [_inputRoutes] .add (route);
22917
23089
 
@@ -22930,7 +23102,7 @@ Object .assign (Object .setPrototypeOf (X3DField .prototype, Base_X3DChildObject
22930
23102
  addOutputRoute (route)
22931
23103
  {
22932
23104
  if (this [_outputRoutes] === X3DField .prototype [_outputRoutes])
22933
- this [_outputRoutes] = new Set ();
23105
+ this [_outputRoutes] = new IterableWeakSet ();
22934
23106
 
22935
23107
  this [_outputRoutes] .add (route);
22936
23108
 
@@ -25849,14 +26021,14 @@ Object .assign (Matrix3 .prototype,
25849
26021
  {
25850
26022
  case 1:
25851
26023
  {
25852
- if (translation)
26024
+ if (translation && !translation .equals (Numbers_Vector2 .Zero))
25853
26025
  this .translate (translation);
25854
26026
 
25855
26027
  break;
25856
26028
  }
25857
26029
  case 2:
25858
26030
  {
25859
- if (translation)
26031
+ if (translation && !translation .equals (Numbers_Vector2 .Zero))
25860
26032
  this .translate (translation);
25861
26033
 
25862
26034
  if (rotation)
@@ -25866,7 +26038,7 @@ Object .assign (Matrix3 .prototype,
25866
26038
  }
25867
26039
  case 3:
25868
26040
  {
25869
- if (translation)
26041
+ if (translation && !translation .equals (Numbers_Vector2 .Zero))
25870
26042
  this .translate (translation);
25871
26043
 
25872
26044
  if (rotation)
@@ -25879,7 +26051,7 @@ Object .assign (Matrix3 .prototype,
25879
26051
  }
25880
26052
  case 4:
25881
26053
  {
25882
- if (translation)
26054
+ if (translation && !translation .equals (Numbers_Vector2 .Zero))
25883
26055
  this .translate (translation);
25884
26056
 
25885
26057
  if (rotation)
@@ -25904,7 +26076,7 @@ Object .assign (Matrix3 .prototype,
25904
26076
  case 5:
25905
26077
  {
25906
26078
  // P' = T * C * R * SR * S * -SR * -C * P
25907
- if (translation)
26079
+ if (translation && !translation .equals (Numbers_Vector2 .Zero))
25908
26080
  this .translate (translation);
25909
26081
 
25910
26082
  const hasCenter = center && !center .equals (Numbers_Vector2 .Zero);
@@ -28172,14 +28344,14 @@ Object .assign (Matrix4_Matrix4 .prototype,
28172
28344
  {
28173
28345
  case 1:
28174
28346
  {
28175
- if (translation)
28347
+ if (translation && !translation .equals (Numbers_Vector3 .Zero))
28176
28348
  this .translate (translation);
28177
28349
 
28178
28350
  break;
28179
28351
  }
28180
28352
  case 2:
28181
28353
  {
28182
- if (translation)
28354
+ if (translation && !translation .equals (Numbers_Vector3 .Zero))
28183
28355
  this .translate (translation);
28184
28356
 
28185
28357
  if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
@@ -28189,7 +28361,7 @@ Object .assign (Matrix4_Matrix4 .prototype,
28189
28361
  }
28190
28362
  case 3:
28191
28363
  {
28192
- if (translation)
28364
+ if (translation && !translation .equals (Numbers_Vector3 .Zero))
28193
28365
  this .translate (translation);
28194
28366
 
28195
28367
  if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
@@ -28202,7 +28374,7 @@ Object .assign (Matrix4_Matrix4 .prototype,
28202
28374
  }
28203
28375
  case 4:
28204
28376
  {
28205
- if (translation)
28377
+ if (translation && !translation .equals (Numbers_Vector3 .Zero))
28206
28378
  this .translate (translation);
28207
28379
 
28208
28380
  if (rotation && !rotation .equals (Numbers_Rotation4 .Identity))
@@ -28227,7 +28399,7 @@ Object .assign (Matrix4_Matrix4 .prototype,
28227
28399
  case 5:
28228
28400
  {
28229
28401
  // P' = T * C * R * SR * S * -SR * -C * P
28230
- if (translation)
28402
+ if (translation && !translation .equals (Numbers_Vector3 .Zero))
28231
28403
  this .translate (translation);
28232
28404
 
28233
28405
  const hasCenter = center && !center .equals (Numbers_Vector3 .Zero);
@@ -28996,39 +29168,12 @@ x_ite_Namespace .add ("SFMatrix4", "x_ite/Fields/SFMatrix4", SFMatrix4_default_)
28996
29168
 
28997
29169
 
28998
29170
 
28999
-
29000
29171
  const cache = new WeakMap ();
29001
29172
 
29002
- const SFNodeCache = DEVELOPMENT ?
29003
- {
29004
- get (baseNode)
29005
- {
29006
- const node = cache .get (baseNode) ?.deref ();
29007
-
29008
- if (node)
29009
- {
29010
- return node;
29011
- }
29012
- else
29013
- {
29014
- const node = new Fields_SFNode (baseNode);
29015
-
29016
- node .dispose = dispose;
29173
+ // const r = new FinalizationRegistry (t => console .error (`object deleted ${--i} ${t}`));
29174
+ // let i = 0;
29017
29175
 
29018
- cache .set (baseNode, new WeakRef (node));
29019
-
29020
- return node;
29021
- }
29022
- },
29023
- add (baseNode, node)
29024
- {
29025
- cache .set (baseNode, new WeakRef (node));
29026
- },
29027
- delete (baseNode)
29028
- {
29029
- cache .delete (baseNode);
29030
- },
29031
- } :
29176
+ const SFNodeCache =
29032
29177
  {
29033
29178
  get (baseNode)
29034
29179
  {
@@ -29042,15 +29187,23 @@ const SFNodeCache = DEVELOPMENT ?
29042
29187
  {
29043
29188
  const node = new Fields_SFNode (baseNode);
29044
29189
 
29045
- node .dispose = dispose;
29190
+ this .set (baseNode, node);
29046
29191
 
29047
- cache .set (baseNode, node);
29192
+ // i += 2;
29193
+ // console .warn (`baseNode ${i} ${baseNode .getTypeName ()}`);
29194
+ // r .register (baseNode, `baseNode ${baseNode .getTypeName ()}`);
29195
+ // r .register (node, `node ${baseNode .getTypeName ()}`);
29048
29196
 
29049
29197
  return node;
29050
29198
  }
29051
29199
  },
29052
- add (baseNode, node)
29200
+ set (baseNode, node)
29053
29201
  {
29202
+ node .dispose = dispose;
29203
+
29204
+ // WeakMap allows associating data to objects in a way that doesn't prevent
29205
+ // the key objects from being collected, even if the values reference the keys.
29206
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
29054
29207
  cache .set (baseNode, node);
29055
29208
  },
29056
29209
  delete (baseNode)
@@ -29067,7 +29220,7 @@ function dispose ()
29067
29220
 
29068
29221
  Fields_SFNode .prototype .dispose .call (this);
29069
29222
 
29070
- cache .delete (value);
29223
+ SFNodeCache .delete (value);
29071
29224
  }
29072
29225
 
29073
29226
  const SFNodeCache_default_ = SFNodeCache;
@@ -30520,181 +30673,28 @@ function SFVec2Template (TypeName, double)
30520
30673
  },
30521
30674
  };
30522
30675
 
30523
- Object .defineProperties (SFVec2 .prototype,
30524
- {
30525
- 0: x,
30526
- 1: y,
30527
- x: Object .assign ({ enumerable: true }, x),
30528
- y: Object .assign ({ enumerable: true }, y),
30529
- });
30530
-
30531
- return SFVec2;
30532
- }
30533
-
30534
- const SFVec2 = {
30535
- SFVec2d: SFVec2Template ("SFVec2d", true),
30536
- SFVec2f: SFVec2Template ("SFVec2f", false),
30537
- };
30538
-
30539
- const SFVec2_default_ = SFVec2;
30540
- ;
30541
-
30542
- x_ite_Namespace .add ("SFVec2", "x_ite/Fields/SFVec2", SFVec2_default_);
30543
- /* harmony default export */ const Fields_SFVec2 = (SFVec2_default_);
30544
- ;// CONCATENATED MODULE: ./src/x_ite/Fields/SFVec4.js
30545
- /*******************************************************************************
30546
- *
30547
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
30548
- *
30549
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
30550
- *
30551
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
30552
- *
30553
- * The copyright notice above does not evidence any actual of intended
30554
- * publication of such source code, and is an unpublished work by create3000.
30555
- * This material contains CONFIDENTIAL INFORMATION that is the property of
30556
- * create3000.
30557
- *
30558
- * No permission is granted to copy, distribute, or create derivative works from
30559
- * the contents of this software, in whole or in part, without the prior written
30560
- * permission of create3000.
30561
- *
30562
- * NON-MILITARY USE ONLY
30563
- *
30564
- * All create3000 software are effectively free software with a non-military use
30565
- * restriction. It is free. Well commented source is provided. You may reuse the
30566
- * source in any way you please with the exception anything that uses it must be
30567
- * marked to indicate is contains 'non-military use only' components.
30568
- *
30569
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
30570
- *
30571
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
30572
- *
30573
- * This file is part of the X_ITE Project.
30574
- *
30575
- * X_ITE is free software: you can redistribute it and/or modify it under the
30576
- * terms of the GNU General Public License version 3 only, as published by the
30577
- * Free Software Foundation.
30578
- *
30579
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
30580
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
30581
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
30582
- * details (a copy is included in the LICENSE file that accompanied this code).
30583
- *
30584
- * You should have received a copy of the GNU General Public License version 3
30585
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
30586
- * copy of the GPLv3 License.
30587
- *
30588
- * For Silvio, Joy and Adi.
30589
- *
30590
- ******************************************************************************/
30591
-
30592
-
30593
-
30594
-
30595
-
30596
- function SFVec4Template (TypeName, double)
30597
- {
30598
- function SFVec4 (x, y, z, w)
30599
- {
30600
- switch (arguments .length)
30601
- {
30602
- case 0:
30603
- Base_X3DField .call (this, new Numbers_Vector4 ());
30604
- break;
30605
-
30606
- case 1:
30607
- Base_X3DField .call (this, arguments [0]);
30608
- break;
30609
-
30610
- case 4:
30611
- Base_X3DField .call (this, new Numbers_Vector4 (+x, +y, +z, +w));
30612
- break;
30613
-
30614
- default:
30615
- throw new Error ("Invalid arguments.");
30616
- }
30617
- }
30618
-
30619
- Fields_SFVecPrototypeTemplate (SFVec4, TypeName, Numbers_Vector4, double);
30620
-
30621
- for (const key of Object .keys (SFVec4 .prototype))
30622
- Object .defineProperty (SFVec4 .prototype, key, { enumerable: false });
30623
-
30624
- const x = {
30625
- get ()
30626
- {
30627
- return this .getValue () .x;
30628
- },
30629
- set (value)
30630
- {
30631
- this .getValue () .x = +value;
30632
- this .addEvent ();
30633
- },
30634
- };
30635
-
30636
- const y = {
30637
- get ()
30638
- {
30639
- return this .getValue () .y;
30640
- },
30641
- set (value)
30642
- {
30643
- this .getValue () .y = +value;
30644
- this .addEvent ();
30645
- },
30646
- };
30647
-
30648
- const z = {
30649
- get ()
30650
- {
30651
- return this .getValue () .z;
30652
- },
30653
- set (value)
30654
- {
30655
- this .getValue () .z = +value;
30656
- this .addEvent ();
30657
- },
30658
- };
30659
-
30660
- const w = {
30661
- get ()
30662
- {
30663
- return this .getValue () .w;
30664
- },
30665
- set (value)
30666
- {
30667
- this .getValue () .w = +value;
30668
- this .addEvent ();
30669
- },
30670
- };
30671
-
30672
- Object .defineProperties (SFVec4 .prototype,
30676
+ Object .defineProperties (SFVec2 .prototype,
30673
30677
  {
30674
30678
  0: x,
30675
30679
  1: y,
30676
- 2: z,
30677
- 3: w,
30678
30680
  x: Object .assign ({ enumerable: true }, x),
30679
30681
  y: Object .assign ({ enumerable: true }, y),
30680
- z: Object .assign ({ enumerable: true }, z),
30681
- w: Object .assign ({ enumerable: true }, w),
30682
30682
  });
30683
30683
 
30684
- return SFVec4;
30684
+ return SFVec2;
30685
30685
  }
30686
30686
 
30687
- const SFVec4 = {
30688
- SFVec4d: SFVec4Template ("SFVec4d", true),
30689
- SFVec4f: SFVec4Template ("SFVec4f", false),
30687
+ const SFVec2 = {
30688
+ SFVec2d: SFVec2Template ("SFVec2d", true),
30689
+ SFVec2f: SFVec2Template ("SFVec2f", false),
30690
30690
  };
30691
30691
 
30692
- const SFVec4_default_ = SFVec4;
30692
+ const SFVec2_default_ = SFVec2;
30693
30693
  ;
30694
30694
 
30695
- x_ite_Namespace .add ("SFVec4", "x_ite/Fields/SFVec4", SFVec4_default_);
30696
- /* harmony default export */ const Fields_SFVec4 = (SFVec4_default_);
30697
- ;// CONCATENATED MODULE: ./src/shim.js
30695
+ x_ite_Namespace .add ("SFVec2", "x_ite/Fields/SFVec2", SFVec2_default_);
30696
+ /* harmony default export */ const Fields_SFVec2 = (SFVec2_default_);
30697
+ ;// CONCATENATED MODULE: ./src/x_ite/Fields/SFVec4.js
30698
30698
  /*******************************************************************************
30699
30699
  *
30700
30700
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30742,44 +30742,111 @@ x_ite_Namespace .add ("SFVec4", "x_ite/Fields/SFVec4", SFVec4_default_);
30742
30742
  *
30743
30743
  ******************************************************************************/
30744
30744
 
30745
- (() =>
30746
- {
30747
- // Added at February 2022
30748
- // https://github.com/tc39/proposal-relative-indexing-method#polyfill
30749
30745
 
30750
- function at (n)
30751
- {
30752
- // ToInteger() abstract op
30753
- n = Math.trunc(n) || 0;
30754
- // Allow negative indexing from the end
30755
- if (n < 0) n += this.length;
30756
- // OOB access is guaranteed to return undefined
30757
- if (n < 0 || n >= this.length) return undefined;
30758
- // Otherwise, this is just normal property access
30759
- return this[n];
30760
- }
30761
30746
 
30762
- const TypedArray = Reflect .getPrototypeOf (Int8Array);
30763
- for (const C of [Array, String, TypedArray])
30747
+
30748
+
30749
+ function SFVec4Template (TypeName, double)
30750
+ {
30751
+ function SFVec4 (x, y, z, w)
30764
30752
  {
30765
- if (C .prototype .at === undefined)
30753
+ switch (arguments .length)
30766
30754
  {
30767
- Object .defineProperty (C .prototype, "at",
30768
- {
30769
- value: at,
30770
- writable: true,
30771
- enumerable: false,
30772
- configurable: true,
30773
- });
30755
+ case 0:
30756
+ Base_X3DField .call (this, new Numbers_Vector4 ());
30757
+ break;
30758
+
30759
+ case 1:
30760
+ Base_X3DField .call (this, arguments [0]);
30761
+ break;
30762
+
30763
+ case 4:
30764
+ Base_X3DField .call (this, new Numbers_Vector4 (+x, +y, +z, +w));
30765
+ break;
30766
+
30767
+ default:
30768
+ throw new Error ("Invalid arguments.");
30774
30769
  }
30775
30770
  }
30776
- })();
30777
30771
 
30778
- const shim_default_ = undefined;
30772
+ Fields_SFVecPrototypeTemplate (SFVec4, TypeName, Numbers_Vector4, double);
30773
+
30774
+ for (const key of Object .keys (SFVec4 .prototype))
30775
+ Object .defineProperty (SFVec4 .prototype, key, { enumerable: false });
30776
+
30777
+ const x = {
30778
+ get ()
30779
+ {
30780
+ return this .getValue () .x;
30781
+ },
30782
+ set (value)
30783
+ {
30784
+ this .getValue () .x = +value;
30785
+ this .addEvent ();
30786
+ },
30787
+ };
30788
+
30789
+ const y = {
30790
+ get ()
30791
+ {
30792
+ return this .getValue () .y;
30793
+ },
30794
+ set (value)
30795
+ {
30796
+ this .getValue () .y = +value;
30797
+ this .addEvent ();
30798
+ },
30799
+ };
30800
+
30801
+ const z = {
30802
+ get ()
30803
+ {
30804
+ return this .getValue () .z;
30805
+ },
30806
+ set (value)
30807
+ {
30808
+ this .getValue () .z = +value;
30809
+ this .addEvent ();
30810
+ },
30811
+ };
30812
+
30813
+ const w = {
30814
+ get ()
30815
+ {
30816
+ return this .getValue () .w;
30817
+ },
30818
+ set (value)
30819
+ {
30820
+ this .getValue () .w = +value;
30821
+ this .addEvent ();
30822
+ },
30823
+ };
30824
+
30825
+ Object .defineProperties (SFVec4 .prototype,
30826
+ {
30827
+ 0: x,
30828
+ 1: y,
30829
+ 2: z,
30830
+ 3: w,
30831
+ x: Object .assign ({ enumerable: true }, x),
30832
+ y: Object .assign ({ enumerable: true }, y),
30833
+ z: Object .assign ({ enumerable: true }, z),
30834
+ w: Object .assign ({ enumerable: true }, w),
30835
+ });
30836
+
30837
+ return SFVec4;
30838
+ }
30839
+
30840
+ const SFVec4 = {
30841
+ SFVec4d: SFVec4Template ("SFVec4d", true),
30842
+ SFVec4f: SFVec4Template ("SFVec4f", false),
30843
+ };
30844
+
30845
+ const SFVec4_default_ = SFVec4;
30779
30846
  ;
30780
30847
 
30781
- x_ite_Namespace .add ("shim", "shim", shim_default_);
30782
- /* harmony default export */ const shim = ((/* unused pure expression or super */ null && (shim_default_)));
30848
+ x_ite_Namespace .add ("SFVec4", "x_ite/Fields/SFVec4", SFVec4_default_);
30849
+ /* harmony default export */ const Fields_SFVec4 = (SFVec4_default_);
30783
30850
  ;// CONCATENATED MODULE: ./src/x_ite/Base/X3DArrayField.js
30784
30851
  /*******************************************************************************
30785
30852
  *
@@ -31267,26 +31334,29 @@ Object .assign (Object .setPrototypeOf (X3DObjectArrayField .prototype, Base_X3D
31267
31334
 
31268
31335
  return result;
31269
31336
  },
31270
- resize (size, value, silently)
31337
+ resize (newLength, value, silently)
31271
31338
  {
31272
31339
  const
31273
31340
  target = this [X3DObjectArrayField_target],
31274
31341
  array = target .getValue (),
31275
31342
  length = array .length;
31276
31343
 
31277
- if (size < length)
31344
+ if (newLength < 0)
31345
+ throw new RangeError ("Invalid array length");
31346
+
31347
+ if (newLength < length)
31278
31348
  {
31279
- for (let i = size; i < length; ++ i)
31349
+ for (let i = newLength; i < length; ++ i)
31280
31350
  target .removeChildObject (array [i]);
31281
31351
 
31282
- array .length = size;
31352
+ array .length = newLength;
31283
31353
 
31284
31354
  if (!silently)
31285
31355
  target .addEvent ();
31286
31356
  }
31287
- else if (size > length)
31357
+ else if (newLength > length)
31288
31358
  {
31289
- for (let i = length; i < size; ++ i)
31359
+ for (let i = length; i < newLength; ++ i)
31290
31360
  {
31291
31361
  const field = new (target .getSingleType ()) ();
31292
31362
 
@@ -31307,7 +31377,6 @@ Object .assign (Object .setPrototypeOf (X3DObjectArrayField .prototype, Base_X3D
31307
31377
  },
31308
31378
  removeChildObject (value)
31309
31379
  {
31310
- value .removeParent (this [X3DObjectArrayField_proxy]);
31311
31380
  value .dispose ();
31312
31381
  },
31313
31382
  reverse ()
@@ -32028,6 +32097,9 @@ Object .assign (Object .setPrototypeOf (X3DTypedArrayField .prototype, Base_X3DA
32028
32097
  length = target [_length],
32029
32098
  components = target .getComponents ();
32030
32099
 
32100
+ if (newLength < 0)
32101
+ throw new RangeError ("Invalid array length");
32102
+
32031
32103
  let array = target .getValue ();
32032
32104
 
32033
32105
  if (newLength < length)
@@ -33634,19 +33706,13 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
33634
33706
  {
33635
33707
  return this [_browser];
33636
33708
  },
33637
- getMainScene ()
33638
- {
33639
- let scene = this [_executionContext] .getScene ();
33640
-
33641
- while (!scene .isMainScene ())
33642
- scene = scene .getScene ();
33643
-
33644
- return scene;
33645
- },
33646
33709
  getScene ()
33647
33710
  {
33648
33711
  let executionContext = this [_executionContext];
33649
33712
 
33713
+ if (!executionContext)
33714
+ return null;
33715
+
33650
33716
  while (!executionContext .isScene ())
33651
33717
  executionContext = executionContext .getExecutionContext ();
33652
33718
 
@@ -33658,10 +33724,13 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
33658
33724
  },
33659
33725
  setExecutionContext (executionContext)
33660
33726
  {
33727
+ if (!this [_type] .includes (Base_X3DConstants .X3DScene))
33728
+ throw new Error (`${this .getTypeName ()}.setExecutionContext is not supported.`);
33729
+
33661
33730
  // Disconnect interests.
33662
33731
 
33663
- this .getOuterNode ?.() ?.getLive () .removeInterest (_set_live__, this);
33664
- this [_executionContext] .getLive () .removeInterest (_set_live__, this);
33732
+ this .getOuterNode ?.() ?.getLive () .removeInterest (_set_live__, this);
33733
+ this [_executionContext] ?.getLive () .removeInterest (_set_live__, this);
33665
33734
 
33666
33735
  // Currently only useful for Scene.
33667
33736
  this [_executionContext] = executionContext;
@@ -33671,8 +33740,8 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
33671
33740
  if (this .getOuterNode ?.())
33672
33741
  this .getOuterNode () .getLive () .addInterest (_set_live__, this);
33673
33742
 
33674
- else if (this [_executionContext] !== this)
33675
- this [_executionContext] .getLive () .addInterest (_set_live__, this);
33743
+ else
33744
+ this [_executionContext] ?.getLive () .addInterest (_set_live__, this);
33676
33745
 
33677
33746
  this [_set_live__] ();
33678
33747
  },
@@ -33684,37 +33753,6 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
33684
33753
  {
33685
33754
  return this [_type];
33686
33755
  },
33687
- create (executionContext = this [_executionContext])
33688
- {
33689
- return new (this .constructor) (executionContext);
33690
- },
33691
- copy (executionContext)
33692
- {
33693
- const copy = this .create (executionContext);
33694
-
33695
- for (const field of this [_predefinedFields])
33696
- copy .getPredefinedFields () .get (field .getName ()) .assign (field);
33697
-
33698
- if (this .canUserDefinedFields ())
33699
- {
33700
- for (const field of this [_userDefinedFields])
33701
- copy .addUserDefinedField (field .getAccessType (), field .getName (), field .copy ());
33702
- }
33703
-
33704
- copy .setup ();
33705
-
33706
- return copy;
33707
- },
33708
- // replaceWith (replacement, cache = false)
33709
- // {
33710
- // cache = cache && SFNodeCache .get (this);
33711
-
33712
- // for (const parent of new Set (this .getParents ()))
33713
- // {
33714
- // if (parent instanceof Fields .SFNode && parent !== cache)
33715
- // parent .setValue (replacement)
33716
- // }
33717
- // },
33718
33756
  setup ()
33719
33757
  {
33720
33758
  Object .freeze (this [_type]);
@@ -33788,8 +33826,8 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
33788
33826
  if (this .getOuterNode ?.())
33789
33827
  this .getOuterNode () .getLive () .addInterest (_set_live__, this);
33790
33828
 
33791
- else if (this [_executionContext] !== this)
33792
- this [_executionContext] .getLive () .addInterest (_set_live__, this);
33829
+ else if (this !== this [_browser])
33830
+ this [_executionContext] ?.getLive () .addInterest (_set_live__, this);
33793
33831
 
33794
33832
  // Return field.
33795
33833
 
@@ -33803,7 +33841,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
33803
33841
  if (this .getOuterNode ?.())
33804
33842
  return this [_live] && this .getOuterNode () .getLive () .getValue ();
33805
33843
 
33806
- else if (this !== this [_executionContext])
33844
+ else if (this [_executionContext] && this !== this [_browser])
33807
33845
  return this [_live] && this [_executionContext] .getLive () .getValue ();
33808
33846
 
33809
33847
  return this [_live];
@@ -34026,30 +34064,6 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
34026
34064
 
34027
34065
  return !field .getModificationTime ();
34028
34066
  },
34029
- hasRoutes ()
34030
- {
34031
- /// Returns true if there are any routes from or to fields of this node, otherwise false.
34032
-
34033
- for (const field of this [_predefinedFields])
34034
- {
34035
- if (field .getInputRoutes () .size || field .getOutputRoutes () .size)
34036
- return true;
34037
- }
34038
-
34039
- for (const field of this [_userDefinedFields])
34040
- {
34041
- if (field .getInputRoutes () .size || field .getOutputRoutes () .size)
34042
- return true;
34043
- }
34044
-
34045
- for (const route of this [_executionContext] .getRoutes ())
34046
- {
34047
- if (route .getSourceNode () === this || route .getDestinationNode () === this)
34048
- return true;
34049
- }
34050
-
34051
- return false;
34052
- },
34053
34067
  getExtendedEventHandling ()
34054
34068
  {
34055
34069
  // Whether initializeOnly field are treated like inputOnly and inputOutput fields.
@@ -34114,11 +34128,16 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
34114
34128
  {
34115
34129
  const time = this [_browser] .getCurrentTime ();
34116
34130
 
34117
- this [_executionContext] ._sceneGraph_changed = time;
34118
- this ._parents_changed = time;
34131
+ if (this [_executionContext])
34132
+ this [_executionContext] ._sceneGraph_changed = time;
34133
+
34134
+ this ._parents_changed = time;
34119
34135
  },
34120
34136
  dispose ()
34121
34137
  {
34138
+ this .getOuterNode ?.() ?.getLive () .removeInterest (_set_live__, this);
34139
+ this [_executionContext] ?.getLive () .removeInterest (_set_live__, this);
34140
+
34122
34141
  this .setLive (false);
34123
34142
 
34124
34143
  for (const field of this [_childObjects])
@@ -34199,7 +34218,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
34199
34218
  x_ite_Namespace .add ("X3DBaseNode", "x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
34200
34219
  /* harmony default export */ const Base_X3DBaseNode = (X3DBaseNode_default_);
34201
34220
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Legacy.js
34202
- /* provided dependency */ var $ = __webpack_require__(268);
34221
+ /* provided dependency */ var $ = __webpack_require__(631);
34203
34222
  /*******************************************************************************
34204
34223
  *
34205
34224
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34336,7 +34355,7 @@ x_ite_Namespace .add ("Legacy", "x_ite/Browser/Legacy", Legacy_default_);
34336
34355
  *
34337
34356
  ******************************************************************************/
34338
34357
 
34339
- const BROWSER_VERSION_default_ = "9.6.0";
34358
+ const BROWSER_VERSION_default_ = "9.6.2";
34340
34359
  ;
34341
34360
 
34342
34361
  x_ite_Namespace .add ("BROWSER_VERSION", "x_ite/BROWSER_VERSION", BROWSER_VERSION_default_);
@@ -34417,11 +34436,28 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
34417
34436
  {
34418
34437
  return this .constructor .specificationRange;
34419
34438
  },
34439
+ create (executionContext = this .getExecutionContext ())
34440
+ {
34441
+ return new (this .constructor) (executionContext);
34442
+ },
34420
34443
  copy (instance)
34421
34444
  {
34422
- if (!instance || instance .getType () .includes (Base_X3DConstants .X3DExecutionContext))
34445
+ if (instance ?.getType () .includes (Base_X3DConstants .X3DExecutionContext) ?? true)
34423
34446
  {
34424
- return Base_X3DBaseNode .prototype .copy .call (this, instance);
34447
+ const copy = this .create (instance);
34448
+
34449
+ for (const field of this .getPredefinedFields ())
34450
+ copy .getPredefinedFields () .get (field .getName ()) .assign (field);
34451
+
34452
+ if (this .canUserDefinedFields ())
34453
+ {
34454
+ for (const field of this .getUserDefinedFields ())
34455
+ copy .addUserDefinedField (field .getAccessType (), field .getName (), field .copy ());
34456
+ }
34457
+
34458
+ copy .setup ();
34459
+
34460
+ return copy;
34425
34461
  }
34426
34462
  else
34427
34463
  {
@@ -34455,7 +34491,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
34455
34491
  {
34456
34492
  const destinationField = copy .getPredefinedField (sourceField .getName ());
34457
34493
 
34458
- if (sourceField .hasReferences ())
34494
+ if (sourceField .getReferences () .size)
34459
34495
  {
34460
34496
  // IS relationship
34461
34497
 
@@ -34506,7 +34542,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
34506
34542
  sourceField .getName (),
34507
34543
  destinationField);
34508
34544
 
34509
- if (sourceField .hasReferences ())
34545
+ if (sourceField .getReferences () .size)
34510
34546
  {
34511
34547
  // IS relationship
34512
34548
 
@@ -34565,6 +34601,30 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
34565
34601
 
34566
34602
  return false;
34567
34603
  },
34604
+ hasRoutes ()
34605
+ {
34606
+ /// Returns true if there are any routes from or to fields of this node, otherwise false.
34607
+
34608
+ for (const field of this .getPredefinedFields ())
34609
+ {
34610
+ if (field .getInputRoutes () .size || field .getOutputRoutes () .size)
34611
+ return true;
34612
+ }
34613
+
34614
+ for (const field of this .getUserDefinedFields ())
34615
+ {
34616
+ if (field .getInputRoutes () .size || field .getOutputRoutes () .size)
34617
+ return true;
34618
+ }
34619
+
34620
+ for (const route of this .getExecutionContext () .getRoutes ())
34621
+ {
34622
+ if (route .getSourceNode () === this || route .getDestinationNode () === this)
34623
+ return true;
34624
+ }
34625
+
34626
+ return false;
34627
+ },
34568
34628
  getCloneCount ()
34569
34629
  {
34570
34630
  return Base_X3DBaseNode .prototype .collectCloneCount .call (this);
@@ -34853,7 +34913,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
34853
34913
  else if (!Array .isArray (value) && value .valueOf () instanceof Object)
34854
34914
  {
34855
34915
  // Support for Numbers (Vector234, Color34, ...).
34856
-
34916
+
34857
34917
  value = Array .from (value);
34858
34918
  value .type = "double";
34859
34919
  }
@@ -35296,7 +35356,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
35296
35356
  {
35297
35357
  if (field .getAccessType () === Base_X3DConstants .inputOutput && field .getReferences () .size !== 0)
35298
35358
  {
35299
- if (![... field .getReferences ()] .some (reference => reference .isInitializable ()))
35359
+ if (!Array .from (field .getReferences ()) .some (reference => reference .isInitializable ()))
35300
35360
  mustOutputValue = !this .isDefaultValue (field);
35301
35361
  }
35302
35362
  }
@@ -35394,7 +35454,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
35394
35454
  {
35395
35455
  if (field .getAccessType () === Base_X3DConstants .inputOutput && field .getReferences () .size !== 0)
35396
35456
  {
35397
- if (![... field .getReferences ()] .some (reference => reference .isInitializable ()))
35457
+ if (!Array .from (field .getReferences ()) .some (reference => reference .isInitializable ()))
35398
35458
  mustOutputValue = true;
35399
35459
  }
35400
35460
  }
@@ -35653,7 +35713,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
35653
35713
  {
35654
35714
  if (field .getAccessType () === Base_X3DConstants .inputOutput && field .getReferences () .size !== 0)
35655
35715
  {
35656
- if (![... field .getReferences ()] .some (reference => reference .isInitializable ()))
35716
+ if (!Array .from (field .getReferences ()) .some (reference => reference .isInitializable ()))
35657
35717
  mustOutputValue = !this .isDefaultValue (field);
35658
35718
  }
35659
35719
  }
@@ -35782,7 +35842,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
35782
35842
  {
35783
35843
  if (field .getAccessType () === Base_X3DConstants .inputOutput && field .getReferences () .size !== 0)
35784
35844
  {
35785
- if (![... field .getReferences ()] .some (reference => reference .isInitializable ()))
35845
+ if (!Array .from (field .getReferences ()) .some (reference => reference .isInitializable ()))
35786
35846
  mustOutputValue = true;
35787
35847
  }
35788
35848
  }
@@ -35937,7 +35997,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
35937
35997
 
35938
35998
  for (const field of references)
35939
35999
  {
35940
- const protoFields = [... field .getReferences ()];
36000
+ const protoFields = Array .from (field .getReferences ());
35941
36001
 
35942
36002
  for (const protoField of protoFields)
35943
36003
  {
@@ -36021,11 +36081,11 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
36021
36081
  {
36022
36082
  // Remove imported node if any.
36023
36083
 
36024
- if (!executionContext .isMainScene ())
36025
- {
36026
- const parentContext = executionContext .getExecutionContext ();
36084
+ const parentContext = executionContext .getExecutionContext ();
36027
36085
 
36028
- for (const importedNode of [... parentContext .getImportedNodes ()])
36086
+ if (parentContext)
36087
+ {
36088
+ for (const importedNode of Array .from (parentContext .getImportedNodes ()))
36029
36089
  {
36030
36090
  try
36031
36091
  {
@@ -36041,7 +36101,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
36041
36101
 
36042
36102
  // Remove exported node if any.
36043
36103
 
36044
- for (const exportedNode of [... executionContext .getExportedNodes ()])
36104
+ for (const exportedNode of Array .from (executionContext .getExportedNodes ()))
36045
36105
  {
36046
36106
  if (exportedNode .getLocalNode () === this)
36047
36107
  executionContext .removeExportedNode (exportedNode .getExportedName ());
@@ -36060,7 +36120,7 @@ Object .assign (Object .setPrototypeOf (X3DNode .prototype, Base_X3DBaseNode .pr
36060
36120
  if (!(secondParent instanceof x_ite_Fields .MFNode))
36061
36121
  continue;
36062
36122
 
36063
- secondParent .setValue ([... secondParent] .filter (node => node ?.getValue () !== this))
36123
+ secondParent .setValue (Array .from (secondParent) .filter (node => node ?.getValue () !== this))
36064
36124
  }
36065
36125
  }
36066
36126
 
@@ -38941,7 +39001,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
38941
39001
  x_ite_Namespace .add ("X3DProtoDeclaration", "x_ite/Prototype/X3DProtoDeclaration", X3DProtoDeclaration_default_);
38942
39002
  /* harmony default export */ const Prototype_X3DProtoDeclaration = (X3DProtoDeclaration_default_);
38943
39003
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/X3DParser.js
38944
- /* provided dependency */ var X3DParser_$ = __webpack_require__(268);
39004
+ /* provided dependency */ var X3DParser_$ = __webpack_require__(631);
38945
39005
  /*******************************************************************************
38946
39006
  *
38947
39007
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39203,7 +39263,7 @@ const Expressions_default_ = Expressions;
39203
39263
  x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_default_);
39204
39264
  /* harmony default export */ const Parser_Expressions = (Expressions_default_);
39205
39265
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/VRMLParser.js
39206
- /* provided dependency */ var VRMLParser_$ = __webpack_require__(268);
39266
+ /* provided dependency */ var VRMLParser_$ = __webpack_require__(631);
39207
39267
  /*******************************************************************************
39208
39268
  *
39209
39269
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39276,7 +39336,7 @@ x_ite_Namespace .add ("Expressions", "x_ite/Parser/Expressions", Expressions_def
39276
39336
  const Grammar = Parser_Expressions ({
39277
39337
  // General
39278
39338
  Whitespaces: /[\x20\n,\t\r]+/gy,
39279
- Comment: /#.*?(?=[\n\r])/gy,
39339
+ Comment: /#.*?(?=[\n\r]|$)/gy,
39280
39340
  Break: /\r?\n/g,
39281
39341
 
39282
39342
  // Header
@@ -40446,7 +40506,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, Parser_X3DParser
40446
40506
  {
40447
40507
  ++ this .unknownLevel;
40448
40508
 
40449
- this .nodeBody (this .getExecutionContext () .createNode ("WorldInfo", false));
40509
+ this .nodeBody (this .getExecutionContext () .createNode ("MetadataBoolean", false));
40450
40510
 
40451
40511
  -- this .unknownLevel;
40452
40512
 
@@ -41903,7 +41963,7 @@ const VRMLParser_default_ = VRMLParser;
41903
41963
  x_ite_Namespace .add ("VRMLParser", "x_ite/Parser/VRMLParser", VRMLParser_default_);
41904
41964
  /* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
41905
41965
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
41906
- /* provided dependency */ var XMLParser_$ = __webpack_require__(268);
41966
+ /* provided dependency */ var XMLParser_$ = __webpack_require__(631);
41907
41967
  /*******************************************************************************
41908
41968
  *
41909
41969
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -43581,320 +43641,246 @@ x_ite_Namespace .add ("JSONParser", "x_ite/Parser/JSONParser", JSONParser_defaul
43581
43641
 
43582
43642
 
43583
43643
 
43584
-
43585
-
43586
- function X3DOptimizer () { }
43587
-
43588
- Object .assign (X3DOptimizer .prototype,
43589
- {
43590
- removeGroups: false,
43591
- removeEmptyGroups: false,
43592
- combineGroupingNodes: false,
43593
- optimizeInterpolators: false,
43594
- optimizeSceneGraph (nodes)
43595
- {
43596
- const removedNodes = [ ];
43597
-
43598
- nodes .setValue (this .optimizeNodes (nodes, true, removedNodes));
43599
-
43600
- removedNodes .forEach (node => node .dispose ());
43601
- },
43602
- optimizeNodes (nodes, combine, removedNodes)
43603
- {
43604
- return [... nodes] .flatMap (node => this .optimizeNode (node, combine, removedNodes));
43605
- },
43606
- optimizeNode (node, combine, removedNodes)
43607
- {
43608
- if (!node)
43609
- return [ ];
43610
-
43611
- if (this .optimizeInterpolators)
43612
- this .removeInterpolatorsWithOnlyOneValue (node, removedNodes);
43613
-
43614
- switch (node .getNodeTypeName ())
43615
- {
43616
- case "Transform":
43617
- {
43618
- node .children = this .optimizeNodes (node .children, true, removedNodes);
43619
- break;
43620
- }
43621
- case "Anchor":
43622
- case "Group":
43623
- {
43624
- node .children = this .optimizeNodes (node .children, true, removedNodes);
43625
-
43626
- if (this .removeEmptyGroups)
43627
- {
43628
- if (node .children .length === 0)
43629
- return [ ];
43630
- }
43631
-
43632
- if (this .removeGroups)
43633
- break;
43634
-
43635
- return node;
43636
- }
43637
- case "Collision":
43638
- case "LOD":
43639
- case "Switch":
43640
- {
43641
- this .optimizeNodes (node .children, false, removedNodes);
43642
- return node;
43643
- }
43644
- case "HAnimJoint":
43645
- case "HAnimSegment":
43646
- case "HAnimSite":
43647
- {
43648
- node .children = this .optimizeNodes (node .children, true, removedNodes);
43649
- return node;
43650
- }
43651
- case "HAnimHumanoid":
43652
- {
43653
- node .skeleton = this .optimizeNodes (node .skeleton, true, removedNodes);
43654
- node .skin = this .optimizeNodes (node .skin, true, removedNodes);
43655
- return node;
43656
- }
43657
- default:
43658
- {
43659
- return node;
43660
- }
43661
- }
43662
-
43663
- if (!combine)
43664
- return node;
43665
-
43666
- if (this .removeEmptyGroups)
43667
- {
43668
- if (node .children .length === 0)
43669
- return [ ];
43670
- }
43671
-
43672
- if (!this .combineGroupingNodes)
43673
- return node;
43674
-
43675
- if (node .getValue () .hasRoutes ())
43676
- return node;
43677
-
43678
- if (node .getNodeTypeName () === "Transform")
43679
- {
43680
- node = this .combineSingleChild (node, removedNodes);
43681
-
43682
- if (!node .translation ?.getValue () .equals (Numbers_Vector3 .Zero))
43683
- return node;
43684
-
43685
- if (!node .rotation ?.getValue () .equals (Numbers_Rotation4 .Identity))
43686
- return node;
43687
-
43688
- if (!node .scale ?.getValue () .equals (Numbers_Vector3 .One))
43689
- return node;
43690
- }
43691
-
43692
- if (node .children)
43693
- {
43694
- removedNodes .push (node);
43695
-
43696
- return [... node .children];
43697
- }
43698
-
43699
- return node;
43700
- },
43701
- removeInterpolatorsWithOnlyOneValue (node, removedNodes)
43702
- {
43703
- for (const field of node .getValue () .getFields ())
43704
- {
43705
- if (field .getInputRoutes () .size !== 1)
43706
- continue;
43707
-
43708
- const
43709
- route = Array .from (field .getInputRoutes ()) [0],
43710
- sourceNode = route .sourceNode;
43711
-
43712
- if (!sourceNode .getNodeType () .includes (Base_X3DConstants .X3DInterpolatorNode))
43713
- continue;
43714
-
43715
- if (sourceNode .key .length !== 1)
43716
- continue;
43717
-
43718
- node [route .destinationField] = sourceNode .keyValue [0];
43719
-
43720
- removedNodes .push (sourceNode);
43721
-
43722
- route .dispose ();
43723
- }
43724
- },
43725
- combineSingleChild (node, removedNodes)
43726
- {
43727
- if (node .children .length !== 1)
43728
- return node;
43729
-
43730
- const child = node .children [0];
43731
-
43732
- if (child .getValue () .getCloneCount () > 1)
43733
- return node;
43734
-
43735
- if (child .getValue () .hasRoutes ())
43736
- return node;
43737
-
43738
- switch (child .getNodeTypeName ())
43739
- {
43740
- case "Transform":
43741
- case "HAnimHumanoid":
43742
- return this .combineTransform (node, child, removedNodes);
43743
- case "DirectionalLight":
43744
- case "PointLight":
43745
- case "SpotLight":
43746
- return this .combineLight (node, child, removedNodes);
43747
- default:
43748
- return node;
43749
- }
43750
- },
43751
- combineTransform (node, child, removedNodes)
43752
- {
43753
- // Combine single Transform nodes.
43754
-
43755
- const
43756
- translation = new Numbers_Vector3 (),
43757
- rotation = new Numbers_Rotation4 (),
43758
- scale = new Numbers_Vector3 (1, 1, 1),
43759
- scaleOrientation = new Numbers_Rotation4 (),
43760
- nodeMatrix = new Numbers_Matrix4 (),
43761
- childMatrix = new Numbers_Matrix4 ();
43762
-
43763
- nodeMatrix .set (node .translation .getValue (),
43764
- node .rotation .getValue (),
43765
- node .scale .getValue (),
43766
- node .scaleOrientation .getValue (),
43767
- node .center .getValue ());
43768
-
43769
- childMatrix .set (child .translation .getValue (),
43770
- child .rotation .getValue (),
43771
- child .scale .getValue (),
43772
- child .scaleOrientation .getValue (),
43773
- child .center .getValue ());
43774
-
43775
- nodeMatrix .multLeft (childMatrix);
43776
-
43777
- nodeMatrix .get (translation, rotation, scale, scaleOrientation, child .center .getValue ());
43778
-
43779
- child .translation = translation;
43780
- child .rotation = rotation;
43781
- child .scale = scale;
43782
- child .scaleOrientation = scaleOrientation;
43783
-
43784
- if (!child .getNodeTypeName () && node .getNodeTypeName ())
43785
- {
43786
- const executionContext = child .getExecutionContext ();
43787
-
43788
- executionContext .addNamedNode (executionContext .getUniqueName (node .getNodeTypeName ()), child);
43789
- }
43790
-
43791
- removedNodes .push (node);
43792
-
43793
- return child;
43794
- },
43795
- combineLight (node, child, removedNodes)
43796
- {
43797
- // Combine single light nodes.
43798
-
43799
- const nodeMatrix = new Numbers_Matrix4 ();
43800
-
43801
- nodeMatrix .set (node .translation .getValue (),
43802
- node .rotation .getValue (),
43803
- node .scale .getValue (),
43804
- node .scaleOrientation .getValue (),
43805
- node .center .getValue ());
43806
-
43807
- if (child .location)
43808
- child .location = nodeMatrix .multVecMatrix (child .location .getValue ());
43809
-
43810
- if (child .direction)
43811
- child .direction = nodeMatrix .multDirMatrix (child .direction .getValue ()) .normalize ();
43812
-
43813
- removedNodes .push (node);
43814
-
43815
- return child;
43816
- },
43817
- });
43818
-
43819
- const X3DOptimizer_default_ = X3DOptimizer;
43820
- ;
43821
-
43822
- x_ite_Namespace .add ("X3DOptimizer", "x_ite/Parser/X3DOptimizer", X3DOptimizer_default_);
43823
- /* harmony default export */ const Parser_X3DOptimizer = (X3DOptimizer_default_);
43824
- ;// CONCATENATED MODULE: ./src/x_ite/Features.js
43825
- /*******************************************************************************
43826
- *
43827
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
43828
- *
43829
- * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
43830
- *
43831
- * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
43832
- *
43833
- * The copyright notice above does not evidence any actual of intended
43834
- * publication of such source code, and is an unpublished work by create3000.
43835
- * This material contains CONFIDENTIAL INFORMATION that is the property of
43836
- * create3000.
43837
- *
43838
- * No permission is granted to copy, distribute, or create derivative works from
43839
- * the contents of this software, in whole or in part, without the prior written
43840
- * permission of create3000.
43841
- *
43842
- * NON-MILITARY USE ONLY
43843
- *
43844
- * All create3000 software are effectively free software with a non-military use
43845
- * restriction. It is free. Well commented source is provided. You may reuse the
43846
- * source in any way you please with the exception anything that uses it must be
43847
- * marked to indicate is contains 'non-military use only' components.
43848
- *
43849
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
43850
- *
43851
- * Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
43852
- *
43853
- * This file is part of the X_ITE Project.
43854
- *
43855
- * X_ITE is free software: you can redistribute it and/or modify it under the
43856
- * terms of the GNU General Public License version 3 only, as published by the
43857
- * Free Software Foundation.
43858
- *
43859
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
43860
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
43861
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
43862
- * details (a copy is included in the LICENSE file that accompanied this code).
43863
- *
43864
- * You should have received a copy of the GNU General Public License version 3
43865
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
43866
- * copy of the GPLv3 License.
43867
- *
43868
- * For Silvio, Joy and Adi.
43869
- *
43870
- ******************************************************************************/
43871
-
43872
-
43873
-
43874
- const MODULE = true;
43875
-
43876
- const Features =
43644
+
43645
+
43646
+ function X3DOptimizer () { }
43647
+
43648
+ Object .assign (X3DOptimizer .prototype,
43877
43649
  {
43878
- get ENVIRONMENT ()
43650
+ removeGroups: false,
43651
+ removeEmptyGroups: false,
43652
+ combineGroupingNodes: false,
43653
+ optimizeInterpolators: false,
43654
+ optimizeSceneGraph (nodes)
43879
43655
  {
43880
- if (DEVELOPMENT)
43881
- return "BROWSER";
43656
+ const removedNodes = [ ];
43882
43657
 
43883
- if (MODULE)
43884
- return "MODULE";
43658
+ nodes .setValue (this .optimizeNodes (nodes, true, removedNodes));
43885
43659
 
43886
- if ((typeof process === "object") && (process .release .name .search (/node|io.js/) !== -1))
43887
- return "NODE";
43660
+ removedNodes .forEach (node => node .dispose ());
43661
+ },
43662
+ optimizeNodes (nodes, combine, removedNodes)
43663
+ {
43664
+ return [... nodes] .flatMap (node => this .optimizeNode (node, combine, removedNodes));
43665
+ },
43666
+ optimizeNode (node, combine, removedNodes)
43667
+ {
43668
+ if (!node)
43669
+ return [ ];
43888
43670
 
43889
- return "BROWSER";
43671
+ if (this .optimizeInterpolators)
43672
+ this .removeInterpolatorsWithOnlyOneValue (node, removedNodes);
43673
+
43674
+ switch (node .getNodeTypeName ())
43675
+ {
43676
+ case "Transform":
43677
+ {
43678
+ node .children = this .optimizeNodes (node .children, true, removedNodes);
43679
+ break;
43680
+ }
43681
+ case "Anchor":
43682
+ case "Group":
43683
+ {
43684
+ node .children = this .optimizeNodes (node .children, true, removedNodes);
43685
+
43686
+ if (this .removeEmptyGroups)
43687
+ {
43688
+ if (node .children .length === 0)
43689
+ return [ ];
43690
+ }
43691
+
43692
+ if (this .removeGroups)
43693
+ break;
43694
+
43695
+ return node;
43696
+ }
43697
+ case "Collision":
43698
+ case "LOD":
43699
+ case "Switch":
43700
+ {
43701
+ this .optimizeNodes (node .children, false, removedNodes);
43702
+ return node;
43703
+ }
43704
+ case "HAnimJoint":
43705
+ case "HAnimSegment":
43706
+ case "HAnimSite":
43707
+ {
43708
+ node .children = this .optimizeNodes (node .children, true, removedNodes);
43709
+ return node;
43710
+ }
43711
+ case "HAnimHumanoid":
43712
+ {
43713
+ node .skeleton = this .optimizeNodes (node .skeleton, true, removedNodes);
43714
+ node .skin = this .optimizeNodes (node .skin, true, removedNodes);
43715
+ return node;
43716
+ }
43717
+ default:
43718
+ {
43719
+ return node;
43720
+ }
43721
+ }
43722
+
43723
+ if (!combine)
43724
+ return node;
43725
+
43726
+ if (this .removeEmptyGroups)
43727
+ {
43728
+ if (node .children .length === 0)
43729
+ return [ ];
43730
+ }
43731
+
43732
+ if (!this .combineGroupingNodes)
43733
+ return node;
43734
+
43735
+ if (node .getValue () .hasRoutes ())
43736
+ return node;
43737
+
43738
+ if (node .getNodeTypeName () === "Transform")
43739
+ {
43740
+ node = this .combineSingleChild (node, removedNodes);
43741
+
43742
+ if (!node .translation ?.getValue () .equals (Numbers_Vector3 .Zero))
43743
+ return node;
43744
+
43745
+ if (!node .rotation ?.getValue () .equals (Numbers_Rotation4 .Identity))
43746
+ return node;
43747
+
43748
+ if (!node .scale ?.getValue () .equals (Numbers_Vector3 .One))
43749
+ return node;
43750
+ }
43751
+
43752
+ if (node .children)
43753
+ {
43754
+ removedNodes .push (node);
43755
+
43756
+ return [... node .children];
43757
+ }
43758
+
43759
+ return node;
43890
43760
  },
43891
- };
43761
+ removeInterpolatorsWithOnlyOneValue (node, removedNodes)
43762
+ {
43763
+ for (const field of node .getValue () .getFields ())
43764
+ {
43765
+ if (field .getInputRoutes () .size !== 1)
43766
+ continue;
43892
43767
 
43893
- const Features_default_ = Features;
43768
+ const
43769
+ route = Array .from (field .getInputRoutes ()) [0],
43770
+ sourceNode = route .sourceNode;
43771
+
43772
+ if (!sourceNode .getNodeType () .includes (Base_X3DConstants .X3DInterpolatorNode))
43773
+ continue;
43774
+
43775
+ if (sourceNode .key .length !== 1)
43776
+ continue;
43777
+
43778
+ node [route .destinationField] = sourceNode .keyValue [0];
43779
+
43780
+ removedNodes .push (sourceNode);
43781
+
43782
+ route .dispose ();
43783
+ }
43784
+ },
43785
+ combineSingleChild (node, removedNodes)
43786
+ {
43787
+ if (node .children .length !== 1)
43788
+ return node;
43789
+
43790
+ const child = node .children [0];
43791
+
43792
+ if (child .getValue () .getCloneCount () > 1)
43793
+ return node;
43794
+
43795
+ if (child .getValue () .hasRoutes ())
43796
+ return node;
43797
+
43798
+ switch (child .getNodeTypeName ())
43799
+ {
43800
+ case "Transform":
43801
+ case "HAnimHumanoid":
43802
+ return this .combineTransform (node, child, removedNodes);
43803
+ case "DirectionalLight":
43804
+ case "PointLight":
43805
+ case "SpotLight":
43806
+ return this .combineLight (node, child, removedNodes);
43807
+ default:
43808
+ return node;
43809
+ }
43810
+ },
43811
+ combineTransform (node, child, removedNodes)
43812
+ {
43813
+ // Combine single Transform nodes.
43814
+
43815
+ const
43816
+ translation = new Numbers_Vector3 (),
43817
+ rotation = new Numbers_Rotation4 (),
43818
+ scale = new Numbers_Vector3 (1, 1, 1),
43819
+ scaleOrientation = new Numbers_Rotation4 (),
43820
+ nodeMatrix = new Numbers_Matrix4 (),
43821
+ childMatrix = new Numbers_Matrix4 ();
43822
+
43823
+ nodeMatrix .set (node .translation .getValue (),
43824
+ node .rotation .getValue (),
43825
+ node .scale .getValue (),
43826
+ node .scaleOrientation .getValue (),
43827
+ node .center .getValue ());
43828
+
43829
+ childMatrix .set (child .translation .getValue (),
43830
+ child .rotation .getValue (),
43831
+ child .scale .getValue (),
43832
+ child .scaleOrientation .getValue (),
43833
+ child .center .getValue ());
43834
+
43835
+ nodeMatrix .multLeft (childMatrix);
43836
+
43837
+ nodeMatrix .get (translation, rotation, scale, scaleOrientation, child .center .getValue ());
43838
+
43839
+ child .translation = translation;
43840
+ child .rotation = rotation;
43841
+ child .scale = scale;
43842
+ child .scaleOrientation = scaleOrientation;
43843
+
43844
+ if (!child .getNodeTypeName () && node .getNodeTypeName ())
43845
+ {
43846
+ const executionContext = child .getExecutionContext ();
43847
+
43848
+ executionContext .addNamedNode (executionContext .getUniqueName (node .getNodeTypeName ()), child);
43849
+ }
43850
+
43851
+ removedNodes .push (node);
43852
+
43853
+ return child;
43854
+ },
43855
+ combineLight (node, child, removedNodes)
43856
+ {
43857
+ // Combine single light nodes.
43858
+
43859
+ const nodeMatrix = new Numbers_Matrix4 ();
43860
+
43861
+ nodeMatrix .set (node .translation .getValue (),
43862
+ node .rotation .getValue (),
43863
+ node .scale .getValue (),
43864
+ node .scaleOrientation .getValue (),
43865
+ node .center .getValue ());
43866
+
43867
+ if (child .location)
43868
+ child .location = nodeMatrix .multVecMatrix (child .location .getValue ());
43869
+
43870
+ if (child .direction)
43871
+ child .direction = nodeMatrix .multDirMatrix (child .direction .getValue ()) .normalize ();
43872
+
43873
+ removedNodes .push (node);
43874
+
43875
+ return child;
43876
+ },
43877
+ });
43878
+
43879
+ const X3DOptimizer_default_ = X3DOptimizer;
43894
43880
  ;
43895
43881
 
43896
- x_ite_Namespace .add ("Features", "x_ite/Features", Features_default_);
43897
- /* harmony default export */ const x_ite_Features = (Features_default_);
43882
+ x_ite_Namespace .add ("X3DOptimizer", "x_ite/Parser/X3DOptimizer", X3DOptimizer_default_);
43883
+ /* harmony default export */ const Parser_X3DOptimizer = (X3DOptimizer_default_);
43898
43884
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Networking/URLs.js
43899
43885
  /*******************************************************************************
43900
43886
  *
@@ -44009,7 +43995,7 @@ const URLs_default_ = URLs;
44009
43995
  x_ite_Namespace .add ("URLs", "x_ite/Browser/Networking/URLs", URLs_default_);
44010
43996
  /* harmony default export */ const Networking_URLs = (URLs_default_);
44011
43997
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GLTF2Parser.js
44012
- /* provided dependency */ var GLTF2Parser_$ = __webpack_require__(268);
43998
+ /* provided dependency */ var GLTF2Parser_$ = __webpack_require__(631);
44013
43999
  /*******************************************************************************
44014
44000
  *
44015
44001
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44179,7 +44165,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
44179
44165
  .then (resolve)
44180
44166
  .catch (reject);
44181
44167
  },
44182
- rootObject: async function (glTF)
44168
+ async rootObject (glTF)
44183
44169
  {
44184
44170
  if (!(glTF instanceof Object))
44185
44171
  return;
@@ -44519,14 +44505,14 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
44519
44505
 
44520
44506
  return light .node = lightNode;
44521
44507
  },
44522
- buffersArray: async function (buffers)
44508
+ async buffersArray (buffers)
44523
44509
  {
44524
44510
  if (!(buffers instanceof Array))
44525
44511
  return;
44526
44512
 
44527
44513
  this .buffers = await Promise .all (buffers .map ((buffer, i) => this .bufferObject (buffer, i)));
44528
44514
  },
44529
- bufferObject: async function (buffer, i)
44515
+ async bufferObject (buffer, i)
44530
44516
  {
44531
44517
  if (!(buffer instanceof Object))
44532
44518
  return;
@@ -44808,14 +44794,14 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
44808
44794
  });
44809
44795
  };
44810
44796
  })(),
44811
- imagesArray: async function (images)
44797
+ async imagesArray (images)
44812
44798
  {
44813
44799
  if (!(images instanceof Array))
44814
44800
  return;
44815
44801
 
44816
44802
  this .images = await Promise .all (images .map (image => this .imageObject (image)));
44817
44803
  },
44818
- imageObject: async function (image)
44804
+ async imageObject (image)
44819
44805
  {
44820
44806
  if (!(image instanceof Object))
44821
44807
  return;
@@ -45478,7 +45464,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
45478
45464
  draco .destroy (buffer);
45479
45465
  }
45480
45466
  },
45481
- createDraco: async function ()
45467
+ async createDraco ()
45482
45468
  {
45483
45469
  if (this .constructor .draco)
45484
45470
  {
@@ -47311,7 +47297,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
47311
47297
  x_ite_Namespace .add ("GLTF2Parser", "x_ite/Parser/GLTF2Parser", GLTF2Parser_default_);
47312
47298
  /* harmony default export */ const Parser_GLTF2Parser = (GLTF2Parser_default_);
47313
47299
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GLB2Parser.js
47314
- /* provided dependency */ var GLB2Parser_$ = __webpack_require__(268);
47300
+ /* provided dependency */ var GLB2Parser_$ = __webpack_require__(631);
47315
47301
  /*******************************************************************************
47316
47302
  *
47317
47303
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47406,7 +47392,7 @@ Object .assign (Object .setPrototypeOf (GLB2Parser .prototype, Parser_X3DParser
47406
47392
  .then (resolve)
47407
47393
  .catch (reject);
47408
47394
  },
47409
- glb: async function ()
47395
+ async glb ()
47410
47396
  {
47411
47397
  this .chunks ();
47412
47398
 
@@ -47463,7 +47449,7 @@ const GLB2Parser_default_ = GLB2Parser;
47463
47449
  x_ite_Namespace .add ("GLB2Parser", "x_ite/Parser/GLB2Parser", GLB2Parser_default_);
47464
47450
  /* harmony default export */ const Parser_GLB2Parser = (GLB2Parser_default_);
47465
47451
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/OBJParser.js
47466
- /* provided dependency */ var OBJParser_$ = __webpack_require__(268);
47452
+ /* provided dependency */ var OBJParser_$ = __webpack_require__(631);
47467
47453
  /*******************************************************************************
47468
47454
  *
47469
47455
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47531,7 +47517,7 @@ const OBJParser_Grammar = Parser_Expressions ({
47531
47517
  // General
47532
47518
  whitespaces: /[\x20\n\t\r]+/gy,
47533
47519
  whitespacesNoLineTerminator: /[\x20\t]+/gy,
47534
- comment: /#.*?(?=[\n\r])/gy,
47520
+ comment: /#.*?(?=[\n\r]|$)/gy,
47535
47521
  untilEndOfLine: /[^\r\n]+/gy,
47536
47522
 
47537
47523
  // Keywords
@@ -47618,7 +47604,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47618
47604
  .then (resolve)
47619
47605
  .catch (reject);
47620
47606
  },
47621
- obj: async function ()
47607
+ async obj ()
47622
47608
  {
47623
47609
  // Set profile and components.
47624
47610
 
@@ -47674,12 +47660,12 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47674
47660
  {
47675
47661
  OBJParser_Grammar .whitespacesNoLineTerminator .parse (this);
47676
47662
  },
47677
- statements: async function ()
47663
+ async statements ()
47678
47664
  {
47679
47665
  while (await this .statement ())
47680
47666
  ;
47681
47667
  },
47682
- statement: async function ()
47668
+ async statement ()
47683
47669
  {
47684
47670
  if (await this .mtllibs ())
47685
47671
  return true;
@@ -47715,7 +47701,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47715
47701
 
47716
47702
  return false;
47717
47703
  },
47718
- mtllibs: async function ()
47704
+ async mtllibs ()
47719
47705
  {
47720
47706
  this .comments ();
47721
47707
 
@@ -47735,7 +47721,7 @@ Object .assign (Object .setPrototypeOf (OBJParser .prototype, Parser_X3DParser .
47735
47721
 
47736
47722
  return false;
47737
47723
  },
47738
- mtllib: async function (path)
47724
+ async mtllib (path)
47739
47725
  {
47740
47726
  try
47741
47727
  {
@@ -48623,7 +48609,7 @@ const STLAParser_Grammar = Parser_Expressions ({
48623
48609
  // General
48624
48610
  whitespaces: /[\x20\n\t\r]+/gy,
48625
48611
  whitespacesNoLineTerminator: /[\x20\t]+/gy,
48626
- comment: /;.*?(?=[\n\r])/gy,
48612
+ comment: /;.*?(?=[\n\r]|$)/gy,
48627
48613
  untilEndOfLine: /[^\r\n]+/gy,
48628
48614
 
48629
48615
  // Keywords
@@ -48685,7 +48671,7 @@ Object .assign (Object .setPrototypeOf (STLAParser .prototype, Parser_X3DParser
48685
48671
  .then (resolve)
48686
48672
  .catch (reject);
48687
48673
  },
48688
- stl: async function ()
48674
+ async stl ()
48689
48675
  {
48690
48676
  // Set profile and components.
48691
48677
 
@@ -49035,7 +49021,7 @@ Object .assign (Object .setPrototypeOf (STLBParser .prototype, Parser_X3DParser
49035
49021
  .then (resolve)
49036
49022
  .catch (reject);
49037
49023
  },
49038
- stl: async function ()
49024
+ async stl ()
49039
49025
  {
49040
49026
  // Set profile and components.
49041
49027
 
@@ -49231,7 +49217,7 @@ Object .assign (Object .setPrototypeOf (PLYAParser .prototype, Parser_X3DParser
49231
49217
  .then (resolve)
49232
49218
  .catch (reject);
49233
49219
  },
49234
- ply: async function ()
49220
+ async ply ()
49235
49221
  {
49236
49222
  // Set profile and components.
49237
49223
 
@@ -50821,8 +50807,8 @@ const MatrixStack_default_ = MatrixStack;
50821
50807
  x_ite_Namespace .add ("MatrixStack", "standard/Math/Utility/MatrixStack", MatrixStack_default_);
50822
50808
  /* harmony default export */ const Utility_MatrixStack = (MatrixStack_default_);
50823
50809
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/SVGParser.js
50824
- /* provided dependency */ var SVGParser_$ = __webpack_require__(268);
50825
- /* provided dependency */ var libtess = __webpack_require__(937);
50810
+ /* provided dependency */ var SVGParser_$ = __webpack_require__(631);
50811
+ /* provided dependency */ var libtess = __webpack_require__(580);
50826
50812
  /*******************************************************************************
50827
50813
  *
50828
50814
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51062,7 +51048,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
51062
51048
  .then (resolve)
51063
51049
  .catch (reject);
51064
51050
  },
51065
- xmlElement: async function (xmlElement)
51051
+ async xmlElement (xmlElement)
51066
51052
  {
51067
51053
  switch (xmlElement .nodeName)
51068
51054
  {
@@ -51084,7 +51070,7 @@ Object .assign (Object .setPrototypeOf (SVGParser .prototype, Parser_X3DParser .
51084
51070
 
51085
51071
  return this .getScene ();
51086
51072
  },
51087
- svgElement: async function (xmlElement)
51073
+ async svgElement (xmlElement)
51088
51074
  {
51089
51075
  const
51090
51076
  browser = this .getBrowser (),
@@ -53590,7 +53576,7 @@ const SVGParser_default_ = SVGParser;
53590
53576
  x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_);
53591
53577
  /* harmony default export */ const Parser_SVGParser = (SVGParser_default_);
53592
53578
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/GoldenGate.js
53593
- /* provided dependency */ var GoldenGate_$ = __webpack_require__(268);
53579
+ /* provided dependency */ var GoldenGate_$ = __webpack_require__(631);
53594
53580
  /*******************************************************************************
53595
53581
  *
53596
53582
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53651,18 +53637,47 @@ x_ite_Namespace .add ("SVGParser", "x_ite/Parser/SVGParser", SVGParser_default_)
53651
53637
 
53652
53638
 
53653
53639
 
53654
- function GoldenGate (scene)
53640
+ class GoldenGate extends Parser_X3DParser
53655
53641
  {
53656
- Parser_X3DParser .call (this, scene);
53642
+ #inputs = new Map ();
53657
53643
 
53658
- this .inputs = new Map ();
53659
- }
53644
+ static #parsers = [
53645
+ Parser_SVGParser,
53646
+ Parser_XMLParser,
53647
+ Parser_GLTF2Parser,
53648
+ Parser_GLB2Parser,
53649
+ Parser_JSONParser,
53650
+ Parser_VRMLParser,
53651
+ Parser_OBJParser,
53652
+ Parser_STLAParser,
53653
+ Parser_STLBParser,
53654
+ Parser_PLYAParser,
53655
+ Parser_PLYBParser,
53656
+ ];
53657
+
53658
+ static addParsers (... args)
53659
+ {
53660
+ this .#parsers .push (... args);
53661
+ }
53662
+
53663
+ static removeParsers (... args)
53664
+ {
53665
+ this .#parsers = this .#parsers .filter (parser => !args .includes (parser));
53666
+ }
53667
+
53668
+ static getParsers ()
53669
+ {
53670
+ return this .#parsers .slice ();
53671
+ }
53672
+
53673
+ /**
53674
+ * @deprecated Use `GoldenGate.add/remove/getParsers`.
53675
+ */
53676
+ static get Parser () { return this .#parsers; }
53660
53677
 
53661
- Object .assign (Object .setPrototypeOf (GoldenGate .prototype, Parser_X3DParser .prototype),
53662
- {
53663
53678
  parseIntoScene (x3dSyntax, resolve, reject)
53664
53679
  {
53665
- for (const Parser of GoldenGate .Parser)
53680
+ for (const Parser of GoldenGate .#parsers)
53666
53681
  {
53667
53682
  try
53668
53683
  {
@@ -53697,7 +53712,8 @@ Object .assign (Object .setPrototypeOf (GoldenGate .prototype, Parser_X3DParser
53697
53712
  throw new Error ("Couldn't parse X3D. No suitable file handler found for 'data:' URL.");
53698
53713
  else
53699
53714
  throw new Error (`Couldn't parse X3D. No suitable file handler found for '${this .getScene () .worldURL}'.`);
53700
- },
53715
+ }
53716
+
53701
53717
  getInput (encoding, x3dSyntax)
53702
53718
  {
53703
53719
  if (Array .isArray (encoding))
@@ -53706,16 +53722,17 @@ Object .assign (Object .setPrototypeOf (GoldenGate .prototype, Parser_X3DParser
53706
53722
  }
53707
53723
  else
53708
53724
  {
53709
- if (this .inputs .has (encoding))
53710
- return this .inputs .get (encoding);
53725
+ if (this .#inputs .has (encoding))
53726
+ return this .#inputs .get (encoding);
53711
53727
 
53712
53728
  const input = this .createInput (encoding, x3dSyntax);
53713
53729
 
53714
- this .inputs .set (encoding, input);
53730
+ this .#inputs .set (encoding, input);
53715
53731
 
53716
53732
  return input;
53717
53733
  }
53718
- },
53734
+ }
53735
+
53719
53736
  createInput (encoding, x3dSyntax)
53720
53737
  {
53721
53738
  try
@@ -53736,22 +53753,8 @@ Object .assign (Object .setPrototypeOf (GoldenGate .prototype, Parser_X3DParser
53736
53753
  {
53737
53754
  return undefined;
53738
53755
  }
53739
- },
53740
- });
53741
-
53742
- GoldenGate .Parser = [
53743
- Parser_SVGParser,
53744
- Parser_XMLParser,
53745
- Parser_GLTF2Parser,
53746
- Parser_GLB2Parser,
53747
- Parser_JSONParser,
53748
- Parser_VRMLParser,
53749
- Parser_OBJParser,
53750
- Parser_STLAParser,
53751
- Parser_STLBParser,
53752
- Parser_PLYAParser,
53753
- Parser_PLYBParser,
53754
- ];
53756
+ }
53757
+ }
53755
53758
 
53756
53759
  const GoldenGate_default_ = GoldenGate;
53757
53760
  ;
@@ -53940,7 +53943,7 @@ const Plane3_default_ = Plane3;
53940
53943
  x_ite_Namespace .add ("Plane3", "standard/Math/Geometry/Plane3", Plane3_default_);
53941
53944
  /* harmony default export */ const Geometry_Plane3 = (Plane3_default_);
53942
53945
  ;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
53943
- /* provided dependency */ var Triangle3_libtess = __webpack_require__(937);
53946
+ /* provided dependency */ var Triangle3_libtess = __webpack_require__(580);
53944
53947
  /*******************************************************************************
53945
53948
  *
53946
53949
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57711,7 +57714,7 @@ Object .assign (Object .setPrototypeOf (BindableList .prototype, Base_X3DBaseNod
57711
57714
  node = this .nodes [i],
57712
57715
  scene = node .getExecutionContext () .getOuterNode () ?.getScene () ?? node .getScene ();
57713
57716
 
57714
- if (!enableInlineBindables && !scene .isMainScene ())
57717
+ if (!enableInlineBindables && scene .getExecutionContext ())
57715
57718
  continue;
57716
57719
 
57717
57720
  if (node .getName () == name)
@@ -57727,7 +57730,7 @@ Object .assign (Object .setPrototypeOf (BindableList .prototype, Base_X3DBaseNod
57727
57730
  node = this .nodes [i],
57728
57731
  scene = node .getExecutionContext () .getOuterNode () ?.getScene () ?? node .getScene ();
57729
57732
 
57730
- if (!enableInlineBindables && !scene .isMainScene ())
57733
+ if (!enableInlineBindables && scene .getExecutionContext ())
57731
57734
  continue;
57732
57735
 
57733
57736
  if (node ._isBound .getValue ())
@@ -57742,7 +57745,7 @@ Object .assign (Object .setPrototypeOf (BindableList .prototype, Base_X3DBaseNod
57742
57745
  node = this .nodes [i],
57743
57746
  scene = node .getExecutionContext () .getOuterNode () ?.getScene () ?? node .getScene ();
57744
57747
 
57745
- if (!enableInlineBindables && !scene .isMainScene ())
57748
+ if (!enableInlineBindables && scene .getExecutionContext ())
57746
57749
  continue;
57747
57750
 
57748
57751
  return node;
@@ -62469,7 +62472,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
62469
62472
  x_ite_Namespace .add ("X3DTexture2DNode", "x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
62470
62473
  /* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
62471
62474
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
62472
- /* provided dependency */ var ImageTexture_$ = __webpack_require__(268);
62475
+ /* provided dependency */ var ImageTexture_$ = __webpack_require__(631);
62473
62476
  /*******************************************************************************
62474
62477
  *
62475
62478
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62660,9 +62663,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, Texturing_X3DTe
62660
62663
  canvas = document .createElement ("canvas"),
62661
62664
  cx = canvas .getContext ("2d", { willReadFrequently: true });
62662
62665
 
62663
- let
62664
- width = image .width,
62665
- height = image .height;
62666
+ let { width, height } = image;
62666
62667
 
62667
62668
  if (!(Math_Algorithm .isPowerOfTwo (width) && Math_Algorithm .isPowerOfTwo (height)))
62668
62669
  {
@@ -66053,7 +66054,7 @@ const X3DWorld_default_ = X3DWorld;
66053
66054
  x_ite_Namespace .add ("X3DWorld", "x_ite/Execution/X3DWorld", X3DWorld_default_);
66054
66055
  /* harmony default export */ const Execution_X3DWorld = (X3DWorld_default_);
66055
66056
  ;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
66056
- /* provided dependency */ var FileLoader_$ = __webpack_require__(268);
66057
+ /* provided dependency */ var FileLoader_$ = __webpack_require__(631);
66057
66058
  /*******************************************************************************
66058
66059
  *
66059
66060
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66249,7 +66250,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, Base_X3DObject .p
66249
66250
  this .loadDocumentAsync (this .url .shift ())
66250
66251
  .catch (this .loadDocumentError .bind (this));
66251
66252
  },
66252
- loadDocumentAsync: async function (url)
66253
+ async loadDocumentAsync (url)
66253
66254
  {
66254
66255
  if (url .length === 0)
66255
66256
  {
@@ -66472,11 +66473,8 @@ Object .assign (Object .setPrototypeOf (X3DExternProtoDeclaration .prototype, Pr
66472
66473
 
66473
66474
  if (proto)
66474
66475
  {
66475
- for (const field of [... this .getUserDefinedFields ()])
66476
- this .removeUserDefinedField (field .getName ())
66477
-
66478
- for (const field of proto .getUserDefinedFields ())
66479
- this .addUserDefinedField (field .getAccessType (), field .getName (), field);
66476
+ this .getFieldDefinitions () .assign (proto .getFieldDefinitions ());
66477
+ this .getUserDefinedFields () .assign (proto .getUserDefinedFields ());
66480
66478
  }
66481
66479
 
66482
66480
  this .updateInstances ();
@@ -66505,8 +66503,8 @@ Object .assign (Object .setPrototypeOf (X3DExternProtoDeclaration .prototype, Pr
66505
66503
  },
66506
66504
  setInternalScene (value)
66507
66505
  {
66508
- this [_scene] ?.setExecutionContext (this [_scene]);
66509
- this [_scene] ?.setLive (false);
66506
+ if (this [_scene] !== this .getBrowser () .getPrivateScene ())
66507
+ this [_scene] ?.dispose ();
66510
66508
 
66511
66509
  this [_scene] = value;
66512
66510
 
@@ -66990,7 +66988,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
66990
66988
  x_ite_Namespace .add ("ProtoDeclarationArray", "x_ite/Prototype/ProtoDeclarationArray", ProtoDeclarationArray_default_);
66991
66989
  /* harmony default export */ const Prototype_ProtoDeclarationArray = (ProtoDeclarationArray_default_);
66992
66990
  ;// CONCATENATED MODULE: ./src/x_ite/Routing/X3DRoute.js
66993
- /* provided dependency */ var X3DRoute_$ = __webpack_require__(268);
66991
+ /* provided dependency */ var X3DRoute_$ = __webpack_require__(631);
66994
66992
  /*******************************************************************************
66995
66993
  *
66996
66994
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67379,8 +67377,8 @@ Object .defineProperties (X3DRoute .prototype,
67379
67377
  {
67380
67378
  if (this [_sourceNode] instanceof Core_X3DNode)
67381
67379
  return Fields_SFNodeCache .get (this [_sourceNode]);
67382
- else
67383
- return this [_sourceNode];
67380
+
67381
+ return this [_sourceNode];
67384
67382
  },
67385
67383
  enumerable: true,
67386
67384
  },
@@ -67395,8 +67393,8 @@ Object .defineProperties (X3DRoute .prototype,
67395
67393
  {
67396
67394
  if (this [_destinationNode] instanceof Core_X3DNode)
67397
67395
  return Fields_SFNodeCache .get (this [_destinationNode]);
67398
- else
67399
- return this [_destinationNode];
67396
+
67397
+ return this [_destinationNode];
67400
67398
  },
67401
67399
  enumerable: true,
67402
67400
  },
@@ -67614,7 +67612,7 @@ function X3DExecutionContext (executionContext, outerNode = null, browser = exec
67614
67612
  this ._rootNodes .setPrivate (false);
67615
67613
  this ._rootNodes .collectCloneCount = () => 1;
67616
67614
 
67617
- if (executionContext !== this)
67615
+ if (executionContext)
67618
67616
  {
67619
67617
  this ._countPrimitives .addReference (executionContext ._countPrimitives);
67620
67618
  this ._sceneGraph_changed .addFieldInterest (executionContext ._sceneGraph_changed);
@@ -67638,12 +67636,15 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
67638
67636
  {
67639
67637
  setExecutionContext (executionContext)
67640
67638
  {
67641
- this ._countPrimitives .removeReference (this .getExecutionContext () ._countPrimitives);
67642
- this ._sceneGraph_changed .removeFieldInterest (this .getExecutionContext () ._sceneGraph_changed);
67639
+ if (this .getExecutionContext ())
67640
+ {
67641
+ this ._countPrimitives .removeReference (this .getExecutionContext () ._countPrimitives);
67642
+ this ._sceneGraph_changed .removeFieldInterest (this .getExecutionContext () ._sceneGraph_changed);
67643
+ }
67643
67644
 
67644
67645
  Base_X3DBaseNode .prototype .setExecutionContext .call (this, executionContext);
67645
67646
 
67646
- if (executionContext !== this)
67647
+ if (executionContext)
67647
67648
  {
67648
67649
  this ._countPrimitives .addReference (executionContext ._countPrimitives);
67649
67650
  this ._sceneGraph_changed .addFieldInterest (executionContext ._sceneGraph_changed);
@@ -67664,7 +67665,7 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
67664
67665
  },
67665
67666
  setCountPrimitives (value)
67666
67667
  {
67667
- this ._countPrimitives = this .getExecutionContext () .getCountPrimitives () && value;
67668
+ this ._countPrimitives = (this .getExecutionContext () ?.getCountPrimitives () ?? true) && value;
67668
67669
  },
67669
67670
  getSpecificationVersion ()
67670
67671
  {
@@ -68418,10 +68419,12 @@ Object .assign (Object .setPrototypeOf (X3DExecutionContext .prototype, Base_X3D
68418
68419
  for (const route of Array .from (this [X3DExecutionContext_routes]))
68419
68420
  this .deleteRoute (route);
68420
68421
 
68421
- this .externprotos .clear ();
68422
- this .protos .clear ();
68423
- this .importedNodes .clear ();
68424
- this .routes .clear ();
68422
+ this [_outerNode] = null;
68423
+ this [_namedNodes] .clear ();
68424
+ this [_importedNodes] .clear ();
68425
+ this [_protos] .clear ();
68426
+ this [_externprotos] .clear ();
68427
+ this [X3DExecutionContext_routes] .clear ();
68425
68428
 
68426
68429
  Base_X3DBaseNode .prototype .dispose .call (this);
68427
68430
  },
@@ -68569,7 +68572,6 @@ x_ite_Namespace .add ("X3DExecutionContext", "x_ite/Execution/X3DExecutionContex
68569
68572
 
68570
68573
 
68571
68574
 
68572
-
68573
68575
  const
68574
68576
  X3DPrototypeInstance_fieldDefinitions = Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions"),
68575
68577
  _protoNode = Symbol (),
@@ -68579,12 +68581,14 @@ const
68579
68581
  function X3DPrototypeInstance (executionContext, protoNode)
68580
68582
  {
68581
68583
  this [_protoNode] = protoNode;
68582
- this [X3DPrototypeInstance_fieldDefinitions] = new Base_FieldDefinitionArray (protoNode .getFieldDefinitions ());
68584
+ this [X3DPrototypeInstance_fieldDefinitions] = protoNode .getFieldDefinitions ();
68583
68585
  this [X3DPrototypeInstance_body] = null;
68584
68586
 
68585
68587
  Core_X3DNode .call (this, executionContext);
68586
68588
 
68587
68589
  this .addType (Base_X3DConstants .X3DPrototypeInstance);
68590
+
68591
+ this .setProtoNode (protoNode, true);
68588
68592
  }
68589
68593
 
68590
68594
  Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3DNode .prototype),
@@ -68601,7 +68605,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68601
68605
  {
68602
68606
  Core_X3DNode .prototype .initialize .call (this);
68603
68607
 
68604
- this .setProtoNode (this [_protoNode]);
68608
+ this .realize ();
68605
68609
  },
68606
68610
  construct ()
68607
68611
  {
@@ -68613,8 +68617,6 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68613
68617
 
68614
68618
  this [X3DPrototypeInstance_body] ?.dispose ();
68615
68619
 
68616
- this [X3DPrototypeInstance_fieldDefinitions] .assign (protoNode .getFieldDefinitions ());
68617
-
68618
68620
  // If there is a proto, the externproto is completely loaded.
68619
68621
 
68620
68622
  if (protoNode .isExternProto)
@@ -68638,11 +68640,11 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68638
68640
  {
68639
68641
  const field = this .getField (protoField .getName ());
68640
68642
 
68641
- // Continue if something is wrong.
68643
+ // Continue if different.
68642
68644
  if (field .getAccessType () !== protoField .getAccessType ())
68643
68645
  continue;
68644
68646
 
68645
- // Continue if something is wrong.
68647
+ // Continue if different.
68646
68648
  if (field .getType () !== protoField .getType ())
68647
68649
  continue;
68648
68650
 
@@ -68655,7 +68657,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68655
68657
  continue;
68656
68658
 
68657
68659
  // Has IS references.
68658
- if (field .hasReferences ())
68660
+ if (field .getReferences () .size)
68659
68661
  continue;
68660
68662
 
68661
68663
  // Default value of protoField is different from field.
@@ -68673,6 +68675,21 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68673
68675
  }
68674
68676
  }
68675
68677
 
68678
+ if (this .isInitialized ())
68679
+ this .realize ();
68680
+
68681
+ protoNode ._updateInstances .removeInterest ("construct", this);
68682
+ protoNode ._updateInstances .addInterest ("update", this);
68683
+ },
68684
+ realize ()
68685
+ {
68686
+ const
68687
+ protoNode = this [_protoNode],
68688
+ proto = protoNode .getProtoDeclaration ();
68689
+
68690
+ if (protoNode .isExternProto && protoNode .checkLoadState () !== Base_X3DConstants .COMPLETE_STATE)
68691
+ return;
68692
+
68676
68693
  // Create execution context.
68677
68694
 
68678
68695
  this [X3DPrototypeInstance_body] = new Execution_X3DExecutionContext (proto .getExecutionContext (), this);
@@ -68687,11 +68704,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68687
68704
 
68688
68705
  this [X3DPrototypeInstance_body] .setup ();
68689
68706
 
68690
- if (this .isInitialized ())
68691
- Base_X3DChildObject .prototype .addEvent .call (this);
68692
-
68693
- protoNode ._updateInstances .removeInterest ("construct", this);
68694
- protoNode ._updateInstances .addInterest ("update", this);
68707
+ Base_X3DChildObject .prototype .addEvent .call (this);
68695
68708
  },
68696
68709
  update ()
68697
68710
  {
@@ -68811,7 +68824,7 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68811
68824
  {
68812
68825
  return this [_protoNode];
68813
68826
  },
68814
- setProtoNode (protoNode)
68827
+ setProtoNode (protoNode, construct = false)
68815
68828
  {
68816
68829
  // Disconnect old proto node.
68817
68830
 
@@ -68823,12 +68836,13 @@ Object .assign (Object .setPrototypeOf (X3DPrototypeInstance .prototype, Core_X3
68823
68836
 
68824
68837
  // Get fields from new proto node.
68825
68838
 
68826
- this [_protoNode] = protoNode;
68827
- this [_protoFields] = Array .from (protoNode .getUserDefinedFields ());
68839
+ this [_protoNode] = protoNode;
68840
+ this [X3DPrototypeInstance_fieldDefinitions] = protoNode .getFieldDefinitions ();
68841
+ this [_protoFields] = Array .from (protoNode .getUserDefinedFields ());
68828
68842
 
68829
68843
  protoNode ._name_changed .addFieldInterest (this ._typeName_changed);
68830
68844
 
68831
- protoNode === oldProtoNode ? this .construct () : this .update ();
68845
+ construct ? this .construct () : this .update ();
68832
68846
  },
68833
68847
  getBody ()
68834
68848
  {
@@ -83894,18 +83908,24 @@ Object .assign (Object .setPrototypeOf (Inline .prototype, Core_X3DChildNode .pr
83894
83908
  },
83895
83909
  setInternalScene (scene)
83896
83910
  {
83897
- this .scene .setExecutionContext (this .scene);
83898
- this .scene .setLive (false);
83899
- this .scene .rootNodes .removeFieldInterest (this .groupNode ._children);
83911
+ if (this .scene !== this .getBrowser () .getDefaultScene ())
83912
+ this .scene .dispose ();
83900
83913
 
83901
83914
  // Set new scene.
83902
83915
 
83903
83916
  this .scene = scene;
83904
83917
 
83905
- this .scene .setExecutionContext (this .getExecutionContext ());
83906
- this .scene .setLive (this .getLive () .getValue ());
83907
- this .scene .rootNodes .addFieldInterest (this .groupNode ._children);
83908
- this .groupNode ._children = this .scene .rootNodes;
83918
+ if (this .scene !== this .getBrowser () .getDefaultScene ())
83919
+ {
83920
+ this .scene .setExecutionContext (this .getExecutionContext ());
83921
+ this .scene .setLive (this .getLive () .getValue ());
83922
+ this .scene .rootNodes .addFieldInterest (this .groupNode ._children);
83923
+ this .groupNode ._children = this .scene .rootNodes;
83924
+ }
83925
+ else
83926
+ {
83927
+ this .groupNode ._children .length = 0;
83928
+ }
83909
83929
 
83910
83930
  this .getBrowser () .addBrowserEvent ();
83911
83931
  },
@@ -90119,7 +90139,7 @@ const X3DShaderNode_default_ = X3DShaderNode;
90119
90139
  x_ite_Namespace .add ("X3DShaderNode", "x_ite/Components/Shaders/X3DShaderNode", X3DShaderNode_default_);
90120
90140
  /* harmony default export */ const Shaders_X3DShaderNode = (X3DShaderNode_default_);
90121
90141
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
90122
- /* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(268);
90142
+ /* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(631);
90123
90143
  /*******************************************************************************
90124
90144
  *
90125
90145
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -95827,7 +95847,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
95827
95847
  x_ite_Namespace .add ("ShaderCompiler", "x_ite/Browser/Shaders/ShaderCompiler", ShaderCompiler_default_);
95828
95848
  /* harmony default export */ const Shaders_ShaderCompiler = (ShaderCompiler_default_);
95829
95849
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shaders/ShaderPart.js
95830
- /* provided dependency */ var ShaderPart_$ = __webpack_require__(268);
95850
+ /* provided dependency */ var ShaderPart_$ = __webpack_require__(631);
95831
95851
  /*******************************************************************************
95832
95852
  *
95833
95853
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96484,7 +96504,7 @@ const X3DAppearanceNode_default_ = X3DAppearanceNode;
96484
96504
  x_ite_Namespace .add ("X3DAppearanceNode", "x_ite/Components/Shape/X3DAppearanceNode", X3DAppearanceNode_default_);
96485
96505
  /* harmony default export */ const Shape_X3DAppearanceNode = (X3DAppearanceNode_default_);
96486
96506
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Shape/Appearance.js
96487
- /* provided dependency */ var Appearance_$ = __webpack_require__(268);
96507
+ /* provided dependency */ var Appearance_$ = __webpack_require__(631);
96488
96508
  /*******************************************************************************
96489
96509
  *
96490
96510
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105436,8 +105456,8 @@ const GifMedia_default_ = GifMedia;
105436
105456
  x_ite_Namespace .add ("GifMedia", "x_ite/Browser/Texturing/GifMedia", GifMedia_default_);
105437
105457
  /* harmony default export */ const Texturing_GifMedia = (GifMedia_default_);
105438
105458
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
105439
- /* provided dependency */ var MovieTexture_$ = __webpack_require__(268);
105440
- /* provided dependency */ var SuperGif = __webpack_require__(719);
105459
+ /* provided dependency */ var MovieTexture_$ = __webpack_require__(631);
105460
+ /* provided dependency */ var SuperGif = __webpack_require__(936);
105441
105461
  /*******************************************************************************
105442
105462
  *
105443
105463
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108206,7 +108226,7 @@ const Context =
108206
108226
  // setTimeout (check);
108207
108227
  // });
108208
108228
  // },
108209
- // getBufferSubDataAsync: async function (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
108229
+ // async getBufferSubDataAsync (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
108210
108230
  // {
108211
108231
  // const sync = this .fenceSync (this .SYNC_GPU_COMMANDS_COMPLETE, 0);
108212
108232
 
@@ -108220,7 +108240,7 @@ const Context =
108220
108240
  // this .getBufferSubData (target, srcByteOffset, dstBuffer, dstOffset, length);
108221
108241
  // this .bindBuffer (target, null);
108222
108242
  // },
108223
- // readPixelsAsync: async function (x, y, w, h, format, type, dest, dstOffset)
108243
+ // async readPixelsAsync (x, y, w, h, format, type, dest, dstOffset)
108224
108244
  // {
108225
108245
  // const buffer = this .createBuffer ();
108226
108246
 
@@ -108845,7 +108865,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
108845
108865
  x_ite_Namespace .add ("gettext", "locale/gettext", gettext_default_);
108846
108866
  /* harmony default export */ const gettext = (gettext_default_);
108847
108867
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
108848
- /* provided dependency */ var BrowserTimings_$ = __webpack_require__(268);
108868
+ /* provided dependency */ var BrowserTimings_$ = __webpack_require__(631);
108849
108869
  /*******************************************************************************
108850
108870
  *
108851
108871
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109418,7 +109438,7 @@ const TextureQuality_default_ = TextureQuality;
109418
109438
  x_ite_Namespace .add ("TextureQuality", "x_ite/Browser/Core/TextureQuality", TextureQuality_default_);
109419
109439
  /* harmony default export */ const Core_TextureQuality = (TextureQuality_default_);
109420
109440
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserOptions.js
109421
- /* provided dependency */ var BrowserOptions_$ = __webpack_require__(268);
109441
+ /* provided dependency */ var BrowserOptions_$ = __webpack_require__(631);
109422
109442
  /*******************************************************************************
109423
109443
  *
109424
109444
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110012,7 +110032,7 @@ const RenderingProperties_default_ = RenderingProperties;
110012
110032
  x_ite_Namespace .add ("RenderingProperties", "x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
110013
110033
  /* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
110014
110034
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
110015
- /* provided dependency */ var Notification_$ = __webpack_require__(268);
110035
+ /* provided dependency */ var Notification_$ = __webpack_require__(631);
110016
110036
  /*******************************************************************************
110017
110037
  *
110018
110038
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -110135,8 +110155,8 @@ const Notification_default_ = Notification;
110135
110155
  x_ite_Namespace .add ("Notification", "x_ite/Browser/Core/Notification", Notification_default_);
110136
110156
  /* harmony default export */ const Core_Notification = (Notification_default_);
110137
110157
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
110138
- /* provided dependency */ var jquery_fullscreen = __webpack_require__(600);
110139
- /* provided dependency */ var ContextMenu_$ = __webpack_require__(268);
110158
+ /* provided dependency */ var jquery_fullscreen = __webpack_require__(195);
110159
+ /* provided dependency */ var ContextMenu_$ = __webpack_require__(631);
110140
110160
  /*******************************************************************************
110141
110161
  *
110142
110162
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -111690,7 +111710,7 @@ const
111690
111710
 
111691
111711
  function X3DScene (browser)
111692
111712
  {
111693
- Execution_X3DExecutionContext .call (this, this, null, browser);
111713
+ Execution_X3DExecutionContext .call (this, null, null, browser);
111694
111714
 
111695
111715
  this .addType (Base_X3DConstants .X3DScene)
111696
111716
 
@@ -111726,10 +111746,6 @@ function X3DScene (browser)
111726
111746
 
111727
111747
  Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecutionContext .prototype),
111728
111748
  {
111729
- isMainScene ()
111730
- {
111731
- return this === this .getExecutionContext ();
111732
- },
111733
111749
  isScene ()
111734
111750
  {
111735
111751
  return true;
@@ -111762,10 +111778,8 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
111762
111778
  {
111763
111779
  if (this [_worldURL] .match (/^(?:data|blob):/))
111764
111780
  {
111765
- if (this .isMainScene ())
111766
- return this .getBrowser () .getBaseURL ();
111767
-
111768
- return this .getExecutionContext () .getBaseURL ();
111781
+ return this .getExecutionContext () ?.getBaseURL ()
111782
+ ?? this .getBrowser () .getBaseURL ();
111769
111783
  }
111770
111784
 
111771
111785
  return this [_worldURL];
@@ -112612,7 +112626,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
112612
112626
  {
112613
112627
  setExecutionContext (executionContext)
112614
112628
  {
112615
- if (!this .isMainScene ())
112629
+ if (this .getExecutionContext ())
112616
112630
  {
112617
112631
  const scene = this .getScene ();
112618
112632
 
@@ -112622,7 +112636,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
112622
112636
 
112623
112637
  Execution_X3DExecutionContext .prototype .setExecutionContext .call (this, executionContext);
112624
112638
 
112625
- if (!this .isMainScene ())
112639
+ if (this .getExecutionContext ())
112626
112640
  {
112627
112641
  const scene = this .getScene ();
112628
112642
 
@@ -112651,15 +112665,12 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
112651
112665
 
112652
112666
  this ._loadCount = this [_loadingObjects] .size;
112653
112667
 
112654
- const
112655
- browser = this .getBrowser (),
112656
- scene = this .getScene ();
112668
+ const browser = this .getBrowser ();
112657
112669
 
112658
112670
  if (this === browser .getExecutionContext ())
112659
112671
  browser .addLoadingObject (node);
112660
112672
 
112661
- if (!this .isMainScene ())
112662
- scene .addLoadingObject (node);
112673
+ this .getScene () ?.addLoadingObject (node);
112663
112674
  },
112664
112675
  removeLoadingObject (node)
112665
112676
  {
@@ -112670,15 +112681,12 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
112670
112681
 
112671
112682
  this ._loadCount = this [_loadingObjects] .size;
112672
112683
 
112673
- const
112674
- browser = this .getBrowser (),
112675
- scene = this .getScene ();
112684
+ const browser = this .getBrowser ();
112676
112685
 
112677
112686
  if (this === browser .getExecutionContext ())
112678
112687
  browser .removeLoadingObject (node);
112679
112688
 
112680
- if (!this .isMainScene ())
112681
- scene .removeLoadingObject (node);
112689
+ this .getScene () ?.removeLoadingObject (node);
112682
112690
  },
112683
112691
  });
112684
112692
 
@@ -112717,6 +112725,11 @@ Object .defineProperties (X3DScene .prototype,
112717
112725
  get: X3DScene .prototype .getWorldURL,
112718
112726
  enumerable: true,
112719
112727
  },
112728
+ baseURL:
112729
+ {
112730
+ get: X3DScene .prototype .getBaseURL,
112731
+ enumerable: true,
112732
+ },
112720
112733
  units:
112721
112734
  {
112722
112735
  get: X3DScene .prototype .getUnits,
@@ -112897,7 +112910,7 @@ const DataStorage_default_ = DataStorage;
112897
112910
  x_ite_Namespace .add ("DataStorage", "standard/Utility/DataStorage", DataStorage_default_);
112898
112911
  /* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
112899
112912
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
112900
- /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(268);
112913
+ /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(631);
112901
112914
  /*******************************************************************************
112902
112915
  *
112903
112916
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -115420,8 +115433,8 @@ const X3DViewer_default_ = X3DViewer;
115420
115433
  x_ite_Namespace .add ("X3DViewer", "x_ite/Browser/Navigation/X3DViewer", X3DViewer_default_);
115421
115434
  /* harmony default export */ const Navigation_X3DViewer = (X3DViewer_default_);
115422
115435
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
115423
- /* provided dependency */ var jquery_mousewheel = __webpack_require__(482);
115424
- /* provided dependency */ var ExamineViewer_$ = __webpack_require__(268);
115436
+ /* provided dependency */ var jquery_mousewheel = __webpack_require__(711);
115437
+ /* provided dependency */ var ExamineViewer_$ = __webpack_require__(631);
115425
115438
  /*******************************************************************************
115426
115439
  *
115427
115440
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116293,8 +116306,8 @@ const ExamineViewer_default_ = ExamineViewer;
116293
116306
  x_ite_Namespace .add ("ExamineViewer", "x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
116294
116307
  /* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
116295
116308
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
116296
- /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(482);
116297
- /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(268);
116309
+ /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(711);
116310
+ /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(631);
116298
116311
  /*******************************************************************************
116299
116312
  *
116300
116313
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117303,8 +117316,8 @@ const FlyViewer_default_ = FlyViewer;
117303
117316
  x_ite_Namespace .add ("FlyViewer", "x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
117304
117317
  /* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
117305
117318
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
117306
- /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(482);
117307
- /* provided dependency */ var PlaneViewer_$ = __webpack_require__(268);
117319
+ /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(711);
117320
+ /* provided dependency */ var PlaneViewer_$ = __webpack_require__(631);
117308
117321
  /*******************************************************************************
117309
117322
  *
117310
117323
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -117635,8 +117648,8 @@ const NoneViewer_default_ = NoneViewer;
117635
117648
  x_ite_Namespace .add ("NoneViewer", "x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
117636
117649
  /* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
117637
117650
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
117638
- /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(482);
117639
- /* provided dependency */ var LookAtViewer_$ = __webpack_require__(268);
117651
+ /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(711);
117652
+ /* provided dependency */ var LookAtViewer_$ = __webpack_require__(631);
117640
117653
  /*******************************************************************************
117641
117654
  *
117642
117655
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118774,8 +118787,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
118774
118787
  x_ite_Namespace .add ("X3DPickingContext", "x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
118775
118788
  /* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
118776
118789
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
118777
- /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(482);
118778
- /* provided dependency */ var PointingDevice_$ = __webpack_require__(268);
118790
+ /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(711);
118791
+ /* provided dependency */ var PointingDevice_$ = __webpack_require__(631);
118779
118792
  /*******************************************************************************
118780
118793
  *
118781
118794
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -120079,7 +120092,7 @@ const MultiSampleFrameBuffer_default_ = MultiSampleFrameBuffer;
120079
120092
  x_ite_Namespace .add ("MultiSampleFrameBuffer", "x_ite/Rendering/MultiSampleFrameBuffer", MultiSampleFrameBuffer_default_);
120080
120093
  /* harmony default export */ const Rendering_MultiSampleFrameBuffer = (MultiSampleFrameBuffer_default_);
120081
120094
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
120082
- /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(268);
120095
+ /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(631);
120083
120096
  /*******************************************************************************
120084
120097
  *
120085
120098
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -121027,7 +121040,7 @@ const X3DSoundContext_default_ = X3DSoundContext;
121027
121040
  x_ite_Namespace .add ("X3DSoundContext", "x_ite/Browser/Sound/X3DSoundContext", X3DSoundContext_default_);
121028
121041
  /* harmony default export */ const Sound_X3DSoundContext = (X3DSoundContext_default_);
121029
121042
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Texturing/KTXDecoder.js
121030
- /* provided dependency */ var KTXDecoder_$ = __webpack_require__(268);
121043
+ /* provided dependency */ var KTXDecoder_$ = __webpack_require__(631);
121031
121044
  const KTXDecoder_default_ = class KTXDecoder
121032
121045
  {
121033
121046
  constructor (gl, externalKtxlib, scriptDir)
@@ -122581,7 +122594,7 @@ const Components_default_ = Components;
122581
122594
  x_ite_Namespace .add ("Components", "x_ite/Components", Components_default_);
122582
122595
  /* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
122583
122596
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
122584
- /* provided dependency */ var DOMIntegration_$ = __webpack_require__(268);
122597
+ /* provided dependency */ var DOMIntegration_$ = __webpack_require__(631);
122585
122598
  /*******************************************************************************
122586
122599
  * MIT License
122587
122600
  *
@@ -123715,7 +123728,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
123715
123728
  x_ite_Namespace .add ("SupportedProfiles", "x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
123716
123729
  /* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
123717
123730
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
123718
- /* provided dependency */ var X3DBrowser_$ = __webpack_require__(268);
123731
+ /* provided dependency */ var X3DBrowser_$ = __webpack_require__(631);
123719
123732
  /*******************************************************************************
123720
123733
  *
123721
123734
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124015,7 +124028,10 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
124015
124028
 
124016
124029
  for (const arg of args)
124017
124030
  {
124018
- if (arg instanceof Configuration_ProfileInfo)
124031
+ if (arg instanceof Execution_X3DScene)
124032
+ component .push (... (arg .profile ?.components ?? [ ]), ... arg .components);
124033
+
124034
+ else if (arg instanceof Configuration_ProfileInfo)
124019
124035
  component .push (... arg .components);
124020
124036
 
124021
124037
  else if (arg instanceof Configuration_ComponentInfoArray)
@@ -124147,7 +124163,7 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
124147
124163
 
124148
124164
  // Detach scene from parent.
124149
124165
 
124150
- scene .setExecutionContext (scene);
124166
+ scene .setExecutionContext (null);
124151
124167
  scene .setLive (this .isLive ());
124152
124168
 
124153
124169
  // Replace.
@@ -124245,18 +124261,18 @@ Object .assign (Object .setPrototypeOf (X3DBrowser .prototype, Browser_X3DBrowse
124245
124261
  {
124246
124262
  this .removeLoadingObject (fileLoader);
124247
124263
 
124248
- if (scene)
124249
- {
124250
- // Handle getLive for script scenes here:
124264
+ if (!scene)
124265
+ return;
124251
124266
 
124252
- if (!external)
124253
- scene .setExecutionContext (currentScene);
124267
+ // Handle getLive for script scenes here:
124254
124268
 
124255
- scene .setLive (true);
124269
+ if (!external)
124270
+ scene .setExecutionContext (currentScene);
124256
124271
 
124257
- // Wait until scene is completely loaded, scene ._loadCount must be 0.
124258
- field .setValue (scene .rootNodes);
124259
- }
124272
+ scene .setLive (true);
124273
+
124274
+ // Wait until scene is completely loaded, scene ._loadCount must be 0.
124275
+ field .setValue (scene .rootNodes);
124260
124276
  });
124261
124277
  },
124262
124278
  createX3DFromURL (url, node, event)
@@ -124806,7 +124822,7 @@ const X3DBrowser_default_ = X3DBrowser;
124806
124822
  x_ite_Namespace .add ("X3DBrowser", "x_ite/Browser/X3DBrowser", X3DBrowser_default_);
124807
124823
  /* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
124808
124824
  ;// CONCATENATED MODULE: ./src/x_ite/X3DCanvasElement.js
124809
- /* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(268);
124825
+ /* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(631);
124810
124826
  /*******************************************************************************
124811
124827
  *
124812
124828
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124943,8 +124959,8 @@ const X3DCanvasElement_default_ = X3DCanvasElement;
124943
124959
  x_ite_Namespace .add ("X3DCanvasElement", "x_ite/X3DCanvasElement", X3DCanvasElement_default_);
124944
124960
  /* harmony default export */ const x_ite_X3DCanvasElement = (X3DCanvasElement_default_);
124945
124961
  ;// CONCATENATED MODULE: ./src/lib/jquery.js
124946
- /* provided dependency */ var jquery_$ = __webpack_require__(268);
124947
- /* provided dependency */ var pako = __webpack_require__(752);
124962
+ /* provided dependency */ var jquery_$ = __webpack_require__(631);
124963
+ /* provided dependency */ var pako = __webpack_require__(511);
124948
124964
  Object .assign (jquery_$,
124949
124965
  {
124950
124966
  decodeText (input)
@@ -125021,14 +125037,14 @@ const jquery_default_ = jquery_$;
125021
125037
  x_ite_Namespace .add ("jquery", "lib/jquery", jquery_default_);
125022
125038
  /* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
125023
125039
  ;// CONCATENATED MODULE: ./src/lib/libtess.js
125024
- /* provided dependency */ var libtess_libtess = __webpack_require__(937);
125040
+ /* provided dependency */ var libtess_libtess = __webpack_require__(580);
125025
125041
  const libtess_default_ = libtess_libtess;
125026
125042
  ;
125027
125043
 
125028
125044
  x_ite_Namespace .add ("libtess", "lib/libtess", libtess_default_);
125029
125045
  /* harmony default export */ const lib_libtess = ((/* unused pure expression or super */ null && (libtess_default_)));
125030
125046
  ;// CONCATENATED MODULE: ./src/x_ite/X3D.js
125031
- /* provided dependency */ var X3D_$ = __webpack_require__(268);
125047
+ /* provided dependency */ var X3D_$ = __webpack_require__(631);
125032
125048
  /*******************************************************************************
125033
125049
  *
125034
125050
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -125336,7 +125352,7 @@ Object .assign (X3D,
125336
125352
 
125337
125353
  // Assign X3D to global namespace.
125338
125354
 
125339
- window [Symbol .for ("X_ITE.X3D-9.6.0")] = x_ite_X3D;
125355
+ window [Symbol .for ("X_ITE.X3D-9.6.2")] = x_ite_X3D;
125340
125356
 
125341
125357
  customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
125342
125358