x_ite 8.3.3 → 8.4.1
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 +21 -19
- 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 +17 -17
- 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 +27 -27
- 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 +2711 -292
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/docs/_posts/reference/field-services-and-objects.md +24 -4
- package/docs/_posts/reference/prototype-services.md +24 -4
- package/docs/_posts/reference/scene-services.md +9 -4
- package/docs/_posts/what's-new.md +11 -1
- package/package.json +1 -1
- package/src/x_ite/Base/X3DInfoArray.js +26 -0
- package/src/x_ite/Base/X3DObject.js +1 -1
- package/src/x_ite/Base/X3DObjectArrayField.js +44 -0
- package/src/x_ite/Base/X3DTypedArrayField.js +74 -0
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Components/Core/X3DNode.js +486 -23
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +371 -10
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +3 -1
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +6 -3
- package/src/x_ite/Configuration/ComponentInfo.js +32 -0
- package/src/x_ite/Configuration/ProfileInfo.js +4 -0
- package/src/x_ite/Configuration/UnitInfo.js +46 -0
- package/src/x_ite/Execution/X3DExecutionContext.js +54 -0
- package/src/x_ite/Execution/X3DExportedNode.js +52 -0
- package/src/x_ite/Execution/X3DImportedNode.js +164 -0
- package/src/x_ite/Execution/X3DScene.js +339 -0
- package/src/x_ite/Fields/ArrayFields.js +48 -0
- package/src/x_ite/Fields/SFBool.js +8 -0
- package/src/x_ite/Fields/SFColor.js +26 -1
- package/src/x_ite/Fields/SFColorRGBA.js +2 -0
- package/src/x_ite/Fields/SFDouble.js +10 -0
- package/src/x_ite/Fields/SFFloat.js +10 -0
- package/src/x_ite/Fields/SFImage.js +61 -1
- package/src/x_ite/Fields/SFInt32.js +11 -3
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +26 -1
- package/src/x_ite/Fields/SFNode.js +40 -25
- package/src/x_ite/Fields/SFRotation.js +28 -3
- package/src/x_ite/Fields/SFString.js +8 -0
- package/src/x_ite/Fields/SFTime.js +8 -0
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +30 -4
- package/src/x_ite/InputOutput/Generator.js +63 -2
- package/src/x_ite/Parser/JSONParser.js +1 -1
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +123 -0
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +228 -0
- package/src/x_ite/Routing/X3DRoute.js +67 -0
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.
|
|
24
|
-
x3d_latest_version: 8.
|
|
23
|
+
version: 8.4.1 # x_ite latest version
|
|
24
|
+
x3d_latest_version: 8.4.1 # x3d latest version
|
|
25
25
|
|
|
26
26
|
tagline: Step Into The Future # it will display as the sub-title
|
|
27
27
|
|
|
@@ -407,14 +407,24 @@ Returns the node type name.
|
|
|
407
407
|
|
|
408
408
|
Removes a field callback function associated with the parameters *name* and *key*.
|
|
409
409
|
|
|
410
|
-
#### String **toVRMLString** ()
|
|
410
|
+
#### String **toVRMLString** (\[options\])
|
|
411
411
|
|
|
412
412
|
Returns the X3D VRML-encoded string that, if parsed as the value of an SFNode field, produce this node.
|
|
413
413
|
|
|
414
|
-
|
|
414
|
+
For options see X3DScene.toVRMLString.
|
|
415
|
+
|
|
416
|
+
#### String **toXMLString** (\[options\])
|
|
415
417
|
|
|
416
418
|
Returns the X3D XML-encoded string that, if parsed as the value of an SFNode field, produce this node.
|
|
417
419
|
|
|
420
|
+
For options see X3DScene.toVRMLString.
|
|
421
|
+
|
|
422
|
+
#### String **toJSONString** (\[options\])
|
|
423
|
+
|
|
424
|
+
Returns the X3D JSON-encoded string that, if parsed as the value of an SFNode field, produce this node.
|
|
425
|
+
|
|
426
|
+
For options see X3DScene.toVRMLString.
|
|
427
|
+
|
|
418
428
|
## SFRotation Object
|
|
419
429
|
|
|
420
430
|
The SFRotation object corresponds to a X3D SFRotation field.
|
|
@@ -966,14 +976,24 @@ An integer containing the number of elements in the array. Assigning an integer
|
|
|
966
976
|
|
|
967
977
|
### Methods
|
|
968
978
|
|
|
969
|
-
#### String **toVRMLString** ()
|
|
979
|
+
#### String **toVRMLString** (\[options\])
|
|
970
980
|
|
|
971
981
|
Returns the X3D VRML-encoded string that, if parsed as the value of an MFNode field, produce this node.
|
|
972
982
|
|
|
973
|
-
|
|
983
|
+
For options see X3DScene.toVRMLString.
|
|
984
|
+
|
|
985
|
+
#### String **toXMLString** (\[options\])
|
|
974
986
|
|
|
975
987
|
Returns the X3D XML-encoded string that, if parsed as the value of an MFNode field, produce this node.
|
|
976
988
|
|
|
989
|
+
For options see X3DScene.toVRMLString.
|
|
990
|
+
|
|
991
|
+
#### String **toJSONString** (\[options\])
|
|
992
|
+
|
|
993
|
+
Returns the X3D JSON-encoded string that, if parsed as the value of an MFNode field, produce this node.
|
|
994
|
+
|
|
995
|
+
For options see X3DScene.toVRMLString.
|
|
996
|
+
|
|
977
997
|
## MFRotation Object
|
|
978
998
|
|
|
979
999
|
The MFRotation object corresponds to a X3D MFRotation field. It is used to store a one-dimensional array of SFRotation objects. Individual elements of the array can be referenced using the standard C-style dereferencing operator (e.g. *mfRotationObjectName*[*index*], where *index* is an integer-valued expression with 0<=*index*<length and length is the number of elements in the array). Assigning to an element with *index* > length results in the array being dynamically expanded to contain length elements. All elements not explicitly initialized are set to SFRotation (0, 0, 1, 0).
|
|
@@ -33,14 +33,24 @@ Always has the value of false. This property is read only.
|
|
|
33
33
|
|
|
34
34
|
Creates a new default instance of the prototype.
|
|
35
35
|
|
|
36
|
-
#### String **toVRMLString** ()
|
|
36
|
+
#### String **toVRMLString** (\[options\])
|
|
37
37
|
|
|
38
38
|
Returns the X3D VRML-encoded string that, if parsed as the value of createX3DFromString () of X3DBrowser, produce this prototype.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
For options see X3DScene.toVRMLString.
|
|
41
|
+
|
|
42
|
+
#### String **toXMLString** (\[options\])
|
|
41
43
|
|
|
42
44
|
Returns the X3D XML-encoded string that, if parsed as the value of createX3DFromString () of X3DBrowser, produce this prototype.
|
|
43
45
|
|
|
46
|
+
For options see X3DScene.toVRMLString.
|
|
47
|
+
|
|
48
|
+
#### String **toJSONString** (\[options\])
|
|
49
|
+
|
|
50
|
+
Returns the X3D JSON-encoded string that, if parsed as the value of createX3DFromString () of X3DBrowser, produce this prototype.
|
|
51
|
+
|
|
52
|
+
For options see X3DScene.toVRMLString.
|
|
53
|
+
|
|
44
54
|
## X3DExternProtoDeclaration
|
|
45
55
|
|
|
46
56
|
An EXTERNPROTO declaration is represented by the X3DExternProtoDeclaration object. EXTERNPROTO declarations can only be fetched using the X3DExecutionContext object.
|
|
@@ -81,14 +91,24 @@ Creates a new default instance of the extern prototype.
|
|
|
81
91
|
|
|
82
92
|
Triggers the load of the extern prototype. If the extern prototype is already loaded or the load is already in progress, this request is silently ignored.
|
|
83
93
|
|
|
84
|
-
#### String **toVRMLString** ()
|
|
94
|
+
#### String **toVRMLString** (\[options\])
|
|
85
95
|
|
|
86
96
|
Returns the X3D VRML-encoded string that, if parsed as the value of createX3DFromString () of X3DBrowser, produce this extern prototype.
|
|
87
97
|
|
|
88
|
-
|
|
98
|
+
For options see X3DScene.toVRMLString.
|
|
99
|
+
|
|
100
|
+
#### String **toXMLString** (\[options\])
|
|
89
101
|
|
|
90
102
|
Returns the X3D XML-encoded string that, if parsed as the value of createX3DFromString () of X3DBrowser, produce this extern prototype.
|
|
91
103
|
|
|
104
|
+
For options see X3DScene.toVRMLString.
|
|
105
|
+
|
|
106
|
+
#### String **toJSONString** (\[options\])
|
|
107
|
+
|
|
108
|
+
Returns the X3D JSON-encoded string that, if parsed as the value of createX3DFromString () of X3DBrowser, produce this extern prototype.
|
|
109
|
+
|
|
110
|
+
For options see X3DScene.toVRMLString.
|
|
111
|
+
|
|
92
112
|
## ProtoDeclarationArray
|
|
93
113
|
|
|
94
114
|
ProtoDeclarationArray is an object that represents an array of X3DProtoDeclaration objects. This is a read-only object. Individual elements of the array can be referenced using the standard C-style dereferencing operator (e.g. *protoDeclarationArrayName*[*index*], where *index* is an integer-valued expression with 0\<=*index*\<length and length is the number of elements in the array).
|
|
@@ -152,10 +152,9 @@ Returns the X3D VRML-encoded string that, if parsed as the value of createX3DFro
|
|
|
152
152
|
|
|
153
153
|
An object with one or more of these properties:
|
|
154
154
|
|
|
155
|
-
* **
|
|
156
|
-
* **
|
|
157
|
-
* **
|
|
158
|
-
* **doublePrecision:** integer, double precision (default: 14)
|
|
155
|
+
* **style:** string, output style, one of: **"TIDY"**, "COMPACT", "SMALL", "CLEAN"
|
|
156
|
+
* **precision:** integer, float precision, default: 6
|
|
157
|
+
* **doublePrecision:** integer, double precision, default: 14
|
|
159
158
|
|
|
160
159
|
#### String **toXMLString** (\[options\])
|
|
161
160
|
|
|
@@ -163,6 +162,12 @@ Returns the X3D XML-encoded string that, if parsed as the value of createX3DFrom
|
|
|
163
162
|
|
|
164
163
|
For options see toVRMLString.
|
|
165
164
|
|
|
165
|
+
#### String **toJSONString** (\[options\])
|
|
166
|
+
|
|
167
|
+
Returns the X3D JSON-encoded string that, if parsed as the value of createX3DFromString () of X3DBrowser, produce this scene.
|
|
168
|
+
|
|
169
|
+
For options see toVRMLString.
|
|
170
|
+
|
|
166
171
|
## ProfileInfo
|
|
167
172
|
|
|
168
173
|
This object stores information about a particular X3D profile.
|
|
@@ -5,8 +5,18 @@ nav: main
|
|
|
5
5
|
categories: []
|
|
6
6
|
tags: [new, releases]
|
|
7
7
|
---
|
|
8
|
+
## X_ITE v8.4.0 Released
|
|
9
|
+
|
|
10
|
+
*Leipzig, 3rd January 2023:* We right now released a new version. With this version toJSONString is implemented and available for X3DScene, SFNode, MFNode, X3DProtoDeclaration, and X3DExternProtoDeclaration.
|
|
11
|
+
|
|
12
|
+
### New Features
|
|
13
|
+
|
|
14
|
+
- Implemented toJSONString.
|
|
15
|
+
|
|
8
16
|
## X_ITE v8.3.3 Released
|
|
9
17
|
|
|
18
|
+
*Leipzig, 31st December 2022:* We right now released a new version.
|
|
19
|
+
|
|
10
20
|
### New Features
|
|
11
21
|
|
|
12
22
|
- Added to*String options (scene, style, precision, doublePrecision).
|
|
@@ -25,7 +35,7 @@ tags: [new, releases]
|
|
|
25
35
|
|
|
26
36
|
## X_ITE v8.3.0 Released
|
|
27
37
|
|
|
28
|
-
*Leipzig,
|
|
38
|
+
*Leipzig, 14th December 2022:* We right now released a new version.
|
|
29
39
|
|
|
30
40
|
### New Features
|
|
31
41
|
|
package/package.json
CHANGED
|
@@ -273,6 +273,32 @@ X3DInfoArray .prototype = {
|
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
275
|
},
|
|
276
|
+
toJSONStream: function (generator, comma)
|
|
277
|
+
{
|
|
278
|
+
let lastProperty = false;
|
|
279
|
+
|
|
280
|
+
for (const value of this [_array])
|
|
281
|
+
{
|
|
282
|
+
try
|
|
283
|
+
{
|
|
284
|
+
value .toJSONStream (generator, true);
|
|
285
|
+
|
|
286
|
+
generator .string += ',';
|
|
287
|
+
generator .string += generator .TidyBreak ();
|
|
288
|
+
|
|
289
|
+
lastProperty = true;
|
|
290
|
+
}
|
|
291
|
+
catch (error)
|
|
292
|
+
{
|
|
293
|
+
// console .error (error);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if (lastProperty && !comma)
|
|
298
|
+
generator .string = generator .string .replace (/,(\s*)$/s, "$1");
|
|
299
|
+
|
|
300
|
+
return lastProperty;
|
|
301
|
+
},
|
|
276
302
|
};
|
|
277
303
|
|
|
278
304
|
for (const key of Reflect .ownKeys (X3DInfoArray .prototype))
|
|
@@ -533,6 +533,50 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
533
533
|
generator .PopUnitCategory ();
|
|
534
534
|
}
|
|
535
535
|
},
|
|
536
|
+
toJSONStream: function (generator)
|
|
537
|
+
{
|
|
538
|
+
const
|
|
539
|
+
target = this [_target],
|
|
540
|
+
length = target .length;
|
|
541
|
+
|
|
542
|
+
if (length)
|
|
543
|
+
{
|
|
544
|
+
const value = this .getValue ();
|
|
545
|
+
|
|
546
|
+
generator .PushUnitCategory (target .getUnit ());
|
|
547
|
+
|
|
548
|
+
generator .string += '[';
|
|
549
|
+
generator .string += generator .ListBreak ();
|
|
550
|
+
generator .string += generator .IncIndent ();
|
|
551
|
+
|
|
552
|
+
for (let i = 0, n = length - 1; i < n; ++ i)
|
|
553
|
+
{
|
|
554
|
+
generator .string += generator .ListIndent ();
|
|
555
|
+
|
|
556
|
+
value [i] .toJSONStreamValue (generator);
|
|
557
|
+
|
|
558
|
+
generator .string += ',';
|
|
559
|
+
generator .string += generator .ListBreak ();
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
generator .string += generator .ListIndent ();
|
|
563
|
+
|
|
564
|
+
value .at (-1) .toJSONStreamValue (generator);
|
|
565
|
+
|
|
566
|
+
generator .string += generator .ListBreak ();
|
|
567
|
+
generator .string += generator .DecIndent ();
|
|
568
|
+
generator .string += generator .ListIndent ();
|
|
569
|
+
generator .string += ']';
|
|
570
|
+
|
|
571
|
+
generator .PopUnitCategory ();
|
|
572
|
+
}
|
|
573
|
+
else
|
|
574
|
+
{
|
|
575
|
+
generator .string += '[';
|
|
576
|
+
generator .string += generator .TidySpace ();
|
|
577
|
+
generator .string += ']';
|
|
578
|
+
}
|
|
579
|
+
},
|
|
536
580
|
dispose: function ()
|
|
537
581
|
{
|
|
538
582
|
const
|
|
@@ -840,6 +840,80 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
840
840
|
generator .PopUnitCategory ();
|
|
841
841
|
}
|
|
842
842
|
},
|
|
843
|
+
toJSONStream: function (generator)
|
|
844
|
+
{
|
|
845
|
+
const
|
|
846
|
+
target = this [_target],
|
|
847
|
+
length = target .length;
|
|
848
|
+
|
|
849
|
+
if (length)
|
|
850
|
+
{
|
|
851
|
+
const
|
|
852
|
+
array = target .getValue (),
|
|
853
|
+
components = target .getComponents (),
|
|
854
|
+
value = new (target .getSingleType ()) ();
|
|
855
|
+
|
|
856
|
+
generator .PushUnitCategory (target .getUnit ());
|
|
857
|
+
|
|
858
|
+
generator .string += '[';
|
|
859
|
+
generator .string += generator .ListBreak ();
|
|
860
|
+
generator .string += generator .IncIndent ();
|
|
861
|
+
|
|
862
|
+
if (components === 1)
|
|
863
|
+
{
|
|
864
|
+
for (let i = 0, n = length - 1; i < n; ++ i)
|
|
865
|
+
{
|
|
866
|
+
generator .string += generator .ListIndent ();
|
|
867
|
+
|
|
868
|
+
value .set (array [i * components]);
|
|
869
|
+
value .toJSONStreamValue (generator);
|
|
870
|
+
|
|
871
|
+
generator .string += ',';
|
|
872
|
+
generator .string += generator .ListBreak ();
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
generator .string += generator .ListIndent ();
|
|
876
|
+
|
|
877
|
+
value .set (array [(length - 1) * components]);
|
|
878
|
+
value .toJSONStreamValue (generator);
|
|
879
|
+
}
|
|
880
|
+
else
|
|
881
|
+
{
|
|
882
|
+
for (let i = 0, n = length - 1; i < n; ++ i)
|
|
883
|
+
{
|
|
884
|
+
generator .string += generator .ListIndent ();
|
|
885
|
+
|
|
886
|
+
for (let c = 0, first = i * components; c < components; ++ c, ++ first)
|
|
887
|
+
value [c] = array [first];
|
|
888
|
+
|
|
889
|
+
value .toJSONStreamValue (generator);
|
|
890
|
+
|
|
891
|
+
generator .string += ',';
|
|
892
|
+
generator .string += generator .ListBreak ();
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
generator .string += generator .ListIndent ();
|
|
896
|
+
|
|
897
|
+
for (let c = 0, first = (length - 1) * components; c < components; ++ c, ++ first)
|
|
898
|
+
value [c] = array [first];
|
|
899
|
+
|
|
900
|
+
value .toJSONStreamValue (generator);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
generator .string += generator .ListBreak ();
|
|
904
|
+
generator .string += generator .DecIndent ();
|
|
905
|
+
generator .string += generator .ListIndent ();
|
|
906
|
+
generator .string += ']';
|
|
907
|
+
|
|
908
|
+
generator .PopUnitCategory ();
|
|
909
|
+
}
|
|
910
|
+
else
|
|
911
|
+
{
|
|
912
|
+
generator .string += '[';
|
|
913
|
+
generator .string += generator .TidySpace ();
|
|
914
|
+
generator .string += ']';
|
|
915
|
+
}
|
|
916
|
+
},
|
|
843
917
|
dispose: function ()
|
|
844
918
|
{
|
|
845
919
|
X3DArrayField .prototype .dispose .call (this [_target]);
|