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
|
@@ -88,9 +88,9 @@ function X3DBaseNode (executionContext, browser = executionContext .getBrowser (
|
|
|
88
88
|
|
|
89
89
|
// Create fields.
|
|
90
90
|
|
|
91
|
-
this .addChildObjects ("name_changed", new Fields .SFTime (),
|
|
92
|
-
"typeName_changed", new Fields .SFTime (),
|
|
93
|
-
"parents_changed", new Fields .SFTime ())
|
|
91
|
+
this .addChildObjects (X3DConstants .outputOnly, "name_changed", new Fields .SFTime (),
|
|
92
|
+
X3DConstants .outputOnly, "typeName_changed", new Fields .SFTime (),
|
|
93
|
+
X3DConstants .outputOnly, "parents_changed", new Fields .SFTime ())
|
|
94
94
|
|
|
95
95
|
for (const fieldDefinition of this [_fieldDefinitions])
|
|
96
96
|
this .addPredefinedField (fieldDefinition);
|
|
@@ -144,6 +144,64 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, X3DChildObject .
|
|
|
144
144
|
{
|
|
145
145
|
return this [_type];
|
|
146
146
|
},
|
|
147
|
+
create (executionContext = this [_executionContext])
|
|
148
|
+
{
|
|
149
|
+
return new (this .constructor) (executionContext);
|
|
150
|
+
},
|
|
151
|
+
copy (executionContext)
|
|
152
|
+
{
|
|
153
|
+
const copy = this .create (executionContext);
|
|
154
|
+
|
|
155
|
+
for (const field of this [_predefinedFields])
|
|
156
|
+
copy .getPredefinedFields () .get (field .getName ()) .assign (field);
|
|
157
|
+
|
|
158
|
+
if (this .canUserDefinedFields ())
|
|
159
|
+
{
|
|
160
|
+
for (const field of this [_userDefinedFields])
|
|
161
|
+
copy .addUserDefinedField (field .getAccessType (), field .getName (), field .copy ());
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
copy .setup ();
|
|
165
|
+
|
|
166
|
+
return copy;
|
|
167
|
+
},
|
|
168
|
+
// replaceWith (replacement, cache = false)
|
|
169
|
+
// {
|
|
170
|
+
// cache = cache && SFNodeCache .get (this);
|
|
171
|
+
|
|
172
|
+
// for (const parent of new Set (this .getParents ()))
|
|
173
|
+
// {
|
|
174
|
+
// if (parent instanceof Fields .SFNode && parent !== cache)
|
|
175
|
+
// parent .setValue (replacement)
|
|
176
|
+
// }
|
|
177
|
+
// },
|
|
178
|
+
setup ()
|
|
179
|
+
{
|
|
180
|
+
Object .freeze (this [_type]);
|
|
181
|
+
|
|
182
|
+
this [_fieldDefinitions] .addParent (this);
|
|
183
|
+
this [_predefinedFields] .addParent (this);
|
|
184
|
+
this [_userDefinedFields] .addParent (this);
|
|
185
|
+
|
|
186
|
+
for (const field of this [_childObjects])
|
|
187
|
+
field .setTainted (false);
|
|
188
|
+
|
|
189
|
+
for (const field of this [_predefinedFields])
|
|
190
|
+
field .setTainted (false);
|
|
191
|
+
|
|
192
|
+
for (const field of this [_userDefinedFields])
|
|
193
|
+
field .setTainted (false);
|
|
194
|
+
|
|
195
|
+
this .initialize ();
|
|
196
|
+
|
|
197
|
+
this [_initialized] = true;
|
|
198
|
+
},
|
|
199
|
+
initialize ()
|
|
200
|
+
{ },
|
|
201
|
+
isInitialized ()
|
|
202
|
+
{
|
|
203
|
+
return this [_initialized];
|
|
204
|
+
},
|
|
147
205
|
getInnerNode ()
|
|
148
206
|
{
|
|
149
207
|
return this;
|
|
@@ -180,7 +238,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, X3DChildObject .
|
|
|
180
238
|
|
|
181
239
|
// Add isLive event.
|
|
182
240
|
|
|
183
|
-
this .addChildObjects ("live", new Fields .SFBool (this .getLiveState ()));
|
|
241
|
+
this .addChildObjects (X3DConstants .outputOnly, "live", new Fields .SFBool (this .getLiveState ()));
|
|
184
242
|
|
|
185
243
|
// Event processing is done manually and immediately, so:
|
|
186
244
|
this ._live .removeParent (this);
|
|
@@ -234,66 +292,19 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, X3DChildObject .
|
|
|
234
292
|
}
|
|
235
293
|
}
|
|
236
294
|
},
|
|
237
|
-
|
|
295
|
+
addChildObjects (/* accessType, name, field, ... */)
|
|
238
296
|
{
|
|
239
|
-
|
|
297
|
+
for (let i = 0, length = arguments .length; i < length; i += 3)
|
|
298
|
+
this .addChildObject (arguments [i], arguments [i + 1], arguments [i + 2]);
|
|
240
299
|
},
|
|
241
|
-
|
|
242
|
-
{
|
|
243
|
-
Object .freeze (this [_type]);
|
|
244
|
-
|
|
245
|
-
this [_fieldDefinitions] .addParent (this);
|
|
246
|
-
this [_predefinedFields] .addParent (this);
|
|
247
|
-
this [_userDefinedFields] .addParent (this);
|
|
248
|
-
|
|
249
|
-
for (const field of this [_childObjects])
|
|
250
|
-
field .setTainted (false);
|
|
251
|
-
|
|
252
|
-
for (const field of this [_predefinedFields])
|
|
253
|
-
field .setTainted (false);
|
|
254
|
-
|
|
255
|
-
for (const field of this [_userDefinedFields])
|
|
256
|
-
field .setTainted (false);
|
|
257
|
-
|
|
258
|
-
this .initialize ();
|
|
259
|
-
|
|
260
|
-
this [_initialized] = true;
|
|
261
|
-
},
|
|
262
|
-
initialize ()
|
|
263
|
-
{ },
|
|
264
|
-
isInitialized ()
|
|
265
|
-
{
|
|
266
|
-
return this [_initialized];
|
|
267
|
-
},
|
|
268
|
-
copy (executionContext)
|
|
269
|
-
{
|
|
270
|
-
const copy = this .create (executionContext);
|
|
271
|
-
|
|
272
|
-
for (const field of this [_predefinedFields])
|
|
273
|
-
copy .getPredefinedFields () .get (field .getName ()) .assign (field);
|
|
274
|
-
|
|
275
|
-
if (this .canUserDefinedFields ())
|
|
276
|
-
{
|
|
277
|
-
for (const field of this [_userDefinedFields])
|
|
278
|
-
copy .addUserDefinedField (field .getAccessType (), field .getName (), field .copy ());
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
copy .setup ();
|
|
282
|
-
|
|
283
|
-
return copy;
|
|
284
|
-
},
|
|
285
|
-
addChildObjects (/* name, field, ... */)
|
|
286
|
-
{
|
|
287
|
-
for (let i = 0, length = arguments .length; i < length; i += 2)
|
|
288
|
-
this .addChildObject (arguments [i], arguments [i + 1]);
|
|
289
|
-
},
|
|
290
|
-
addChildObject (name, field)
|
|
300
|
+
addChildObject (accessType, name, field)
|
|
291
301
|
{
|
|
292
302
|
this [_childObjects] .push (field);
|
|
293
303
|
|
|
294
304
|
field .setTainted (true);
|
|
295
305
|
field .addParent (this);
|
|
296
306
|
field .setName (name);
|
|
307
|
+
field .setAccessType (accessType);
|
|
297
308
|
|
|
298
309
|
Object .defineProperty (this, `_${name}`,
|
|
299
310
|
{
|
|
@@ -502,6 +513,12 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, X3DChildObject .
|
|
|
502
513
|
if (field .isTainted ())
|
|
503
514
|
return;
|
|
504
515
|
|
|
516
|
+
// if (this .getTypeName () === "IndexedQuadSet")
|
|
517
|
+
// {
|
|
518
|
+
// console .log (field .getName ());
|
|
519
|
+
// console .trace ();
|
|
520
|
+
// }
|
|
521
|
+
|
|
505
522
|
field .setTainted (true);
|
|
506
523
|
|
|
507
524
|
this .addEventObject (field, Events .create (field));
|
|
@@ -160,10 +160,9 @@ Object .assign (Object .setPrototypeOf (X3DObjectArrayField .prototype, X3DArray
|
|
|
160
160
|
{
|
|
161
161
|
const
|
|
162
162
|
target = this [_target],
|
|
163
|
-
copy = target .create ()
|
|
164
|
-
array = target .getValue ();
|
|
163
|
+
copy = target .create ();
|
|
165
164
|
|
|
166
|
-
copy .
|
|
165
|
+
copy .assign (target);
|
|
167
166
|
copy .setModificationTime (0);
|
|
168
167
|
|
|
169
168
|
return copy;
|
|
@@ -330,10 +329,13 @@ Object .assign (Object .setPrototypeOf (X3DObjectArrayField .prototype, X3DArray
|
|
|
330
329
|
const
|
|
331
330
|
target = this [_target],
|
|
332
331
|
values = target .getValue () .splice (index, deleteCount),
|
|
333
|
-
result = new (target .constructor) (
|
|
332
|
+
result = new (target .constructor) ();
|
|
334
333
|
|
|
335
334
|
for (const value of values)
|
|
335
|
+
{
|
|
336
|
+
result .push (value);
|
|
336
337
|
target .removeChildObject (value);
|
|
338
|
+
}
|
|
337
339
|
|
|
338
340
|
target .addEvent ();
|
|
339
341
|
|
|
@@ -106,7 +106,7 @@ const extensions = [
|
|
|
106
106
|
|
|
107
107
|
const Context =
|
|
108
108
|
{
|
|
109
|
-
create (canvas, version, preserveDrawingBuffer)
|
|
109
|
+
create (canvas, version, preserveDrawingBuffer, mobile)
|
|
110
110
|
{
|
|
111
111
|
const options = { preserveDrawingBuffer: preserveDrawingBuffer };
|
|
112
112
|
|
|
@@ -143,6 +143,11 @@ const Context =
|
|
|
143
143
|
if (!gl)
|
|
144
144
|
throw new Error ("Couldn't create WebGL context.");
|
|
145
145
|
|
|
146
|
+
// Load extensions.
|
|
147
|
+
|
|
148
|
+
for (const extension of extensions)
|
|
149
|
+
gl .getExtension (extension);
|
|
150
|
+
|
|
146
151
|
// Feature detection:
|
|
147
152
|
|
|
148
153
|
// If the aliased lineWidth ranges are both 1, gl .lineWidth is probably not possible,
|
|
@@ -185,10 +190,15 @@ const Context =
|
|
|
185
190
|
}
|
|
186
191
|
}
|
|
187
192
|
|
|
188
|
-
|
|
193
|
+
if (mobile)
|
|
194
|
+
{
|
|
195
|
+
const color_buffer_half_float = gl .getExtension ("EXT_color_buffer_half_float");
|
|
189
196
|
|
|
190
|
-
|
|
191
|
-
|
|
197
|
+
Object .defineProperty (gl, "RGBA32F",
|
|
198
|
+
{
|
|
199
|
+
value: gl .getVersion () === 1 ? color_buffer_half_float .RGBA16F_EXT : gl .RGBA16F,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
192
202
|
|
|
193
203
|
// Async functions
|
|
194
204
|
|
|
@@ -45,8 +45,9 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import SFString
|
|
49
|
-
import X3DBaseNode
|
|
48
|
+
import SFString from "../../Fields/SFString.js";
|
|
49
|
+
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
50
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
50
51
|
|
|
51
52
|
$.fn.textWidth = function (string)
|
|
52
53
|
{
|
|
@@ -65,7 +66,7 @@ function Notification (executionContext)
|
|
|
65
66
|
{
|
|
66
67
|
X3DBaseNode .call (this, executionContext);
|
|
67
68
|
|
|
68
|
-
this .addChildObjects ("string", new SFString ());
|
|
69
|
+
this .addChildObjects (X3DConstants .inputOutput, "string", new SFString ());
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
Object .assign (Object .setPrototypeOf (Notification .prototype, X3DBaseNode .prototype),
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
48
49
|
import Fields from "../../Fields.js";
|
|
49
50
|
import Context from "./Context.js";
|
|
50
51
|
import BrowserTimings from "./BrowserTimings.js";
|
|
@@ -121,15 +122,14 @@ function X3DCoreContext (element)
|
|
|
121
122
|
$("<div></div>") .addClass ("x_ite-private-spinner-text") .appendTo (progress);
|
|
122
123
|
|
|
123
124
|
this [_instanceId] = ++ instanceId;
|
|
125
|
+
this [_localStorage] = new DataStorage (localStorage, "X_ITE.X3DBrowser(" + this [_instanceId] + ").");
|
|
126
|
+
this [_mobile] = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i .test (navigator .userAgent);
|
|
124
127
|
this [_element] = element;
|
|
125
128
|
this [_surface] = surface;
|
|
126
129
|
this [_canvas] = $("<canvas></canvas>") .addClass ("x_ite-private-canvas") .prependTo (surface);
|
|
127
|
-
this [_context] = Context .create (this [_canvas] [0], WEBGL_LATEST_VERSION, element .attr ("preserveDrawingBuffer") === "true");
|
|
130
|
+
this [_context] = Context .create (this [_canvas] [0], WEBGL_LATEST_VERSION, element .attr ("preserveDrawingBuffer") === "true", this [_mobile]);
|
|
128
131
|
this [_splashScreen] = splashScreen;
|
|
129
132
|
|
|
130
|
-
this [_localStorage] = new DataStorage (localStorage, "X_ITE.X3DBrowser(" + this [_instanceId] + ").");
|
|
131
|
-
this [_mobile] = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i .test (navigator .userAgent);
|
|
132
|
-
|
|
133
133
|
this [_renderingProperties] = new RenderingProperties (this .getPrivateScene ());
|
|
134
134
|
this [_browserOptions] = new BrowserOptions (this .getPrivateScene ());
|
|
135
135
|
this [_browserProperties] = new BrowserProperties (this .getPrivateScene ());
|
|
@@ -141,10 +141,10 @@ function X3DCoreContext (element)
|
|
|
141
141
|
this [_pixelPerPoint] = inches .height () / 720 || 1;
|
|
142
142
|
inches .remove ();
|
|
143
143
|
|
|
144
|
-
this .addChildObjects ("controlKey", new Fields .SFBool (),
|
|
145
|
-
"shiftKey", new Fields .SFBool (),
|
|
146
|
-
"altKey", new Fields .SFBool (),
|
|
147
|
-
"altGrKey", new Fields .SFBool ());
|
|
144
|
+
this .addChildObjects (X3DConstants .outputOnly, "controlKey", new Fields .SFBool (),
|
|
145
|
+
X3DConstants .outputOnly, "shiftKey", new Fields .SFBool (),
|
|
146
|
+
X3DConstants .outputOnly, "altKey", new Fields .SFBool (),
|
|
147
|
+
X3DConstants .outputOnly, "altGrKey", new Fields .SFBool ());
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
Object .assign (X3DCoreContext .prototype,
|
|
@@ -45,14 +45,15 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import X3DBaseNode
|
|
49
|
-
import
|
|
48
|
+
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
49
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
50
|
+
import Fields from "../../Fields.js";
|
|
50
51
|
|
|
51
52
|
function Arc2DOptions (executionContext)
|
|
52
53
|
{
|
|
53
54
|
X3DBaseNode .call (this, executionContext);
|
|
54
55
|
|
|
55
|
-
this .addChildObjects ("dimension", new Fields .SFInt32 (40))
|
|
56
|
+
this .addChildObjects (X3DConstants .inputOutput, "dimension", new Fields .SFInt32 (40))
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
Object .setPrototypeOf (Arc2DOptions .prototype, X3DBaseNode .prototype);
|
|
@@ -45,14 +45,15 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import X3DBaseNode
|
|
49
|
-
import
|
|
48
|
+
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
49
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
50
|
+
import Fields from "../../Fields.js";
|
|
50
51
|
|
|
51
52
|
function ArcClose2DOptions (executionContext)
|
|
52
53
|
{
|
|
53
54
|
X3DBaseNode .call (this, executionContext);
|
|
54
55
|
|
|
55
|
-
this .addChildObjects ("dimension", new Fields .SFInt32 (40))
|
|
56
|
+
this .addChildObjects (X3DConstants .inputOutput, "dimension", new Fields .SFInt32 (40))
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
Object .setPrototypeOf (ArcClose2DOptions .prototype, X3DBaseNode .prototype);
|
|
@@ -45,18 +45,18 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import Complex
|
|
48
|
+
import Fields from "../../Fields.js";
|
|
49
|
+
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
50
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
51
|
+
import Complex from "../../../standard/Math/Numbers/Complex.js";
|
|
52
52
|
|
|
53
53
|
function Circle2DOptions (executionContext)
|
|
54
54
|
{
|
|
55
55
|
X3DBaseNode .call (this, executionContext);
|
|
56
56
|
|
|
57
|
-
this .addChildObjects ("dimension", new Fields .SFInt32 (40))
|
|
57
|
+
this .addChildObjects (X3DConstants .inputOutput, "dimension", new Fields .SFInt32 (40))
|
|
58
58
|
|
|
59
|
-
this .vertices =
|
|
59
|
+
this .vertices = new Fields .MFFloat ();
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
Object .assign (Object .setPrototypeOf (Circle2DOptions .prototype, X3DBaseNode .prototype),
|
|
@@ -45,22 +45,21 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import Complex
|
|
52
|
-
import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
48
|
+
import Fields from "../../Fields.js";
|
|
49
|
+
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
50
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
51
|
+
import Complex from "../../../standard/Math/Numbers/Complex.js";
|
|
53
52
|
|
|
54
53
|
function Disk2DOptions (executionContext)
|
|
55
54
|
{
|
|
56
55
|
X3DBaseNode .call (this, executionContext);
|
|
57
56
|
|
|
58
|
-
this .addChildObjects ("dimension", new Fields .SFInt32 (40))
|
|
57
|
+
this .addChildObjects (X3DConstants .inputOutput, "dimension", new Fields .SFInt32 (40))
|
|
59
58
|
|
|
60
|
-
this .circleVertices =
|
|
61
|
-
this .diskTexCoords =
|
|
62
|
-
this .diskNormals =
|
|
63
|
-
this .diskVertices =
|
|
59
|
+
this .circleVertices = new Fields .MFFloat ();
|
|
60
|
+
this .diskTexCoords = new Fields .MFFloat ();
|
|
61
|
+
this .diskNormals = new Fields .MFFloat ();
|
|
62
|
+
this .diskVertices = new Fields .MFFloat ();
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
Object .assign (Object .setPrototypeOf (Disk2DOptions .prototype, X3DBaseNode .prototype),
|
|
@@ -45,15 +45,16 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import Fields
|
|
49
|
-
import
|
|
48
|
+
import Fields from "../../Fields.js";
|
|
49
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
50
|
+
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
50
51
|
|
|
51
52
|
function ConeOptions (executionContext)
|
|
52
53
|
{
|
|
53
54
|
X3DBaseNode .call (this, executionContext);
|
|
54
55
|
|
|
55
|
-
this .addChildObjects ("xDimension", new Fields .SFInt32 (20),
|
|
56
|
-
"yDimension", new Fields .SFInt32 (1))
|
|
56
|
+
this .addChildObjects (X3DConstants .inputOutput, "xDimension", new Fields .SFInt32 (20),
|
|
57
|
+
X3DConstants .inputOutput, "yDimension", new Fields .SFInt32 (1))
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
Object .setPrototypeOf (ConeOptions .prototype, X3DBaseNode .prototype);
|
|
@@ -45,15 +45,16 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import Fields
|
|
49
|
-
import
|
|
48
|
+
import Fields from "../../Fields.js";
|
|
49
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
50
|
+
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
50
51
|
|
|
51
52
|
function CylinderOptions (executionContext)
|
|
52
53
|
{
|
|
53
54
|
X3DBaseNode .call (this, executionContext);
|
|
54
55
|
|
|
55
|
-
this .addChildObjects ("xDimension", new Fields .SFInt32 (20),
|
|
56
|
-
"yDimension", new Fields .SFInt32 (1))
|
|
56
|
+
this .addChildObjects (X3DConstants .inputOutput, "xDimension", new Fields .SFInt32 (20),
|
|
57
|
+
X3DConstants .inputOutput, "yDimension", new Fields .SFInt32 (1))
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
Object .setPrototypeOf (CylinderOptions .prototype, X3DBaseNode .prototype);
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import Fields from "../../Fields.js";
|
|
49
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
49
50
|
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
50
51
|
import IndexedFaceSet from "../../Components/Geometry3D/IndexedFaceSet.js";
|
|
51
52
|
import Coordinate from "../../Components/Rendering/Coordinate.js";
|
|
@@ -56,8 +57,8 @@ function IcoSphereOptions (executionContext)
|
|
|
56
57
|
{
|
|
57
58
|
X3DBaseNode .call (this, executionContext);
|
|
58
59
|
|
|
59
|
-
this .addChildObjects ("type", new Fields .SFString ("ICOSAHEDRON"),
|
|
60
|
-
"order", new Fields .SFInt32 (2))
|
|
60
|
+
this .addChildObjects (X3DConstants .inputOutput, "type", new Fields .SFString ("ICOSAHEDRON"),
|
|
61
|
+
X3DConstants .inputOutput, "order", new Fields .SFInt32 (2))
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
Object .assign (Object .setPrototypeOf (IcoSphereOptions .prototype, X3DBaseNode .prototype),
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
48
|
import Fields from "../../Fields.js";
|
|
49
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
49
50
|
import X3DBaseNode from "../../Base/X3DBaseNode.js";
|
|
50
51
|
import IndexedFaceSet from "../../Components/Geometry3D/IndexedFaceSet.js";
|
|
51
52
|
import Coordinate from "../../Components/Rendering/Coordinate.js";
|
|
@@ -58,8 +59,8 @@ function QuadSphereOptions (executionContext)
|
|
|
58
59
|
{
|
|
59
60
|
X3DBaseNode .call (this, executionContext);
|
|
60
61
|
|
|
61
|
-
this .addChildObjects ("xDimension", new Fields .SFInt32 (32),
|
|
62
|
-
"yDimension", new Fields .SFInt32 (15))
|
|
62
|
+
this .addChildObjects (X3DConstants .inputOutput, "xDimension", new Fields .SFInt32 (32),
|
|
63
|
+
X3DConstants .inputOutput, "yDimension", new Fields .SFInt32 (15))
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
Object .assign (Object .setPrototypeOf (QuadSphereOptions .prototype, X3DBaseNode .prototype),
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
+
import Fields from "../../Fields.js";
|
|
48
49
|
import X3DTextGeometry from "../Text/X3DTextGeometry.js";
|
|
49
50
|
import TextAlignment from "../Text/TextAlignment.js";
|
|
50
51
|
import PixelTexture from "../../Components/Texturing/PixelTexture.js";
|
|
51
|
-
import X3DGeometryNode from "../../Components/Rendering/X3DGeometryNode.js";
|
|
52
52
|
import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
53
53
|
import Matrix4 from "../../../standard/Math/Numbers/Matrix4.js";
|
|
54
54
|
import Box3 from "../../../standard/Math/Geometry/Box3.js";
|
|
@@ -60,7 +60,7 @@ function ScreenText (text, fontStyle)
|
|
|
60
60
|
|
|
61
61
|
text .setTransparent (true);
|
|
62
62
|
|
|
63
|
-
this .texCoordArray =
|
|
63
|
+
this .texCoordArray = new Fields .MFFloat ();
|
|
64
64
|
this .textureNode = new PixelTexture (text .getExecutionContext ());
|
|
65
65
|
this .canvas = $("<canvas></canvas>");
|
|
66
66
|
this .context = this .canvas [0] .getContext ("2d", { willReadFrequently: true });
|
|
@@ -166,7 +166,7 @@ Object .assign (Object .setPrototypeOf (ExamineViewer .prototype, X3DViewer .pro
|
|
|
166
166
|
|
|
167
167
|
this .pressTime = Date .now ();
|
|
168
168
|
|
|
169
|
-
const
|
|
169
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
170
170
|
|
|
171
171
|
if (!this .isPointerInRectangle (x, y))
|
|
172
172
|
return;
|
|
@@ -274,7 +274,7 @@ Object .assign (Object .setPrototypeOf (ExamineViewer .prototype, X3DViewer .pro
|
|
|
274
274
|
event .preventDefault ();
|
|
275
275
|
event .stopImmediatePropagation ();
|
|
276
276
|
|
|
277
|
-
const
|
|
277
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
278
278
|
|
|
279
279
|
this .disconnect ();
|
|
280
280
|
this .lookAtBBox (x, y, this .getStraightenHorizon ());
|
|
@@ -285,7 +285,7 @@ Object .assign (Object .setPrototypeOf (ExamineViewer .prototype, X3DViewer .pro
|
|
|
285
285
|
|
|
286
286
|
return function (event)
|
|
287
287
|
{
|
|
288
|
-
const
|
|
288
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
289
289
|
|
|
290
290
|
switch (this .getButton (this .button))
|
|
291
291
|
{
|
|
@@ -339,7 +339,7 @@ Object .assign (Object .setPrototypeOf (ExamineViewer .prototype, X3DViewer .pro
|
|
|
339
339
|
|
|
340
340
|
return function (event)
|
|
341
341
|
{
|
|
342
|
-
const
|
|
342
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
343
343
|
|
|
344
344
|
if (!this .isPointerInRectangle (x, y))
|
|
345
345
|
return;
|
|
@@ -119,7 +119,7 @@ Object .assign (Object .setPrototypeOf (LookAtViewer .prototype, X3DViewer .prot
|
|
|
119
119
|
if (this .button >= 0)
|
|
120
120
|
return;
|
|
121
121
|
|
|
122
|
-
const
|
|
122
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
123
123
|
|
|
124
124
|
if (!this .isPointerInRectangle (x, y))
|
|
125
125
|
return;
|
|
@@ -180,7 +180,7 @@ Object .assign (Object .setPrototypeOf (LookAtViewer .prototype, X3DViewer .prot
|
|
|
180
180
|
event .preventDefault ();
|
|
181
181
|
event .stopImmediatePropagation ();
|
|
182
182
|
|
|
183
|
-
const
|
|
183
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
184
184
|
|
|
185
185
|
this .disconnect ();
|
|
186
186
|
this .lookAtPoint (x, y, this .getStraightenHorizon ());
|
|
@@ -191,7 +191,7 @@ Object .assign (Object .setPrototypeOf (LookAtViewer .prototype, X3DViewer .prot
|
|
|
191
191
|
|
|
192
192
|
this .event = event;
|
|
193
193
|
|
|
194
|
-
const
|
|
194
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
195
195
|
|
|
196
196
|
switch (this .button)
|
|
197
197
|
{
|
|
@@ -219,7 +219,7 @@ Object .assign (Object .setPrototypeOf (LookAtViewer .prototype, X3DViewer .prot
|
|
|
219
219
|
|
|
220
220
|
return function (event)
|
|
221
221
|
{
|
|
222
|
-
const
|
|
222
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
223
223
|
|
|
224
224
|
if (!this .isPointerInRectangle (x, y))
|
|
225
225
|
return;
|
|
@@ -92,7 +92,7 @@ Object .assign (Object .setPrototypeOf (PlaneViewer .prototype, X3DViewer .proto
|
|
|
92
92
|
if (this .button >= 0)
|
|
93
93
|
return;
|
|
94
94
|
|
|
95
|
-
const
|
|
95
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
96
96
|
|
|
97
97
|
if (!this .isPointerInRectangle (x, y))
|
|
98
98
|
return;
|
|
@@ -143,7 +143,7 @@ Object .assign (Object .setPrototypeOf (PlaneViewer .prototype, X3DViewer .proto
|
|
|
143
143
|
},
|
|
144
144
|
mousemove (event)
|
|
145
145
|
{
|
|
146
|
-
const
|
|
146
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
147
147
|
|
|
148
148
|
switch (this .getButton (this .button))
|
|
149
149
|
{
|
|
@@ -171,7 +171,7 @@ Object .assign (Object .setPrototypeOf (PlaneViewer .prototype, X3DViewer .proto
|
|
|
171
171
|
},
|
|
172
172
|
mousewheel (event)
|
|
173
173
|
{
|
|
174
|
-
const
|
|
174
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
175
175
|
|
|
176
176
|
if (!this .isPointerInRectangle (x, y))
|
|
177
177
|
return;
|
|
@@ -138,7 +138,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, X3DViewer .prot
|
|
|
138
138
|
|
|
139
139
|
this .event = event;
|
|
140
140
|
|
|
141
|
-
const
|
|
141
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
142
142
|
|
|
143
143
|
if (!this .isPointerInRectangle (x, y))
|
|
144
144
|
return;
|
|
@@ -246,7 +246,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, X3DViewer .prot
|
|
|
246
246
|
|
|
247
247
|
this .event = event;
|
|
248
248
|
|
|
249
|
-
const
|
|
249
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
250
250
|
|
|
251
251
|
switch (this .getButton (this .button))
|
|
252
252
|
{
|
|
@@ -293,7 +293,7 @@ Object .assign (Object .setPrototypeOf (X3DFlyViewer .prototype, X3DViewer .prot
|
|
|
293
293
|
},
|
|
294
294
|
mousewheel (event)
|
|
295
295
|
{
|
|
296
|
-
const
|
|
296
|
+
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
297
297
|
|
|
298
298
|
if (!this .isPointerInRectangle (x, y))
|
|
299
299
|
return;
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
+
import X3DConstants from "../../Base/X3DConstants.js";
|
|
48
49
|
import Fields from "../../Fields.js";
|
|
49
50
|
import ExamineViewer from "./ExamineViewer.js";
|
|
50
51
|
import WalkViewer from "./WalkViewer.js";
|
|
@@ -76,11 +77,11 @@ function getHeadlight (browser)
|
|
|
76
77
|
|
|
77
78
|
function X3DNavigationContext ()
|
|
78
79
|
{
|
|
79
|
-
this .addChildObjects ("activeLayer", new Fields .SFNode (),
|
|
80
|
-
"activeNavigationInfo", new Fields .SFNode (),
|
|
81
|
-
"activeViewpoint", new Fields .SFNode (),
|
|
82
|
-
"availableViewers", new Fields .MFString (),
|
|
83
|
-
"viewer", new Fields .SFString ("EXAMINE"));
|
|
80
|
+
this .addChildObjects (X3DConstants .outputOnly, "activeLayer", new Fields .SFNode (),
|
|
81
|
+
X3DConstants .outputOnly, "activeNavigationInfo", new Fields .SFNode (),
|
|
82
|
+
X3DConstants .outputOnly, "activeViewpoint", new Fields .SFNode (),
|
|
83
|
+
X3DConstants .outputOnly, "availableViewers", new Fields .MFString (),
|
|
84
|
+
X3DConstants .outputOnly, "viewer", new Fields .SFString ("EXAMINE"));
|
|
84
85
|
|
|
85
86
|
this [_activeCollisions] = new Set ();
|
|
86
87
|
this [_viewerNode] = new NoneViewer (this .getPrivateScene ());
|