x_ite 8.6.17 → 8.6.19
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 +28 -28
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -21
- 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 -39
- 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 -25
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +25 -26
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +20 -20
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +121 -195
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +30 -31
- 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 +174 -174
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +35 -33
- 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/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +512 -519
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/_posts/getting-started.md +1 -1
- package/docs/_posts/reference/prototype-services.md +2 -2
- package/docs/_posts/setup-a-localhost-server.md +2 -2
- package/package.json +4 -4
- package/src/example.html +1 -1
- package/src/standard/Math/Algorithm.js +1 -1
- package/src/standard/Math/Algorithms/MergeSort.js +7 -5
- package/src/standard/Math/Algorithms/PartialSort.js +3 -1
- package/src/standard/Math/Algorithms/QuickSort.js +1 -3
- package/src/standard/Math/Geometry/Box2.js +1 -1
- package/src/standard/Math/Geometry/Box3.js +1 -1
- package/src/standard/Math/Numbers/Quaternion.js +4 -3
- package/src/standard/Math/Numbers/Rotation4.js +4 -3
- package/src/x_ite/Base/X3DBaseNode.js +9 -24
- package/src/x_ite/Base/X3DEventObject.js +4 -3
- package/src/x_ite/Base/X3DField.js +19 -20
- package/src/x_ite/Base/X3DObject.js +5 -1
- package/src/x_ite/Base/X3DObjectArrayField.js +12 -11
- package/src/x_ite/Base/X3DTypedArrayField.js +3 -3
- package/src/x_ite/Browser/Core/Context.js +1 -1
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +1 -1
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +14 -9
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +2 -2
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +2 -2
- package/src/x_ite/Browser/X3DBrowser.js +44 -77
- package/src/x_ite/Browser/X3DBrowserContext.js +3 -3
- package/src/x_ite/Components/Core/X3DNode.js +2 -2
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +3 -8
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +3 -3
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +0 -8
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +14 -12
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +3 -3
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoMetadata.js +0 -6
- package/src/x_ite/Components/Networking/Anchor.js +36 -33
- package/src/x_ite/Components/Networking/Inline.js +3 -3
- package/src/x_ite/Components/Networking/X3DUrlObject.js +74 -23
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +6 -5
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +2 -2
- package/src/x_ite/Components/Scripting/Script.js +93 -167
- package/src/x_ite/Components/Shaders/ComposedShader.js +3 -18
- package/src/x_ite/Components/Shaders/PackagedShader.js +0 -2
- package/src/x_ite/Components/Shaders/ShaderPart.js +4 -4
- package/src/x_ite/Components/Shaders/ShaderProgram.js +0 -2
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +4 -5
- package/src/x_ite/Components/Sound/AudioClip.js +6 -6
- package/src/x_ite/Components/Sound/DynamicsCompressor.js +4 -4
- package/src/x_ite/Components/Text/Text.js +2 -3
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +4 -4
- package/src/x_ite/Components/Texturing/ImageTexture.js +3 -3
- package/src/x_ite/Components/Texturing/MovieTexture.js +6 -6
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +3 -3
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +3 -3
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +31 -25
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +11 -9
- package/src/x_ite/Execution/Scene.js +1 -1
- package/src/x_ite/Execution/X3DExecutionContext.js +30 -32
- package/src/x_ite/Execution/X3DScene.js +6 -6
- package/src/x_ite/Fields/ArrayFields.js +2 -1
- package/src/x_ite/Fields/SFImage.js +0 -1
- package/src/x_ite/Fields/SFNode.js +9 -8
- package/src/x_ite/Fields/SFRotation.js +2 -4
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +3 -3
- package/src/x_ite/InputOutput/FileLoader.js +3 -4
- package/src/x_ite/InputOutput/Generator.js +1 -1
- package/src/x_ite/Parser/GLTF2Parser.js +45 -45
- package/src/x_ite/Parser/VRMLParser.js +2 -2
- package/src/x_ite/Parser/X3DParser.js +4 -4
- package/src/x_ite/Parser/XMLParser.js +16 -22
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +2 -2
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
- package/docs/_tabs/imprint.md +0 -52
package/dist/x_ite.zip
CHANGED
|
Binary file
|
package/docs/_config.yml
CHANGED
|
@@ -87,9 +87,9 @@ The value is one of the *_STATE* properties defined in the X3DConstants object.
|
|
|
87
87
|
|
|
88
88
|
Creates a new default instance of the extern prototype.
|
|
89
89
|
|
|
90
|
-
#### void **loadNow** ()
|
|
90
|
+
#### Promise\<void\> **loadNow** ()
|
|
91
91
|
|
|
92
|
-
Triggers the
|
|
92
|
+
Triggers the loading of the extern prototype. It returns a Promise that is resolved when the extern prototype is completely loaded and all instances are updated.
|
|
93
93
|
|
|
94
94
|
#### String **toVRMLString** (\[options\])
|
|
95
95
|
|
|
@@ -29,14 +29,14 @@ If you have [Python](https://www.python.org){:target="_blank"} installed, then i
|
|
|
29
29
|
|
|
30
30
|
Just open a Terminal and go to the directory you want to make available.
|
|
31
31
|
|
|
32
|
-
```
|
|
32
|
+
```console
|
|
33
33
|
# Let's make the Desktop directory available.
|
|
34
34
|
$ cd Desktop
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
Type in the following command to start the server.
|
|
38
38
|
|
|
39
|
-
```
|
|
39
|
+
```console
|
|
40
40
|
$ python3 -m http.server
|
|
41
41
|
```
|
|
42
42
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x_ite",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.19",
|
|
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>",
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"opentype.js": "^1.3.4",
|
|
72
72
|
"pako": "^2.1.0",
|
|
73
73
|
"string-replace-webpack-plugin": "^0.1.3",
|
|
74
|
-
"webpack": "^5.
|
|
75
|
-
"webpack-cli": "^5.0.
|
|
74
|
+
"webpack": "^5.80.0",
|
|
75
|
+
"webpack-cli": "^5.0.2",
|
|
76
76
|
"webpack-shell-plugin-next": "^2.3.1"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"test": "cd ../x_ite-tests && npm test",
|
|
80
|
-
"lint": "
|
|
80
|
+
"lint": "eslint src",
|
|
81
81
|
"build": "make",
|
|
82
82
|
"-prebuild:js": "npm run lint"
|
|
83
83
|
}
|
package/src/example.html
CHANGED
|
@@ -16,6 +16,6 @@ x3d-canvas {
|
|
|
16
16
|
<x3d-canvas src="https://create3000.github.io/media/x_ite/info/info.x3d">
|
|
17
17
|
<p>Your browser may not support all features required by X_ITE!</p>
|
|
18
18
|
</x3d-canvas>
|
|
19
|
-
<
|
|
19
|
+
<a>If local files are not loaded <a href="https://create3000.github.io/x_ite/setup-a-localhost-server">consider setup a localhost server</a> or use <a href="https://create3000.github.io/x_ite/dom-integration">DOM Integration methods</a>.</p>
|
|
20
20
|
</body>
|
|
21
21
|
</html>
|
|
@@ -76,26 +76,28 @@ MergeSort .prototype =
|
|
|
76
76
|
},
|
|
77
77
|
merge: function (lo, m, hi)
|
|
78
78
|
{
|
|
79
|
+
const { array, auxiliary, compare } = this;
|
|
80
|
+
|
|
79
81
|
let i, j, k;
|
|
80
82
|
|
|
81
83
|
i = 0, j = lo;
|
|
82
84
|
// Copy first half of array a to auxiliary array b.
|
|
83
85
|
while (j <= m)
|
|
84
|
-
|
|
86
|
+
auxiliary [i++] = array [j++];
|
|
85
87
|
|
|
86
88
|
i = 0; k = lo;
|
|
87
89
|
// Copy back next-greatest element at each time.
|
|
88
90
|
while (k < j && j <= hi)
|
|
89
91
|
{
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
+
if (compare (array [j], auxiliary [i]))
|
|
93
|
+
array [k++] = array [j++];
|
|
92
94
|
else
|
|
93
|
-
|
|
95
|
+
array [k++] = auxiliary [i++];
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
// Copy back remaining elements of first half (if any).
|
|
97
99
|
while (k < j)
|
|
98
|
-
|
|
100
|
+
array [k++] = auxiliary [i++];
|
|
99
101
|
}
|
|
100
102
|
};
|
|
101
103
|
|
|
@@ -68,6 +68,8 @@ PartialSort .prototype =
|
|
|
68
68
|
},
|
|
69
69
|
partialsort: function (lo, hi)
|
|
70
70
|
{
|
|
71
|
+
const { array, compare } = this;
|
|
72
|
+
|
|
71
73
|
let gap = this .last, i, last;
|
|
72
74
|
|
|
73
75
|
if (gap > 1)
|
|
@@ -77,7 +79,7 @@ PartialSort .prototype =
|
|
|
77
79
|
{
|
|
78
80
|
const j = i + gap;
|
|
79
81
|
|
|
80
|
-
if (
|
|
82
|
+
if (compare (array [j], array [i]))
|
|
81
83
|
{
|
|
82
84
|
const t = array [i];
|
|
83
85
|
array [i] = array [j];
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import Vector3 from "./Vector3.js";
|
|
49
|
+
import Matrix3 from "./Matrix3.js";
|
|
49
50
|
import Algorithm from "../Algorithm.js";
|
|
50
51
|
|
|
51
52
|
function Quaternion (x, y, z, w)
|
|
@@ -137,7 +138,7 @@ Quaternion .prototype =
|
|
|
137
138
|
|
|
138
139
|
return this;
|
|
139
140
|
},
|
|
140
|
-
getMatrix: function (matrix)
|
|
141
|
+
getMatrix: function (matrix = new Matrix3 ())
|
|
141
142
|
{
|
|
142
143
|
const { x, y, z, w } = this;
|
|
143
144
|
|
|
@@ -168,11 +169,11 @@ Quaternion .prototype =
|
|
|
168
169
|
},
|
|
169
170
|
isReal: function ()
|
|
170
171
|
{
|
|
171
|
-
return !
|
|
172
|
+
return !(this .x || this .y || this .z);
|
|
172
173
|
},
|
|
173
174
|
isImag: function ()
|
|
174
175
|
{
|
|
175
|
-
return !
|
|
176
|
+
return !this .w;
|
|
176
177
|
},
|
|
177
178
|
equals: function (quat)
|
|
178
179
|
{
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
import Quaternion from "./Quaternion.js";
|
|
49
49
|
import Vector3 from "./Vector3.js";
|
|
50
50
|
import Vector4 from "./Vector4.js";
|
|
51
|
+
import Matrix3 from "./Matrix3.js";
|
|
51
52
|
import Algorithm from "../Algorithm.js";
|
|
52
53
|
|
|
53
54
|
const
|
|
@@ -280,7 +281,7 @@ Rotation4 .prototype =
|
|
|
280
281
|
{
|
|
281
282
|
this .set (vector .x, vector .y, vector .z, this [_angle]);
|
|
282
283
|
},
|
|
283
|
-
getAxis: function (axis)
|
|
284
|
+
getAxis: function (axis = new Vector3 (0, 0, 0))
|
|
284
285
|
{
|
|
285
286
|
return axis .set (this [_x], this [_y], this [_z]);
|
|
286
287
|
},
|
|
@@ -290,7 +291,7 @@ Rotation4 .prototype =
|
|
|
290
291
|
this .update ();
|
|
291
292
|
return this;
|
|
292
293
|
},
|
|
293
|
-
getQuaternion: function (quaternion)
|
|
294
|
+
getQuaternion: function (quaternion = new Quaternion (0, 0, 0, 1))
|
|
294
295
|
{
|
|
295
296
|
return quaternion .assign (this [_quaternion]);
|
|
296
297
|
},
|
|
@@ -300,7 +301,7 @@ Rotation4 .prototype =
|
|
|
300
301
|
this .update ();
|
|
301
302
|
return this;
|
|
302
303
|
},
|
|
303
|
-
getMatrix: function (matrix)
|
|
304
|
+
getMatrix: function (matrix = new Matrix3 ())
|
|
304
305
|
{
|
|
305
306
|
return this [_quaternion] .getMatrix (matrix);
|
|
306
307
|
},
|
|
@@ -64,7 +64,7 @@ const
|
|
|
64
64
|
_childObjects = Symbol (),
|
|
65
65
|
_initialized = Symbol (),
|
|
66
66
|
_live = Symbol (),
|
|
67
|
-
_set_live__ = Symbol (
|
|
67
|
+
_set_live__ = Symbol (),
|
|
68
68
|
_cloneCount = Symbol ();
|
|
69
69
|
|
|
70
70
|
function X3DBaseNode (executionContext)
|
|
@@ -245,22 +245,15 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
|
|
|
245
245
|
{
|
|
246
246
|
return new (this .constructor) (executionContext || this [_executionContext]);
|
|
247
247
|
},
|
|
248
|
-
setup:
|
|
248
|
+
setup: function ()
|
|
249
249
|
{
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
return function ()
|
|
253
|
-
{
|
|
254
|
-
Object .defineProperty (this, "setup", attributes);
|
|
255
|
-
|
|
256
|
-
for (const field of this [_fields])
|
|
257
|
-
field .setTainted (false);
|
|
250
|
+
for (const field of this [_fields])
|
|
251
|
+
field .setTainted (false);
|
|
258
252
|
|
|
259
|
-
|
|
253
|
+
this .initialize ();
|
|
260
254
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
})(),
|
|
255
|
+
this [_initialized] = true;
|
|
256
|
+
},
|
|
264
257
|
initialize: function ()
|
|
265
258
|
{ },
|
|
266
259
|
isInitialized: function ()
|
|
@@ -313,10 +306,6 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
|
|
|
313
306
|
{
|
|
314
307
|
return this [_fieldDefinitions];
|
|
315
308
|
},
|
|
316
|
-
getFieldsAreEnumerable: function ()
|
|
317
|
-
{
|
|
318
|
-
return false;
|
|
319
|
-
},
|
|
320
309
|
addField: function (fieldDefinition)
|
|
321
310
|
{
|
|
322
311
|
const
|
|
@@ -336,7 +325,7 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
|
|
|
336
325
|
{
|
|
337
326
|
get: function () { return field; },
|
|
338
327
|
set: function (value) { field .setValue (value); },
|
|
339
|
-
enumerable:
|
|
328
|
+
enumerable: false,
|
|
340
329
|
configurable: true, // false : non deletable
|
|
341
330
|
});
|
|
342
331
|
|
|
@@ -520,10 +509,6 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
|
|
|
520
509
|
{
|
|
521
510
|
return this [_fields];
|
|
522
511
|
},
|
|
523
|
-
getSourceText: function ()
|
|
524
|
-
{
|
|
525
|
-
return null;
|
|
526
|
-
},
|
|
527
512
|
hasRoutes: function ()
|
|
528
513
|
{
|
|
529
514
|
/// Returns true if there are any routes from or to fields of this node otherwise false.
|
|
@@ -605,7 +590,7 @@ X3DBaseNode .prototype = Object .assign (Object .create (X3DEventObject .prototy
|
|
|
605
590
|
for (const field of this [_childObjects])
|
|
606
591
|
field .dispose ();
|
|
607
592
|
|
|
608
|
-
for (const field of this
|
|
593
|
+
for (const field of this [_fields])
|
|
609
594
|
field .dispose ();
|
|
610
595
|
|
|
611
596
|
X3DEventObject .prototype .dispose .call (this);
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
import X3DChildObject from "./X3DChildObject.js";
|
|
49
49
|
import Events from "./Events.js";
|
|
50
50
|
|
|
51
|
-
const _browser = Symbol .for ("X3DEventObject.browser");
|
|
51
|
+
const _browser = Symbol .for ("X_ITE.X3DEventObject.browser");
|
|
52
52
|
|
|
53
53
|
function X3DEventObject (browser)
|
|
54
54
|
{
|
|
@@ -66,6 +66,7 @@ X3DEventObject .prototype = Object .assign (Object .create (X3DChildObject .prot
|
|
|
66
66
|
},
|
|
67
67
|
getExtendedEventHandling: function ()
|
|
68
68
|
{
|
|
69
|
+
// Whether initializeOnly field are treated like inputOnly and inputOutput fields.
|
|
69
70
|
return true;
|
|
70
71
|
},
|
|
71
72
|
addEvent: function (field)
|
|
@@ -83,15 +84,15 @@ X3DEventObject .prototype = Object .assign (Object .create (X3DChildObject .prot
|
|
|
83
84
|
|
|
84
85
|
// Register for processEvent
|
|
85
86
|
|
|
86
|
-
browser .addBrowserEvent ();
|
|
87
87
|
browser .addTaintedField (field, event);
|
|
88
|
+
browser .addBrowserEvent ();
|
|
88
89
|
|
|
89
90
|
// Register for eventsProcessed
|
|
90
91
|
|
|
91
92
|
if (this .isTainted ())
|
|
92
93
|
return;
|
|
93
94
|
|
|
94
|
-
if (field .isInput () || (this .getExtendedEventHandling () &&
|
|
95
|
+
if (field .isInput () || (this .getExtendedEventHandling () && field .isInitializable ()))
|
|
95
96
|
{
|
|
96
97
|
this .addNodeEvent ();
|
|
97
98
|
}
|
|
@@ -61,15 +61,13 @@ const
|
|
|
61
61
|
_inputRoutes = Symbol (),
|
|
62
62
|
_outputRoutes = Symbol (),
|
|
63
63
|
_routeCallbacks = Symbol (),
|
|
64
|
-
_uniformLocation = Symbol .for ("X3DField.uniformLocation");
|
|
64
|
+
_uniformLocation = Symbol .for ("X_ITE.X3DField.uniformLocation");
|
|
65
65
|
|
|
66
66
|
function X3DField (value)
|
|
67
67
|
{
|
|
68
68
|
X3DChildObject .call (this);
|
|
69
69
|
|
|
70
70
|
this [_value] = value;
|
|
71
|
-
|
|
72
|
-
return this;
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype),
|
|
@@ -78,7 +76,6 @@ X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype)
|
|
|
78
76
|
[_value]: null,
|
|
79
77
|
[_accessType]: X3DConstants .initializeOnly,
|
|
80
78
|
[_unit]: null,
|
|
81
|
-
[_uniformLocation]: null,
|
|
82
79
|
[_references]: new Set (),
|
|
83
80
|
[_referencesCallbacks]: new Map (),
|
|
84
81
|
[_fieldInterests]: new Set (),
|
|
@@ -86,6 +83,7 @@ X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype)
|
|
|
86
83
|
[_inputRoutes]: new Set (),
|
|
87
84
|
[_outputRoutes]: new Set (),
|
|
88
85
|
[_routeCallbacks]: new Map (),
|
|
86
|
+
[_uniformLocation]: null,
|
|
89
87
|
create: function ()
|
|
90
88
|
{
|
|
91
89
|
return new (this .constructor) ();
|
|
@@ -367,32 +365,31 @@ X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype)
|
|
|
367
365
|
if (field !== this)
|
|
368
366
|
this .set (field .getValue (), field .length);
|
|
369
367
|
|
|
370
|
-
// Process interests
|
|
368
|
+
// Process interests.
|
|
371
369
|
|
|
372
370
|
this .processInterests ();
|
|
373
371
|
|
|
374
|
-
// Process routes
|
|
372
|
+
// Process routes.
|
|
375
373
|
|
|
376
374
|
let first = true;
|
|
377
375
|
|
|
378
|
-
|
|
376
|
+
for (const fieldInterest of this [_fieldInterests])
|
|
379
377
|
{
|
|
380
|
-
|
|
378
|
+
if (first)
|
|
379
|
+
{
|
|
380
|
+
first = false;
|
|
381
|
+
fieldInterest .addEventObject (this, event);
|
|
382
|
+
}
|
|
383
|
+
else
|
|
381
384
|
{
|
|
382
|
-
|
|
383
|
-
{
|
|
384
|
-
first = false;
|
|
385
|
-
fieldInterest .addEventObject (this, event);
|
|
386
|
-
}
|
|
387
|
-
else
|
|
388
|
-
fieldInterest .addEventObject (this, Events .copy (event));
|
|
385
|
+
fieldInterest .addEventObject (this, Events .copy (event));
|
|
389
386
|
}
|
|
390
387
|
}
|
|
391
388
|
|
|
392
389
|
if (first)
|
|
393
390
|
Events .push (event);
|
|
394
391
|
|
|
395
|
-
// Process field callbacks
|
|
392
|
+
// Process field callbacks.
|
|
396
393
|
|
|
397
394
|
if (this [_fieldCallbacks] .size)
|
|
398
395
|
{
|
|
@@ -403,16 +400,18 @@ X3DField .prototype = Object .assign (Object .create (X3DChildObject .prototype)
|
|
|
403
400
|
})(),
|
|
404
401
|
addCloneCount: Function .prototype,
|
|
405
402
|
removeCloneCount: Function .prototype,
|
|
406
|
-
valueOf: function ()
|
|
407
|
-
{
|
|
408
|
-
return this;
|
|
409
|
-
},
|
|
410
403
|
fromString: function (string, scene)
|
|
411
404
|
{
|
|
412
405
|
// Function will be overridden in VRMLParser.
|
|
413
406
|
},
|
|
414
407
|
dispose: function ()
|
|
415
408
|
{
|
|
409
|
+
this [_references] .clear ();
|
|
410
|
+
this [_referencesCallbacks] .clear ();
|
|
411
|
+
this [_fieldInterests] .clear ();
|
|
412
|
+
this [_fieldCallbacks] .clear ();
|
|
413
|
+
this [_routeCallbacks] .clear ();
|
|
414
|
+
|
|
416
415
|
for (const route of new Set (this [_inputRoutes]))
|
|
417
416
|
route .dispose ();
|
|
418
417
|
|
|
@@ -183,7 +183,11 @@ X3DObject .prototype =
|
|
|
183
183
|
{
|
|
184
184
|
generator .string = "[object " + this .getTypeName () + "]";
|
|
185
185
|
},
|
|
186
|
-
dispose: function ()
|
|
186
|
+
dispose: function ()
|
|
187
|
+
{
|
|
188
|
+
this [_interests] .clear ();
|
|
189
|
+
this [_userData] .clear ();
|
|
190
|
+
},
|
|
187
191
|
};
|
|
188
192
|
|
|
189
193
|
for (const key of Reflect .ownKeys (X3DObject .prototype))
|
|
@@ -188,7 +188,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
188
188
|
|
|
189
189
|
for (let i = 0; i < length; ++ i)
|
|
190
190
|
{
|
|
191
|
-
if (!
|
|
191
|
+
if (!a [i] .equals (b [i]))
|
|
192
192
|
return false;
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -361,7 +361,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
361
361
|
{
|
|
362
362
|
const current = values [i];
|
|
363
363
|
|
|
364
|
-
if (!
|
|
364
|
+
if (!value (current .valueOf ()))
|
|
365
365
|
{
|
|
366
366
|
const tmp = values [first];
|
|
367
367
|
|
|
@@ -385,7 +385,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
385
385
|
{
|
|
386
386
|
const current = values [i];
|
|
387
387
|
|
|
388
|
-
if (!
|
|
388
|
+
if (!current .equals (value))
|
|
389
389
|
{
|
|
390
390
|
const tmp = values [first];
|
|
391
391
|
|
|
@@ -413,25 +413,26 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
413
413
|
|
|
414
414
|
return values .map (function (value) { return value .valueOf () });
|
|
415
415
|
},
|
|
416
|
-
resize: function (size, value,
|
|
416
|
+
resize: function (size, value, silently)
|
|
417
417
|
{
|
|
418
418
|
const
|
|
419
419
|
target = this [_target],
|
|
420
|
-
array = target .getValue ()
|
|
420
|
+
array = target .getValue (),
|
|
421
|
+
length = array .length;
|
|
421
422
|
|
|
422
|
-
if (size <
|
|
423
|
+
if (size < length)
|
|
423
424
|
{
|
|
424
|
-
for (let i = size
|
|
425
|
+
for (let i = size; i < length; ++ i)
|
|
425
426
|
target .removeChildObject (array [i]);
|
|
426
427
|
|
|
427
428
|
array .length = size;
|
|
428
429
|
|
|
429
|
-
if (!
|
|
430
|
+
if (!silently)
|
|
430
431
|
target .addEvent ();
|
|
431
432
|
}
|
|
432
|
-
else if (size >
|
|
433
|
+
else if (size > length)
|
|
433
434
|
{
|
|
434
|
-
for (let i =
|
|
435
|
+
for (let i = length; i < size; ++ i)
|
|
435
436
|
{
|
|
436
437
|
const field = new (target .getSingleType ()) ();
|
|
437
438
|
|
|
@@ -442,7 +443,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
442
443
|
array .push (field);
|
|
443
444
|
}
|
|
444
445
|
|
|
445
|
-
if (!
|
|
446
|
+
if (!silently)
|
|
446
447
|
target .addEvent ();
|
|
447
448
|
}
|
|
448
449
|
},
|
|
@@ -603,7 +603,7 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
603
603
|
|
|
604
604
|
return values .slice ();
|
|
605
605
|
},
|
|
606
|
-
resize: function (newLength, value,
|
|
606
|
+
resize: function (newLength, value, silently)
|
|
607
607
|
{
|
|
608
608
|
const
|
|
609
609
|
target = this [_target],
|
|
@@ -619,7 +619,7 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
619
619
|
if (components > 1)
|
|
620
620
|
target [_cache] .length = newLength;
|
|
621
621
|
|
|
622
|
-
if (!
|
|
622
|
+
if (!silently)
|
|
623
623
|
target .addEvent ();
|
|
624
624
|
}
|
|
625
625
|
else if (newLength > length)
|
|
@@ -644,7 +644,7 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
646
|
|
|
647
|
-
if (!
|
|
647
|
+
if (!silently)
|
|
648
648
|
target .addEvent ();
|
|
649
649
|
}
|
|
650
650
|
|
|
@@ -449,7 +449,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
449
449
|
{
|
|
450
450
|
this .tapedTwice = true;
|
|
451
451
|
|
|
452
|
-
setTimeout (
|
|
452
|
+
setTimeout (() => this .tapedTwice = false, 300);
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
break;
|
|
@@ -102,7 +102,6 @@ X3DNetworkingContext .prototype =
|
|
|
102
102
|
|
|
103
103
|
this [_defaultScene] .setPrivate (true);
|
|
104
104
|
this [_defaultScene] .setLive (true);
|
|
105
|
-
this [_defaultScene] .setup ();
|
|
106
105
|
|
|
107
106
|
this .getDefaultScene = function () { return this [_defaultScene]; };
|
|
108
107
|
|
|
@@ -110,15 +109,18 @@ X3DNetworkingContext .prototype =
|
|
|
110
109
|
|
|
111
110
|
return this [_defaultScene];
|
|
112
111
|
},
|
|
112
|
+
getBrowserLoading: function ()
|
|
113
|
+
{
|
|
114
|
+
return this [_loading];
|
|
115
|
+
},
|
|
113
116
|
setBrowserLoading: function (value)
|
|
114
117
|
{
|
|
115
118
|
this [_loading] = value;
|
|
116
119
|
|
|
117
|
-
this .setLoadCount (0);
|
|
118
|
-
|
|
119
120
|
if (value)
|
|
120
121
|
{
|
|
121
|
-
this .
|
|
122
|
+
if (!this [_loadingObjects] .has (this))
|
|
123
|
+
this .resetLoadCount ();
|
|
122
124
|
|
|
123
125
|
this .getShadow () .find (".x_ite-private-world-info") .remove ();
|
|
124
126
|
|
|
@@ -138,9 +140,9 @@ X3DNetworkingContext .prototype =
|
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
142
|
},
|
|
141
|
-
|
|
143
|
+
getLoadingObjects: function ()
|
|
142
144
|
{
|
|
143
|
-
return this [
|
|
145
|
+
return this [_loadingObjects];
|
|
144
146
|
},
|
|
145
147
|
addLoadingObject: function (object)
|
|
146
148
|
{
|
|
@@ -162,6 +164,11 @@ X3DNetworkingContext .prototype =
|
|
|
162
164
|
this [_loadingObjects] .delete (object);
|
|
163
165
|
|
|
164
166
|
this .setLoadCount (this [_loadingObjects] .size);
|
|
167
|
+
this .setCursor (this .getCursor ());
|
|
168
|
+
},
|
|
169
|
+
getDisplayLoadCount: function ()
|
|
170
|
+
{
|
|
171
|
+
return [... this [_loadingObjects]] .reduce ((v, o) => v + !(o .isPrivate ?.() ?? true), 0);
|
|
165
172
|
},
|
|
166
173
|
setLoadCount: function (value)
|
|
167
174
|
{
|
|
@@ -180,9 +187,7 @@ X3DNetworkingContext .prototype =
|
|
|
180
187
|
},
|
|
181
188
|
[_set_loadCount]: function ()
|
|
182
189
|
{
|
|
183
|
-
const loadingDisplay =
|
|
184
|
-
.filter (o => o .isPrivate)
|
|
185
|
-
.reduce ((v, o) => v + !o .isPrivate (), 0);
|
|
190
|
+
const loadingDisplay = this .getDisplayLoadCount ();
|
|
186
191
|
|
|
187
192
|
if (this ._loadCount .getValue () || this [_loading])
|
|
188
193
|
{
|
|
@@ -135,9 +135,9 @@ X3DPointingDeviceSensorContext .prototype =
|
|
|
135
135
|
break;
|
|
136
136
|
default:
|
|
137
137
|
{
|
|
138
|
-
if (this .
|
|
138
|
+
if (this .getDisplayLoadCount ())
|
|
139
139
|
div .css ("cursor", "wait");
|
|
140
|
-
else if (this [_pointingDevice]
|
|
140
|
+
else if (this [_pointingDevice] ?.isOver)
|
|
141
141
|
div .css ("cursor", "pointer");
|
|
142
142
|
else
|
|
143
143
|
div .css ("cursor", "default");
|