@babylonjs/core 5.45.2 → 5.46.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/Actions/condition.js +23 -23
- package/Actions/condition.js.map +1 -1
- package/Animations/animatable.js +48 -48
- package/Animations/animatable.js.map +1 -1
- package/Animations/animation.js +53 -53
- package/Animations/animation.js.map +1 -1
- package/Animations/animationGroup.js +53 -53
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/runtimeAnimation.js +36 -36
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Audio/audioEngine.js +14 -14
- package/Audio/audioEngine.js.map +1 -1
- package/Audio/audioSceneComponent.js +14 -14
- package/Audio/audioSceneComponent.js.map +1 -1
- package/Audio/sound.js +47 -47
- package/Audio/sound.js.map +1 -1
- package/Behaviors/Meshes/baseSixDofDragBehavior.d.ts +1 -1
- package/Behaviors/Meshes/fadeInOutBehavior.js +11 -11
- package/Behaviors/Meshes/fadeInOutBehavior.js.map +1 -1
- package/Behaviors/Meshes/pointerDragBehavior.js +34 -34
- package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
- package/Bones/bone.js +15 -15
- package/Bones/bone.js.map +1 -1
- package/Bones/boneIKController.js +9 -9
- package/Bones/boneIKController.js.map +1 -1
- package/Bones/boneLookController.js +50 -50
- package/Bones/boneLookController.js.map +1 -1
- package/Bones/skeleton.js +35 -35
- package/Bones/skeleton.js.map +1 -1
- package/Buffers/buffer.js +14 -14
- package/Buffers/buffer.js.map +1 -1
- package/Buffers/dataBuffer.js +6 -6
- package/Buffers/dataBuffer.js.map +1 -1
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.js +42 -42
- package/Cameras/Inputs/freeCameraDeviceOrientationInput.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js +18 -18
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.js +178 -178
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Cameras/arcRotateCamera.js +176 -176
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/camera.js +90 -90
- package/Cameras/camera.js.map +1 -1
- package/Cameras/flyCamera.js +82 -82
- package/Cameras/flyCamera.js.map +1 -1
- package/Cameras/freeCamera.js +54 -54
- package/Cameras/freeCamera.js.map +1 -1
- package/Compute/computeShader.js +12 -12
- package/Compute/computeShader.js.map +1 -1
- package/Culling/ray.d.ts +1 -1
- package/Debug/axesViewer.js +12 -12
- package/Debug/axesViewer.js.map +1 -1
- package/Debug/debugLayer.js +21 -21
- package/Debug/debugLayer.js.map +1 -1
- package/Debug/directionalLightFrustumViewer.js +20 -20
- package/Debug/directionalLightFrustumViewer.js.map +1 -1
- package/Debug/rayHelper.js +10 -10
- package/Debug/rayHelper.js.map +1 -1
- package/Debug/skeletonViewer.js +81 -81
- package/Debug/skeletonViewer.js.map +1 -1
- package/DeviceInput/InputDevices/deviceSource.d.ts +1 -1
- package/DeviceInput/InputDevices/deviceSourceManager.js +31 -31
- package/DeviceInput/InputDevices/deviceSourceManager.js.map +1 -1
- package/DeviceInput/InputDevices/deviceTypes.d.ts +1 -1
- package/DeviceInput/internalDeviceSourceManager.d.ts +2 -2
- package/Engines/Extensions/engine.computeShader.d.ts +3 -3
- package/Engines/Extensions/engine.multiRender.js +1 -1
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/Extensions/engine.query.d.ts +1 -1
- package/Engines/Extensions/engine.renderTarget.d.ts +1 -1
- package/Engines/Extensions/engine.renderTarget.js +1 -1
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/Native/nativeDataStream.d.ts +1 -1
- package/Engines/Native/nativeHardwareTexture.js +3 -3
- package/Engines/Native/nativeHardwareTexture.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +5 -5
- package/Engines/Native/nativePipelineContext.js +7 -7
- package/Engines/Native/nativePipelineContext.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.js +6 -6
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderCodeInliner.js +4 -4
- package/Engines/Processors/shaderCodeInliner.js.map +1 -1
- package/Engines/Processors/shaderProcessingOptions.d.ts +1 -1
- package/Engines/WebGL/webGLHardwareTexture.js +3 -3
- package/Engines/WebGL/webGLHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuBufferManager.js +3 -3
- package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheBindGroups.js +6 -6
- package/Engines/WebGPU/webgpuCacheBindGroups.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipelineTree.js +5 -5
- package/Engines/WebGPU/webgpuCacheRenderPipelineTree.js.map +1 -1
- package/Engines/WebGPU/webgpuClearQuad.js +11 -11
- package/Engines/WebGPU/webgpuClearQuad.js.map +1 -1
- package/Engines/WebGPU/webgpuComputeContext.js +7 -7
- package/Engines/WebGPU/webgpuComputeContext.js.map +1 -1
- package/Engines/WebGPU/webgpuComputePipelineContext.js +4 -4
- package/Engines/WebGPU/webgpuComputePipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuDrawContext.js +7 -7
- package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.js +9 -9
- package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuMaterialContext.js +5 -5
- package/Engines/WebGPU/webgpuMaterialContext.js.map +1 -1
- package/Engines/WebGPU/webgpuOcclusionQuery.js +10 -10
- package/Engines/WebGPU/webgpuOcclusionQuery.js.map +1 -1
- package/Engines/WebGPU/webgpuPipelineContext.js +6 -6
- package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuQuerySet.js +3 -3
- package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessingContext.js +3 -3
- package/Engines/WebGPU/webgpuShaderProcessingContext.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +3 -3
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTimestampQuery.js +3 -3
- package/Engines/WebGPU/webgpuTimestampQuery.js.map +1 -1
- package/Engines/engine.js +134 -134
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.js +6 -6
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/nullEngine.js +25 -25
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/renderTargetWrapper.js +25 -25
- package/Engines/renderTargetWrapper.js.map +1 -1
- package/Engines/thinEngine.js +243 -243
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +132 -132
- package/Engines/webgpuEngine.js.map +1 -1
- package/Events/keyboardEvents.js +10 -10
- package/Events/keyboardEvents.js.map +1 -1
- package/Events/pointerEvents.js +9 -9
- package/Events/pointerEvents.js.map +1 -1
- package/Gamepads/Controllers/poseEnabledController.js +9 -9
- package/Gamepads/Controllers/poseEnabledController.js.map +1 -1
- package/Gamepads/Controllers/webVRController.js +13 -13
- package/Gamepads/Controllers/webVRController.js.map +1 -1
- package/Gamepads/gamepad.js +20 -20
- package/Gamepads/gamepad.js.map +1 -1
- package/Gizmos/axisDragGizmo.js +45 -45
- package/Gizmos/axisDragGizmo.js.map +1 -1
- package/Gizmos/axisScaleGizmo.js +12 -12
- package/Gizmos/axisScaleGizmo.js.map +1 -1
- package/Gizmos/boundingBoxGizmo.js +74 -74
- package/Gizmos/boundingBoxGizmo.js.map +1 -1
- package/Gizmos/gizmo.js +34 -34
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/gizmoManager.js +40 -40
- package/Gizmos/gizmoManager.js.map +1 -1
- package/Gizmos/planeDragGizmo.js +23 -23
- package/Gizmos/planeDragGizmo.js.map +1 -1
- package/Gizmos/planeRotationGizmo.js +12 -12
- package/Gizmos/planeRotationGizmo.js.map +1 -1
- package/Gizmos/positionGizmo.js +40 -40
- package/Gizmos/positionGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.js +47 -47
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Gizmos/scaleGizmo.js +41 -41
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Helpers/environmentHelper.js +18 -18
- package/Helpers/environmentHelper.js.map +1 -1
- package/Helpers/textureDome.js +96 -96
- package/Helpers/textureDome.js.map +1 -1
- package/IAccessibilityTag.d.ts +2 -2
- package/Instrumentation/engineInstrumentation.js +21 -21
- package/Instrumentation/engineInstrumentation.js.map +1 -1
- package/Instrumentation/sceneInstrumentation.js +90 -90
- package/Instrumentation/sceneInstrumentation.js.map +1 -1
- package/Layers/effectLayer.js +48 -48
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.js +32 -32
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.js +26 -26
- package/Layers/highlightLayer.js.map +1 -1
- package/Layers/layer.js +40 -40
- package/Layers/layer.js.map +1 -1
- package/LensFlares/lensFlare.js +15 -15
- package/LensFlares/lensFlare.js.map +1 -1
- package/LensFlares/lensFlareSystem.js +4 -4
- package/LensFlares/lensFlareSystem.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.js +18 -18
- package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +115 -115
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/directionalLight.js +31 -31
- package/Lights/directionalLight.js.map +1 -1
- package/Lights/light.js +72 -72
- package/Lights/light.js.map +1 -1
- package/Lights/pointLight.js +18 -18
- package/Lights/pointLight.js.map +1 -1
- package/Lights/spotLight.js +30 -30
- package/Lights/spotLight.js.map +1 -1
- package/Loading/sceneLoader.d.ts +1 -1
- package/Materials/Background/backgroundMaterial.js +124 -124
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.js +8 -8
- package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +14 -14
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +9 -9
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.js +26 -26
- package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Input/inputBlock.js +34 -34
- package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +14 -14
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.js +16 -16
- package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
- package/Materials/Node/Blocks/customBlock.js +7 -7
- package/Materials/Node/Blocks/customBlock.js.map +1 -1
- package/Materials/Node/Blocks/gradientBlock.js +13 -13
- package/Materials/Node/Blocks/gradientBlock.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.js +30 -30
- package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +1 -1
- package/Materials/Node/nodeMaterial.js +60 -60
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBlock.js +35 -35
- package/Materials/Node/nodeMaterialBlock.js.map +1 -1
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js +50 -50
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
- package/Materials/PBR/pbrAnisotropicConfiguration.js +5 -5
- package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBRDFConfiguration.js +4 -4
- package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +52 -52
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseSimpleMaterial.js +17 -17
- package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
- package/Materials/PBR/pbrClearCoatConfiguration.js +5 -5
- package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
- package/Materials/PBR/pbrIridescenceConfiguration.js +5 -5
- package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
- package/Materials/PBR/pbrMaterial.js +209 -209
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrSheenConfiguration.js +5 -5
- package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js +6 -6
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +51 -51
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Materials/Textures/baseTexture.js +99 -99
- package/Materials/Textures/baseTexture.js.map +1 -1
- package/Materials/Textures/cubeTexture.js +61 -61
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/externalTexture.js +16 -16
- package/Materials/Textures/externalTexture.js.map +1 -1
- package/Materials/Textures/hdrCubeTexture.js +44 -44
- package/Materials/Textures/hdrCubeTexture.js.map +1 -1
- package/Materials/Textures/internalTexture.js +31 -31
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/Textures/mirrorTexture.js +73 -73
- package/Materials/Textures/mirrorTexture.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.js +47 -47
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/rawTexture2DArray.js +6 -6
- package/Materials/Textures/rawTexture2DArray.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.js +142 -142
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Materials/Textures/texture.d.ts +1 -1
- package/Materials/Textures/texture.js +26 -26
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/Textures/textureCreationOptions.d.ts +1 -1
- package/Materials/Textures/textureSampler.js +20 -20
- package/Materials/Textures/textureSampler.js.map +1 -1
- package/Materials/Textures/thinRenderTargetTexture.js +6 -6
- package/Materials/Textures/thinRenderTargetTexture.js.map +1 -1
- package/Materials/Textures/thinTexture.js +39 -39
- package/Materials/Textures/thinTexture.js.map +1 -1
- package/Materials/Textures/videoTexture.js +40 -40
- package/Materials/Textures/videoTexture.js.map +1 -1
- package/Materials/drawWrapper.js +6 -6
- package/Materials/drawWrapper.js.map +1 -1
- package/Materials/effect.js +18 -18
- package/Materials/effect.js.map +1 -1
- package/Materials/effectRenderer.js +9 -9
- package/Materials/effectRenderer.js.map +1 -1
- package/Materials/fresnelParameters.d.ts +2 -2
- package/Materials/fresnelParameters.js +13 -13
- package/Materials/fresnelParameters.js.map +1 -1
- package/Materials/material.detailMapConfiguration.js +5 -5
- package/Materials/material.detailMapConfiguration.js.map +1 -1
- package/Materials/material.js +223 -223
- package/Materials/material.js.map +1 -1
- package/Materials/materialPluginBase.js +5 -5
- package/Materials/materialPluginBase.js.map +1 -1
- package/Materials/materialPluginEvent.d.ts +14 -14
- package/Materials/materialPluginManager.d.ts +1 -1
- package/Materials/multiMaterial.js +16 -16
- package/Materials/multiMaterial.js.map +1 -1
- package/Materials/shadowDepthWrapper.js +14 -14
- package/Materials/shadowDepthWrapper.js.map +1 -1
- package/Materials/standardMaterial.js +100 -100
- package/Materials/standardMaterial.js.map +1 -1
- package/Materials/uniformBufferEffectCommonAccessor.js +3 -3
- package/Materials/uniformBufferEffectCommonAccessor.js.map +1 -1
- package/Maths/math.functions.js +2 -0
- package/Maths/math.functions.js.map +1 -1
- package/Maths/math.path.js +11 -11
- package/Maths/math.path.js.map +1 -1
- package/Maths/math.vector.d.ts +6 -7
- package/Maths/math.vector.js +48 -48
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/Builders/goldbergBuilder.d.ts +2 -2
- package/Meshes/Compression/dracoCompression.js +23 -23
- package/Meshes/Compression/dracoCompression.js.map +1 -1
- package/Meshes/Compression/meshoptCompression.js +9 -9
- package/Meshes/Compression/meshoptCompression.js.map +1 -1
- package/Meshes/abstractMesh.js +179 -179
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/geometry.js +32 -32
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/goldbergMesh.d.ts +1 -1
- package/Meshes/linesMesh.js +3 -3
- package/Meshes/linesMesh.js.map +1 -1
- package/Meshes/mesh.js +165 -165
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/polygonMesh.js +5 -5
- package/Meshes/polygonMesh.js.map +1 -1
- package/Meshes/subMesh.js +59 -59
- package/Meshes/subMesh.js.map +1 -1
- package/Meshes/transformNode.js +52 -52
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.d.ts +1 -1
- package/Misc/PerformanceViewer/performanceViewerCollector.js +12 -12
- package/Misc/PerformanceViewer/performanceViewerCollector.js.map +1 -1
- package/Misc/arrayTools.d.ts +1 -1
- package/Misc/copyTextureToTexture.js +3 -3
- package/Misc/copyTextureToTexture.js.map +1 -1
- package/Misc/coroutine.d.ts +5 -5
- package/Misc/deferred.js +9 -9
- package/Misc/deferred.js.map +1 -1
- package/Misc/depthReducer.js +7 -7
- package/Misc/depthReducer.js.map +1 -1
- package/Misc/environmentTextureTools.d.ts +1 -1
- package/Misc/error.d.ts +1 -1
- package/Misc/fileTools.d.ts +5 -5
- package/Misc/filesInput.js +6 -6
- package/Misc/filesInput.js.map +1 -1
- package/Misc/khronosTextureContainer2.js +9 -9
- package/Misc/khronosTextureContainer2.js.map +1 -1
- package/Misc/observable.js +12 -12
- package/Misc/observable.js.map +1 -1
- package/Misc/perfCounter.js +16 -16
- package/Misc/perfCounter.js.map +1 -1
- package/Misc/sceneOptimizer.js +76 -76
- package/Misc/sceneOptimizer.js.map +1 -1
- package/Misc/stringDictionary.d.ts +1 -1
- package/Misc/trajectoryClassifier.js +67 -67
- package/Misc/trajectoryClassifier.js.map +1 -1
- package/Misc/videoRecorder.js +15 -15
- package/Misc/videoRecorder.js.map +1 -1
- package/Misc/virtualJoystick.js +12 -12
- package/Misc/virtualJoystick.js.map +1 -1
- package/Morph/morphTarget.js +28 -28
- package/Morph/morphTarget.js.map +1 -1
- package/Morph/morphTargetManager.js +18 -18
- package/Morph/morphTargetManager.js.map +1 -1
- package/Offline/database.js +12 -12
- package/Offline/database.js.map +1 -1
- package/Particles/EmitterTypes/coneParticleEmitter.js +25 -25
- package/Particles/EmitterTypes/coneParticleEmitter.js.map +1 -1
- package/Particles/EmitterTypes/meshParticleEmitter.js +20 -20
- package/Particles/EmitterTypes/meshParticleEmitter.js.map +1 -1
- package/Particles/baseParticleSystem.js +232 -232
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/cloudPoint.js +9 -9
- package/Particles/cloudPoint.js.map +1 -1
- package/Particles/gpuParticleSystem.js +123 -123
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.js +102 -102
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/pointsCloudSystem.js +18 -18
- package/Particles/pointsCloudSystem.js.map +1 -1
- package/Particles/solidParticle.js +23 -23
- package/Particles/solidParticle.js.map +1 -1
- package/Physics/v1/physicsEngine.js +14 -14
- package/Physics/v1/physicsEngine.js.map +1 -1
- package/Physics/v1/physicsImpostor.js +149 -149
- package/Physics/v1/physicsImpostor.js.map +1 -1
- package/Physics/v2/physicsEngine.js +14 -14
- package/Physics/v2/physicsEngine.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +129 -129
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +68 -68
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +6 -6
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +226 -225
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +10 -10
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
- package/PostProcesses/anaglyphPostProcess.js +7 -7
- package/PostProcesses/anaglyphPostProcess.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.js +7 -7
- package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
- package/PostProcesses/bloomEffect.js +28 -28
- package/PostProcesses/bloomEffect.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.js +7 -7
- package/PostProcesses/bloomMergePostProcess.js.map +1 -1
- package/PostProcesses/blurPostProcess.js +32 -32
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.js +7 -7
- package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.js +7 -7
- package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.js +7 -7
- package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.js +7 -7
- package/PostProcesses/convolutionPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldBlurPostProcess.js +7 -7
- package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
- package/PostProcesses/depthOfFieldEffect.js +36 -36
- package/PostProcesses/depthOfFieldEffect.js.map +1 -1
- package/PostProcesses/depthOfFieldMergePostProcess.js +7 -7
- package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.js +7 -7
- package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
- package/PostProcesses/filterPostProcess.js +7 -7
- package/PostProcesses/filterPostProcess.js.map +1 -1
- package/PostProcesses/grainPostProcess.js +7 -7
- package/PostProcesses/grainPostProcess.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js +42 -42
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.js +41 -41
- package/PostProcesses/motionBlurPostProcess.js.map +1 -1
- package/PostProcesses/passPostProcess.js +15 -15
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +2 -2
- package/PostProcesses/postProcess.js +123 -123
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/refractionPostProcess.js +21 -21
- package/PostProcesses/refractionPostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js +7 -7
- package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js +19 -19
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.js +7 -7
- package/PostProcesses/sharpenPostProcess.js.map +1 -1
- package/PostProcesses/stereoscopicInterlacePostProcess.js +14 -14
- package/PostProcesses/stereoscopicInterlacePostProcess.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.js +7 -7
- package/PostProcesses/tonemapPostProcess.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js +11 -11
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/PostProcesses/vrDistortionCorrectionPostProcess.js +7 -7
- package/PostProcesses/vrDistortionCorrectionPostProcess.js.map +1 -1
- package/Rendering/depthPeelingRenderer.js +36 -36
- package/Rendering/depthPeelingRenderer.js.map +1 -1
- package/Rendering/depthRenderer.js +8 -8
- package/Rendering/depthRenderer.js.map +1 -1
- package/Rendering/edgesRenderer.js +34 -34
- package/Rendering/edgesRenderer.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderer.js +8 -8
- package/Rendering/fluidRenderer/fluidRenderer.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.js +3 -3
- package/Rendering/fluidRenderer/fluidRenderingDepthTextureCopy.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.js +19 -19
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +12 -12
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +18 -18
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +68 -68
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTextures.js +29 -29
- package/Rendering/fluidRenderer/fluidRenderingTextures.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +44 -44
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/prePassRenderer.js +51 -51
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Rendering/renderingGroup.js +25 -25
- package/Rendering/renderingGroup.js.map +1 -1
- package/Rendering/renderingManager.js +21 -21
- package/Rendering/renderingManager.js.map +1 -1
- package/Rendering/subSurfaceConfiguration.js +18 -18
- package/Rendering/subSurfaceConfiguration.js.map +1 -1
- package/Rendering/utilityLayerRenderer.js +76 -76
- package/Rendering/utilityLayerRenderer.js.map +1 -1
- package/Sprites/sprite.js +16 -16
- package/Sprites/sprite.js.map +1 -1
- package/Sprites/spriteManager.js +81 -81
- package/Sprites/spriteManager.js.map +1 -1
- package/Sprites/spriteMap.js +32 -32
- package/Sprites/spriteMap.js.map +1 -1
- package/Sprites/spriteRenderer.js +6 -6
- package/Sprites/spriteRenderer.js.map +1 -1
- package/Sprites/thinSprite.js +22 -22
- package/Sprites/thinSprite.js.map +1 -1
- package/States/stencilStateComposer.js +10 -10
- package/States/stencilStateComposer.js.map +1 -1
- package/XR/features/WebXRAnchorSystem.js +7 -7
- package/XR/features/WebXRAnchorSystem.js.map +1 -1
- package/XR/features/WebXRControllerMovement.d.ts +3 -3
- package/XR/features/WebXRControllerMovement.js +97 -97
- package/XR/features/WebXRControllerMovement.js.map +1 -1
- package/XR/features/WebXRControllerPhysics.js +24 -24
- package/XR/features/WebXRControllerPhysics.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.js +26 -26
- package/XR/features/WebXRControllerTeleportation.js.map +1 -1
- package/XR/features/WebXRDOMOverlay.d.ts +1 -1
- package/XR/features/WebXRFeaturePointSystem.js +6 -6
- package/XR/features/WebXRFeaturePointSystem.js.map +1 -1
- package/XR/features/WebXRHandTracking.d.ts +1 -1
- package/XR/features/WebXRHandTracking.js +95 -95
- package/XR/features/WebXRHandTracking.js.map +1 -1
- package/XR/features/WebXRWalkingLocomotion.js +21 -21
- package/XR/features/WebXRWalkingLocomotion.js.map +1 -1
- package/XR/motionController/webXRAbstractMotionController.d.ts +3 -3
- package/XR/motionController/webXRMotionControllerManager.d.ts +1 -1
- package/XR/native/nativeXRFrame.js +3 -3
- package/XR/native/nativeXRFrame.js.map +1 -1
- package/XR/webXRFeaturesManager.d.ts +1 -1
- package/XR/webXRLayerWrapper.d.ts +2 -2
- package/XR/webXRLayerWrapper.js +17 -17
- package/XR/webXRLayerWrapper.js.map +1 -1
- package/abstractScene.d.ts +2 -2
- package/node.d.ts +1 -1
- package/node.js +71 -71
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/scene.js +777 -777
- package/scene.js.map +1 -1
- package/sceneComponent.d.ts +12 -12
- package/types.d.ts +11 -11
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/** @internal */
|
|
2
2
|
export class UniformBufferEffectCommonAccessor {
|
|
3
|
+
_isUbo(uboOrEffect) {
|
|
4
|
+
return uboOrEffect.addUniform !== undefined;
|
|
5
|
+
}
|
|
3
6
|
constructor(uboOrEffect) {
|
|
4
7
|
if (this._isUbo(uboOrEffect)) {
|
|
5
8
|
this.setMatrix3x3 = uboOrEffect.updateMatrix3x3.bind(uboOrEffect);
|
|
@@ -46,8 +49,5 @@ export class UniformBufferEffectCommonAccessor {
|
|
|
46
49
|
this.setInt4 = uboOrEffect.setInt4.bind(uboOrEffect);
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
|
-
_isUbo(uboOrEffect) {
|
|
50
|
-
return uboOrEffect.addUniform !== undefined;
|
|
51
|
-
}
|
|
52
52
|
}
|
|
53
53
|
//# sourceMappingURL=uniformBufferEffectCommonAccessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniformBufferEffectCommonAccessor.js","sourceRoot":"","sources":["../../../../lts/core/generated/Materials/uniformBufferEffectCommonAccessor.ts"],"names":[],"mappings":"AAIA,gBAAgB;AAChB,MAAM,OAAO,iCAAiC;
|
|
1
|
+
{"version":3,"file":"uniformBufferEffectCommonAccessor.js","sourceRoot":"","sources":["../../../../lts/core/generated/Materials/uniformBufferEffectCommonAccessor.ts"],"names":[],"mappings":"AAIA,gBAAgB;AAChB,MAAM,OAAO,iCAAiC;IAyClC,MAAM,CAAC,WAAmC;QAC9C,OAAQ,WAA6B,CAAC,UAAU,KAAK,SAAS,CAAC;IACnE,CAAC;IAED,YAAY,WAAmC;QAC3C,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;YAC1B,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClE,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClE,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1D,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,YAAY,CAAC,IAAI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,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC3D,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzD,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACzD,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACrE,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACnD,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACrD,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACrD,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACxD;IACL,CAAC;CACJ","sourcesContent":["import type { IColor3Like, IColor4Like, IMatrixLike, IVector3Like, IVector4Like } from \"../Maths/math.like\";\r\nimport type { Effect } from \"./effect\";\r\nimport type { UniformBuffer } from \"./uniformBuffer\";\r\n\r\n/** @internal */\r\nexport class UniformBufferEffectCommonAccessor {\r\n public setMatrix3x3: (name: string, matrix: Float32Array) => void;\r\n\r\n public setMatrix2x2: (name: string, matrix: Float32Array) => void;\r\n\r\n public setFloat: (name: string, x: number) => void;\r\n\r\n public setFloat2: (name: string, x: number, y: number, suffix?: string) => void;\r\n\r\n public setFloat3: (name: string, x: number, y: number, z: number, suffix?: string) => void;\r\n\r\n public setFloat4: (name: string, x: number, y: number, z: number, w: number, suffix?: string) => void;\r\n\r\n public setFloatArray: (name: string, array: Float32Array) => void;\r\n\r\n public setArray: (name: string, array: number[]) => void;\r\n\r\n public setIntArray: (name: string, array: Int32Array) => void;\r\n\r\n public setMatrix: (name: string, mat: IMatrixLike) => void;\r\n\r\n public setMatrices: (name: string, mat: Float32Array) => void;\r\n\r\n public setVector3: (name: string, vector: IVector3Like) => void;\r\n\r\n public setVector4: (name: string, vector: IVector4Like) => void;\r\n\r\n public setColor3: (name: string, color: IColor3Like, suffix?: string) => void;\r\n\r\n public setColor4: (name: string, color: IColor3Like, alpha: number, suffix?: string) => void;\r\n\r\n public setDirectColor4: (name: string, color: IColor4Like) => void;\r\n\r\n public setInt: (name: string, x: number, suffix?: string) => void;\r\n\r\n public setInt2: (name: string, x: number, y: number, suffix?: string) => void;\r\n\r\n public setInt3: (name: string, x: number, y: number, z: number, suffix?: string) => void;\r\n\r\n public setInt4: (name: string, x: number, y: number, z: number, w: number, suffix?: string) => void;\r\n\r\n private _isUbo(uboOrEffect: UniformBuffer | Effect): uboOrEffect is UniformBuffer {\r\n return (uboOrEffect as UniformBuffer).addUniform !== undefined;\r\n }\r\n\r\n constructor(uboOrEffect: UniformBuffer | Effect) {\r\n if (this._isUbo(uboOrEffect)) {\r\n this.setMatrix3x3 = uboOrEffect.updateMatrix3x3.bind(uboOrEffect);\r\n this.setMatrix2x2 = uboOrEffect.updateMatrix2x2.bind(uboOrEffect);\r\n this.setFloat = uboOrEffect.updateFloat.bind(uboOrEffect);\r\n this.setFloat2 = uboOrEffect.updateFloat2.bind(uboOrEffect);\r\n this.setFloat3 = uboOrEffect.updateFloat3.bind(uboOrEffect);\r\n this.setFloat4 = uboOrEffect.updateFloat4.bind(uboOrEffect);\r\n this.setFloatArray = uboOrEffect.updateFloatArray.bind(uboOrEffect);\r\n this.setArray = uboOrEffect.updateArray.bind(uboOrEffect);\r\n this.setIntArray = uboOrEffect.updateIntArray.bind(uboOrEffect);\r\n this.setMatrix = uboOrEffect.updateMatrix.bind(uboOrEffect);\r\n this.setMatrices = uboOrEffect.updateMatrices.bind(uboOrEffect);\r\n this.setVector3 = uboOrEffect.updateVector3.bind(uboOrEffect);\r\n this.setVector4 = uboOrEffect.updateVector4.bind(uboOrEffect);\r\n this.setColor3 = uboOrEffect.updateColor3.bind(uboOrEffect);\r\n this.setColor4 = uboOrEffect.updateColor4.bind(uboOrEffect);\r\n this.setDirectColor4 = uboOrEffect.updateDirectColor4.bind(uboOrEffect);\r\n this.setInt = uboOrEffect.updateInt.bind(uboOrEffect);\r\n this.setInt2 = uboOrEffect.updateInt2.bind(uboOrEffect);\r\n this.setInt3 = uboOrEffect.updateInt3.bind(uboOrEffect);\r\n this.setInt4 = uboOrEffect.updateInt4.bind(uboOrEffect);\r\n } else {\r\n this.setMatrix3x3 = uboOrEffect.setMatrix3x3.bind(uboOrEffect);\r\n this.setMatrix2x2 = uboOrEffect.setMatrix2x2.bind(uboOrEffect);\r\n this.setFloat = uboOrEffect.setFloat.bind(uboOrEffect);\r\n this.setFloat2 = uboOrEffect.setFloat2.bind(uboOrEffect);\r\n this.setFloat3 = uboOrEffect.setFloat3.bind(uboOrEffect);\r\n this.setFloat4 = uboOrEffect.setFloat4.bind(uboOrEffect);\r\n this.setFloatArray = uboOrEffect.setFloatArray.bind(uboOrEffect);\r\n this.setArray = uboOrEffect.setArray.bind(uboOrEffect);\r\n this.setIntArray = uboOrEffect.setIntArray.bind(uboOrEffect);\r\n this.setMatrix = uboOrEffect.setMatrix.bind(uboOrEffect);\r\n this.setMatrices = uboOrEffect.setMatrices.bind(uboOrEffect);\r\n this.setVector3 = uboOrEffect.setVector3.bind(uboOrEffect);\r\n this.setVector4 = uboOrEffect.setVector4.bind(uboOrEffect);\r\n this.setColor3 = uboOrEffect.setColor3.bind(uboOrEffect);\r\n this.setColor4 = uboOrEffect.setColor4.bind(uboOrEffect);\r\n this.setDirectColor4 = uboOrEffect.setDirectColor4.bind(uboOrEffect);\r\n this.setInt = uboOrEffect.setInt.bind(uboOrEffect);\r\n this.setInt2 = uboOrEffect.setInt2.bind(uboOrEffect);\r\n this.setInt3 = uboOrEffect.setInt3.bind(uboOrEffect);\r\n this.setInt4 = uboOrEffect.setInt4.bind(uboOrEffect);\r\n }\r\n }\r\n}\r\n"]}
|
package/Maths/math.functions.js
CHANGED
|
@@ -25,9 +25,11 @@ class MathHelpers {
|
|
|
25
25
|
}
|
|
26
26
|
__decorate([
|
|
27
27
|
nativeOverride.filter((...[positions, indices]) => !Array.isArray(positions) && !Array.isArray(indices))
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28
29
|
], MathHelpers, "extractMinAndMaxIndexed", null);
|
|
29
30
|
__decorate([
|
|
30
31
|
nativeOverride.filter((...[positions]) => !Array.isArray(positions))
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
31
33
|
], MathHelpers, "extractMinAndMax", null);
|
|
32
34
|
/**
|
|
33
35
|
* Extracts minimum and maximum values from a list of indexed positions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.functions.js","sourceRoot":"","sources":["../../../../lts/core/generated/Maths/math.functions.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,4FAA4F;AAC5F,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"math.functions.js","sourceRoot":"","sources":["../../../../lts/core/generated/Maths/math.functions.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,4FAA4F;AAC5F,MAAM,WAAW;IAGC,AAAP,MAAM,CAAC,uBAAuB,CAAC,SAAqB,EAAE,OAAqB,EAAE,UAAkB,EAAE,UAAkB,EAAE,OAAgB,EAAE,OAAgB;QAC1J,KAAK,IAAI,KAAK,GAAG,UAAU,EAAE,KAAK,GAAG,UAAU,GAAG,UAAU,EAAE,KAAK,EAAE,EAAE;YACnE,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAClC,MAAM,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AAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;KAC5C;IAED,OAAO;QACH,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,OAAO;KACnB,CAAC;AACN,CAAC","sourcesContent":["import type { FloatArray, Nullable, IndicesArray } from \"../types\";\r\nimport type { Vector2 } from \"./math.vector\";\r\nimport { Vector3 } from \"./math.vector\";\r\nimport { nativeOverride } from \"../Misc/decorators\";\r\n\r\n// This helper class is only here so we can apply the nativeOverride decorator to functions.\r\nclass MathHelpers {\r\n @nativeOverride.filter((...[positions, indices]: Parameters<typeof MathHelpers.extractMinAndMaxIndexed>) => !Array.isArray(positions) && !Array.isArray(indices))\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public static extractMinAndMaxIndexed(positions: FloatArray, indices: IndicesArray, indexStart: number, indexCount: number, minimum: Vector3, maximum: Vector3): void {\r\n for (let index = indexStart; index < indexStart + indexCount; index++) {\r\n const offset = indices[index] * 3;\r\n const x = positions[offset];\r\n const y = positions[offset + 1];\r\n const z = positions[offset + 2];\r\n minimum.minimizeInPlaceFromFloats(x, y, z);\r\n maximum.maximizeInPlaceFromFloats(x, y, z);\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[positions]: Parameters<typeof MathHelpers.extractMinAndMax>) => !Array.isArray(positions))\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public static extractMinAndMax(positions: FloatArray, start: number, count: number, stride: number, minimum: Vector3, maximum: Vector3): void {\r\n for (let index = start, offset = start * stride; index < start + count; index++, offset += stride) {\r\n const x = positions[offset];\r\n const y = positions[offset + 1];\r\n const z = positions[offset + 2];\r\n minimum.minimizeInPlaceFromFloats(x, y, z);\r\n maximum.maximizeInPlaceFromFloats(x, y, z);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Extracts minimum and maximum values from a list of indexed positions\r\n * @param positions defines the positions to use\r\n * @param indices defines the indices to the positions\r\n * @param indexStart defines the start index\r\n * @param indexCount defines the end index\r\n * @param bias defines bias value to add to the result\r\n * @returns minimum and maximum values\r\n */\r\nexport function extractMinAndMaxIndexed(\r\n positions: FloatArray,\r\n indices: IndicesArray,\r\n indexStart: number,\r\n indexCount: number,\r\n bias: Nullable<Vector2> = null\r\n): { minimum: Vector3; maximum: Vector3 } {\r\n const minimum = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n const maximum = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n\r\n MathHelpers.extractMinAndMaxIndexed(positions, indices, indexStart, indexCount, minimum, maximum);\r\n\r\n if (bias) {\r\n minimum.x -= minimum.x * bias.x + bias.y;\r\n minimum.y -= minimum.y * bias.x + bias.y;\r\n minimum.z -= minimum.z * bias.x + bias.y;\r\n maximum.x += maximum.x * bias.x + bias.y;\r\n maximum.y += maximum.y * bias.x + bias.y;\r\n maximum.z += maximum.z * bias.x + bias.y;\r\n }\r\n\r\n return {\r\n minimum: minimum,\r\n maximum: maximum,\r\n };\r\n}\r\n\r\n/**\r\n * Extracts minimum and maximum values from a list of positions\r\n * @param positions defines the positions to use\r\n * @param start defines the start index in the positions array\r\n * @param count defines the number of positions to handle\r\n * @param bias defines bias value to add to the result\r\n * @param stride defines the stride size to use (distance between two positions in the positions array)\r\n * @returns minimum and maximum values\r\n */\r\nexport function extractMinAndMax(positions: FloatArray, start: number, count: number, bias: Nullable<Vector2> = null, stride?: number): { minimum: Vector3; maximum: Vector3 } {\r\n const minimum = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n const maximum = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n\r\n if (!stride) {\r\n stride = 3;\r\n }\r\n\r\n MathHelpers.extractMinAndMax(positions, start, count, stride, minimum, maximum);\r\n\r\n if (bias) {\r\n minimum.x -= minimum.x * bias.x + bias.y;\r\n minimum.y -= minimum.y * bias.x + bias.y;\r\n minimum.z -= minimum.z * bias.x + bias.y;\r\n maximum.x += maximum.x * bias.x + bias.y;\r\n maximum.y += maximum.y * bias.x + bias.y;\r\n maximum.z += maximum.z * bias.x + bias.y;\r\n }\r\n\r\n return {\r\n minimum: minimum,\r\n maximum: maximum,\r\n };\r\n}\r\n"]}
|
package/Maths/math.path.js
CHANGED
|
@@ -711,17 +711,6 @@ export class Path3D {
|
|
|
711
711
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves
|
|
712
712
|
*/
|
|
713
713
|
export class Curve3 {
|
|
714
|
-
/**
|
|
715
|
-
* A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.
|
|
716
|
-
* A Curve3 is designed from a series of successive Vector3.
|
|
717
|
-
* Tuto : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#curve3-object
|
|
718
|
-
* @param points points which make up the curve
|
|
719
|
-
*/
|
|
720
|
-
constructor(points) {
|
|
721
|
-
this._length = 0.0;
|
|
722
|
-
this._points = points;
|
|
723
|
-
this._length = this._computeLength(points);
|
|
724
|
-
}
|
|
725
714
|
/**
|
|
726
715
|
* Returns a Curve3 object along a Quadratic Bezier curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#quadratic-bezier-curve
|
|
727
716
|
* @param v0 (Vector3) the origin point of the Quadratic Bezier
|
|
@@ -882,6 +871,17 @@ export class Curve3 {
|
|
|
882
871
|
}
|
|
883
872
|
return new Curve3(arc);
|
|
884
873
|
}
|
|
874
|
+
/**
|
|
875
|
+
* A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.
|
|
876
|
+
* A Curve3 is designed from a series of successive Vector3.
|
|
877
|
+
* Tuto : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#curve3-object
|
|
878
|
+
* @param points points which make up the curve
|
|
879
|
+
*/
|
|
880
|
+
constructor(points) {
|
|
881
|
+
this._length = 0.0;
|
|
882
|
+
this._points = points;
|
|
883
|
+
this._length = this._computeLength(points);
|
|
884
|
+
}
|
|
885
885
|
/**
|
|
886
886
|
* @returns the Curve3 stored array of successive Vector3
|
|
887
887
|
*/
|
package/Maths/math.path.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.path.js","sourceRoot":"","sources":["../../../../lts/core/generated/Maths/math.path.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAN,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB;;OAEG;IACH,yCAAM,CAAA;IACN,wBAAwB;IACxB,2CAAO,CAAA;AACX,CAAC,EAPW,WAAW,KAAX,WAAW,QAOtB;AAED,6CAA6C;AAC7C,MAAM,OAAO,WAAW;IACpB;;;;;;;;OAQG;IACI,MAAM,CAAC,WAAW,CAAC,CAAS,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;QAC/E,0CAA0C;QAC1C,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;QAC/B,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;QAElB,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YACxB,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;YACtC,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;YAEvC,MAAM,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,EAAE,GAAG,SAAS,GAAG,EAAE,GAAG,QAAQ,CAA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,MAAM,EAAE,CAAC,EAAE,EAAE;YACzC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;SAChF;QACD,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;QACnD,OAAO,cAAc,CAAC;IAC1B,CAAC;IAEO,cAAc,CAAC,IAA8B;QACjD,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SAC/C;QACD,OAAO,CAAC,CAAC;IACb,CAAC;CACJ","sourcesContent":["import type { DeepImmutable, Nullable } from \"../types\";\r\nimport { Scalar } from \"./math.scalar\";\r\nimport { Vector2, Vector3, Quaternion, Matrix } from \"./math.vector\";\r\nimport { Epsilon } from \"./math.constants\";\r\n\r\n/**\r\n * Defines potential orientation for back face culling\r\n */\r\nexport enum Orientation {\r\n /**\r\n * Clockwise\r\n */\r\n CW = 0,\r\n /** Counter clockwise */\r\n CCW = 1,\r\n}\r\n\r\n/** Class used to represent a Bezier curve */\r\nexport class BezierCurve {\r\n /**\r\n * Returns the cubic Bezier interpolated value (float) at \"t\" (float) from the given x1, y1, x2, y2 floats\r\n * @param t defines the time\r\n * @param x1 defines the left coordinate on X axis\r\n * @param y1 defines the left coordinate on Y axis\r\n * @param x2 defines the right coordinate on X axis\r\n * @param y2 defines the right coordinate on Y axis\r\n * @returns the interpolated value\r\n */\r\n public static Interpolate(t: number, x1: number, y1: number, x2: number, y2: number): number {\r\n // Extract X (which is equal to time here)\r\n const f0 = 1 - 3 * x2 + 3 * x1;\r\n const f1 = 3 * x2 - 6 * x1;\r\n const f2 = 3 * x1;\r\n\r\n let refinedT = t;\r\n for (let i = 0; i < 5; i++) {\r\n const refinedT2 = refinedT * refinedT;\r\n const refinedT3 = refinedT2 * refinedT;\r\n\r\n const x = f0 * refinedT3 + f1 * refinedT2 + f2 * refinedT;\r\n const slope = 1.0 / (3.0 * f0 * refinedT2 + 2.0 * f1 * refinedT + f2);\r\n refinedT -= (x - t) * slope;\r\n refinedT = Math.min(1, Math.max(0, refinedT));\r\n }\r\n\r\n // Resolve cubic bezier for the given x\r\n return 3 * Math.pow(1 - refinedT, 2) * refinedT * y1 + 3 * (1 - refinedT) * Math.pow(refinedT, 2) * y2 + Math.pow(refinedT, 3);\r\n }\r\n}\r\n\r\n/**\r\n * Defines angle representation\r\n */\r\nexport class Angle {\r\n private _radians: number;\r\n\r\n /**\r\n * Creates an Angle object of \"radians\" radians (float).\r\n * @param radians the angle in radians\r\n */\r\n constructor(radians: number) {\r\n this._radians = radians;\r\n if (this._radians < 0.0) {\r\n this._radians += 2.0 * Math.PI;\r\n }\r\n }\r\n\r\n /**\r\n * Get value in degrees\r\n * @returns the Angle value in degrees (float)\r\n */\r\n public degrees() {\r\n return (this._radians * 180.0) / Math.PI;\r\n }\r\n\r\n /**\r\n * Get value in radians\r\n * @returns the Angle value in radians (float)\r\n */\r\n public radians() {\r\n return this._radians;\r\n }\r\n\r\n /**\r\n * Gets a new Angle object valued with the gradient angle, in radians, of the line joining two points\r\n * @param a defines first point as the origin\r\n * @param b defines point\r\n * @returns a new Angle\r\n */\r\n public static BetweenTwoPoints(a: DeepImmutable<Vector2>, b: DeepImmutable<Vector2>): Angle {\r\n const delta = b.subtract(a);\r\n const theta = Math.atan2(delta.y, delta.x);\r\n return new Angle(theta);\r\n }\r\n\r\n /**\r\n * Gets a new Angle object from the given float in radians\r\n * @param radians defines the angle value in radians\r\n * @returns a new Angle\r\n */\r\n public static FromRadians(radians: number): Angle {\r\n return new Angle(radians);\r\n }\r\n /**\r\n * Gets a new Angle object from the given float in degrees\r\n * @param degrees defines the angle value in degrees\r\n * @returns a new Angle\r\n */\r\n public static FromDegrees(degrees: number): Angle {\r\n return new Angle((degrees * Math.PI) / 180.0);\r\n }\r\n}\r\n\r\n/**\r\n * This represents an arc in a 2d space.\r\n */\r\nexport class Arc2 {\r\n /**\r\n * Defines the center point of the arc.\r\n */\r\n public centerPoint: Vector2;\r\n /**\r\n * Defines the radius of the arc.\r\n */\r\n public radius: number;\r\n /**\r\n * Defines the angle of the arc (from mid point to end point).\r\n */\r\n public angle: Angle;\r\n /**\r\n * Defines the start angle of the arc (from start point to middle point).\r\n */\r\n public startAngle: Angle;\r\n /**\r\n * Defines the orientation of the arc (clock wise/counter clock wise).\r\n */\r\n public orientation: Orientation;\r\n\r\n /**\r\n * Creates an Arc object from the three given points : start, middle and end.\r\n * @param startPoint Defines the start point of the arc\r\n * @param midPoint Defines the middle point of the arc\r\n * @param endPoint Defines the end point of the arc\r\n */\r\n constructor(\r\n /** Defines the start point of the arc */\r\n public startPoint: Vector2,\r\n /** Defines the mid point of the arc */\r\n public midPoint: Vector2,\r\n /** Defines the end point of the arc */\r\n public endPoint: Vector2\r\n ) {\r\n const temp = Math.pow(midPoint.x, 2) + Math.pow(midPoint.y, 2);\r\n const startToMid = (Math.pow(startPoint.x, 2) + Math.pow(startPoint.y, 2) - temp) / 2;\r\n const midToEnd = (temp - Math.pow(endPoint.x, 2) - Math.pow(endPoint.y, 2)) / 2;\r\n const det = (startPoint.x - midPoint.x) * (midPoint.y - endPoint.y) - (midPoint.x - endPoint.x) * (startPoint.y - midPoint.y);\r\n\r\n this.centerPoint = new Vector2(\r\n (startToMid * (midPoint.y - endPoint.y) - midToEnd * (startPoint.y - midPoint.y)) / det,\r\n ((startPoint.x - midPoint.x) * midToEnd - (midPoint.x - endPoint.x) * startToMid) / det\r\n );\r\n\r\n this.radius = this.centerPoint.subtract(this.startPoint).length();\r\n\r\n this.startAngle = Angle.BetweenTwoPoints(this.centerPoint, this.startPoint);\r\n\r\n const a1 = this.startAngle.degrees();\r\n let a2 = Angle.BetweenTwoPoints(this.centerPoint, this.midPoint).degrees();\r\n let a3 = Angle.BetweenTwoPoints(this.centerPoint, this.endPoint).degrees();\r\n\r\n // angles correction\r\n if (a2 - a1 > +180.0) {\r\n a2 -= 360.0;\r\n }\r\n if (a2 - a1 < -180.0) {\r\n a2 += 360.0;\r\n }\r\n if (a3 - a2 > +180.0) {\r\n a3 -= 360.0;\r\n }\r\n if (a3 - a2 < -180.0) {\r\n a3 += 360.0;\r\n }\r\n\r\n this.orientation = a2 - a1 < 0 ? Orientation.CW : Orientation.CCW;\r\n this.angle = Angle.FromDegrees(this.orientation === Orientation.CW ? a1 - a3 : a3 - a1);\r\n }\r\n}\r\n\r\n/**\r\n * Represents a 2D path made up of multiple 2D points\r\n */\r\nexport class Path2 {\r\n private _points = new Array<Vector2>();\r\n private _length = 0.0;\r\n\r\n /**\r\n * If the path start and end point are the same\r\n */\r\n public closed = false;\r\n\r\n /**\r\n * Creates a Path2 object from the starting 2D coordinates x and y.\r\n * @param x the starting points x value\r\n * @param y the starting points y value\r\n */\r\n constructor(x: number, y: number) {\r\n this._points.push(new Vector2(x, y));\r\n }\r\n\r\n /**\r\n * Adds a new segment until the given coordinates (x, y) to the current Path2.\r\n * @param x the added points x value\r\n * @param y the added points y value\r\n * @returns the updated Path2.\r\n */\r\n public addLineTo(x: number, y: number): Path2 {\r\n if (this.closed) {\r\n return this;\r\n }\r\n const newPoint = new Vector2(x, y);\r\n const previousPoint = this._points[this._points.length - 1];\r\n this._points.push(newPoint);\r\n this._length += newPoint.subtract(previousPoint).length();\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds _numberOfSegments_ segments according to the arc definition (middle point coordinates, end point coordinates, the arc start point being the current Path2 last point) to the current Path2.\r\n * @param midX middle point x value\r\n * @param midY middle point y value\r\n * @param endX end point x value\r\n * @param endY end point y value\r\n * @param numberOfSegments (default: 36)\r\n * @returns the updated Path2.\r\n */\r\n public addArcTo(midX: number, midY: number, endX: number, endY: number, numberOfSegments = 36): Path2 {\r\n if (this.closed) {\r\n return this;\r\n }\r\n const startPoint = this._points[this._points.length - 1];\r\n const midPoint = new Vector2(midX, midY);\r\n const endPoint = new Vector2(endX, endY);\r\n\r\n const arc = new Arc2(startPoint, midPoint, endPoint);\r\n\r\n let increment = arc.angle.radians() / numberOfSegments;\r\n if (arc.orientation === Orientation.CW) {\r\n increment *= -1;\r\n }\r\n let currentAngle = arc.startAngle.radians() + increment;\r\n\r\n for (let i = 0; i < numberOfSegments; i++) {\r\n const x = Math.cos(currentAngle) * arc.radius + arc.centerPoint.x;\r\n const y = Math.sin(currentAngle) * arc.radius + arc.centerPoint.y;\r\n this.addLineTo(x, y);\r\n currentAngle += increment;\r\n }\r\n return this;\r\n }\r\n /**\r\n * Closes the Path2.\r\n * @returns the Path2.\r\n */\r\n public close(): Path2 {\r\n this.closed = true;\r\n return this;\r\n }\r\n /**\r\n * Gets the sum of the distance between each sequential point in the path\r\n * @returns the Path2 total length (float).\r\n */\r\n public length(): number {\r\n let result = this._length;\r\n\r\n if (this.closed) {\r\n const lastPoint = this._points[this._points.length - 1];\r\n const firstPoint = this._points[0];\r\n result += firstPoint.subtract(lastPoint).length();\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the points which construct the path\r\n * @returns the Path2 internal array of points.\r\n */\r\n public getPoints(): Vector2[] {\r\n return this._points;\r\n }\r\n\r\n /**\r\n * Retreives the point at the distance aways from the starting point\r\n * @param normalizedLengthPosition the length along the path to retrieve the point from\r\n * @returns a new Vector2 located at a percentage of the Path2 total length on this path.\r\n */\r\n public getPointAtLengthPosition(normalizedLengthPosition: number): Vector2 {\r\n if (normalizedLengthPosition < 0 || normalizedLengthPosition > 1) {\r\n return Vector2.Zero();\r\n }\r\n\r\n const lengthPosition = normalizedLengthPosition * this.length();\r\n\r\n let previousOffset = 0;\r\n for (let i = 0; i < this._points.length; i++) {\r\n const j = (i + 1) % this._points.length;\r\n\r\n const a = this._points[i];\r\n const b = this._points[j];\r\n const bToA = b.subtract(a);\r\n\r\n const nextOffset = bToA.length() + previousOffset;\r\n if (lengthPosition >= previousOffset && lengthPosition <= nextOffset) {\r\n const dir = bToA.normalize();\r\n const localOffset = lengthPosition - previousOffset;\r\n\r\n return new Vector2(a.x + dir.x * localOffset, a.y + dir.y * localOffset);\r\n }\r\n previousOffset = nextOffset;\r\n }\r\n\r\n return Vector2.Zero();\r\n }\r\n\r\n /**\r\n * Creates a new path starting from an x and y position\r\n * @param x starting x value\r\n * @param y starting y value\r\n * @returns a new Path2 starting at the coordinates (x, y).\r\n */\r\n public static StartingAt(x: number, y: number): Path2 {\r\n return new Path2(x, y);\r\n }\r\n}\r\n\r\n/**\r\n * Represents a 3D path made up of multiple 3D points\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/path3D\r\n */\r\nexport class Path3D {\r\n private _curve = new Array<Vector3>();\r\n private _distances = new Array<number>();\r\n private _tangents = new Array<Vector3>();\r\n private _normals = new Array<Vector3>();\r\n private _binormals = new Array<Vector3>();\r\n private _raw: boolean;\r\n private _alignTangentsWithPath: boolean;\r\n\r\n // holds interpolated point data\r\n private readonly _pointAtData = {\r\n id: 0,\r\n point: Vector3.Zero(),\r\n previousPointArrayIndex: 0,\r\n\r\n position: 0,\r\n subPosition: 0,\r\n\r\n interpolateReady: false,\r\n interpolationMatrix: Matrix.Identity(),\r\n };\r\n\r\n /**\r\n * new Path3D(path, normal, raw)\r\n * Creates a Path3D. A Path3D is a logical math object, so not a mesh.\r\n * please read the description in the tutorial : https://doc.babylonjs.com/features/featuresDeepDive/mesh/path3D\r\n * @param path an array of Vector3, the curve axis of the Path3D\r\n * @param firstNormal (options) Vector3, the first wanted normal to the curve. Ex (0, 1, 0) for a vertical normal.\r\n * @param raw (optional, default false) : boolean, if true the returned Path3D isn't normalized. Useful to depict path acceleration or speed.\r\n * @param alignTangentsWithPath (optional, default false) : boolean, if true the tangents will be aligned with the path.\r\n */\r\n constructor(\r\n /**\r\n * an array of Vector3, the curve axis of the Path3D\r\n */\r\n public path: Vector3[],\r\n firstNormal: Nullable<Vector3> = null,\r\n raw?: boolean,\r\n alignTangentsWithPath = false\r\n ) {\r\n for (let p = 0; p < path.length; p++) {\r\n this._curve[p] = path[p].clone(); // hard copy\r\n }\r\n this._raw = raw || false;\r\n this._alignTangentsWithPath = alignTangentsWithPath;\r\n this._compute(firstNormal, alignTangentsWithPath);\r\n }\r\n\r\n /**\r\n * Returns the Path3D array of successive Vector3 designing its curve.\r\n * @returns the Path3D array of successive Vector3 designing its curve.\r\n */\r\n public getCurve(): Vector3[] {\r\n return this._curve;\r\n }\r\n\r\n /**\r\n * Returns the Path3D array of successive Vector3 designing its curve.\r\n * @returns the Path3D array of successive Vector3 designing its curve.\r\n */\r\n public getPoints(): Vector3[] {\r\n return this._curve;\r\n }\r\n\r\n /**\r\n * @returns the computed length (float) of the path.\r\n */\r\n public length() {\r\n return this._distances[this._distances.length - 1];\r\n }\r\n\r\n /**\r\n * Returns an array populated with tangent vectors on each Path3D curve point.\r\n * @returns an array populated with tangent vectors on each Path3D curve point.\r\n */\r\n public getTangents(): Vector3[] {\r\n return this._tangents;\r\n }\r\n\r\n /**\r\n * Returns an array populated with normal vectors on each Path3D curve point.\r\n * @returns an array populated with normal vectors on each Path3D curve point.\r\n */\r\n public getNormals(): Vector3[] {\r\n return this._normals;\r\n }\r\n\r\n /**\r\n * Returns an array populated with binormal vectors on each Path3D curve point.\r\n * @returns an array populated with binormal vectors on each Path3D curve point.\r\n */\r\n public getBinormals(): Vector3[] {\r\n return this._binormals;\r\n }\r\n\r\n /**\r\n * Returns an array populated with distances (float) of the i-th point from the first curve point.\r\n * @returns an array populated with distances (float) of the i-th point from the first curve point.\r\n */\r\n public getDistances(): number[] {\r\n return this._distances;\r\n }\r\n\r\n /**\r\n * Returns an interpolated point along this path\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @returns a new Vector3 as the point\r\n */\r\n public getPointAt(position: number): Vector3 {\r\n return this._updatePointAtData(position).point;\r\n }\r\n\r\n /**\r\n * Returns the tangent vector of an interpolated Path3D curve point at the specified position along this path.\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated tangent instead of the tangent of the previous path point.\r\n * @returns a tangent vector corresponding to the interpolated Path3D curve point, if not interpolated, the tangent is taken from the precomputed tangents array.\r\n */\r\n public getTangentAt(position: number, interpolated = false): Vector3 {\r\n this._updatePointAtData(position, interpolated);\r\n return interpolated ? Vector3.TransformCoordinates(Vector3.Forward(), this._pointAtData.interpolationMatrix) : this._tangents[this._pointAtData.previousPointArrayIndex];\r\n }\r\n\r\n /**\r\n * Returns the tangent vector of an interpolated Path3D curve point at the specified position along this path.\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated normal instead of the normal of the previous path point.\r\n * @returns a normal vector corresponding to the interpolated Path3D curve point, if not interpolated, the normal is taken from the precomputed normals array.\r\n */\r\n public getNormalAt(position: number, interpolated = false): Vector3 {\r\n this._updatePointAtData(position, interpolated);\r\n return interpolated ? Vector3.TransformCoordinates(Vector3.Right(), this._pointAtData.interpolationMatrix) : this._normals[this._pointAtData.previousPointArrayIndex];\r\n }\r\n\r\n /**\r\n * Returns the binormal vector of an interpolated Path3D curve point at the specified position along this path.\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated binormal instead of the binormal of the previous path point.\r\n * @returns a binormal vector corresponding to the interpolated Path3D curve point, if not interpolated, the binormal is taken from the precomputed binormals array.\r\n */\r\n public getBinormalAt(position: number, interpolated = false): Vector3 {\r\n this._updatePointAtData(position, interpolated);\r\n return interpolated ? Vector3.TransformCoordinates(Vector3.UpReadOnly, this._pointAtData.interpolationMatrix) : this._binormals[this._pointAtData.previousPointArrayIndex];\r\n }\r\n\r\n /**\r\n * Returns the distance (float) of an interpolated Path3D curve point at the specified position along this path.\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @returns the distance of the interpolated Path3D curve point at the specified position along this path.\r\n */\r\n public getDistanceAt(position: number): number {\r\n return this.length() * position;\r\n }\r\n\r\n /**\r\n * Returns the array index of the previous point of an interpolated point along this path\r\n * @param position the position of the point to interpolate along this path, from 0.0 to 1.0\r\n * @returns the array index\r\n */\r\n public getPreviousPointIndexAt(position: number) {\r\n this._updatePointAtData(position);\r\n return this._pointAtData.previousPointArrayIndex;\r\n }\r\n\r\n /**\r\n * Returns the position of an interpolated point relative to the two path points it lies between, from 0.0 (point A) to 1.0 (point B)\r\n * @param position the position of the point to interpolate along this path, from 0.0 to 1.0\r\n * @returns the sub position\r\n */\r\n public getSubPositionAt(position: number) {\r\n this._updatePointAtData(position);\r\n return this._pointAtData.subPosition;\r\n }\r\n\r\n /**\r\n * Returns the position of the closest virtual point on this path to an arbitrary Vector3, from 0.0 to 1.0\r\n * @param target the vector of which to get the closest position to\r\n * @returns the position of the closest virtual point on this path to the target vector\r\n */\r\n public getClosestPositionTo(target: Vector3) {\r\n let smallestDistance = Number.MAX_VALUE;\r\n let closestPosition = 0.0;\r\n for (let i = 0; i < this._curve.length - 1; i++) {\r\n const point = this._curve[i + 0];\r\n const tangent = this._curve[i + 1].subtract(point).normalize();\r\n const subLength = this._distances[i + 1] - this._distances[i + 0];\r\n const subPosition = Math.min((Math.max(Vector3.Dot(tangent, target.subtract(point).normalize()), 0.0) * Vector3.Distance(point, target)) / subLength, 1.0);\r\n const distance = Vector3.Distance(point.add(tangent.scale(subPosition * subLength)), target);\r\n\r\n if (distance < smallestDistance) {\r\n smallestDistance = distance;\r\n closestPosition = (this._distances[i + 0] + subLength * subPosition) / this.length();\r\n }\r\n }\r\n return closestPosition;\r\n }\r\n\r\n /**\r\n * Returns a sub path (slice) of this path\r\n * @param start the position of the fist path point, from 0.0 to 1.0, or a negative value, which will get wrapped around from the end of the path to 0.0 to 1.0 values\r\n * @param end the position of the last path point, from 0.0 to 1.0, or a negative value, which will get wrapped around from the end of the path to 0.0 to 1.0 values\r\n * @returns a sub path (slice) of this path\r\n */\r\n public slice(start: number = 0.0, end: number = 1.0) {\r\n if (start < 0.0) {\r\n start = 1 - ((start * -1.0) % 1.0);\r\n }\r\n if (end < 0.0) {\r\n end = 1 - ((end * -1.0) % 1.0);\r\n }\r\n if (start > end) {\r\n const _start = start;\r\n start = end;\r\n end = _start;\r\n }\r\n const curvePoints = this.getCurve();\r\n\r\n const startPoint = this.getPointAt(start);\r\n let startIndex = this.getPreviousPointIndexAt(start);\r\n\r\n const endPoint = this.getPointAt(end);\r\n const endIndex = this.getPreviousPointIndexAt(end) + 1;\r\n\r\n const slicePoints: Vector3[] = [];\r\n if (start !== 0.0) {\r\n startIndex++;\r\n slicePoints.push(startPoint);\r\n }\r\n\r\n slicePoints.push(...curvePoints.slice(startIndex, endIndex));\r\n if (end !== 1.0 || start === 1.0) {\r\n slicePoints.push(endPoint);\r\n }\r\n return new Path3D(slicePoints, this.getNormalAt(start), this._raw, this._alignTangentsWithPath);\r\n }\r\n\r\n /**\r\n * Forces the Path3D tangent, normal, binormal and distance recomputation.\r\n * @param path path which all values are copied into the curves points\r\n * @param firstNormal which should be projected onto the curve\r\n * @param alignTangentsWithPath (optional, default false) : boolean, if true the tangents will be aligned with the path\r\n * @returns the same object updated.\r\n */\r\n public update(path: Vector3[], firstNormal: Nullable<Vector3> = null, alignTangentsWithPath = false): Path3D {\r\n for (let p = 0; p < path.length; p++) {\r\n this._curve[p].x = path[p].x;\r\n this._curve[p].y = path[p].y;\r\n this._curve[p].z = path[p].z;\r\n }\r\n this._compute(firstNormal, alignTangentsWithPath);\r\n return this;\r\n }\r\n\r\n // private function compute() : computes tangents, normals and binormals\r\n private _compute(firstNormal: Nullable<Vector3>, alignTangentsWithPath = false): void {\r\n const l = this._curve.length;\r\n\r\n if (l < 2) {\r\n return;\r\n }\r\n\r\n // first and last tangents\r\n this._tangents[0] = this._getFirstNonNullVector(0);\r\n if (!this._raw) {\r\n this._tangents[0].normalize();\r\n }\r\n this._tangents[l - 1] = this._curve[l - 1].subtract(this._curve[l - 2]);\r\n if (!this._raw) {\r\n this._tangents[l - 1].normalize();\r\n }\r\n\r\n // normals and binormals at first point : arbitrary vector with _normalVector()\r\n const tg0 = this._tangents[0];\r\n const pp0 = this._normalVector(tg0, firstNormal);\r\n this._normals[0] = pp0;\r\n if (!this._raw) {\r\n this._normals[0].normalize();\r\n }\r\n this._binormals[0] = Vector3.Cross(tg0, this._normals[0]);\r\n if (!this._raw) {\r\n this._binormals[0].normalize();\r\n }\r\n this._distances[0] = 0.0;\r\n\r\n // normals and binormals : next points\r\n let prev: Vector3; // previous vector (segment)\r\n let cur: Vector3; // current vector (segment)\r\n let curTang: Vector3; // current tangent\r\n // previous normal\r\n let prevNor: Vector3; // previous normal\r\n let prevBinor: Vector3; // previous binormal\r\n\r\n for (let i = 1; i < l; i++) {\r\n // tangents\r\n prev = this._getLastNonNullVector(i);\r\n if (i < l - 1) {\r\n cur = this._getFirstNonNullVector(i);\r\n this._tangents[i] = alignTangentsWithPath ? cur : prev.add(cur);\r\n this._tangents[i].normalize();\r\n }\r\n this._distances[i] = this._distances[i - 1] + this._curve[i].subtract(this._curve[i - 1]).length();\r\n\r\n // normals and binormals\r\n // http://www.cs.cmu.edu/afs/andrew/scs/cs/15-462/web/old/asst2camera.html\r\n curTang = this._tangents[i];\r\n prevBinor = this._binormals[i - 1];\r\n this._normals[i] = Vector3.Cross(prevBinor, curTang);\r\n if (!this._raw) {\r\n if (this._normals[i].length() === 0) {\r\n prevNor = this._normals[i - 1];\r\n this._normals[i] = prevNor.clone();\r\n } else {\r\n this._normals[i].normalize();\r\n }\r\n }\r\n this._binormals[i] = Vector3.Cross(curTang, this._normals[i]);\r\n if (!this._raw) {\r\n this._binormals[i].normalize();\r\n }\r\n }\r\n this._pointAtData.id = NaN;\r\n }\r\n\r\n // private function getFirstNonNullVector(index)\r\n // returns the first non null vector from index : curve[index + N].subtract(curve[index])\r\n private _getFirstNonNullVector(index: number): Vector3 {\r\n let i = 1;\r\n let nNVector: Vector3 = this._curve[index + i].subtract(this._curve[index]);\r\n while (nNVector.length() === 0 && index + i + 1 < this._curve.length) {\r\n i++;\r\n nNVector = this._curve[index + i].subtract(this._curve[index]);\r\n }\r\n return nNVector;\r\n }\r\n\r\n // private function getLastNonNullVector(index)\r\n // returns the last non null vector from index : curve[index].subtract(curve[index - N])\r\n private _getLastNonNullVector(index: number): Vector3 {\r\n let i = 1;\r\n let nLVector: Vector3 = this._curve[index].subtract(this._curve[index - i]);\r\n while (nLVector.length() === 0 && index > i + 1) {\r\n i++;\r\n nLVector = this._curve[index].subtract(this._curve[index - i]);\r\n }\r\n return nLVector;\r\n }\r\n\r\n // private function normalVector(v0, vt, va) :\r\n // returns an arbitrary point in the plane defined by the point v0 and the vector vt orthogonal to this plane\r\n // if va is passed, it returns the va projection on the plane orthogonal to vt at the point v0\r\n private _normalVector(vt: Vector3, va: Nullable<Vector3>): Vector3 {\r\n let normal0: Vector3;\r\n let tgl = vt.length();\r\n if (tgl === 0.0) {\r\n tgl = 1.0;\r\n }\r\n\r\n if (va === undefined || va === null) {\r\n let point: Vector3;\r\n if (!Scalar.WithinEpsilon(Math.abs(vt.y) / tgl, 1.0, Epsilon)) {\r\n // search for a point in the plane\r\n point = new Vector3(0.0, -1.0, 0.0);\r\n } else if (!Scalar.WithinEpsilon(Math.abs(vt.x) / tgl, 1.0, Epsilon)) {\r\n point = new Vector3(1.0, 0.0, 0.0);\r\n } else if (!Scalar.WithinEpsilon(Math.abs(vt.z) / tgl, 1.0, Epsilon)) {\r\n point = new Vector3(0.0, 0.0, 1.0);\r\n } else {\r\n point = Vector3.Zero();\r\n }\r\n normal0 = Vector3.Cross(vt, point);\r\n } else {\r\n normal0 = Vector3.Cross(vt, va);\r\n Vector3.CrossToRef(normal0, vt, normal0);\r\n }\r\n normal0.normalize();\r\n return normal0;\r\n }\r\n\r\n /**\r\n * Updates the point at data for an interpolated point along this curve\r\n * @param position the position of the point along this curve, from 0.0 to 1.0\r\n * @param interpolateTNB\r\n * @interpolateTNB whether to compute the interpolated tangent, normal and binormal\r\n * @returns the (updated) point at data\r\n */\r\n private _updatePointAtData(position: number, interpolateTNB: boolean = false) {\r\n // set an id for caching the result\r\n if (this._pointAtData.id === position) {\r\n if (!this._pointAtData.interpolateReady) {\r\n this._updateInterpolationMatrix();\r\n }\r\n return this._pointAtData;\r\n } else {\r\n this._pointAtData.id = position;\r\n }\r\n const curvePoints = this.getPoints();\r\n\r\n // clamp position between 0.0 and 1.0\r\n if (position <= 0.0) {\r\n return this._setPointAtData(0.0, 0.0, curvePoints[0], 0, interpolateTNB);\r\n } else if (position >= 1.0) {\r\n return this._setPointAtData(1.0, 1.0, curvePoints[curvePoints.length - 1], curvePoints.length - 1, interpolateTNB);\r\n }\r\n\r\n let previousPoint: Vector3 = curvePoints[0];\r\n let currentPoint: Vector3;\r\n let currentLength = 0.0;\r\n const targetLength = position * this.length();\r\n\r\n for (let i = 1; i < curvePoints.length; i++) {\r\n currentPoint = curvePoints[i];\r\n const distance = Vector3.Distance(previousPoint, currentPoint);\r\n currentLength += distance;\r\n if (currentLength === targetLength) {\r\n return this._setPointAtData(position, 1.0, currentPoint, i, interpolateTNB);\r\n } else if (currentLength > targetLength) {\r\n const toLength = currentLength - targetLength;\r\n const diff = toLength / distance;\r\n const dir = previousPoint.subtract(currentPoint);\r\n const point = currentPoint.add(dir.scaleInPlace(diff));\r\n return this._setPointAtData(position, 1 - diff, point, i - 1, interpolateTNB);\r\n }\r\n previousPoint = currentPoint;\r\n }\r\n return this._pointAtData;\r\n }\r\n\r\n /**\r\n * Updates the point at data from the specified parameters\r\n * @param position where along the path the interpolated point is, from 0.0 to 1.0\r\n * @param subPosition\r\n * @param point the interpolated point\r\n * @param parentIndex the index of an existing curve point that is on, or else positionally the first behind, the interpolated point\r\n * @param interpolateTNB\r\n */\r\n private _setPointAtData(position: number, subPosition: number, point: Vector3, parentIndex: number, interpolateTNB: boolean) {\r\n this._pointAtData.point = point;\r\n this._pointAtData.position = position;\r\n this._pointAtData.subPosition = subPosition;\r\n this._pointAtData.previousPointArrayIndex = parentIndex;\r\n this._pointAtData.interpolateReady = interpolateTNB;\r\n\r\n if (interpolateTNB) {\r\n this._updateInterpolationMatrix();\r\n }\r\n return this._pointAtData;\r\n }\r\n\r\n /**\r\n * Updates the point at interpolation matrix for the tangents, normals and binormals\r\n */\r\n private _updateInterpolationMatrix() {\r\n this._pointAtData.interpolationMatrix = Matrix.Identity();\r\n const parentIndex = this._pointAtData.previousPointArrayIndex;\r\n\r\n if (parentIndex !== this._tangents.length - 1) {\r\n const index = parentIndex + 1;\r\n\r\n const tangentFrom = this._tangents[parentIndex].clone();\r\n const normalFrom = this._normals[parentIndex].clone();\r\n const binormalFrom = this._binormals[parentIndex].clone();\r\n\r\n const tangentTo = this._tangents[index].clone();\r\n const normalTo = this._normals[index].clone();\r\n const binormalTo = this._binormals[index].clone();\r\n\r\n const quatFrom = Quaternion.RotationQuaternionFromAxis(normalFrom, binormalFrom, tangentFrom);\r\n const quatTo = Quaternion.RotationQuaternionFromAxis(normalTo, binormalTo, tangentTo);\r\n const quatAt = Quaternion.Slerp(quatFrom, quatTo, this._pointAtData.subPosition);\r\n\r\n quatAt.toRotationMatrix(this._pointAtData.interpolationMatrix);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.\r\n * A Curve3 is designed from a series of successive Vector3.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves\r\n */\r\nexport class Curve3 {\r\n private _points: Vector3[];\r\n private _length: number = 0.0;\r\n\r\n /**\r\n * Returns a Curve3 object along a Quadratic Bezier curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#quadratic-bezier-curve\r\n * @param v0 (Vector3) the origin point of the Quadratic Bezier\r\n * @param v1 (Vector3) the control point\r\n * @param v2 (Vector3) the end point of the Quadratic Bezier\r\n * @param nbPoints (integer) the wanted number of points in the curve\r\n * @returns the created Curve3\r\n */\r\n public static CreateQuadraticBezier(v0: DeepImmutable<Vector3>, v1: DeepImmutable<Vector3>, v2: DeepImmutable<Vector3>, nbPoints: number): Curve3 {\r\n nbPoints = nbPoints > 2 ? nbPoints : 3;\r\n const bez = new Array<Vector3>();\r\n const equation = (t: number, val0: number, val1: number, val2: number) => {\r\n const res = (1.0 - t) * (1.0 - t) * val0 + 2.0 * t * (1.0 - t) * val1 + t * t * val2;\r\n return res;\r\n };\r\n for (let i = 0; i <= nbPoints; i++) {\r\n bez.push(new Vector3(equation(i / nbPoints, v0.x, v1.x, v2.x), equation(i / nbPoints, v0.y, v1.y, v2.y), equation(i / nbPoints, v0.z, v1.z, v2.z)));\r\n }\r\n return new Curve3(bez);\r\n }\r\n\r\n /**\r\n * Returns a Curve3 object along a Cubic Bezier curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#cubic-bezier-curve\r\n * @param v0 (Vector3) the origin point of the Cubic Bezier\r\n * @param v1 (Vector3) the first control point\r\n * @param v2 (Vector3) the second control point\r\n * @param v3 (Vector3) the end point of the Cubic Bezier\r\n * @param nbPoints (integer) the wanted number of points in the curve\r\n * @returns the created Curve3\r\n */\r\n public static CreateCubicBezier(v0: DeepImmutable<Vector3>, v1: DeepImmutable<Vector3>, v2: DeepImmutable<Vector3>, v3: DeepImmutable<Vector3>, nbPoints: number): Curve3 {\r\n nbPoints = nbPoints > 3 ? nbPoints : 4;\r\n const bez = new Array<Vector3>();\r\n const equation = (t: number, val0: number, val1: number, val2: number, val3: number) => {\r\n const res = (1.0 - t) * (1.0 - t) * (1.0 - t) * val0 + 3.0 * t * (1.0 - t) * (1.0 - t) * val1 + 3.0 * t * t * (1.0 - t) * val2 + t * t * t * val3;\r\n return res;\r\n };\r\n for (let i = 0; i <= nbPoints; i++) {\r\n bez.push(new Vector3(equation(i / nbPoints, v0.x, v1.x, v2.x, v3.x), equation(i / nbPoints, v0.y, v1.y, v2.y, v3.y), equation(i / nbPoints, v0.z, v1.z, v2.z, v3.z)));\r\n }\r\n return new Curve3(bez);\r\n }\r\n\r\n /**\r\n * Returns a Curve3 object along a Hermite Spline curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#hermite-spline\r\n * @param p1 (Vector3) the origin point of the Hermite Spline\r\n * @param t1 (Vector3) the tangent vector at the origin point\r\n * @param p2 (Vector3) the end point of the Hermite Spline\r\n * @param t2 (Vector3) the tangent vector at the end point\r\n * @param nSeg (integer) the number of curve segments or nSeg + 1 points in the array\r\n * @returns the created Curve3\r\n */\r\n public static CreateHermiteSpline(p1: DeepImmutable<Vector3>, t1: DeepImmutable<Vector3>, p2: DeepImmutable<Vector3>, t2: DeepImmutable<Vector3>, nSeg: number): Curve3 {\r\n const hermite = new Array<Vector3>();\r\n const step = 1.0 / nSeg;\r\n for (let i = 0; i <= nSeg; i++) {\r\n hermite.push(Vector3.Hermite(p1, t1, p2, t2, i * step));\r\n }\r\n return new Curve3(hermite);\r\n }\r\n\r\n /**\r\n * Returns a Curve3 object along a CatmullRom Spline curve :\r\n * @param points (array of Vector3) the points the spline must pass through. At least, four points required\r\n * @param nbPoints (integer) the wanted number of points between each curve control points\r\n * @param closed (boolean) optional with default false, when true forms a closed loop from the points\r\n * @returns the created Curve3\r\n */\r\n public static CreateCatmullRomSpline(points: DeepImmutable<Vector3[]>, nbPoints: number, closed?: boolean): Curve3 {\r\n const catmullRom = new Array<Vector3>();\r\n const step = 1.0 / nbPoints;\r\n let amount = 0.0;\r\n if (closed) {\r\n const pointsCount = points.length;\r\n for (let i = 0; i < pointsCount; i++) {\r\n amount = 0;\r\n for (let c = 0; c < nbPoints; c++) {\r\n catmullRom.push(\r\n Vector3.CatmullRom(points[i % pointsCount], points[(i + 1) % pointsCount], points[(i + 2) % pointsCount], points[(i + 3) % pointsCount], amount)\r\n );\r\n amount += step;\r\n }\r\n }\r\n catmullRom.push(catmullRom[0]);\r\n } else {\r\n const totalPoints = new Array<Vector3>();\r\n totalPoints.push(points[0].clone());\r\n Array.prototype.push.apply(totalPoints, points);\r\n totalPoints.push(points[points.length - 1].clone());\r\n let i = 0;\r\n for (; i < totalPoints.length - 3; i++) {\r\n amount = 0;\r\n for (let c = 0; c < nbPoints; c++) {\r\n catmullRom.push(Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));\r\n amount += step;\r\n }\r\n }\r\n i--;\r\n catmullRom.push(Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));\r\n }\r\n return new Curve3(catmullRom);\r\n }\r\n\r\n /**\r\n * Returns a Curve3 object along an arc through three vector3 points:\r\n * The three points should not be colinear. When they are the Curve3 is empty.\r\n * @param first (Vector3) the first point the arc must pass through.\r\n * @param second (Vector3) the second point the arc must pass through.\r\n * @param third (Vector3) the third point the arc must pass through.\r\n * @param steps (number) the larger the number of steps the more detailed the arc.\r\n * @param closed (boolean) optional with default false, when true forms the chord from the first and third point\r\n * @param fullCircle Circle (boolean) optional with default false, when true forms the complete circle through the three points\r\n * @returns the created Curve3\r\n */\r\n public static ArcThru3Points(first: Vector3, second: Vector3, third: Vector3, steps: number = 32, closed: boolean = false, fullCircle: boolean = false): Curve3 {\r\n const arc = new Array<Vector3>();\r\n const vec1 = second.subtract(first);\r\n const vec2 = third.subtract(second);\r\n const vec3 = first.subtract(third);\r\n const zAxis = Vector3.Cross(vec1, vec2);\r\n const len4 = zAxis.length();\r\n if (len4 < Math.pow(10, -8)) {\r\n return new Curve3(arc); // colinear points arc is empty\r\n }\r\n const len1_sq = vec1.lengthSquared();\r\n const len2_sq = vec2.lengthSquared();\r\n const len3_sq = vec3.lengthSquared();\r\n const len4_sq = zAxis.lengthSquared();\r\n const len1 = vec1.length();\r\n const len2 = vec2.length();\r\n const len3 = vec3.length();\r\n const radius = (0.5 * len1 * len2 * len3) / len4;\r\n const dot1 = Vector3.Dot(vec1, vec3);\r\n const dot2 = Vector3.Dot(vec1, vec2);\r\n const dot3 = Vector3.Dot(vec2, vec3);\r\n const a = (-0.5 * len2_sq * dot1) / len4_sq;\r\n const b = (-0.5 * len3_sq * dot2) / len4_sq;\r\n const c = (-0.5 * len1_sq * dot3) / len4_sq;\r\n const center = first.scale(a).add(second.scale(b)).add(third.scale(c));\r\n const radiusVec = first.subtract(center);\r\n const xAxis = radiusVec.normalize();\r\n const yAxis = Vector3.Cross(zAxis, xAxis).normalize();\r\n if (fullCircle) {\r\n const dStep = (2 * Math.PI) / steps;\r\n for (let theta = 0; theta <= 2 * Math.PI; theta += dStep) {\r\n arc.push(center.add(xAxis.scale(radius * Math.cos(theta)).add(yAxis.scale(radius * Math.sin(theta)))));\r\n }\r\n arc.push(first);\r\n } else {\r\n const dStep = 1 / steps;\r\n let theta = 0;\r\n let point = Vector3.Zero();\r\n do {\r\n point = center.add(xAxis.scale(radius * Math.cos(theta)).add(yAxis.scale(radius * Math.sin(theta))));\r\n arc.push(point);\r\n theta += dStep;\r\n } while (!point.equalsWithEpsilon(third, radius * dStep * 1.1));\r\n arc.push(third);\r\n if (closed) {\r\n arc.push(first);\r\n }\r\n }\r\n return new Curve3(arc);\r\n }\r\n\r\n /**\r\n * A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.\r\n * A Curve3 is designed from a series of successive Vector3.\r\n * Tuto : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#curve3-object\r\n * @param points points which make up the curve\r\n */\r\n constructor(points: Vector3[]) {\r\n this._points = points;\r\n this._length = this._computeLength(points);\r\n }\r\n\r\n /**\r\n * @returns the Curve3 stored array of successive Vector3\r\n */\r\n public getPoints() {\r\n return this._points;\r\n }\r\n\r\n /**\r\n * @returns the computed length (float) of the curve.\r\n */\r\n public length() {\r\n return this._length;\r\n }\r\n\r\n /**\r\n * Returns a new instance of Curve3 object : var curve = curveA.continue(curveB);\r\n * This new Curve3 is built by translating and sticking the curveB at the end of the curveA.\r\n * curveA and curveB keep unchanged.\r\n * @param curve the curve to continue from this curve\r\n * @returns the newly constructed curve\r\n */\r\n public continue(curve: DeepImmutable<Curve3>): Curve3 {\r\n const lastPoint = this._points[this._points.length - 1];\r\n const continuedPoints = this._points.slice();\r\n const curvePoints = curve.getPoints();\r\n for (let i = 1; i < curvePoints.length; i++) {\r\n continuedPoints.push(curvePoints[i].subtract(curvePoints[0]).add(lastPoint));\r\n }\r\n const continuedCurve = new Curve3(continuedPoints);\r\n return continuedCurve;\r\n }\r\n\r\n private _computeLength(path: DeepImmutable<Vector3[]>): number {\r\n let l = 0;\r\n for (let i = 1; i < path.length; i++) {\r\n l += path[i].subtract(path[i - 1]).length();\r\n }\r\n return l;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"math.path.js","sourceRoot":"","sources":["../../../../lts/core/generated/Maths/math.path.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAN,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB;;OAEG;IACH,yCAAM,CAAA;IACN,wBAAwB;IACxB,2CAAO,CAAA;AACX,CAAC,EAPW,WAAW,KAAX,WAAW,QAOtB;AAED,6CAA6C;AAC7C,MAAM,OAAO,WAAW;IACpB;;;;;;;;OAQG;IACI,MAAM,CAAC,WAAW,CAAC,CAAS,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;QAC/E,0CAA0C;QAC1C,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;QAC/B,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,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I,MAAM;QACT,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;;;;;OAMG;IACI,QAAQ,CAAC,KAA4B;QACxC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACxD,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;QAC7C,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACzC,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;SAChF;QACD,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC;QACnD,OAAO,cAAc,CAAC;IAC1B,CAAC;IAEO,cAAc,CAAC,IAA8B;QACjD,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAClC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SAC/C;QACD,OAAO,CAAC,CAAC;IACb,CAAC;CACJ","sourcesContent":["import type { DeepImmutable, Nullable } from \"../types\";\r\nimport { Scalar } from \"./math.scalar\";\r\nimport { Vector2, Vector3, Quaternion, Matrix } from \"./math.vector\";\r\nimport { Epsilon } from \"./math.constants\";\r\n\r\n/**\r\n * Defines potential orientation for back face culling\r\n */\r\nexport enum Orientation {\r\n /**\r\n * Clockwise\r\n */\r\n CW = 0,\r\n /** Counter clockwise */\r\n CCW = 1,\r\n}\r\n\r\n/** Class used to represent a Bezier curve */\r\nexport class BezierCurve {\r\n /**\r\n * Returns the cubic Bezier interpolated value (float) at \"t\" (float) from the given x1, y1, x2, y2 floats\r\n * @param t defines the time\r\n * @param x1 defines the left coordinate on X axis\r\n * @param y1 defines the left coordinate on Y axis\r\n * @param x2 defines the right coordinate on X axis\r\n * @param y2 defines the right coordinate on Y axis\r\n * @returns the interpolated value\r\n */\r\n public static Interpolate(t: number, x1: number, y1: number, x2: number, y2: number): number {\r\n // Extract X (which is equal to time here)\r\n const f0 = 1 - 3 * x2 + 3 * x1;\r\n const f1 = 3 * x2 - 6 * x1;\r\n const f2 = 3 * x1;\r\n\r\n let refinedT = t;\r\n for (let i = 0; i < 5; i++) {\r\n const refinedT2 = refinedT * refinedT;\r\n const refinedT3 = refinedT2 * refinedT;\r\n\r\n const x = f0 * refinedT3 + f1 * refinedT2 + f2 * refinedT;\r\n const slope = 1.0 / (3.0 * f0 * refinedT2 + 2.0 * f1 * refinedT + f2);\r\n refinedT -= (x - t) * slope;\r\n refinedT = Math.min(1, Math.max(0, refinedT));\r\n }\r\n\r\n // Resolve cubic bezier for the given x\r\n return 3 * Math.pow(1 - refinedT, 2) * refinedT * y1 + 3 * (1 - refinedT) * Math.pow(refinedT, 2) * y2 + Math.pow(refinedT, 3);\r\n }\r\n}\r\n\r\n/**\r\n * Defines angle representation\r\n */\r\nexport class Angle {\r\n private _radians: number;\r\n\r\n /**\r\n * Creates an Angle object of \"radians\" radians (float).\r\n * @param radians the angle in radians\r\n */\r\n constructor(radians: number) {\r\n this._radians = radians;\r\n if (this._radians < 0.0) {\r\n this._radians += 2.0 * Math.PI;\r\n }\r\n }\r\n\r\n /**\r\n * Get value in degrees\r\n * @returns the Angle value in degrees (float)\r\n */\r\n public degrees() {\r\n return (this._radians * 180.0) / Math.PI;\r\n }\r\n\r\n /**\r\n * Get value in radians\r\n * @returns the Angle value in radians (float)\r\n */\r\n public radians() {\r\n return this._radians;\r\n }\r\n\r\n /**\r\n * Gets a new Angle object valued with the gradient angle, in radians, of the line joining two points\r\n * @param a defines first point as the origin\r\n * @param b defines point\r\n * @returns a new Angle\r\n */\r\n public static BetweenTwoPoints(a: DeepImmutable<Vector2>, b: DeepImmutable<Vector2>): Angle {\r\n const delta = b.subtract(a);\r\n const theta = Math.atan2(delta.y, delta.x);\r\n return new Angle(theta);\r\n }\r\n\r\n /**\r\n * Gets a new Angle object from the given float in radians\r\n * @param radians defines the angle value in radians\r\n * @returns a new Angle\r\n */\r\n public static FromRadians(radians: number): Angle {\r\n return new Angle(radians);\r\n }\r\n /**\r\n * Gets a new Angle object from the given float in degrees\r\n * @param degrees defines the angle value in degrees\r\n * @returns a new Angle\r\n */\r\n public static FromDegrees(degrees: number): Angle {\r\n return new Angle((degrees * Math.PI) / 180.0);\r\n }\r\n}\r\n\r\n/**\r\n * This represents an arc in a 2d space.\r\n */\r\nexport class Arc2 {\r\n /**\r\n * Defines the center point of the arc.\r\n */\r\n public centerPoint: Vector2;\r\n /**\r\n * Defines the radius of the arc.\r\n */\r\n public radius: number;\r\n /**\r\n * Defines the angle of the arc (from mid point to end point).\r\n */\r\n public angle: Angle;\r\n /**\r\n * Defines the start angle of the arc (from start point to middle point).\r\n */\r\n public startAngle: Angle;\r\n /**\r\n * Defines the orientation of the arc (clock wise/counter clock wise).\r\n */\r\n public orientation: Orientation;\r\n\r\n /**\r\n * Creates an Arc object from the three given points : start, middle and end.\r\n * @param startPoint Defines the start point of the arc\r\n * @param midPoint Defines the middle point of the arc\r\n * @param endPoint Defines the end point of the arc\r\n */\r\n constructor(\r\n /** Defines the start point of the arc */\r\n public startPoint: Vector2,\r\n /** Defines the mid point of the arc */\r\n public midPoint: Vector2,\r\n /** Defines the end point of the arc */\r\n public endPoint: Vector2\r\n ) {\r\n const temp = Math.pow(midPoint.x, 2) + Math.pow(midPoint.y, 2);\r\n const startToMid = (Math.pow(startPoint.x, 2) + Math.pow(startPoint.y, 2) - temp) / 2;\r\n const midToEnd = (temp - Math.pow(endPoint.x, 2) - Math.pow(endPoint.y, 2)) / 2;\r\n const det = (startPoint.x - midPoint.x) * (midPoint.y - endPoint.y) - (midPoint.x - endPoint.x) * (startPoint.y - midPoint.y);\r\n\r\n this.centerPoint = new Vector2(\r\n (startToMid * (midPoint.y - endPoint.y) - midToEnd * (startPoint.y - midPoint.y)) / det,\r\n ((startPoint.x - midPoint.x) * midToEnd - (midPoint.x - endPoint.x) * startToMid) / det\r\n );\r\n\r\n this.radius = this.centerPoint.subtract(this.startPoint).length();\r\n\r\n this.startAngle = Angle.BetweenTwoPoints(this.centerPoint, this.startPoint);\r\n\r\n const a1 = this.startAngle.degrees();\r\n let a2 = Angle.BetweenTwoPoints(this.centerPoint, this.midPoint).degrees();\r\n let a3 = Angle.BetweenTwoPoints(this.centerPoint, this.endPoint).degrees();\r\n\r\n // angles correction\r\n if (a2 - a1 > +180.0) {\r\n a2 -= 360.0;\r\n }\r\n if (a2 - a1 < -180.0) {\r\n a2 += 360.0;\r\n }\r\n if (a3 - a2 > +180.0) {\r\n a3 -= 360.0;\r\n }\r\n if (a3 - a2 < -180.0) {\r\n a3 += 360.0;\r\n }\r\n\r\n this.orientation = a2 - a1 < 0 ? Orientation.CW : Orientation.CCW;\r\n this.angle = Angle.FromDegrees(this.orientation === Orientation.CW ? a1 - a3 : a3 - a1);\r\n }\r\n}\r\n\r\n/**\r\n * Represents a 2D path made up of multiple 2D points\r\n */\r\nexport class Path2 {\r\n private _points = new Array<Vector2>();\r\n private _length = 0.0;\r\n\r\n /**\r\n * If the path start and end point are the same\r\n */\r\n public closed = false;\r\n\r\n /**\r\n * Creates a Path2 object from the starting 2D coordinates x and y.\r\n * @param x the starting points x value\r\n * @param y the starting points y value\r\n */\r\n constructor(x: number, y: number) {\r\n this._points.push(new Vector2(x, y));\r\n }\r\n\r\n /**\r\n * Adds a new segment until the given coordinates (x, y) to the current Path2.\r\n * @param x the added points x value\r\n * @param y the added points y value\r\n * @returns the updated Path2.\r\n */\r\n public addLineTo(x: number, y: number): Path2 {\r\n if (this.closed) {\r\n return this;\r\n }\r\n const newPoint = new Vector2(x, y);\r\n const previousPoint = this._points[this._points.length - 1];\r\n this._points.push(newPoint);\r\n this._length += newPoint.subtract(previousPoint).length();\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds _numberOfSegments_ segments according to the arc definition (middle point coordinates, end point coordinates, the arc start point being the current Path2 last point) to the current Path2.\r\n * @param midX middle point x value\r\n * @param midY middle point y value\r\n * @param endX end point x value\r\n * @param endY end point y value\r\n * @param numberOfSegments (default: 36)\r\n * @returns the updated Path2.\r\n */\r\n public addArcTo(midX: number, midY: number, endX: number, endY: number, numberOfSegments = 36): Path2 {\r\n if (this.closed) {\r\n return this;\r\n }\r\n const startPoint = this._points[this._points.length - 1];\r\n const midPoint = new Vector2(midX, midY);\r\n const endPoint = new Vector2(endX, endY);\r\n\r\n const arc = new Arc2(startPoint, midPoint, endPoint);\r\n\r\n let increment = arc.angle.radians() / numberOfSegments;\r\n if (arc.orientation === Orientation.CW) {\r\n increment *= -1;\r\n }\r\n let currentAngle = arc.startAngle.radians() + increment;\r\n\r\n for (let i = 0; i < numberOfSegments; i++) {\r\n const x = Math.cos(currentAngle) * arc.radius + arc.centerPoint.x;\r\n const y = Math.sin(currentAngle) * arc.radius + arc.centerPoint.y;\r\n this.addLineTo(x, y);\r\n currentAngle += increment;\r\n }\r\n return this;\r\n }\r\n /**\r\n * Closes the Path2.\r\n * @returns the Path2.\r\n */\r\n public close(): Path2 {\r\n this.closed = true;\r\n return this;\r\n }\r\n /**\r\n * Gets the sum of the distance between each sequential point in the path\r\n * @returns the Path2 total length (float).\r\n */\r\n public length(): number {\r\n let result = this._length;\r\n\r\n if (this.closed) {\r\n const lastPoint = this._points[this._points.length - 1];\r\n const firstPoint = this._points[0];\r\n result += firstPoint.subtract(lastPoint).length();\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the points which construct the path\r\n * @returns the Path2 internal array of points.\r\n */\r\n public getPoints(): Vector2[] {\r\n return this._points;\r\n }\r\n\r\n /**\r\n * Retreives the point at the distance aways from the starting point\r\n * @param normalizedLengthPosition the length along the path to retrieve the point from\r\n * @returns a new Vector2 located at a percentage of the Path2 total length on this path.\r\n */\r\n public getPointAtLengthPosition(normalizedLengthPosition: number): Vector2 {\r\n if (normalizedLengthPosition < 0 || normalizedLengthPosition > 1) {\r\n return Vector2.Zero();\r\n }\r\n\r\n const lengthPosition = normalizedLengthPosition * this.length();\r\n\r\n let previousOffset = 0;\r\n for (let i = 0; i < this._points.length; i++) {\r\n const j = (i + 1) % this._points.length;\r\n\r\n const a = this._points[i];\r\n const b = this._points[j];\r\n const bToA = b.subtract(a);\r\n\r\n const nextOffset = bToA.length() + previousOffset;\r\n if (lengthPosition >= previousOffset && lengthPosition <= nextOffset) {\r\n const dir = bToA.normalize();\r\n const localOffset = lengthPosition - previousOffset;\r\n\r\n return new Vector2(a.x + dir.x * localOffset, a.y + dir.y * localOffset);\r\n }\r\n previousOffset = nextOffset;\r\n }\r\n\r\n return Vector2.Zero();\r\n }\r\n\r\n /**\r\n * Creates a new path starting from an x and y position\r\n * @param x starting x value\r\n * @param y starting y value\r\n * @returns a new Path2 starting at the coordinates (x, y).\r\n */\r\n public static StartingAt(x: number, y: number): Path2 {\r\n return new Path2(x, y);\r\n }\r\n}\r\n\r\n/**\r\n * Represents a 3D path made up of multiple 3D points\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/path3D\r\n */\r\nexport class Path3D {\r\n private _curve = new Array<Vector3>();\r\n private _distances = new Array<number>();\r\n private _tangents = new Array<Vector3>();\r\n private _normals = new Array<Vector3>();\r\n private _binormals = new Array<Vector3>();\r\n private _raw: boolean;\r\n private _alignTangentsWithPath: boolean;\r\n\r\n // holds interpolated point data\r\n private readonly _pointAtData = {\r\n id: 0,\r\n point: Vector3.Zero(),\r\n previousPointArrayIndex: 0,\r\n\r\n position: 0,\r\n subPosition: 0,\r\n\r\n interpolateReady: false,\r\n interpolationMatrix: Matrix.Identity(),\r\n };\r\n\r\n /**\r\n * new Path3D(path, normal, raw)\r\n * Creates a Path3D. A Path3D is a logical math object, so not a mesh.\r\n * please read the description in the tutorial : https://doc.babylonjs.com/features/featuresDeepDive/mesh/path3D\r\n * @param path an array of Vector3, the curve axis of the Path3D\r\n * @param firstNormal (options) Vector3, the first wanted normal to the curve. Ex (0, 1, 0) for a vertical normal.\r\n * @param raw (optional, default false) : boolean, if true the returned Path3D isn't normalized. Useful to depict path acceleration or speed.\r\n * @param alignTangentsWithPath (optional, default false) : boolean, if true the tangents will be aligned with the path.\r\n */\r\n constructor(\r\n /**\r\n * an array of Vector3, the curve axis of the Path3D\r\n */\r\n public path: Vector3[],\r\n firstNormal: Nullable<Vector3> = null,\r\n raw?: boolean,\r\n alignTangentsWithPath = false\r\n ) {\r\n for (let p = 0; p < path.length; p++) {\r\n this._curve[p] = path[p].clone(); // hard copy\r\n }\r\n this._raw = raw || false;\r\n this._alignTangentsWithPath = alignTangentsWithPath;\r\n this._compute(firstNormal, alignTangentsWithPath);\r\n }\r\n\r\n /**\r\n * Returns the Path3D array of successive Vector3 designing its curve.\r\n * @returns the Path3D array of successive Vector3 designing its curve.\r\n */\r\n public getCurve(): Vector3[] {\r\n return this._curve;\r\n }\r\n\r\n /**\r\n * Returns the Path3D array of successive Vector3 designing its curve.\r\n * @returns the Path3D array of successive Vector3 designing its curve.\r\n */\r\n public getPoints(): Vector3[] {\r\n return this._curve;\r\n }\r\n\r\n /**\r\n * @returns the computed length (float) of the path.\r\n */\r\n public length() {\r\n return this._distances[this._distances.length - 1];\r\n }\r\n\r\n /**\r\n * Returns an array populated with tangent vectors on each Path3D curve point.\r\n * @returns an array populated with tangent vectors on each Path3D curve point.\r\n */\r\n public getTangents(): Vector3[] {\r\n return this._tangents;\r\n }\r\n\r\n /**\r\n * Returns an array populated with normal vectors on each Path3D curve point.\r\n * @returns an array populated with normal vectors on each Path3D curve point.\r\n */\r\n public getNormals(): Vector3[] {\r\n return this._normals;\r\n }\r\n\r\n /**\r\n * Returns an array populated with binormal vectors on each Path3D curve point.\r\n * @returns an array populated with binormal vectors on each Path3D curve point.\r\n */\r\n public getBinormals(): Vector3[] {\r\n return this._binormals;\r\n }\r\n\r\n /**\r\n * Returns an array populated with distances (float) of the i-th point from the first curve point.\r\n * @returns an array populated with distances (float) of the i-th point from the first curve point.\r\n */\r\n public getDistances(): number[] {\r\n return this._distances;\r\n }\r\n\r\n /**\r\n * Returns an interpolated point along this path\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @returns a new Vector3 as the point\r\n */\r\n public getPointAt(position: number): Vector3 {\r\n return this._updatePointAtData(position).point;\r\n }\r\n\r\n /**\r\n * Returns the tangent vector of an interpolated Path3D curve point at the specified position along this path.\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated tangent instead of the tangent of the previous path point.\r\n * @returns a tangent vector corresponding to the interpolated Path3D curve point, if not interpolated, the tangent is taken from the precomputed tangents array.\r\n */\r\n public getTangentAt(position: number, interpolated = false): Vector3 {\r\n this._updatePointAtData(position, interpolated);\r\n return interpolated ? Vector3.TransformCoordinates(Vector3.Forward(), this._pointAtData.interpolationMatrix) : this._tangents[this._pointAtData.previousPointArrayIndex];\r\n }\r\n\r\n /**\r\n * Returns the tangent vector of an interpolated Path3D curve point at the specified position along this path.\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated normal instead of the normal of the previous path point.\r\n * @returns a normal vector corresponding to the interpolated Path3D curve point, if not interpolated, the normal is taken from the precomputed normals array.\r\n */\r\n public getNormalAt(position: number, interpolated = false): Vector3 {\r\n this._updatePointAtData(position, interpolated);\r\n return interpolated ? Vector3.TransformCoordinates(Vector3.Right(), this._pointAtData.interpolationMatrix) : this._normals[this._pointAtData.previousPointArrayIndex];\r\n }\r\n\r\n /**\r\n * Returns the binormal vector of an interpolated Path3D curve point at the specified position along this path.\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @param interpolated (optional, default false) : boolean, if true returns an interpolated binormal instead of the binormal of the previous path point.\r\n * @returns a binormal vector corresponding to the interpolated Path3D curve point, if not interpolated, the binormal is taken from the precomputed binormals array.\r\n */\r\n public getBinormalAt(position: number, interpolated = false): Vector3 {\r\n this._updatePointAtData(position, interpolated);\r\n return interpolated ? Vector3.TransformCoordinates(Vector3.UpReadOnly, this._pointAtData.interpolationMatrix) : this._binormals[this._pointAtData.previousPointArrayIndex];\r\n }\r\n\r\n /**\r\n * Returns the distance (float) of an interpolated Path3D curve point at the specified position along this path.\r\n * @param position the position of the point along this path, from 0.0 to 1.0\r\n * @returns the distance of the interpolated Path3D curve point at the specified position along this path.\r\n */\r\n public getDistanceAt(position: number): number {\r\n return this.length() * position;\r\n }\r\n\r\n /**\r\n * Returns the array index of the previous point of an interpolated point along this path\r\n * @param position the position of the point to interpolate along this path, from 0.0 to 1.0\r\n * @returns the array index\r\n */\r\n public getPreviousPointIndexAt(position: number) {\r\n this._updatePointAtData(position);\r\n return this._pointAtData.previousPointArrayIndex;\r\n }\r\n\r\n /**\r\n * Returns the position of an interpolated point relative to the two path points it lies between, from 0.0 (point A) to 1.0 (point B)\r\n * @param position the position of the point to interpolate along this path, from 0.0 to 1.0\r\n * @returns the sub position\r\n */\r\n public getSubPositionAt(position: number) {\r\n this._updatePointAtData(position);\r\n return this._pointAtData.subPosition;\r\n }\r\n\r\n /**\r\n * Returns the position of the closest virtual point on this path to an arbitrary Vector3, from 0.0 to 1.0\r\n * @param target the vector of which to get the closest position to\r\n * @returns the position of the closest virtual point on this path to the target vector\r\n */\r\n public getClosestPositionTo(target: Vector3) {\r\n let smallestDistance = Number.MAX_VALUE;\r\n let closestPosition = 0.0;\r\n for (let i = 0; i < this._curve.length - 1; i++) {\r\n const point = this._curve[i + 0];\r\n const tangent = this._curve[i + 1].subtract(point).normalize();\r\n const subLength = this._distances[i + 1] - this._distances[i + 0];\r\n const subPosition = Math.min((Math.max(Vector3.Dot(tangent, target.subtract(point).normalize()), 0.0) * Vector3.Distance(point, target)) / subLength, 1.0);\r\n const distance = Vector3.Distance(point.add(tangent.scale(subPosition * subLength)), target);\r\n\r\n if (distance < smallestDistance) {\r\n smallestDistance = distance;\r\n closestPosition = (this._distances[i + 0] + subLength * subPosition) / this.length();\r\n }\r\n }\r\n return closestPosition;\r\n }\r\n\r\n /**\r\n * Returns a sub path (slice) of this path\r\n * @param start the position of the fist path point, from 0.0 to 1.0, or a negative value, which will get wrapped around from the end of the path to 0.0 to 1.0 values\r\n * @param end the position of the last path point, from 0.0 to 1.0, or a negative value, which will get wrapped around from the end of the path to 0.0 to 1.0 values\r\n * @returns a sub path (slice) of this path\r\n */\r\n public slice(start: number = 0.0, end: number = 1.0) {\r\n if (start < 0.0) {\r\n start = 1 - ((start * -1.0) % 1.0);\r\n }\r\n if (end < 0.0) {\r\n end = 1 - ((end * -1.0) % 1.0);\r\n }\r\n if (start > end) {\r\n const _start = start;\r\n start = end;\r\n end = _start;\r\n }\r\n const curvePoints = this.getCurve();\r\n\r\n const startPoint = this.getPointAt(start);\r\n let startIndex = this.getPreviousPointIndexAt(start);\r\n\r\n const endPoint = this.getPointAt(end);\r\n const endIndex = this.getPreviousPointIndexAt(end) + 1;\r\n\r\n const slicePoints: Vector3[] = [];\r\n if (start !== 0.0) {\r\n startIndex++;\r\n slicePoints.push(startPoint);\r\n }\r\n\r\n slicePoints.push(...curvePoints.slice(startIndex, endIndex));\r\n if (end !== 1.0 || start === 1.0) {\r\n slicePoints.push(endPoint);\r\n }\r\n return new Path3D(slicePoints, this.getNormalAt(start), this._raw, this._alignTangentsWithPath);\r\n }\r\n\r\n /**\r\n * Forces the Path3D tangent, normal, binormal and distance recomputation.\r\n * @param path path which all values are copied into the curves points\r\n * @param firstNormal which should be projected onto the curve\r\n * @param alignTangentsWithPath (optional, default false) : boolean, if true the tangents will be aligned with the path\r\n * @returns the same object updated.\r\n */\r\n public update(path: Vector3[], firstNormal: Nullable<Vector3> = null, alignTangentsWithPath = false): Path3D {\r\n for (let p = 0; p < path.length; p++) {\r\n this._curve[p].x = path[p].x;\r\n this._curve[p].y = path[p].y;\r\n this._curve[p].z = path[p].z;\r\n }\r\n this._compute(firstNormal, alignTangentsWithPath);\r\n return this;\r\n }\r\n\r\n // private function compute() : computes tangents, normals and binormals\r\n private _compute(firstNormal: Nullable<Vector3>, alignTangentsWithPath = false): void {\r\n const l = this._curve.length;\r\n\r\n if (l < 2) {\r\n return;\r\n }\r\n\r\n // first and last tangents\r\n this._tangents[0] = this._getFirstNonNullVector(0);\r\n if (!this._raw) {\r\n this._tangents[0].normalize();\r\n }\r\n this._tangents[l - 1] = this._curve[l - 1].subtract(this._curve[l - 2]);\r\n if (!this._raw) {\r\n this._tangents[l - 1].normalize();\r\n }\r\n\r\n // normals and binormals at first point : arbitrary vector with _normalVector()\r\n const tg0 = this._tangents[0];\r\n const pp0 = this._normalVector(tg0, firstNormal);\r\n this._normals[0] = pp0;\r\n if (!this._raw) {\r\n this._normals[0].normalize();\r\n }\r\n this._binormals[0] = Vector3.Cross(tg0, this._normals[0]);\r\n if (!this._raw) {\r\n this._binormals[0].normalize();\r\n }\r\n this._distances[0] = 0.0;\r\n\r\n // normals and binormals : next points\r\n let prev: Vector3; // previous vector (segment)\r\n let cur: Vector3; // current vector (segment)\r\n let curTang: Vector3; // current tangent\r\n // previous normal\r\n let prevNor: Vector3; // previous normal\r\n let prevBinor: Vector3; // previous binormal\r\n\r\n for (let i = 1; i < l; i++) {\r\n // tangents\r\n prev = this._getLastNonNullVector(i);\r\n if (i < l - 1) {\r\n cur = this._getFirstNonNullVector(i);\r\n this._tangents[i] = alignTangentsWithPath ? cur : prev.add(cur);\r\n this._tangents[i].normalize();\r\n }\r\n this._distances[i] = this._distances[i - 1] + this._curve[i].subtract(this._curve[i - 1]).length();\r\n\r\n // normals and binormals\r\n // http://www.cs.cmu.edu/afs/andrew/scs/cs/15-462/web/old/asst2camera.html\r\n curTang = this._tangents[i];\r\n prevBinor = this._binormals[i - 1];\r\n this._normals[i] = Vector3.Cross(prevBinor, curTang);\r\n if (!this._raw) {\r\n if (this._normals[i].length() === 0) {\r\n prevNor = this._normals[i - 1];\r\n this._normals[i] = prevNor.clone();\r\n } else {\r\n this._normals[i].normalize();\r\n }\r\n }\r\n this._binormals[i] = Vector3.Cross(curTang, this._normals[i]);\r\n if (!this._raw) {\r\n this._binormals[i].normalize();\r\n }\r\n }\r\n this._pointAtData.id = NaN;\r\n }\r\n\r\n // private function getFirstNonNullVector(index)\r\n // returns the first non null vector from index : curve[index + N].subtract(curve[index])\r\n private _getFirstNonNullVector(index: number): Vector3 {\r\n let i = 1;\r\n let nNVector: Vector3 = this._curve[index + i].subtract(this._curve[index]);\r\n while (nNVector.length() === 0 && index + i + 1 < this._curve.length) {\r\n i++;\r\n nNVector = this._curve[index + i].subtract(this._curve[index]);\r\n }\r\n return nNVector;\r\n }\r\n\r\n // private function getLastNonNullVector(index)\r\n // returns the last non null vector from index : curve[index].subtract(curve[index - N])\r\n private _getLastNonNullVector(index: number): Vector3 {\r\n let i = 1;\r\n let nLVector: Vector3 = this._curve[index].subtract(this._curve[index - i]);\r\n while (nLVector.length() === 0 && index > i + 1) {\r\n i++;\r\n nLVector = this._curve[index].subtract(this._curve[index - i]);\r\n }\r\n return nLVector;\r\n }\r\n\r\n // private function normalVector(v0, vt, va) :\r\n // returns an arbitrary point in the plane defined by the point v0 and the vector vt orthogonal to this plane\r\n // if va is passed, it returns the va projection on the plane orthogonal to vt at the point v0\r\n private _normalVector(vt: Vector3, va: Nullable<Vector3>): Vector3 {\r\n let normal0: Vector3;\r\n let tgl = vt.length();\r\n if (tgl === 0.0) {\r\n tgl = 1.0;\r\n }\r\n\r\n if (va === undefined || va === null) {\r\n let point: Vector3;\r\n if (!Scalar.WithinEpsilon(Math.abs(vt.y) / tgl, 1.0, Epsilon)) {\r\n // search for a point in the plane\r\n point = new Vector3(0.0, -1.0, 0.0);\r\n } else if (!Scalar.WithinEpsilon(Math.abs(vt.x) / tgl, 1.0, Epsilon)) {\r\n point = new Vector3(1.0, 0.0, 0.0);\r\n } else if (!Scalar.WithinEpsilon(Math.abs(vt.z) / tgl, 1.0, Epsilon)) {\r\n point = new Vector3(0.0, 0.0, 1.0);\r\n } else {\r\n point = Vector3.Zero();\r\n }\r\n normal0 = Vector3.Cross(vt, point);\r\n } else {\r\n normal0 = Vector3.Cross(vt, va);\r\n Vector3.CrossToRef(normal0, vt, normal0);\r\n }\r\n normal0.normalize();\r\n return normal0;\r\n }\r\n\r\n /**\r\n * Updates the point at data for an interpolated point along this curve\r\n * @param position the position of the point along this curve, from 0.0 to 1.0\r\n * @param interpolateTNB\r\n * @interpolateTNB whether to compute the interpolated tangent, normal and binormal\r\n * @returns the (updated) point at data\r\n */\r\n private _updatePointAtData(position: number, interpolateTNB: boolean = false) {\r\n // set an id for caching the result\r\n if (this._pointAtData.id === position) {\r\n if (!this._pointAtData.interpolateReady) {\r\n this._updateInterpolationMatrix();\r\n }\r\n return this._pointAtData;\r\n } else {\r\n this._pointAtData.id = position;\r\n }\r\n const curvePoints = this.getPoints();\r\n\r\n // clamp position between 0.0 and 1.0\r\n if (position <= 0.0) {\r\n return this._setPointAtData(0.0, 0.0, curvePoints[0], 0, interpolateTNB);\r\n } else if (position >= 1.0) {\r\n return this._setPointAtData(1.0, 1.0, curvePoints[curvePoints.length - 1], curvePoints.length - 1, interpolateTNB);\r\n }\r\n\r\n let previousPoint: Vector3 = curvePoints[0];\r\n let currentPoint: Vector3;\r\n let currentLength = 0.0;\r\n const targetLength = position * this.length();\r\n\r\n for (let i = 1; i < curvePoints.length; i++) {\r\n currentPoint = curvePoints[i];\r\n const distance = Vector3.Distance(previousPoint, currentPoint);\r\n currentLength += distance;\r\n if (currentLength === targetLength) {\r\n return this._setPointAtData(position, 1.0, currentPoint, i, interpolateTNB);\r\n } else if (currentLength > targetLength) {\r\n const toLength = currentLength - targetLength;\r\n const diff = toLength / distance;\r\n const dir = previousPoint.subtract(currentPoint);\r\n const point = currentPoint.add(dir.scaleInPlace(diff));\r\n return this._setPointAtData(position, 1 - diff, point, i - 1, interpolateTNB);\r\n }\r\n previousPoint = currentPoint;\r\n }\r\n return this._pointAtData;\r\n }\r\n\r\n /**\r\n * Updates the point at data from the specified parameters\r\n * @param position where along the path the interpolated point is, from 0.0 to 1.0\r\n * @param subPosition\r\n * @param point the interpolated point\r\n * @param parentIndex the index of an existing curve point that is on, or else positionally the first behind, the interpolated point\r\n * @param interpolateTNB\r\n */\r\n private _setPointAtData(position: number, subPosition: number, point: Vector3, parentIndex: number, interpolateTNB: boolean) {\r\n this._pointAtData.point = point;\r\n this._pointAtData.position = position;\r\n this._pointAtData.subPosition = subPosition;\r\n this._pointAtData.previousPointArrayIndex = parentIndex;\r\n this._pointAtData.interpolateReady = interpolateTNB;\r\n\r\n if (interpolateTNB) {\r\n this._updateInterpolationMatrix();\r\n }\r\n return this._pointAtData;\r\n }\r\n\r\n /**\r\n * Updates the point at interpolation matrix for the tangents, normals and binormals\r\n */\r\n private _updateInterpolationMatrix() {\r\n this._pointAtData.interpolationMatrix = Matrix.Identity();\r\n const parentIndex = this._pointAtData.previousPointArrayIndex;\r\n\r\n if (parentIndex !== this._tangents.length - 1) {\r\n const index = parentIndex + 1;\r\n\r\n const tangentFrom = this._tangents[parentIndex].clone();\r\n const normalFrom = this._normals[parentIndex].clone();\r\n const binormalFrom = this._binormals[parentIndex].clone();\r\n\r\n const tangentTo = this._tangents[index].clone();\r\n const normalTo = this._normals[index].clone();\r\n const binormalTo = this._binormals[index].clone();\r\n\r\n const quatFrom = Quaternion.RotationQuaternionFromAxis(normalFrom, binormalFrom, tangentFrom);\r\n const quatTo = Quaternion.RotationQuaternionFromAxis(normalTo, binormalTo, tangentTo);\r\n const quatAt = Quaternion.Slerp(quatFrom, quatTo, this._pointAtData.subPosition);\r\n\r\n quatAt.toRotationMatrix(this._pointAtData.interpolationMatrix);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.\r\n * A Curve3 is designed from a series of successive Vector3.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves\r\n */\r\nexport class Curve3 {\r\n private _points: Vector3[];\r\n private _length: number = 0.0;\r\n\r\n /**\r\n * Returns a Curve3 object along a Quadratic Bezier curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#quadratic-bezier-curve\r\n * @param v0 (Vector3) the origin point of the Quadratic Bezier\r\n * @param v1 (Vector3) the control point\r\n * @param v2 (Vector3) the end point of the Quadratic Bezier\r\n * @param nbPoints (integer) the wanted number of points in the curve\r\n * @returns the created Curve3\r\n */\r\n public static CreateQuadraticBezier(v0: DeepImmutable<Vector3>, v1: DeepImmutable<Vector3>, v2: DeepImmutable<Vector3>, nbPoints: number): Curve3 {\r\n nbPoints = nbPoints > 2 ? nbPoints : 3;\r\n const bez = new Array<Vector3>();\r\n const equation = (t: number, val0: number, val1: number, val2: number) => {\r\n const res = (1.0 - t) * (1.0 - t) * val0 + 2.0 * t * (1.0 - t) * val1 + t * t * val2;\r\n return res;\r\n };\r\n for (let i = 0; i <= nbPoints; i++) {\r\n bez.push(new Vector3(equation(i / nbPoints, v0.x, v1.x, v2.x), equation(i / nbPoints, v0.y, v1.y, v2.y), equation(i / nbPoints, v0.z, v1.z, v2.z)));\r\n }\r\n return new Curve3(bez);\r\n }\r\n\r\n /**\r\n * Returns a Curve3 object along a Cubic Bezier curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#cubic-bezier-curve\r\n * @param v0 (Vector3) the origin point of the Cubic Bezier\r\n * @param v1 (Vector3) the first control point\r\n * @param v2 (Vector3) the second control point\r\n * @param v3 (Vector3) the end point of the Cubic Bezier\r\n * @param nbPoints (integer) the wanted number of points in the curve\r\n * @returns the created Curve3\r\n */\r\n public static CreateCubicBezier(v0: DeepImmutable<Vector3>, v1: DeepImmutable<Vector3>, v2: DeepImmutable<Vector3>, v3: DeepImmutable<Vector3>, nbPoints: number): Curve3 {\r\n nbPoints = nbPoints > 3 ? nbPoints : 4;\r\n const bez = new Array<Vector3>();\r\n const equation = (t: number, val0: number, val1: number, val2: number, val3: number) => {\r\n const res = (1.0 - t) * (1.0 - t) * (1.0 - t) * val0 + 3.0 * t * (1.0 - t) * (1.0 - t) * val1 + 3.0 * t * t * (1.0 - t) * val2 + t * t * t * val3;\r\n return res;\r\n };\r\n for (let i = 0; i <= nbPoints; i++) {\r\n bez.push(new Vector3(equation(i / nbPoints, v0.x, v1.x, v2.x, v3.x), equation(i / nbPoints, v0.y, v1.y, v2.y, v3.y), equation(i / nbPoints, v0.z, v1.z, v2.z, v3.z)));\r\n }\r\n return new Curve3(bez);\r\n }\r\n\r\n /**\r\n * Returns a Curve3 object along a Hermite Spline curve : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#hermite-spline\r\n * @param p1 (Vector3) the origin point of the Hermite Spline\r\n * @param t1 (Vector3) the tangent vector at the origin point\r\n * @param p2 (Vector3) the end point of the Hermite Spline\r\n * @param t2 (Vector3) the tangent vector at the end point\r\n * @param nSeg (integer) the number of curve segments or nSeg + 1 points in the array\r\n * @returns the created Curve3\r\n */\r\n public static CreateHermiteSpline(p1: DeepImmutable<Vector3>, t1: DeepImmutable<Vector3>, p2: DeepImmutable<Vector3>, t2: DeepImmutable<Vector3>, nSeg: number): Curve3 {\r\n const hermite = new Array<Vector3>();\r\n const step = 1.0 / nSeg;\r\n for (let i = 0; i <= nSeg; i++) {\r\n hermite.push(Vector3.Hermite(p1, t1, p2, t2, i * step));\r\n }\r\n return new Curve3(hermite);\r\n }\r\n\r\n /**\r\n * Returns a Curve3 object along a CatmullRom Spline curve :\r\n * @param points (array of Vector3) the points the spline must pass through. At least, four points required\r\n * @param nbPoints (integer) the wanted number of points between each curve control points\r\n * @param closed (boolean) optional with default false, when true forms a closed loop from the points\r\n * @returns the created Curve3\r\n */\r\n public static CreateCatmullRomSpline(points: DeepImmutable<Vector3[]>, nbPoints: number, closed?: boolean): Curve3 {\r\n const catmullRom = new Array<Vector3>();\r\n const step = 1.0 / nbPoints;\r\n let amount = 0.0;\r\n if (closed) {\r\n const pointsCount = points.length;\r\n for (let i = 0; i < pointsCount; i++) {\r\n amount = 0;\r\n for (let c = 0; c < nbPoints; c++) {\r\n catmullRom.push(\r\n Vector3.CatmullRom(points[i % pointsCount], points[(i + 1) % pointsCount], points[(i + 2) % pointsCount], points[(i + 3) % pointsCount], amount)\r\n );\r\n amount += step;\r\n }\r\n }\r\n catmullRom.push(catmullRom[0]);\r\n } else {\r\n const totalPoints = new Array<Vector3>();\r\n totalPoints.push(points[0].clone());\r\n Array.prototype.push.apply(totalPoints, points);\r\n totalPoints.push(points[points.length - 1].clone());\r\n let i = 0;\r\n for (; i < totalPoints.length - 3; i++) {\r\n amount = 0;\r\n for (let c = 0; c < nbPoints; c++) {\r\n catmullRom.push(Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));\r\n amount += step;\r\n }\r\n }\r\n i--;\r\n catmullRom.push(Vector3.CatmullRom(totalPoints[i], totalPoints[i + 1], totalPoints[i + 2], totalPoints[i + 3], amount));\r\n }\r\n return new Curve3(catmullRom);\r\n }\r\n\r\n /**\r\n * Returns a Curve3 object along an arc through three vector3 points:\r\n * The three points should not be colinear. When they are the Curve3 is empty.\r\n * @param first (Vector3) the first point the arc must pass through.\r\n * @param second (Vector3) the second point the arc must pass through.\r\n * @param third (Vector3) the third point the arc must pass through.\r\n * @param steps (number) the larger the number of steps the more detailed the arc.\r\n * @param closed (boolean) optional with default false, when true forms the chord from the first and third point\r\n * @param fullCircle Circle (boolean) optional with default false, when true forms the complete circle through the three points\r\n * @returns the created Curve3\r\n */\r\n public static ArcThru3Points(first: Vector3, second: Vector3, third: Vector3, steps: number = 32, closed: boolean = false, fullCircle: boolean = false): Curve3 {\r\n const arc = new Array<Vector3>();\r\n const vec1 = second.subtract(first);\r\n const vec2 = third.subtract(second);\r\n const vec3 = first.subtract(third);\r\n const zAxis = Vector3.Cross(vec1, vec2);\r\n const len4 = zAxis.length();\r\n if (len4 < Math.pow(10, -8)) {\r\n return new Curve3(arc); // colinear points arc is empty\r\n }\r\n const len1_sq = vec1.lengthSquared();\r\n const len2_sq = vec2.lengthSquared();\r\n const len3_sq = vec3.lengthSquared();\r\n const len4_sq = zAxis.lengthSquared();\r\n const len1 = vec1.length();\r\n const len2 = vec2.length();\r\n const len3 = vec3.length();\r\n const radius = (0.5 * len1 * len2 * len3) / len4;\r\n const dot1 = Vector3.Dot(vec1, vec3);\r\n const dot2 = Vector3.Dot(vec1, vec2);\r\n const dot3 = Vector3.Dot(vec2, vec3);\r\n const a = (-0.5 * len2_sq * dot1) / len4_sq;\r\n const b = (-0.5 * len3_sq * dot2) / len4_sq;\r\n const c = (-0.5 * len1_sq * dot3) / len4_sq;\r\n const center = first.scale(a).add(second.scale(b)).add(third.scale(c));\r\n const radiusVec = first.subtract(center);\r\n const xAxis = radiusVec.normalize();\r\n const yAxis = Vector3.Cross(zAxis, xAxis).normalize();\r\n if (fullCircle) {\r\n const dStep = (2 * Math.PI) / steps;\r\n for (let theta = 0; theta <= 2 * Math.PI; theta += dStep) {\r\n arc.push(center.add(xAxis.scale(radius * Math.cos(theta)).add(yAxis.scale(radius * Math.sin(theta)))));\r\n }\r\n arc.push(first);\r\n } else {\r\n const dStep = 1 / steps;\r\n let theta = 0;\r\n let point = Vector3.Zero();\r\n do {\r\n point = center.add(xAxis.scale(radius * Math.cos(theta)).add(yAxis.scale(radius * Math.sin(theta))));\r\n arc.push(point);\r\n theta += dStep;\r\n } while (!point.equalsWithEpsilon(third, radius * dStep * 1.1));\r\n arc.push(third);\r\n if (closed) {\r\n arc.push(first);\r\n }\r\n }\r\n return new Curve3(arc);\r\n }\r\n\r\n /**\r\n * A Curve3 object is a logical object, so not a mesh, to handle curves in the 3D geometric space.\r\n * A Curve3 is designed from a series of successive Vector3.\r\n * Tuto : https://doc.babylonjs.com/features/featuresDeepDive/mesh/drawCurves#curve3-object\r\n * @param points points which make up the curve\r\n */\r\n constructor(points: Vector3[]) {\r\n this._points = points;\r\n this._length = this._computeLength(points);\r\n }\r\n\r\n /**\r\n * @returns the Curve3 stored array of successive Vector3\r\n */\r\n public getPoints() {\r\n return this._points;\r\n }\r\n\r\n /**\r\n * @returns the computed length (float) of the curve.\r\n */\r\n public length() {\r\n return this._length;\r\n }\r\n\r\n /**\r\n * Returns a new instance of Curve3 object : var curve = curveA.continue(curveB);\r\n * This new Curve3 is built by translating and sticking the curveB at the end of the curveA.\r\n * curveA and curveB keep unchanged.\r\n * @param curve the curve to continue from this curve\r\n * @returns the newly constructed curve\r\n */\r\n public continue(curve: DeepImmutable<Curve3>): Curve3 {\r\n const lastPoint = this._points[this._points.length - 1];\r\n const continuedPoints = this._points.slice();\r\n const curvePoints = curve.getPoints();\r\n for (let i = 1; i < curvePoints.length; i++) {\r\n continuedPoints.push(curvePoints[i].subtract(curvePoints[0]).add(lastPoint));\r\n }\r\n const continuedCurve = new Curve3(continuedPoints);\r\n return continuedCurve;\r\n }\r\n\r\n private _computeLength(path: DeepImmutable<Vector3[]>): number {\r\n let l = 0;\r\n for (let i = 1; i < path.length; i++) {\r\n l += path[i].subtract(path[i - 1]).length();\r\n }\r\n return l;\r\n }\r\n}\r\n"]}
|
package/Maths/math.vector.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ import type { Viewport } from "./math.viewport";
|
|
|
2
2
|
import type { DeepImmutable, Nullable, FloatArray, float } from "../types";
|
|
3
3
|
import type { IPlaneLike } from "./math.like";
|
|
4
4
|
import type { Plane } from "./math.plane";
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
5
|
+
import type { TransformNode } from "../Meshes/transformNode";
|
|
6
|
+
export type Vector2Constructor<T extends Vector2> = new (...args: ConstructorParameters<typeof Vector2>) => T;
|
|
7
|
+
export type Vector3Constructor<T extends Vector3> = new (...args: ConstructorParameters<typeof Vector3>) => T;
|
|
8
|
+
export type Vector4Constructor<T extends Vector4> = new (...args: ConstructorParameters<typeof Vector4>) => T;
|
|
9
|
+
export type QuaternionConstructor<T extends Quaternion> = new (...args: ConstructorParameters<typeof Quaternion>) => T;
|
|
10
|
+
export type MatrixConstructor<T extends Matrix> = new () => T;
|
|
11
11
|
/**
|
|
12
12
|
* Class representing a vector containing 2 coordinates
|
|
13
13
|
* Example Playground - Overview - https://playground.babylonjs.com/#QYBWV4#9
|
|
@@ -3632,4 +3632,3 @@ export declare class TmpVectors {
|
|
|
3632
3632
|
static Quaternion: [Quaternion, Quaternion];
|
|
3633
3633
|
static Matrix: [Matrix, Matrix, Matrix, Matrix, Matrix, Matrix, Matrix, Matrix];
|
|
3634
3634
|
}
|
|
3635
|
-
export {};
|