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
|
@@ -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;
|
|
@@ -76,12 +76,12 @@ function ExamineViewer (executionContext, navigationInfo)
|
|
|
76
76
|
X3DViewer .call (this, executionContext, navigationInfo);
|
|
77
77
|
|
|
78
78
|
this .button = -1;
|
|
79
|
-
this .orientationOffset = new Rotation4 (
|
|
79
|
+
this .orientationOffset = new Rotation4 ();
|
|
80
80
|
this .fromVector = new Vector3 (0, 0, 0);
|
|
81
81
|
this .toVector = new Vector3 (0, 0, 0);
|
|
82
82
|
this .fromPoint = new Vector3 (0, 0, 0);
|
|
83
83
|
this .toPoint = new Vector3 (0, 0, 0);
|
|
84
|
-
this .rotation = new Rotation4 (
|
|
84
|
+
this .rotation = new Rotation4 ();
|
|
85
85
|
this .direction = new Vector3 (0, 0, 0);
|
|
86
86
|
this .axis = new Vector3 (0, 0, 0);
|
|
87
87
|
this .pressTime = 0;
|
|
@@ -94,7 +94,7 @@ function ExamineViewer (executionContext, navigationInfo)
|
|
|
94
94
|
this .dblTapInterval = 0.4;
|
|
95
95
|
|
|
96
96
|
this .initialPositionOffset = new Vector3 (0, 0, 0);
|
|
97
|
-
this .initialOrientationOffset = new Rotation4 (
|
|
97
|
+
this .initialOrientationOffset = new Rotation4 ();
|
|
98
98
|
this .positionChaser = new PositionChaser (executionContext);
|
|
99
99
|
this .centerOfRotationChaser = new PositionChaser (executionContext);
|
|
100
100
|
this .rotationChaser = new OrientationChaser (executionContext);
|
|
@@ -636,7 +636,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
636
636
|
viewpoint = this .getActiveViewpoint (),
|
|
637
637
|
userPosition = viewpoint .getUserPosition (),
|
|
638
638
|
userCenterOfRotation = viewpoint .getUserCenterOfRotation (),
|
|
639
|
-
direction =
|
|
639
|
+
direction = userPosition .copy () .subtract (userCenterOfRotation),
|
|
640
640
|
rotation = this .getHorizonRotation (rotationChange),
|
|
641
641
|
axis = viewpoint .getUpVector (true);
|
|
642
642
|
|
|
@@ -755,7 +755,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
755
755
|
const
|
|
756
756
|
distance = new Vector3 (0, 0, 0),
|
|
757
757
|
d = new Vector3 (0, 0, 0),
|
|
758
|
-
oob = new Rotation4 (
|
|
758
|
+
oob = new Rotation4 ();
|
|
759
759
|
|
|
760
760
|
return function (positionOffsetBefore, orientationOffsetBefore, orientationOffsetAfter)
|
|
761
761
|
{
|
|
@@ -773,8 +773,8 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
773
773
|
getOrientationOffset: (function ()
|
|
774
774
|
{
|
|
775
775
|
const
|
|
776
|
-
userOrientation = new Rotation4 (
|
|
777
|
-
orientationOffset = new Rotation4 (
|
|
776
|
+
userOrientation = new Rotation4 (),
|
|
777
|
+
orientationOffset = new Rotation4 (),
|
|
778
778
|
zAxis = new Vector3 (0, 0, 0);
|
|
779
779
|
|
|
780
780
|
return function (rotation, orientationOffsetBefore, _throw)
|
|
@@ -822,8 +822,8 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
822
822
|
{
|
|
823
823
|
const
|
|
824
824
|
V = rotation .multVecRot (zAxis .assign (Vector3 .zAxis)),
|
|
825
|
-
N = Vector3 .
|
|
826
|
-
H =
|
|
825
|
+
N = Vector3 .yAxis .copy () .cross (V),
|
|
826
|
+
H = N .copy () .cross (Vector3 .yAxis),
|
|
827
827
|
r = new Rotation4 (Vector3 .zAxis, H);
|
|
828
828
|
|
|
829
829
|
return r;
|
|
@@ -370,7 +370,7 @@ LookAtViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
370
370
|
|
|
371
371
|
event .deltaY = delta;
|
|
372
372
|
event .zoomFactor = Math .abs (delta) / $(window) .width ();
|
|
373
|
-
|
|
373
|
+
|
|
374
374
|
event .pageX = (touches [0] .pageX + touches [1] .pageX) / 2;
|
|
375
375
|
event .pageY = (touches [0] .pageY + touches [1] .pageY) / 2;
|
|
376
376
|
|
|
@@ -456,8 +456,8 @@ LookAtViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
456
456
|
addRotation: (function ()
|
|
457
457
|
{
|
|
458
458
|
const
|
|
459
|
-
userOrientation = new Rotation4 (
|
|
460
|
-
orientationOffset = new Rotation4 (
|
|
459
|
+
userOrientation = new Rotation4 (),
|
|
460
|
+
orientationOffset = new Rotation4 ();
|
|
461
461
|
|
|
462
462
|
return function (fromVector, toVector)
|
|
463
463
|
{
|
|
@@ -82,8 +82,8 @@ WalkViewer .prototype = Object .assign (Object .create (X3DFlyViewer .prototype)
|
|
|
82
82
|
{
|
|
83
83
|
const
|
|
84
84
|
localYAxis = new Vector3 (0, 0, 0),
|
|
85
|
-
userOrientation = new Rotation4 (
|
|
86
|
-
rotation = new Rotation4 (
|
|
85
|
+
userOrientation = new Rotation4 (),
|
|
86
|
+
rotation = new Rotation4 ();
|
|
87
87
|
|
|
88
88
|
return function (velocity)
|
|
89
89
|
{
|
|
@@ -410,9 +410,9 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
410
410
|
upVector = new Vector3 (0, 0, 0),
|
|
411
411
|
direction = new Vector3 (0, 0, 0),
|
|
412
412
|
axis = new Vector3 (0, 0, 0),
|
|
413
|
-
userOrientation = new Rotation4 (
|
|
414
|
-
orientationOffset = new Rotation4 (
|
|
415
|
-
rubberBandRotation = new Rotation4 (
|
|
413
|
+
userOrientation = new Rotation4 (),
|
|
414
|
+
orientationOffset = new Rotation4 (),
|
|
415
|
+
rubberBandRotation = new Rotation4 ();
|
|
416
416
|
|
|
417
417
|
return function ()
|
|
418
418
|
{
|
|
@@ -543,8 +543,8 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
543
543
|
addRoll: (function ()
|
|
544
544
|
{
|
|
545
545
|
const
|
|
546
|
-
orientationOffset = new Rotation4 (
|
|
547
|
-
roll = new Rotation4 (
|
|
546
|
+
orientationOffset = new Rotation4 (),
|
|
547
|
+
roll = new Rotation4 ();
|
|
548
548
|
|
|
549
549
|
return function (rollAngle)
|
|
550
550
|
{
|
|
@@ -580,8 +580,8 @@ X3DFlyViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
580
580
|
addRotation: (function ()
|
|
581
581
|
{
|
|
582
582
|
const
|
|
583
|
-
userOrientation = new Rotation4 (
|
|
584
|
-
orientationOffset = new Rotation4 (
|
|
583
|
+
userOrientation = new Rotation4 (),
|
|
584
|
+
orientationOffset = new Rotation4 ();
|
|
585
585
|
|
|
586
586
|
return function (fromVector, toVector)
|
|
587
587
|
{
|
|
@@ -536,9 +536,8 @@ X3DTextGeometry .prototype =
|
|
|
536
536
|
|
|
537
537
|
text ._origin .setValue (origin .set (min .x, max .y, 0));
|
|
538
538
|
|
|
539
|
-
this .bbox .
|
|
540
|
-
|
|
541
|
-
true);
|
|
539
|
+
this .bbox .setExtents (min3 .set (min .x, min .y, 0),
|
|
540
|
+
max3 .set (max .x, max .y, 0));
|
|
542
541
|
},
|
|
543
542
|
stringToGlyphs: function (font, line, normal, lineNumber)
|
|
544
543
|
{
|
|
@@ -813,18 +813,18 @@ X3DBrowser .prototype = Object .assign (Object .create (X3DBrowserContext .proto
|
|
|
813
813
|
this .setLive (false);
|
|
814
814
|
this .getExecutionContext () .setLive (false);
|
|
815
815
|
},
|
|
816
|
-
print: function ()
|
|
816
|
+
print: function (... args)
|
|
817
817
|
{
|
|
818
|
-
const string =
|
|
818
|
+
const string = args .join ("");
|
|
819
819
|
|
|
820
820
|
console .log (string);
|
|
821
821
|
|
|
822
822
|
for (const element of this [_console])
|
|
823
823
|
element .append (document .createTextNode (string));
|
|
824
824
|
},
|
|
825
|
-
println: function ()
|
|
825
|
+
println: function (... args)
|
|
826
826
|
{
|
|
827
|
-
const string =
|
|
827
|
+
const string = args .join ("");
|
|
828
828
|
|
|
829
829
|
console .log (string);
|
|
830
830
|
|
|
@@ -149,7 +149,7 @@ ProximitySensor .prototype = Object .assign (Object .create (X3DEnvironmentalSen
|
|
|
149
149
|
invModelMatrix = new Matrix4 (),
|
|
150
150
|
centerOfRotationMatrix = new Matrix4 (),
|
|
151
151
|
position = new Vector3 (0, 0, 0),
|
|
152
|
-
orientation = new Rotation4 (
|
|
152
|
+
orientation = new Rotation4 (),
|
|
153
153
|
centerOfRotation = new Vector3 (0, 0, 0);
|
|
154
154
|
|
|
155
155
|
return function ()
|
|
@@ -53,8 +53,8 @@ import X3DConstants from "../../Base/X3DConstants.js";
|
|
|
53
53
|
import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
|
|
54
54
|
|
|
55
55
|
var
|
|
56
|
-
a = new Rotation4 (
|
|
57
|
-
rotation = new Rotation4 (
|
|
56
|
+
a = new Rotation4 (),
|
|
57
|
+
rotation = new Rotation4 ();
|
|
58
58
|
|
|
59
59
|
function OrientationChaser (executionContext)
|
|
60
60
|
{
|
|
@@ -100,7 +100,7 @@ OrientationChaser .prototype = Object .assign (Object .create (X3DChaserNode .pr
|
|
|
100
100
|
},
|
|
101
101
|
getVector: function ()
|
|
102
102
|
{
|
|
103
|
-
return new Rotation4 (
|
|
103
|
+
return new Rotation4 ();
|
|
104
104
|
},
|
|
105
105
|
equals: function (lhs, rhs, tolerance)
|
|
106
106
|
{
|
|
@@ -53,8 +53,8 @@ import X3DConstants from "../../Base/X3DConstants.js";
|
|
|
53
53
|
import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
|
|
54
54
|
|
|
55
55
|
var
|
|
56
|
-
a = new Rotation4 (
|
|
57
|
-
rotation = new Rotation4 (
|
|
56
|
+
a = new Rotation4 (),
|
|
57
|
+
rotation = new Rotation4 ();
|
|
58
58
|
|
|
59
59
|
function OrientationDamper (executionContext)
|
|
60
60
|
{
|
|
@@ -102,7 +102,7 @@ OrientationDamper .prototype = Object .assign (Object .create (X3DDamperNode .pr
|
|
|
102
102
|
},
|
|
103
103
|
getVector: function ()
|
|
104
104
|
{
|
|
105
|
-
return new Rotation4 (
|
|
105
|
+
return new Rotation4 ();
|
|
106
106
|
},
|
|
107
107
|
equals: function (lhs, rhs, tolerance)
|
|
108
108
|
{
|
|
@@ -112,9 +112,8 @@ Rectangle2D .prototype = Object .assign (Object .create (X3DGeometryNode .protot
|
|
|
112
112
|
else
|
|
113
113
|
{
|
|
114
114
|
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
y = scale .y,
|
|
115
|
+
x = Math .abs (size .x / 2),
|
|
116
|
+
y = Math .abs (size .y / 2),
|
|
118
117
|
defaultVertices = geometry .getVertices () .getValue (),
|
|
119
118
|
vertexArray = this .getVertices ();
|
|
120
119
|
|
|
@@ -109,15 +109,12 @@ Box .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
|
|
|
109
109
|
else
|
|
110
110
|
{
|
|
111
111
|
const
|
|
112
|
-
|
|
112
|
+
x = Math .abs (size .x / 2),
|
|
113
|
+
y = Math .abs (size .y / 2),
|
|
114
|
+
z = Math .abs (size .z / 2),
|
|
113
115
|
defaultVertices = geometry .getVertices () .getValue (),
|
|
114
116
|
vertexArray = this .getVertices ();
|
|
115
117
|
|
|
116
|
-
let
|
|
117
|
-
x = scale .x,
|
|
118
|
-
y = scale .y,
|
|
119
|
-
z = scale .z;
|
|
120
|
-
|
|
121
118
|
for (let i = 0, length = defaultVertices .length; i < length; i += 4)
|
|
122
119
|
{
|
|
123
120
|
vertexArray .push (x * defaultVertices [i],
|
|
@@ -126,10 +123,6 @@ Box .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
|
|
|
126
123
|
1);
|
|
127
124
|
}
|
|
128
125
|
|
|
129
|
-
x = Math .abs (x);
|
|
130
|
-
y = Math .abs (y);
|
|
131
|
-
z = Math .abs (z);
|
|
132
|
-
|
|
133
126
|
this .getMin () .set (-x, -y, -z);
|
|
134
127
|
this .getMax () .set ( x, y, z);
|
|
135
128
|
}
|
|
@@ -174,7 +174,7 @@ Cone .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
|
|
|
174
174
|
u = i / xDimension,
|
|
175
175
|
theta = 2 * Math .PI * u,
|
|
176
176
|
t = Complex .Polar (-1, theta),
|
|
177
|
-
p =
|
|
177
|
+
p = t .copy () .multiply (bottomRadius);
|
|
178
178
|
|
|
179
179
|
texCoord .push (new Vector2 ((t .imag + 1) / 2, (t .real + 1) / 2));
|
|
180
180
|
points .push (new Vector3 (p .imag, y2, p .real));
|
|
@@ -125,13 +125,13 @@ Cylinder .prototype = Object .assign (Object .create (X3DGeometryNode .prototype
|
|
|
125
125
|
u1 = i / xDimension,
|
|
126
126
|
theta1 = 2 * Math .PI * u1,
|
|
127
127
|
n1 = Complex .Polar (-1, theta1),
|
|
128
|
-
p1 =
|
|
128
|
+
p1 = n1 .copy () .multiply (radius);
|
|
129
129
|
|
|
130
130
|
const
|
|
131
131
|
u2 = (i + 1) / xDimension,
|
|
132
132
|
theta2 = 2 * Math .PI * u2,
|
|
133
133
|
n2 = Complex .Polar (-1, theta2),
|
|
134
|
-
p2 =
|
|
134
|
+
p2 = n2 .copy () .multiply (radius);
|
|
135
135
|
|
|
136
136
|
// p1 - p4
|
|
137
137
|
// | \ |
|
|
@@ -184,7 +184,7 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
184
184
|
|
|
185
185
|
const
|
|
186
186
|
vector3 = new Vector3 (0, 0, 0),
|
|
187
|
-
rotation = new Rotation4 (
|
|
187
|
+
rotation = new Rotation4 ();
|
|
188
188
|
|
|
189
189
|
return function ()
|
|
190
190
|
{
|
|
@@ -606,7 +606,7 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
606
606
|
point = points [index] .copy ();
|
|
607
607
|
|
|
608
608
|
point .index = index;
|
|
609
|
-
texCoord [index] =
|
|
609
|
+
texCoord [index] = crossSection [numCapPoints - 1 - k] .getValue () .copy () .subtract (min) .divide (capMax);
|
|
610
610
|
polygon .push (convex ? index : point);
|
|
611
611
|
}
|
|
612
612
|
|
|
@@ -646,7 +646,7 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
646
646
|
point = points [index] .copy ();
|
|
647
647
|
|
|
648
648
|
point .index = index;
|
|
649
|
-
texCoord [index] =
|
|
649
|
+
texCoord [index] = crossSection [k] .getValue () .copy () .subtract (min) .divide (capMax);
|
|
650
650
|
polygon .push (convex ? index : point);
|
|
651
651
|
}
|
|
652
652
|
|
|
@@ -183,7 +183,7 @@ GeoViewpoint .prototype = Object .assign (Object .create (X3DViewpointNode .prot
|
|
|
183
183
|
{
|
|
184
184
|
const
|
|
185
185
|
locationMatrix = new Matrix4 (),
|
|
186
|
-
geoOrientation = new Rotation4 (
|
|
186
|
+
geoOrientation = new Rotation4 ();
|
|
187
187
|
|
|
188
188
|
return function (value)
|
|
189
189
|
{
|
|
@@ -200,7 +200,7 @@ GeoViewpoint .prototype = Object .assign (Object .create (X3DViewpointNode .prot
|
|
|
200
200
|
{
|
|
201
201
|
const
|
|
202
202
|
locationMatrix = new Matrix4 (),
|
|
203
|
-
orientation = new Rotation4 (
|
|
203
|
+
orientation = new Rotation4 ();
|
|
204
204
|
|
|
205
205
|
return function ()
|
|
206
206
|
{
|
|
@@ -106,8 +106,8 @@ OrientationInterpolator .prototype = Object .assign (Object .create (X3DInterpol
|
|
|
106
106
|
interpolate: (function ()
|
|
107
107
|
{
|
|
108
108
|
const
|
|
109
|
-
keyValue0 = new Rotation4 (
|
|
110
|
-
keyValue1 = new Rotation4 (
|
|
109
|
+
keyValue0 = new Rotation4 (),
|
|
110
|
+
keyValue1 = new Rotation4 ();
|
|
111
111
|
|
|
112
112
|
return function (index0, index1, weight)
|
|
113
113
|
{
|
|
@@ -103,7 +103,7 @@ Layout .prototype = Object .assign (Object .create (X3DLayoutNode .prototype),
|
|
|
103
103
|
offset: new Vector3 (0, 0, 0),
|
|
104
104
|
scale: new Vector3 (1, 1, 1),
|
|
105
105
|
currentTranslation: new Vector3 (0, 0, 0),
|
|
106
|
-
currentRotation: new Rotation4 (
|
|
106
|
+
currentRotation: new Rotation4 (),
|
|
107
107
|
currentScale: new Vector3 (0, 0, 0),
|
|
108
108
|
modelViewMatrix: new Matrix4 (),
|
|
109
109
|
[Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
|
|
@@ -110,7 +110,7 @@ Billboard .prototype = Object .assign (Object .create (X3DGroupingNode .prototyp
|
|
|
110
110
|
y = new Vector3 (0, 0, 0),
|
|
111
111
|
N1 = new Vector3 (0, 0, 0),
|
|
112
112
|
N2 = new Vector3 (0, 0, 0),
|
|
113
|
-
rotation = new Rotation4 (
|
|
113
|
+
rotation = new Rotation4 ();
|
|
114
114
|
|
|
115
115
|
return function (modelViewMatrix)
|
|
116
116
|
{
|
|
@@ -75,7 +75,7 @@ function X3DViewpointNode (executionContext)
|
|
|
75
75
|
"fieldOfViewScale", new Fields .SFFloat (1));
|
|
76
76
|
|
|
77
77
|
this .userPosition = new Vector3 (0, 1, 0);
|
|
78
|
-
this .userOrientation = new Rotation4 (
|
|
78
|
+
this .userOrientation = new Rotation4 ();
|
|
79
79
|
this .userCenterOfRotation = new Vector3 (0, 0, 0);
|
|
80
80
|
this .modelMatrix = new Matrix4 ();
|
|
81
81
|
this .cameraSpaceMatrix = new Matrix4 (1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 10, 1);
|
|
@@ -384,9 +384,9 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
384
384
|
{
|
|
385
385
|
const
|
|
386
386
|
position = new Vector3 (0, 0, 0),
|
|
387
|
-
orientation = new Rotation4 (
|
|
387
|
+
orientation = new Rotation4 (),
|
|
388
388
|
scale = new Vector3 (0, 0, 0),
|
|
389
|
-
scaleOrientation = new Rotation4 (
|
|
389
|
+
scaleOrientation = new Rotation4 ();
|
|
390
390
|
|
|
391
391
|
return function (fromViewpointNode)
|
|
392
392
|
{
|
|
@@ -461,14 +461,14 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
461
461
|
this .easeInEaseOut ._easeInEaseOut = new Fields .MFVec2f (new Fields .SFVec2f (0, 1), new Fields .SFVec2f (1, 0));
|
|
462
462
|
|
|
463
463
|
const
|
|
464
|
-
translation =
|
|
465
|
-
direction =
|
|
464
|
+
translation = this ._positionOffset .getValue () .copy () .lerp (offset, factor),
|
|
465
|
+
direction = this .getPosition () .copy () .add (translation) .subtract (point);
|
|
466
466
|
|
|
467
|
-
let rotation =
|
|
467
|
+
let rotation = this ._orientationOffset .getValue () .copy () .multRight (new Rotation4 (this .getUserOrientation () .multVecRot (new Vector3 (0, 0, 1)), direction));
|
|
468
468
|
|
|
469
469
|
if (straighten)
|
|
470
470
|
{
|
|
471
|
-
rotation =
|
|
471
|
+
rotation = this .getOrientation () .copy () .inverse () .multRight (this .straightenHorizon (this .getOrientation () .copy () .multRight (rotation)));
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
this .positionInterpolator ._keyValue = new Fields .MFVec3f (this ._positionOffset, translation);
|
|
@@ -479,7 +479,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
479
479
|
const relative = this .getRelativeTransformation (this);
|
|
480
480
|
|
|
481
481
|
this ._fieldOfViewScale = 1;
|
|
482
|
-
this ._centerOfRotationOffset =
|
|
482
|
+
this ._centerOfRotationOffset = point .copy () .subtract (this .getCenterOfRotation ());
|
|
483
483
|
this .nearDistance = Math .min (distance / 2, 0.125);
|
|
484
484
|
this .farDistance = this .nearDistance * this .getMaxFarValue () / 0.125;
|
|
485
485
|
|
|
@@ -497,7 +497,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
497
497
|
|
|
498
498
|
this .easeInEaseOut ._easeInEaseOut = new Fields .MFVec2f (new Fields .SFVec2f (0, 1), new Fields .SFVec2f (1, 0));
|
|
499
499
|
|
|
500
|
-
const rotation =
|
|
500
|
+
const rotation = this .getOrientation () .copy () .inverse () .multRight (this .straightenHorizon (this .getUserOrientation ()));
|
|
501
501
|
|
|
502
502
|
this .positionInterpolator ._keyValue = new Fields .MFVec3f (this ._positionOffset, this ._positionOffset);
|
|
503
503
|
this .orientationInterpolator ._keyValue = new Fields .MFRotation (this ._orientationOffset, rotation);
|
|
@@ -515,7 +515,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
515
515
|
const
|
|
516
516
|
localXAxis = new Vector3 (0, 0, 0),
|
|
517
517
|
localZAxis = new Vector3 (0, 0, 0),
|
|
518
|
-
rotation = new Rotation4 (
|
|
518
|
+
rotation = new Rotation4 ();
|
|
519
519
|
|
|
520
520
|
return function (orientation, upVector = this .getUpVector (true))
|
|
521
521
|
{
|
|
@@ -192,7 +192,7 @@ PointPickSensor .prototype = Object .assign (Object .create (X3DPickSensorNode .
|
|
|
192
192
|
transform = new Ammo .btTransform (),
|
|
193
193
|
localScaling = new Ammo .btVector3 (),
|
|
194
194
|
translation = new Vector3 (0, 0, 0),
|
|
195
|
-
rotation = new Rotation4 (
|
|
195
|
+
rotation = new Rotation4 (),
|
|
196
196
|
scale = new Vector3 (1, 1, 1),
|
|
197
197
|
pickedPoint = new Fields .MFVec3f ();
|
|
198
198
|
|
|
@@ -119,7 +119,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
|
|
|
119
119
|
this .szNormal = null;
|
|
120
120
|
this .behind = false;
|
|
121
121
|
this .fromVector = new Vector3 (0, 0, 0);
|
|
122
|
-
this .startOffset = new Rotation4 (
|
|
122
|
+
this .startOffset = new Rotation4 ();
|
|
123
123
|
},
|
|
124
124
|
isBehind: function (hitRay, hitPoint)
|
|
125
125
|
{
|
|
@@ -129,7 +129,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
|
|
|
129
129
|
|
|
130
130
|
this .cylinder .intersectsLine (hitRay, enter, exit);
|
|
131
131
|
|
|
132
|
-
return
|
|
132
|
+
return hitPoint .distance (enter) > hitPoint .distance (exit);
|
|
133
133
|
},
|
|
134
134
|
getTrackPoint: function (hitRay, trackPoint)
|
|
135
135
|
{
|
|
@@ -138,7 +138,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
|
|
|
138
138
|
this .zPlane .intersectsLine (hitRay, zPoint);
|
|
139
139
|
|
|
140
140
|
const
|
|
141
|
-
axisPoint =
|
|
141
|
+
axisPoint = zPoint .copy () .add (this .cylinder .axis .getPerpendicularVectorToPoint (zPoint, new Vector3 (0, 0, 0))),
|
|
142
142
|
distance = this .sxPlane .getDistanceToPoint (zPoint) / this .cylinder .radius,
|
|
143
143
|
section = Math .floor ((distance + 1) / 2);
|
|
144
144
|
|
|
@@ -155,7 +155,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
|
|
|
155
155
|
},
|
|
156
156
|
getAngle: function (rotation)
|
|
157
157
|
{
|
|
158
|
-
if (
|
|
158
|
+
if (rotation .getAxis (new Vector3 (0, 0, 0)) .dot (this .cylinder .axis .direction) > 0)
|
|
159
159
|
return rotation .angle;
|
|
160
160
|
|
|
161
161
|
else
|
|
@@ -183,7 +183,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
|
|
|
183
183
|
radius = axis .getPerpendicularVectorToPoint (hitPoint, new Vector3 (0, 0, 0)) .magnitude ();
|
|
184
184
|
|
|
185
185
|
this .cylinder = new Cylinder3 (axis, radius);
|
|
186
|
-
this .disk = Math .abs (
|
|
186
|
+
this .disk = Math .abs (cameraBack .dot (yAxis)) > Math .cos (this ._diskAngle .getValue ());
|
|
187
187
|
this .behind = this .isBehind (hitRay, hitPoint);
|
|
188
188
|
this .yPlane = new Plane3 (hitPoint, yAxis); // Sensor aligned y-plane
|
|
189
189
|
this .zPlane = new Plane3 (hitPoint, cameraBack); // Screen aligned z-plane
|
|
@@ -191,10 +191,10 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
|
|
|
191
191
|
// Compute normal like in Billboard with yAxis as axis of rotation.
|
|
192
192
|
const
|
|
193
193
|
billboardToViewer = this .invModelViewMatrix .origin,
|
|
194
|
-
sxNormal =
|
|
194
|
+
sxNormal = yAxis .copy () .cross (billboardToViewer) .normalize ();
|
|
195
195
|
|
|
196
196
|
this .sxPlane = new Plane3 (new Vector3 (0, 0, 0), sxNormal); // Billboarded special x-plane made parallel to sensors axis.
|
|
197
|
-
this .szNormal =
|
|
197
|
+
this .szNormal = sxNormal .copy () .cross (yAxis) .normalize (); // Billboarded special z-normal made parallel to sensors axis.
|
|
198
198
|
|
|
199
199
|
const trackPoint = new Vector3 (0, 0, 0);
|
|
200
200
|
|
|
@@ -268,7 +268,7 @@ PlaneSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .prot
|
|
|
268
268
|
{
|
|
269
269
|
const
|
|
270
270
|
axisRotation = this ._axisRotation .getValue (),
|
|
271
|
-
translation =
|
|
271
|
+
translation = axisRotation .copy () .inverse () .multVecRot (endPoint .add (this .startOffset) .subtract (this .startPoint));
|
|
272
272
|
|
|
273
273
|
// X component
|
|
274
274
|
|