x_ite 8.6.5 → 8.6.6

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 (56) 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 +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 -23
  24. package/dist/assets/components/ParticleSystems.min.js +1 -1
  25. package/dist/assets/components/Picking.js +19 -19
  26. package/dist/assets/components/Picking.min.js +1 -1
  27. package/dist/assets/components/RigidBodyPhysics.js +18 -18
  28. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  29. package/dist/assets/components/Scripting.js +28 -28
  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 +19 -19
  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 +440 -351
  43. package/dist/x_ite.min.js +1 -1
  44. package/dist/x_ite.zip +0 -0
  45. package/docs/_config.yml +1 -1
  46. package/docs/_posts/components/Navigation/NavigationInfo.md +8 -3
  47. package/docs/_posts/laboratory/x3d-file-converter.md +2 -0
  48. package/package.json +1 -1
  49. package/src/x_ite/Base/Events.js +10 -23
  50. package/src/x_ite/Base/X3DObject.js +29 -16
  51. package/src/x_ite/Browser/VERSION.js +1 -1
  52. package/src/x_ite/Components/Shape/Material.js +2 -2
  53. package/src/x_ite/Components/Shape/PhysicalMaterial.js +2 -2
  54. package/src/x_ite/Components/Shape/UnlitMaterial.js +2 -2
  55. package/src/x_ite/Components/Texturing/ImageTexture.js +3 -0
  56. package/src/x_ite/Parser/SVGParser.js +337 -251
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.5 # x_ite latest version
23
+ version: 8.6.6 # x_ite latest version
24
24
  size: 288 # size in kb
25
25
  x3d_latest_version: 4.0 # x3d latest version
26
26
 
@@ -36,13 +36,18 @@ Metadata are not part of the X3D world and not interpreted by the X3D browser, b
36
36
 
37
37
  Setting set_bind true makes this node active setting set_bind false makes this node inactive. Thus setting set_bind true/false will pop/push (enable/disable) this node.
38
38
 
39
- ### MFString [in, out] **type** [ "EXAMINE", "ANY" ] <small>["EXAMINE","WALK","FLY","LOOKAT","EXPLORE","ANY","NONE"]</small>
39
+ ### MFString [in, out] **type** [ "EXAMINE", "ANY" ] <small>["EXAMINE","WALK","FLY","PLANE_create3000.github.io","LOOKAT","EXPLORE","ANY","NONE"]</small>
40
40
 
41
- Enter one or more quoted SFString values: "EXAMINE" "WALK" "FLY" "LOOKAT" "EXPLORE" "ANY" "NONE".
41
+ Enter one or more quoted SFString values: "EXAMINE" "WALK" "FLY" "PLANE_create3000.github.io" "LOOKAT" "EXPLORE" "ANY" "NONE".
42
+
43
+ The PLANE viewer is primarily designed to use with OrthoViewpoint and 2D scenes. You can zoom, which will change the viewport size (center of zoom is mouse pointer), and you can move the scene along the viewport plane.
42
44
 
43
45
  #### Hints
44
46
 
45
- - For inspection of simple objects, usability often improves with type="EXAMINE" "ANY". Types WALK and FLY force strict camera-to-object collision detection. See Collision node for further details on camera-to-object collision detection. MFString arrays can have multiple values, so separate each individual string by quote marks "https://www.web3d.org" "https://www.web3d.org/about" "etc." ] Interchange profile hint: this field may be ignored, applying the default value regardless.
47
+ - For inspection of simple objects, usability often improves with type="EXAMINE" "ANY".
48
+ - Types WALK and FLY force strict camera-to-object collision detection.
49
+ - See Collision node for further details on camera-to-object collision detection.
50
+ - MFString arrays can have multiple values, so separate each individual string by quote marks "https://www.web3d.org" "https://www.web3d.org/about" "etc." ]
46
51
 
47
52
  ### MFFloat [in, out] **avatarSize** [ 0.25, 1.6, 0.75 ] <small>[0,∞)</small>
48
53
 
@@ -114,6 +114,8 @@ $(() =>
114
114
  url = URL .createObjectURL (file);
115
115
 
116
116
  Browser .endUpdate ();
117
+ Browser .setBrowserOption ("PrimitiveQuality", "HIGH");
118
+ Browser .setBrowserOption ("TextureQuality", "HIGH");
117
119
 
118
120
  await Browser .loadURL (new X3D .MFString (url));
119
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x_ite",
3
- "version": "8.6.5",
3
+ "version": "8.6.6",
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>",
@@ -45,20 +45,13 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- const _stack = Symbol ();
49
-
50
- function Events ()
51
- {
52
- this [_stack] = [ ];
53
- }
54
-
55
- Events .prototype =
48
+ const Events = Object .assign ([ ],
56
49
  {
57
50
  create: function (field)
58
51
  {
59
- if (this [_stack] .length)
52
+ if (this .length)
60
53
  {
61
- const event = this [_stack] .pop ();
54
+ const event = this .pop ();
62
55
 
63
56
  event .field = field;
64
57
  event .clear ();
@@ -74,9 +67,9 @@ Events .prototype =
74
67
  },
75
68
  copy: function (event)
76
69
  {
77
- if (this [_stack] .length)
70
+ if (this .length)
78
71
  {
79
- const copy = this [_stack] .pop ();
72
+ const copy = this .pop ();
80
73
 
81
74
  copy .field = event .field;
82
75
  copy .clear ();
@@ -95,19 +88,13 @@ Events .prototype =
95
88
 
96
89
  return copy;
97
90
  },
98
- push: function (event)
99
- {
100
- this [_stack] .push (event);
101
- },
102
91
  clear: function ()
103
92
  {
104
- this [_stack] .length = 0;
93
+ this .length = 0;
105
94
  },
106
- };
107
-
108
- for (const key of Reflect .ownKeys (Events .prototype))
109
- Object .defineProperty (Events .prototype, key, { enumerable: false });
95
+ });
110
96
 
111
- const events = new Events ();
97
+ for (const key of Reflect .ownKeys (Events))
98
+ Object .defineProperty (Events, key, { enumerable: false });
112
99
 
113
- export default events;
100
+ export default Events;
@@ -83,13 +83,16 @@ X3DObject .prototype =
83
83
  },
84
84
  getInterestId: function (callbackName, object)
85
85
  {
86
+ if (typeof callbackName === "symbol")
87
+ return X3DObject .getId (object) + ".Symbol(" + SymbolId (callbackName) + ")";
88
+
86
89
  return X3DObject .getId (object) + "." + String (callbackName);
87
90
  },
88
91
  hasInterest: function (callbackName, object)
89
92
  {
90
93
  return this [_interests] .has (this .getInterestId (callbackName, object));
91
94
  },
92
- addInterest: function (callbackName, object)
95
+ addInterest: function (callbackName, object, ... args)
93
96
  {
94
97
  if (this [_interests] === X3DObject .prototype [_interests])
95
98
  {
@@ -101,19 +104,7 @@ X3DObject .prototype =
101
104
  interestId = this .getInterestId (callbackName, object),
102
105
  callback = object [callbackName];
103
106
 
104
- if (arguments .length > 2)
105
- {
106
- const args = Array .prototype .slice .call (arguments, 2);
107
-
108
- args .unshift (object);
109
- args .push (this);
110
-
111
- this [_interests] .set (interestId, Function .prototype .bind .apply (callback, args));
112
- }
113
- else
114
- {
115
- this [_interests] .set (interestId, callback .bind (object, this));
116
- }
107
+ this [_interests] .set (interestId, callback .bind (object, ... args, this));
117
108
  },
118
109
  removeInterest: function (callbackName, object)
119
110
  {
@@ -185,9 +176,31 @@ X3DObject .prototype =
185
176
  for (const key of Reflect .ownKeys (X3DObject .prototype))
186
177
  Object .defineProperty (X3DObject .prototype, key, { enumerable: false });
187
178
 
188
- X3DObject .getId = (function ()
179
+ Object .assign (X3DObject,
180
+ {
181
+ getId: (function ()
182
+ {
183
+ const map = new WeakMap ();
184
+
185
+ let counter = 0;
186
+
187
+ return function (object)
188
+ {
189
+ const id = map .get (object);
190
+
191
+ if (id !== undefined)
192
+ return id;
193
+
194
+ map .set (object, ++ counter);
195
+
196
+ return counter;
197
+ };
198
+ })(),
199
+ });
200
+
201
+ const SymbolId = (function ()
189
202
  {
190
- const map = new WeakMap ();
203
+ const map = new Map ();
191
204
 
192
205
  let counter = 0;
193
206
 
@@ -45,4 +45,4 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- export default "8.6.5";
48
+ export default "8.6.6";
@@ -211,8 +211,8 @@ Material .prototype = Object .assign (Object .create (X3DOneSidedMaterialNode .p
211
211
  },
212
212
  set_transparent__: function ()
213
213
  {
214
- this .setTransparent (Boolean (this .getTransparency () ||
215
- (this .diffuseTextureNode && this .diffuseTextureNode .isTransparent ())));
214
+ this .setTransparent (!!(this .getTransparency () ||
215
+ (this .diffuseTextureNode && this .diffuseTextureNode .isTransparent ())));
216
216
  },
217
217
  getTextureIndices: (function ()
218
218
  {
@@ -170,8 +170,8 @@ PhysicalMaterial .prototype = Object .assign (Object .create (X3DOneSidedMateria
170
170
  },
171
171
  set_transparent__: function ()
172
172
  {
173
- this .setTransparent (Boolean (this .getTransparency () ||
174
- (this .baseTextureNode && this .baseTextureNode .isTransparent ())));
173
+ this .setTransparent (!!(this .getTransparency () ||
174
+ (this .baseTextureNode && this .baseTextureNode .isTransparent ())));
175
175
  },
176
176
  getTextureIndices: (function ()
177
177
  {
@@ -102,8 +102,8 @@ UnlitMaterial .prototype = Object .assign (Object .create (X3DOneSidedMaterialNo
102
102
  },
103
103
  set_transparent__: function ()
104
104
  {
105
- this .setTransparent (Boolean (this .getTransparency () ||
106
- (this .getEmissiveTexture () && this .getEmissiveTexture () .isTransparent ())));
105
+ this .setTransparent (!!(this .getTransparency () ||
106
+ (this .getEmissiveTexture () && this .getEmissiveTexture () .isTransparent ())));
107
107
  },
108
108
  getMaterialKey: function ()
109
109
  {
@@ -168,6 +168,9 @@ ImageTexture .prototype = Object .assign (Object .create (X3DTexture2DNode .prot
168
168
  width = image .width,
169
169
  height = image .height;
170
170
 
171
+ // https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap
172
+ // createImageBitmap
173
+
171
174
  // Scale image if needed and flip vertically.
172
175
 
173
176
  if (gl .getVersion () >= 2 || (Algorithm .isPowerOfTwo (width) && Algorithm .isPowerOfTwo (height)))