x_ite 8.7.8 → 8.8.0
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/Makefile +3 -0
- package/build/bin/version.pl +1 -1
- package/dist/assets/components/Annotation.js +248 -169
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +296 -233
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +217 -172
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +451 -387
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +309 -208
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +397 -333
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +705 -575
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +319 -259
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +134 -99
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +305 -240
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +781 -626
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +632 -460
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +376 -295
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +936 -749
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +173 -103
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +241 -207
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +162 -129
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +485 -384
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +741 -547
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +66 -54
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +61554 -59658
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/package.json +4 -4
- package/src/assets/components/Annotation.js +14 -14
- package/src/assets/components/CADGeometry.js +14 -14
- package/src/assets/components/CubeMapTexturing.js +11 -11
- package/src/assets/components/DIS.js +13 -13
- package/src/assets/components/EventUtilities.js +16 -16
- package/src/assets/components/Geometry2D.js +15 -15
- package/src/assets/components/Geospatial.js +19 -19
- package/src/assets/components/HAnim.js +13 -13
- package/src/assets/components/KeyDeviceSensor.js +10 -10
- package/src/assets/components/Layout.js +13 -13
- package/src/assets/components/NURBS.js +24 -24
- package/src/assets/components/ParticleSystems.js +19 -19
- package/src/assets/components/Picking.js +14 -14
- package/src/assets/components/RigidBodyPhysics.js +24 -24
- package/src/assets/components/Scripting.js +9 -9
- package/src/assets/components/Text.js +10 -10
- package/src/assets/components/TextureProjector.js +10 -10
- package/src/assets/components/Texturing3D.js +16 -16
- package/src/assets/components/VolumeRendering.js +23 -23
- package/src/assets/components/X_ITE.js +8 -7
- package/src/assets/shaders/webgl1/include/Shadow.glsl.js +21 -25
- package/src/assets/shaders/webgl2/include/Shadow.glsl.js +23 -27
- package/src/bookmarks.js +2 -2
- package/src/lib/jquery.js +42 -30
- package/src/standard/Geospatial/Geodetic.js +8 -9
- package/src/standard/Geospatial/UniversalTransverseMercator.js +4 -5
- package/src/standard/Math/Algorithm.js +41 -56
- package/src/standard/Math/Algorithms/Bezier.js +2 -2
- package/src/standard/Math/Algorithms/MergeSort.js +6 -6
- package/src/standard/Math/Algorithms/PartialSort.js +5 -5
- package/src/standard/Math/Algorithms/QuickSort.js +5 -5
- package/src/standard/Math/Geometry/Box2.js +16 -17
- package/src/standard/Math/Geometry/Box3.js +18 -19
- package/src/standard/Math/Geometry/Camera.js +6 -5
- package/src/standard/Math/Geometry/Cylinder3.js +6 -7
- package/src/standard/Math/Geometry/Line2.js +20 -18
- package/src/standard/Math/Geometry/Line3.js +20 -18
- package/src/standard/Math/Geometry/Plane3.js +11 -12
- package/src/standard/Math/Geometry/Sphere3.js +6 -7
- package/src/standard/Math/Geometry/Spheroid3.js +6 -7
- package/src/standard/Math/Geometry/Triangle2.js +4 -3
- package/src/standard/Math/Geometry/Triangle3.js +5 -4
- package/src/standard/Math/Geometry/ViewVolume.js +6 -7
- package/src/standard/Math/Numbers/Color3.js +18 -19
- package/src/standard/Math/Numbers/Color4.js +20 -21
- package/src/standard/Math/Numbers/Complex.js +28 -29
- package/src/standard/Math/Numbers/Matrix2.js +22 -23
- package/src/standard/Math/Numbers/Matrix3.js +28 -29
- package/src/standard/Math/Numbers/Matrix4.js +29 -30
- package/src/standard/Math/Numbers/Quaternion.js +40 -41
- package/src/standard/Math/Numbers/Rotation4.js +34 -35
- package/src/standard/Math/Numbers/Vector2.js +29 -30
- package/src/standard/Math/Numbers/Vector3.js +32 -33
- package/src/standard/Math/Numbers/Vector4.js +34 -35
- package/src/standard/Math/Utility/BVH.js +14 -15
- package/src/standard/Math/Utility/MatrixStack.js +12 -12
- package/src/standard/Time/MicroTime.js +4 -3
- package/src/standard/Utility/BitSet.js +10 -11
- package/src/standard/Utility/DataStorage.js +10 -10
- package/src/standard/Utility/MapUtilities.js +2 -1
- package/src/standard/Utility/ObjectCache.js +3 -3
- package/src/tests.js +10 -0
- package/src/x_ite/Base/Events.js +3 -3
- package/src/x_ite/Base/FieldArray.js +11 -9
- package/src/x_ite/Base/FieldDefinitionArray.js +11 -9
- package/src/x_ite/Base/X3DArrayField.js +13 -14
- package/src/x_ite/Base/X3DBaseNode.js +219 -181
- package/src/x_ite/Base/X3DCast.js +1 -1
- package/src/x_ite/Base/X3DChildObject.js +162 -53
- package/src/x_ite/Base/X3DConstants.js +74 -60
- package/src/x_ite/Base/X3DEventObject.js +6 -12
- package/src/x_ite/Base/X3DField.js +45 -42
- package/src/x_ite/Base/X3DFieldDefinition.js +9 -7
- package/src/x_ite/Base/X3DInfoArray.js +75 -65
- package/src/x_ite/Base/X3DObject.js +59 -29
- package/src/x_ite/Base/X3DObjectArrayField.js +51 -117
- package/src/x_ite/Base/X3DTypedArrayField.js +48 -42
- package/src/x_ite/Browser/Core/BrowserOptions.js +55 -57
- package/src/x_ite/Browser/Core/BrowserProperties.js +18 -20
- package/src/x_ite/Browser/Core/BrowserTimings.js +29 -33
- package/src/x_ite/Browser/Core/Context.js +7 -7
- package/src/x_ite/Browser/Core/ContextMenu.js +61 -83
- package/src/x_ite/Browser/Core/Notification.js +12 -12
- package/src/x_ite/Browser/Core/RenderingProperties.js +28 -28
- package/src/x_ite/Browser/Core/X3DCoreContext.js +45 -37
- package/src/x_ite/Browser/DOMIntegration.js +4 -1
- package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +3 -3
- package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +1 -1
- package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +12 -12
- package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +8 -14
- package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +8 -14
- package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +13 -17
- package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +15 -19
- package/src/x_ite/Browser/Geometry2D/Rectangle2DOptions.js +12 -16
- package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +9 -9
- package/src/x_ite/Browser/Geometry3D/BoxOptions.js +12 -16
- package/src/x_ite/Browser/Geometry3D/ConeOptions.js +6 -12
- package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +6 -12
- package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +13 -17
- package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +17 -21
- package/src/x_ite/Browser/Geometry3D/X3DGeometry3DContext.js +8 -8
- package/src/x_ite/Browser/Geospatial/Geocentric.js +5 -6
- package/src/x_ite/Browser/Geospatial/Geospatial.js +10 -10
- package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +3 -3
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator.js +2 -3
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1.js +8 -9
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +7 -8
- package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +3 -4
- package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +8 -8
- package/src/x_ite/Browser/Layering/X3DLayeringContext.js +4 -4
- package/src/x_ite/Browser/Layout/ScreenText.js +7 -8
- package/src/x_ite/Browser/Layout/X3DLayoutContext.js +3 -3
- package/src/x_ite/Browser/Legacy.js +32 -12
- package/src/x_ite/Browser/Lighting/X3DLightingContext.js +5 -5
- package/src/x_ite/Browser/NURBS/NURBS.js +10 -10
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +32 -20
- package/src/x_ite/Browser/Navigation/FlyViewer.js +22 -10
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +29 -17
- package/src/x_ite/Browser/Navigation/NoneViewer.js +15 -5
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +24 -12
- package/src/x_ite/Browser/Navigation/WalkViewer.js +22 -10
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +17 -18
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +19 -19
- package/src/x_ite/Browser/Navigation/X3DViewer.js +13 -19
- package/src/x_ite/Browser/Networking/URLs.js +5 -5
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +16 -16
- package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +3 -3
- package/src/x_ite/Browser/Picking/VolumePicker.js +8 -8
- package/src/x_ite/Browser/Picking/X3DPickingContext.js +12 -12
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +24 -20
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer.js +6 -6
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +21 -21
- package/src/x_ite/Browser/Rendering/GeometryContext.js +4 -5
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +18 -18
- package/src/x_ite/Browser/Scripting/X3DScriptingContext.js +4 -4
- package/src/x_ite/Browser/Shaders/ShaderCompiler.js +4 -4
- package/src/x_ite/Browser/Shaders/ShaderSource.js +1 -1
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +13 -13
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +12 -12
- package/src/x_ite/Browser/Sound/X3DSoundContext.js +0 -2
- package/src/x_ite/Browser/Text/PolygonText.js +10 -11
- package/src/x_ite/Browser/Text/X3DTextContext.js +6 -6
- package/src/x_ite/Browser/Text/X3DTextGeometry.js +18 -19
- package/src/x_ite/Browser/Texturing/GifMedia.js +7 -7
- package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +24 -24
- package/src/x_ite/Browser/Texturing3D/DICOMParser.js +38 -38
- package/src/x_ite/Browser/Texturing3D/NRRDParser.js +14 -14
- package/src/x_ite/Browser/Time/X3DTimeContext.js +5 -5
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/VolumeMaterial.js +39 -22
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +6 -6
- package/src/x_ite/Browser/X3DBrowser.js +170 -136
- package/src/x_ite/Browser/X3DBrowserContext.js +23 -24
- package/src/x_ite/Components/Annotation/AnnotationLayer.js +30 -19
- package/src/x_ite/Components/Annotation/AnnotationTarget.js +30 -19
- package/src/x_ite/Components/Annotation/GroupAnnotation.js +40 -29
- package/src/x_ite/Components/Annotation/IconAnnotation.js +38 -27
- package/src/x_ite/Components/Annotation/TextAnnotation.js +31 -20
- package/src/x_ite/Components/Annotation/URLAnnotation.js +30 -19
- package/src/x_ite/Components/Annotation/X3DAnnotationNode.js +16 -3
- package/src/x_ite/Components/CADGeometry/CADAssembly.js +32 -21
- package/src/x_ite/Components/CADGeometry/CADFace.js +48 -37
- package/src/x_ite/Components/CADGeometry/CADLayer.js +30 -21
- package/src/x_ite/Components/CADGeometry/CADPart.js +37 -26
- package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +51 -46
- package/src/x_ite/Components/CADGeometry/QuadSet.js +48 -43
- package/src/x_ite/Components/CADGeometry/X3DProductStructureChildNode.js +13 -2
- package/src/x_ite/Components/Core/MetadataBoolean.js +33 -22
- package/src/x_ite/Components/Core/MetadataDouble.js +33 -22
- package/src/x_ite/Components/Core/MetadataFloat.js +33 -22
- package/src/x_ite/Components/Core/MetadataInteger.js +33 -22
- package/src/x_ite/Components/Core/MetadataSet.js +33 -22
- package/src/x_ite/Components/Core/MetadataString.js +33 -22
- package/src/x_ite/Components/Core/WorldInfo.js +34 -23
- package/src/x_ite/Components/Core/X3DBindableNode.js +17 -4
- package/src/x_ite/Components/Core/X3DChildNode.js +19 -6
- package/src/x_ite/Components/Core/X3DInfoNode.js +13 -2
- package/src/x_ite/Components/Core/X3DMetadataObject.js +18 -5
- package/src/x_ite/Components/Core/X3DNode.js +66 -34
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +68 -77
- package/src/x_ite/Components/Core/X3DSensorNode.js +13 -2
- package/src/x_ite/Components/Core.js +22 -29
- package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +46 -35
- package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +39 -28
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +47 -36
- package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +21 -8
- package/src/x_ite/Components/DIS/DISEntityManager.js +29 -20
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +41 -30
- package/src/x_ite/Components/DIS/EspduTransform.js +117 -106
- package/src/x_ite/Components/DIS/ReceiverPdu.js +60 -49
- package/src/x_ite/Components/DIS/SignalPdu.js +60 -49
- package/src/x_ite/Components/DIS/TransmitterPdu.js +76 -65
- package/src/x_ite/Components/EnvironmentalEffects/Background.js +47 -36
- package/src/x_ite/Components/EnvironmentalEffects/Fog.js +42 -31
- package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +39 -28
- package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +40 -29
- package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +48 -37
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +28 -15
- package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +30 -18
- package/src/x_ite/Components/EnvironmentalEffects.js +15 -22
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +45 -34
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +50 -39
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +41 -30
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +22 -9
- package/src/x_ite/Components/EnvironmentalSensor.js +12 -19
- package/src/x_ite/Components/EventUtilities/BooleanFilter.js +38 -27
- package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +38 -27
- package/src/x_ite/Components/EventUtilities/BooleanToggle.js +33 -22
- package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +32 -21
- package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +38 -27
- package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +33 -22
- package/src/x_ite/Components/EventUtilities/TimeTrigger.js +32 -21
- package/src/x_ite/Components/EventUtilities/X3DSequencerNode.js +20 -7
- package/src/x_ite/Components/EventUtilities/X3DTriggerNode.js +13 -2
- package/src/x_ite/Components/Followers/ColorChaser.js +47 -36
- package/src/x_ite/Components/Followers/ColorDamper.js +49 -38
- package/src/x_ite/Components/Followers/CoordinateChaser.js +33 -22
- package/src/x_ite/Components/Followers/CoordinateDamper.js +35 -24
- package/src/x_ite/Components/Followers/OrientationChaser.js +43 -32
- package/src/x_ite/Components/Followers/OrientationDamper.js +41 -30
- package/src/x_ite/Components/Followers/PositionChaser.js +33 -22
- package/src/x_ite/Components/Followers/PositionChaser2D.js +33 -22
- package/src/x_ite/Components/Followers/PositionDamper.js +35 -24
- package/src/x_ite/Components/Followers/PositionDamper2D.js +35 -24
- package/src/x_ite/Components/Followers/ScalarChaser.js +47 -36
- package/src/x_ite/Components/Followers/ScalarDamper.js +43 -32
- package/src/x_ite/Components/Followers/TexCoordChaser2D.js +33 -22
- package/src/x_ite/Components/Followers/TexCoordDamper2D.js +35 -24
- package/src/x_ite/Components/Followers/X3DChaserNode.js +27 -14
- package/src/x_ite/Components/Followers/X3DDamperNode.js +22 -9
- package/src/x_ite/Components/Followers/X3DFollowerNode.js +29 -16
- package/src/x_ite/Components/Followers.js +25 -32
- package/src/x_ite/Components/Geometry2D/Arc2D.js +38 -27
- package/src/x_ite/Components/Geometry2D/ArcClose2D.js +39 -28
- package/src/x_ite/Components/Geometry2D/Circle2D.js +35 -24
- package/src/x_ite/Components/Geometry2D/Disk2D.js +40 -29
- package/src/x_ite/Components/Geometry2D/Polyline2D.js +34 -23
- package/src/x_ite/Components/Geometry2D/Polypoint2D.js +34 -23
- package/src/x_ite/Components/Geometry2D/Rectangle2D.js +34 -23
- package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +36 -25
- package/src/x_ite/Components/Geometry3D/Box.js +34 -23
- package/src/x_ite/Components/Geometry3D/Cone.js +40 -29
- package/src/x_ite/Components/Geometry3D/Cylinder.js +41 -30
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +63 -52
- package/src/x_ite/Components/Geometry3D/Extrusion.js +49 -38
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +98 -95
- package/src/x_ite/Components/Geometry3D/Sphere.js +36 -25
- package/src/x_ite/Components/Geometry3D.js +15 -22
- package/src/x_ite/Components/Geospatial/GeoCoordinate.js +37 -26
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +63 -52
- package/src/x_ite/Components/Geospatial/GeoLOD.js +59 -48
- package/src/x_ite/Components/Geospatial/GeoLocation.js +45 -34
- package/src/x_ite/Components/Geospatial/GeoMetadata.js +38 -27
- package/src/x_ite/Components/Geospatial/GeoOrigin.js +37 -26
- package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +43 -32
- package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +48 -37
- package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +45 -34
- package/src/x_ite/Components/Geospatial/GeoTransform.js +49 -38
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +56 -45
- package/src/x_ite/Components/Geospatial/X3DGeospatialObject.js +30 -17
- package/src/x_ite/Components/Grouping/Group.js +29 -20
- package/src/x_ite/Components/Grouping/StaticGroup.js +40 -48
- package/src/x_ite/Components/Grouping/Switch.js +51 -40
- package/src/x_ite/Components/Grouping/Transform.js +34 -25
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +22 -9
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +224 -221
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +20 -7
- package/src/x_ite/Components/Grouping/X3DTransformNode.js +17 -4
- package/src/x_ite/Components/Grouping.js +16 -23
- package/src/x_ite/Components/HAnim/HAnimDisplacer.js +27 -18
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +73 -62
- package/src/x_ite/Components/HAnim/HAnimJoint.js +61 -50
- package/src/x_ite/Components/HAnim/HAnimMotion.js +44 -33
- package/src/x_ite/Components/HAnim/HAnimSegment.js +36 -27
- package/src/x_ite/Components/HAnim/HAnimSite.js +36 -27
- package/src/x_ite/Components/Interpolation/ColorInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +38 -27
- package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +39 -28
- package/src/x_ite/Components/Interpolation/NormalInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/PositionInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +38 -27
- package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +39 -28
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +44 -33
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +44 -33
- package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +44 -33
- package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +40 -29
- package/src/x_ite/Components/Interpolation/X3DInterpolatorNode.js +21 -8
- package/src/x_ite/Components/Interpolation.js +22 -29
- package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +44 -33
- package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +38 -27
- package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +23 -10
- package/src/x_ite/Components/Layering/Layer.js +40 -29
- package/src/x_ite/Components/Layering/LayerSet.js +44 -33
- package/src/x_ite/Components/Layering/Viewport.js +48 -37
- package/src/x_ite/Components/Layering/X3DLayerNode.js +45 -32
- package/src/x_ite/Components/Layering/X3DViewportNode.js +13 -2
- package/src/x_ite/Components/Layering.js +13 -20
- package/src/x_ite/Components/Layout/Layout.js +60 -49
- package/src/x_ite/Components/Layout/LayoutGroup.js +48 -37
- package/src/x_ite/Components/Layout/LayoutLayer.js +41 -30
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +41 -30
- package/src/x_ite/Components/Layout/ScreenGroup.js +42 -31
- package/src/x_ite/Components/Layout/X3DLayoutNode.js +13 -2
- package/src/x_ite/Components/Lighting/DirectionalLight.js +45 -35
- package/src/x_ite/Components/Lighting/EnvironmentLight.js +51 -41
- package/src/x_ite/Components/Lighting/PointLight.js +53 -43
- package/src/x_ite/Components/Lighting/SpotLight.js +62 -52
- package/src/x_ite/Components/Lighting/X3DLightNode.js +29 -16
- package/src/x_ite/Components/Lighting.js +13 -20
- package/src/x_ite/Components/NURBS/Contour2D.js +45 -45
- package/src/x_ite/Components/NURBS/ContourPolyline2D.js +34 -23
- package/src/x_ite/Components/NURBS/CoordinateDouble.js +23 -14
- package/src/x_ite/Components/NURBS/NurbsCurve.js +47 -36
- package/src/x_ite/Components/NURBS/NurbsCurve2D.js +44 -33
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +46 -35
- package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +36 -27
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +46 -35
- package/src/x_ite/Components/NURBS/NurbsSet.js +52 -52
- package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +44 -33
- package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +40 -29
- package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +40 -29
- package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +43 -32
- package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +59 -59
- package/src/x_ite/Components/NURBS/X3DNurbsControlCurveNode.js +13 -2
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +30 -17
- package/src/x_ite/Components/NURBS/X3DParametricGeometryNode.js +16 -3
- package/src/x_ite/Components/Navigation/Billboard.js +43 -32
- package/src/x_ite/Components/Navigation/Collision.js +49 -38
- package/src/x_ite/Components/Navigation/LOD.js +54 -43
- package/src/x_ite/Components/Navigation/NavigationInfo.js +58 -47
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +69 -58
- package/src/x_ite/Components/Navigation/Viewpoint.js +53 -42
- package/src/x_ite/Components/Navigation/ViewpointGroup.js +44 -33
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +48 -35
- package/src/x_ite/Components/Navigation.js +16 -23
- package/src/x_ite/Components/Networking/Anchor.js +51 -40
- package/src/x_ite/Components/Networking/Inline.js +54 -43
- package/src/x_ite/Components/Networking/LoadSensor.js +49 -38
- package/src/x_ite/Components/Networking/X3DNetworkSensorNode.js +13 -2
- package/src/x_ite/Components/Networking/X3DUrlObject.js +35 -22
- package/src/x_ite/Components/Networking.js +13 -20
- package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +37 -26
- package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +44 -33
- package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +41 -30
- package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +34 -23
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +83 -72
- package/src/x_ite/Components/ParticleSystems/PointEmitter.js +41 -30
- package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +42 -31
- package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +42 -31
- package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +43 -32
- package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +38 -27
- package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +33 -20
- package/src/x_ite/Components/ParticleSystems/X3DParticlePhysicsModelNode.js +16 -3
- package/src/x_ite/Components/Picking/LinePickSensor.js +49 -38
- package/src/x_ite/Components/Picking/PickableGroup.js +45 -34
- package/src/x_ite/Components/Picking/PointPickSensor.js +46 -35
- package/src/x_ite/Components/Picking/PrimitivePickSensor.js +46 -35
- package/src/x_ite/Components/Picking/VolumePickSensor.js +45 -34
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +31 -18
- package/src/x_ite/Components/Picking/X3DPickableObject.js +20 -7
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +50 -39
- package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +52 -45
- package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +44 -33
- package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +30 -21
- package/src/x_ite/Components/PointingDeviceSensor/X3DDragSensorNode.js +13 -2
- package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +22 -11
- package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +16 -3
- package/src/x_ite/Components/PointingDeviceSensor.js +15 -22
- package/src/x_ite/Components/Rendering/ClipPlane.js +44 -34
- package/src/x_ite/Components/Rendering/Color.js +37 -26
- package/src/x_ite/Components/Rendering/ColorRGBA.js +37 -26
- package/src/x_ite/Components/Rendering/Coordinate.js +23 -14
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +52 -41
- package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +48 -37
- package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +44 -33
- package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +48 -37
- package/src/x_ite/Components/Rendering/LineSet.js +45 -34
- package/src/x_ite/Components/Rendering/Normal.js +39 -28
- package/src/x_ite/Components/Rendering/PointSet.js +45 -34
- package/src/x_ite/Components/Rendering/TriangleFanSet.js +47 -36
- package/src/x_ite/Components/Rendering/TriangleSet.js +41 -30
- package/src/x_ite/Components/Rendering/TriangleStripSet.js +47 -36
- package/src/x_ite/Components/Rendering/X3DColorNode.js +17 -4
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +33 -20
- package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +23 -10
- package/src/x_ite/Components/Rendering/X3DGeometricPropertyNode.js +13 -2
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +96 -80
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +21 -8
- package/src/x_ite/Components/Rendering/X3DNormalNode.js +13 -2
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +20 -7
- package/src/x_ite/Components/Rendering.js +29 -36
- package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +43 -32
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +48 -37
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +52 -41
- package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +47 -36
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +41 -30
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +44 -33
- package/src/x_ite/Components/RigidBodyPhysics/Contact.js +38 -29
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +60 -49
- package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +48 -39
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +69 -58
- package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +61 -50
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +49 -38
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +47 -36
- package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +36 -27
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +24 -11
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +17 -4
- package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +34 -21
- package/src/x_ite/Components/Scripting/Script.js +83 -53
- package/src/x_ite/Components/Scripting/X3DScriptNode.js +17 -4
- package/src/x_ite/Components/Shaders/ComposedShader.js +46 -35
- package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +40 -29
- package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +38 -27
- package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +38 -27
- package/src/x_ite/Components/Shaders/PackagedShader.js +45 -34
- package/src/x_ite/Components/Shaders/ProgramShader.js +27 -18
- package/src/x_ite/Components/Shaders/ShaderPart.js +47 -36
- package/src/x_ite/Components/Shaders/ShaderProgram.js +42 -31
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +51 -38
- package/src/x_ite/Components/Shaders/X3DShaderNode.js +19 -6
- package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +17 -4
- package/src/x_ite/Components/Shaders.js +19 -26
- package/src/x_ite/Components/Shape/AcousticProperties.js +28 -19
- package/src/x_ite/Components/Shape/Appearance.js +79 -68
- package/src/x_ite/Components/Shape/FillProperties.js +44 -33
- package/src/x_ite/Components/Shape/LineProperties.js +44 -33
- package/src/x_ite/Components/Shape/Material.js +75 -64
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +65 -54
- package/src/x_ite/Components/Shape/PointProperties.js +43 -32
- package/src/x_ite/Components/Shape/Shape.js +48 -37
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +60 -49
- package/src/x_ite/Components/Shape/UnlitMaterial.js +44 -33
- package/src/x_ite/Components/Shape/X3DAppearanceChildNode.js +13 -2
- package/src/x_ite/Components/Shape/X3DAppearanceNode.js +17 -4
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +41 -33
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +29 -16
- package/src/x_ite/Components/Shape/X3DShapeNode.js +28 -15
- package/src/x_ite/Components/Shape.js +23 -30
- package/src/x_ite/Components/Sound/Analyser.js +46 -37
- package/src/x_ite/Components/Sound/AudioClip.js +61 -50
- package/src/x_ite/Components/Sound/AudioDestination.js +35 -26
- package/src/x_ite/Components/Sound/BiquadFilter.js +45 -36
- package/src/x_ite/Components/Sound/BufferAudioSource.js +61 -50
- package/src/x_ite/Components/Sound/ChannelMerger.js +32 -23
- package/src/x_ite/Components/Sound/ChannelSelector.js +33 -24
- package/src/x_ite/Components/Sound/ChannelSplitter.js +33 -24
- package/src/x_ite/Components/Sound/Convolver.js +43 -34
- package/src/x_ite/Components/Sound/Delay.js +43 -34
- package/src/x_ite/Components/Sound/DynamicsCompressor.js +47 -38
- package/src/x_ite/Components/Sound/Gain.js +41 -32
- package/src/x_ite/Components/Sound/ListenerPointSource.js +39 -30
- package/src/x_ite/Components/Sound/MicrophoneSource.js +35 -26
- package/src/x_ite/Components/Sound/OscillatorSource.js +37 -28
- package/src/x_ite/Components/Sound/PeriodicWave.js +27 -18
- package/src/x_ite/Components/Sound/Sound.js +51 -40
- package/src/x_ite/Components/Sound/SpatialSound.js +42 -33
- package/src/x_ite/Components/Sound/StreamAudioDestination.js +35 -26
- package/src/x_ite/Components/Sound/StreamAudioSource.js +35 -26
- package/src/x_ite/Components/Sound/WaveShaper.js +43 -34
- package/src/x_ite/Components/Sound/X3DSoundChannelNode.js +13 -2
- package/src/x_ite/Components/Sound/X3DSoundDestinationNode.js +13 -2
- package/src/x_ite/Components/Sound/X3DSoundNode.js +13 -2
- package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +17 -4
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +30 -17
- package/src/x_ite/Components/Sound.js +34 -41
- package/src/x_ite/Components/Text/FontStyle.js +37 -26
- package/src/x_ite/Components/Text/Text.js +50 -39
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +32 -18
- package/src/x_ite/Components/TextureProjector/TextureProjector.js +49 -39
- package/src/x_ite/Components/TextureProjector/TextureProjectorParallel.js +58 -48
- package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +27 -14
- package/src/x_ite/Components/Texturing/ImageTexture.js +50 -39
- package/src/x_ite/Components/Texturing/MovieTexture.js +67 -56
- package/src/x_ite/Components/Texturing/MultiTexture.js +52 -41
- package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +44 -33
- package/src/x_ite/Components/Texturing/MultiTextureTransform.js +39 -28
- package/src/x_ite/Components/Texturing/PixelTexture.js +42 -31
- package/src/x_ite/Components/Texturing/TextureCoordinate.js +41 -30
- package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +41 -30
- package/src/x_ite/Components/Texturing/TextureProperties.js +47 -36
- package/src/x_ite/Components/Texturing/TextureTransform.js +39 -28
- package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +20 -7
- package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +21 -8
- package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +20 -7
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +26 -13
- package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +13 -2
- package/src/x_ite/Components/Texturing/X3DTextureNode.js +17 -4
- package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +13 -2
- package/src/x_ite/Components/Texturing.js +25 -32
- package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +44 -33
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +46 -35
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +54 -43
- package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +40 -29
- package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +41 -30
- package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +41 -30
- package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +39 -28
- package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +36 -25
- package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +26 -13
- package/src/x_ite/Components/Time/TimeSensor.js +55 -44
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +38 -25
- package/src/x_ite/Components/Time.js +10 -17
- package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +51 -41
- package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +39 -28
- package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +42 -31
- package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +41 -30
- package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +41 -30
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +50 -39
- package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +39 -28
- package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +38 -27
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +49 -38
- package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +44 -33
- package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +42 -31
- package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +41 -30
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +45 -34
- package/src/x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode.js +13 -2
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +25 -12
- package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +22 -9
- package/src/x_ite/Components/X_ITE/BlendMode.js +48 -37
- package/src/x_ite/Components.js +38 -14
- package/src/x_ite/Configuration/AbstractNodes.js +50 -0
- package/src/x_ite/{Fallback.js → Configuration/AbstractNodesArray.js} +22 -29
- package/src/x_ite/Configuration/ComponentInfo.js +14 -10
- package/src/x_ite/Configuration/ComponentInfoArray.js +14 -10
- package/src/x_ite/Configuration/ConcreteNodes.js +50 -0
- package/src/x_ite/Configuration/{SupportedNodes.js → ConcreteNodesArray.js} +26 -40
- package/src/x_ite/Configuration/ProfileInfo.js +13 -9
- package/src/x_ite/Configuration/ProfileInfoArray.js +14 -13
- package/src/x_ite/Configuration/SupportedComponents.js +40 -78
- package/src/x_ite/Configuration/SupportedProfiles.js +16 -16
- package/src/x_ite/Configuration/UnitInfo.js +14 -10
- package/src/x_ite/Configuration/UnitInfoArray.js +10 -21
- package/src/x_ite/Execution/BindableList.js +14 -10
- package/src/x_ite/Execution/BindableStack.js +14 -10
- package/src/x_ite/Execution/ExportedNodesArray.js +11 -9
- package/src/x_ite/Execution/ImportedNodesArray.js +11 -9
- package/src/x_ite/Execution/NamedNodesArray.js +11 -22
- package/src/x_ite/Execution/X3DExecutionContext.js +181 -152
- package/src/x_ite/Execution/X3DExportedNode.js +18 -10
- package/src/x_ite/Execution/X3DImportedNode.js +35 -22
- package/src/x_ite/Execution/X3DScene.js +93 -64
- package/src/x_ite/Execution/X3DWorld.js +21 -17
- package/src/x_ite/Fields/ArrayFields.js +87 -153
- package/src/x_ite/Fields/SFBool.js +21 -25
- package/src/x_ite/Fields/SFColor.js +43 -39
- package/src/x_ite/Fields/SFColorRGBA.js +39 -35
- package/src/x_ite/Fields/SFDouble.js +20 -21
- package/src/x_ite/Fields/SFFloat.js +20 -21
- package/src/x_ite/Fields/SFImage.js +50 -48
- package/src/x_ite/Fields/SFInt32.js +20 -21
- package/src/x_ite/Fields/SFMatrix3.js +23 -16
- package/src/x_ite/Fields/SFMatrix4.js +24 -17
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +31 -31
- package/src/x_ite/Fields/SFNode.js +57 -88
- package/src/x_ite/Fields/SFNodeCache.js +7 -11
- package/src/x_ite/Fields/SFRotation.js +73 -62
- package/src/x_ite/Fields/SFString.js +35 -36
- package/src/x_ite/Fields/SFTime.js +20 -21
- package/src/x_ite/Fields/SFVec2.js +17 -14
- package/src/x_ite/Fields/SFVec3.js +20 -17
- package/src/x_ite/Fields/SFVec4.js +21 -18
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +36 -36
- package/src/x_ite/Fields.js +6 -13
- package/src/x_ite/InputOutput/FileLoader.js +36 -40
- package/src/x_ite/InputOutput/Generator.js +50 -51
- package/src/x_ite/Parser/GLB2Parser.js +12 -13
- package/src/x_ite/Parser/GLTF2Parser.js +111 -112
- package/src/x_ite/Parser/GoldenGate.js +11 -13
- package/src/x_ite/Parser/HTMLSupport.js +15 -5
- package/src/x_ite/Parser/JSONParser.js +21 -22
- package/src/x_ite/Parser/OBJParser.js +56 -57
- package/src/x_ite/Parser/STLAParser.js +22 -23
- package/src/x_ite/Parser/STLBParser.js +12 -13
- package/src/x_ite/Parser/SVGParser.js +85 -86
- package/src/x_ite/Parser/VRMLParser.js +495 -878
- package/src/x_ite/Parser/X3DOptimizer.js +7 -7
- package/src/x_ite/Parser/X3DParser.js +17 -17
- package/src/x_ite/Parser/XMLParser.js +215 -269
- package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +11 -9
- package/src/x_ite/Prototype/ProtoDeclarationArray.js +11 -9
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +35 -27
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +28 -20
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +18 -10
- package/src/x_ite/Rendering/DependentRenderer.js +11 -12
- package/src/x_ite/Rendering/MultiSampleFrameBuffer.js +9 -10
- package/src/x_ite/Rendering/PointingBuffer.js +6 -7
- package/src/x_ite/Rendering/TextureBuffer.js +11 -12
- package/src/x_ite/Rendering/VertexArray.js +5 -5
- package/src/x_ite/Rendering/X3DRenderObject.js +51 -52
- package/src/x_ite/Routing/RouteArray.js +11 -9
- package/src/x_ite/Routing/X3DRoute.js +35 -19
- package/src/x_ite/Routing/X3DRoutingContext.js +8 -9
- package/src/x_ite/X3D.js +27 -26
- package/src/x_ite/X3DCanvasElement.js +18 -7
- package/src/x_ite.css +2 -1
- package/webpack.config.js +2 -2
- /package/src/x_ite/{DEBUG.js → DEVELOPMENT.js} +0 -0
|
@@ -99,7 +99,7 @@ const Bezier =
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
})(),
|
|
102
|
-
arc
|
|
102
|
+
arc (ax, ay, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y, steps, points)
|
|
103
103
|
{
|
|
104
104
|
// https://ericeastwood.com/blog/25/curves-and-arcs-quadratic-cubic-elliptical-svg-implementations
|
|
105
105
|
// See https://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes.
|
|
@@ -226,7 +226,7 @@ const Bezier =
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
points .push (new Vector3 (x, y, 0));
|
|
229
|
-
}
|
|
229
|
+
},
|
|
230
230
|
};
|
|
231
231
|
|
|
232
232
|
export default Bezier;
|
|
@@ -54,17 +54,17 @@ function MergeSort (array, compare)
|
|
|
54
54
|
this .compare = compare;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
MergeSort .prototype
|
|
57
|
+
Object .assign (MergeSort .prototype,
|
|
58
58
|
{
|
|
59
|
-
compare
|
|
59
|
+
compare (lhs, rhs)
|
|
60
60
|
{
|
|
61
61
|
return lhs < rhs;
|
|
62
62
|
},
|
|
63
|
-
sort
|
|
63
|
+
sort (first, last)
|
|
64
64
|
{
|
|
65
65
|
this .mergeSort (first, last - 1);
|
|
66
66
|
},
|
|
67
|
-
mergeSort
|
|
67
|
+
mergeSort (lo, hi)
|
|
68
68
|
{
|
|
69
69
|
if (lo < hi)
|
|
70
70
|
{
|
|
@@ -74,7 +74,7 @@ MergeSort .prototype =
|
|
|
74
74
|
this .merge (lo, m, hi);
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
-
merge
|
|
77
|
+
merge (lo, m, hi)
|
|
78
78
|
{
|
|
79
79
|
const { array, auxiliary, compare } = this;
|
|
80
80
|
|
|
@@ -99,6 +99,6 @@ MergeSort .prototype =
|
|
|
99
99
|
while (k < j)
|
|
100
100
|
array [k++] = auxiliary [i++];
|
|
101
101
|
}
|
|
102
|
-
};
|
|
102
|
+
});
|
|
103
103
|
|
|
104
104
|
export default MergeSort;
|
|
@@ -55,18 +55,18 @@ function PartialSort (array, compare)
|
|
|
55
55
|
this .compare = compare;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
PartialSort .prototype
|
|
58
|
+
Object .assign (PartialSort .prototype,
|
|
59
59
|
{
|
|
60
|
-
compare
|
|
60
|
+
compare (lhs, rhs)
|
|
61
61
|
{
|
|
62
62
|
return lhs < rhs;
|
|
63
63
|
},
|
|
64
|
-
sort
|
|
64
|
+
sort (first, last)
|
|
65
65
|
{
|
|
66
66
|
if (last - first > 1)
|
|
67
67
|
this .partialsort (first, last);
|
|
68
68
|
},
|
|
69
|
-
partialsort
|
|
69
|
+
partialsort (lo, hi)
|
|
70
70
|
{
|
|
71
71
|
const { array, compare } = this;
|
|
72
72
|
|
|
@@ -87,6 +87,6 @@ PartialSort .prototype =
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
|
-
};
|
|
90
|
+
});
|
|
91
91
|
|
|
92
92
|
export default PartialSort;
|
|
@@ -53,18 +53,18 @@ function QuickSort (array, compare)
|
|
|
53
53
|
this .compare = compare;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
QuickSort .prototype
|
|
56
|
+
Object .assign (QuickSort .prototype,
|
|
57
57
|
{
|
|
58
|
-
compare
|
|
58
|
+
compare (lhs, rhs)
|
|
59
59
|
{
|
|
60
60
|
return lhs < rhs;
|
|
61
61
|
},
|
|
62
|
-
sort
|
|
62
|
+
sort (first, last)
|
|
63
63
|
{
|
|
64
64
|
if (last - first > 1)
|
|
65
65
|
this .quicksort (first, last - 1);
|
|
66
66
|
},
|
|
67
|
-
quicksort
|
|
67
|
+
quicksort (lo, hi)
|
|
68
68
|
{
|
|
69
69
|
let
|
|
70
70
|
i = lo,
|
|
@@ -101,6 +101,6 @@ QuickSort .prototype =
|
|
|
101
101
|
if (lo < j) this .quicksort (lo, j);
|
|
102
102
|
if (i < hi) this .quicksort (i, hi);
|
|
103
103
|
},
|
|
104
|
-
};
|
|
104
|
+
});
|
|
105
105
|
|
|
106
106
|
export default QuickSort;
|
|
@@ -55,25 +55,24 @@ function Box2 (/* size, center */)
|
|
|
55
55
|
this .set (... arguments);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
Box2 .prototype
|
|
58
|
+
Object .assign (Box2 .prototype,
|
|
59
59
|
{
|
|
60
|
-
|
|
61
|
-
copy: function ()
|
|
60
|
+
copy ()
|
|
62
61
|
{
|
|
63
62
|
const copy = Object .create (Box2 .prototype);
|
|
64
63
|
copy .matrix = this .matrix .copy ();
|
|
65
64
|
return copy;
|
|
66
65
|
},
|
|
67
|
-
assign
|
|
66
|
+
assign (box)
|
|
68
67
|
{
|
|
69
68
|
this .matrix .assign (box .matrix);
|
|
70
69
|
return this;
|
|
71
70
|
},
|
|
72
|
-
equals
|
|
71
|
+
equals (box)
|
|
73
72
|
{
|
|
74
73
|
return this .matrix .equals (box .matrix);
|
|
75
74
|
},
|
|
76
|
-
set
|
|
75
|
+
set (size, center)
|
|
77
76
|
{
|
|
78
77
|
switch (arguments .length)
|
|
79
78
|
{
|
|
@@ -100,7 +99,7 @@ Box2 .prototype =
|
|
|
100
99
|
// }
|
|
101
100
|
}
|
|
102
101
|
},
|
|
103
|
-
setExtents
|
|
102
|
+
setExtents (min, max)
|
|
104
103
|
{
|
|
105
104
|
const
|
|
106
105
|
sx = (max .x - min .x) / 2,
|
|
@@ -114,7 +113,7 @@ Box2 .prototype =
|
|
|
114
113
|
|
|
115
114
|
return this;
|
|
116
115
|
},
|
|
117
|
-
isEmpty
|
|
116
|
+
isEmpty ()
|
|
118
117
|
{
|
|
119
118
|
return this .matrix [8] === 0;
|
|
120
119
|
},
|
|
@@ -140,17 +139,17 @@ Box2 .prototype =
|
|
|
140
139
|
return this .setExtents (lhs_min .min (rhs_min), lhs_max .max (rhs_max));
|
|
141
140
|
};
|
|
142
141
|
})(),
|
|
143
|
-
multLeft
|
|
142
|
+
multLeft (matrix)
|
|
144
143
|
{
|
|
145
144
|
this .matrix .multLeft (matrix);
|
|
146
145
|
return this;
|
|
147
146
|
},
|
|
148
|
-
multRight
|
|
147
|
+
multRight (matrix)
|
|
149
148
|
{
|
|
150
149
|
this .matrix .multRight (matrix);
|
|
151
150
|
return this;
|
|
152
151
|
},
|
|
153
|
-
getExtents
|
|
152
|
+
getExtents (min, max)
|
|
154
153
|
{
|
|
155
154
|
this .getAbsoluteExtents (min, max);
|
|
156
155
|
|
|
@@ -198,19 +197,19 @@ Box2 .prototype =
|
|
|
198
197
|
max .y >= point .y;
|
|
199
198
|
};
|
|
200
199
|
})(),
|
|
201
|
-
toString
|
|
200
|
+
toString ()
|
|
202
201
|
{
|
|
203
|
-
return this .size
|
|
202
|
+
return `${this .size}, ${this .center}`;
|
|
204
203
|
},
|
|
205
|
-
};
|
|
204
|
+
});
|
|
206
205
|
|
|
207
206
|
Object .assign (Box2,
|
|
208
207
|
{
|
|
209
|
-
Extents
|
|
208
|
+
Extents (min, max)
|
|
210
209
|
{
|
|
211
210
|
return new Box2 () .setExtents (min, max);
|
|
212
211
|
},
|
|
213
|
-
Points
|
|
212
|
+
Points (... points)
|
|
214
213
|
{
|
|
215
214
|
return new Box2 () .setExtents (points [0] .copy () .min (... points), points [0] .copy () .max (... points));
|
|
216
215
|
},
|
|
@@ -237,7 +236,7 @@ Object .defineProperties (Box2 .prototype,
|
|
|
237
236
|
},
|
|
238
237
|
center:
|
|
239
238
|
{
|
|
240
|
-
get
|
|
239
|
+
get ()
|
|
241
240
|
{
|
|
242
241
|
return this .matrix .origin;
|
|
243
242
|
},
|
|
@@ -57,29 +57,28 @@ function Box3 (/* size, center */)
|
|
|
57
57
|
this .set (... arguments);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
Box3 .prototype
|
|
60
|
+
Object .assign (Box3 .prototype,
|
|
61
61
|
{
|
|
62
|
-
|
|
63
|
-
copy: function ()
|
|
62
|
+
copy ()
|
|
64
63
|
{
|
|
65
64
|
const copy = Object .create (Box3 .prototype);
|
|
66
65
|
copy .matrix = this .matrix .copy ();
|
|
67
66
|
return copy;
|
|
68
67
|
},
|
|
69
|
-
assign
|
|
68
|
+
assign (box)
|
|
70
69
|
{
|
|
71
70
|
this .matrix .assign (box .matrix);
|
|
72
71
|
return this;
|
|
73
72
|
},
|
|
74
|
-
equals
|
|
73
|
+
equals (box)
|
|
75
74
|
{
|
|
76
75
|
return this .matrix .equals (box .matrix);
|
|
77
76
|
},
|
|
78
|
-
getMatrix
|
|
77
|
+
getMatrix ()
|
|
79
78
|
{
|
|
80
79
|
return this .matrix;
|
|
81
80
|
},
|
|
82
|
-
set
|
|
81
|
+
set (size, center)
|
|
83
82
|
{
|
|
84
83
|
switch (arguments .length)
|
|
85
84
|
{
|
|
@@ -108,7 +107,7 @@ Box3 .prototype =
|
|
|
108
107
|
// }
|
|
109
108
|
}
|
|
110
109
|
},
|
|
111
|
-
setExtents
|
|
110
|
+
setExtents (min, max)
|
|
112
111
|
{
|
|
113
112
|
const
|
|
114
113
|
sx = (max .x - min .x) / 2,
|
|
@@ -125,7 +124,7 @@ Box3 .prototype =
|
|
|
125
124
|
|
|
126
125
|
return this;
|
|
127
126
|
},
|
|
128
|
-
getExtents
|
|
127
|
+
getExtents (min, max)
|
|
129
128
|
{
|
|
130
129
|
this .getAbsoluteExtents (min, max);
|
|
131
130
|
|
|
@@ -227,7 +226,7 @@ Box3 .prototype =
|
|
|
227
226
|
return points;
|
|
228
227
|
};
|
|
229
228
|
})(),
|
|
230
|
-
getAxes
|
|
229
|
+
getAxes (axes)
|
|
231
230
|
{
|
|
232
231
|
const m = this .matrix;
|
|
233
232
|
|
|
@@ -351,7 +350,7 @@ Box3 .prototype =
|
|
|
351
350
|
return normals;
|
|
352
351
|
};
|
|
353
352
|
})(),
|
|
354
|
-
isEmpty
|
|
353
|
+
isEmpty ()
|
|
355
354
|
{
|
|
356
355
|
return this .matrix [15] === 0;
|
|
357
356
|
},
|
|
@@ -377,12 +376,12 @@ Box3 .prototype =
|
|
|
377
376
|
return this .setExtents (lhs_min .min (rhs_min), lhs_max .max (rhs_max));
|
|
378
377
|
};
|
|
379
378
|
})(),
|
|
380
|
-
multLeft
|
|
379
|
+
multLeft (matrix)
|
|
381
380
|
{
|
|
382
381
|
this .matrix .multLeft (matrix);
|
|
383
382
|
return this;
|
|
384
383
|
},
|
|
385
|
-
multRight
|
|
384
|
+
multRight (matrix)
|
|
386
385
|
{
|
|
387
386
|
this .matrix .multRight (matrix);
|
|
388
387
|
return this;
|
|
@@ -606,19 +605,19 @@ Box3 .prototype =
|
|
|
606
605
|
return true;
|
|
607
606
|
};
|
|
608
607
|
})(),
|
|
609
|
-
toString
|
|
608
|
+
toString ()
|
|
610
609
|
{
|
|
611
|
-
return this .size
|
|
610
|
+
return `${this .size}, ${this .center}`;
|
|
612
611
|
},
|
|
613
|
-
};
|
|
612
|
+
});
|
|
614
613
|
|
|
615
614
|
Object .assign (Box3,
|
|
616
615
|
{
|
|
617
|
-
Extents
|
|
616
|
+
Extents (min, max)
|
|
618
617
|
{
|
|
619
618
|
return new Box3 () .setExtents (min, max);
|
|
620
619
|
},
|
|
621
|
-
Points
|
|
620
|
+
Points (... points)
|
|
622
621
|
{
|
|
623
622
|
return new Box3 () .setExtents (points [0] .copy () .min (... points), points [0] .copy () .max (... points));
|
|
624
623
|
},
|
|
@@ -645,7 +644,7 @@ Object .defineProperties (Box3 .prototype,
|
|
|
645
644
|
},
|
|
646
645
|
center:
|
|
647
646
|
{
|
|
648
|
-
get
|
|
647
|
+
get ()
|
|
649
648
|
{
|
|
650
649
|
return this .matrix .origin;
|
|
651
650
|
},
|
|
@@ -47,8 +47,9 @@
|
|
|
47
47
|
|
|
48
48
|
import Vector3 from "../Numbers/Vector3.js";
|
|
49
49
|
|
|
50
|
-
const Camera =
|
|
51
|
-
|
|
50
|
+
const Camera =
|
|
51
|
+
{
|
|
52
|
+
frustum (l, r, b, t, n, f, matrix)
|
|
52
53
|
{
|
|
53
54
|
const
|
|
54
55
|
r_l = r - l,
|
|
@@ -68,7 +69,7 @@ const Camera = {
|
|
|
68
69
|
A, B, C, -1,
|
|
69
70
|
0, 0, D, 0);
|
|
70
71
|
},
|
|
71
|
-
perspective
|
|
72
|
+
perspective (fieldOfView, zNear, zFar, width, height, matrix)
|
|
72
73
|
{
|
|
73
74
|
const ratio = Math .tan (fieldOfView / 2) * zNear;
|
|
74
75
|
|
|
@@ -83,13 +84,13 @@ const Camera = {
|
|
|
83
84
|
return this .frustum (-ratio, ratio, -aspect, aspect, zNear, zFar, matrix);
|
|
84
85
|
}
|
|
85
86
|
},
|
|
86
|
-
perspective2
|
|
87
|
+
perspective2 (fieldOfView, zNear, zFar, width, height, matrix)
|
|
87
88
|
{
|
|
88
89
|
const ratio = Math .tan (fieldOfView / 2) * zNear;
|
|
89
90
|
|
|
90
91
|
return this .frustum (-ratio, ratio, -ratio, ratio, zNear, zFar, matrix);
|
|
91
92
|
},
|
|
92
|
-
ortho
|
|
93
|
+
ortho (l, r, b, t, n, f, matrix)
|
|
93
94
|
{
|
|
94
95
|
const
|
|
95
96
|
r_l = r - l,
|
|
@@ -56,10 +56,9 @@ function Cylinder3 (axis, radius)
|
|
|
56
56
|
this .radius = radius;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
Cylinder3 .prototype
|
|
59
|
+
Object .assign (Cylinder3 .prototype,
|
|
60
60
|
{
|
|
61
|
-
|
|
62
|
-
intersectsLine: function (line, enter, exit)
|
|
61
|
+
intersectsLine (line, enter, exit)
|
|
63
62
|
{
|
|
64
63
|
////////////////////////////////////////////////////////////////////////
|
|
65
64
|
//
|
|
@@ -112,7 +111,7 @@ Cylinder3 .prototype =
|
|
|
112
111
|
|
|
113
112
|
return intersected;
|
|
114
113
|
},
|
|
115
|
-
unitCylinderIntersectsLine
|
|
114
|
+
unitCylinderIntersectsLine (line, enter, exit)
|
|
116
115
|
{
|
|
117
116
|
let t0, t1;
|
|
118
117
|
|
|
@@ -151,10 +150,10 @@ Cylinder3 .prototype =
|
|
|
151
150
|
|
|
152
151
|
return true;
|
|
153
152
|
},
|
|
154
|
-
toString
|
|
153
|
+
toString ()
|
|
155
154
|
{
|
|
156
|
-
return this .axis
|
|
155
|
+
return `${this .axis}, ${this .radius}`;
|
|
157
156
|
},
|
|
158
|
-
};
|
|
157
|
+
});
|
|
159
158
|
|
|
160
159
|
export default Cylinder3;
|
|
@@ -53,47 +53,46 @@ function Line2 (point, direction)
|
|
|
53
53
|
this .direction = direction .copy ();
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
Line2 .prototype
|
|
56
|
+
Object .assign (Line2 .prototype,
|
|
57
57
|
{
|
|
58
|
-
|
|
59
|
-
copy: function ()
|
|
58
|
+
copy ()
|
|
60
59
|
{
|
|
61
60
|
const copy = Object .create (Line2 .prototype);
|
|
62
61
|
copy .point = this .point .copy ();
|
|
63
62
|
copy .direction = this .direction .copy ();
|
|
64
63
|
return copy;
|
|
65
64
|
},
|
|
66
|
-
assign
|
|
65
|
+
assign (line)
|
|
67
66
|
{
|
|
68
67
|
this .point .assign (line .point);
|
|
69
68
|
this .direction .assign (line .direction);
|
|
70
69
|
return this;
|
|
71
70
|
},
|
|
72
|
-
set
|
|
71
|
+
set (point, direction)
|
|
73
72
|
{
|
|
74
73
|
this .point .assign (point);
|
|
75
74
|
this .direction .assign (direction);
|
|
76
75
|
return this;
|
|
77
76
|
},
|
|
78
|
-
setPoints
|
|
77
|
+
setPoints (point1, point2)
|
|
79
78
|
{
|
|
80
79
|
this .point .assign (point1);
|
|
81
80
|
this .direction .assign (point2) .subtract (point1) .normalize ();
|
|
82
81
|
return this;
|
|
83
82
|
},
|
|
84
|
-
multMatrixLine
|
|
83
|
+
multMatrixLine (matrix)
|
|
85
84
|
{
|
|
86
85
|
matrix .multMatrixVec (this .point);
|
|
87
86
|
matrix .multMatrixDir (this .direction) .normalize ();
|
|
88
87
|
return this;
|
|
89
88
|
},
|
|
90
|
-
multLineMatrix
|
|
89
|
+
multLineMatrix (matrix)
|
|
91
90
|
{
|
|
92
91
|
matrix .multVecMatrix (this .point);
|
|
93
92
|
matrix .multDirMatrix (this .direction) .normalize ();
|
|
94
93
|
return this;
|
|
95
94
|
},
|
|
96
|
-
getClosestPointToPoint
|
|
95
|
+
getClosestPointToPoint (point, result)
|
|
97
96
|
{
|
|
98
97
|
const
|
|
99
98
|
r = result .assign (point) .subtract (this .point),
|
|
@@ -136,18 +135,21 @@ Line2 .prototype =
|
|
|
136
135
|
return true;
|
|
137
136
|
};
|
|
138
137
|
})(),
|
|
139
|
-
toString
|
|
138
|
+
toString ()
|
|
140
139
|
{
|
|
141
|
-
return this .point
|
|
140
|
+
return `${this .point}, ${this .direction}`;
|
|
142
141
|
},
|
|
143
|
-
};
|
|
142
|
+
});
|
|
144
143
|
|
|
145
|
-
|
|
144
|
+
Object .assign (Line2,
|
|
146
145
|
{
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
Points (point1, point2)
|
|
147
|
+
{
|
|
148
|
+
const line = Object .create (Line2 .prototype);
|
|
149
|
+
line .point = point1 .copy ();
|
|
150
|
+
line .direction = point2 .copy () .subtract (point1) .normalize ();
|
|
151
|
+
return line;
|
|
152
|
+
},
|
|
153
|
+
});
|
|
152
154
|
|
|
153
155
|
export default Line2;
|
|
@@ -53,47 +53,46 @@ function Line3 (point, direction)
|
|
|
53
53
|
this .direction = direction .copy ();
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
Line3 .prototype
|
|
56
|
+
Object .assign (Line3 .prototype,
|
|
57
57
|
{
|
|
58
|
-
|
|
59
|
-
copy: function ()
|
|
58
|
+
copy ()
|
|
60
59
|
{
|
|
61
60
|
const copy = Object .create (Line3 .prototype);
|
|
62
61
|
copy .point = this .point .copy ();
|
|
63
62
|
copy .direction = this .direction .copy ();
|
|
64
63
|
return copy;
|
|
65
64
|
},
|
|
66
|
-
assign
|
|
65
|
+
assign (line)
|
|
67
66
|
{
|
|
68
67
|
this .point .assign (line .point);
|
|
69
68
|
this .direction .assign (line .direction);
|
|
70
69
|
return this;
|
|
71
70
|
},
|
|
72
|
-
set
|
|
71
|
+
set (point, direction)
|
|
73
72
|
{
|
|
74
73
|
this .point .assign (point);
|
|
75
74
|
this .direction .assign (direction);
|
|
76
75
|
return this;
|
|
77
76
|
},
|
|
78
|
-
setPoints
|
|
77
|
+
setPoints (point1, point2)
|
|
79
78
|
{
|
|
80
79
|
this .point .assign (point1);
|
|
81
80
|
this .direction .assign (point2) .subtract (point1) .normalize ();
|
|
82
81
|
return this;
|
|
83
82
|
},
|
|
84
|
-
multMatrixLine
|
|
83
|
+
multMatrixLine (matrix)
|
|
85
84
|
{
|
|
86
85
|
matrix .multMatrixVec (this .point);
|
|
87
86
|
matrix .multMatrixDir (this .direction) .normalize ();
|
|
88
87
|
return this;
|
|
89
88
|
},
|
|
90
|
-
multLineMatrix
|
|
89
|
+
multLineMatrix (matrix)
|
|
91
90
|
{
|
|
92
91
|
matrix .multVecMatrix (this .point);
|
|
93
92
|
matrix .multDirMatrix (this .direction) .normalize ();
|
|
94
93
|
return this;
|
|
95
94
|
},
|
|
96
|
-
getClosestPointToPoint
|
|
95
|
+
getClosestPointToPoint (point, result)
|
|
97
96
|
{
|
|
98
97
|
const
|
|
99
98
|
r = result .assign (point) .subtract (this .point),
|
|
@@ -216,18 +215,21 @@ Line3 .prototype =
|
|
|
216
215
|
return true;
|
|
217
216
|
};
|
|
218
217
|
})(),
|
|
219
|
-
toString
|
|
218
|
+
toString ()
|
|
220
219
|
{
|
|
221
|
-
return this .point
|
|
220
|
+
return `${this .point}, ${this .direction}`;
|
|
222
221
|
},
|
|
223
|
-
};
|
|
222
|
+
});
|
|
224
223
|
|
|
225
|
-
|
|
224
|
+
Object .assign (Line3,
|
|
226
225
|
{
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
226
|
+
Points (point1, point2)
|
|
227
|
+
{
|
|
228
|
+
const line = Object .create (Line3 .prototype);
|
|
229
|
+
line .point = point1 .copy ();
|
|
230
|
+
line .direction = point2 .copy () .subtract (point1) .normalize ();
|
|
231
|
+
return line;
|
|
232
|
+
},
|
|
233
|
+
});
|
|
232
234
|
|
|
233
235
|
export default Line3;
|
|
@@ -59,29 +59,28 @@ function Plane3 (point, normal)
|
|
|
59
59
|
this .distanceFromOrigin = normal .dot (point);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
Plane3 .prototype
|
|
62
|
+
Object .assign (Plane3 .prototype,
|
|
63
63
|
{
|
|
64
|
-
|
|
65
|
-
copy: function ()
|
|
64
|
+
copy ()
|
|
66
65
|
{
|
|
67
66
|
const copy = Object .create (Plane3 .prototype);
|
|
68
67
|
copy .normal = this .normal .copy ();
|
|
69
68
|
copy .distanceFromOrigin = this .distanceFromOrigin;
|
|
70
69
|
return copy;
|
|
71
70
|
},
|
|
72
|
-
assign
|
|
71
|
+
assign (plane)
|
|
73
72
|
{
|
|
74
73
|
this .normal .assign (plane .normal);
|
|
75
74
|
this .distanceFromOrigin = plane .distanceFromOrigin;
|
|
76
75
|
return this;
|
|
77
76
|
},
|
|
78
|
-
set
|
|
77
|
+
set (point, normal)
|
|
79
78
|
{
|
|
80
79
|
this .normal .assign (normal);
|
|
81
80
|
this .distanceFromOrigin = normal .dot (point);
|
|
82
81
|
return this;
|
|
83
82
|
},
|
|
84
|
-
multRight
|
|
83
|
+
multRight (matrix)
|
|
85
84
|
{
|
|
86
85
|
// Taken from Inventor:
|
|
87
86
|
|
|
@@ -106,7 +105,7 @@ Plane3 .prototype =
|
|
|
106
105
|
|
|
107
106
|
return this;
|
|
108
107
|
},
|
|
109
|
-
multLeft
|
|
108
|
+
multLeft (matrix)
|
|
110
109
|
{
|
|
111
110
|
// Taken from Inventor:
|
|
112
111
|
|
|
@@ -131,11 +130,11 @@ Plane3 .prototype =
|
|
|
131
130
|
|
|
132
131
|
return this;
|
|
133
132
|
},
|
|
134
|
-
getDistanceToPoint
|
|
133
|
+
getDistanceToPoint (point)
|
|
135
134
|
{
|
|
136
135
|
return point .dot (this .normal) - this .distanceFromOrigin;
|
|
137
136
|
},
|
|
138
|
-
intersectsLine
|
|
137
|
+
intersectsLine (line, intersection)
|
|
139
138
|
{
|
|
140
139
|
const { point, direction } = line;
|
|
141
140
|
|
|
@@ -155,10 +154,10 @@ Plane3 .prototype =
|
|
|
155
154
|
|
|
156
155
|
return true;
|
|
157
156
|
},
|
|
158
|
-
toString
|
|
157
|
+
toString ()
|
|
159
158
|
{
|
|
160
|
-
return this .normal
|
|
159
|
+
return `${this .normal} ${this .distanceFromOrigin}`;
|
|
161
160
|
},
|
|
162
|
-
};
|
|
161
|
+
});
|
|
163
162
|
|
|
164
163
|
export default Plane3;
|
|
@@ -53,15 +53,14 @@ function Sphere3 (radius, center)
|
|
|
53
53
|
this .center = center .copy ();
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
Sphere3 .prototype
|
|
56
|
+
Object .assign (Sphere3 .prototype,
|
|
57
57
|
{
|
|
58
|
-
|
|
59
|
-
set: function (radius, center)
|
|
58
|
+
set (radius, center)
|
|
60
59
|
{
|
|
61
60
|
this .radius = radius;
|
|
62
61
|
this .center .assign (center);
|
|
63
62
|
},
|
|
64
|
-
intersectsLine
|
|
63
|
+
intersectsLine (line, enterPoint, exitPoint)
|
|
65
64
|
{
|
|
66
65
|
// https://github.com/Alexpux/Coin3D/blob/master/src/base/SbSphere.cpp
|
|
67
66
|
|
|
@@ -183,10 +182,10 @@ Sphere3 .prototype =
|
|
|
183
182
|
return true;
|
|
184
183
|
};
|
|
185
184
|
})(),
|
|
186
|
-
toString
|
|
185
|
+
toString ()
|
|
187
186
|
{
|
|
188
|
-
return this .radius
|
|
187
|
+
return `${this .radius} ${this .center}`;
|
|
189
188
|
},
|
|
190
|
-
};
|
|
189
|
+
});
|
|
191
190
|
|
|
192
191
|
export default Sphere3;
|