x_ite 8.7.2 → 8.7.4
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/bump.pl +2 -0
- 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 +20 -20
- 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 +31 -31
- 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 +1939 -2168
- 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/docs/_posts/reference/field-services-and-objects.md +1 -1
- package/package.json +3 -3
- package/src/bookmarks.js +3 -2
- package/src/standard/Math/Algorithm.js +18 -0
- package/src/x_ite/Base/FieldArray.js +3 -2
- package/src/x_ite/Base/FieldDefinitionArray.js +3 -2
- package/src/x_ite/Base/X3DArrayField.js +43 -7
- package/src/x_ite/Base/X3DInfoArray.js +69 -12
- package/src/x_ite/Base/X3DObject.js +10 -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 +8 -10
- package/src/x_ite/Components/Core/X3DNode.js +0 -10
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +4 -4
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +2 -2
- package/src/x_ite/Configuration/ComponentInfo.js +2 -3
- package/src/x_ite/Configuration/ComponentInfoArray.js +2 -2
- package/src/x_ite/Configuration/ProfileInfoArray.js +2 -2
- package/src/x_ite/Configuration/UnitInfoArray.js +15 -1
- package/src/x_ite/Execution/BindableList.js +1 -1
- package/src/x_ite/Execution/ExportedNodesArray.js +4 -3
- package/src/x_ite/Execution/ImportedNodesArray.js +4 -3
- package/src/x_ite/Execution/NamedNodesArray.js +16 -2
- package/src/x_ite/Execution/X3DScene.js +2 -2
- 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 +5 -1
- 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 +3 -3
- 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 +23 -29
- package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +3 -2
- package/src/x_ite/Prototype/ProtoDeclarationArray.js +4 -3
- package/src/x_ite/Routing/RouteArray.js +3 -2
- package/src/x_ite/X3D.js +1 -1
- package/src/x_ite/X3DCanvasElement.js +0 -24
- package/src/x_ite.js +1 -1
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
import X3DField from "../Base/X3DField.js";
|
|
49
49
|
import X3DBaseNode from "../Base/X3DBaseNode.js";
|
|
50
|
+
import X3DNode from "../Components/Core/X3DNode.js";
|
|
50
51
|
import X3DPrototypeInstance from "../Components/Core/X3DPrototypeInstance.js";
|
|
51
52
|
import Fields from "../Fields.js";
|
|
52
53
|
import X3DParser from "./X3DParser.js";
|
|
@@ -330,10 +331,10 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
330
331
|
componentSupportLevel = parseInt (xmlElement .getAttribute ("level"));
|
|
331
332
|
|
|
332
333
|
if (componentNameIdCharacters === null)
|
|
333
|
-
return console .warn ("XML Parser Error: Bad component statement
|
|
334
|
+
return console .warn ("XML Parser Error: Bad component statement. Expected name attribute.");
|
|
334
335
|
|
|
335
336
|
if (componentSupportLevel === null)
|
|
336
|
-
return console .warn ("XML Parser Error: Bad component statement
|
|
337
|
+
return console .warn ("XML Parser Error: Bad component statement. Expected level attribute.");
|
|
337
338
|
|
|
338
339
|
var component = this .getBrowser () .getComponent (componentNameIdCharacters, componentSupportLevel);
|
|
339
340
|
|
|
@@ -352,13 +353,13 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
352
353
|
conversionFactor = xmlElement .getAttribute ("conversionFactor"); //works for html5 as well
|
|
353
354
|
|
|
354
355
|
if (category === null)
|
|
355
|
-
return console .warn ("XML Parser Error: Bad unit statement
|
|
356
|
+
return console .warn ("XML Parser Error: Bad unit statement. Expected category attribute.");
|
|
356
357
|
|
|
357
358
|
if (name === null)
|
|
358
|
-
return console .warn ("XML Parser Error: Bad unit statement
|
|
359
|
+
return console .warn ("XML Parser Error: Bad unit statement. Expected name attribute.");
|
|
359
360
|
|
|
360
361
|
if (conversionFactor === null)
|
|
361
|
-
return console .warn ("XML Parser Error: Bad unit statement
|
|
362
|
+
return console .warn ("XML Parser Error: Bad unit statement. Expected conversionFactor attribute.");
|
|
362
363
|
|
|
363
364
|
this .getScene () .updateUnit (category, name, parseFloat (conversionFactor));
|
|
364
365
|
},
|
|
@@ -369,10 +370,10 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
369
370
|
metavalue = xmlElement .getAttribute ("content");
|
|
370
371
|
|
|
371
372
|
if (metakey === null)
|
|
372
|
-
return console .warn ("XML Parser Error: Bad meta statement
|
|
373
|
+
return console .warn ("XML Parser Error: Bad meta statement. Expected name attribute.");
|
|
373
374
|
|
|
374
375
|
if (metavalue === null)
|
|
375
|
-
return console .warn ("XML Parser Error: Bad meta statement
|
|
376
|
+
return console .warn ("XML Parser Error: Bad meta statement. Expected content attribute.");
|
|
376
377
|
|
|
377
378
|
this .getScene () .addMetaData (metakey, metavalue);
|
|
378
379
|
},
|
|
@@ -449,19 +450,19 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
449
450
|
},
|
|
450
451
|
externProtoDeclareElement: function (xmlElement)
|
|
451
452
|
{
|
|
452
|
-
|
|
453
|
+
const name = xmlElement .getAttribute ("name");
|
|
453
454
|
|
|
454
455
|
if (this .id (name))
|
|
455
456
|
{
|
|
456
|
-
|
|
457
|
+
const url = xmlElement .getAttribute ("url");
|
|
457
458
|
|
|
458
|
-
|
|
459
|
-
|
|
459
|
+
this .parser .setInput (url ?? "");
|
|
460
|
+
this .parser .sfstringValues (this .url);
|
|
460
461
|
|
|
461
|
-
this .
|
|
462
|
-
|
|
462
|
+
if (!this .url .length)
|
|
463
|
+
console .warn ("XML Parser Error: Bad ExternProtoDeclare statement. Expected url attribute with value.");
|
|
463
464
|
|
|
464
|
-
|
|
465
|
+
const externproto = new X3DExternProtoDeclaration (this .getExecutionContext (), this .url);
|
|
465
466
|
|
|
466
467
|
this .pushParent (externproto);
|
|
467
468
|
this .protoInterfaceElement (xmlElement);
|
|
@@ -653,10 +654,10 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
653
654
|
protoFieldName = xmlElement .getAttribute ("protoField");
|
|
654
655
|
|
|
655
656
|
if (nodeFieldName === null)
|
|
656
|
-
return console .warn ("XML Parser Error: Bad connect statement
|
|
657
|
+
return console .warn ("XML Parser Error: Bad connect statement. Expected nodeField attribute.");
|
|
657
658
|
|
|
658
659
|
if (protoFieldName === null)
|
|
659
|
-
return console .warn ("XML Parser Error: Bad connect statement
|
|
660
|
+
return console .warn ("XML Parser Error: Bad connect statement. Expected protoField attribute.");
|
|
660
661
|
|
|
661
662
|
try
|
|
662
663
|
{
|
|
@@ -667,7 +668,7 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
667
668
|
node = this .getParent (),
|
|
668
669
|
proto = this .getPrototype ();
|
|
669
670
|
|
|
670
|
-
if (! (node instanceof
|
|
671
|
+
if (! (node instanceof X3DNode))
|
|
671
672
|
return;
|
|
672
673
|
|
|
673
674
|
var
|
|
@@ -686,7 +687,7 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
686
687
|
}
|
|
687
688
|
catch (error)
|
|
688
689
|
{
|
|
689
|
-
console .warn ("XML Parser Error: Couldn't create IS reference
|
|
690
|
+
console .warn ("XML Parser Error: Couldn't create IS reference. " + error .message);
|
|
690
691
|
}
|
|
691
692
|
},
|
|
692
693
|
protoInstanceElement: function (xmlElement)
|
|
@@ -764,7 +765,7 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
764
765
|
}
|
|
765
766
|
catch (error)
|
|
766
767
|
{
|
|
767
|
-
console .warn ("XML Parser Error: Couldn't assign field value
|
|
768
|
+
console .warn ("XML Parser Error: Couldn't assign field value. " + error .message);
|
|
768
769
|
}
|
|
769
770
|
},
|
|
770
771
|
nodeElement: function (xmlElement)
|
|
@@ -932,17 +933,10 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
932
933
|
if (this .getParents () .length === 0)
|
|
933
934
|
return;
|
|
934
935
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
if (node instanceof X3DBaseNode)
|
|
938
|
-
{
|
|
939
|
-
var field = node .getSourceText ();
|
|
936
|
+
const node = this .getParent ();
|
|
940
937
|
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
field .push (xmlElement .data);
|
|
944
|
-
}
|
|
945
|
-
}
|
|
938
|
+
if (node instanceof X3DNode)
|
|
939
|
+
node .getSourceText () ?.push (xmlElement .data);
|
|
946
940
|
},
|
|
947
941
|
useAttribute: function (xmlElement)
|
|
948
942
|
{
|
|
@@ -45,11 +45,12 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import X3DInfoArray
|
|
48
|
+
import X3DInfoArray from "../Base/X3DInfoArray.js";
|
|
49
|
+
import X3DExternProtoDeclaration from "./X3DExternProtoDeclaration.js"
|
|
49
50
|
|
|
50
51
|
function ExternProtoDeclarationArray (values)
|
|
51
52
|
{
|
|
52
|
-
return X3DInfoArray .call (this, values);
|
|
53
|
+
return X3DInfoArray .call (this, values, X3DExternProtoDeclaration);
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
ExternProtoDeclarationArray .prototype = Object .assign (Object .create (X3DInfoArray .prototype),
|
|
@@ -45,11 +45,12 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import X3DInfoArray
|
|
48
|
+
import X3DInfoArray from "../Base/X3DInfoArray.js";
|
|
49
|
+
import X3DProtoDeclaration from "./X3DProtoDeclaration.js"
|
|
49
50
|
|
|
50
|
-
function ProtoDeclarationArray (
|
|
51
|
+
function ProtoDeclarationArray (values)
|
|
51
52
|
{
|
|
52
|
-
return X3DInfoArray .call (this,
|
|
53
|
+
return X3DInfoArray .call (this, values, X3DProtoDeclaration);
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
ProtoDeclarationArray .prototype = Object .assign (Object .create (X3DInfoArray .prototype),
|
|
@@ -46,10 +46,11 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import X3DInfoArray from "../Base/X3DInfoArray.js";
|
|
49
|
+
import X3DRoute from "./X3DRoute.js";
|
|
49
50
|
|
|
50
|
-
function RouteArray ()
|
|
51
|
+
function RouteArray (values)
|
|
51
52
|
{
|
|
52
|
-
return X3DInfoArray .call (this);
|
|
53
|
+
return X3DInfoArray .call (this, values, X3DRoute);
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
RouteArray .prototype = Object .assign (Object .create (X3DInfoArray .prototype),
|
package/src/x_ite/X3D.js
CHANGED
|
@@ -163,7 +163,7 @@ Object .assign (X3D,
|
|
|
163
163
|
})(),
|
|
164
164
|
getBrowser: function (element)
|
|
165
165
|
{
|
|
166
|
-
return $(element || "x3d-canvas, X3DCanvas") .
|
|
166
|
+
return $(element || "x3d-canvas, X3DCanvas") .prop ("browser");
|
|
167
167
|
},
|
|
168
168
|
createBrowser: function (url, parameter)
|
|
169
169
|
{
|
|
@@ -46,36 +46,13 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import X3DBrowser from "./Browser/X3DBrowser.js";
|
|
49
|
-
import URLs from "./Browser/Networking/URLs.js";
|
|
50
49
|
|
|
51
50
|
class X3DCanvasElement extends HTMLElement
|
|
52
51
|
{
|
|
53
|
-
static define ()
|
|
54
|
-
{
|
|
55
|
-
customElements .define ("x3d-canvas", X3DCanvasElement);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
52
|
constructor ()
|
|
59
53
|
{
|
|
60
54
|
super ();
|
|
61
55
|
|
|
62
|
-
const
|
|
63
|
-
shadow = this .attachShadow ({ mode: "open", delegatesFocus: true }),
|
|
64
|
-
link = document .createElement ("link");
|
|
65
|
-
|
|
66
|
-
$(this) .data ("shadow", $(shadow));
|
|
67
|
-
$(this) .data ("loaded", new Promise (function (resolve, reject)
|
|
68
|
-
{
|
|
69
|
-
link .onload = resolve;
|
|
70
|
-
link .onerror = reject;
|
|
71
|
-
}));
|
|
72
|
-
|
|
73
|
-
link .setAttribute ("rel", "stylesheet");
|
|
74
|
-
link .setAttribute ("type", "text/css");
|
|
75
|
-
link .setAttribute ("href", new URL ("x_ite.css", URLs .getScriptUrl ()) .href);
|
|
76
|
-
|
|
77
|
-
shadow .appendChild (link);
|
|
78
|
-
|
|
79
56
|
new X3DBrowser (this)
|
|
80
57
|
}
|
|
81
58
|
|
|
@@ -98,7 +75,6 @@ class X3DCanvasElement extends HTMLElement
|
|
|
98
75
|
"debug",
|
|
99
76
|
"multisampling",
|
|
100
77
|
"notifications",
|
|
101
|
-
"onerror",
|
|
102
78
|
"oninitialized",
|
|
103
79
|
"onshutdown",
|
|
104
80
|
"splashScreen",
|