x_ite 8.7.5 → 8.7.7
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 +370 -591
- 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/assets/shaders/webgl1/include/Shadow.glsl.js +11 -2
- package/src/assets/shaders/webgl2/include/Shadow.glsl.js +11 -2
- 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/tests.js +0 -1
- 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
|
@@ -107,7 +107,7 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
|
|
|
107
107
|
this .behind = false;
|
|
108
108
|
this .fromVector = new Vector3 (0, 0, 0);
|
|
109
109
|
this .startPoint = new Vector3 (0, 0, 0);
|
|
110
|
-
this .startOffset = new Rotation4 (
|
|
110
|
+
this .startOffset = new Rotation4 ();
|
|
111
111
|
},
|
|
112
112
|
getTrackPoint: function (hitRay, trackPoint, behind)
|
|
113
113
|
{
|
|
@@ -115,7 +115,7 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
|
|
|
115
115
|
|
|
116
116
|
if (this .sphere .intersectsLine (hitRay, trackPoint, exit))
|
|
117
117
|
{
|
|
118
|
-
if ((
|
|
118
|
+
if ((hitRay .point .distance (exit) < hitRay .point .distance (trackPoint)) - behind)
|
|
119
119
|
trackPoint .assign (exit);
|
|
120
120
|
|
|
121
121
|
return true;
|
|
@@ -173,7 +173,7 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
|
|
|
173
173
|
|
|
174
174
|
this .zPlane .intersectsLine (hitRay, tangentPoint);
|
|
175
175
|
|
|
176
|
-
hitRay .set (tangentPoint,
|
|
176
|
+
hitRay .set (tangentPoint, this .sphere .center .copy () .subtract (tangentPoint) .normalize ());
|
|
177
177
|
|
|
178
178
|
//console .log (hitRay .toString ());
|
|
179
179
|
|
|
@@ -183,12 +183,12 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
|
|
|
183
183
|
|
|
184
184
|
const
|
|
185
185
|
triNormal = Triangle3 .normal (this .sphere .center, trackPoint, this .startPoint, new Vector3 (0, 0, 0)),
|
|
186
|
-
dirFromCenter =
|
|
187
|
-
normal =
|
|
186
|
+
dirFromCenter = trackPoint .copy () .subtract (this .sphere .center) .normalize (),
|
|
187
|
+
normal = triNormal .copy () .cross (dirFromCenter) .normalize ();
|
|
188
188
|
|
|
189
|
-
const point1 =
|
|
189
|
+
const point1 = trackPoint .copy () .subtract (normal .multiply (tangentPoint .copy () .subtract (trackPoint) .magnitude ()));
|
|
190
190
|
|
|
191
|
-
hitRay .set (point1,
|
|
191
|
+
hitRay .set (point1, this .sphere .center .copy () .subtract (point1) .normalize ());
|
|
192
192
|
|
|
193
193
|
this .getTrackPoint (hitRay, trackPoint, false);
|
|
194
194
|
}
|
|
@@ -196,13 +196,13 @@ SphereSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .pro
|
|
|
196
196
|
this ._trackPoint_changed = trackPoint;
|
|
197
197
|
|
|
198
198
|
const
|
|
199
|
-
toVector =
|
|
199
|
+
toVector = trackPoint .copy () .subtract (this .sphere .center),
|
|
200
200
|
rotation = new Rotation4 (this .fromVector, toVector);
|
|
201
201
|
|
|
202
202
|
if (this .behind)
|
|
203
203
|
rotation .inverse ();
|
|
204
204
|
|
|
205
|
-
this ._rotation_changed =
|
|
205
|
+
this ._rotation_changed = this .startOffset .copy () .multRight (rotation);
|
|
206
206
|
},
|
|
207
207
|
});
|
|
208
208
|
|
|
@@ -90,7 +90,7 @@ function X3DGeometryNode (executionContext)
|
|
|
90
90
|
|
|
91
91
|
this .min = new Vector3 (0, 0, 0);
|
|
92
92
|
this .max = new Vector3 (0, 0, 0);
|
|
93
|
-
this .bbox =
|
|
93
|
+
this .bbox = Box3 .Extents (this .min, this .max);
|
|
94
94
|
this .solid = true;
|
|
95
95
|
this .primitiveMode = browser .getContext () .TRIANGLES;
|
|
96
96
|
this .geometryType = 3;
|
|
@@ -223,7 +223,7 @@ DoubleAxisHingeJoint .prototype = Object .assign (Object .create (X3DRigidJointN
|
|
|
223
223
|
localAnchorPoint1 = new Vector3 (0, 0, 0),
|
|
224
224
|
localAxis1 = new Vector3 (0, 0, 0),
|
|
225
225
|
difference = new Matrix4 (),
|
|
226
|
-
rotation = new Rotation4 (
|
|
226
|
+
rotation = new Rotation4 ();
|
|
227
227
|
|
|
228
228
|
return function ()
|
|
229
229
|
{
|
|
@@ -253,7 +253,7 @@ DoubleAxisHingeJoint .prototype = Object .assign (Object .create (X3DRigidJointN
|
|
|
253
253
|
localAnchorPoint2 = new Vector3 (0, 0, 0),
|
|
254
254
|
localAxis2 = new Vector3 (0, 0, 0),
|
|
255
255
|
difference = new Matrix4 (),
|
|
256
|
-
rotation = new Rotation4 (
|
|
256
|
+
rotation = new Rotation4 ();
|
|
257
257
|
|
|
258
258
|
return function ()
|
|
259
259
|
{
|
|
@@ -471,7 +471,7 @@ RigidBody .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
471
471
|
transform = new Ammo .btTransform (),
|
|
472
472
|
position = new Vector3 (0, 0, 0),
|
|
473
473
|
quaternion = new Quaternion (0, 0, 0, 1),
|
|
474
|
-
orientation = new Rotation4 (
|
|
474
|
+
orientation = new Rotation4 (),
|
|
475
475
|
linearVelocity = new Vector3 (0, 0, 0),
|
|
476
476
|
angularVelocity = new Vector3 (0, 0, 0);
|
|
477
477
|
|
|
@@ -216,7 +216,7 @@ SingleAxisHingeJoint .prototype = Object .assign (Object .create (X3DRigidJointN
|
|
|
216
216
|
var
|
|
217
217
|
localAnchorPoint2 = new Vector3 (0, 0, 0),
|
|
218
218
|
difference = new Matrix4 (),
|
|
219
|
-
rotation = new Rotation4 (
|
|
219
|
+
rotation = new Rotation4 ();
|
|
220
220
|
|
|
221
221
|
return function ()
|
|
222
222
|
{
|
|
@@ -115,7 +115,7 @@ SliderJoint .prototype = Object .assign (Object .create (X3DRigidJointNode .prot
|
|
|
115
115
|
addJoint: (function ()
|
|
116
116
|
{
|
|
117
117
|
var
|
|
118
|
-
axisRotation = new Rotation4 (
|
|
118
|
+
axisRotation = new Rotation4 (),
|
|
119
119
|
matrixA = new Matrix4 (),
|
|
120
120
|
matrixB = new Matrix4 (),
|
|
121
121
|
origin = new Ammo .btVector3 (0, 0, 0),
|
|
@@ -141,8 +141,8 @@ SliderJoint .prototype = Object .assign (Object .create (X3DRigidJointNode .prot
|
|
|
141
141
|
|
|
142
142
|
axisRotation .setFromToVec (Vector3 .xAxis, this ._axis .getValue ());
|
|
143
143
|
|
|
144
|
-
matrixA .set (this .getBody1 () ._position .getValue (),
|
|
145
|
-
matrixB .set (this .getBody1 () ._position .getValue (),
|
|
144
|
+
matrixA .set (this .getBody1 () ._position .getValue (), this .getBody1 () ._orientation .getValue () .copy () .multRight (axisRotation));
|
|
145
|
+
matrixB .set (this .getBody1 () ._position .getValue (), this .getBody1 () ._orientation .getValue () .copy () .multRight (axisRotation));
|
|
146
146
|
|
|
147
147
|
origin .setValue (matrixA [12], matrixA [13], matrixA [14]);
|
|
148
148
|
|
|
@@ -118,7 +118,7 @@ X3DTextureProjectorNode .prototype = Object .assign (Object .create (X3DChildNod
|
|
|
118
118
|
localXAxis = new Vector3 (0, 0, 0),
|
|
119
119
|
localZAxis = new Vector3 (0, 0, 0),
|
|
120
120
|
upVector = new Vector3 (0, 0, 0),
|
|
121
|
-
rotation = new Rotation4 (
|
|
121
|
+
rotation = new Rotation4 ();
|
|
122
122
|
|
|
123
123
|
return function (orientation)
|
|
124
124
|
{
|
|
@@ -409,7 +409,7 @@ MFNode .prototype = Object .assign (Object .create (X3DObjectArrayField .prototy
|
|
|
409
409
|
{
|
|
410
410
|
const target = this .getTarget ();
|
|
411
411
|
|
|
412
|
-
target .resize (0, undefined,
|
|
412
|
+
target .resize (0, undefined, false);
|
|
413
413
|
target .processInterests ();
|
|
414
414
|
|
|
415
415
|
X3DObjectArrayField .prototype .dispose .call (target);
|
|
@@ -81,11 +81,11 @@ function dispose ()
|
|
|
81
81
|
target = this [_target],
|
|
82
82
|
value = target .getValue ();
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
X3DField .prototype .dispose .call (target);
|
|
85
85
|
|
|
86
86
|
value ?.dispose ();
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
cache .delete (value);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export default SFNodeCache;
|
|
@@ -73,7 +73,7 @@ function SFVec3Template (TypeName, Type, double)
|
|
|
73
73
|
{
|
|
74
74
|
cross: function (vector)
|
|
75
75
|
{
|
|
76
|
-
return new (this .constructor) (
|
|
76
|
+
return new (this .constructor) (this .getValue () .copy () .cross (vector .getValue ()));
|
|
77
77
|
},
|
|
78
78
|
});
|
|
79
79
|
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
import X3DField
|
|
48
|
+
import X3DField from "../Base/X3DField.js";
|
|
49
49
|
|
|
50
|
-
function SFVecPrototypeTemplate (Constructor, TypeName, Type,
|
|
50
|
+
function SFVecPrototypeTemplate (Constructor, TypeName, Type, Vector, double)
|
|
51
51
|
{
|
|
52
52
|
const _formatter = double ? "DoubleFormat" : "FloatFormat";
|
|
53
53
|
|
|
@@ -76,7 +76,7 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Type, ValueType, double)
|
|
|
76
76
|
},
|
|
77
77
|
isDefaultValue: function ()
|
|
78
78
|
{
|
|
79
|
-
return this .getValue () .equals (
|
|
79
|
+
return this .getValue () .equals (Vector .Zero);
|
|
80
80
|
},
|
|
81
81
|
set: function (value)
|
|
82
82
|
{
|
|
@@ -918,7 +918,7 @@ SVGParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
918
918
|
bbox = new Box2 ();
|
|
919
919
|
|
|
920
920
|
for (const points of contours)
|
|
921
|
-
bbox .add (
|
|
921
|
+
bbox .add (Box2 .Points (... points));
|
|
922
922
|
|
|
923
923
|
this .groupNodes .push (transformNode);
|
|
924
924
|
|
|
@@ -349,9 +349,9 @@ X3DRenderObject .prototype =
|
|
|
349
349
|
const
|
|
350
350
|
projectionMatrix = new Matrix4 (),
|
|
351
351
|
cameraSpaceProjectionMatrix = new Matrix4 (),
|
|
352
|
-
localOrientation = new Rotation4 (
|
|
352
|
+
localOrientation = new Rotation4 (),
|
|
353
353
|
vector = new Vector3 (0, 0, 0),
|
|
354
|
-
rotation = new Rotation4 (
|
|
354
|
+
rotation = new Rotation4 ();
|
|
355
355
|
|
|
356
356
|
return function (direction)
|
|
357
357
|
{
|
|
@@ -805,7 +805,7 @@ X3DRenderObject .prototype =
|
|
|
805
805
|
projectionMatrix = new Matrix4 (),
|
|
806
806
|
cameraSpaceProjectionMatrix = new Matrix4 (),
|
|
807
807
|
translation = new Vector3 (0, 0, 0),
|
|
808
|
-
rotation = new Rotation4 (
|
|
808
|
+
rotation = new Rotation4 ();
|
|
809
809
|
|
|
810
810
|
return function ()
|
|
811
811
|
{
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
$ .fn .isInViewport = function ()
|
|
2
|
-
{
|
|
3
|
-
const
|
|
4
|
-
elementTop = $(this) .offset () .top,
|
|
5
|
-
elementBottom = elementTop + $(this) .outerHeight (),
|
|
6
|
-
viewportTop = $(window) .scrollTop (),
|
|
7
|
-
viewportBottom = viewportTop + $(window) .height ();
|
|
8
|
-
|
|
9
|
-
return elementBottom > viewportTop && elementTop < viewportBottom;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
$(window) .on ("resize scroll load", () =>
|
|
13
|
-
{
|
|
14
|
-
for (const element of $("x3d-canvas"))
|
|
15
|
-
{
|
|
16
|
-
if ($(element) .isInViewport ())
|
|
17
|
-
{
|
|
18
|
-
element .browser .beginUpdate ();
|
|
19
|
-
}
|
|
20
|
-
else
|
|
21
|
-
{
|
|
22
|
-
element .browser .endUpdate ();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
});
|