x_ite 8.11.6 → 8.11.7

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 (57) 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 +25 -25
  6. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  7. package/dist/assets/components/DIS.js +13 -13
  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 -33
  14. package/dist/assets/components/Geospatial.min.js +1 -1
  15. package/dist/assets/components/HAnim.js +23 -23
  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 +26 -26
  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 -23
  24. package/dist/assets/components/ParticleSystems.min.js +1 -1
  25. package/dist/assets/components/Picking.js +18 -18
  26. package/dist/assets/components/Picking.min.js +1 -1
  27. package/dist/assets/components/RigidBodyPhysics.js +17 -17
  28. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  29. package/dist/assets/components/Scripting.js +37 -37
  30. package/dist/assets/components/Scripting.min.js +1 -1
  31. package/dist/assets/components/Text.js +24 -24
  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 +30 -30
  36. package/dist/assets/components/Texturing3D.min.js +1 -1
  37. package/dist/assets/components/VolumeRendering.js +18 -18
  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/x_ite.css +1 -1
  42. package/dist/x_ite.js +91 -78
  43. package/dist/x_ite.min.js +1 -1
  44. package/dist/x_ite.zip +0 -0
  45. package/docs/_config.yml +2 -2
  46. package/docs/_posts/features.md +1 -1
  47. package/package.json +1 -1
  48. package/src/lib/jquery.js +10 -3
  49. package/src/x_ite/Browser/Core/Context.js +1 -1
  50. package/src/x_ite/Browser/VERSION.js +1 -1
  51. package/src/x_ite/Browser/X3DBrowserContext.js +3 -3
  52. package/src/x_ite/Components/Texturing/ImageTexture.js +8 -8
  53. package/src/x_ite/InputOutput/FileLoader.js +5 -1
  54. package/src/x_ite/Parser/GoldenGate.js +1 -1
  55. package/src/x_ite/Parser/VRMLParser.js +5 -3
  56. package/src/x_ite.html +12 -1
  57. package/x_ite.min.html +12 -1
package/dist/x_ite.zip CHANGED
Binary file
package/docs/_config.yml CHANGED
@@ -20,8 +20,8 @@ timezone:
20
20
  # ↓ --------------------------
21
21
 
22
22
  title: X_ITE X3D Browser # the main title
23
- version: 8.11.6 # x_ite latest version
24
- size: 279 # size in kb
23
+ version: 8.11.7 # x_ite latest version
24
+ size: 280 # size in kb
25
25
  x3d_latest_version: 4.0 # x3d latest version
26
26
 
27
27
  tagline: Step Into The Future # it will display as the sub-title
@@ -15,7 +15,7 @@ Runs completely standalone, ie. there are no other library dependencies. You jus
15
15
 
16
16
  Competitive performance for most frequently used functions and nodes. All function within X_ITE are optimized to give your the best performance that JavaScript can offer.
17
17
 
18
- The X_ITE package is optimized in size with Terser to achieve the smallest size we can reach. **X_ITE core component has only {{ site.size }}kB in size minified and compressed.**
18
+ The X_ITE package is optimized in size with Terser to achieve the smallest size we can reach. **X_ITE core module has only {{ site.size }}kB in size minified and compressed**, all other modules are loaded on demand.
19
19
 
20
20
  X_ITE is designed for optimal performance with event driven programming. The flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other scripts.
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x_ite",
3
- "version": "8.11.6",
3
+ "version": "8.11.7",
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>",
package/src/lib/jquery.js CHANGED
@@ -1,11 +1,18 @@
1
1
  Object .assign ($,
2
2
  {
3
+ removeBOM (input)
4
+ {
5
+ if (input .startsWith (""))
6
+ input = input .substring (3);
7
+
8
+ return input;
9
+ },
3
10
  decodeText (input)
4
11
  {
5
- if (typeof input === "string")
6
- return input;
12
+ if (typeof input !== "string")
13
+ input = new TextDecoder () .decode (input);
7
14
 
8
- return new TextDecoder () .decode (input);
15
+ return $.removeBOM (input);
9
16
  },
10
17
  ungzip (arrayBuffer)
11
18
  {
@@ -221,7 +221,7 @@ const Context =
221
221
  {
222
222
  case this .WAIT_FAILED:
223
223
  {
224
- reject ();
224
+ reject (new Error ("clientWaitSync: WAIT_FAILED"));
225
225
  return;
226
226
  }
227
227
  case this .TIMEOUT_EXPIRED:
@@ -45,4 +45,4 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- export default "8.11.6";
48
+ export default "8.11.7";
@@ -305,15 +305,15 @@ Object .assign (Object .setPrototypeOf (X3DBrowserContext .prototype, X3DBaseNod
305
305
 
306
306
  this [_world] .traverse (TraverseType .DISPLAY);
307
307
 
308
+ this .addTaintedField (this ._finishedEvents);
309
+ this [_processEvents] ();
310
+
308
311
  this .getFrameBuffer () .blit ();
309
312
 
310
313
  this [_displayTime] .stop ();
311
314
 
312
315
  // Finish
313
316
 
314
- this .addTaintedField (this ._finishedEvents);
315
- this [_processEvents] ();
316
-
317
317
  this [_browserTime] .stop ();
318
318
  this [_systemTime] .start ();
319
319
  },
@@ -195,7 +195,7 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, X3DTexture2DNod
195
195
  this .setError ({ type: error .message });
196
196
  }
197
197
  },
198
- getImageData: async function (image)
198
+ getImageData: async function (image, colorspace = true)
199
199
  {
200
200
  const
201
201
  gl = this .getBrowser () .getContext (),
@@ -203,13 +203,13 @@ Object .assign (Object .setPrototypeOf (ImageTexture .prototype, X3DTexture2DNod
203
203
  texture = gl .createTexture (),
204
204
  data = new Uint8Array (image .width * image .height * 4);
205
205
 
206
- gl .bindFramebuffer (gl.FRAMEBUFFER, framebuffer);
207
- gl .bindTexture (gl.TEXTURE_2D, texture);
208
- gl .framebufferTexture2D (gl.FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .TEXTURE_2D, texture, 0);
209
- //gl .pixelStorei (gl .UNPACK_COLORSPACE_CONVERSION_WEBGL, colorspace ? gl .BROWSER_DEFAULT_WEBGL : gl .NONE);
210
- gl .texImage2D (gl .TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
211
- //gl .pixelStorei (gl .UNPACK_COLORSPACE_CONVERSION_WEBGL, gl .BROWSER_DEFAULT_WEBGL);
212
- await gl .readPixelsAsync (0, 0, image .width, image .height, gl.RGBA, gl.UNSIGNED_BYTE, data);
206
+ gl .bindFramebuffer (gl .FRAMEBUFFER, framebuffer);
207
+ gl .bindTexture (gl .TEXTURE_2D, texture);
208
+ gl .pixelStorei (gl .UNPACK_COLORSPACE_CONVERSION_WEBGL, colorspace ? gl .BROWSER_DEFAULT_WEBGL : gl .NONE);
209
+ gl .texImage2D (gl .TEXTURE_2D, 0, gl .RGBA, gl .RGBA, gl .UNSIGNED_BYTE, image);
210
+ gl .pixelStorei (gl .UNPACK_COLORSPACE_CONVERSION_WEBGL, gl .BROWSER_DEFAULT_WEBGL);
211
+ gl .framebufferTexture2D (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .TEXTURE_2D, texture, 0);
212
+ await gl .readPixelsAsync (0, 0, image .width, image .height, gl .RGBA, gl .UNSIGNED_BYTE, data);
213
213
  gl .deleteFramebuffer (framebuffer);
214
214
  gl .deleteTexture (texture);
215
215
 
@@ -235,7 +235,7 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, X3DObject .protot
235
235
  {
236
236
  //const mimeType = result [1];
237
237
 
238
- // ??? If called from loadURL and mime type is text/html do a window.open or window.location=URL and return; ???
238
+ // Decode base64 or unescape.
239
239
 
240
240
  let data = result [4];
241
241
 
@@ -244,6 +244,10 @@ Object .assign (Object .setPrototypeOf (FileLoader .prototype, X3DObject .protot
244
244
  else
245
245
  data = unescape (data); // Don't use decodeURIComponent!
246
246
 
247
+ // Remove BOM
248
+
249
+ data = $.removeBOM (data);
250
+
247
251
  this .callback (data);
248
252
  return;
249
253
  }
@@ -77,7 +77,7 @@ Object .assign (Object .setPrototypeOf (GoldenGate .prototype, X3DParser .protot
77
77
  parser = new Parser (this .getScene ()),
78
78
  input = this .getInput (parser .getEncoding (), x3dSyntax);
79
79
 
80
- if (input === undefined)
80
+ if (Array .isArray (input) ? input .some (i => i === undefined) : input === undefined)
81
81
  continue;
82
82
 
83
83
  parser .setInput (input);
@@ -231,7 +231,9 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, X3DParser .protot
231
231
  {
232
232
  //console .error (error);
233
233
 
234
- const string = error .message;
234
+ const
235
+ string = error .message,
236
+ unexpected = this .lastIndex === this .input .length ? "Unexpected end of file. " : "";
235
237
 
236
238
  let
237
239
  rest = this .getLine (),
@@ -256,7 +258,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, X3DParser .protot
256
258
  + `${lastLine}\n`
257
259
  + `${line}\n`
258
260
  + `${Array (linePos) .join (" ")}^\n`
259
- + `${string}\n`
261
+ + `${unexpected}${string}\n`
260
262
  + `********************************************************************************\n`
261
263
  ;
262
264
 
@@ -280,7 +282,7 @@ Object .assign (Object .setPrototypeOf (VRMLParser .prototype, X3DParser .protot
280
282
  {
281
283
  let
282
284
  input = this .input,
283
- lastIndex = this .lastIndex,
285
+ lastIndex = Math .min (this .lastIndex, this .input .length - 1),
284
286
  line = "";
285
287
 
286
288
  if (lastIndex < input .length && (input [lastIndex] !== "\n" || input [lastIndex] !== "\r"))
package/src/x_ite.html CHANGED
@@ -142,7 +142,18 @@ X3D (() =>
142
142
  }
143
143
  });
144
144
 
145
- $("#website") .attr ("href", location .origin + ":4000/x_ite/")
145
+ $("#website") .attr ("href", location .origin + ":4000/x_ite/");
146
+
147
+ // (async () =>
148
+ // {
149
+ // const
150
+ // response = await fetch (new URL ("tests/error_src.txt", location)),
151
+ // text = await response .text ();
152
+
153
+ // console .log (text.length);
154
+
155
+ // $("#browser") .attr ("src", text);
156
+ // })();
146
157
  });
147
158
  </script>
148
159
  <style>
package/x_ite.min.html CHANGED
@@ -123,7 +123,18 @@ X3D (() =>
123
123
  }
124
124
  });
125
125
 
126
- $("#website") .attr ("href", location .origin + ":4000/x_ite/")
126
+ $("#website") .attr ("href", location .origin + ":4000/x_ite/");
127
+
128
+ // (async () =>
129
+ // {
130
+ // const
131
+ // response = await fetch (new URL ("src/tests/error_src.txt", location)),
132
+ // text = await response .text ();
133
+
134
+ // console .log (text.length);
135
+
136
+ // $("#browser") .attr ("src", text);
137
+ // })();
127
138
  });
128
139
  </script>
129
140
  <style>