x_ite 8.9.6 → 8.10.0
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/laboratory/gltf-sample-viewer.html +1 -1
- 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
|
@@ -96,12 +96,26 @@ Object .assign (X3DOptimizer .prototype,
|
|
|
96
96
|
|
|
97
97
|
return node;
|
|
98
98
|
}
|
|
99
|
+
case "Collision":
|
|
99
100
|
case "LOD":
|
|
100
101
|
case "Switch":
|
|
101
102
|
{
|
|
102
103
|
this .optimizeNodes (node .children, false, removedNodes);
|
|
103
104
|
return node;
|
|
104
105
|
}
|
|
106
|
+
case "HAnimJoint":
|
|
107
|
+
case "HAnimSegment":
|
|
108
|
+
case "HAnimSite":
|
|
109
|
+
{
|
|
110
|
+
node .children = this .optimizeNodes (node .children, true, removedNodes);
|
|
111
|
+
return node;
|
|
112
|
+
}
|
|
113
|
+
case "HAnimHumanoid":
|
|
114
|
+
{
|
|
115
|
+
node .skeleton = this .optimizeNodes (node .skeleton, true, removedNodes);
|
|
116
|
+
node .skin = this .optimizeNodes (node .skin, true, removedNodes);
|
|
117
|
+
return node;
|
|
118
|
+
}
|
|
105
119
|
default:
|
|
106
120
|
{
|
|
107
121
|
return node;
|
|
@@ -125,7 +139,7 @@ Object .assign (X3DOptimizer .prototype,
|
|
|
125
139
|
|
|
126
140
|
if (node .getNodeTypeName () === "Transform")
|
|
127
141
|
{
|
|
128
|
-
this .combineSingleChild (node, removedNodes);
|
|
142
|
+
node = this .combineSingleChild (node, removedNodes);
|
|
129
143
|
|
|
130
144
|
if (!node .translation .getValue () .equals (Vector3 .Zero))
|
|
131
145
|
return node;
|
|
@@ -137,22 +151,27 @@ Object .assign (X3DOptimizer .prototype,
|
|
|
137
151
|
return node;
|
|
138
152
|
}
|
|
139
153
|
|
|
140
|
-
|
|
154
|
+
if (node .children)
|
|
155
|
+
{
|
|
156
|
+
removedNodes .push (node);
|
|
157
|
+
|
|
158
|
+
return [... node .children];
|
|
159
|
+
}
|
|
141
160
|
|
|
142
|
-
return
|
|
161
|
+
return node;
|
|
143
162
|
},
|
|
144
163
|
combineSingleChild (node, removedNodes)
|
|
145
164
|
{
|
|
146
165
|
if (node .children .length !== 1)
|
|
147
|
-
return;
|
|
166
|
+
return node;
|
|
148
167
|
|
|
149
168
|
const child = node .children [0];
|
|
150
169
|
|
|
151
|
-
if (child .getNodeTypeName ()
|
|
152
|
-
return;
|
|
170
|
+
if (!child .getNodeTypeName () .match (/^(?:Transform|HAnimHumanoid)$/))
|
|
171
|
+
return node;
|
|
153
172
|
|
|
154
173
|
if (child .getValue () .hasRoutes ())
|
|
155
|
-
return;
|
|
174
|
+
return node;
|
|
156
175
|
|
|
157
176
|
// Combine single Transform nodes.
|
|
158
177
|
|
|
@@ -165,26 +184,36 @@ Object .assign (X3DOptimizer .prototype,
|
|
|
165
184
|
childMatrix = new Matrix4 ();
|
|
166
185
|
|
|
167
186
|
nodeMatrix .set (node .translation .getValue (),
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
187
|
+
node .rotation .getValue (),
|
|
188
|
+
node .scale .getValue (),
|
|
189
|
+
node .scaleOrientation .getValue (),
|
|
190
|
+
node .center .getValue ());
|
|
171
191
|
|
|
172
192
|
childMatrix .set (child .translation .getValue (),
|
|
173
193
|
child .rotation .getValue (),
|
|
174
194
|
child .scale .getValue (),
|
|
175
|
-
child .scaleOrientation .getValue ()
|
|
195
|
+
child .scaleOrientation .getValue (),
|
|
196
|
+
child .center .getValue ());
|
|
176
197
|
|
|
177
198
|
nodeMatrix .multLeft (childMatrix);
|
|
178
199
|
|
|
179
|
-
nodeMatrix .get (translation, rotation, scale, scaleOrientation);
|
|
200
|
+
nodeMatrix .get (translation, rotation, scale, scaleOrientation, child .center .getValue ());
|
|
201
|
+
|
|
202
|
+
child .translation = translation;
|
|
203
|
+
child .rotation = rotation;
|
|
204
|
+
child .scale = scale;
|
|
205
|
+
child .scaleOrientation = scaleOrientation;
|
|
206
|
+
|
|
207
|
+
if (!child .getNodeTypeName () && node .getNodeTypeName ())
|
|
208
|
+
{
|
|
209
|
+
const executionContext = child .getExecutionContext ();
|
|
210
|
+
|
|
211
|
+
executionContext .addNamedNode (executionContext .getUniqueName (node .getNodeTypeName ()), child);
|
|
212
|
+
}
|
|
180
213
|
|
|
181
|
-
|
|
182
|
-
node .rotation = rotation;
|
|
183
|
-
node .scale = scale;
|
|
184
|
-
node .scaleOrientation = scaleOrientation;
|
|
185
|
-
node .children = child .children;
|
|
214
|
+
removedNodes .push (node);
|
|
186
215
|
|
|
187
|
-
|
|
216
|
+
return child;
|
|
188
217
|
},
|
|
189
218
|
});
|
|
190
219
|
|
|
@@ -64,10 +64,10 @@ function X3DExternProtoDeclaration (executionContext, url)
|
|
|
64
64
|
|
|
65
65
|
this .addType (X3DConstants .X3DExternProtoDeclaration)
|
|
66
66
|
|
|
67
|
-
this .addChildObjects ("load", new Fields .SFBool (true),
|
|
68
|
-
"url", url .copy (), // Must be of type MFString.
|
|
69
|
-
"autoRefresh", new Fields .SFTime (),
|
|
70
|
-
"autoRefreshTimeLimit", new Fields .SFTime (3600));
|
|
67
|
+
this .addChildObjects (X3DConstants .inputOutput, "load", new Fields .SFBool (true),
|
|
68
|
+
X3DConstants .inputOutput, "url", url .copy (), // Must be of type MFString.
|
|
69
|
+
X3DConstants .inputOutput, "autoRefresh", new Fields .SFTime (),
|
|
70
|
+
X3DConstants .inputOutput, "autoRefreshTimeLimit", new Fields .SFTime (3600));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
Object .assign (Object .setPrototypeOf (X3DExternProtoDeclaration .prototype, X3DProtoDeclarationNode .prototype),
|
|
@@ -57,7 +57,7 @@ function X3DProtoDeclarationNode (executionContext)
|
|
|
57
57
|
|
|
58
58
|
this .addType (X3DConstants .X3DProtoDeclarationNode);
|
|
59
59
|
|
|
60
|
-
this .addChildObjects ("updateInstances", new Fields .SFTime ());
|
|
60
|
+
this .addChildObjects (X3DConstants .outputOnly, "updateInstances", new Fields .SFTime ());
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
Object .assign (Object .setPrototypeOf (X3DProtoDeclarationNode .prototype, X3DBaseNode .prototype),
|
|
@@ -81,6 +81,7 @@ function X3DRenderObject (executionContext)
|
|
|
81
81
|
this .localShadows = [ false ];
|
|
82
82
|
this .localFogs = [ null ];
|
|
83
83
|
this .layouts = [ ];
|
|
84
|
+
this .humanoids = [ ];
|
|
84
85
|
this .textureProjectors = [ ];
|
|
85
86
|
this .generatedCubeMapTextures = [ ];
|
|
86
87
|
this .collisions = [ ];
|
|
@@ -232,6 +233,10 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
232
233
|
{
|
|
233
234
|
return this .layouts .at (-1);
|
|
234
235
|
},
|
|
236
|
+
getHumanoids ()
|
|
237
|
+
{
|
|
238
|
+
return this .humanoids;
|
|
239
|
+
},
|
|
235
240
|
getTextureProjectors ()
|
|
236
241
|
{
|
|
237
242
|
return this .textureProjectors;
|
|
@@ -504,8 +509,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
504
509
|
const pointingContext = this .pointingShapes [num];
|
|
505
510
|
|
|
506
511
|
pointingContext .modelViewMatrix .set (modelViewMatrix);
|
|
507
|
-
pointingContext .shapeNode
|
|
508
|
-
pointingContext .scissor
|
|
512
|
+
pointingContext .shapeNode = shapeNode;
|
|
513
|
+
pointingContext .scissor = viewVolume .getScissor ();
|
|
514
|
+
pointingContext .humanoidNode = this .humanoids .at (-1);
|
|
509
515
|
|
|
510
516
|
// Clip planes & sensors
|
|
511
517
|
|
|
@@ -593,8 +599,9 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
593
599
|
const depthContext = this .shadowShapes [num];
|
|
594
600
|
|
|
595
601
|
depthContext .modelViewMatrix .set (modelViewMatrix);
|
|
596
|
-
depthContext .shapeNode
|
|
597
|
-
depthContext .scissor
|
|
602
|
+
depthContext .shapeNode = shapeNode;
|
|
603
|
+
depthContext .scissor = viewVolume .getScissor ();
|
|
604
|
+
depthContext .humanoidNode = this .humanoids .at (-1);
|
|
598
605
|
|
|
599
606
|
// Clip planes
|
|
600
607
|
|
|
@@ -652,6 +659,7 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
652
659
|
renderContext .fogNode = this .localFogs .at (-1);
|
|
653
660
|
renderContext .shapeNode = shapeNode;
|
|
654
661
|
renderContext .appearanceNode = shapeNode .getAppearance ();
|
|
662
|
+
renderContext .humanoidNode = this .humanoids .at (-1);
|
|
655
663
|
|
|
656
664
|
// Clip planes and local lights
|
|
657
665
|
|
|
@@ -712,11 +720,11 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
712
720
|
{
|
|
713
721
|
const
|
|
714
722
|
renderContext = shapes [s],
|
|
715
|
-
{ scissor, clipPlanes, modelViewMatrix, shapeNode } = renderContext,
|
|
723
|
+
{ scissor, clipPlanes, modelViewMatrix, shapeNode, humanoidNode } = renderContext,
|
|
716
724
|
appearanceNode = shapeNode .getAppearance (),
|
|
717
725
|
geometryContext = shapeNode .getGeometryContext (),
|
|
718
726
|
stylePropertiesNode = appearanceNode .getStyleProperties (geometryContext .geometryType),
|
|
719
|
-
shaderNode = browser .getPointingShader (clipPlanes .length, shapeNode),
|
|
727
|
+
shaderNode = browser .getPointingShader (clipPlanes .length, shapeNode, humanoidNode),
|
|
720
728
|
id = browser .addPointingShape (renderContext);
|
|
721
729
|
|
|
722
730
|
gl .scissor (scissor .x - x,
|
|
@@ -733,8 +741,8 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
733
741
|
gl .uniformMatrix4fv (shaderNode .x3d_ModelViewMatrix, false, modelViewMatrix);
|
|
734
742
|
gl .uniform1f (shaderNode .x3d_Id, id);
|
|
735
743
|
|
|
736
|
-
|
|
737
|
-
|
|
744
|
+
stylePropertiesNode ?.setShaderUniforms (gl, shaderNode);
|
|
745
|
+
humanoidNode ?.setShaderUniforms (gl, shaderNode);
|
|
738
746
|
|
|
739
747
|
shapeNode .displaySimple (gl, renderContext, shaderNode);
|
|
740
748
|
browser .resetTextureUnits ();
|
|
@@ -951,11 +959,11 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
951
959
|
{
|
|
952
960
|
const
|
|
953
961
|
renderContext = shapes [s],
|
|
954
|
-
{ scissor, clipPlanes, modelViewMatrix, shapeNode } = renderContext,
|
|
962
|
+
{ scissor, clipPlanes, modelViewMatrix, shapeNode, humanoidNode } = renderContext,
|
|
955
963
|
appearanceNode = shapeNode .getAppearance (),
|
|
956
964
|
geometryContext = shapeNode .getGeometryContext (),
|
|
957
965
|
stylePropertiesNode = appearanceNode .getStyleProperties (geometryContext .geometryType),
|
|
958
|
-
shaderNode = browser .getDepthShader (clipPlanes .length, shapeNode);
|
|
966
|
+
shaderNode = browser .getDepthShader (clipPlanes .length, shapeNode, humanoidNode);
|
|
959
967
|
|
|
960
968
|
gl .scissor (... scissor);
|
|
961
969
|
|
|
@@ -967,8 +975,8 @@ Object .assign (X3DRenderObject .prototype,
|
|
|
967
975
|
gl .uniformMatrix4fv (shaderNode .x3d_ProjectionMatrix, false, projectionMatrixArray);
|
|
968
976
|
gl .uniformMatrix4fv (shaderNode .x3d_ModelViewMatrix, false, modelViewMatrix);
|
|
969
977
|
|
|
970
|
-
|
|
971
|
-
|
|
978
|
+
stylePropertiesNode ?.setShaderUniforms (gl, shaderNode);
|
|
979
|
+
humanoidNode ?.setShaderUniforms (gl, shaderNode);
|
|
972
980
|
|
|
973
981
|
shapeNode .displaySimple (gl, renderContext, shaderNode);
|
|
974
982
|
browser .resetTextureUnits ();
|
package/src/x_ite.html
CHANGED
|
@@ -67,6 +67,23 @@ X3D (() =>
|
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
|
+
"transforms": {
|
|
71
|
+
"name": "CSS Transforms",
|
|
72
|
+
"items": {
|
|
73
|
+
"default": {
|
|
74
|
+
"name": "Default",
|
|
75
|
+
"callback": () => $("#transforms") .css ("transform", "matrix(1, 0, 0, 1, 0, 0)"),
|
|
76
|
+
},
|
|
77
|
+
"75 %": {
|
|
78
|
+
"name": "75 %",
|
|
79
|
+
"callback": () => $("#transforms") .css ("transform", "matrix(0.75, 0, 0, 0.75, 0, 0)"),
|
|
80
|
+
},
|
|
81
|
+
"50 %": {
|
|
82
|
+
"name": "50 %",
|
|
83
|
+
"callback": () => $("#transforms") .css ("transform", "matrix(0.5, 0, 0, 0.5, 0, 0)"),
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
70
87
|
};
|
|
71
88
|
});
|
|
72
89
|
|
|
@@ -76,7 +93,7 @@ X3D (() =>
|
|
|
76
93
|
|
|
77
94
|
let index = localStorage ["Bookmarks.history"] .length - 1;
|
|
78
95
|
|
|
79
|
-
function loadURL (url)
|
|
96
|
+
async function loadURL (url)
|
|
80
97
|
{
|
|
81
98
|
const history = localStorage ["Bookmarks.history"];
|
|
82
99
|
|
|
@@ -113,11 +130,6 @@ X3D (() =>
|
|
|
113
130
|
console .log (Browser .toJSONString ());
|
|
114
131
|
}
|
|
115
132
|
|
|
116
|
-
function viewAll ()
|
|
117
|
-
{
|
|
118
|
-
Browser .viewAll ();
|
|
119
|
-
}
|
|
120
|
-
|
|
121
133
|
const bookmarks = new Bookmarks (Browser, $("#examples-box"));
|
|
122
134
|
|
|
123
135
|
bookmarks .setup ([X_ITE_EXAMPLES, X_ITE_TESTS]);
|
|
@@ -129,7 +141,6 @@ X3D (() =>
|
|
|
129
141
|
$("#print-vrml") .on ("click", toVRMLString);
|
|
130
142
|
$("#print-xml") .on ("click", toXMLString);
|
|
131
143
|
$("#print-json") .on ("click", toJSONString);
|
|
132
|
-
$("#view-all") .on ("click", viewAll);
|
|
133
144
|
$("#browser") .on ("initialized", () => localStorage ["Bookmarks.url"] = Browser .getWorldURL ());
|
|
134
145
|
|
|
135
146
|
$("#location-entry") .keydown (event =>
|
|
@@ -209,7 +220,6 @@ main.color-management #browser {
|
|
|
209
220
|
|
|
210
221
|
#file {
|
|
211
222
|
margin: 10px 40px 10px 20px;
|
|
212
|
-
border-color: white;
|
|
213
223
|
}
|
|
214
224
|
|
|
215
225
|
#file.loaded {
|
|
@@ -227,6 +237,21 @@ main.color-management #browser {
|
|
|
227
237
|
border-color: #ffe32d;
|
|
228
238
|
}
|
|
229
239
|
|
|
240
|
+
#animations {
|
|
241
|
+
margin: 10px 40px 10px 20px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
#animations span {
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
padding: 0 3px;
|
|
247
|
+
font-family: sans-serif;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
#animations span.separator {
|
|
251
|
+
border-left: 1px solid white;
|
|
252
|
+
margin: 0 5px;
|
|
253
|
+
}
|
|
254
|
+
|
|
230
255
|
#browser {
|
|
231
256
|
display: block;
|
|
232
257
|
margin: 10px 0px;
|
|
@@ -397,12 +422,13 @@ main.color-management #browser {
|
|
|
397
422
|
<div>
|
|
398
423
|
<h1 id="version"></h1>
|
|
399
424
|
<p id="file"></p>
|
|
425
|
+
<div id="animations"></div>
|
|
400
426
|
</div>
|
|
401
427
|
</header>
|
|
402
428
|
<main>
|
|
403
429
|
<div>
|
|
404
430
|
<form action="javascript:alert('form submitted')">
|
|
405
|
-
<div style="transform
|
|
431
|
+
<div id="transforms" style="transform-origin: 50% 50%;">
|
|
406
432
|
<x3d-canvas id="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" oninitialized="$('#file') .addClass ('loaded')" x-baseURL="tests/" x-src="lines.x3d" update="auto">
|
|
407
433
|
<p class="fallback">
|
|
408
434
|
Sorry,<br/>
|
|
@@ -420,7 +446,7 @@ main.color-management #browser {
|
|
|
420
446
|
<button id="location-go" type="button">Load URL</button>
|
|
421
447
|
</div>
|
|
422
448
|
<div id="buttons">
|
|
423
|
-
<a
|
|
449
|
+
<a id="print-xml" href="#">XML</a><a id="print-vrml" href="#">VRML</a><a id="print-json" href="#">JSON</a><a href="../dist/example.html">example page</a><a href="tests/d3-x3d/">d3-x3d</a><a href="tests/dom-integration/">dom-integration</a><a href="tests/legacy/">legacy</a>
|
|
424
450
|
</div>
|
|
425
451
|
<div id="links">
|
|
426
452
|
<a href="../x_ite.min.html">x_ite.min.html</a><a href="https://rawgit.com/create3000/x_ite/main/x_ite.min.html">github</a><a id="website" target="_blank">website</a>
|
package/x_ite.min.html
CHANGED
|
@@ -48,6 +48,23 @@ X3D (() =>
|
|
|
48
48
|
},
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
|
+
"transforms": {
|
|
52
|
+
"name": "CSS Transforms",
|
|
53
|
+
"items": {
|
|
54
|
+
"default": {
|
|
55
|
+
"name": "Default",
|
|
56
|
+
"callback": () => $("#transforms") .css ("transform", "matrix(1, 0, 0, 1, 0, 0)"),
|
|
57
|
+
},
|
|
58
|
+
"75 %": {
|
|
59
|
+
"name": "75 %",
|
|
60
|
+
"callback": () => $("#transforms") .css ("transform", "matrix(0.75, 0, 0, 0.75, 0, 0)"),
|
|
61
|
+
},
|
|
62
|
+
"50 %": {
|
|
63
|
+
"name": "50 %",
|
|
64
|
+
"callback": () => $("#transforms") .css ("transform", "matrix(0.5, 0, 0, 0.5, 0, 0)"),
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
51
68
|
};
|
|
52
69
|
});
|
|
53
70
|
|
|
@@ -57,7 +74,7 @@ X3D (() =>
|
|
|
57
74
|
|
|
58
75
|
let index = localStorage ["Bookmarks.history"] .length - 1;
|
|
59
76
|
|
|
60
|
-
function loadURL (url)
|
|
77
|
+
async function loadURL (url)
|
|
61
78
|
{
|
|
62
79
|
const history = localStorage ["Bookmarks.history"];
|
|
63
80
|
|
|
@@ -94,11 +111,6 @@ X3D (() =>
|
|
|
94
111
|
console .log (Browser .toJSONString ());
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
function viewAll ()
|
|
98
|
-
{
|
|
99
|
-
Browser .viewAll ();
|
|
100
|
-
}
|
|
101
|
-
|
|
102
114
|
const bookmarks = new Bookmarks (Browser, $("#examples-box"));
|
|
103
115
|
|
|
104
116
|
bookmarks .setup ([X_ITE_EXAMPLES, X_ITE_TESTS]);
|
|
@@ -110,7 +122,6 @@ X3D (() =>
|
|
|
110
122
|
$("#print-vrml") .on ("click", toVRMLString);
|
|
111
123
|
$("#print-xml") .on ("click", toXMLString);
|
|
112
124
|
$("#print-json") .on ("click", toJSONString);
|
|
113
|
-
$("#view-all") .on ("click", viewAll);
|
|
114
125
|
$("#browser") .on ("initialized", () => localStorage ["Bookmarks.url"] = Browser .getWorldURL ());
|
|
115
126
|
|
|
116
127
|
$("#location-entry") .keydown (event =>
|
|
@@ -190,7 +201,6 @@ main.color-management #browser {
|
|
|
190
201
|
|
|
191
202
|
#file {
|
|
192
203
|
margin: 10px 40px 10px 20px;
|
|
193
|
-
border-color: white;
|
|
194
204
|
}
|
|
195
205
|
|
|
196
206
|
#file.loaded {
|
|
@@ -208,6 +218,21 @@ main.color-management #browser {
|
|
|
208
218
|
border-color: #ffe32d;
|
|
209
219
|
}
|
|
210
220
|
|
|
221
|
+
#animations {
|
|
222
|
+
margin: 10px 40px 10px 20px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
#animations span {
|
|
226
|
+
cursor: pointer;
|
|
227
|
+
padding: 0 3px;
|
|
228
|
+
font-family: sans-serif;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
#animations span.separator {
|
|
232
|
+
border-left: 1px solid white;
|
|
233
|
+
margin: 0 5px;
|
|
234
|
+
}
|
|
235
|
+
|
|
211
236
|
#browser {
|
|
212
237
|
display: block;
|
|
213
238
|
margin: 10px 0px;
|
|
@@ -378,12 +403,13 @@ main.color-management #browser {
|
|
|
378
403
|
<div>
|
|
379
404
|
<h1 id="version"></h1>
|
|
380
405
|
<p id="file"></p>
|
|
406
|
+
<div id="animations"></div>
|
|
381
407
|
</div>
|
|
382
408
|
</header>
|
|
383
409
|
<main>
|
|
384
410
|
<div>
|
|
385
411
|
<form action="javascript:alert('form submitted')">
|
|
386
|
-
<div style="transform
|
|
412
|
+
<div id="transforms" style="transform-origin: 50% 50%;">
|
|
387
413
|
<x3d-canvas id="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" oninitialized="$('#file') .addClass ('loaded')" x-baseURL="src/tests/" x-src="lines.x3d" update="auto">
|
|
388
414
|
<p class="fallback">
|
|
389
415
|
Sorry,<br/>
|
|
@@ -401,7 +427,7 @@ main.color-management #browser {
|
|
|
401
427
|
<button id="location-go" type="button">Load URL</button>
|
|
402
428
|
</div>
|
|
403
429
|
<div id="buttons">
|
|
404
|
-
<a
|
|
430
|
+
<a id="print-xml" href="#">XML</a><a id="print-vrml" href="#">VRML</a><a id="print-json" href="#">JSON</a><a href="dist/example.html">example page</a><a href="src/tests/d3-x3d/">d3-x3d</a><a href="src/tests/dom-integration/">dom-integration</a><a href="src/tests/legacy/">legacy</a>
|
|
405
431
|
</div>
|
|
406
432
|
<div id="links" class="min-links">
|
|
407
433
|
<a href="src/x_ite.html">src/x_ite.html</a><a href="https://rawgit.com/create3000/x_ite/main/x_ite.min.html">github</a><a id="website" target="_blank">website</a>
|