x_ite 8.7.2 → 8.7.3
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/.vscode/tasks.json +0 -18
- package/build/bin/version.pl +16 -0
- package/dist/LICENSE.md +2 -16
- 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 +22 -22
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +18 -18
- 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 +1257 -1607
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/docs/_posts/getting-started.md +2 -0
- package/package.json +2 -2
- package/src/bookmarks.js +3 -2
- package/src/standard/Math/Algorithm.js +18 -0
- package/src/x_ite/Base/X3DArrayField.js +19 -7
- package/src/x_ite/Base/X3DObject.js +5 -0
- package/src/x_ite/Base/X3DObjectArrayField.js +20 -21
- package/src/x_ite/Base/X3DTypedArrayField.js +86 -178
- package/src/x_ite/Browser/Core/BrowserOptions.js +2 -2
- package/src/x_ite/Browser/Core/RenderingProperties.js +1 -1
- package/src/x_ite/Browser/Core/X3DCoreContext.js +22 -6
- package/src/x_ite/Browser/DOMIntegration.js +5 -5
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +5 -7
- package/src/x_ite/Components/Core/X3DNode.js +0 -10
- package/src/x_ite/Configuration/ComponentInfo.js +2 -3
- package/src/x_ite/Execution/X3DScene.js +1 -1
- package/src/x_ite/Fields/ArrayFields.js +13 -9
- package/src/x_ite/Fields/SFColor.js +4 -4
- package/src/x_ite/Fields/SFDouble.js +2 -2
- package/src/x_ite/Fields/SFFloat.js +2 -2
- package/src/x_ite/Fields/SFImage.js +11 -2
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +1 -1
- package/src/x_ite/Fields/SFNode.js +4 -0
- package/src/x_ite/Fields/SFRotation.js +8 -8
- package/src/x_ite/Fields/SFTime.js +1 -1
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +1 -1
- package/src/x_ite/InputOutput/FileLoader.js +1 -1
- package/src/x_ite/InputOutput/Generator.js +7 -7
- package/src/x_ite/Parser/JSONParser.js +4 -23
- package/src/x_ite/Parser/XMLParser.js +5 -11
- package/src/x_ite/X3D.js +1 -1
- package/src/x_ite/X3DCanvasElement.js +0 -24
- package/src/x_ite.js +1 -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.7.
|
|
24
|
-
size:
|
|
23
|
+
version: 8.7.3 # x_ite latest version
|
|
24
|
+
size: 290 # 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
|
|
@@ -717,6 +717,8 @@ Type: script code. This event is sent to an \<x3d-canvas\> element when an error
|
|
|
717
717
|
|
|
718
718
|
Type: script code. This event handler will be called on the \<x3d-canvas\> element when a scene has finished loading. This applies whether the scene is applied via the *src* attribute or when a scene is loaded or replaced by another world. If you change the scene, the event will fire again when the new scene loads. This event will not bubble up the element tree.
|
|
719
719
|
|
|
720
|
+
The onload event handler will also be called at the very beginning when the initial empty scene is loaded.
|
|
721
|
+
|
|
720
722
|
### onshutdown
|
|
721
723
|
|
|
722
724
|
Type: script code. This event handler will be called on the \<x3d-canvas\> element when a scene is unloaded or replaced by another world.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x_ite",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.3",
|
|
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>",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"dicom-parser": "^1.8.21",
|
|
61
61
|
"jpeg-js": "^0.4.4",
|
|
62
62
|
"jpeg-lossless-decoder-js": "2.0.4",
|
|
63
|
-
"jquery": "^3.
|
|
63
|
+
"jquery": "^3.7.0",
|
|
64
64
|
"jquery-fullscreen-plugin": "^1.1.5",
|
|
65
65
|
"jquery-mousewheel": "^3.1.13",
|
|
66
66
|
"libgif": "^0.0.3",
|
package/src/bookmarks.js
CHANGED
|
@@ -87,8 +87,9 @@ const Bookmarks = (function ()
|
|
|
87
87
|
if (! path .match (/\.(?:x3d|x3dz|x3dv|x3dvz|x3dj|x3djz|wrl|wrz)$/))
|
|
88
88
|
continue;
|
|
89
89
|
|
|
90
|
-
const
|
|
91
|
-
|
|
90
|
+
const
|
|
91
|
+
basename = path .match (/([^\/]+)\.\w+$/),
|
|
92
|
+
name = basename [1] .replace (/([A-Z]+)/g, ' $1');
|
|
92
93
|
|
|
93
94
|
var element = $('<span/>')
|
|
94
95
|
.addClass ('example-box')
|
|
@@ -169,6 +169,24 @@ export default class Algorithm
|
|
|
169
169
|
return lhs > rhs ? 1 : lhs < rhs ? -1 : 0;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
// static lexicographicallyCompare (lhs, rhs)
|
|
173
|
+
// {
|
|
174
|
+
// const
|
|
175
|
+
// length1 = lhs .length,
|
|
176
|
+
// length2 = rhs .length;
|
|
177
|
+
|
|
178
|
+
// for (let i = 0; i < length1 && i < length2; ++ i)
|
|
179
|
+
// {
|
|
180
|
+
// if (lhs [i] < rhs [i])
|
|
181
|
+
// return -1;
|
|
182
|
+
|
|
183
|
+
// if (rhs [i] < lhs [i])
|
|
184
|
+
// return 1;
|
|
185
|
+
// }
|
|
186
|
+
|
|
187
|
+
// return Algorithm .cmp (length1, length2);
|
|
188
|
+
// }
|
|
189
|
+
|
|
172
190
|
static less (lhs, rhs)
|
|
173
191
|
{
|
|
174
192
|
return lhs < rhs;
|
|
@@ -55,30 +55,42 @@ function X3DArrayField (value)
|
|
|
55
55
|
X3DArrayField .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
56
56
|
{
|
|
57
57
|
constructor: X3DArrayField,
|
|
58
|
+
// Implement all function also in TypedArray, if possible.
|
|
58
59
|
at: Array .prototype .at,
|
|
59
|
-
concat: Array .prototype .concat,
|
|
60
|
-
//Array.prototype.copyWithin,
|
|
60
|
+
// concat: Array .prototype .concat,
|
|
61
|
+
// copyWithin: Array.prototype.copyWithin,
|
|
61
62
|
entries: Array .prototype .entries,
|
|
62
63
|
every: Array .prototype .every,
|
|
63
64
|
fill: Array .prototype .fill,
|
|
64
|
-
filter:
|
|
65
|
+
filter: function (callbackFn, thisArg)
|
|
66
|
+
{
|
|
67
|
+
return new (this .getTarget () .constructor) (... Array .prototype .filter .call (this, callbackFn, thisArg));
|
|
68
|
+
},
|
|
65
69
|
find: Array .prototype .find,
|
|
66
70
|
findIndex: Array .prototype .findIndex,
|
|
67
71
|
findLast: Array .prototype .findLast,
|
|
68
72
|
findLastIndex: Array .prototype .findLastIndex,
|
|
69
|
-
flat: Array .prototype .flat,
|
|
70
|
-
flatMap: Array .prototype .flatMap,
|
|
73
|
+
// flat: Array .prototype .flat,
|
|
74
|
+
// flatMap: Array .prototype .flatMap,
|
|
71
75
|
forEach: Array .prototype .forEach,
|
|
72
76
|
includes: Array .prototype .includes,
|
|
73
77
|
indexOf: Array .prototype .indexOf,
|
|
74
78
|
join: Array .prototype .join,
|
|
75
79
|
keys: Array .prototype .keys,
|
|
76
80
|
lastIndexOf: Array .prototype .lastIndexOf,
|
|
77
|
-
map:
|
|
81
|
+
map: function (callbackFn, thisArg)
|
|
82
|
+
{
|
|
83
|
+
return new (this .getTarget () .constructor) (... Array .prototype .map .call (this, callbackFn, thisArg));
|
|
84
|
+
},
|
|
78
85
|
reduce: Array .prototype .reduce,
|
|
79
86
|
reduceRight: Array .prototype .reduceRight,
|
|
80
|
-
|
|
87
|
+
reverse: Array .prototype .reverse,
|
|
88
|
+
slice: function (start, end)
|
|
89
|
+
{
|
|
90
|
+
return new (this .getTarget () .constructor) (... Array .prototype .slice .call (this, start, end));
|
|
91
|
+
},
|
|
81
92
|
some: Array .prototype .some,
|
|
93
|
+
sort: Array .prototype .sort,
|
|
82
94
|
values: Array .prototype .values,
|
|
83
95
|
});
|
|
84
96
|
|
|
@@ -135,6 +135,10 @@ X3DObject .prototype =
|
|
|
135
135
|
|
|
136
136
|
this [_userData] .set (key, value);
|
|
137
137
|
},
|
|
138
|
+
removeUserData: function (key)
|
|
139
|
+
{
|
|
140
|
+
this [_userData] .delete (key);
|
|
141
|
+
},
|
|
138
142
|
toString: function (options = Object .prototype)
|
|
139
143
|
{
|
|
140
144
|
const generator = new Generator (options);
|
|
@@ -215,6 +219,7 @@ Object .assign (X3DObject,
|
|
|
215
219
|
})(),
|
|
216
220
|
});
|
|
217
221
|
|
|
222
|
+
// In the future we can use getId, because WeakMap will accept Symbols as key.
|
|
218
223
|
const SymbolId = (function ()
|
|
219
224
|
{
|
|
220
225
|
const map = new Map ();
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
|
|
48
48
|
import X3DField from "./X3DField.js";
|
|
49
49
|
import X3DArrayField from "./X3DArrayField.js";
|
|
50
|
-
import Algorithm from "../../standard/Math/Algorithm.js";
|
|
51
50
|
|
|
52
51
|
const
|
|
53
52
|
_target = Symbol (),
|
|
@@ -126,10 +125,10 @@ const handler =
|
|
|
126
125
|
|
|
127
126
|
function X3DObjectArrayField (value)
|
|
128
127
|
{
|
|
129
|
-
const proxy = new Proxy (this, handler);
|
|
130
|
-
|
|
131
128
|
X3DArrayField .call (this, [ ]);
|
|
132
129
|
|
|
130
|
+
const proxy = new Proxy (this, handler);
|
|
131
|
+
|
|
133
132
|
this [_target] = this;
|
|
134
133
|
this [_proxy] = proxy;
|
|
135
134
|
|
|
@@ -282,7 +281,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
282
281
|
return field .valueOf ();
|
|
283
282
|
}
|
|
284
283
|
},
|
|
285
|
-
splice: function (index, deleteCount)
|
|
284
|
+
splice: function (index, deleteCount, ... insertValues)
|
|
286
285
|
{
|
|
287
286
|
const
|
|
288
287
|
target = this [_target],
|
|
@@ -296,8 +295,8 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
296
295
|
|
|
297
296
|
const result = target .erase (index, index + deleteCount);
|
|
298
297
|
|
|
299
|
-
if (
|
|
300
|
-
target .insert (index,
|
|
298
|
+
if (insertValues .length)
|
|
299
|
+
target .insert (index, insertValues, 0, insertValues .length);
|
|
301
300
|
|
|
302
301
|
return result;
|
|
303
302
|
},
|
|
@@ -305,7 +304,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
305
304
|
{
|
|
306
305
|
const
|
|
307
306
|
target = this [_target],
|
|
308
|
-
args = [
|
|
307
|
+
args = [ ];
|
|
309
308
|
|
|
310
309
|
for (let i = first; i < last; ++ i)
|
|
311
310
|
{
|
|
@@ -316,7 +315,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
316
315
|
args .push (field);
|
|
317
316
|
}
|
|
318
317
|
|
|
319
|
-
Array .prototype .splice .
|
|
318
|
+
Array .prototype .splice .call (target .getValue (), index, 0, ... args);
|
|
320
319
|
|
|
321
320
|
target .addEvent ();
|
|
322
321
|
},
|
|
@@ -411,7 +410,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
411
410
|
|
|
412
411
|
target .addEvent ();
|
|
413
412
|
|
|
414
|
-
return
|
|
413
|
+
return new (target .constructor) (values);
|
|
415
414
|
},
|
|
416
415
|
resize: function (size, value, silently)
|
|
417
416
|
{
|
|
@@ -447,6 +446,14 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
447
446
|
target .addEvent ();
|
|
448
447
|
}
|
|
449
448
|
},
|
|
449
|
+
addChildObject: function (value)
|
|
450
|
+
{
|
|
451
|
+
value .addParent (this [_proxy]);
|
|
452
|
+
},
|
|
453
|
+
removeChildObject: function (value)
|
|
454
|
+
{
|
|
455
|
+
value .removeParent (this [_proxy]);
|
|
456
|
+
},
|
|
450
457
|
reverse: function ()
|
|
451
458
|
{
|
|
452
459
|
const target = this [_target];
|
|
@@ -454,24 +461,16 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
454
461
|
target .getValue () .reverse ();
|
|
455
462
|
target .addEvent ();
|
|
456
463
|
|
|
457
|
-
return
|
|
464
|
+
return target [_proxy];
|
|
458
465
|
},
|
|
459
|
-
sort: function ()
|
|
466
|
+
sort: function (compareFn)
|
|
460
467
|
{
|
|
461
468
|
const target = this [_target];
|
|
462
469
|
|
|
463
|
-
|
|
470
|
+
Array .prototype .sort .call (this, compareFn);
|
|
464
471
|
target .addEvent ();
|
|
465
472
|
|
|
466
|
-
return
|
|
467
|
-
},
|
|
468
|
-
addChildObject: function (value)
|
|
469
|
-
{
|
|
470
|
-
value .addParent (this [_proxy]);
|
|
471
|
-
},
|
|
472
|
-
removeChildObject: function (value)
|
|
473
|
-
{
|
|
474
|
-
value .removeParent (this [_proxy]);
|
|
473
|
+
return target [_proxy];
|
|
475
474
|
},
|
|
476
475
|
toStream: function (generator)
|
|
477
476
|
{
|