x_ite 8.6.17 → 8.6.19

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 (123) hide show
  1. package/dist/assets/components/Annotation.js +13 -13
  2. package/dist/assets/components/Annotation.min.js +1 -1
  3. package/dist/assets/components/CADGeometry.js +13 -13
  4. package/dist/assets/components/CADGeometry.min.js +1 -1
  5. package/dist/assets/components/CubeMapTexturing.js +28 -28
  6. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  7. package/dist/assets/components/DIS.js +13 -21
  8. package/dist/assets/components/DIS.min.js +1 -1
  9. package/dist/assets/components/EventUtilities.js +9 -9
  10. package/dist/assets/components/EventUtilities.min.js +1 -1
  11. package/dist/assets/components/Geometry2D.js +19 -19
  12. package/dist/assets/components/Geometry2D.min.js +1 -1
  13. package/dist/assets/components/Geospatial.js +33 -39
  14. package/dist/assets/components/Geospatial.min.js +1 -1
  15. package/dist/assets/components/HAnim.js +18 -18
  16. package/dist/assets/components/HAnim.min.js +1 -1
  17. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  18. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  19. package/dist/assets/components/Layout.js +27 -27
  20. package/dist/assets/components/Layout.min.js +1 -1
  21. package/dist/assets/components/NURBS.js +24 -24
  22. package/dist/assets/components/NURBS.min.js +1 -1
  23. package/dist/assets/components/ParticleSystems.js +23 -25
  24. package/dist/assets/components/ParticleSystems.min.js +1 -1
  25. package/dist/assets/components/Picking.js +25 -26
  26. package/dist/assets/components/Picking.min.js +1 -1
  27. package/dist/assets/components/RigidBodyPhysics.js +20 -20
  28. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  29. package/dist/assets/components/Scripting.js +121 -195
  30. package/dist/assets/components/Scripting.min.js +1 -1
  31. package/dist/assets/components/Text.js +30 -31
  32. package/dist/assets/components/Text.min.js +1 -1
  33. package/dist/assets/components/TextureProjector.js +14 -14
  34. package/dist/assets/components/TextureProjector.min.js +1 -1
  35. package/dist/assets/components/Texturing3D.js +174 -174
  36. package/dist/assets/components/Texturing3D.min.js +1 -1
  37. package/dist/assets/components/VolumeRendering.js +35 -33
  38. package/dist/assets/components/VolumeRendering.min.js +1 -1
  39. package/dist/assets/components/X_ITE.js +9 -9
  40. package/dist/assets/components/X_ITE.min.js +1 -1
  41. package/dist/example.html +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.js +512 -519
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +1 -1
  47. package/docs/_posts/getting-started.md +1 -1
  48. package/docs/_posts/reference/prototype-services.md +2 -2
  49. package/docs/_posts/setup-a-localhost-server.md +2 -2
  50. package/package.json +4 -4
  51. package/src/example.html +1 -1
  52. package/src/standard/Math/Algorithm.js +1 -1
  53. package/src/standard/Math/Algorithms/MergeSort.js +7 -5
  54. package/src/standard/Math/Algorithms/PartialSort.js +3 -1
  55. package/src/standard/Math/Algorithms/QuickSort.js +1 -3
  56. package/src/standard/Math/Geometry/Box2.js +1 -1
  57. package/src/standard/Math/Geometry/Box3.js +1 -1
  58. package/src/standard/Math/Numbers/Quaternion.js +4 -3
  59. package/src/standard/Math/Numbers/Rotation4.js +4 -3
  60. package/src/x_ite/Base/X3DBaseNode.js +9 -24
  61. package/src/x_ite/Base/X3DEventObject.js +4 -3
  62. package/src/x_ite/Base/X3DField.js +19 -20
  63. package/src/x_ite/Base/X3DObject.js +5 -1
  64. package/src/x_ite/Base/X3DObjectArrayField.js +12 -11
  65. package/src/x_ite/Base/X3DTypedArrayField.js +3 -3
  66. package/src/x_ite/Browser/Core/Context.js +1 -1
  67. package/src/x_ite/Browser/Navigation/ExamineViewer.js +1 -1
  68. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +14 -9
  69. package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +2 -2
  70. package/src/x_ite/Browser/VERSION.js +1 -1
  71. package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +2 -2
  72. package/src/x_ite/Browser/X3DBrowser.js +44 -77
  73. package/src/x_ite/Browser/X3DBrowserContext.js +3 -3
  74. package/src/x_ite/Components/Core/X3DNode.js +2 -2
  75. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +3 -8
  76. package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +3 -3
  77. package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +0 -8
  78. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +14 -12
  79. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +3 -3
  80. package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +1 -1
  81. package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +1 -1
  82. package/src/x_ite/Components/Geospatial/GeoMetadata.js +0 -6
  83. package/src/x_ite/Components/Networking/Anchor.js +36 -33
  84. package/src/x_ite/Components/Networking/Inline.js +3 -3
  85. package/src/x_ite/Components/Networking/X3DUrlObject.js +74 -23
  86. package/src/x_ite/Components/Picking/X3DPickSensorNode.js +6 -5
  87. package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +2 -2
  88. package/src/x_ite/Components/Scripting/Script.js +93 -167
  89. package/src/x_ite/Components/Shaders/ComposedShader.js +3 -18
  90. package/src/x_ite/Components/Shaders/PackagedShader.js +0 -2
  91. package/src/x_ite/Components/Shaders/ShaderPart.js +4 -4
  92. package/src/x_ite/Components/Shaders/ShaderProgram.js +0 -2
  93. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +4 -5
  94. package/src/x_ite/Components/Sound/AudioClip.js +6 -6
  95. package/src/x_ite/Components/Sound/DynamicsCompressor.js +4 -4
  96. package/src/x_ite/Components/Text/Text.js +2 -3
  97. package/src/x_ite/Components/Text/X3DFontStyleNode.js +4 -4
  98. package/src/x_ite/Components/Texturing/ImageTexture.js +3 -3
  99. package/src/x_ite/Components/Texturing/MovieTexture.js +6 -6
  100. package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +3 -3
  101. package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +3 -3
  102. package/src/x_ite/Components/Time/X3DTimeDependentNode.js +31 -25
  103. package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +1 -1
  104. package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +1 -1
  105. package/src/x_ite/Components/VolumeRendering/VolumeData.js +1 -1
  106. package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +11 -9
  107. package/src/x_ite/Execution/Scene.js +1 -1
  108. package/src/x_ite/Execution/X3DExecutionContext.js +30 -32
  109. package/src/x_ite/Execution/X3DScene.js +6 -6
  110. package/src/x_ite/Fields/ArrayFields.js +2 -1
  111. package/src/x_ite/Fields/SFImage.js +0 -1
  112. package/src/x_ite/Fields/SFNode.js +9 -8
  113. package/src/x_ite/Fields/SFRotation.js +2 -4
  114. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +3 -3
  115. package/src/x_ite/InputOutput/FileLoader.js +3 -4
  116. package/src/x_ite/InputOutput/Generator.js +1 -1
  117. package/src/x_ite/Parser/GLTF2Parser.js +45 -45
  118. package/src/x_ite/Parser/VRMLParser.js +2 -2
  119. package/src/x_ite/Parser/X3DParser.js +4 -4
  120. package/src/x_ite/Parser/XMLParser.js +16 -22
  121. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +2 -2
  122. package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
  123. package/docs/_tabs/imprint.md +0 -52
package/dist/x_ite.zip CHANGED
Binary file
package/docs/_config.yml CHANGED
@@ -20,7 +20,7 @@ timezone:
20
20
  # ↓ --------------------------
21
21
 
22
22
  title: X_ITE X3D Browser # the main title
23
- version: 8.6.17 # x_ite latest version
23
+ version: 8.6.19 # x_ite latest version
24
24
  size: 290 # size in kb
25
25
  x3d_latest_version: 4.0 # x3d latest version
26
26
 
@@ -544,7 +544,7 @@ There is a ZIP archive available to locally install X_ITE on your server. Compre
544
544
 
545
545
  ### You can also get it on NPM
546
546
 
547
- ```sh
547
+ ```console
548
548
  $ npm install x_ite
549
549
  ```
550
550
 
@@ -87,9 +87,9 @@ The value is one of the *_STATE* properties defined in the X3DConstants object.
87
87
 
88
88
  Creates a new default instance of the extern prototype.
89
89
 
90
- #### void **loadNow** ()
90
+ #### Promise\<void\> **loadNow** ()
91
91
 
92
- Triggers the load of the extern prototype. If the extern prototype is already loaded or the load is already in progress, this request is silently ignored.
92
+ Triggers the loading of the extern prototype. It returns a Promise that is resolved when the extern prototype is completely loaded and all instances are updated.
93
93
 
94
94
  #### String **toVRMLString** (\[options\])
95
95
 
@@ -29,14 +29,14 @@ If you have [Python](https://www.python.org){:target="_blank"} installed, then i
29
29
 
30
30
  Just open a Terminal and go to the directory you want to make available.
31
31
 
32
- ```sh
32
+ ```console
33
33
  # Let's make the Desktop directory available.
34
34
  $ cd Desktop
35
35
  ```
36
36
 
37
37
  Type in the following command to start the server.
38
38
 
39
- ```sh
39
+ ```console
40
40
  $ python3 -m http.server
41
41
  ```
42
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x_ite",
3
- "version": "8.6.17",
3
+ "version": "8.6.19",
4
4
  "description": "X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.",
5
5
  "homepage": "https://create3000.github.io/x_ite/",
6
6
  "author": "Holger Seelig <holger.seelig@gmail.com>",
@@ -71,13 +71,13 @@
71
71
  "opentype.js": "^1.3.4",
72
72
  "pako": "^2.1.0",
73
73
  "string-replace-webpack-plugin": "^0.1.3",
74
- "webpack": "^5.78.0",
75
- "webpack-cli": "^5.0.1",
74
+ "webpack": "^5.80.0",
75
+ "webpack-cli": "^5.0.2",
76
76
  "webpack-shell-plugin-next": "^2.3.1"
77
77
  },
78
78
  "scripts": {
79
79
  "test": "cd ../x_ite-tests && npm test",
80
- "lint": "jshint **",
80
+ "lint": "eslint src",
81
81
  "build": "make",
82
82
  "-prebuild:js": "npm run lint"
83
83
  }
package/src/example.html CHANGED
@@ -16,6 +16,6 @@ x3d-canvas {
16
16
  <x3d-canvas src="https://create3000.github.io/media/x_ite/info/info.x3d">
17
17
  <p>Your browser may not support all features required by X_ITE!</p>
18
18
  </x3d-canvas>
19
- <p>If local files are not loaded <a href="https://create3000.github.io/x_ite/#using-firefox-chrome-and-opera-with-local-files">consider setup a localhost server</a>.</p>
19
+ <a>If local files are not loaded <a href="https://create3000.github.io/x_ite/setup-a-localhost-server">consider setup a localhost server</a> or use <a href="https://create3000.github.io/x_ite/dom-integration">DOM Integration methods</a>.</p>
20
20
  </body>
21
21
  </html>
@@ -231,4 +231,4 @@ export default class Algorithm
231
231
 
232
232
  return first;
233
233
  }
234
- };
234
+ }
@@ -76,26 +76,28 @@ MergeSort .prototype =
76
76
  },
77
77
  merge: function (lo, m, hi)
78
78
  {
79
+ const { array, auxiliary, compare } = this;
80
+
79
81
  let i, j, k;
80
82
 
81
83
  i = 0, j = lo;
82
84
  // Copy first half of array a to auxiliary array b.
83
85
  while (j <= m)
84
- this .auxiliary [i++] = this .array [j++];
86
+ auxiliary [i++] = array [j++];
85
87
 
86
88
  i = 0; k = lo;
87
89
  // Copy back next-greatest element at each time.
88
90
  while (k < j && j <= hi)
89
91
  {
90
- if (this .compare (this .array [j], this .auxiliary [i]))
91
- this .array [k++] = this .array [j++];
92
+ if (compare (array [j], auxiliary [i]))
93
+ array [k++] = array [j++];
92
94
  else
93
- this .array [k++] = this .auxiliary [i++];
95
+ array [k++] = auxiliary [i++];
94
96
  }
95
97
 
96
98
  // Copy back remaining elements of first half (if any).
97
99
  while (k < j)
98
- this .array [k++] = this .auxiliary [i++];
100
+ array [k++] = auxiliary [i++];
99
101
  }
100
102
  };
101
103
 
@@ -68,6 +68,8 @@ PartialSort .prototype =
68
68
  },
69
69
  partialsort: function (lo, hi)
70
70
  {
71
+ const { array, compare } = this;
72
+
71
73
  let gap = this .last, i, last;
72
74
 
73
75
  if (gap > 1)
@@ -77,7 +79,7 @@ PartialSort .prototype =
77
79
  {
78
80
  const j = i + gap;
79
81
 
80
- if (this .compare (this .array [j], this .array [i]))
82
+ if (compare (array [j], array [i]))
81
83
  {
82
84
  const t = array [i];
83
85
  array [i] = array [j];
@@ -70,9 +70,7 @@ QuickSort .prototype =
70
70
  i = lo,
71
71
  j = hi;
72
72
 
73
- const
74
- array = this .array,
75
- compare = this .compare;
73
+ const { array, compare } = this;
76
74
 
77
75
  // Vergleichs­element x
78
76
  const x = array [(lo + hi) >>> 1];
@@ -48,7 +48,7 @@
48
48
  import Matrix3 from "../Numbers/Matrix3.js";
49
49
  import Vector2 from "../Numbers/Vector2.js";
50
50
 
51
- function Box2 (size, center)
51
+ function Box2 (/* size, center */)
52
52
  {
53
53
  this .matrix = new Matrix3 ();
54
54
 
@@ -50,7 +50,7 @@ import Matrix4 from "../Numbers/Matrix4.js";
50
50
  import Vector3 from "../Numbers/Vector3.js";
51
51
  import SAT from "../Algorithms/SAT.js";
52
52
 
53
- function Box3 (size, center)
53
+ function Box3 (/* size, center */)
54
54
  {
55
55
  this .matrix = new Matrix4 ();
56
56
 
@@ -46,6 +46,7 @@
46
46
  ******************************************************************************/
47
47
 
48
48
  import Vector3 from "./Vector3.js";
49
+ import Matrix3 from "./Matrix3.js";
49
50
  import Algorithm from "../Algorithm.js";
50
51
 
51
52
  function Quaternion (x, y, z, w)
@@ -137,7 +138,7 @@ Quaternion .prototype =
137
138
 
138
139
  return this;
139
140
  },
140
- getMatrix: function (matrix)
141
+ getMatrix: function (matrix = new Matrix3 ())
141
142
  {
142
143
  const { x, y, z, w } = this;
143
144
 
@@ -168,11 +169,11 @@ Quaternion .prototype =
168
169
  },
169
170
  isReal: function ()
170
171
  {
171
- return ! (this .x || this .y || this .z);
172
+ return !(this .x || this .y || this .z);
172
173
  },
173
174
  isImag: function ()
174
175
  {
175
- return ! this .w;
176
+ return !this .w;
176
177
  },
177
178
  equals: function (quat)
178
179
  {
@@ -48,6 +48,7 @@
48
48
  import Quaternion from "./Quaternion.js";
49
49
  import Vector3 from "./Vector3.js";
50
50
  import Vector4 from "./Vector4.js";
51
+ import Matrix3 from "./Matrix3.js";
51
52
  import Algorithm from "../Algorithm.js";
52
53
 
53
54
  const
@@ -280,7 +281,7 @@ Rotation4 .prototype =
280
281
  {
281
282
  this .set (vector .x, vector .y, vector .z, this [_angle]);
282
283
  },
283
- getAxis: function (axis)
284
+ getAxis: function (axis = new Vector3 (0, 0, 0))
284
285
  {
285
286
  return axis .set (this [_x], this [_y], this [_z]);
286
287
  },
@@ -290,7 +291,7 @@ Rotation4 .prototype =
290
291
  this .update ();
291
292
  return this;
292
293
  },
293
- getQuaternion: function (quaternion)
294
+ getQuaternion: function (quaternion = new Quaternion (0, 0, 0, 1))
294
295
  {
295
296
  return quaternion .assign (this [_quaternion]);
296
297
  },
@@ -300,7 +301,7 @@ Rotation4 .prototype =
300
301
  this .update ();
301
302
  return this;
302
303
  },
303
- getMatrix: function (matrix)
304
+ getMatrix: function (matrix = new Matrix3 ())
304
305
  {
305
306
  return this [_quaternion] .getMatrix (matrix);
306
307
  },
@@ -64,7 +64,7 @@ const
64
64
  _childObjects = Symbol (),
65
65
  _initialized = Symbol (),
66
66
  _live = Symbol (),
67
- _set_live__ = Symbol ("X3DBaseNode.set_live__"),
67
+ _set_live__ = Symbol (),
68
68
  _cloneCount = Symbol ();
69
69
 
70
70
  function X3DBaseNode (executionContext)
@@ -245,22 +245,15 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
245
245
  {
246
246
  return new (this .constructor) (executionContext || this [_executionContext]);
247
247
  },
248
- setup: (function ()
248
+ setup: function ()
249
249
  {
250
- const attributes = { value: Function .prototype, enumerable: false };
251
-
252
- return function ()
253
- {
254
- Object .defineProperty (this, "setup", attributes);
255
-
256
- for (const field of this [_fields])
257
- field .setTainted (false);
250
+ for (const field of this [_fields])
251
+ field .setTainted (false);
258
252
 
259
- this .initialize ();
253
+ this .initialize ();
260
254
 
261
- this [_initialized] = true;
262
- };
263
- })(),
255
+ this [_initialized] = true;
256
+ },
264
257
  initialize: function ()
265
258
  { },
266
259
  isInitialized: function ()
@@ -313,10 +306,6 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
313
306
  {
314
307
  return this [_fieldDefinitions];
315
308
  },
316
- getFieldsAreEnumerable: function ()
317
- {
318
- return false;
319
- },
320
309
  addField: function (fieldDefinition)
321
310
  {
322
311
  const
@@ -336,7 +325,7 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
336
325
  {
337
326
  get: function () { return field; },
338
327
  set: function (value) { field .setValue (value); },
339
- enumerable: this .getFieldsAreEnumerable (),
328
+ enumerable: false,
340
329
  configurable: true, // false : non deletable
341
330
  });
342
331
 
@@ -520,10 +509,6 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
520
509
  {
521
510
  return this [_fields];
522
511
  },
523
- getSourceText: function ()
524
- {
525
- return null;
526
- },
527
512
  hasRoutes: function ()
528
513
  {
529
514
  /// Returns true if there are any routes from or to fields of this node otherwise false.
@@ -605,7 +590,7 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
605
590
  for (const field of this [_childObjects])
606
591
  field .dispose ();
607
592
 
608
- for (const field of this .getFields ())
593
+ for (const field of this [_fields])
609
594
  field .dispose ();
610
595
 
611
596
  X3DEventObject .prototype .dispose .call (this);
@@ -48,7 +48,7 @@
48
48
  import X3DChildObject from "./X3DChildObject.js";
49
49
  import Events from "./Events.js";
50
50
 
51
- const _browser = Symbol .for ("X3DEventObject.browser");
51
+ const _browser = Symbol .for ("X_ITE.X3DEventObject.browser");
52
52
 
53
53
  function X3DEventObject (browser)
54
54
  {
@@ -66,6 +66,7 @@ X3DEventObject .prototype = Object .assign (Object .create (X3DChildObject .prot
66
66
  },
67
67
  getExtendedEventHandling: function ()
68
68
  {
69
+ // Whether initializeOnly field are treated like inputOnly and inputOutput fields.
69
70
  return true;
70
71
  },
71
72
  addEvent: function (field)
@@ -83,15 +84,15 @@ X3DEventObject .prototype = Object .assign (Object .create (X3DChildObject .prot
83
84
 
84
85
  // Register for processEvent
85
86
 
86
- browser .addBrowserEvent ();
87
87
  browser .addTaintedField (field, event);
88
+ browser .addBrowserEvent ();
88
89
 
89
90
  // Register for eventsProcessed
90
91
 
91
92
  if (this .isTainted ())
92
93
  return;
93
94
 
94
- if (field .isInput () || (this .getExtendedEventHandling () && ! field .isOutput ()))
95
+ if (field .isInput () || (this .getExtendedEventHandling () && field .isInitializable ()))
95
96
  {
96
97
  this .addNodeEvent ();
97
98
  }
@@ -61,15 +61,13 @@ const
61
61
  _inputRoutes = Symbol (),
62
62
  _outputRoutes = Symbol (),
63
63
  _routeCallbacks = Symbol (),
64
- _uniformLocation = Symbol .for ("X3DField.uniformLocation");
64
+ _uniformLocation = Symbol .for ("X_ITE.X3DField.uniformLocation");
65
65
 
66
66
  function X3DField (value)
67
67
  {
68
68
  X3DChildObject .call (this);
69
69
 
70
70
  this [_value] = value;
71
-
72
- return this;
73
71
  }
74
72
 
75
73
  X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype),
@@ -78,7 +76,6 @@ X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype)
78
76
  [_value]: null,
79
77
  [_accessType]: X3DConstants .initializeOnly,
80
78
  [_unit]: null,
81
- [_uniformLocation]: null,
82
79
  [_references]: new Set (),
83
80
  [_referencesCallbacks]: new Map (),
84
81
  [_fieldInterests]: new Set (),
@@ -86,6 +83,7 @@ X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype)
86
83
  [_inputRoutes]: new Set (),
87
84
  [_outputRoutes]: new Set (),
88
85
  [_routeCallbacks]: new Map (),
86
+ [_uniformLocation]: null,
89
87
  create: function ()
90
88
  {
91
89
  return new (this .constructor) ();
@@ -367,32 +365,31 @@ X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype)
367
365
  if (field !== this)
368
366
  this .set (field .getValue (), field .length);
369
367
 
370
- // Process interests
368
+ // Process interests.
371
369
 
372
370
  this .processInterests ();
373
371
 
374
- // Process routes
372
+ // Process routes.
375
373
 
376
374
  let first = true;
377
375
 
378
- if (this [_fieldInterests] .size)
376
+ for (const fieldInterest of this [_fieldInterests])
379
377
  {
380
- for (const fieldInterest of this [_fieldInterests] .values ())
378
+ if (first)
379
+ {
380
+ first = false;
381
+ fieldInterest .addEventObject (this, event);
382
+ }
383
+ else
381
384
  {
382
- if (first)
383
- {
384
- first = false;
385
- fieldInterest .addEventObject (this, event);
386
- }
387
- else
388
- fieldInterest .addEventObject (this, Events .copy (event));
385
+ fieldInterest .addEventObject (this, Events .copy (event));
389
386
  }
390
387
  }
391
388
 
392
389
  if (first)
393
390
  Events .push (event);
394
391
 
395
- // Process field callbacks
392
+ // Process field callbacks.
396
393
 
397
394
  if (this [_fieldCallbacks] .size)
398
395
  {
@@ -403,16 +400,18 @@ X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype)
403
400
  })(),
404
401
  addCloneCount: Function .prototype,
405
402
  removeCloneCount: Function .prototype,
406
- valueOf: function ()
407
- {
408
- return this;
409
- },
410
403
  fromString: function (string, scene)
411
404
  {
412
405
  // Function will be overridden in VRMLParser.
413
406
  },
414
407
  dispose: function ()
415
408
  {
409
+ this [_references] .clear ();
410
+ this [_referencesCallbacks] .clear ();
411
+ this [_fieldInterests] .clear ();
412
+ this [_fieldCallbacks] .clear ();
413
+ this [_routeCallbacks] .clear ();
414
+
416
415
  for (const route of new Set (this [_inputRoutes]))
417
416
  route .dispose ();
418
417
 
@@ -183,7 +183,11 @@ X3DObject .prototype =
183
183
  {
184
184
  generator .string = "[object " + this .getTypeName () + "]";
185
185
  },
186
- dispose: function () { },
186
+ dispose: function ()
187
+ {
188
+ this [_interests] .clear ();
189
+ this [_userData] .clear ();
190
+ },
187
191
  };
188
192
 
189
193
  for (const key of Reflect .ownKeys (X3DObject .prototype))
@@ -188,7 +188,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
188
188
 
189
189
  for (let i = 0; i < length; ++ i)
190
190
  {
191
- if (! a [i] .equals (b [i]))
191
+ if (!a [i] .equals (b [i]))
192
192
  return false;
193
193
  }
194
194
 
@@ -361,7 +361,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
361
361
  {
362
362
  const current = values [i];
363
363
 
364
- if (! value (current .valueOf ()))
364
+ if (!value (current .valueOf ()))
365
365
  {
366
366
  const tmp = values [first];
367
367
 
@@ -385,7 +385,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
385
385
  {
386
386
  const current = values [i];
387
387
 
388
- if (! current .equals (value))
388
+ if (!current .equals (value))
389
389
  {
390
390
  const tmp = values [first];
391
391
 
@@ -413,25 +413,26 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
413
413
 
414
414
  return values .map (function (value) { return value .valueOf () });
415
415
  },
416
- resize: function (size, value, silent)
416
+ resize: function (size, value, silently)
417
417
  {
418
418
  const
419
419
  target = this [_target],
420
- array = target .getValue ();
420
+ array = target .getValue (),
421
+ length = array .length;
421
422
 
422
- if (size < array .length)
423
+ if (size < length)
423
424
  {
424
- for (let i = size, length = array .length; i < length; ++ i)
425
+ for (let i = size; i < length; ++ i)
425
426
  target .removeChildObject (array [i]);
426
427
 
427
428
  array .length = size;
428
429
 
429
- if (! silent)
430
+ if (!silently)
430
431
  target .addEvent ();
431
432
  }
432
- else if (size > array .length)
433
+ else if (size > length)
433
434
  {
434
- for (let i = array .length; i < size; ++ i)
435
+ for (let i = length; i < size; ++ i)
435
436
  {
436
437
  const field = new (target .getSingleType ()) ();
437
438
 
@@ -442,7 +443,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
442
443
  array .push (field);
443
444
  }
444
445
 
445
- if (! silent)
446
+ if (!silently)
446
447
  target .addEvent ();
447
448
  }
448
449
  },
@@ -603,7 +603,7 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
603
603
 
604
604
  return values .slice ();
605
605
  },
606
- resize: function (newLength, value, silent)
606
+ resize: function (newLength, value, silently)
607
607
  {
608
608
  const
609
609
  target = this [_target],
@@ -619,7 +619,7 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
619
619
  if (components > 1)
620
620
  target [_cache] .length = newLength;
621
621
 
622
- if (!silent)
622
+ if (!silently)
623
623
  target .addEvent ();
624
624
  }
625
625
  else if (newLength > length)
@@ -644,7 +644,7 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
644
644
  }
645
645
  }
646
646
 
647
- if (!silent)
647
+ if (!silently)
648
648
  target .addEvent ();
649
649
  }
650
650
 
@@ -227,7 +227,7 @@ const Context =
227
227
  }
228
228
  };
229
229
 
230
- setTimeout (check, 0);
230
+ setTimeout (check);
231
231
  });
232
232
  },
233
233
  getBufferSubDataAsync: async function (target, buffer, srcByteOffset, dstBuffer, /* optional */ dstOffset, /* optional */ length)
@@ -449,7 +449,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
449
449
  {
450
450
  this .tapedTwice = true;
451
451
 
452
- setTimeout (function () { this .tapedTwice = false; } .bind (this), 300);
452
+ setTimeout (() => this .tapedTwice = false, 300);
453
453
  }
454
454
 
455
455
  break;
@@ -102,7 +102,6 @@ X3DNetworkingContext .prototype =
102
102
 
103
103
  this [_defaultScene] .setPrivate (true);
104
104
  this [_defaultScene] .setLive (true);
105
- this [_defaultScene] .setup ();
106
105
 
107
106
  this .getDefaultScene = function () { return this [_defaultScene]; };
108
107
 
@@ -110,15 +109,18 @@ X3DNetworkingContext .prototype =
110
109
 
111
110
  return this [_defaultScene];
112
111
  },
112
+ getBrowserLoading: function ()
113
+ {
114
+ return this [_loading];
115
+ },
113
116
  setBrowserLoading: function (value)
114
117
  {
115
118
  this [_loading] = value;
116
119
 
117
- this .setLoadCount (0);
118
-
119
120
  if (value)
120
121
  {
121
- this .resetLoadCount ();
122
+ if (!this [_loadingObjects] .has (this))
123
+ this .resetLoadCount ();
122
124
 
123
125
  this .getShadow () .find (".x_ite-private-world-info") .remove ();
124
126
 
@@ -138,9 +140,9 @@ X3DNetworkingContext .prototype =
138
140
  }
139
141
  }
140
142
  },
141
- getLoading: function ()
143
+ getLoadingObjects: function ()
142
144
  {
143
- return this [_loading];
145
+ return this [_loadingObjects];
144
146
  },
145
147
  addLoadingObject: function (object)
146
148
  {
@@ -162,6 +164,11 @@ X3DNetworkingContext .prototype =
162
164
  this [_loadingObjects] .delete (object);
163
165
 
164
166
  this .setLoadCount (this [_loadingObjects] .size);
167
+ this .setCursor (this .getCursor ());
168
+ },
169
+ getDisplayLoadCount: function ()
170
+ {
171
+ return [... this [_loadingObjects]] .reduce ((v, o) => v + !(o .isPrivate ?.() ?? true), 0);
165
172
  },
166
173
  setLoadCount: function (value)
167
174
  {
@@ -180,9 +187,7 @@ X3DNetworkingContext .prototype =
180
187
  },
181
188
  [_set_loadCount]: function ()
182
189
  {
183
- const loadingDisplay = [... this [_loadingObjects]]
184
- .filter (o => o .isPrivate)
185
- .reduce ((v, o) => v + !o .isPrivate (), 0);
190
+ const loadingDisplay = this .getDisplayLoadCount ();
186
191
 
187
192
  if (this ._loadCount .getValue () || this [_loading])
188
193
  {
@@ -135,9 +135,9 @@ X3DPointingDeviceSensorContext .prototype =
135
135
  break;
136
136
  default:
137
137
  {
138
- if (this ._loadCount .getValue ())
138
+ if (this .getDisplayLoadCount ())
139
139
  div .css ("cursor", "wait");
140
- else if (this [_pointingDevice] && this [_pointingDevice] .isOver)
140
+ else if (this [_pointingDevice] ?.isOver)
141
141
  div .css ("cursor", "pointer");
142
142
  else
143
143
  div .css ("cursor", "default");
@@ -45,4 +45,4 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- export default "8.6.17";
48
+ export default "8.6.19";