x_ite 8.6.19 → 8.6.22

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 (104) hide show
  1. package/Makefile +1 -4
  2. package/README.md +1 -1
  3. package/build/bin/components.js +45 -0
  4. package/dist/assets/components/Annotation.js +13 -13
  5. package/dist/assets/components/Annotation.min.js +1 -1
  6. package/dist/assets/components/CADGeometry.js +13 -13
  7. package/dist/assets/components/CADGeometry.min.js +1 -1
  8. package/dist/assets/components/CubeMapTexturing.js +25 -25
  9. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  10. package/dist/assets/components/DIS.js +13 -13
  11. package/dist/assets/components/DIS.min.js +1 -1
  12. package/dist/assets/components/EventUtilities.js +9 -9
  13. package/dist/assets/components/EventUtilities.min.js +1 -1
  14. package/dist/assets/components/Geometry2D.js +19 -19
  15. package/dist/assets/components/Geometry2D.min.js +1 -1
  16. package/dist/assets/components/Geospatial.js +33 -33
  17. package/dist/assets/components/Geospatial.min.js +1 -1
  18. package/dist/assets/components/HAnim.js +18 -18
  19. package/dist/assets/components/HAnim.min.js +1 -1
  20. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  21. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  22. package/dist/assets/components/Layout.js +27 -27
  23. package/dist/assets/components/Layout.min.js +1 -1
  24. package/dist/assets/components/NURBS.js +24 -24
  25. package/dist/assets/components/NURBS.min.js +1 -1
  26. package/dist/assets/components/ParticleSystems.js +22 -22
  27. package/dist/assets/components/ParticleSystems.min.js +1 -1
  28. package/dist/assets/components/Picking.js +18 -18
  29. package/dist/assets/components/Picking.min.js +1 -1
  30. package/dist/assets/components/RigidBodyPhysics.js +18 -18
  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/TextureProjector.js +14 -14
  37. package/dist/assets/components/TextureProjector.min.js +1 -1
  38. package/dist/assets/components/Texturing3D.js +30 -30
  39. package/dist/assets/components/Texturing3D.min.js +1 -1
  40. package/dist/assets/components/VolumeRendering.js +19 -19
  41. package/dist/assets/components/VolumeRendering.min.js +1 -1
  42. package/dist/assets/components/X_ITE.js +9 -9
  43. package/dist/assets/components/X_ITE.min.js +1 -1
  44. package/dist/x_ite.css +1 -1
  45. package/dist/x_ite.js +796 -654
  46. package/dist/x_ite.min.js +1 -1
  47. package/dist/x_ite.zip +0 -0
  48. package/docs/_config.yml +2 -2
  49. package/docs/_posts/dom-integration.md +14 -12
  50. package/docs/_posts/getting-started.md +31 -29
  51. package/docs/_posts/reference/ecmascript-object-and-function-definitions.md +1 -1
  52. package/docs/_posts/reference/scene-services.md +6 -3
  53. package/docs/_posts/report-a-bug.md +5 -3
  54. package/docs/_posts/setup-a-localhost-server.md +7 -7
  55. package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +1 -1
  56. package/docs/_tabs/playground.html +31 -28
  57. package/package.json +1 -1
  58. package/src/locale/de.po.js +9 -0
  59. package/src/locale/fr.po.js +31 -25
  60. package/src/tests.js +1 -0
  61. package/src/x_ite/Base/X3DBaseNode.js +2 -12
  62. package/src/x_ite/Base/X3DInfoArray.js +0 -2
  63. package/src/x_ite/Base/X3DObjectArrayField.js +0 -2
  64. package/src/x_ite/Base/X3DTypedArrayField.js +0 -2
  65. package/src/x_ite/Browser/Core/BrowserTimings.js +147 -67
  66. package/src/x_ite/Browser/Core/ContextMenu.js +2 -2
  67. package/src/x_ite/Browser/Core/X3DCoreContext.js +6 -2
  68. package/src/x_ite/Browser/Navigation/ExamineViewer.js +3 -0
  69. package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -0
  70. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +13 -5
  71. package/src/x_ite/Browser/VERSION.js +1 -1
  72. package/src/x_ite/Browser/X3DBrowser.js +14 -22
  73. package/src/x_ite/Browser/X3DBrowserContext.js +0 -1
  74. package/src/x_ite/Components/Core/X3DNode.js +40 -9
  75. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +5 -5
  76. package/src/x_ite/Configuration/ComponentInfo.js +2 -1
  77. package/src/x_ite/Configuration/ProfileInfo.js +1 -0
  78. package/src/x_ite/Configuration/UnitInfo.js +3 -5
  79. package/src/x_ite/Execution/BindableList.js +34 -27
  80. package/src/x_ite/Execution/BindableStack.js +15 -17
  81. package/src/x_ite/Execution/X3DExecutionContext.js +11 -21
  82. package/src/x_ite/Execution/X3DExportedNode.js +1 -3
  83. package/src/x_ite/Execution/X3DImportedNode.js +2 -6
  84. package/src/x_ite/Execution/X3DScene.js +30 -28
  85. package/src/x_ite/Fields/ArrayFields.js +4 -4
  86. package/src/x_ite/Fields/SFColor.js +0 -3
  87. package/src/x_ite/Fields/SFColorRGBA.js +0 -4
  88. package/src/x_ite/Fields/SFImage.js +0 -4
  89. package/src/x_ite/Fields/SFMatrix3.js +0 -1
  90. package/src/x_ite/Fields/SFMatrix4.js +0 -1
  91. package/src/x_ite/Fields/SFRotation.js +0 -4
  92. package/src/x_ite/Fields/SFString.js +7 -4
  93. package/src/x_ite/Fields/SFVec2.js +0 -2
  94. package/src/x_ite/Fields/SFVec3.js +0 -3
  95. package/src/x_ite/Fields/SFVec4.js +0 -4
  96. package/src/x_ite/InputOutput/FileLoader.js +13 -18
  97. package/src/x_ite/InputOutput/Generator.js +86 -16
  98. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +6 -11
  99. package/src/x_ite/Prototype/X3DProtoDeclaration.js +5 -8
  100. package/src/x_ite/Routing/X3DRoute.js +1 -5
  101. package/src/x_ite/X3DCanvasElement.js +2 -0
  102. package/src/x_ite.css +5 -1
  103. package/src/x_ite.html +4 -36
  104. package/x_ite.min.html +4 -36
@@ -165,7 +165,7 @@ X3DExternProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoD
165
165
  },
166
166
  setError: function (error)
167
167
  {
168
- console .error ("Error loading extern prototype:", error);
168
+ console .error (`Error loading extern prototype '${this .getName ()}':`, error);
169
169
 
170
170
  this [_scene] = this .getBrowser () .getPrivateScene ();
171
171
 
@@ -267,7 +267,7 @@ X3DExternProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoD
267
267
  generator .string += "name='";
268
268
  generator .string += generator .XMLEncode (field .getName ());
269
269
  generator .string += "'";
270
- generator .string += "/>";
270
+ generator .string += generator .closingTags ? "></field>" : "/>";
271
271
  generator .string += generator .TidyBreak ();
272
272
  }
273
273
 
@@ -410,37 +410,32 @@ for (const key of Reflect .ownKeys (X3DExternProtoDeclaration .prototype))
410
410
 
411
411
  Object .defineProperty (X3DExternProtoDeclaration .prototype, "name",
412
412
  {
413
- get: function () { return this .getName (); },
413
+ get: X3DExternProtoDeclaration .prototype .getName,
414
414
  enumerable: true,
415
- configurable: false
416
415
  });
417
416
 
418
417
  Object .defineProperty (X3DExternProtoDeclaration .prototype, "fields",
419
418
  {
420
- get: function () { return this .getFieldDefinitions (); },
419
+ get: X3DExternProtoDeclaration .prototype .getFieldDefinitions,
421
420
  enumerable: true,
422
- configurable: false
423
421
  });
424
422
 
425
423
  Object .defineProperty (X3DExternProtoDeclaration .prototype, "isExternProto",
426
424
  {
427
- get: function () { return true; },
425
+ value: true,
428
426
  enumerable: true,
429
- configurable: false
430
427
  });
431
428
 
432
429
  Object .defineProperty (X3DExternProtoDeclaration .prototype, "urls",
433
430
  {
434
431
  get: function () { return this ._url; },
435
432
  enumerable: true,
436
- configurable: false
437
433
  });
438
434
 
439
435
  Object .defineProperty (X3DExternProtoDeclaration .prototype, "loadState",
440
436
  {
441
- get: function () { return this .checkLoadState (); },
437
+ get: X3DExternProtoDeclaration .prototype .checkLoadState,
442
438
  enumerable: true,
443
- configurable: false
444
439
  });
445
440
 
446
441
  export default X3DExternProtoDeclaration;
@@ -222,7 +222,7 @@ X3DProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoDeclara
222
222
 
223
223
  if (field .isDefaultValue ())
224
224
  {
225
- generator .string += "/>";
225
+ generator .string += generator .closingTags ? "></field>" : "/>";
226
226
  generator .string += generator .TidyBreak ();
227
227
  }
228
228
  else
@@ -259,7 +259,7 @@ X3DProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoDeclara
259
259
  field .toXMLStream (generator);
260
260
 
261
261
  generator .string += "'";
262
- generator .string += "/>";
262
+ generator .string += generator .closingTags ? "></field>" : "/>";
263
263
  generator .string += generator .TidyBreak ();
264
264
  break;
265
265
  }
@@ -544,23 +544,20 @@ for (const key of Reflect .ownKeys (X3DProtoDeclaration .prototype))
544
544
 
545
545
  Object .defineProperty (X3DProtoDeclaration .prototype, "name",
546
546
  {
547
- get: function () { return this .getName (); },
547
+ get: X3DProtoDeclaration .prototype .getName,
548
548
  enumerable: true,
549
- configurable: false
550
549
  });
551
550
 
552
551
  Object .defineProperty (X3DProtoDeclaration .prototype, "fields",
553
552
  {
554
- get: function () { return this .getFieldDefinitions (); },
553
+ get: X3DProtoDeclaration .prototype .getFieldDefinitions,
555
554
  enumerable: true,
556
- configurable: false
557
555
  });
558
556
 
559
557
  Object .defineProperty (X3DProtoDeclaration .prototype, "isExternProto",
560
558
  {
561
- get: function () { return false; },
559
+ value: false,
562
560
  enumerable: true,
563
- configurable: false
564
561
  });
565
562
 
566
563
  export default X3DProtoDeclaration;
@@ -170,7 +170,7 @@ X3DRoute .prototype = Object .assign (Object .create (X3DObject .prototype),
170
170
 
171
171
  generator .string += generator .XMLEncode (this [_destinationField] .getName ());
172
172
  generator .string += "'";
173
- generator .string += "/>";
173
+ generator .string += generator .closingTags ? "></ROUTE>" : "/>";
174
174
  },
175
175
  toJSONStream: function (generator)
176
176
  {
@@ -267,7 +267,6 @@ Object .defineProperty (X3DRoute .prototype, "sourceNode",
267
267
  return SFNodeCache .get (this [_sourceNode]);
268
268
  },
269
269
  enumerable: true,
270
- configurable: false
271
270
  });
272
271
 
273
272
  Object .defineProperty (X3DRoute .prototype, "sourceField",
@@ -277,7 +276,6 @@ Object .defineProperty (X3DRoute .prototype, "sourceField",
277
276
  return this [_sourceField] .getName ();
278
277
  },
279
278
  enumerable: true,
280
- configurable: false
281
279
  });
282
280
 
283
281
  Object .defineProperty (X3DRoute .prototype, "destinationNode",
@@ -287,7 +285,6 @@ Object .defineProperty (X3DRoute .prototype, "destinationNode",
287
285
  return SFNodeCache .get (this [_destinationNode]);
288
286
  },
289
287
  enumerable: true,
290
- configurable: false
291
288
  });
292
289
 
293
290
  Object .defineProperty (X3DRoute .prototype, "destinationField",
@@ -297,7 +294,6 @@ Object .defineProperty (X3DRoute .prototype, "destinationField",
297
294
  return this [_destinationField] .getName ();
298
295
  },
299
296
  enumerable: true,
300
- configurable: false
301
297
  });
302
298
 
303
299
  export default X3DRoute;
@@ -91,6 +91,8 @@ class X3DCanvasElement extends HTMLElement
91
91
  {
92
92
  return [
93
93
  "antialiased",
94
+ "baseURL",
95
+ "baseurl",
94
96
  "cache",
95
97
  "contentScale",
96
98
  "contentscale",
package/src/x_ite.css CHANGED
@@ -166,10 +166,14 @@ X3DCanvas > :not(.x_ite-private-browser, .x_ite-private-menu) {
166
166
  padding-right: 10px;
167
167
  }
168
168
 
169
- .x_ite-private-browser-timings tr.x_ite-private-more td {
169
+ .x_ite-private-browser-timings table.more tr.x_ite-private-more td {
170
170
  padding-bottom: 5px;
171
171
  }
172
172
 
173
+ .x_ite-private-browser-timings table.less tr.x_ite-private-more ~ tr {
174
+ display: none;
175
+ }
176
+
173
177
  .x_ite-private-browser-timings td {
174
178
  padding-bottom: 2px;
175
179
  }
package/src/x_ite.html CHANGED
@@ -149,39 +149,7 @@ X3D (function ()
149
149
  }
150
150
  });
151
151
 
152
- function sleep (duration)
153
- {
154
- return new Promise (function (resolve, reject)
155
- {
156
- setTimeout (resolve, duration);
157
- });
158
- }
159
-
160
- $("#bug") .on ("click", async () =>
161
- {
162
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/CubeMapTexturing/GeneratedCubeMapTexture/GeneratedCubeMapTexture.x3d"));
163
- await sleep (1000);
164
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/Lighting/DirectionalLight/DirectionalLight.x3d"));
165
- await sleep (1000);
166
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/Lighting/Shadows/Shadows.x3d"));
167
- await sleep (1000);
168
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/Navigation/NavigationInfo/NavigationInfo.x3d"));
169
- await sleep (1000);
170
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/ParticleSystems/ParticleSystem/ParticleSystem.x3d"));
171
- await sleep (1000);
172
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/RigidBodyPhysics/CollidableShape/CollidableShape.x3d"));
173
- await sleep (1000);
174
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/RigidBodyPhysics/RigidBody/RigidBody.x3d"));
175
- await sleep (1000);
176
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/RigidBodyPhysics/RigidBodyCollection/RigidBodyCollection.x3d"));
177
- await sleep (1000);
178
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/TextureProjector/TextureProjector/TextureProjector.x3d"));
179
- await sleep (1000);
180
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/Texturing/MultiTexture/MultiTexture.x3d"));
181
- await sleep (1000);
182
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/X3D/NYC/NYC.x3d"));
183
- await sleep (1000);
184
- });
152
+ $("#website") .attr ("href", location .origin + ":4000/x_ite/")
185
153
  });
186
154
  </script>
187
155
  <style>
@@ -434,7 +402,7 @@ main.color-management #browser {
434
402
  <main>
435
403
  <div>
436
404
  <form action="javascript:alert('form submitted')">
437
- <x3d-canvas id="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" onload="$('#file') .addClass ('loaded')" x-url='"tests/empty.x3dv"'>
405
+ <x3d-canvas id="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" onload="$('#file') .addClass ('loaded')" x-baseURL="tests/" x-src="lines.x3d">
438
406
  <p class="fallback">
439
407
  Sorry,<br/>
440
408
  it wasn't me!<br/>
@@ -450,10 +418,10 @@ main.color-management #browser {
450
418
  <button id="location-go" type="button">Load URL</button>
451
419
  </div>
452
420
  <div id="buttons">
453
- <a href="#" id="view-all">▣</a><a id="print-xml" href="#">XML</a><a id="print-vrml" href="#">VRML</a><a id="print-json" href="#">JSON</a><a href="../dist/example.html">example page</a><a href="tests/d3-x3d/">d3-x3d</a><a href="tests/dom-integration/">dom-integration</a><a href="tests/legacy/">legacy</a><a href="#" id="bug">▣</a>
421
+ <a href="#" id="view-all">▣</a><a id="print-xml" href="#">XML</a><a id="print-vrml" href="#">VRML</a><a id="print-json" href="#">JSON</a><a href="../dist/example.html">example page</a><a href="tests/d3-x3d/">d3-x3d</a><a href="tests/dom-integration/">dom-integration</a><a href="tests/legacy/">legacy</a>
454
422
  </div>
455
423
  <div id="links">
456
- <a href="../x_ite.min.html">x_ite.min.html</a><a href="https://rawgit.com/create3000/x_ite/main/x_ite.min.html">github</a>
424
+ <a href="../x_ite.min.html">x_ite.min.html</a><a href="https://rawgit.com/create3000/x_ite/main/x_ite.min.html">github</a><a id="website" target="_blank">website</a>
457
425
  </div>
458
426
  <div id="examples-box"></div>
459
427
  </div>
package/x_ite.min.html CHANGED
@@ -130,39 +130,7 @@ X3D (function ()
130
130
  }
131
131
  });
132
132
 
133
- function sleep (duration)
134
- {
135
- return new Promise (function (resolve, reject)
136
- {
137
- setTimeout (resolve, duration);
138
- });
139
- }
140
-
141
- $("#bug") .on ("click", async () =>
142
- {
143
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/CubeMapTexturing/GeneratedCubeMapTexture/GeneratedCubeMapTexture.x3d"));
144
- await sleep (1000);
145
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/Lighting/DirectionalLight/DirectionalLight.x3d"));
146
- await sleep (1000);
147
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/Lighting/Shadows/Shadows.x3d"));
148
- await sleep (1000);
149
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/Navigation/NavigationInfo/NavigationInfo.x3d"));
150
- await sleep (1000);
151
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/ParticleSystems/ParticleSystem/ParticleSystem.x3d"));
152
- await sleep (1000);
153
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/RigidBodyPhysics/CollidableShape/CollidableShape.x3d"));
154
- await sleep (1000);
155
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/RigidBodyPhysics/RigidBody/RigidBody.x3d"));
156
- await sleep (1000);
157
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/RigidBodyPhysics/RigidBodyCollection/RigidBodyCollection.x3d"));
158
- await sleep (1000);
159
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/TextureProjector/TextureProjector/TextureProjector.x3d"));
160
- await sleep (1000);
161
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/Texturing/MultiTexture/MultiTexture.x3d"));
162
- await sleep (1000);
163
- await Browser .loadURL (new X3D .MFString ("https://create3000.github.io/media/examples/X3D/NYC/NYC.x3d"));
164
- await sleep (1000);
165
- });
133
+ $("#website") .attr ("href", location .origin + ":4000/x_ite/")
166
134
  });
167
135
  </script>
168
136
  <style>
@@ -415,7 +383,7 @@ main.color-management #browser {
415
383
  <main>
416
384
  <div>
417
385
  <form action="javascript:alert('form submitted')">
418
- <x3d-canvas id="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" onload="$('#file') .addClass ('loaded')" x-url='"src/tests/empty.x3dv"'>
386
+ <x3d-canvas id="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" onload="$('#file') .addClass ('loaded')" x-baseURL="src/tests/" x-src="lines.x3d">
419
387
  <p class="fallback">
420
388
  Sorry,<br/>
421
389
  it wasn't me!<br/>
@@ -431,10 +399,10 @@ main.color-management #browser {
431
399
  <button id="location-go" type="button">Load URL</button>
432
400
  </div>
433
401
  <div id="buttons">
434
- <a href="#" id="view-all">▣</a><a id="print-xml" href="#">XML</a><a id="print-vrml" href="#">VRML</a><a id="print-json" href="#">JSON</a><a href="dist/example.html">example page</a><a href="src/tests/d3-x3d/">d3-x3d</a><a href="src/tests/dom-integration/">dom-integration</a><a href="src/tests/legacy/">legacy</a><a href="#" id="bug">▣</a>
402
+ <a href="#" id="view-all">▣</a><a id="print-xml" href="#">XML</a><a id="print-vrml" href="#">VRML</a><a id="print-json" href="#">JSON</a><a href="dist/example.html">example page</a><a href="src/tests/d3-x3d/">d3-x3d</a><a href="src/tests/dom-integration/">dom-integration</a><a href="src/tests/legacy/">legacy</a>
435
403
  </div>
436
404
  <div id="links" class="min-links">
437
- <a href="src/x_ite.html">src/x_ite.html</a><a href="https://rawgit.com/create3000/x_ite/main/x_ite.min.html">github</a>
405
+ <a href="src/x_ite.html">src/x_ite.html</a><a href="https://rawgit.com/create3000/x_ite/main/x_ite.min.html">github</a><a id="website" target="_blank">website</a>
438
406
  </div>
439
407
  <div id="examples-box"></div>
440
408
  </div>