x_ite 8.7.5 → 8.7.6
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/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +21 -23
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +35 -36
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +18 -18
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +28 -28
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +22 -22
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +20 -20
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +25 -25
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +28 -28
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +26 -27
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +15 -15
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +30 -30
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +19 -19
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +348 -587
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/_includes/scripts.html +0 -1
- package/docs/_posts/components/CADGeometry/QuadSet.md +1 -1
- package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +1 -1
- package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +1 -1
- package/docs/_posts/components/EnvironmentalEffects/Background.md +1 -1
- package/docs/_posts/components/EnvironmentalEffects/Fog.md +1 -1
- package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +1 -1
- package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +1 -1
- package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +1 -1
- package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +1 -1
- package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +1 -1
- package/docs/_posts/components/EventUtilities/IntegerSequencer.md +1 -1
- package/docs/_posts/components/Followers/ColorChaser.md +1 -1
- package/docs/_posts/components/Followers/ColorDamper.md +1 -1
- package/docs/_posts/components/Followers/CoordinateChaser.md +1 -1
- package/docs/_posts/components/Followers/ScalarChaser.md +1 -1
- 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/Geometry2D/TriangleSet2D.md +1 -1
- package/docs/_posts/components/Geometry3D/Box.md +1 -1
- package/docs/_posts/components/Geometry3D/Cone.md +1 -1
- package/docs/_posts/components/Geometry3D/Cylinder.md +1 -1
- package/docs/_posts/components/Geometry3D/ElevationGrid.md +1 -1
- package/docs/_posts/components/Geometry3D/Extrusion.md +1 -1
- package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +1 -1
- package/docs/_posts/components/Geometry3D/Sphere.md +1 -1
- package/docs/_posts/components/Geospatial/GeoElevationGrid.md +1 -1
- package/docs/_posts/components/Geospatial/GeoLOD.md +1 -1
- package/docs/_posts/components/Geospatial/GeoViewpoint.md +1 -1
- package/docs/_posts/components/Grouping/Group.md +1 -1
- package/docs/_posts/components/Grouping/Switch.md +1 -1
- package/docs/_posts/components/Grouping/Transform.md +1 -1
- package/docs/_posts/components/HAnim/HAnimHumanoid.md +1 -1
- package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/CoordinateInterpolator.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/Interpolation/SplineScalarInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.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/Layering/LayerSet.md +1 -1
- package/docs/_posts/components/Layering/Viewport.md +1 -1
- package/docs/_posts/components/Lighting/DirectionalLight.md +1 -1
- package/docs/_posts/components/Lighting/PointLight.md +1 -1
- package/docs/_posts/components/Lighting/SpotLight.md +1 -1
- package/docs/_posts/components/NURBS/NurbsCurve.md +1 -1
- package/docs/_posts/components/NURBS/NurbsPatchSurface.md +1 -1
- package/docs/_posts/components/NURBS/NurbsSweptSurface.md +1 -1
- package/docs/_posts/components/Navigation/Billboard.md +1 -1
- package/docs/_posts/components/Navigation/Collision.md +1 -1
- package/docs/_posts/components/Navigation/NavigationInfo.md +1 -1
- package/docs/_posts/components/Navigation/OrthoViewpoint.md +1 -1
- package/docs/_posts/components/Navigation/Viewpoint.md +1 -1
- package/docs/_posts/components/Networking/Anchor.md +1 -1
- package/docs/_posts/components/Networking/Inline.md +1 -1
- package/docs/_posts/components/Networking/LoadSensor.md +1 -1
- package/docs/_posts/components/ParticleSystems/ConeEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +1 -1
- package/docs/_posts/components/ParticleSystems/ParticleSystem.md +1 -1
- package/docs/_posts/components/ParticleSystems/PointEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +1 -1
- package/docs/_posts/components/Picking/LinePickSensor.md +1 -1
- package/docs/_posts/components/Picking/PointPickSensor.md +1 -1
- package/docs/_posts/components/Picking/PrimitivePickSensor.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/Rendering/ClipPlane.md +1 -1
- package/docs/_posts/components/Rendering/Color.md +1 -1
- package/docs/_posts/components/Rendering/ColorRGBA.md +1 -1
- package/docs/_posts/components/Rendering/Coordinate.md +1 -1
- package/docs/_posts/components/Rendering/IndexedLineSet.md +1 -1
- package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +1 -1
- package/docs/_posts/components/Rendering/IndexedTriangleSet.md +1 -1
- package/docs/_posts/components/Rendering/LineSet.md +1 -1
- package/docs/_posts/components/Rendering/PointSet.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +1 -1
- package/docs/_posts/components/Shaders/ComposedShader.md +1 -1
- package/docs/_posts/components/Shaders/FloatVertexAttribute.md +1 -1
- package/docs/_posts/components/Shaders/ShaderPart.md +1 -1
- package/docs/_posts/components/Shape/Appearance.md +1 -1
- package/docs/_posts/components/Shape/FillProperties.md +1 -1
- package/docs/_posts/components/Shape/LineProperties.md +1 -1
- package/docs/_posts/components/Shape/Material.md +1 -1
- package/docs/_posts/components/Shape/TwoSidedMaterial.md +1 -1
- package/docs/_posts/components/Sound/AudioClip.md +1 -1
- package/docs/_posts/components/Text/FontStyle.md +1 -1
- package/docs/_posts/components/Text/Text.md +1 -1
- package/docs/_posts/components/Texturing/ImageTexture.md +1 -1
- package/docs/_posts/components/Texturing/MovieTexture.md +1 -1
- package/docs/_posts/components/Texturing/MultiTexture.md +1 -1
- package/docs/_posts/components/Texturing/PixelTexture.md +1 -1
- package/docs/_posts/components/Texturing3D/ImageTexture3D.md +1 -1
- package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +1 -1
- package/docs/_posts/components/Time/TimeSensor.md +1 -1
- package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +1 -1
- package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +1 -1
- package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +1 -1
- package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +1 -1
- package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +1 -1
- package/docs/_posts/components/VolumeRendering/VolumeData.md +1 -1
- package/docs/_posts/components/X_ITE/BlendMode.md +1 -1
- package/docs/_posts/custom-shaders.md +1 -1
- package/docs/_posts/getting-started.md +7 -2
- package/docs/_posts/reference/browser-services.md +6 -0
- package/docs/_posts/tutorials/adding-backgrounds.md +2 -2
- package/docs/_posts/tutorials/adding-sound.md +1 -1
- package/docs/_posts/tutorials/building-a-x3d-world.md +1 -1
- package/docs/_posts/tutorials/building-elevation-grids.md +1 -1
- package/docs/_posts/tutorials/building-primitive-shapes.md +2 -2
- package/docs/_posts/tutorials/controlling-appearance-with-materials.md +1 -1
- package/docs/_posts/tutorials/controlling-detail.md +1 -1
- package/docs/_posts/tutorials/hello-world.md +1 -1
- package/docs/_posts/tutorials/naming-nodes.md +1 -1
- package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +1 -1
- package/package.json +3 -3
- package/src/lib/jquery.js +13 -0
- package/src/standard/Geospatial/UniversalTransverseMercator.js +0 -1
- package/src/standard/Math/Geometry/Box2.js +18 -5
- package/src/standard/Math/Geometry/Box3.js +18 -5
- package/src/standard/Math/Geometry/Cylinder3.js +1 -1
- package/src/standard/Math/Geometry/Line2.js +1 -1
- package/src/standard/Math/Geometry/Line3.js +1 -1
- package/src/standard/Math/Geometry/Plane3.js +1 -1
- package/src/standard/Math/Geometry/Sphere3.js +14 -14
- package/src/standard/Math/Numbers/Complex.js +0 -4
- package/src/standard/Math/Numbers/Quaternion.js +27 -73
- package/src/standard/Math/Numbers/Rotation4.js +0 -29
- package/src/standard/Math/Numbers/Vector2.js +0 -64
- package/src/standard/Math/Numbers/Vector3.js +0 -72
- package/src/standard/Math/Numbers/Vector4.js +0 -64
- package/src/x_ite/Base/X3DObject.js +9 -32
- package/src/x_ite/Base/X3DObjectArrayField.js +35 -64
- package/src/x_ite/Browser/Core/BrowserOptions.js +37 -0
- package/src/x_ite/Browser/Core/X3DCoreContext.js +18 -0
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +4 -4
- package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +12 -7
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +9 -9
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -3
- package/src/x_ite/Browser/Navigation/WalkViewer.js +2 -2
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +7 -7
- package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +0 -1
- package/src/x_ite/Browser/Text/X3DTextGeometry.js +2 -3
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +4 -4
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +1 -1
- package/src/x_ite/Components/Followers/OrientationChaser.js +3 -3
- package/src/x_ite/Components/Followers/OrientationDamper.js +3 -3
- package/src/x_ite/Components/Geometry2D/Rectangle2D.js +2 -3
- package/src/x_ite/Components/Geometry3D/Box.js +3 -10
- package/src/x_ite/Components/Geometry3D/Cone.js +1 -1
- package/src/x_ite/Components/Geometry3D/Cylinder.js +2 -2
- package/src/x_ite/Components/Geometry3D/Extrusion.js +3 -3
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +2 -2
- package/src/x_ite/Components/Layout/Layout.js +1 -1
- package/src/x_ite/Components/Navigation/Billboard.js +1 -1
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +10 -10
- package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +7 -7
- package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +9 -9
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +2 -2
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +3 -3
- package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +1 -1
- package/src/x_ite/Fields/ArrayFields.js +1 -1
- package/src/x_ite/Fields/SFNodeCache.js +2 -2
- package/src/x_ite/Fields/SFVec3.js +1 -1
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +3 -3
- package/src/x_ite/Parser/SVGParser.js +1 -1
- package/src/x_ite/Rendering/X3DRenderObject.js +3 -3
- package/src/x_ite/X3DCanvasElement.js +1 -0
- package/docs/assets/js/autoupdate.js +0 -25
|
@@ -234,70 +234,6 @@ Object .assign (Vector2,
|
|
|
234
234
|
One: new Vector2 (1, 1),
|
|
235
235
|
xAxis: new Vector2 (1, 0),
|
|
236
236
|
yAxis: new Vector2 (0, 1),
|
|
237
|
-
negate: function (vector)
|
|
238
|
-
{
|
|
239
|
-
return vector .copy () .negate ();
|
|
240
|
-
},
|
|
241
|
-
inverse: function (vector)
|
|
242
|
-
{
|
|
243
|
-
return vector .copy () .inverse ();
|
|
244
|
-
},
|
|
245
|
-
add: function (lhs, rhs)
|
|
246
|
-
{
|
|
247
|
-
return lhs .copy () .add (rhs);
|
|
248
|
-
},
|
|
249
|
-
subtract: function (lhs, rhs)
|
|
250
|
-
{
|
|
251
|
-
return lhs .copy () .subtract (rhs);
|
|
252
|
-
},
|
|
253
|
-
multiply: function (lhs, rhs)
|
|
254
|
-
{
|
|
255
|
-
return lhs .copy () .multiply (rhs);
|
|
256
|
-
},
|
|
257
|
-
multVec: function (lhs, rhs)
|
|
258
|
-
{
|
|
259
|
-
return lhs .copy () .multVec (rhs);
|
|
260
|
-
},
|
|
261
|
-
divide: function (lhs, rhs)
|
|
262
|
-
{
|
|
263
|
-
return lhs .copy () .divide (rhs);
|
|
264
|
-
},
|
|
265
|
-
divVec: function (lhs, rhs)
|
|
266
|
-
{
|
|
267
|
-
return lhs .copy () .divVec (rhs);
|
|
268
|
-
},
|
|
269
|
-
normalize: function (vector)
|
|
270
|
-
{
|
|
271
|
-
return vector .copy () .normalize ();
|
|
272
|
-
},
|
|
273
|
-
dot: function (lhs, rhs)
|
|
274
|
-
{
|
|
275
|
-
return lhs .dot (rhs);
|
|
276
|
-
},
|
|
277
|
-
magnitude: function (vector)
|
|
278
|
-
{
|
|
279
|
-
return vector .magnitude ();
|
|
280
|
-
},
|
|
281
|
-
distance: function (lhs, rhs)
|
|
282
|
-
{
|
|
283
|
-
return lhs .distance (rhs);
|
|
284
|
-
},
|
|
285
|
-
lerp: function (source, destination, t)
|
|
286
|
-
{
|
|
287
|
-
return source .copy () .lerp (destination, t);
|
|
288
|
-
},
|
|
289
|
-
abs: function (vector)
|
|
290
|
-
{
|
|
291
|
-
return vector .copy () .abs ();
|
|
292
|
-
},
|
|
293
|
-
min: function (lhs, rhs)
|
|
294
|
-
{
|
|
295
|
-
return this .prototype .min .apply (lhs .copy (), arguments);
|
|
296
|
-
},
|
|
297
|
-
max: function (lhs, rhs)
|
|
298
|
-
{
|
|
299
|
-
return this .prototype .max .apply (lhs .copy (), arguments);
|
|
300
|
-
},
|
|
301
237
|
});
|
|
302
238
|
|
|
303
239
|
export default Vector2;
|
|
@@ -288,78 +288,6 @@ Object .assign (Vector3,
|
|
|
288
288
|
xAxis: new Vector3 (1, 0, 0),
|
|
289
289
|
yAxis: new Vector3 (0, 1, 0),
|
|
290
290
|
zAxis: new Vector3 (0, 0, 1),
|
|
291
|
-
negate: function (vector)
|
|
292
|
-
{
|
|
293
|
-
return vector .copy () .negate ();
|
|
294
|
-
},
|
|
295
|
-
inverse: function (vector)
|
|
296
|
-
{
|
|
297
|
-
return vector .copy () .inverse ();
|
|
298
|
-
},
|
|
299
|
-
add: function (lhs, rhs)
|
|
300
|
-
{
|
|
301
|
-
return lhs .copy () .add (rhs);
|
|
302
|
-
},
|
|
303
|
-
subtract: function (lhs, rhs)
|
|
304
|
-
{
|
|
305
|
-
return lhs .copy () .subtract (rhs);
|
|
306
|
-
},
|
|
307
|
-
multiply: function (lhs, rhs)
|
|
308
|
-
{
|
|
309
|
-
return lhs .copy () .multiply (rhs);
|
|
310
|
-
},
|
|
311
|
-
multVec: function (lhs, rhs)
|
|
312
|
-
{
|
|
313
|
-
return lhs .copy () .multVec (rhs);
|
|
314
|
-
},
|
|
315
|
-
divide: function (lhs, rhs)
|
|
316
|
-
{
|
|
317
|
-
return lhs .copy () .divide (rhs);
|
|
318
|
-
},
|
|
319
|
-
divVec: function (lhs, rhs)
|
|
320
|
-
{
|
|
321
|
-
return lhs .copy () .divVec (rhs);
|
|
322
|
-
},
|
|
323
|
-
cross: function (lhs, rhs)
|
|
324
|
-
{
|
|
325
|
-
return lhs .copy () .cross (rhs);
|
|
326
|
-
},
|
|
327
|
-
normalize: function (vector)
|
|
328
|
-
{
|
|
329
|
-
return vector .copy () .normalize ();
|
|
330
|
-
},
|
|
331
|
-
dot: function (lhs, rhs)
|
|
332
|
-
{
|
|
333
|
-
return lhs .dot (rhs);
|
|
334
|
-
},
|
|
335
|
-
magnitude: function (vector)
|
|
336
|
-
{
|
|
337
|
-
return vector .magnitude ();
|
|
338
|
-
},
|
|
339
|
-
distance: function (lhs, rhs)
|
|
340
|
-
{
|
|
341
|
-
return lhs .distance (rhs);
|
|
342
|
-
},
|
|
343
|
-
lerp: function (source, destination, t)
|
|
344
|
-
{
|
|
345
|
-
return source .copy () .lerp (destination, t);
|
|
346
|
-
},
|
|
347
|
-
slerp: function (source, destination, t)
|
|
348
|
-
{
|
|
349
|
-
return source .copy () .slerp (destination, t);
|
|
350
|
-
},
|
|
351
|
-
abs: function (vector)
|
|
352
|
-
{
|
|
353
|
-
return vector .copy () .abs ();
|
|
354
|
-
},
|
|
355
|
-
min: function (lhs, rhs)
|
|
356
|
-
{
|
|
357
|
-
return this .prototype .min .apply (lhs .copy (), arguments);
|
|
358
|
-
},
|
|
359
|
-
max: function (lhs, rhs)
|
|
360
|
-
{
|
|
361
|
-
return this .prototype .max .apply (lhs .copy (), arguments);
|
|
362
|
-
},
|
|
363
291
|
});
|
|
364
292
|
|
|
365
293
|
export default Vector3;
|
|
@@ -303,70 +303,6 @@ Object .assign (Vector4,
|
|
|
303
303
|
yAxis: new Vector4 (0, 1, 0, 0),
|
|
304
304
|
zAxis: new Vector4 (0, 0, 1, 0),
|
|
305
305
|
wAxis: new Vector4 (0, 0, 0, 1),
|
|
306
|
-
negate: function (vector)
|
|
307
|
-
{
|
|
308
|
-
return vector .copy () .negate ();
|
|
309
|
-
},
|
|
310
|
-
inverse: function (vector)
|
|
311
|
-
{
|
|
312
|
-
return vector .copy () .inverse ();
|
|
313
|
-
},
|
|
314
|
-
add: function (lhs, rhs)
|
|
315
|
-
{
|
|
316
|
-
return lhs .copy () .add (rhs);
|
|
317
|
-
},
|
|
318
|
-
subtract: function (lhs, rhs)
|
|
319
|
-
{
|
|
320
|
-
return lhs .copy () .subtract (rhs);
|
|
321
|
-
},
|
|
322
|
-
multiply: function (lhs, rhs)
|
|
323
|
-
{
|
|
324
|
-
return lhs .copy () .multiply (rhs);
|
|
325
|
-
},
|
|
326
|
-
multVec: function (lhs, rhs)
|
|
327
|
-
{
|
|
328
|
-
return lhs .copy () .multVec (rhs);
|
|
329
|
-
},
|
|
330
|
-
divide: function (lhs, rhs)
|
|
331
|
-
{
|
|
332
|
-
return lhs .copy () .divide (rhs);
|
|
333
|
-
},
|
|
334
|
-
divVec: function (lhs, rhs)
|
|
335
|
-
{
|
|
336
|
-
return lhs .copy () .divVec (rhs);
|
|
337
|
-
},
|
|
338
|
-
normalize: function (vector)
|
|
339
|
-
{
|
|
340
|
-
return vector .copy () .normalize ();
|
|
341
|
-
},
|
|
342
|
-
dot: function (lhs, rhs)
|
|
343
|
-
{
|
|
344
|
-
return lhs .dot (rhs);
|
|
345
|
-
},
|
|
346
|
-
magnitude: function (vector)
|
|
347
|
-
{
|
|
348
|
-
return vector .magnitude ();
|
|
349
|
-
},
|
|
350
|
-
distance: function (lhs, rhs)
|
|
351
|
-
{
|
|
352
|
-
return lhs .distance (rhs);
|
|
353
|
-
},
|
|
354
|
-
lerp: function (source, destination, t)
|
|
355
|
-
{
|
|
356
|
-
return source .copy () .lerp (destination, t);
|
|
357
|
-
},
|
|
358
|
-
abs: function (vector)
|
|
359
|
-
{
|
|
360
|
-
return vector .copy () .abs ();
|
|
361
|
-
},
|
|
362
|
-
min: function (lhs, rhs)
|
|
363
|
-
{
|
|
364
|
-
return this .prototype .min .apply (lhs .copy (), arguments);
|
|
365
|
-
},
|
|
366
|
-
max: function (lhs, rhs)
|
|
367
|
-
{
|
|
368
|
-
return this .prototype .max .apply (lhs .copy (), arguments);
|
|
369
|
-
},
|
|
370
306
|
});
|
|
371
307
|
|
|
372
308
|
export default Vector4;
|
|
@@ -83,16 +83,9 @@ X3DObject .prototype =
|
|
|
83
83
|
{
|
|
84
84
|
return this [_name];
|
|
85
85
|
},
|
|
86
|
-
getInterestId: function (callbackName, object)
|
|
87
|
-
{
|
|
88
|
-
if (typeof callbackName === "symbol")
|
|
89
|
-
return X3DObject .getId (object) + ".Symbol(" + SymbolId (callbackName) + ")";
|
|
90
|
-
|
|
91
|
-
return X3DObject .getId (object) + "." + String (callbackName);
|
|
92
|
-
},
|
|
93
86
|
hasInterest: function (callbackName, object)
|
|
94
87
|
{
|
|
95
|
-
return this [_interests] .has (
|
|
88
|
+
return this [_interests] .has (X3DObject .getInterestId (callbackName, object));
|
|
96
89
|
},
|
|
97
90
|
addInterest: function (callbackName, object, ... args)
|
|
98
91
|
{
|
|
@@ -103,14 +96,14 @@ X3DObject .prototype =
|
|
|
103
96
|
}
|
|
104
97
|
|
|
105
98
|
const
|
|
106
|
-
interestId =
|
|
99
|
+
interestId = X3DObject .getInterestId (callbackName, object),
|
|
107
100
|
callback = object [callbackName];
|
|
108
101
|
|
|
109
102
|
this [_interests] .set (interestId, callback .bind (object, ... args, this));
|
|
110
103
|
},
|
|
111
104
|
removeInterest: function (callbackName, object)
|
|
112
105
|
{
|
|
113
|
-
this [_interests] .delete (
|
|
106
|
+
this [_interests] .delete (X3DObject .getInterestId (callbackName, object));
|
|
114
107
|
},
|
|
115
108
|
getInterests: function ()
|
|
116
109
|
{
|
|
@@ -185,7 +178,7 @@ X3DObject .prototype =
|
|
|
185
178
|
},
|
|
186
179
|
toStream: function (generator)
|
|
187
180
|
{
|
|
188
|
-
generator .string =
|
|
181
|
+
generator .string = `[object ${this .getTypeName ()}]`;
|
|
189
182
|
},
|
|
190
183
|
dispose: function ()
|
|
191
184
|
{
|
|
@@ -208,7 +201,7 @@ Object .assign (X3DObject,
|
|
|
208
201
|
{
|
|
209
202
|
const map = new WeakMap ();
|
|
210
203
|
|
|
211
|
-
let counter = 0;
|
|
204
|
+
let counter = 0; // In the future we can use a bigint here (0n).
|
|
212
205
|
|
|
213
206
|
return function (object)
|
|
214
207
|
{
|
|
@@ -222,26 +215,10 @@ Object .assign (X3DObject,
|
|
|
222
215
|
return counter;
|
|
223
216
|
};
|
|
224
217
|
})(),
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
// In the future we can use getId, because WeakMap will accept Symbols as key.
|
|
228
|
-
const SymbolId = (function ()
|
|
229
|
-
{
|
|
230
|
-
const map = new Map ();
|
|
231
|
-
|
|
232
|
-
let counter = 0;
|
|
233
|
-
|
|
234
|
-
return function (object)
|
|
218
|
+
getInterestId: function (callbackName, object)
|
|
235
219
|
{
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
return id;
|
|
240
|
-
|
|
241
|
-
map .set (object, ++ counter);
|
|
242
|
-
|
|
243
|
-
return counter;
|
|
244
|
-
};
|
|
245
|
-
})();
|
|
220
|
+
return `${this .getId (object)}.${this .getId (object [callbackName])}`;
|
|
221
|
+
},
|
|
222
|
+
});
|
|
246
223
|
|
|
247
224
|
export default X3DObject;
|
|
@@ -50,8 +50,7 @@ import X3DArrayField from "./X3DArrayField.js";
|
|
|
50
50
|
|
|
51
51
|
const
|
|
52
52
|
_target = Symbol (),
|
|
53
|
-
_proxy = Symbol ()
|
|
54
|
-
_find = Symbol ();
|
|
53
|
+
_proxy = Symbol ();
|
|
55
54
|
|
|
56
55
|
const handler =
|
|
57
56
|
{
|
|
@@ -193,6 +192,10 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
193
192
|
|
|
194
193
|
return true;
|
|
195
194
|
},
|
|
195
|
+
isDefaultValue: function ()
|
|
196
|
+
{
|
|
197
|
+
return this .length === 0;
|
|
198
|
+
},
|
|
196
199
|
set: function (value)
|
|
197
200
|
{
|
|
198
201
|
const target = this [_target];
|
|
@@ -204,10 +207,6 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
204
207
|
for (let i = 0, length = value .length; i < length; ++ i)
|
|
205
208
|
array [i] .set (value [i] instanceof X3DField ? value [i] .getValue () : value [i]);
|
|
206
209
|
},
|
|
207
|
-
isDefaultValue: function ()
|
|
208
|
-
{
|
|
209
|
-
return this .length === 0;
|
|
210
|
-
},
|
|
211
210
|
setValue: function (value)
|
|
212
211
|
{
|
|
213
212
|
const target = this [_target];
|
|
@@ -242,10 +241,14 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
242
241
|
|
|
243
242
|
if (array .length)
|
|
244
243
|
{
|
|
245
|
-
const
|
|
244
|
+
const
|
|
245
|
+
field = array .shift (),
|
|
246
|
+
result = field .valueOf ();
|
|
247
|
+
|
|
246
248
|
target .removeChildObject (field);
|
|
247
249
|
target .addEvent ();
|
|
248
|
-
|
|
250
|
+
|
|
251
|
+
return result;
|
|
249
252
|
}
|
|
250
253
|
},
|
|
251
254
|
push: function (value)
|
|
@@ -275,10 +278,14 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
275
278
|
|
|
276
279
|
if (array .length)
|
|
277
280
|
{
|
|
278
|
-
const
|
|
281
|
+
const
|
|
282
|
+
field = array .pop (),
|
|
283
|
+
result = field .valueOf ();
|
|
284
|
+
|
|
279
285
|
target .removeChildObject (field);
|
|
280
286
|
target .addEvent ();
|
|
281
|
-
|
|
287
|
+
|
|
288
|
+
return result;
|
|
282
289
|
}
|
|
283
290
|
},
|
|
284
291
|
splice: function (index, deleteCount, ... insertValues)
|
|
@@ -319,53 +326,28 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
319
326
|
|
|
320
327
|
target .addEvent ();
|
|
321
328
|
},
|
|
322
|
-
[_find]: function (first, last, value)
|
|
323
|
-
{
|
|
324
|
-
const
|
|
325
|
-
target = this [_target],
|
|
326
|
-
values = target .getValue ();
|
|
327
|
-
|
|
328
|
-
if (typeof value === "function")
|
|
329
|
-
{
|
|
330
|
-
for (let i = first; i < last; ++ i)
|
|
331
|
-
{
|
|
332
|
-
if (value (values [i] .valueOf ()))
|
|
333
|
-
return i;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
return last;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
for (let i = first; i < last; ++ i)
|
|
340
|
-
{
|
|
341
|
-
if (values [i] .equals (value))
|
|
342
|
-
return i;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
return last;
|
|
346
|
-
},
|
|
347
329
|
remove: function (first, last, value)
|
|
348
330
|
{
|
|
349
331
|
const
|
|
350
332
|
target = this [_target],
|
|
351
|
-
|
|
333
|
+
array = target .getValue ();
|
|
352
334
|
|
|
353
335
|
if (typeof value === "function")
|
|
354
336
|
{
|
|
355
|
-
first =
|
|
337
|
+
first = array .findIndex ((current, index) => index >= first && value (current .valueOf ()))
|
|
356
338
|
|
|
357
|
-
if (first !==
|
|
339
|
+
if (first !== -1)
|
|
358
340
|
{
|
|
359
341
|
for (let i = first; ++ i < last; )
|
|
360
342
|
{
|
|
361
|
-
const current =
|
|
343
|
+
const current = array [i];
|
|
362
344
|
|
|
363
345
|
if (!value (current .valueOf ()))
|
|
364
346
|
{
|
|
365
|
-
const tmp =
|
|
347
|
+
const tmp = array [first];
|
|
366
348
|
|
|
367
|
-
|
|
368
|
-
|
|
349
|
+
array [first ++] = current;
|
|
350
|
+
array [i] = tmp;
|
|
369
351
|
}
|
|
370
352
|
}
|
|
371
353
|
}
|
|
@@ -376,25 +358,25 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
376
358
|
return first;
|
|
377
359
|
}
|
|
378
360
|
|
|
379
|
-
first =
|
|
361
|
+
first = array .findIndex ((current, index) => index >= first && current .equals (value))
|
|
380
362
|
|
|
381
|
-
if (first !==
|
|
363
|
+
if (first !== -1)
|
|
382
364
|
{
|
|
383
365
|
for (let i = first; ++ i < last; )
|
|
384
366
|
{
|
|
385
|
-
const current =
|
|
367
|
+
const current = array [i];
|
|
386
368
|
|
|
387
369
|
if (!current .equals (value))
|
|
388
370
|
{
|
|
389
|
-
const tmp =
|
|
371
|
+
const tmp = array [first];
|
|
390
372
|
|
|
391
|
-
|
|
392
|
-
|
|
373
|
+
array [first ++] = current;
|
|
374
|
+
array [i] = tmp;
|
|
393
375
|
}
|
|
394
376
|
}
|
|
395
377
|
}
|
|
396
378
|
|
|
397
|
-
if (first !==
|
|
379
|
+
if (first !== -1)
|
|
398
380
|
target .addEvent ();
|
|
399
381
|
|
|
400
382
|
return first;
|
|
@@ -403,14 +385,15 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
403
385
|
{
|
|
404
386
|
const
|
|
405
387
|
target = this [_target],
|
|
406
|
-
values = target .getValue () .splice (first, last - first)
|
|
388
|
+
values = target .getValue () .splice (first, last - first),
|
|
389
|
+
result = new (target .constructor) (values);
|
|
407
390
|
|
|
408
391
|
for (const value of values)
|
|
409
392
|
target .removeChildObject (value);
|
|
410
393
|
|
|
411
394
|
target .addEvent ();
|
|
412
395
|
|
|
413
|
-
return
|
|
396
|
+
return result;
|
|
414
397
|
},
|
|
415
398
|
resize: function (size, value, silently)
|
|
416
399
|
{
|
|
@@ -453,6 +436,7 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
453
436
|
removeChildObject: function (value)
|
|
454
437
|
{
|
|
455
438
|
value .removeParent (this [_proxy]);
|
|
439
|
+
value .dispose ();
|
|
456
440
|
},
|
|
457
441
|
reverse: function ()
|
|
458
442
|
{
|
|
@@ -597,19 +581,6 @@ X3DObjectArrayField .prototype = Object .assign (Object .create (X3DArrayField .
|
|
|
597
581
|
generator .string += ']';
|
|
598
582
|
}
|
|
599
583
|
},
|
|
600
|
-
dispose: function ()
|
|
601
|
-
{
|
|
602
|
-
const
|
|
603
|
-
target = this [_target],
|
|
604
|
-
array = target .getValue ();
|
|
605
|
-
|
|
606
|
-
for (const value of array)
|
|
607
|
-
target .removeChildObject (value);
|
|
608
|
-
|
|
609
|
-
array .length = 0;
|
|
610
|
-
|
|
611
|
-
X3DArrayField .prototype .dispose .call (target);
|
|
612
|
-
},
|
|
613
584
|
});
|
|
614
585
|
|
|
615
586
|
for (const key of Reflect .ownKeys (X3DObjectArrayField .prototype))
|
|
@@ -83,6 +83,7 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
83
83
|
new X3DFieldDefinition (X3DConstants .inputOutput, "QualityWhenMoving", new Fields .SFString ("SAME")),
|
|
84
84
|
new X3DFieldDefinition (X3DConstants .inputOutput, "Shading", new Fields .SFString ("GOURAUD")),
|
|
85
85
|
new X3DFieldDefinition (X3DConstants .inputOutput, "MotionBlur", new Fields .SFBool ()),
|
|
86
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "AutoUpdate", new Fields .SFBool (false)),
|
|
86
87
|
new X3DFieldDefinition (X3DConstants .inputOutput, "Cache", new Fields .SFBool (true)),
|
|
87
88
|
new X3DFieldDefinition (X3DConstants .inputOutput, "ContentScale", new Fields .SFDouble (1)),
|
|
88
89
|
new X3DFieldDefinition (X3DConstants .inputOutput, "ContextMenu", new Fields .SFBool (true)),
|
|
@@ -126,6 +127,7 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
126
127
|
this ._TextureQuality .addInterest ("set_textureQuality__", this);
|
|
127
128
|
this ._Shading .addInterest ("set_shading__", this);
|
|
128
129
|
this ._StraightenHorizon .addInterest ("set_straightenHorizon__", this);
|
|
130
|
+
this ._AutoUpdate .addInterest ("set_autoUpdate__", this);
|
|
129
131
|
this ._ContentScale .addInterest ("set_contentScale__", this);
|
|
130
132
|
this ._LogarithmicDepthBuffer .addInterest ("set_logarithmicDepthBuffer__", this);
|
|
131
133
|
this ._Multisampling .addInterest ("set_multisampling__", this);
|
|
@@ -143,6 +145,7 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
143
145
|
{
|
|
144
146
|
const attributes = new Set ([
|
|
145
147
|
"Antialiased",
|
|
148
|
+
"AutoUpdate",
|
|
146
149
|
"Cache",
|
|
147
150
|
"ContentScale",
|
|
148
151
|
"ContextMenu",
|
|
@@ -296,6 +299,40 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
296
299
|
|
|
297
300
|
browser .reshape ();
|
|
298
301
|
},
|
|
302
|
+
set_autoUpdate__: function (autoUpdate)
|
|
303
|
+
{
|
|
304
|
+
const events = ["resize", "scroll", "load"]
|
|
305
|
+
.map (event => `${event}.${this .getTypeName ()}${this .getId ()}`)
|
|
306
|
+
.join (" ");
|
|
307
|
+
|
|
308
|
+
if (autoUpdate .getValue ())
|
|
309
|
+
{
|
|
310
|
+
const
|
|
311
|
+
browser = this .getBrowser (),
|
|
312
|
+
element = browser .getElement ();
|
|
313
|
+
|
|
314
|
+
const checkUpdate = () =>
|
|
315
|
+
{
|
|
316
|
+
if (element .isInViewport ())
|
|
317
|
+
{
|
|
318
|
+
if (!browser .isLive ())
|
|
319
|
+
browser .beginUpdate ();
|
|
320
|
+
}
|
|
321
|
+
else
|
|
322
|
+
{
|
|
323
|
+
if (browser .isLive ())
|
|
324
|
+
browser .endUpdate ();
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
$(window) .on (events, checkUpdate);
|
|
329
|
+
checkUpdate ();
|
|
330
|
+
}
|
|
331
|
+
else
|
|
332
|
+
{
|
|
333
|
+
$(window) .off (events);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
299
336
|
set_contentScale__: function (contentScale)
|
|
300
337
|
{
|
|
301
338
|
const browser = this .getBrowser ();
|
|
@@ -374,6 +374,24 @@ X3DCoreContext .prototype =
|
|
|
374
374
|
this .setBrowserOption ("Timings", this .parseBooleanAttribute (newValue, false));
|
|
375
375
|
break;
|
|
376
376
|
}
|
|
377
|
+
case "update":
|
|
378
|
+
{
|
|
379
|
+
if (newValue === "auto")
|
|
380
|
+
{
|
|
381
|
+
this .setBrowserOption ("AutoUpdate", true);
|
|
382
|
+
}
|
|
383
|
+
else
|
|
384
|
+
{
|
|
385
|
+
this .setBrowserOption ("AutoUpdate", false);
|
|
386
|
+
|
|
387
|
+
if (this .parseBooleanAttribute (newValue, true))
|
|
388
|
+
this .beginUpdate ();
|
|
389
|
+
else
|
|
390
|
+
this .endUpdate ();
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
break;
|
|
394
|
+
}
|
|
377
395
|
case "url":
|
|
378
396
|
{
|
|
379
397
|
if (newValue)
|
|
@@ -60,7 +60,7 @@ function CatmullRomSplineInterpolatorTemplate (Type)
|
|
|
60
60
|
constructor: CatmullRomSplineInterpolatorInstance,
|
|
61
61
|
create: function ()
|
|
62
62
|
{
|
|
63
|
-
return
|
|
63
|
+
return Type .Zero .copy ();
|
|
64
64
|
},
|
|
65
65
|
copy: function (value)
|
|
66
66
|
{
|
|
@@ -68,15 +68,15 @@ function CatmullRomSplineInterpolatorTemplate (Type)
|
|
|
68
68
|
},
|
|
69
69
|
subtract: function (lhs, rhs)
|
|
70
70
|
{
|
|
71
|
-
return
|
|
71
|
+
return lhs .copy () .subtract (rhs);
|
|
72
72
|
},
|
|
73
73
|
multiply: function (lhs, rhs)
|
|
74
74
|
{
|
|
75
|
-
return
|
|
75
|
+
return lhs .copy () .multiply (rhs);
|
|
76
76
|
},
|
|
77
77
|
divide: function (lhs, rhs)
|
|
78
78
|
{
|
|
79
|
-
return
|
|
79
|
+
return lhs .copy () .divide (rhs);
|
|
80
80
|
},
|
|
81
81
|
magnitude: function (value)
|
|
82
82
|
{
|
|
@@ -47,8 +47,6 @@
|
|
|
47
47
|
|
|
48
48
|
import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
|
|
49
49
|
|
|
50
|
-
const result = new Rotation4 (0, 0, 1, 0);
|
|
51
|
-
|
|
52
50
|
function SquatInterpolator ()
|
|
53
51
|
{
|
|
54
52
|
this .s = [ ];
|
|
@@ -95,14 +93,21 @@ SquatInterpolator .prototype =
|
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
95
|
else if (key .length > 0)
|
|
96
|
+
{
|
|
98
97
|
s .push (keyValue [0] .getValue () .copy ());
|
|
98
|
+
}
|
|
99
99
|
},
|
|
100
|
-
interpolate: function (
|
|
100
|
+
interpolate: (function ()
|
|
101
101
|
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
const result = new Rotation4 ();
|
|
103
|
+
|
|
104
|
+
return function (index0, index1, weight, keyValue)
|
|
105
|
+
{
|
|
106
|
+
return result .assign (keyValue [index0] .getValue ()) .squad (this .s [index0],
|
|
107
|
+
this .s [index1],
|
|
108
|
+
keyValue [index1] .getValue (), weight);
|
|
109
|
+
};
|
|
110
|
+
})(),
|
|
106
111
|
};
|
|
107
112
|
|
|
108
113
|
export default SquatInterpolator;
|