x_ite 8.9.6 → 8.10.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/build/bin/tests.pl +1 -1
- 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 +26 -26
- 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 +35 -34
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +37 -37
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +370 -208
- 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 -30
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +26 -26
- 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 +18 -18
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +23 -23
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +37 -37
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +31 -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 +33 -33
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +18 -18
- 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 +9157 -8799
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +5 -5
- package/docs/_posts/components/Core/MetadataBoolean.md +1 -1
- package/docs/_posts/components/Core/MetadataDouble.md +1 -1
- package/docs/_posts/components/Core/MetadataFloat.md +1 -1
- package/docs/_posts/components/Core/MetadataInteger.md +1 -1
- package/docs/_posts/components/Core/MetadataSet.md +1 -1
- package/docs/_posts/components/Core/MetadataString.md +1 -1
- package/docs/_posts/components/Core/WorldInfo.md +1 -1
- package/docs/_posts/components/EventUtilities/BooleanFilter.md +2 -2
- package/docs/_posts/components/EventUtilities/BooleanSequencer.md +2 -2
- package/docs/_posts/components/EventUtilities/BooleanToggle.md +2 -2
- package/docs/_posts/components/EventUtilities/BooleanTrigger.md +2 -2
- package/docs/_posts/components/EventUtilities/IntegerSequencer.md +2 -2
- package/docs/_posts/components/EventUtilities/IntegerTrigger.md +2 -2
- package/docs/_posts/components/EventUtilities/TimeTrigger.md +2 -2
- package/docs/_posts/components/Geometry2D/Arc2D.md +1 -1
- package/docs/_posts/components/Geometry2D/ArcClose2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Circle2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Disk2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Polyline2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Polypoint2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Rectangle2D.md +1 -1
- package/docs/_posts/components/HAnim/HAnimHumanoid.md +17 -17
- package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/CoordinateInterpolator2D.md +1 -1
- package/docs/_posts/components/Interpolation/NormalInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/OrientationInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/PositionInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +1 -1
- package/docs/_posts/components/Interpolation/ScalarInterpolator.md +1 -1
- package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +1 -1
- package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +1 -1
- package/docs/_posts/components/Networking/LoadSensor.md +1 -1
- package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +1 -1
- package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +1 -1
- package/docs/_posts/components/PointingDeviceSensor/TouchSensor.md +1 -1
- package/docs/_posts/components/Text/Text.md +1 -1
- package/docs/_posts/components/Time/TimeSensor.md +1 -1
- package/docs/_posts/reference/browser-services.md +6 -6
- package/docs/_posts/what's-new.md +23 -0
- package/docs/laboratory/gltf-sample-viewer.html +17 -8
- package/package.json +1 -1
- package/src/assets/shaders/webgl1/Depth.vs.js +4 -4
- package/src/assets/shaders/webgl1/Pointing.fs.js +1 -1
- package/src/assets/shaders/webgl2/Depth.vs.js +7 -4
- package/src/assets/shaders/webgl2/LineTransform.vs.js +24 -12
- package/src/assets/shaders/webgl2/Pointing.fs.js +1 -1
- package/src/assets/shaders/webgl2/Pointing.vs.js +12 -9
- package/src/assets/shaders/webgl2/include/Particle.glsl.js +5 -15
- package/src/assets/shaders/webgl2/include/Skin.glsl.js +88 -0
- package/src/assets/shaders/webgl2/include/Utils.glsl.js +13 -0
- package/src/assets/shaders/webgl2/include/Vertex.glsl.js +17 -8
- package/src/bookmarks.js +54 -2
- package/src/tests.js +0 -360
- package/src/x_ite/Base/X3DArrayField.js +18 -3
- package/src/x_ite/Base/X3DBaseNode.js +73 -56
- package/src/x_ite/Base/X3DObjectArrayField.js +6 -4
- package/src/x_ite/Browser/Core/Context.js +14 -4
- package/src/x_ite/Browser/Core/Notification.js +4 -3
- package/src/x_ite/Browser/Core/X3DCoreContext.js +8 -8
- package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +4 -3
- package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +4 -3
- package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +6 -6
- package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +9 -10
- package/src/x_ite/Browser/Geometry3D/ConeOptions.js +5 -4
- package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +5 -4
- package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +3 -2
- package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +3 -2
- package/src/x_ite/Browser/Layout/ScreenText.js +2 -2
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +4 -4
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +4 -4
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -3
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -3
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +6 -5
- package/src/x_ite/Browser/Navigation/X3DViewer.js +2 -13
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +5 -4
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +8 -18
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +17 -5
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +6 -5
- package/src/x_ite/Browser/Shaders/Shaders.js +4 -0
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +3 -3
- package/src/x_ite/Browser/Sound/X3DSoundContext.js +4 -3
- package/src/x_ite/Browser/Text/PolygonText.js +2 -2
- package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +1 -1
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +49 -17
- package/src/x_ite/Browser/X3DBrowserContext.js +8 -7
- package/src/x_ite/Components/Core/X3DChildNode.js +2 -5
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +14 -14
- package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +1 -1
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +5 -2
- package/src/x_ite/Components/Geometry3D/Extrusion.js +24 -13
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +5 -2
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +2 -2
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +1 -2
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +314 -161
- package/src/x_ite/Components/HAnim/HAnimJoint.js +37 -25
- package/src/x_ite/Components/Layering/X3DLayerNode.js +2 -2
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +1 -1
- package/src/x_ite/Components/Navigation/NavigationInfo.js +4 -4
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +1 -1
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +12 -12
- package/src/x_ite/Components/Networking/X3DUrlObject.js +18 -11
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +17 -14
- package/src/x_ite/Components/Rendering/LineSet.js +16 -13
- package/src/x_ite/Components/Rendering/PointSet.js +16 -12
- package/src/x_ite/Components/Rendering/X3DColorNode.js +1 -3
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +3 -0
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +48 -77
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +31 -12
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +3 -0
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +3 -3
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +2 -2
- package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +1 -1
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +24 -7
- package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +1 -1
- package/src/x_ite/Components/Shape/FillProperties.js +1 -3
- package/src/x_ite/Components/Shape/X3DAppearanceNode.js +1 -3
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +8 -6
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +0 -2
- package/src/x_ite/Components/Sound/AudioClip.js +1 -1
- package/src/x_ite/Components/Sound/BufferAudioSource.js +1 -1
- package/src/x_ite/Components/Sound/ListenerPointSource.js +2 -2
- package/src/x_ite/Components/Sound/MicrophoneSource.js +2 -2
- package/src/x_ite/Components/Sound/OscillatorSource.js +2 -2
- package/src/x_ite/Components/Sound/Sound.js +1 -1
- package/src/x_ite/Components/Sound/StreamAudioSource.js +2 -2
- package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +1 -1
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +4 -4
- package/src/x_ite/Components/Texturing/MultiTexture.js +1 -1
- package/src/x_ite/Components/Texturing/PixelTexture.js +1 -1
- package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +2 -2
- package/src/x_ite/Components/Texturing/X3DTextureNode.js +1 -3
- package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +2 -2
- package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +1 -1
- package/src/x_ite/Components/Time/TimeSensor.js +1 -1
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +2 -2
- package/src/x_ite/Execution/X3DExecutionContext.js +3 -4
- package/src/x_ite/Execution/X3DScene.js +4 -4
- package/src/x_ite/Execution/X3DWorld.js +1 -1
- package/src/x_ite/Parser/GLTF2Parser.js +196 -116
- package/src/x_ite/Parser/X3DOptimizer.js +47 -18
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +4 -4
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
- package/src/x_ite/Rendering/X3DRenderObject.js +20 -12
- package/src/x_ite.html +36 -10
- package/x_ite.min.html +36 -10
|
@@ -53,6 +53,7 @@ import TraverseType from "../../Rendering/TraverseType.js";
|
|
|
53
53
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
54
54
|
import X3DCast from "../../Base/X3DCast.js";
|
|
55
55
|
import Matrix4 from "../../../standard/Math/Numbers/Matrix4.js";
|
|
56
|
+
import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
56
57
|
|
|
57
58
|
function HAnimJoint (executionContext)
|
|
58
59
|
{
|
|
@@ -60,12 +61,15 @@ function HAnimJoint (executionContext)
|
|
|
60
61
|
|
|
61
62
|
this .addType (X3DConstants .HAnimJoint);
|
|
62
63
|
|
|
64
|
+
this .addChildObjects (X3DConstants .outputOnly, "displacements", new Fields .SFTime (),
|
|
65
|
+
X3DConstants .outputOnly, "displacementWeights", new Fields .SFTime ());
|
|
66
|
+
|
|
63
67
|
this .setAllowedTypes (X3DConstants .HAnimJoint,
|
|
64
68
|
X3DConstants .HAnimSegment,
|
|
65
69
|
X3DConstants .HAnimSite);
|
|
66
70
|
|
|
67
|
-
this .displacerNodes
|
|
68
|
-
this .
|
|
71
|
+
this .displacerNodes = [ ];
|
|
72
|
+
this .modelViewMatrix = new Matrix4 ();
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
Object .assign (Object .setPrototypeOf (HAnimJoint .prototype, X3DTransformNode .prototype),
|
|
@@ -74,31 +78,30 @@ Object .assign (Object .setPrototypeOf (HAnimJoint .prototype, X3DTransformNode
|
|
|
74
78
|
{
|
|
75
79
|
X3DTransformNode .prototype .initialize .call (this);
|
|
76
80
|
|
|
77
|
-
this .
|
|
78
|
-
this ._displacers .addInterest ("set_displacers__", this);
|
|
81
|
+
this ._displacers .addInterest ("set_displacers__", this);
|
|
79
82
|
|
|
80
83
|
this .set_displacers__ ();
|
|
81
84
|
},
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
X3DTransformNode .prototype .setCameraObject .call (this, value || !! this ._skinCoordIndex .length);
|
|
85
|
-
},
|
|
86
|
-
getModelMatrix ()
|
|
85
|
+
getModelViewMatrix ()
|
|
87
86
|
{
|
|
88
|
-
return this .
|
|
87
|
+
return this .modelViewMatrix;
|
|
89
88
|
},
|
|
90
89
|
getDisplacers ()
|
|
91
90
|
{
|
|
92
91
|
return this .displacerNodes;
|
|
93
92
|
},
|
|
94
|
-
set_skinCoordIndex__ ()
|
|
95
|
-
{
|
|
96
|
-
this .set_cameraObjects__ ();
|
|
97
|
-
},
|
|
98
93
|
set_displacers__ ()
|
|
99
94
|
{
|
|
100
95
|
const displacerNodes = this .displacerNodes;
|
|
101
96
|
|
|
97
|
+
for (const displacerNode of displacerNodes)
|
|
98
|
+
{
|
|
99
|
+
displacerNode ._coordIndex .removeInterest ("addEvent", this ._displacements);
|
|
100
|
+
displacerNode ._displacements .removeInterest ("addEvent", this ._displacements);
|
|
101
|
+
displacerNode ._coordIndex .removeInterest ("addEvent", this ._displacementWeights);
|
|
102
|
+
displacerNode ._weight .removeInterest ("addEvent", this ._displacementWeights);
|
|
103
|
+
}
|
|
104
|
+
|
|
102
105
|
displacerNodes .length = 0;
|
|
103
106
|
|
|
104
107
|
for (const node of this ._displacers)
|
|
@@ -108,24 +111,33 @@ Object .assign (Object .setPrototypeOf (HAnimJoint .prototype, X3DTransformNode
|
|
|
108
111
|
if (displacerNode)
|
|
109
112
|
displacerNodes .push (displacerNode);
|
|
110
113
|
}
|
|
114
|
+
|
|
115
|
+
for (const displacerNode of displacerNodes)
|
|
116
|
+
{
|
|
117
|
+
displacerNode ._coordIndex .addInterest ("addEvent", this ._displacements);
|
|
118
|
+
displacerNode ._displacements .addInterest ("addEvent", this ._displacements);
|
|
119
|
+
displacerNode ._coordIndex .addInterest ("addEvent", this ._displacementWeights);
|
|
120
|
+
displacerNode ._weight .addInterest ("addEvent", this ._displacementWeights);
|
|
121
|
+
}
|
|
111
122
|
},
|
|
112
123
|
traverse (type, renderObject)
|
|
113
124
|
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
126
|
+
|
|
127
|
+
modelViewMatrix .push ();
|
|
128
|
+
modelViewMatrix .multLeft (this .getMatrix ());
|
|
129
|
+
|
|
130
|
+
if (type === TraverseType .DISPLAY)
|
|
131
|
+
this .modelViewMatrix .assign (modelViewMatrix .get ());
|
|
119
132
|
|
|
120
|
-
X3DTransformNode .prototype .
|
|
133
|
+
X3DTransformNode .prototype .groupTraverse .call (this, type, renderObject);
|
|
134
|
+
|
|
135
|
+
modelViewMatrix .pop ();
|
|
121
136
|
},
|
|
122
137
|
groupTraverse (type, renderObject)
|
|
123
138
|
{
|
|
124
|
-
if (type === TraverseType .
|
|
125
|
-
|
|
126
|
-
if (this ._skinCoordIndex .length)
|
|
127
|
-
this .modelMatrix .assign (renderObject .getModelViewMatrix () .get ());
|
|
128
|
-
}
|
|
139
|
+
if (type === TraverseType .DISPLAY)
|
|
140
|
+
this .modelViewMatrix .assign (renderObject .getModelViewMatrix () .get ());
|
|
129
141
|
|
|
130
142
|
X3DTransformNode .prototype .groupTraverse .call (this, type, renderObject);
|
|
131
143
|
},
|
|
@@ -208,13 +208,13 @@ Object .assign (Object .setPrototypeOf (X3DLayerNode .prototype, X3DNode .protot
|
|
|
208
208
|
{
|
|
209
209
|
return this .collisionTime;
|
|
210
210
|
},
|
|
211
|
-
viewAll (factor = 1, straighten = false)
|
|
211
|
+
viewAll (transitionTime = 1, factor = 1, straighten = false)
|
|
212
212
|
{
|
|
213
213
|
const
|
|
214
214
|
viewpointNode = this .getViewpoint (),
|
|
215
215
|
bbox = this .getBBox (new Box3 ()) .multRight (viewpointNode .getModelMatrix () .copy () .inverse ());
|
|
216
216
|
|
|
217
|
-
viewpointNode .lookAt (this, bbox .center, viewpointNode .getLookAtDistance (bbox), factor, straighten);
|
|
217
|
+
viewpointNode .lookAt (this, bbox .center, viewpointNode .getLookAtDistance (bbox), transitionTime, factor, straighten);
|
|
218
218
|
},
|
|
219
219
|
straightenView ()
|
|
220
220
|
{
|
|
@@ -63,7 +63,7 @@ function NurbsOrientationInterpolator (executionContext)
|
|
|
63
63
|
|
|
64
64
|
this .addType (X3DConstants .NurbsOrientationInterpolator);
|
|
65
65
|
|
|
66
|
-
this .addChildObjects ("rebuild", new Fields .SFTime ());
|
|
66
|
+
this .addChildObjects (X3DConstants .inputOutput, "rebuild", new Fields .SFTime ());
|
|
67
67
|
|
|
68
68
|
this .interpolator = new OrientationInterpolator (executionContext);
|
|
69
69
|
this .knots = [ ];
|
|
@@ -61,7 +61,7 @@ function NurbsPositionInterpolator (executionContext)
|
|
|
61
61
|
|
|
62
62
|
this .addType (X3DConstants .NurbsPositionInterpolator);
|
|
63
63
|
|
|
64
|
-
this .addChildObjects ("rebuild", new Fields .SFTime ());
|
|
64
|
+
this .addChildObjects (X3DConstants .inputOutput, "rebuild", new Fields .SFTime ());
|
|
65
65
|
|
|
66
66
|
this .interpolator = new PositionInterpolator (executionContext);
|
|
67
67
|
this .knots = [ ];
|
|
@@ -65,10 +65,10 @@ function NavigationInfo (executionContext)
|
|
|
65
65
|
|
|
66
66
|
this .addType (X3DConstants .NavigationInfo);
|
|
67
67
|
|
|
68
|
-
this .addChildObjects ("transitionStart", new Fields .SFBool (),
|
|
69
|
-
"transitionActive", new Fields .SFBool (),
|
|
70
|
-
"availableViewers", new Fields .MFString (),
|
|
71
|
-
"viewer", new Fields .SFString ("EXAMINE"));
|
|
68
|
+
this .addChildObjects (X3DConstants .outputOnly, "transitionStart", new Fields .SFBool (),
|
|
69
|
+
X3DConstants .outputOnly, "transitionActive", new Fields .SFBool (),
|
|
70
|
+
X3DConstants .outputOnly, "availableViewers", new Fields .MFString (),
|
|
71
|
+
X3DConstants .outputOnly, "viewer", new Fields .SFString ("EXAMINE"));
|
|
72
72
|
|
|
73
73
|
this ._avatarSize .setUnit ("length");
|
|
74
74
|
this ._speed .setUnit ("speed");
|
|
@@ -61,7 +61,7 @@ function OrthoViewpoint (executionContext)
|
|
|
61
61
|
|
|
62
62
|
this .addType (X3DConstants .OrthoViewpoint);
|
|
63
63
|
|
|
64
|
-
this .addChildObjects ("fieldOfViewOffset", new Fields .MFFloat (0, 0, 0, 0));
|
|
64
|
+
this .addChildObjects (X3DConstants .inputOutput, "fieldOfViewOffset", new Fields .MFFloat (0, 0, 0, 0));
|
|
65
65
|
|
|
66
66
|
this ._position .setUnit ("length");
|
|
67
67
|
this ._centerOfRotation .setUnit ("length");
|
|
@@ -67,12 +67,12 @@ function X3DViewpointNode (executionContext)
|
|
|
67
67
|
|
|
68
68
|
this .addType (X3DConstants .X3DViewpointNode);
|
|
69
69
|
|
|
70
|
-
this .addChildObjects ("positionOffset", new Fields .SFVec3f (),
|
|
71
|
-
"orientationOffset", new Fields .SFRotation (),
|
|
72
|
-
"scaleOffset", new Fields .SFVec3f (1, 1, 1),
|
|
73
|
-
"scaleOrientationOffset", new Fields .SFRotation (),
|
|
74
|
-
"centerOfRotationOffset", new Fields .SFVec3f (),
|
|
75
|
-
"fieldOfViewScale", new Fields .SFFloat (1));
|
|
70
|
+
this .addChildObjects (X3DConstants .inputOutput, "positionOffset", new Fields .SFVec3f (),
|
|
71
|
+
X3DConstants .inputOutput, "orientationOffset", new Fields .SFRotation (),
|
|
72
|
+
X3DConstants .inputOutput, "scaleOffset", new Fields .SFVec3f (1, 1, 1),
|
|
73
|
+
X3DConstants .inputOutput, "scaleOrientationOffset", new Fields .SFRotation (),
|
|
74
|
+
X3DConstants .inputOutput, "centerOfRotationOffset", new Fields .SFVec3f (),
|
|
75
|
+
X3DConstants .inputOutput, "fieldOfViewScale", new Fields .SFFloat (1));
|
|
76
76
|
|
|
77
77
|
this .userPosition = new Vector3 (0, 1, 0);
|
|
78
78
|
this .userOrientation = new Rotation4 ();
|
|
@@ -427,31 +427,31 @@ Object .assign (Object .setPrototypeOf (X3DViewpointNode .prototype, X3DBindable
|
|
|
427
427
|
return r;
|
|
428
428
|
};
|
|
429
429
|
})(),
|
|
430
|
-
lookAtPoint (layerNode, point, factor, straighten)
|
|
430
|
+
lookAtPoint (layerNode, point, transitionTime = 1, factor = 1, straighten = false)
|
|
431
431
|
{
|
|
432
432
|
this .getCameraSpaceMatrix () .multVecMatrix (point);
|
|
433
433
|
this .getModelMatrix () .copy () .inverse () .multVecMatrix (point);
|
|
434
434
|
|
|
435
435
|
const minDistance = layerNode .getNavigationInfo () .getNearValue () * 2;
|
|
436
436
|
|
|
437
|
-
this .lookAt (layerNode, point, minDistance, factor, straighten);
|
|
437
|
+
this .lookAt (layerNode, point, minDistance, transitionTime = 1, factor = 1, straighten = false);
|
|
438
438
|
},
|
|
439
|
-
lookAtBBox (layerNode, bbox, factor, straighten)
|
|
439
|
+
lookAtBBox (layerNode, bbox, transitionTime = 1, factor, straighten)
|
|
440
440
|
{
|
|
441
441
|
bbox = bbox .copy () .multRight (this .getModelMatrix () .copy () .inverse ());
|
|
442
442
|
|
|
443
443
|
const minDistance = Math .max (layerNode .getNavigationInfo () .getNearValue () * 2, this .getLookAtDistance (bbox));
|
|
444
444
|
|
|
445
|
-
this .lookAt (layerNode, bbox .center, minDistance, factor, straighten);
|
|
445
|
+
this .lookAt (layerNode, bbox .center, minDistance, transitionTime, factor, straighten);
|
|
446
446
|
},
|
|
447
|
-
lookAt (layerNode, point, distance, factor, straighten)
|
|
447
|
+
lookAt (layerNode, point, distance, transitionTime = 1, factor = 1, straighten = false)
|
|
448
448
|
{
|
|
449
449
|
const
|
|
450
450
|
offset = point .copy () .add (this .getUserOrientation () .multVecRot (new Vector3 (0, 0, distance))) .subtract (this .getPosition ());
|
|
451
451
|
|
|
452
452
|
layerNode .getNavigationInfo () ._transitionStart = true;
|
|
453
453
|
|
|
454
|
-
this .timeSensor ._cycleInterval =
|
|
454
|
+
this .timeSensor ._cycleInterval = transitionTime;
|
|
455
455
|
this .timeSensor ._stopTime = this .getBrowser () .getCurrentTime ();
|
|
456
456
|
this .timeSensor ._startTime = this .getBrowser () .getCurrentTime ();
|
|
457
457
|
|
|
@@ -58,8 +58,8 @@ function X3DUrlObject (executionContext)
|
|
|
58
58
|
{
|
|
59
59
|
this .addType (X3DConstants .X3DUrlObject);
|
|
60
60
|
|
|
61
|
-
this .addChildObjects ("loadState", new Fields .SFInt32 (X3DConstants .NOT_STARTED_STATE),
|
|
62
|
-
"loadData", new Fields .SFTime ());
|
|
61
|
+
this .addChildObjects (X3DConstants .outputOnly, "loadState", new Fields .SFInt32 (X3DConstants .NOT_STARTED_STATE),
|
|
62
|
+
X3DConstants .inputOutput, "loadData", new Fields .SFTime ());
|
|
63
63
|
|
|
64
64
|
this [_cache] = true;
|
|
65
65
|
this [_autoRefreshStartTime] = Date .now ();
|
|
@@ -149,16 +149,23 @@ Object .assign (X3DUrlObject .prototype,
|
|
|
149
149
|
|
|
150
150
|
const loadState = this .checkLoadState ();
|
|
151
151
|
|
|
152
|
-
|
|
152
|
+
switch (loadState)
|
|
153
153
|
{
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
154
|
+
case X3DConstants .IN_PROGRESS_STATE:
|
|
155
|
+
{
|
|
156
|
+
loading ();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
case X3DConstants .COMPLETE_STATE:
|
|
160
|
+
{
|
|
161
|
+
resolve ();
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
case X3DConstants .FAILED_STATE:
|
|
165
|
+
{
|
|
166
|
+
reject ();
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
162
169
|
}
|
|
163
170
|
|
|
164
171
|
if (!this ._load .getValue ())
|
|
@@ -202,20 +202,21 @@ Object .assign (Object .setPrototypeOf (IndexedLineSet .prototype, X3DLineGeomet
|
|
|
202
202
|
return;
|
|
203
203
|
|
|
204
204
|
const
|
|
205
|
-
coordIndex
|
|
206
|
-
polylines
|
|
207
|
-
colorPerVertex
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
205
|
+
coordIndex = this ._coordIndex,
|
|
206
|
+
polylines = this .getPolylineIndices (),
|
|
207
|
+
colorPerVertex = this ._colorPerVertex .getValue (),
|
|
208
|
+
coordIndicesArray = this .getCoordIndices (),
|
|
209
|
+
attribNodes = this .getAttrib (),
|
|
210
|
+
numAttribNodes = attribNodes .length,
|
|
211
|
+
attribArrays = this .getAttribs (),
|
|
212
|
+
fogCoordNode = this .fogCoordNode,
|
|
213
|
+
colorNode = this .colorNode,
|
|
214
|
+
coordNode = this .coordNode,
|
|
215
|
+
normalNode = this .normalNode,
|
|
216
|
+
fogDepthArray = this .getFogDepths (),
|
|
217
|
+
colorArray = this .getColors (),
|
|
218
|
+
normalArray = this .getNormals (),
|
|
219
|
+
vertexArray = this .getVertices ();
|
|
219
220
|
|
|
220
221
|
// Fill GeometryNode
|
|
221
222
|
|
|
@@ -235,6 +236,8 @@ Object .assign (Object .setPrototypeOf (IndexedLineSet .prototype, X3DLineGeomet
|
|
|
235
236
|
i = polyline [l],
|
|
236
237
|
index = coordIndex [i];
|
|
237
238
|
|
|
239
|
+
coordIndicesArray .push (index);
|
|
240
|
+
|
|
238
241
|
for (let a = 0; a < numAttribNodes; ++ a)
|
|
239
242
|
attribNodes [a] .addValue (index, attribArrays [a]);
|
|
240
243
|
|
|
@@ -152,19 +152,20 @@ Object .assign (Object .setPrototypeOf (LineSet .prototype, X3DLineGeometryNode
|
|
|
152
152
|
// Fill GeometryNode
|
|
153
153
|
|
|
154
154
|
const
|
|
155
|
-
vertexCount
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
155
|
+
vertexCount = this ._vertexCount,
|
|
156
|
+
coordIndicesArray = this .getCoordIndices (),
|
|
157
|
+
attribNodes = this .getAttrib (),
|
|
158
|
+
numAttribNodes = attribNodes .length,
|
|
159
|
+
attribArrays = this .getAttribs (),
|
|
160
|
+
fogCoordNode = this .fogCoordNode,
|
|
161
|
+
colorNode = this .colorNode,
|
|
162
|
+
normalNode = this .normalNode,
|
|
163
|
+
coordNode = this .coordNode,
|
|
164
|
+
fogDepthArray = this .getFogDepths (),
|
|
165
|
+
colorArray = this .getColors (),
|
|
166
|
+
normalArray = this .getNormals (),
|
|
167
|
+
vertexArray = this .getVertices (),
|
|
168
|
+
size = coordNode .getSize ();
|
|
168
169
|
|
|
169
170
|
let index = 0;
|
|
170
171
|
|
|
@@ -179,6 +180,8 @@ Object .assign (Object .setPrototypeOf (LineSet .prototype, X3DLineGeometryNode
|
|
|
179
180
|
|
|
180
181
|
for (let i = 0; i < count; ++ i, index += i & 1)
|
|
181
182
|
{
|
|
183
|
+
coordIndicesArray .push (index);
|
|
184
|
+
|
|
182
185
|
for (let a = 0; a < numAttribNodes; ++ a)
|
|
183
186
|
attribNodes [a] .addValue (index, attribArrays [a]);
|
|
184
187
|
|
|
@@ -152,18 +152,22 @@ Object .assign (Object .setPrototypeOf (PointSet .prototype, X3DPointGeometryNod
|
|
|
152
152
|
return;
|
|
153
153
|
|
|
154
154
|
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
155
|
+
coordIndicesArray = this .getCoordIndices (),
|
|
156
|
+
attribNodes = this .getAttrib (),
|
|
157
|
+
numAttribNodes = attribNodes .length,
|
|
158
|
+
attribArrays = this .getAttribs (),
|
|
159
|
+
fogCoordNode = this .fogCoordNode,
|
|
160
|
+
fogDepthArray = this .getFogDepths (),
|
|
161
|
+
colorNode = this .colorNode,
|
|
162
|
+
colorArray = this .getColors (),
|
|
163
|
+
coordNode = this .coordNode,
|
|
164
|
+
normalArray = this .getNormals (),
|
|
165
|
+
normalNode = this .normalNode,
|
|
166
|
+
vertexArray = this .getVertices (),
|
|
167
|
+
numPoints = coordNode ._point .length;
|
|
168
|
+
|
|
169
|
+
for (let i = 0; i < numPoints; ++ i)
|
|
170
|
+
coordIndicesArray .push (i);
|
|
167
171
|
|
|
168
172
|
for (let a = 0; a < numAttribNodes; ++ a)
|
|
169
173
|
{
|
|
@@ -55,9 +55,7 @@ function X3DColorNode (executionContext)
|
|
|
55
55
|
|
|
56
56
|
this .addType (X3DConstants .X3DColorNode);
|
|
57
57
|
|
|
58
|
-
this .addChildObjects ("transparent", new Fields .SFBool ());
|
|
59
|
-
|
|
60
|
-
this ._transparent .setAccessType (X3DConstants .outputOnly);
|
|
58
|
+
this .addChildObjects (X3DConstants .outputOnly, "transparent", new Fields .SFBool ());
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
Object .assign (Object .setPrototypeOf (X3DColorNode .prototype, X3DGeometricPropertyNode .prototype),
|
|
@@ -196,6 +196,7 @@ Object .assign (Object .setPrototypeOf (X3DComposedGeometryNode .prototype, X3DG
|
|
|
196
196
|
const
|
|
197
197
|
colorPerVertex = this ._colorPerVertex .getValue (),
|
|
198
198
|
normalPerVertex = this ._normalPerVertex .getValue (),
|
|
199
|
+
coordIndicesArray = this .getCoordIndices (),
|
|
199
200
|
attribNodes = this .getAttrib (),
|
|
200
201
|
numAttribNodes = attribNodes .length,
|
|
201
202
|
attribArrays = this .getAttribs (),
|
|
@@ -220,6 +221,8 @@ Object .assign (Object .setPrototypeOf (X3DComposedGeometryNode .prototype, X3DG
|
|
|
220
221
|
face = Math .floor (i / verticesPerFace),
|
|
221
222
|
index = this .getPolygonIndex (this .getTriangleIndex (i));
|
|
222
223
|
|
|
224
|
+
coordIndicesArray .push (index);
|
|
225
|
+
|
|
223
226
|
for (let a = 0; a < numAttribNodes; ++ a)
|
|
224
227
|
attribNodes [a] .addValue (index, attribArrays [a]);
|
|
225
228
|
|