x_ite 8.3.1 → 8.3.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 (74) hide show
  1. package/build/bin/tests.pl +2 -0
  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 +13 -13
  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 +19 -19
  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 +18 -18
  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 +24 -24
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +23 -23
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +19 -19
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/ProjectiveTextureMapping.js +14 -14
  29. package/dist/assets/components/ProjectiveTextureMapping.min.js +1 -1
  30. package/dist/assets/components/RigidBodyPhysics.js +17 -17
  31. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  32. package/dist/assets/components/Scripting.js +28 -28
  33. package/dist/assets/components/Scripting.min.js +1 -1
  34. package/dist/assets/components/Text.js +24 -24
  35. package/dist/assets/components/Text.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +46 -46
  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 +9 -9
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.js +368 -235
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +2 -1
  47. package/docs/_posts/custom-shaders.md +1 -1
  48. package/docs/_posts/dom-integration.md +52 -25
  49. package/docs/_posts/getting-started.md +1 -1
  50. package/docs/_posts/reference/field-services-and-objects.md +2 -34
  51. package/docs/_posts/tutorials/basic-nodes.md +2 -2
  52. package/docs/_posts/tutorials/building-a-x3d-world.md +20 -4
  53. package/docs/_posts/tutorials/building-primitive-shapes.md +4 -4
  54. package/docs/_posts/tutorials/creating-new-node-types.md +22 -0
  55. package/docs/_posts/tutorials/hello-world.md +6 -6
  56. package/docs/_posts/tutorials/improving-performance.md +2 -2
  57. package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +2 -2
  58. package/docs/_tabs/playground.html +74 -17
  59. package/docs/assets/css/style.scss +7 -1
  60. package/package.json +2 -2
  61. package/src/x_ite/Base/X3DArrayField.js +3 -0
  62. package/src/x_ite/Base/X3DBaseNode.js +4 -0
  63. package/src/x_ite/Base/X3DInfoArray.js +7 -3
  64. package/src/x_ite/Browser/Core/ContextMenu.js +5 -7
  65. package/src/x_ite/Browser/DOMIntegration.js +62 -55
  66. package/src/x_ite/Browser/VERSION.js +1 -1
  67. package/src/x_ite/Browser/X3DBrowser.js +1 -1
  68. package/src/x_ite/Browser/X3DBrowserContext.js +3 -0
  69. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +1 -1
  70. package/src/x_ite/Components/Networking/Inline.js +21 -2
  71. package/src/x_ite/Configuration/SupportedNodes.js +1 -5
  72. package/src/x_ite/Parser/XMLParser.js +151 -49
  73. package/src/x_ite.html +2 -2
  74. package/webpack.config.js +2 -2
package/dist/x_ite.js CHANGED
@@ -1,4 +1,4 @@
1
- /* X_ITE v8.3.1 */(function webpackUniversalModuleDefinition(root, factory) {
1
+ /* X_ITE v8.3.2 */(function webpackUniversalModuleDefinition(root, factory) {
2
2
  if(typeof exports === 'object' && typeof module === 'object')
3
3
  module.exports = factory();
4
4
  else if(typeof define === 'function' && define.amd)
@@ -11,11 +11,11 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ 138:
14
+ /***/ 923:
15
15
  /***/ (function(module, exports, __webpack_require__) {
16
16
 
17
17
  "use strict";
18
- /* provided dependency */ var jQuery = __webpack_require__(370);
18
+ /* provided dependency */ var jQuery = __webpack_require__(265);
19
19
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
20
20
 
21
21
  /**
@@ -387,10 +387,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;
387
387
 
388
388
  /***/ }),
389
389
 
390
- /***/ 541:
390
+ /***/ 250:
391
391
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
392
392
 
393
- /* provided dependency */ var jQuery = __webpack_require__(370);
393
+ /* provided dependency */ var jQuery = __webpack_require__(265);
394
394
  /**
395
395
  * @preserve jquery.fullscreen 1.1.5
396
396
  * https://github.com/code-lts/jquery-fullscreen-plugin
@@ -586,7 +586,7 @@ installFullScreenHandlers();
586
586
 
587
587
  /***/ }),
588
588
 
589
- /***/ 196:
589
+ /***/ 895:
590
590
  /***/ ((module, exports, __webpack_require__) => {
591
591
 
592
592
  var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -600,7 +600,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
600
600
  (function (factory) {
601
601
  if ( true ) {
602
602
  // AMD. Register as an anonymous module.
603
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(370)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
603
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(265)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
604
604
  __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
605
605
  (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
606
606
  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
@@ -811,7 +811,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
811
811
 
812
812
  /***/ }),
813
813
 
814
- /***/ 370:
814
+ /***/ 265:
815
815
  /***/ (function(module, exports) {
816
816
 
817
817
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -11728,7 +11728,7 @@ return jQuery;
11728
11728
 
11729
11729
  /***/ }),
11730
11730
 
11731
- /***/ 193:
11731
+ /***/ 36:
11732
11732
  /***/ ((module) => {
11733
11733
 
11734
11734
  /**
@@ -16507,7 +16507,7 @@ if (true) {
16507
16507
 
16508
16508
  /***/ }),
16509
16509
 
16510
- /***/ 67:
16510
+ /***/ 536:
16511
16511
  /***/ (function(__unused_webpack_module, exports) {
16512
16512
 
16513
16513
 
@@ -21381,24 +21381,28 @@ X3DInfoArray .prototype = {
21381
21381
  },
21382
21382
  at: Array .prototype .at,
21383
21383
  concat: Array .prototype .concat,
21384
- //entries: function () { return iterator -> [index, value]; },
21384
+ entries: Array .prototype .entries,
21385
21385
  every: Array .prototype .every,
21386
21386
  fill: Array .prototype .fill,
21387
21387
  filter: Array .prototype .filter,
21388
21388
  find: Array .prototype .find,
21389
21389
  findIndex: Array .prototype .findIndex,
21390
+ findLast: Array .prototype .findLast,
21391
+ findLastIndex: Array .prototype .findLastIndex,
21392
+ flat: Array .prototype .flat,
21393
+ flatMap: Array .prototype .flatMap,
21390
21394
  forEach: Array .prototype .forEach,
21391
21395
  includes: Array .prototype .includes,
21392
21396
  indexOf: Array .prototype .indexOf,
21393
21397
  join: Array .prototype .join,
21394
- keys: function () { return Array (this .length) .keys (); },
21398
+ keys: Array .prototype .keys,
21395
21399
  lastIndexOf: Array .prototype .lastIndexOf,
21396
21400
  map: Array .prototype .map,
21397
21401
  reduce: Array .prototype .reduce,
21398
21402
  reduceRight: Array .prototype .reduceRight,
21399
21403
  slice: Array .prototype .slice,
21400
21404
  some: Array .prototype .some,
21401
- values: function () { return this [Symbol .iterator]; },
21405
+ values: Array .prototype .values,
21402
21406
  toString: function (scene)
21403
21407
  {
21404
21408
  const stream = { string: "" };
@@ -32516,6 +32520,72 @@ const Fields_default_ = Fields;
32516
32520
 
32517
32521
  x_ite_Namespace.set ("x_ite/Fields", Fields_default_);
32518
32522
  /* harmony default export */ const x_ite_Fields = (Fields_default_);
32523
+ ;// CONCATENATED MODULE: ./src/x_ite/Parser/HTMLSupport.js
32524
+ /*******************************************************************************
32525
+ *
32526
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
32527
+ *
32528
+ * This file is part of the X_ITE Project.
32529
+ *
32530
+ * NON-MILITARY USE ONLY
32531
+ *
32532
+ * All create3000 software are effectively free software with a non-military use
32533
+ * restriction. It is free. Well commented source is provided. You may reuse the
32534
+ * source in any way you please with the exception anything that uses it must be
32535
+ * marked to indicate is contains "non-military use only" components.
32536
+ *
32537
+ * Copyright 2016 Andreas Plesch.
32538
+ *
32539
+ * X_ITE is free software: you can redistribute it and/or modify it under the
32540
+ * terms of the GNU General Public License version 3 only, as published by the
32541
+ * Free Software Foundation.
32542
+ *
32543
+ * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
32544
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
32545
+ * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
32546
+ * details (a copy is included in the LICENSE file that accompanied this code).
32547
+ *
32548
+ * You should have received a copy of the GNU General Public License version 3
32549
+ * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
32550
+ * copy of the GPLv3 License.
32551
+ *
32552
+ * For Silvio, Joy and Adi.
32553
+ *
32554
+ ******************************************************************************/
32555
+
32556
+ // Maps are set when component is registered.
32557
+
32558
+ const
32559
+ nodeTypeNames = new Map (), // (TYPENAME -> TypeName)
32560
+ fieldNames = new Map (); // (fieldname -> fieldName)
32561
+
32562
+ const HTMLSupport =
32563
+ {
32564
+ addNodeTypeName: function (typeName)
32565
+ {
32566
+ nodeTypeNames .set (typeName, typeName);
32567
+ nodeTypeNames .set (typeName .toUpperCase (), typeName);
32568
+ },
32569
+ getNodeTypeName: function (typeName)
32570
+ {
32571
+ return nodeTypeNames .get (typeName);
32572
+ },
32573
+ addFieldName: function (name)
32574
+ {
32575
+ fieldNames .set (name, name);
32576
+ fieldNames .set (name .toLowerCase (), name);
32577
+ },
32578
+ getFieldName: function (name)
32579
+ {
32580
+ return fieldNames .get (name);
32581
+ },
32582
+ };
32583
+
32584
+ const HTMLSupport_default_ = HTMLSupport;
32585
+ ;
32586
+
32587
+ x_ite_Namespace.set ("x_ite/Parser/HTMLSupport", HTMLSupport_default_);
32588
+ /* harmony default export */ const Parser_HTMLSupport = (HTMLSupport_default_);
32519
32589
  ;// CONCATENATED MODULE: ./src/x_ite/Base/X3DBaseNode.js
32520
32590
  /*******************************************************************************
32521
32591
  *
@@ -32571,6 +32641,7 @@ x_ite_Namespace.set ("x_ite/Fields", Fields_default_);
32571
32641
 
32572
32642
 
32573
32643
 
32644
+
32574
32645
  const
32575
32646
  _executionContext = Symbol (),
32576
32647
  _type = Symbol (),
@@ -32909,6 +32980,9 @@ X3DBaseNode .prototype = Object .assign (Object .create (Base_X3DEventObject.pro
32909
32980
  enumerable: true,
32910
32981
  configurable: false,
32911
32982
  });
32983
+
32984
+ if (field .isInitializable ())
32985
+ Parser_HTMLSupport.addFieldName (alias);
32912
32986
  },
32913
32987
  removeField: function (name)
32914
32988
  {
@@ -33170,7 +33244,7 @@ x_ite_Namespace.set ("x_ite/Base/X3DBaseNode", X3DBaseNode_default_);
33170
33244
  *
33171
33245
  ******************************************************************************/
33172
33246
 
33173
- const VERSION_default_ = "8.3.1";
33247
+ const VERSION_default_ = "8.3.2";
33174
33248
  ;
33175
33249
 
33176
33250
  x_ite_Namespace.set ("x_ite/Browser/VERSION", VERSION_default_);
@@ -33897,7 +33971,7 @@ const gettext_default_ = gettext;
33897
33971
  x_ite_Namespace.set ("locale/gettext", gettext_default_);
33898
33972
  /* harmony default export */ const locale_gettext = (gettext_default_);
33899
33973
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/BrowserTimings.js
33900
- /* provided dependency */ var $ = __webpack_require__(370);
33974
+ /* provided dependency */ var $ = __webpack_require__(265);
33901
33975
  /*******************************************************************************
33902
33976
  *
33903
33977
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34800,7 +34874,7 @@ const RenderingProperties_default_ = RenderingProperties;
34800
34874
  x_ite_Namespace.set ("x_ite/Browser/Core/RenderingProperties", RenderingProperties_default_);
34801
34875
  /* harmony default export */ const Core_RenderingProperties = (RenderingProperties_default_);
34802
34876
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/Notification.js
34803
- /* provided dependency */ var Notification_$ = __webpack_require__(370);
34877
+ /* provided dependency */ var Notification_$ = __webpack_require__(265);
34804
34878
  /*******************************************************************************
34805
34879
  *
34806
34880
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34922,8 +34996,8 @@ const Notification_default_ = Notification;
34922
34996
  x_ite_Namespace.set ("x_ite/Browser/Core/Notification", Notification_default_);
34923
34997
  /* harmony default export */ const Core_Notification = (Notification_default_);
34924
34998
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/ContextMenu.js
34925
- /* provided dependency */ var jquery_fullscreen = __webpack_require__(541);
34926
- /* provided dependency */ var ContextMenu_$ = __webpack_require__(370);
34999
+ /* provided dependency */ var jquery_fullscreen = __webpack_require__(250);
35000
+ /* provided dependency */ var ContextMenu_$ = __webpack_require__(265);
34927
35001
  /*******************************************************************************
34928
35002
  *
34929
35003
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35530,17 +35604,13 @@ ContextMenu .prototype = Object .assign (Object .create (Base_X3DBaseNode.protot
35530
35604
 
35531
35605
  // Menu
35532
35606
 
35533
- const
35534
- x = event .pageX - ContextMenu_$(document) .scrollLeft (),
35535
- y = event .pageY - ContextMenu_$(document) .scrollTop ();
35536
-
35537
35607
  const ul = ContextMenu_$("<ul></ul>")
35538
35608
  .hide ()
35609
+ .addClass ("context-menu-root")
35539
35610
  .addClass ("context-menu-list")
35540
35611
  .addClass (menu .className)
35541
- .addClass ("context-menu-root")
35542
- .css ({ "left": x, "top": y })
35543
- .appendTo (options .appendTo);
35612
+ .appendTo (options .appendTo)
35613
+ .offset ({ "left": event .pageX, "top": event .pageY });
35544
35614
 
35545
35615
  for (const k in menu .items)
35546
35616
  ul .append (this .createItem (menu .items [k], "context-menu-root", k, level + 1, hide));
@@ -35549,6 +35619,8 @@ ContextMenu .prototype = Object .assign (Object .create (Base_X3DBaseNode.protot
35549
35619
 
35550
35620
  // Reposition menu if to right or to low.
35551
35621
 
35622
+ ul .offset ({ "left": event .pageX, "top": event .pageY }); // Do it again!
35623
+
35552
35624
  if (ul .offset () .left - ContextMenu_$(document) .scrollLeft () + ul .outerWidth () > ContextMenu_$(window) .width ())
35553
35625
  ul .offset ({ "left": ContextMenu_$(document) .scrollLeft () + Math .max (0, ContextMenu_$(window) .width () - ul .outerWidth ()) });
35554
35626
 
@@ -35690,72 +35762,6 @@ const ContextMenu_default_ = ContextMenu;
35690
35762
 
35691
35763
  x_ite_Namespace.set ("x_ite/Browser/Core/ContextMenu", ContextMenu_default_);
35692
35764
  /* harmony default export */ const Core_ContextMenu = (ContextMenu_default_);
35693
- ;// CONCATENATED MODULE: ./src/x_ite/Parser/HTMLSupport.js
35694
- /*******************************************************************************
35695
- *
35696
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
35697
- *
35698
- * This file is part of the X_ITE Project.
35699
- *
35700
- * NON-MILITARY USE ONLY
35701
- *
35702
- * All create3000 software are effectively free software with a non-military use
35703
- * restriction. It is free. Well commented source is provided. You may reuse the
35704
- * source in any way you please with the exception anything that uses it must be
35705
- * marked to indicate is contains "non-military use only" components.
35706
- *
35707
- * Copyright 2016 Andreas Plesch.
35708
- *
35709
- * X_ITE is free software: you can redistribute it and/or modify it under the
35710
- * terms of the GNU General Public License version 3 only, as published by the
35711
- * Free Software Foundation.
35712
- *
35713
- * X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
35714
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
35715
- * A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
35716
- * details (a copy is included in the LICENSE file that accompanied this code).
35717
- *
35718
- * You should have received a copy of the GNU General Public License version 3
35719
- * along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
35720
- * copy of the GPLv3 License.
35721
- *
35722
- * For Silvio, Joy and Adi.
35723
- *
35724
- ******************************************************************************/
35725
-
35726
- // Maps are set when component is registered.
35727
-
35728
- const
35729
- nodeTypeNames = new Map (), // (TYPENAME -> TypeName)
35730
- fieldNames = new Map (); // (fieldname -> fieldName)
35731
-
35732
- const HTMLSupport =
35733
- {
35734
- addNodeTypeName: function (typeName)
35735
- {
35736
- nodeTypeNames .set (typeName, typeName);
35737
- nodeTypeNames .set (typeName .toUpperCase (), typeName);
35738
- },
35739
- getNodeTypeName: function (typeName)
35740
- {
35741
- return nodeTypeNames .get (typeName);
35742
- },
35743
- addFieldName: function (name)
35744
- {
35745
- fieldNames .set (name, name);
35746
- fieldNames .set (name .toLowerCase (), name);
35747
- },
35748
- getFieldName: function (name)
35749
- {
35750
- return fieldNames .get (name);
35751
- },
35752
- };
35753
-
35754
- const HTMLSupport_default_ = HTMLSupport;
35755
- ;
35756
-
35757
- x_ite_Namespace.set ("x_ite/Parser/HTMLSupport", HTMLSupport_default_);
35758
- /* harmony default export */ const Parser_HTMLSupport = (HTMLSupport_default_);
35759
35765
  ;// CONCATENATED MODULE: ./src/x_ite/Configuration/SupportedNodes.js
35760
35766
  /*******************************************************************************
35761
35767
  *
@@ -35827,12 +35833,8 @@ const SupportedNodes =
35827
35833
 
35828
35834
  // HTML Support
35829
35835
 
35830
- for (const fieldDefinition of Type .prototype [SupportedNodes_fieldDefinitions])
35836
+ for (const { name, accessType } of Type .prototype [SupportedNodes_fieldDefinitions])
35831
35837
  {
35832
- const
35833
- name = fieldDefinition .name,
35834
- accessType = fieldDefinition .accessType;
35835
-
35836
35838
  if (accessType & Base_X3DConstants.initializeOnly)
35837
35839
  Parser_HTMLSupport.addFieldName (name)
35838
35840
  }
@@ -37681,7 +37683,7 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (Core_X3DNode.p
37681
37683
  },
37682
37684
  getInnerNode: function ()
37683
37685
  {
37684
- const rootNodes = this [_body] .getRootNodes () .getValue ();
37686
+ const rootNodes = this [_body] .getRootNodes ();
37685
37687
 
37686
37688
  if (rootNodes .length)
37687
37689
  {
@@ -41860,7 +41862,7 @@ const VRMLParser_default_ = VRMLParser;
41860
41862
  x_ite_Namespace.set ("x_ite/Parser/VRMLParser", VRMLParser_default_);
41861
41863
  /* harmony default export */ const Parser_VRMLParser = (VRMLParser_default_);
41862
41864
  ;// CONCATENATED MODULE: ./src/x_ite/Parser/XMLParser.js
41863
- /* provided dependency */ var XMLParser_$ = __webpack_require__(370);
41865
+ /* provided dependency */ var XMLParser_$ = __webpack_require__(265);
41864
41866
  /*******************************************************************************
41865
41867
  *
41866
41868
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41936,6 +41938,8 @@ function XMLParser (scene)
41936
41938
  this .parents = [ ];
41937
41939
  this .parser = new Parser_VRMLParser (scene);
41938
41940
  this .url = new x_ite_Fields.MFString ();
41941
+ this .protoNames = new Map ();
41942
+ this .protoFields = new WeakMap ();
41939
41943
 
41940
41944
  try
41941
41945
  {
@@ -41965,12 +41969,23 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
41965
41969
  xmlElement = XMLParser_$.parseXML (xmlElement);
41966
41970
 
41967
41971
  this .input = xmlElement;
41972
+ this .xml = this .isXML (xmlElement);
41973
+
41974
+ if (! this .xml)
41975
+ Object .assign (this, HTMLParser);
41968
41976
  }
41969
41977
  catch (error)
41970
41978
  {
41971
41979
  this .input = undefined;
41972
41980
  }
41973
41981
  },
41982
+ isXML: function (element)
41983
+ {
41984
+ if (element instanceof HTMLElement)
41985
+ return false;
41986
+ else
41987
+ return true;
41988
+ },
41974
41989
  parseIntoScene: function (success, error)
41975
41990
  {
41976
41991
  this .success = success;
@@ -41981,16 +41996,6 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
41981
41996
 
41982
41997
  this .xmlElement (this .input);
41983
41998
  },
41984
- parseIntoNode: function (node, xmlElement)
41985
- {
41986
- this .pushExecutionContext (node .getExecutionContext ());
41987
- this .pushParent (node);
41988
-
41989
- this .childElement (xmlElement);
41990
-
41991
- this .popParent ();
41992
- this .popExecutionContext ();
41993
- },
41994
41999
  xmlElement: function (xmlElement)
41995
42000
  {
41996
42001
  if (xmlElement === null)
@@ -42343,8 +42348,9 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42343
42348
  var externproto = new Prototype_X3DExternProtoDeclaration (this .getExecutionContext (), this .url);
42344
42349
 
42345
42350
  this .pushParent (externproto);
42346
- this .protoInterfaceElement (xmlElement); // parse fields
42351
+ this .protoInterfaceElement (xmlElement);
42347
42352
  this .popParent ();
42353
+ this .addProtoFieldNames (externproto);
42348
42354
 
42349
42355
  externproto .setup ();
42350
42356
 
@@ -42358,6 +42364,8 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42358
42364
  { }
42359
42365
 
42360
42366
  this .getExecutionContext () .updateExternProtoDeclaration (name, externproto);
42367
+
42368
+ this .addProtoName (name);
42361
42369
  }
42362
42370
  },
42363
42371
  protoDeclareElement: function (xmlElement)
@@ -42382,6 +42390,7 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42382
42390
  this .pushParent (proto);
42383
42391
  this .protoInterfaceElement (child);
42384
42392
  this .popParent ();
42393
+ this .addProtoFieldNames (proto);
42385
42394
  break;
42386
42395
  }
42387
42396
  default:
@@ -42428,6 +42437,8 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42428
42437
  { }
42429
42438
 
42430
42439
  this .getExecutionContext () .updateProtoDeclaration (name, proto);
42440
+
42441
+ this .addProtoName (name);
42431
42442
  }
42432
42443
  },
42433
42444
  protoInterfaceElement: function (xmlElement)
@@ -42578,7 +42589,7 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42578
42589
  if (! node)
42579
42590
  throw new Error ("Unknown proto or externproto type '" + name + "'.");
42580
42591
 
42581
- //AP: attach node to DOM xmlElement for access from DOM.
42592
+ ///DOMIntegration: attach node to DOM xmlElement for access from DOM.
42582
42593
  XMLParser_$.data (xmlElement, "node", node);
42583
42594
 
42584
42595
  this .defAttribute (xmlElement, node);
@@ -42649,12 +42660,19 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42649
42660
 
42650
42661
  var node = this .getExecutionContext () .createNode (this .nodeNameToCamelCase (xmlElement .nodeName), false);
42651
42662
 
42663
+ if (! node)
42664
+ var node = this .getExecutionContext () .createProto (this .protoNameToCamelCase (xmlElement .nodeName), false);
42665
+
42652
42666
  if (! node)
42653
42667
  throw new Error ("Unknown node type '" + xmlElement .nodeName + "', you probably have insufficient component/profile statements.");
42654
42668
 
42655
- //AP: attach node to DOM xmlElement for access from DOM.
42669
+ ///DOMIntegration: attach node to DOM xmlElement for access from DOM.
42656
42670
  XMLParser_$.data (xmlElement, "node", node);
42657
42671
 
42672
+ //DOMIntegration: Script node support for HTML.
42673
+ if (xmlElement .nodeName === "SCRIPT")
42674
+ this .scriptElement (xmlElement);
42675
+
42658
42676
  this .defAttribute (xmlElement, node);
42659
42677
  this .addNode (xmlElement, node);
42660
42678
  this .pushParent (node);
@@ -42682,6 +42700,22 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42682
42700
  console .error (error);
42683
42701
  }
42684
42702
  },
42703
+ scriptElement (element)
42704
+ {
42705
+ const
42706
+ domParser = new DOMParser (),
42707
+ scriptDocument = domParser .parseFromString (element .outerHTML, "application/xml"),
42708
+ childNodes = scriptDocument .children [0] .childNodes;
42709
+
42710
+ element .textContent = "// Content moved into childNodes.";
42711
+
42712
+ for (const childNode of childNodes)
42713
+ {
42714
+ // Add elements and cdata.
42715
+ if (childNode .nodeType === 1 || childNode .nodeType === 4)
42716
+ element .appendChild (childNode);
42717
+ }
42718
+ },
42685
42719
  routeElement: function (xmlElement)
42686
42720
  {
42687
42721
  try
@@ -42710,7 +42744,7 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42710
42744
  destinationNode = executionContext .getLocalNode (destinationNodeName),
42711
42745
  route = executionContext .addRoute (sourceNode, sourceField, destinationNode, destinationField);
42712
42746
 
42713
- //AP: attach node to DOM xmlElement for access from DOM.
42747
+ ///DOMIntegration: attach node to DOM xmlElement for access from DOM.
42714
42748
  XMLParser_$.data (xmlElement, "node", route);
42715
42749
  }
42716
42750
  catch (error)
@@ -42851,11 +42885,9 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42851
42885
  {
42852
42886
  try
42853
42887
  {
42854
- var
42855
- field = node .getField (this .attributeToCamelCase (xmlAttribute .name)),
42856
- accessType = field .getAccessType ();
42888
+ const field = node .getField (this .attributeToCamelCase (node, xmlAttribute .name));
42857
42889
 
42858
- if (accessType & Base_X3DConstants.initializeOnly)
42890
+ if (field .isInitializable ())
42859
42891
  this .fieldValue (field, xmlAttribute .value);
42860
42892
  }
42861
42893
  catch (error)
@@ -42875,6 +42907,32 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42875
42907
 
42876
42908
  this .parser .popExecutionContext ();
42877
42909
  },
42910
+ id: function (string)
42911
+ {
42912
+ if (string === null)
42913
+ return false;
42914
+
42915
+ if (string .length === 0)
42916
+ return false;
42917
+
42918
+ return true;
42919
+ },
42920
+ getParents: function ()
42921
+ {
42922
+ return this .parents;
42923
+ },
42924
+ getParent: function ()
42925
+ {
42926
+ return this .parents .at (-1);
42927
+ },
42928
+ pushParent: function (parent)
42929
+ {
42930
+ return this .parents .push (parent);
42931
+ },
42932
+ popParent: function ()
42933
+ {
42934
+ this .parents .pop ();
42935
+ },
42878
42936
  addNode: function (xmlElement, node)
42879
42937
  {
42880
42938
  if (this .parents .length === 0 || this .getParent () instanceof Prototype_X3DProtoDeclaration)
@@ -42933,41 +42991,22 @@ XMLParser .prototype = Object .assign (Object .create (Parser_X3DParser.prototyp
42933
42991
  //console .warn (error .message);
42934
42992
  }
42935
42993
  },
42936
- getParents: function ()
42937
- {
42938
- return this .parents;
42939
- },
42940
- getParent: function ()
42941
- {
42942
- return this .parents .at (-1);
42943
- },
42944
- pushParent: function (parent)
42945
- {
42946
- return this .parents .push (parent);
42947
- },
42948
- popParent: function ()
42949
- {
42950
- this .parents .pop ();
42951
- },
42952
- id: function (string)
42994
+ // Overloaded by HTMLParser.
42995
+ addProtoName: function (name)
42996
+ { },
42997
+ addProtoFieldNames: function (protoNode)
42998
+ { },
42999
+ protoNameToCamelCase: function (typeName)
42953
43000
  {
42954
- if (string === null)
42955
- return false;
42956
-
42957
- if (string .length === 0)
42958
- return false;
42959
-
42960
- return true;
43001
+ return typeName;
42961
43002
  },
42962
- nodeNameToCamelCase: function (nodeName)
43003
+ nodeNameToCamelCase: function (typeName)
42963
43004
  {
42964
- // Function also needed by X_ITE DOM.
42965
- return Parser_HTMLSupport.getNodeTypeName (nodeName);
43005
+ return typeName;
42966
43006
  },
42967
- attributeToCamelCase: function (name)
43007
+ attributeToCamelCase: function (node, name)
42968
43008
  {
42969
- // Function also needed by X_ITE DOM.
42970
- return Parser_HTMLSupport.getFieldName (name);
43009
+ return name;
42971
43010
  },
42972
43011
  });
42973
43012
 
@@ -43020,7 +43059,7 @@ XMLParser .prototype .fieldTypes [Base_X3DConstants.MFVec4f] = Parser_VRMLPa
43020
43059
  * Lazy parse functions.
43021
43060
  */
43022
43061
 
43023
- var
43062
+ const
43024
43063
  infs = /\binf\b/g,
43025
43064
  nans = /\bnan\b/g,
43026
43065
  trimWhitespaces = /^[\x20\n,\t\r"]+|[\x20\n,\t\r"]+$/g,
@@ -43117,6 +43156,71 @@ XMLParser .prototype .fieldTypes [Base_X3DConstants.MFString] = function (field)
43117
43156
  field .setValue (prepareStrings (this .getInput ()));
43118
43157
  };
43119
43158
 
43159
+ // HTML Support
43160
+
43161
+ const HTMLParser =
43162
+ {
43163
+ addProtoName: function (name)
43164
+ {
43165
+ //DOMIntegration: add uppercase versions of proto name.
43166
+
43167
+ this .protoNames .set (name, name);
43168
+ this .protoNames .set (name .toUpperCase (), name);
43169
+ },
43170
+ addProtoFieldNames: (function ()
43171
+ {
43172
+ const reservedAttributes = new Set ();
43173
+
43174
+ for (const reservedAttribute of [
43175
+ "DEF",
43176
+ "USE",
43177
+ "containerField",
43178
+ ])
43179
+ {
43180
+ reservedAttributes
43181
+ .add (reservedAttribute)
43182
+ .add (reservedAttribute .toLowerCase ());
43183
+ }
43184
+
43185
+ return function (protoNode)
43186
+ {
43187
+ //DOMIntegration: handle lowercase versions of field names.
43188
+
43189
+ const fields = new Map ();
43190
+
43191
+ this .protoFields .set (protoNode, fields);
43192
+
43193
+ for (const { name } of protoNode .getFieldDefinitions ())
43194
+ {
43195
+ if (reservedAttributes .has (name))
43196
+ continue;
43197
+
43198
+ fields .set (name, name);
43199
+ fields .set (name .toLowerCase (), name);
43200
+ }
43201
+ };
43202
+ })(),
43203
+ protoNameToCamelCase: function (typeName)
43204
+ {
43205
+ //DOMIntegration: handle uppercase versions of node names.
43206
+ return this .protoNames .get (typeName);
43207
+ },
43208
+ nodeNameToCamelCase: function (typeName)
43209
+ {
43210
+ //DOMIntegration: handle uppercase versions of node names.
43211
+ return Parser_HTMLSupport.getNodeTypeName (typeName);
43212
+ },
43213
+ attributeToCamelCase: function (node, name)
43214
+ {
43215
+ //DOMIntegration: handle lowercase versions of field names.
43216
+
43217
+ if (node instanceof Core_X3DPrototypeInstance)
43218
+ return this .protoFields .get (node .getProtoNode ()) .get (name);
43219
+
43220
+ return Parser_HTMLSupport.getFieldName (name);
43221
+ },
43222
+ };
43223
+
43120
43224
  const XMLParser_default_ = XMLParser;
43121
43225
  ;
43122
43226
 
@@ -43870,7 +43974,7 @@ const Plane3_default_ = Plane3;
43870
43974
  x_ite_Namespace.set ("standard/Math/Geometry/Plane3", Plane3_default_);
43871
43975
  /* harmony default export */ const Geometry_Plane3 = (Plane3_default_);
43872
43976
  ;// CONCATENATED MODULE: ./src/standard/Math/Geometry/Triangle3.js
43873
- /* provided dependency */ var libtess = __webpack_require__(193);
43977
+ /* provided dependency */ var libtess = __webpack_require__(36);
43874
43978
  /*******************************************************************************
43875
43979
  *
43876
43980
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51205,7 +51309,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
51205
51309
  x_ite_Namespace.set ("x_ite/Components/Texturing/X3DTexture2DNode", X3DTexture2DNode_default_);
51206
51310
  /* harmony default export */ const Texturing_X3DTexture2DNode = (X3DTexture2DNode_default_);
51207
51311
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/ImageTexture.js
51208
- /* provided dependency */ var ImageTexture_$ = __webpack_require__(370);
51312
+ /* provided dependency */ var ImageTexture_$ = __webpack_require__(265);
51209
51313
  /*******************************************************************************
51210
51314
  *
51211
51315
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55567,8 +55671,8 @@ const BinaryTransport_default_ = BinaryTransport;
55567
55671
  x_ite_Namespace.set ("standard/Networking/BinaryTransport", BinaryTransport_default_);
55568
55672
  /* harmony default export */ const Networking_BinaryTransport = (BinaryTransport_default_);
55569
55673
  ;// CONCATENATED MODULE: ./src/x_ite/InputOutput/FileLoader.js
55570
- /* provided dependency */ var FileLoader_$ = __webpack_require__(370);
55571
- /* provided dependency */ var pako = __webpack_require__(67);
55674
+ /* provided dependency */ var FileLoader_$ = __webpack_require__(265);
55675
+ /* provided dependency */ var pako = __webpack_require__(536);
55572
55676
  /*******************************************************************************
55573
55677
  *
55574
55678
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -57839,7 +57943,7 @@ const URLs_default_ = URLs;
57839
57943
  x_ite_Namespace.set ("x_ite/Browser/Networking/URLs", URLs_default_);
57840
57944
  /* harmony default export */ const Networking_URLs = (URLs_default_);
57841
57945
  ;// CONCATENATED MODULE: ./src/x_ite/Configuration/ComponentInfo.js
57842
- /* provided dependency */ var ComponentInfo_$ = __webpack_require__(370);
57946
+ /* provided dependency */ var ComponentInfo_$ = __webpack_require__(265);
57843
57947
  /*******************************************************************************
57844
57948
  *
57845
57949
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59323,7 +59427,7 @@ const DataStorage_default_ = DataStorage;
59323
59427
  x_ite_Namespace.set ("standard/Utility/DataStorage", DataStorage_default_);
59324
59428
  /* harmony default export */ const Utility_DataStorage = (DataStorage_default_);
59325
59429
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Core/X3DCoreContext.js
59326
- /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(370);
59430
+ /* provided dependency */ var X3DCoreContext_$ = __webpack_require__(265);
59327
59431
  /*******************************************************************************
59328
59432
  *
59329
59433
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66289,8 +66393,8 @@ const OrientationChaser_default_ = OrientationChaser;
66289
66393
  x_ite_Namespace.set ("x_ite/Components/Followers/OrientationChaser", OrientationChaser_default_);
66290
66394
  /* harmony default export */ const Followers_OrientationChaser = (OrientationChaser_default_);
66291
66395
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/ExamineViewer.js
66292
- /* provided dependency */ var jquery_mousewheel = __webpack_require__(196);
66293
- /* provided dependency */ var ExamineViewer_$ = __webpack_require__(370);
66396
+ /* provided dependency */ var jquery_mousewheel = __webpack_require__(895);
66397
+ /* provided dependency */ var ExamineViewer_$ = __webpack_require__(265);
66294
66398
  /*******************************************************************************
66295
66399
  *
66296
66400
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67155,8 +67259,8 @@ const ExamineViewer_default_ = ExamineViewer;
67155
67259
  x_ite_Namespace.set ("x_ite/Browser/Navigation/ExamineViewer", ExamineViewer_default_);
67156
67260
  /* harmony default export */ const Navigation_ExamineViewer = (ExamineViewer_default_);
67157
67261
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
67158
- /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(196);
67159
- /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(370);
67262
+ /* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(895);
67263
+ /* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(265);
67160
67264
  /*******************************************************************************
67161
67265
  *
67162
67266
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68095,8 +68199,8 @@ const FlyViewer_default_ = FlyViewer;
68095
68199
  x_ite_Namespace.set ("x_ite/Browser/Navigation/FlyViewer", FlyViewer_default_);
68096
68200
  /* harmony default export */ const Navigation_FlyViewer = (FlyViewer_default_);
68097
68201
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/PlaneViewer.js
68098
- /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(196);
68099
- /* provided dependency */ var PlaneViewer_$ = __webpack_require__(370);
68202
+ /* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(895);
68203
+ /* provided dependency */ var PlaneViewer_$ = __webpack_require__(265);
68100
68204
  /*******************************************************************************
68101
68205
  *
68102
68206
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -68408,8 +68512,8 @@ const NoneViewer_default_ = NoneViewer;
68408
68512
  x_ite_Namespace.set ("x_ite/Browser/Navigation/NoneViewer", NoneViewer_default_);
68409
68513
  /* harmony default export */ const Navigation_NoneViewer = (NoneViewer_default_);
68410
68514
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Navigation/LookAtViewer.js
68411
- /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(196);
68412
- /* provided dependency */ var LookAtViewer_$ = __webpack_require__(370);
68515
+ /* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(895);
68516
+ /* provided dependency */ var LookAtViewer_$ = __webpack_require__(265);
68413
68517
  /*******************************************************************************
68414
68518
  *
68415
68519
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70011,8 +70115,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
70011
70115
  x_ite_Namespace.set ("x_ite/Browser/Picking/X3DPickingContext", X3DPickingContext_default_);
70012
70116
  /* harmony default export */ const Picking_X3DPickingContext = (X3DPickingContext_default_);
70013
70117
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
70014
- /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(196);
70015
- /* provided dependency */ var PointingDevice_$ = __webpack_require__(370);
70118
+ /* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(895);
70119
+ /* provided dependency */ var PointingDevice_$ = __webpack_require__(265);
70016
70120
  /*******************************************************************************
70017
70121
  *
70018
70122
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -70622,8 +70726,8 @@ const X3DPointingDeviceSensorContext_default_ = X3DPointingDeviceSensorContext;
70622
70726
  x_ite_Namespace.set ("x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext", X3DPointingDeviceSensorContext_default_);
70623
70727
  /* harmony default export */ const PointingDeviceSensor_X3DPointingDeviceSensorContext = (X3DPointingDeviceSensorContext_default_);
70624
70728
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
70625
- /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(370);
70626
- /* provided dependency */ var ResizeSensor = __webpack_require__(138);
70729
+ /* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(265);
70730
+ /* provided dependency */ var ResizeSensor = __webpack_require__(923);
70627
70731
  /*******************************************************************************
70628
70732
  *
70629
70733
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81642,7 +81746,7 @@ const X3DRoutingContext_default_ = X3DRoutingContext;
81642
81746
  x_ite_Namespace.set ("x_ite/Routing/X3DRoutingContext", X3DRoutingContext_default_);
81643
81747
  /* harmony default export */ const Routing_X3DRoutingContext = (X3DRoutingContext_default_);
81644
81748
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowserContext.js
81645
- /* provided dependency */ var X3DBrowserContext_$ = __webpack_require__(370);
81749
+ /* provided dependency */ var X3DBrowserContext_$ = __webpack_require__(265);
81646
81750
  /*******************************************************************************
81647
81751
  *
81648
81752
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -81983,9 +82087,12 @@ Object .assign (X3DBrowserContext,
81983
82087
  X3DBrowserContext_$("x3d-canvas, X3DCanvas") .each (function (_, canvas)
81984
82088
  {
81985
82089
  const
81986
- X3D = window [Symbol .for ("X_ITE.X3D-8.3.1")],
82090
+ X3D = window [Symbol .for ("X_ITE.X3D-8.3.2")],
81987
82091
  browser = X3D .getBrowser (canvas);
81988
82092
 
82093
+ if (! browser)
82094
+ return;
82095
+
81989
82096
  browserContext .call (browser);
81990
82097
 
81991
82098
  if (typeof browserContext .prototype .initialize === "function")
@@ -94014,18 +94121,28 @@ Inline .prototype = Object .assign (Object .create (Core_X3DChildNode.prototype)
94014
94121
  },
94015
94122
  unLoadNow: function ()
94016
94123
  {
94124
+ this .abortLoading ();
94017
94125
  this .setInternalScene (this .getBrowser () .getDefaultScene ());
94018
94126
  },
94019
94127
  loadNow: function ()
94020
94128
  {
94021
- new InputOutput_FileLoader (this) .createX3DFromURL (this ._url, null, this .setInternalSceneAsync .bind (this));
94129
+ this .abortLoading ();
94130
+ this .fileLoader = new InputOutput_FileLoader (this) .createX3DFromURL (this ._url, null, this .setInternalSceneAsync .bind (this));
94131
+ },
94132
+ abortLoading: function ()
94133
+ {
94134
+ this .scene ._loadCount .removeInterest ("checkLoadCount", this);
94135
+
94136
+ if (this .fileLoader)
94137
+ this .fileLoader .abort ();
94022
94138
  },
94023
94139
  setInternalSceneAsync: function (scene)
94024
94140
  {
94025
94141
  if (scene)
94026
94142
  {
94143
+ scene ._loadCount .addInterest ("checkLoadCount", this);
94027
94144
  this .setInternalScene (scene);
94028
- this .setLoadState (Base_X3DConstants.COMPLETE_STATE);
94145
+ this .checkLoadCount (scene ._loadCount);
94029
94146
  }
94030
94147
  else
94031
94148
  {
@@ -94033,6 +94150,15 @@ Inline .prototype = Object .assign (Object .create (Core_X3DChildNode.prototype)
94033
94150
  this .setLoadState (Base_X3DConstants.FAILED_STATE);
94034
94151
  }
94035
94152
  },
94153
+ checkLoadCount: function (loadCount)
94154
+ {
94155
+ if (loadCount .getValue ())
94156
+ return;
94157
+
94158
+ loadCount .removeInterest ("checkLoadCount", this);
94159
+
94160
+ this .setLoadState (Base_X3DConstants.COMPLETE_STATE);
94161
+ },
94036
94162
  setInternalScene: function (scene)
94037
94163
  {
94038
94164
  this .scene .setLive (false);
@@ -100740,7 +100866,7 @@ const X3DSoundSourceNode_default_ = X3DSoundSourceNode;
100740
100866
  x_ite_Namespace.set ("x_ite/Components/Sound/X3DSoundSourceNode", X3DSoundSourceNode_default_);
100741
100867
  /* harmony default export */ const Sound_X3DSoundSourceNode = (X3DSoundSourceNode_default_);
100742
100868
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Sound/AudioClip.js
100743
- /* provided dependency */ var AudioClip_$ = __webpack_require__(370);
100869
+ /* provided dependency */ var AudioClip_$ = __webpack_require__(265);
100744
100870
  /*******************************************************************************
100745
100871
  *
100746
100872
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -103437,7 +103563,7 @@ const Components_Sound_default_ = undefined;
103437
103563
  x_ite_Namespace.set ("x_ite/Components/Sound", Components_Sound_default_);
103438
103564
  /* harmony default export */ const Components_Sound = ((/* unused pure expression or super */ null && (Components_Sound_default_)));
103439
103565
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/MovieTexture.js
103440
- /* provided dependency */ var MovieTexture_$ = __webpack_require__(370);
103566
+ /* provided dependency */ var MovieTexture_$ = __webpack_require__(265);
103441
103567
  /*******************************************************************************
103442
103568
  *
103443
103569
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -104360,7 +104486,7 @@ const MultiTextureTransform_default_ = MultiTextureTransform;
104360
104486
  x_ite_Namespace.set ("x_ite/Components/Texturing/MultiTextureTransform", MultiTextureTransform_default_);
104361
104487
  /* harmony default export */ const Texturing_MultiTextureTransform = (MultiTextureTransform_default_);
104362
104488
  ;// CONCATENATED MODULE: ./src/x_ite/Components/Texturing/PixelTexture.js
104363
- /* provided dependency */ var PixelTexture_$ = __webpack_require__(370);
104489
+ /* provided dependency */ var PixelTexture_$ = __webpack_require__(265);
104364
104490
  /*******************************************************************************
104365
104491
  *
104366
104492
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -105063,7 +105189,7 @@ const Components_default_ = Components;
105063
105189
  x_ite_Namespace.set ("x_ite/Components", Components_default_);
105064
105190
  /* harmony default export */ const x_ite_Components = ((/* unused pure expression or super */ null && (Components_default_)));
105065
105191
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/DOMIntegration.js
105066
- /* provided dependency */ var DOMIntegration_$ = __webpack_require__(370);
105192
+ /* provided dependency */ var DOMIntegration_$ = __webpack_require__(265);
105067
105193
  /*******************************************************************************
105068
105194
  * MIT License
105069
105195
  *
@@ -105092,30 +105218,27 @@ x_ite_Namespace.set ("x_ite/Components", Components_default_);
105092
105218
 
105093
105219
 
105094
105220
 
105095
-
105096
105221
  class DOMIntegration
105097
105222
  {
105098
105223
  constructor (browser)
105099
105224
  {
105100
- this .browser = browser;
105101
- this .rootElement = undefined;
105102
-
105103
- this .canvasObserver = new MutationObserver (() =>
105104
- {
105105
- this .observeRoot (this .browser .getElement () .children ("X3D") [0]);
105106
- });
105225
+ this .browser = browser;
105226
+ this .rootElement = undefined;
105227
+ this .canvasObserver = new MutationObserver (() => this .processCanvasMutation (browser));
105107
105228
 
105108
- this .canvasObserver .observe (this .browser .getElement () [0], {
105229
+ this .canvasObserver .observe (browser .getElement () [0], {
105109
105230
  childList: true,
105110
105231
  });
105111
105232
 
105112
- const rootElement = this .browser .getElement () .children ("X3D") [0];
105233
+ this .processCanvasMutation (browser)
105234
+ }
105113
105235
 
105114
- if (rootElement)
105115
- this .observeRoot (rootElement);
105236
+ processCanvasMutation (browser)
105237
+ {
105238
+ this .processRootElement (browser, browser .getElement () .children ("X3D") .get (-1));
105116
105239
  }
105117
105240
 
105118
- async observeRoot (rootElement)
105241
+ async processRootElement (browser, rootElement)
105119
105242
  {
105120
105243
  try
105121
105244
  {
@@ -105128,21 +105251,20 @@ class DOMIntegration
105128
105251
  {
105129
105252
  // Display splash screen.
105130
105253
 
105131
- this .browser .setBrowserLoading (true);
105132
- this .browser .addLoadingObject (this);
105254
+ browser .setBrowserLoading (true);
105255
+ browser .addLoadingObject (this);
105133
105256
 
105134
- // Preprocess script nodes if not xhtml.
105257
+ // Now also attached node property to each node element.
105135
105258
 
105136
- if (! location .pathname .toLowerCase () .endsWith (".xhtml"))
105137
- this .preprocessScriptElements (rootElement);
105259
+ const scene = browser .createScene ();
105138
105260
 
105139
- // Now also attached x3d property to each node element.
105261
+ this .parser = new Parser_XMLParser (scene);
105140
105262
 
105141
- const importedScene = await this .browser .importDocument (rootElement, true);
105263
+ this .parser .setInput (rootElement);
105142
105264
 
105143
- this .browser .replaceWorld (importedScene);
105265
+ await new Promise (this .parser .parseIntoScene .bind (this .parser));
105144
105266
 
105145
- this .parser = new Parser_XMLParser (importedScene);
105267
+ browser .replaceWorld (scene);
105146
105268
 
105147
105269
  // Create an observer instance.
105148
105270
 
@@ -105167,11 +105289,11 @@ class DOMIntegration
105167
105289
  this .processInlineElements (rootElement);
105168
105290
  this .addEventDispatchersAll (rootElement);
105169
105291
 
105170
- this .browser .removeLoadingObject (this);
105292
+ browser .removeLoadingObject (this);
105171
105293
  }
105172
105294
  else
105173
105295
  {
105174
- this .browser .replaceWorld (null);
105296
+ browser .replaceWorld (null);
105175
105297
  }
105176
105298
  }
105177
105299
  catch (error)
@@ -105180,27 +105302,6 @@ class DOMIntegration
105180
105302
  }
105181
105303
  }
105182
105304
 
105183
- preprocessScriptElements (rootElement)
105184
- {
105185
- const scriptElements = rootElement .querySelectorAll ("Script");
105186
-
105187
- for (const scriptElement of scriptElements)
105188
- this .appendScriptElementChildren (scriptElement);
105189
- }
105190
-
105191
- appendScriptElementChildren (scriptElement)
105192
- {
105193
- const
105194
- domParser = new DOMParser (),
105195
- scriptDoc = domParser .parseFromString (scriptElement .outerHTML, "application/xml"),
105196
- scriptNodes = scriptDoc .children [0] .childNodes;
105197
-
105198
- scriptElement .textContent = "// Content moved into childNodes.";
105199
-
105200
- for (const scriptNode of scriptNodes)
105201
- scriptElement .appendChild (scriptNode);
105202
- }
105203
-
105204
105305
  processMutation (mutation)
105205
105306
  {
105206
105307
  switch (mutation .type)
@@ -105225,13 +105326,15 @@ class DOMIntegration
105225
105326
 
105226
105327
  processAttribute (mutation, element)
105227
105328
  {
105329
+ const parser = this .parser;
105330
+
105228
105331
  if (DOMIntegration_$.data (element, "node"))
105229
105332
  {
105230
105333
  const
105231
105334
  attributeName = mutation .attributeName,
105232
105335
  attribute = element .attributes .getNamedItem (attributeName);
105233
105336
 
105234
- this .parser .nodeAttribute (attribute, DOMIntegration_$.data (element, "node"));
105337
+ parser .nodeAttribute (attribute, DOMIntegration_$.data (element, "node"));
105235
105338
  }
105236
105339
  else
105237
105340
  {
@@ -105241,11 +105344,11 @@ class DOMIntegration
105241
105344
  parentNode = element .parentNode,
105242
105345
  node = DOMIntegration_$.data (parentNode, "node");
105243
105346
 
105244
- this .parser .pushExecutionContext (node .getExecutionContext ());
105245
- this .parser .pushParent (node);
105246
- this .parser .childElement (element);
105247
- this .parser .popParent ();
105248
- this .parser .popExecutionContext ();
105347
+ parser .pushExecutionContext (node .getExecutionContext ());
105348
+ parser .pushParent (node);
105349
+ parser .childElement (element);
105350
+ parser .popParent ();
105351
+ parser .popExecutionContext ();
105249
105352
  }
105250
105353
  }
105251
105354
 
@@ -105341,6 +105444,8 @@ class DOMIntegration
105341
105444
  return;
105342
105445
 
105343
105446
  node ._loadState .addInterest ("appendInlineChildElement", this, element);
105447
+
105448
+ this .appendInlineChildElement (element);
105344
105449
  }
105345
105450
 
105346
105451
  appendInlineChildElement (element)
@@ -105375,9 +105480,33 @@ class DOMIntegration
105375
105480
 
105376
105481
  // Add Inline elements, and connect to node events.
105377
105482
 
105378
- this .processInlineElements (element);
105379
- this .addEventDispatchersAll (element);
105483
+ this .processInlineElements (X3DElement);
105484
+ this .addEventDispatchersAll (X3DElement);
105485
+
105486
+ break;
105487
+ }
105488
+ }
105489
+
105490
+ switch (node .checkLoadState ())
105491
+ {
105492
+ case Base_X3DConstants.COMPLETE_STATE:
105493
+ {
105494
+ const event = new CustomEvent ("load",
105495
+ {
105496
+ detail: { node: node .valueOf () },
105497
+ });
105498
+
105499
+ element .dispatchEvent (event);
105500
+ break;
105501
+ }
105502
+ case Base_X3DConstants.FAILED_STATE:
105503
+ {
105504
+ const event = new CustomEvent ("error",
105505
+ {
105506
+ detail: { node: node .valueOf () },
105507
+ });
105380
105508
 
105509
+ element .dispatchEvent (event);
105381
105510
  break;
105382
105511
  }
105383
105512
  }
@@ -105422,9 +105551,13 @@ class DOMIntegration
105422
105551
  {
105423
105552
  const node = DOMIntegration_$.data (element, "node");
105424
105553
 
105425
- const event = new CustomEvent (field .getName (), {
105554
+ if (! node)
105555
+ return;
105556
+
105557
+ const event = new CustomEvent (field .getName (),
105558
+ {
105426
105559
  detail: {
105427
- node: node ? Fields_SFNodeCache.get (node) : null,
105560
+ node: node .valueOf (),
105428
105561
  value: field .valueOf (),
105429
105562
  },
105430
105563
  });
@@ -106286,7 +106419,7 @@ const SupportedProfiles_default_ = SupportedProfiles;
106286
106419
  x_ite_Namespace.set ("x_ite/Configuration/SupportedProfiles", SupportedProfiles_default_);
106287
106420
  /* harmony default export */ const Configuration_SupportedProfiles = (SupportedProfiles_default_);
106288
106421
  ;// CONCATENATED MODULE: ./src/x_ite/Browser/X3DBrowser.js
106289
- /* provided dependency */ var X3DBrowser_$ = __webpack_require__(370);
106422
+ /* provided dependency */ var X3DBrowser_$ = __webpack_require__(265);
106290
106423
  /*******************************************************************************
106291
106424
  *
106292
106425
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -106622,7 +106755,7 @@ X3DBrowser .prototype = Object .assign (Object .create (Browser_X3DBrowserContex
106622
106755
  if (loadCount .getValue ())
106623
106756
  return;
106624
106757
 
106625
- this ._loadCount .removeInterest ("checkLoadCount", this);
106758
+ loadCount .removeInterest ("checkLoadCount", this);
106626
106759
  this .initialized () .set (this .getCurrentTime ());
106627
106760
  this .initialized () .processInterests ();
106628
106761
  this .callBrowserCallbacks (Base_X3DConstants.INITIALIZED_EVENT);
@@ -107171,7 +107304,7 @@ const X3DBrowser_default_ = X3DBrowser;
107171
107304
  x_ite_Namespace.set ("x_ite/Browser/X3DBrowser", X3DBrowser_default_);
107172
107305
  /* harmony default export */ const Browser_X3DBrowser = (X3DBrowser_default_);
107173
107306
  ;// CONCATENATED MODULE: ./src/x_ite/Fallback.js
107174
- /* provided dependency */ var Fallback_$ = __webpack_require__(370);
107307
+ /* provided dependency */ var Fallback_$ = __webpack_require__(265);
107175
107308
  /*******************************************************************************
107176
107309
  *
107177
107310
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107350,14 +107483,14 @@ const MicroTime_default_ = undefined;
107350
107483
  x_ite_Namespace.set ("standard/Time/MicroTime", MicroTime_default_);
107351
107484
  /* harmony default export */ const MicroTime = ((/* unused pure expression or super */ null && (MicroTime_default_)));
107352
107485
  ;// CONCATENATED MODULE: ./src/lib/jquery.js
107353
- /* provided dependency */ var jquery_$ = __webpack_require__(370);
107486
+ /* provided dependency */ var jquery_$ = __webpack_require__(265);
107354
107487
  const jquery_default_ = jquery_$;
107355
107488
  ;
107356
107489
 
107357
107490
  x_ite_Namespace.set ("lib/jquery", jquery_default_);
107358
107491
  /* harmony default export */ const jquery = ((/* unused pure expression or super */ null && (jquery_default_)));
107359
107492
  ;// CONCATENATED MODULE: ./src/x_ite/X3D.js
107360
- /* provided dependency */ var X3D_$ = __webpack_require__(370);
107493
+ /* provided dependency */ var X3D_$ = __webpack_require__(265);
107361
107494
  /*******************************************************************************
107362
107495
  *
107363
107496
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107612,7 +107745,7 @@ const X3D_default_ = X3D;
107612
107745
  x_ite_Namespace.set ("x_ite/X3D", X3D_default_);
107613
107746
  /* harmony default export */ const x_ite_X3D = (X3D_default_);
107614
107747
  ;// CONCATENATED MODULE: ./src/x_ite/X3DCanvas.js
107615
- /* provided dependency */ var X3DCanvas_$ = __webpack_require__(370);
107748
+ /* provided dependency */ var X3DCanvas_$ = __webpack_require__(265);
107616
107749
  /*******************************************************************************
107617
107750
  *
107618
107751
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107862,7 +107995,7 @@ x_ite_Namespace.set ("shim", shim_default_);
107862
107995
 
107863
107996
  // Assign X3D to global namespace.
107864
107997
 
107865
- window [Symbol .for ("X_ITE.X3D-8.3.1")] = x_ite_X3D;
107998
+ window [Symbol .for ("X_ITE.X3D-8.3.2")] = x_ite_X3D;
107866
107999
 
107867
108000
  x_ite_X3DCanvas.define ();
107868
108001