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.
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +18 -18
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +27 -27
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +23 -23
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +19 -19
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +18 -18
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +28 -28
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +24 -24
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +14 -14
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +30 -30
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +19 -19
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +440 -351
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/_posts/components/Navigation/NavigationInfo.md +8 -3
- package/docs/_posts/laboratory/x3d-file-converter.md +2 -0
- package/package.json +1 -1
- package/src/x_ite/Base/Events.js +10 -23
- package/src/x_ite/Base/X3DObject.js +29 -16
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Components/Shape/Material.js +2 -2
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +2 -2
- package/src/x_ite/Components/Shape/UnlitMaterial.js +2 -2
- package/src/x_ite/Components/Texturing/ImageTexture.js +3 -0
- package/src/x_ite/Parser/SVGParser.js +337 -251
package/dist/x_ite.zip
CHANGED
|
Binary file
|
package/docs/_config.yml
CHANGED
|
@@ -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".
|
|
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
package/src/x_ite/Base/Events.js
CHANGED
|
@@ -45,20 +45,13 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
const
|
|
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
|
|
52
|
+
if (this .length)
|
|
60
53
|
{
|
|
61
|
-
const event = this
|
|
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
|
|
70
|
+
if (this .length)
|
|
78
71
|
{
|
|
79
|
-
const copy = this
|
|
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
|
|
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
|
|
97
|
+
for (const key of Reflect .ownKeys (Events))
|
|
98
|
+
Object .defineProperty (Events, key, { enumerable: false });
|
|
112
99
|
|
|
113
|
-
export default
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
203
|
+
const map = new Map ();
|
|
191
204
|
|
|
192
205
|
let counter = 0;
|
|
193
206
|
|
|
@@ -211,8 +211,8 @@ Material .prototype = Object .assign (Object .create (X3DOneSidedMaterialNode .p
|
|
|
211
211
|
},
|
|
212
212
|
set_transparent__: function ()
|
|
213
213
|
{
|
|
214
|
-
this .setTransparent (
|
|
215
|
-
|
|
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 (
|
|
174
|
-
|
|
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 (
|
|
106
|
-
|
|
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)))
|