x_ite 8.7.4 → 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/.vscode/tasks.json +1 -1
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +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 +37 -32
- 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 +1187 -1686
- 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/reference/field-services-and-objects.md +26 -6
- 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/Algorithms/eigen_decomposition.js +9 -9
- package/src/standard/Math/Geometry/Box2.js +37 -24
- package/src/standard/Math/Geometry/Box3.js +37 -24
- 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/Color3.js +10 -18
- package/src/standard/Math/Numbers/Color4.js +12 -23
- package/src/standard/Math/Numbers/Complex.js +59 -58
- package/src/standard/Math/Numbers/Matrix2.js +31 -45
- package/src/standard/Math/Numbers/Matrix3.js +59 -94
- package/src/standard/Math/Numbers/Matrix4.js +73 -114
- package/src/standard/Math/Numbers/Quaternion.js +70 -132
- package/src/standard/Math/Numbers/Rotation4.js +15 -42
- package/src/standard/Math/Numbers/Vector2.js +12 -78
- package/src/standard/Math/Numbers/Vector3.js +17 -94
- package/src/standard/Math/Numbers/Vector4.js +22 -94
- package/src/x_ite/Base/X3DInfoArray.js +9 -7
- 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 +21 -3
- 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/Layout/ScreenText.js +9 -4
- 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 +61 -68
- package/src/x_ite/Browser/X3DBrowserContext.js +8 -8
- 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/Layering/X3DLayerNode.js +1 -1
- 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 +12 -13
- 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/Execution/X3DExecutionContext.js +52 -58
- package/src/x_ite/Execution/X3DExportedNode.js +13 -11
- package/src/x_ite/Execution/X3DImportedNode.js +25 -25
- package/src/x_ite/Execution/X3DScene.js +129 -53
- package/src/x_ite/Fields/ArrayFields.js +1 -1
- package/src/x_ite/Fields/SFColor.js +10 -15
- package/src/x_ite/Fields/SFColorRGBA.js +11 -18
- package/src/x_ite/Fields/SFImage.js +38 -33
- package/src/x_ite/Fields/SFMatrix3.js +1 -3
- package/src/x_ite/Fields/SFMatrix4.js +1 -5
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +6 -5
- package/src/x_ite/Fields/SFNodeCache.js +2 -2
- package/src/x_ite/Fields/SFRotation.js +14 -21
- package/src/x_ite/Fields/SFString.js +0 -1
- package/src/x_ite/Fields/SFVec2.js +8 -15
- package/src/x_ite/Fields/SFVec3.js +11 -18
- package/src/x_ite/Fields/SFVec4.js +12 -23
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +17 -16
- package/src/x_ite/Parser/SVGParser.js +3 -3
- package/src/x_ite/Parser/X3DOptimizer.js +1 -1
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +26 -27
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +16 -15
- package/src/x_ite/Rendering/X3DRenderObject.js +3 -3
- package/src/x_ite/Routing/X3DRoute.js +26 -25
- package/src/x_ite/X3DCanvasElement.js +1 -0
- package/docs/assets/js/autoupdate.js +0 -25
- package/src/x_ite/Execution/Scene.js +0 -145
|
@@ -81,7 +81,7 @@ Bounding box size is usually omitted, and can easily be calculated automatically
|
|
|
81
81
|
|
|
82
82
|
## Example
|
|
83
83
|
|
|
84
|
-
<x3d-canvas src="https://create3000.github.io/media/examples/VolumeRendering/VolumeData/VolumeData.x3d"></x3d-canvas>
|
|
84
|
+
<x3d-canvas src="https://create3000.github.io/media/examples/VolumeRendering/VolumeData/VolumeData.x3d" update="auto"></x3d-canvas>
|
|
85
85
|
|
|
86
86
|
## External Links
|
|
87
87
|
|
|
@@ -87,7 +87,7 @@ Specifies the alpha blend equation, how the alpha component of the source and de
|
|
|
87
87
|
|
|
88
88
|
## Example
|
|
89
89
|
|
|
90
|
-
<x3d-canvas src="https://create3000.github.io/media/examples/X_ITE/BlendMode/BlendMode.x3d"></x3d-canvas>
|
|
90
|
+
<x3d-canvas src="https://create3000.github.io/media/examples/X_ITE/BlendMode/BlendMode.x3d" update="auto"></x3d-canvas>
|
|
91
91
|
|
|
92
92
|
## See Also
|
|
93
93
|
|
|
@@ -13,7 +13,7 @@ However, you will often want to perform special effects or special cases for you
|
|
|
13
13
|
|
|
14
14
|
## Example
|
|
15
15
|
|
|
16
|
-
<x3d-canvas src="https://create3000.github.io/media/examples/X3D/WaterQuality/WaterQuality.x3d">
|
|
16
|
+
<x3d-canvas src="https://create3000.github.io/media/examples/X3D/WaterQuality/WaterQuality.x3d" update="auto">
|
|
17
17
|
<img src="https://create3000.github.io/media/images/water-quality.png" alt="Shader Example"/>
|
|
18
18
|
</x3d-canvas>
|
|
19
19
|
|
|
@@ -10,6 +10,7 @@ x_ite: true
|
|
|
10
10
|
<x3d-canvas
|
|
11
11
|
class="teaser"
|
|
12
12
|
src="/x_ite/assets/X3D/teaser/teaser.x3d"
|
|
13
|
+
update="auto"
|
|
13
14
|
splashScreen="false"
|
|
14
15
|
contextMenu="false"
|
|
15
16
|
notifications="false"
|
|
@@ -739,14 +740,18 @@ A String value containing the URL to load on page load. If no *src* attribute is
|
|
|
739
740
|
|
|
740
741
|
A Boolean value (`true` or `false`) to indicate whether the Timings Panel should be displayed. The default value for the *timings* attribute is restored from the previous session, otherwise it is `false`.
|
|
741
742
|
|
|
743
|
+
### update
|
|
744
|
+
|
|
745
|
+
A Boolean value (`true`, `false` or `auto`) to indicate whether browser events should be processed. The default value for the *update* attribute is `true`. A value of `true` will effectively call `Browser.beginUpdate`, a value of `false` will call `Browser.endUpdate`. If the value is `auto`, the effective value is determined by the visibility of the \<x3d-canvas\> element.
|
|
746
|
+
|
|
742
747
|
### url
|
|
743
748
|
|
|
744
749
|
An MFString value of URLs to load on page load. If no *url* attribute is specified or the attribute is empty, an empty scene will be displayed. If both *src* and *url* attributes are given, the last given attribute takes precedence.
|
|
745
750
|
|
|
746
|
-
### Example
|
|
751
|
+
### Example of Use
|
|
747
752
|
|
|
748
753
|
```html
|
|
749
|
-
<x3d-canvas
|
|
754
|
+
<x3d-canvas src="path/to/your/X3D/world.x3d" cache="true" update="auto"></x3d-canvas>
|
|
750
755
|
```
|
|
751
756
|
|
|
752
757
|
### More Options
|
|
@@ -215,6 +215,12 @@ Returns a browser option with the corresponding name.
|
|
|
215
215
|
<td>LOW, MEDIUM, HIGH</td>
|
|
216
216
|
<td>MEDIUM</td>
|
|
217
217
|
</tr>
|
|
218
|
+
<tr>
|
|
219
|
+
<td>AutoUpdate</td>
|
|
220
|
+
<td>Whether the update control of the browser should be done automatically or not. (non standard)</td>
|
|
221
|
+
<td>Boolean</td>
|
|
222
|
+
<td>false</td>
|
|
223
|
+
</tr>
|
|
218
224
|
<tr>
|
|
219
225
|
<td>Cache</td>
|
|
220
226
|
<td>Whether or not files should be cached. (non standard)</td>
|
|
@@ -263,11 +263,21 @@ None
|
|
|
263
263
|
|
|
264
264
|
#### void **setTransform** (*translation*, *rotation*, *scaleFactor*, *scaleOrientation*, *center*)
|
|
265
265
|
|
|
266
|
-
Sets the SFMatrix3d/f to the passed values. *translation* is an SFVec2d/f object, *rotation* is a Number, *scaleFactor* is a SFVec2d/f object, *scaleOrientation* is a Number and *center* is a SFVec2d/f object.
|
|
266
|
+
Sets the SFMatrix3d/f to the passed values. *translation* is an SFVec2d/f object, *rotation* is a Number, *scaleFactor* is a SFVec2d/f object, *scaleOrientation* is a Number and *center* is a SFVec2d/f object.
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
Any of the rightmost parameters can be omitted, or any parameter can be `null`. In other words, the method can take from 0 to 5 parameters. For example, you can specify 0 parameters (resulting in a identity matrix), 1 parameter (a translation), 2 parameters (a translation and a rotation), 3 parameters (a translation, rotation and a scaleFactor), etc. Any unspecified parameter is set to its default as specified in the **Transform** node section of the X3D specification.
|
|
269
269
|
|
|
270
|
-
|
|
270
|
+
#### void **getTransform** (*translation*, *rotation*, *scaleFactor*, *scaleOrientation*, *center*)
|
|
271
|
+
|
|
272
|
+
Decomposes the SFMatrix3d/f and returns the components in the passed *translation*, *rotation*, and *scaleFactor* objects*. rotation* is a SFVec3d/f, where x and y are the complex value of the rotation and z is the rotation angle in radians. The other types of the parameters are the same as in **setTransform**.
|
|
273
|
+
|
|
274
|
+
Any of the rightmost parameters can be omitted, or any parameter can be `null`. In other words, the method can take from 0 to 5 parameters. For example, you can specify 0 parameters (resulting in a identity matrix), 1 parameter (a translation), 2 parameters (a translation and a rotation), 3 parameters (a translation, rotation and a scaleFactor), etc. Any unspecified parameter is set to its default as specified in the **Transform** node section of the X3D specification.
|
|
275
|
+
|
|
276
|
+
A center of any value can be specified around which the rotation and scaling will take place.
|
|
277
|
+
|
|
278
|
+
#### Number **determinant** ()
|
|
279
|
+
|
|
280
|
+
Returns the determinant of this object's matrix.
|
|
271
281
|
|
|
272
282
|
#### SFMatrix3d/f **inverse** ()
|
|
273
283
|
|
|
@@ -327,11 +337,21 @@ None
|
|
|
327
337
|
|
|
328
338
|
#### void **setTransform** (*translation*, *rotation*, *scaleFactor*, *scaleOrientation*, *center*)
|
|
329
339
|
|
|
330
|
-
Sets the SFMatrix4d/f to the passed values. *translation* is an SFVec3d/f object, *rotation* is a SFRotation object, *scaleFactor* is a SFVec3d/f object, *scaleOrientation* is a SFRotation object and *center* is a SFVec3d/f object.
|
|
340
|
+
Sets the SFMatrix4d/f to the passed values. *translation* is an SFVec3d/f object, *rotation* is a SFRotation object, *scaleFactor* is a SFVec3d/f object, *scaleOrientation* is a SFRotation object and *center* is a SFVec3d/f object.
|
|
341
|
+
|
|
342
|
+
Any of the rightmost parameters can be omitted. In other words, the method can take from 0 to 5 parameters. For example, you can specify 0 parameters (resulting in a identity matrix), 1 parameter (a translation), 2 parameters (a translation and a rotation), 3 parameters (a translation, rotation and a scaleFactor), etc. Any unspecified parameter is set to its default as specified in the **Transform** node section of the X3D specification.
|
|
343
|
+
|
|
344
|
+
#### void **getTransform** (*translation*, *rotation*, *scaleFactor*, *scaleOrientation*, *center*)
|
|
345
|
+
|
|
346
|
+
Decomposes the SFMatrix4d/f and returns the components in the passed *translation*, *rotation*, and *scaleFactor* objects. The types of the parameters are the same as in **setTransform**.
|
|
347
|
+
|
|
348
|
+
Any of the rightmost parameters can be omitted. In other words, the method can take from 0 to 5 parameters. For example, you can specify 0 parameters (resulting in a identity matrix), 1 parameter (a translation), 2 parameters (a translation and a rotation), 3 parameters (a translation, rotation and a scaleFactor), etc. Any unspecified parameter is set to its default as specified in the **Transform** node section of the X3D specification.
|
|
349
|
+
|
|
350
|
+
A center of any value can be specified around which the rotation and scaling will take place.
|
|
331
351
|
|
|
332
|
-
####
|
|
352
|
+
#### Number **determinant** ()
|
|
333
353
|
|
|
334
|
-
|
|
354
|
+
Returns the determinant of this object's matrix.
|
|
335
355
|
|
|
336
356
|
#### SFMatrix4d/f **inverse** ()
|
|
337
357
|
|
|
@@ -137,7 +137,7 @@ DEF Summer Background {
|
|
|
137
137
|
|
|
138
138
|
### Example
|
|
139
139
|
|
|
140
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/background1/background1.x3dv">
|
|
140
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/background1/background1.x3dv" update="auto">
|
|
141
141
|
<img src="https://create3000.github.io/media/tutorials/scenes/background1/screenshot.png" alt="Background 1"/>
|
|
142
142
|
</x3d-canvas>
|
|
143
143
|
|
|
@@ -257,7 +257,7 @@ DEF Summer Background {
|
|
|
257
257
|
|
|
258
258
|
### Example
|
|
259
259
|
|
|
260
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/background2/background2.x3dv">
|
|
260
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/background2/background2.x3dv" update="auto">
|
|
261
261
|
<img src="https://create3000.github.io/media/tutorials/scenes/background2/screenshot.png" alt="Background 1"/>
|
|
262
262
|
</x3d-canvas>
|
|
263
263
|
|
|
@@ -241,7 +241,7 @@ ROUTE C4.touchTime TO PitchC4.set_startTime
|
|
|
241
241
|
|
|
242
242
|
### Example
|
|
243
243
|
|
|
244
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/sound/sound.x3dv">
|
|
244
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/sound/sound.x3dv" update="auto">
|
|
245
245
|
<img src="https://create3000.github.io/media/tutorials/scenes/sound/screenshot.png" alt="Sound"/>
|
|
246
246
|
</x3d-canvas>
|
|
247
247
|
|
|
@@ -56,7 +56,7 @@ Shape {
|
|
|
56
56
|
|
|
57
57
|
### Example
|
|
58
58
|
|
|
59
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/cylinder1/cylinder1.x3dv">
|
|
59
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/cylinder1/cylinder1.x3dv" update="auto">
|
|
60
60
|
<img src="https://create3000.github.io/media/tutorials/scenes/cylinder1/screenshot.png" alt="Cylinder"/>
|
|
61
61
|
</x3d-canvas>
|
|
62
62
|
|
|
@@ -163,7 +163,7 @@ Shape {
|
|
|
163
163
|
|
|
164
164
|
### Example
|
|
165
165
|
|
|
166
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/elevation-grid/elevation-grid.x3dv">
|
|
166
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/elevation-grid/elevation-grid.x3dv" update="auto">
|
|
167
167
|
<img src="https://create3000.github.io/media/tutorials/scenes/elevation-grid/screenshot.png" alt="Elevation Grid"/>
|
|
168
168
|
</x3d-canvas>
|
|
169
169
|
|
|
@@ -131,7 +131,7 @@ Shape {
|
|
|
131
131
|
|
|
132
132
|
### Example
|
|
133
133
|
|
|
134
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/cylinder1/cylinder1.x3dv">
|
|
134
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/cylinder1/cylinder1.x3dv" update="auto">
|
|
135
135
|
<img src="https://create3000.github.io/media/tutorials/scenes/cylinder1/screenshot.png" alt="Cylinder"/>
|
|
136
136
|
</x3d-canvas>
|
|
137
137
|
|
|
@@ -198,7 +198,7 @@ Shape {
|
|
|
198
198
|
|
|
199
199
|
### Example
|
|
200
200
|
|
|
201
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/multiple-shapes/multiple-shapes.x3dv">
|
|
201
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/multiple-shapes/multiple-shapes.x3dv" update="auto">
|
|
202
202
|
<img src="https://create3000.github.io/media/tutorials/scenes/multiple-shapes/screenshot.png" alt="Multiple Shapes"/>
|
|
203
203
|
</x3d-canvas>
|
|
204
204
|
|
|
@@ -174,7 +174,7 @@ Shape {
|
|
|
174
174
|
|
|
175
175
|
### Example
|
|
176
176
|
|
|
177
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/box1/box1.x3dv">
|
|
177
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/box1/box1.x3dv" update="auto">
|
|
178
178
|
<img src="https://create3000.github.io/media/tutorials/scenes/box1/screenshot.png" alt="Box 1"/>
|
|
179
179
|
</x3d-canvas>
|
|
180
180
|
|
|
@@ -118,7 +118,7 @@ LOD {
|
|
|
118
118
|
|
|
119
119
|
### Example
|
|
120
120
|
|
|
121
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/lod/lod.x3dv">
|
|
121
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/lod/lod.x3dv" update="auto">
|
|
122
122
|
<img src="https://create3000.github.io/media/tutorials/scenes/lod/screenshot.png" alt="LOD"/>
|
|
123
123
|
</x3d-canvas>
|
|
124
124
|
|
|
@@ -19,7 +19,7 @@ In this tutorial, you will learn how to create a simple hello world scene with X
|
|
|
19
19
|
|
|
20
20
|
### Example
|
|
21
21
|
|
|
22
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/hello-world/hello-world.x3d">
|
|
22
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/hello-world/hello-world.x3d" update="auto">
|
|
23
23
|
<img src="https://create3000.github.io/media/tutorials/hello-world/screenshot.png" alt="Hello World Image"/>
|
|
24
24
|
</x3d-canvas>
|
|
25
25
|
|
|
@@ -156,7 +156,7 @@ Transform {
|
|
|
156
156
|
|
|
157
157
|
### Example
|
|
158
158
|
|
|
159
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/dinette/dinette.x3dv">
|
|
159
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/dinette/dinette.x3dv" update="auto">
|
|
160
160
|
<img src="https://create3000.github.io/media/tutorials/scenes/dinette/screenshot.png" alt="Dinette"/>
|
|
161
161
|
</x3d-canvas>
|
|
162
162
|
|
|
@@ -448,7 +448,7 @@ ROUTE Bouncer.value_changed TO Ball.set_translation
|
|
|
448
448
|
|
|
449
449
|
### Example
|
|
450
450
|
|
|
451
|
-
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/bouncer/bouncer.x3dv">
|
|
451
|
+
<x3d-canvas src="https://create3000.github.io/media/tutorials/scenes/bouncer/bouncer.x3dv" update="auto">
|
|
452
452
|
<img src="https://create3000.github.io/media/tutorials/scenes/bouncer/screenshot.png" alt="Bouncer"/>
|
|
453
453
|
</x3d-canvas>
|
|
454
454
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x_ite",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.6",
|
|
4
4
|
"description": "X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.",
|
|
5
5
|
"homepage": "https://create3000.github.io/x_ite/",
|
|
6
6
|
"author": "Holger Seelig <holger.seelig@gmail.com>",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"libgif": "^0.0.3",
|
|
67
67
|
"libtess": "^1.2.2",
|
|
68
68
|
"madge": "^6.0.0",
|
|
69
|
-
"node-sass": "^
|
|
69
|
+
"node-sass": "^9.0.0",
|
|
70
70
|
"OpenJPEG.js": "^0.10.2",
|
|
71
71
|
"opentype.js": "^1.3.4",
|
|
72
72
|
"pako": "^2.1.0",
|
|
73
73
|
"string-replace-webpack-plugin": "^0.1.3",
|
|
74
|
-
"webpack": "^5.
|
|
74
|
+
"webpack": "^5.84.1",
|
|
75
75
|
"webpack-cli": "^5.1.1",
|
|
76
76
|
"webpack-shell-plugin-next": "^2.3.1"
|
|
77
77
|
},
|
package/src/lib/jquery.js
CHANGED
|
@@ -23,4 +23,17 @@ $.toLowerCaseFirst = function (string)
|
|
|
23
23
|
return string [0] .toLowerCase () + string .slice (1);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
$.fn.isInViewport = function ()
|
|
27
|
+
{
|
|
28
|
+
const
|
|
29
|
+
$this = $(this),
|
|
30
|
+
$window = $(window),
|
|
31
|
+
elementTop = $this .offset () .top,
|
|
32
|
+
elementBottom = elementTop + $this .outerHeight (),
|
|
33
|
+
viewportTop = $window .scrollTop (),
|
|
34
|
+
viewportBottom = viewportTop + $window .height ();
|
|
35
|
+
|
|
36
|
+
return elementBottom > viewportTop && elementTop < viewportBottom;
|
|
37
|
+
};
|
|
38
|
+
|
|
26
39
|
export default $;
|
|
@@ -55,23 +55,23 @@ function eigen_decomposition (matrix, result)
|
|
|
55
55
|
{
|
|
56
56
|
const
|
|
57
57
|
ORDER = matrix .order,
|
|
58
|
+
SIZE = matrix .length,
|
|
58
59
|
values = result .values,
|
|
59
60
|
vectors = result .vectors;
|
|
60
61
|
|
|
61
62
|
let
|
|
62
|
-
sm,
|
|
63
|
-
theta,
|
|
64
|
-
c, s, t,
|
|
65
|
-
tau,
|
|
66
|
-
h, g,
|
|
67
|
-
thresh,
|
|
68
|
-
p, q, i, j
|
|
69
|
-
SIZE = matrix .length;
|
|
63
|
+
sm, // smallest entry
|
|
64
|
+
theta, // angle for Jacobi rotation
|
|
65
|
+
c, s, t, // cosine, sine, tangent of theta
|
|
66
|
+
tau, // sine / (1 + cos)
|
|
67
|
+
h, g, // two scrap values
|
|
68
|
+
thresh, // threshold below which no rotation done
|
|
69
|
+
p, q, i, j; // indices
|
|
70
70
|
|
|
71
71
|
// initializations
|
|
72
72
|
for (i = 0; i < ORDER; ++ i)
|
|
73
73
|
{
|
|
74
|
-
a [i] = a [i]
|
|
74
|
+
a [i] = a [i] ?? [ ];
|
|
75
75
|
b [i] = values [i] = matrix .get1 (i, i);
|
|
76
76
|
z [i] = 0;
|
|
77
77
|
|
|
@@ -93,10 +93,11 @@ Box2 .prototype =
|
|
|
93
93
|
|
|
94
94
|
return this;
|
|
95
95
|
}
|
|
96
|
-
case 3:
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
// case 3:
|
|
97
|
+
// {
|
|
98
|
+
// console .trace ()
|
|
99
|
+
// return this .setExtents (arguments [0], arguments [1]);
|
|
100
|
+
// }
|
|
100
101
|
}
|
|
101
102
|
},
|
|
102
103
|
setExtents: function (min, max)
|
|
@@ -136,7 +137,7 @@ Box2 .prototype =
|
|
|
136
137
|
this .getExtents (lhs_min, lhs_max);
|
|
137
138
|
box .getExtents (rhs_min, rhs_max);
|
|
138
139
|
|
|
139
|
-
return this .
|
|
140
|
+
return this .setExtents (lhs_min .min (rhs_min), lhs_max .max (rhs_max));
|
|
140
141
|
};
|
|
141
142
|
})(),
|
|
142
143
|
multLeft: function (matrix)
|
|
@@ -203,33 +204,45 @@ Box2 .prototype =
|
|
|
203
204
|
},
|
|
204
205
|
};
|
|
205
206
|
|
|
206
|
-
Object .
|
|
207
|
+
Object .assign (Box2,
|
|
207
208
|
{
|
|
208
|
-
|
|
209
|
+
Extents: function (min, max)
|
|
209
210
|
{
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
return new Box2 () .setExtents (min, max);
|
|
212
|
+
},
|
|
213
|
+
Points: function (... points)
|
|
214
|
+
{
|
|
215
|
+
return new Box2 () .setExtents (points [0] .copy () .min (... points), points [0] .copy () .max (... points));
|
|
216
|
+
},
|
|
217
|
+
});
|
|
213
218
|
|
|
214
|
-
|
|
219
|
+
Object .defineProperties (Box2 .prototype,
|
|
220
|
+
{
|
|
221
|
+
size:
|
|
222
|
+
{
|
|
223
|
+
get: (function ()
|
|
215
224
|
{
|
|
216
|
-
|
|
225
|
+
const
|
|
226
|
+
min = new Vector2 (0, 0),
|
|
227
|
+
max = new Vector2 (0, 0);
|
|
217
228
|
|
|
218
|
-
return
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
enumerable: true,
|
|
222
|
-
configurable: false
|
|
223
|
-
});
|
|
229
|
+
return function ()
|
|
230
|
+
{
|
|
231
|
+
this .getAbsoluteExtents (min, max);
|
|
224
232
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
233
|
+
return max .subtract (min);
|
|
234
|
+
};
|
|
235
|
+
})(),
|
|
236
|
+
enumerable: true,
|
|
237
|
+
},
|
|
238
|
+
center:
|
|
228
239
|
{
|
|
229
|
-
|
|
240
|
+
get: function ()
|
|
241
|
+
{
|
|
242
|
+
return this .matrix .origin;
|
|
243
|
+
},
|
|
244
|
+
enumerable: true,
|
|
230
245
|
},
|
|
231
|
-
enumerable: true,
|
|
232
|
-
configurable: false
|
|
233
246
|
});
|
|
234
247
|
|
|
235
248
|
export default Box2;
|
|
@@ -101,10 +101,11 @@ Box3 .prototype =
|
|
|
101
101
|
|
|
102
102
|
return this;
|
|
103
103
|
}
|
|
104
|
-
case 3:
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
// case 3:
|
|
105
|
+
// {
|
|
106
|
+
// console .trace ()
|
|
107
|
+
// return this .setExtents (arguments [0], arguments [1]);
|
|
108
|
+
// }
|
|
108
109
|
}
|
|
109
110
|
},
|
|
110
111
|
setExtents: function (min, max)
|
|
@@ -373,7 +374,7 @@ Box3 .prototype =
|
|
|
373
374
|
this .getExtents (lhs_min, lhs_max);
|
|
374
375
|
box .getExtents (rhs_min, rhs_max);
|
|
375
376
|
|
|
376
|
-
return this .
|
|
377
|
+
return this .setExtents (lhs_min .min (rhs_min), lhs_max .max (rhs_max));
|
|
377
378
|
};
|
|
378
379
|
})(),
|
|
379
380
|
multLeft: function (matrix)
|
|
@@ -611,33 +612,45 @@ Box3 .prototype =
|
|
|
611
612
|
},
|
|
612
613
|
};
|
|
613
614
|
|
|
614
|
-
Object .
|
|
615
|
+
Object .assign (Box3,
|
|
615
616
|
{
|
|
616
|
-
|
|
617
|
+
Extents: function (min, max)
|
|
617
618
|
{
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
619
|
+
return new Box3 () .setExtents (min, max);
|
|
620
|
+
},
|
|
621
|
+
Points: function (... points)
|
|
622
|
+
{
|
|
623
|
+
return new Box3 () .setExtents (points [0] .copy () .min (... points), points [0] .copy () .max (... points));
|
|
624
|
+
},
|
|
625
|
+
});
|
|
621
626
|
|
|
622
|
-
|
|
627
|
+
Object .defineProperties (Box3 .prototype,
|
|
628
|
+
{
|
|
629
|
+
size:
|
|
630
|
+
{
|
|
631
|
+
get: (function ()
|
|
623
632
|
{
|
|
624
|
-
|
|
633
|
+
const
|
|
634
|
+
min = new Vector3 (0, 0, 0),
|
|
635
|
+
max = new Vector3 (0, 0, 0);
|
|
625
636
|
|
|
626
|
-
return
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
enumerable: true,
|
|
630
|
-
configurable: false
|
|
631
|
-
});
|
|
637
|
+
return function ()
|
|
638
|
+
{
|
|
639
|
+
this .getAbsoluteExtents (min, max);
|
|
632
640
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
641
|
+
return max .subtract (min);
|
|
642
|
+
};
|
|
643
|
+
})(),
|
|
644
|
+
enumerable: true,
|
|
645
|
+
},
|
|
646
|
+
center:
|
|
636
647
|
{
|
|
637
|
-
|
|
648
|
+
get: function ()
|
|
649
|
+
{
|
|
650
|
+
return this .matrix .origin;
|
|
651
|
+
},
|
|
652
|
+
enumerable: true,
|
|
638
653
|
},
|
|
639
|
-
enumerable: true,
|
|
640
|
-
configurable: false
|
|
641
654
|
});
|
|
642
655
|
|
|
643
656
|
export default Box3;
|
|
@@ -89,7 +89,7 @@ Cylinder3 .prototype =
|
|
|
89
89
|
|
|
90
90
|
// find the given line un-translated
|
|
91
91
|
const
|
|
92
|
-
point =
|
|
92
|
+
point = line .point .copy () .subtract (this .axis .point),
|
|
93
93
|
noTranslationLine = new Line3 (point, line .direction);
|
|
94
94
|
|
|
95
95
|
// find the un-translated line in unit cylinder's space
|
|
@@ -146,7 +146,7 @@ Line2 .Points = function (point1, point2)
|
|
|
146
146
|
{
|
|
147
147
|
const line = Object .create (Line2 .prototype);
|
|
148
148
|
line .point = point1 .copy ();
|
|
149
|
-
line .direction =
|
|
149
|
+
line .direction = point2 .copy () .subtract (point1) .normalize ();
|
|
150
150
|
return line;
|
|
151
151
|
};
|
|
152
152
|
|
|
@@ -226,7 +226,7 @@ Line3 .Points = function (point1, point2)
|
|
|
226
226
|
{
|
|
227
227
|
const line = Object .create (Line3 .prototype);
|
|
228
228
|
line .point = point1 .copy ();
|
|
229
|
-
line .direction =
|
|
229
|
+
line .direction = point2 .copy () .subtract (point1) .normalize ();
|
|
230
230
|
return line;
|
|
231
231
|
};
|
|
232
232
|
|
|
@@ -133,7 +133,7 @@ Plane3 .prototype =
|
|
|
133
133
|
},
|
|
134
134
|
getDistanceToPoint: function (point)
|
|
135
135
|
{
|
|
136
|
-
return
|
|
136
|
+
return point .dot (this .normal) - this .distanceFromOrigin;
|
|
137
137
|
},
|
|
138
138
|
intersectsLine: function (line, intersection)
|
|
139
139
|
{
|
|
@@ -129,8 +129,8 @@ Sphere3 .prototype =
|
|
|
129
129
|
const
|
|
130
130
|
rr = r * r,
|
|
131
131
|
V = AB .cross (AC),
|
|
132
|
-
d =
|
|
133
|
-
e =
|
|
132
|
+
d = A .dot (V),
|
|
133
|
+
e = V .dot (V),
|
|
134
134
|
sep1 = d * d > rr * e;
|
|
135
135
|
|
|
136
136
|
if (sep1)
|
|
@@ -138,12 +138,12 @@ Sphere3 .prototype =
|
|
|
138
138
|
|
|
139
139
|
// Testing if sphere lies outside a triangle vertex.
|
|
140
140
|
const
|
|
141
|
-
aa =
|
|
142
|
-
ab =
|
|
143
|
-
ac =
|
|
144
|
-
bb =
|
|
145
|
-
bc =
|
|
146
|
-
cc =
|
|
141
|
+
aa = A .dot (A),
|
|
142
|
+
ab = A .dot (B),
|
|
143
|
+
ac = A .dot (C),
|
|
144
|
+
bb = B .dot (B),
|
|
145
|
+
bc = B .dot (C),
|
|
146
|
+
cc = C .dot (C),
|
|
147
147
|
sep2 = (aa > rr) && (ab > aa) && (ac > aa),
|
|
148
148
|
sep3 = (bb > rr) && (ab > bb) && (bc > bb),
|
|
149
149
|
sep4 = (cc > rr) && (ac > cc) && (bc > cc);
|
|
@@ -161,9 +161,9 @@ Sphere3 .prototype =
|
|
|
161
161
|
d1 = ab - aa,
|
|
162
162
|
d2 = bc - bb,
|
|
163
163
|
d3 = ac - cc,
|
|
164
|
-
e1 =
|
|
165
|
-
e2 =
|
|
166
|
-
e3 =
|
|
164
|
+
e1 = AB .dot (AB),
|
|
165
|
+
e2 = BC .dot (BC),
|
|
166
|
+
e3 = CA .dot (CA);
|
|
167
167
|
|
|
168
168
|
Q1 .assign (A) .multiply (e1) .subtract (AB .multiply (d1));
|
|
169
169
|
Q2 .assign (B) .multiply (e2) .subtract (BC .multiply (d2));
|
|
@@ -173,9 +173,9 @@ Sphere3 .prototype =
|
|
|
173
173
|
QC = C .multiply (e1) .subtract (Q1),
|
|
174
174
|
QA = A .multiply (e2) .subtract (Q2),
|
|
175
175
|
QB = B .multiply (e3) .subtract (Q3),
|
|
176
|
-
sep5 = (
|
|
177
|
-
sep6 = (
|
|
178
|
-
sep7 = (
|
|
176
|
+
sep5 = (Q1 .dot (Q1) > rr * e1 * e1) && (Q1 .dot (QC) > 0),
|
|
177
|
+
sep6 = (Q2 .dot (Q2) > rr * e2 * e2) && (Q2 .dot (QA) > 0),
|
|
178
|
+
sep7 = (Q3 .dot (Q3) > rr * e3 * e3) && (Q3 .dot (QB) > 0);
|
|
179
179
|
|
|
180
180
|
if (sep5 || sep6 || sep7)
|
|
181
181
|
return false;
|