x_ite 8.3.2 → 8.3.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/.github/workflows/pages-deploy.yml +1 -1
- package/.vscode/settings.json +2 -1
- package/dist/LICENSE.md +4 -4
- 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 +61 -74
- 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/{ProjectiveTextureMapping.js → TextureProjector.js} +39 -39
- package/dist/assets/components/TextureProjector.min.js +1 -0
- 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 +1492 -1291
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/Gemfile +1 -4
- package/docs/_config.yml +3 -3
- package/docs/_posts/getting-started.md +147 -441
- package/docs/_posts/reference/scene-services.md +13 -2
- package/docs/_posts/what's-new.md +21 -3
- package/docs/_tabs/playground.html +36 -40
- package/docs/assets/css/style.scss +18 -0
- package/package.json +1 -1
- package/src/assets/components/{ProjectiveTextureMapping.js → TextureProjector.js} +5 -5
- package/src/examples.js +1 -1
- package/src/tests.js +5 -5
- package/src/x_ite/Base/X3DInfoArray.js +21 -21
- package/src/x_ite/Base/X3DObject.js +29 -20
- package/src/x_ite/Base/X3DObjectArrayField.js +27 -26
- package/src/x_ite/Base/X3DTypedArrayField.js +34 -32
- package/src/x_ite/Browser/DOMIntegration.js +4 -3
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +43 -28
- package/src/x_ite/Components/Core/X3DNode.js +196 -187
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +113 -90
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +18 -43
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +24 -25
- package/src/x_ite/Components/HAnim/HAnimJoint.js +19 -31
- package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +14 -1
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +0 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjector.js +1 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjectorParallel.js +1 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/X3DTextureProjectorNode.js +0 -0
- package/src/x_ite/Components/Time/TimeSensor.js +5 -0
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +1 -0
- package/src/x_ite/Configuration/ComponentInfo.js +20 -23
- package/src/x_ite/Configuration/ProfileInfo.js +6 -6
- package/src/x_ite/Configuration/SupportedComponents.js +22 -20
- package/src/x_ite/Configuration/SupportedProfiles.js +1 -1
- package/src/x_ite/Configuration/UnitInfo.js +24 -27
- package/src/x_ite/Execution/X3DExecutionContext.js +28 -59
- package/src/x_ite/Execution/X3DExportedNode.js +23 -28
- package/src/x_ite/Execution/X3DImportedNode.js +63 -67
- package/src/x_ite/Execution/X3DScene.js +98 -117
- package/src/x_ite/Fields/ArrayFields.js +57 -55
- package/src/x_ite/Fields/SFBool.js +6 -6
- package/src/x_ite/Fields/SFColor.js +10 -12
- package/src/x_ite/Fields/SFDouble.js +7 -10
- package/src/x_ite/Fields/SFFloat.js +7 -10
- package/src/x_ite/Fields/SFImage.js +33 -8
- package/src/x_ite/Fields/SFInt32.js +6 -6
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +13 -13
- package/src/x_ite/Fields/SFNode.js +42 -19
- package/src/x_ite/Fields/SFRotation.js +13 -13
- package/src/x_ite/Fields/SFString.js +6 -7
- package/src/x_ite/Fields/SFTime.js +6 -6
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +10 -10
- package/src/x_ite/InputOutput/FileLoader.js +1 -1
- package/src/x_ite/InputOutput/Generator.js +117 -17
- package/src/x_ite/Parser/VRMLParser.js +24 -27
- package/src/x_ite/Parser/X3DParser.js +0 -4
- package/src/x_ite/Parser/XMLParser.js +2 -2
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +59 -64
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +86 -93
- package/src/x_ite/Rendering/X3DRenderObject.js +6 -1
- package/src/x_ite/Routing/X3DRoute.js +37 -40
- package/src/x_ite.html +1 -1
- package/x_ite.min.html +1 -1
- package/dist/assets/components/ProjectiveTextureMapping.min.js +0 -1
- package/docs/Gemfile.lock +0 -116
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import X3DArrayField from "./X3DArrayField.js";
|
|
49
|
-
import Generator from "../InputOutput/Generator.js";
|
|
50
49
|
import Algorithm from "../../standard/Math/Algorithm.js";
|
|
51
50
|
|
|
52
51
|
const
|
|
@@ -688,11 +687,10 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
688
687
|
|
|
689
688
|
return newArray;
|
|
690
689
|
},
|
|
691
|
-
toStream: function (
|
|
690
|
+
toStream: function (generator)
|
|
692
691
|
{
|
|
693
692
|
const
|
|
694
693
|
target = this [_target],
|
|
695
|
-
generator = Generator .Get (stream),
|
|
696
694
|
array = target .getValue (),
|
|
697
695
|
length = target [_length],
|
|
698
696
|
components = target .getComponents (),
|
|
@@ -702,7 +700,9 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
702
700
|
{
|
|
703
701
|
case 0:
|
|
704
702
|
{
|
|
705
|
-
|
|
703
|
+
generator .string += "[";
|
|
704
|
+
generator .string += generator .TidySpace ();
|
|
705
|
+
generator .string += "]";
|
|
706
706
|
break;
|
|
707
707
|
}
|
|
708
708
|
case 1:
|
|
@@ -713,14 +713,14 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
713
713
|
{
|
|
714
714
|
value .set (array [0]);
|
|
715
715
|
|
|
716
|
-
value .toStream (
|
|
716
|
+
value .toStream (generator);
|
|
717
717
|
}
|
|
718
718
|
else
|
|
719
719
|
{
|
|
720
720
|
for (let c = 0, first = 0; c < components; ++ c, ++ first)
|
|
721
721
|
value [c] = array [first];
|
|
722
722
|
|
|
723
|
-
value .toStream (
|
|
723
|
+
value .toStream (generator);
|
|
724
724
|
}
|
|
725
725
|
|
|
726
726
|
generator .PopUnitCategory ();
|
|
@@ -730,64 +730,65 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
730
730
|
{
|
|
731
731
|
generator .PushUnitCategory (target .getUnit ());
|
|
732
732
|
|
|
733
|
-
|
|
733
|
+
generator .string += "[";
|
|
734
|
+
generator .string += generator .ListStart ();
|
|
734
735
|
generator .IncIndent ();
|
|
735
736
|
|
|
736
737
|
if (components === 1)
|
|
737
738
|
{
|
|
738
739
|
for (let i = 0, n = length - 1; i < n; ++ i)
|
|
739
740
|
{
|
|
740
|
-
|
|
741
|
+
generator .string += generator .ListIndent ();
|
|
741
742
|
|
|
742
743
|
value .set (array [i * components]);
|
|
743
|
-
value .toStream (
|
|
744
|
+
value .toStream (generator);
|
|
744
745
|
|
|
745
|
-
|
|
746
|
+
generator .string += generator .Comma ();
|
|
747
|
+
generator .string += generator .ListBreak ();
|
|
746
748
|
}
|
|
747
749
|
|
|
748
|
-
|
|
750
|
+
generator .string += generator .ListIndent ();
|
|
749
751
|
value .set (array [(length - 1) * components]);
|
|
750
|
-
value .toStream (
|
|
751
|
-
|
|
752
|
-
stream .string += "\n";
|
|
752
|
+
value .toStream (generator);
|
|
753
753
|
}
|
|
754
754
|
else
|
|
755
755
|
{
|
|
756
756
|
for (let i = 0, n = length - 1; i < n; ++ i)
|
|
757
757
|
{
|
|
758
|
-
|
|
758
|
+
generator .string += generator .ListIndent ();
|
|
759
759
|
|
|
760
760
|
for (let c = 0, first = i * components; c < components; ++ c, ++ first)
|
|
761
761
|
value [c] = array [first];
|
|
762
762
|
|
|
763
|
-
value .toStream (
|
|
763
|
+
value .toStream (generator);
|
|
764
764
|
|
|
765
|
-
|
|
765
|
+
generator .string += generator .Comma ();
|
|
766
|
+
generator .string += generator .ListBreak ();
|
|
766
767
|
}
|
|
767
768
|
|
|
768
|
-
|
|
769
|
+
generator .string += generator .ListIndent ();
|
|
769
770
|
|
|
770
771
|
for (let c = 0, first = (length - 1) * components; c < components; ++ c, ++ first)
|
|
771
772
|
value [c] = array [first];
|
|
772
773
|
|
|
773
|
-
value .toStream (
|
|
774
|
-
stream .string += "\n";
|
|
774
|
+
value .toStream (generator);
|
|
775
775
|
}
|
|
776
776
|
|
|
777
|
+
generator .string += generator .ListEnd ();
|
|
777
778
|
generator .DecIndent ();
|
|
778
|
-
|
|
779
|
-
|
|
779
|
+
generator .string += generator .ListIndent ();
|
|
780
|
+
generator .string += "]";
|
|
780
781
|
|
|
781
782
|
generator .PopUnitCategory ();
|
|
782
783
|
break;
|
|
783
784
|
}
|
|
784
785
|
}
|
|
785
786
|
},
|
|
786
|
-
toVRMLStream: function (
|
|
787
|
+
toVRMLStream: function (generator)
|
|
787
788
|
{
|
|
788
|
-
this .toStream (
|
|
789
|
+
this .toStream (generator);
|
|
789
790
|
},
|
|
790
|
-
toXMLStream: function (
|
|
791
|
+
toXMLStream: function (generator)
|
|
791
792
|
{
|
|
792
793
|
const
|
|
793
794
|
target = this [_target],
|
|
@@ -796,7 +797,6 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
796
797
|
if (length)
|
|
797
798
|
{
|
|
798
799
|
const
|
|
799
|
-
generator = Generator .Get (stream),
|
|
800
800
|
array = target .getValue (),
|
|
801
801
|
components = target .getComponents (),
|
|
802
802
|
value = new (target .getSingleType ()) ();
|
|
@@ -808,14 +808,15 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
808
808
|
for (let i = 0, n = length - 1; i < n; ++ i)
|
|
809
809
|
{
|
|
810
810
|
value .set (array [i * components]);
|
|
811
|
-
value .toXMLStream (
|
|
811
|
+
value .toXMLStream (generator);
|
|
812
812
|
|
|
813
|
-
|
|
813
|
+
generator .string += generator .Comma ();
|
|
814
|
+
generator .string += generator .TidySpace ();
|
|
814
815
|
}
|
|
815
816
|
|
|
816
817
|
value .set (array [(length - 1) * components]);
|
|
817
818
|
|
|
818
|
-
value .toXMLStream (
|
|
819
|
+
value .toXMLStream (generator);
|
|
819
820
|
}
|
|
820
821
|
else
|
|
821
822
|
{
|
|
@@ -824,15 +825,16 @@ X3DTypedArrayField .prototype = Object .assign (Object .create (X3DArrayField .p
|
|
|
824
825
|
for (let c = 0, first = i * components; c < components; ++ c, ++ first)
|
|
825
826
|
value [c] = array [first];
|
|
826
827
|
|
|
827
|
-
value .toXMLStream (
|
|
828
|
+
value .toXMLStream (generator);
|
|
828
829
|
|
|
829
|
-
|
|
830
|
+
generator .string += generator .Comma ();
|
|
831
|
+
generator .string += generator .TidySpace ();
|
|
830
832
|
}
|
|
831
833
|
|
|
832
834
|
for (let c = 0, first = (length - 1) * components; c < components; ++ c, ++ first)
|
|
833
835
|
value [c] = array [first];
|
|
834
836
|
|
|
835
|
-
value .toXMLStream (
|
|
837
|
+
value .toXMLStream (generator);
|
|
836
838
|
}
|
|
837
839
|
|
|
838
840
|
generator .PopUnitCategory ();
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
import XMLParser from "../Parser/XMLParser.js"
|
|
27
27
|
import X3DConstants from "../Base/X3DConstants.js";
|
|
28
|
+
import SFNodeCache from "../Fields/SFNodeCache.js";
|
|
28
29
|
|
|
29
30
|
class DOMIntegration
|
|
30
31
|
{
|
|
@@ -301,7 +302,7 @@ class DOMIntegration
|
|
|
301
302
|
{
|
|
302
303
|
const event = new CustomEvent ("load",
|
|
303
304
|
{
|
|
304
|
-
detail: { node:
|
|
305
|
+
detail: { node: SFNodeCache .get (node) },
|
|
305
306
|
});
|
|
306
307
|
|
|
307
308
|
element .dispatchEvent (event);
|
|
@@ -311,7 +312,7 @@ class DOMIntegration
|
|
|
311
312
|
{
|
|
312
313
|
const event = new CustomEvent ("error",
|
|
313
314
|
{
|
|
314
|
-
detail: { node:
|
|
315
|
+
detail: { node: SFNodeCache .get (node) },
|
|
315
316
|
});
|
|
316
317
|
|
|
317
318
|
element .dispatchEvent (event);
|
|
@@ -365,7 +366,7 @@ class DOMIntegration
|
|
|
365
366
|
const event = new CustomEvent (field .getName (),
|
|
366
367
|
{
|
|
367
368
|
detail: {
|
|
368
|
-
node:
|
|
369
|
+
node: SFNodeCache .get (node),
|
|
369
370
|
value: field .valueOf (),
|
|
370
371
|
},
|
|
371
372
|
});
|
|
@@ -72,7 +72,8 @@ import _ from "../../locale/gettext.js";
|
|
|
72
72
|
const
|
|
73
73
|
_DOMIntegration = Symbol (),
|
|
74
74
|
_loader = Symbol (),
|
|
75
|
-
_browserCallbacks = Symbol ()
|
|
75
|
+
_browserCallbacks = Symbol (),
|
|
76
|
+
_console = Symbol ();
|
|
76
77
|
|
|
77
78
|
function X3DBrowser (element)
|
|
78
79
|
{
|
|
@@ -86,6 +87,7 @@ function X3DBrowser (element)
|
|
|
86
87
|
X3DBrowserContext .call (this, element);
|
|
87
88
|
|
|
88
89
|
this [_browserCallbacks] = new Map ();
|
|
90
|
+
this [_console] = document .getElementsByClassName ("x_ite-console");
|
|
89
91
|
|
|
90
92
|
this .setup ();
|
|
91
93
|
};
|
|
@@ -119,25 +121,28 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
|
|
|
119
121
|
|
|
120
122
|
if (this .getInstanceId () > 1) return;
|
|
121
123
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
124
|
+
$(() =>
|
|
125
|
+
{
|
|
126
|
+
this .print ("Welcome to " + this .name + " X3D Browser v" + this .version + ":\n" +
|
|
127
|
+
" Current Graphics Renderer\n" +
|
|
128
|
+
" Name: " + this .getVendor () + " " + this .getRenderer () + "\n" +
|
|
129
|
+
" WebGL version: " + this .getWebGLVersion () + "\n" +
|
|
130
|
+
" Shading language: " + this .getShadingLanguageVersion () + "\n" +
|
|
131
|
+
" Rendering Properties\n" +
|
|
132
|
+
" Antialiased: " + this .getAntialiased () + "\n" +
|
|
133
|
+
" Depth size: " + this .getDepthSize () + " bits\n" +
|
|
134
|
+
" Color depth: " + this .getColorDepth () + " bits\n" +
|
|
135
|
+
" Max clip planes per shape: " + this .getMaxClipPlanes () + "\n" +
|
|
136
|
+
" Max lights per shape: " + this .getMaxLights () + "\n" +
|
|
137
|
+
" Max multi textures per shape: " + this .getMaxTextures () + "\n" +
|
|
138
|
+
" Texture units: " + this .getMaxCombinedTextureUnits () + "\n" +
|
|
139
|
+
" Max texture size: " + this .getMaxTextureSize () + " × " + this .getMaxTextureSize () + " pixels\n" +
|
|
140
|
+
" Texture memory: " + this .getTextureMemory () + "\n" +
|
|
141
|
+
" Max vertex uniform vectors: " + this .getMaxVertexUniformVectors () + "\n" +
|
|
142
|
+
" Max fragment uniform vectors: " + this .getMaxFragmentUniformVectors () + "\n" +
|
|
143
|
+
" Max vertex attribs: " + this .getMaxVertexAttribs () + "\n" +
|
|
144
|
+
" Max varying vectors: " + this .getMaxVaryingVectors () + "\n");
|
|
145
|
+
});
|
|
141
146
|
},
|
|
142
147
|
getName: function ()
|
|
143
148
|
{
|
|
@@ -781,23 +786,33 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
|
|
|
781
786
|
},
|
|
782
787
|
print: function ()
|
|
783
788
|
{
|
|
784
|
-
|
|
789
|
+
const string = Array .prototype .join .call (arguments, "");
|
|
790
|
+
|
|
791
|
+
console .log (string);
|
|
792
|
+
|
|
793
|
+
for (const element of this [_console])
|
|
794
|
+
element .append (document .createTextNode (string));
|
|
785
795
|
},
|
|
786
796
|
println: function ()
|
|
787
797
|
{
|
|
788
|
-
|
|
798
|
+
const string = Array .prototype .join .call (arguments, "");
|
|
799
|
+
|
|
800
|
+
console .log (string);
|
|
801
|
+
|
|
802
|
+
for (const element of this [_console])
|
|
803
|
+
element .append (document .createTextNode (string + "\n"));
|
|
789
804
|
},
|
|
790
|
-
toVRMLStream: function (
|
|
805
|
+
toVRMLStream: function (generator)
|
|
791
806
|
{
|
|
792
|
-
this .currentScene .toVRMLStream (
|
|
807
|
+
this .currentScene .toVRMLStream (generator);
|
|
793
808
|
},
|
|
794
|
-
toXMLStream: function (
|
|
809
|
+
toXMLStream: function (generator)
|
|
795
810
|
{
|
|
796
|
-
this .currentScene .toXMLStream (
|
|
811
|
+
this .currentScene .toXMLStream (generator);
|
|
797
812
|
},
|
|
798
|
-
toJSONStream: function (
|
|
813
|
+
toJSONStream: function (generator)
|
|
799
814
|
{
|
|
800
|
-
this .currentScene .toJSONStream (
|
|
815
|
+
this .currentScene .toJSONStream (generator);
|
|
801
816
|
},
|
|
802
817
|
});
|
|
803
818
|
|