@babylonjs/core 6.38.1 → 6.40.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/action.js +3 -1
- package/Actions/action.js.map +1 -1
- package/Actions/condition.js +1 -0
- package/Actions/condition.js.map +1 -1
- package/Actions/directActions.d.ts +2 -2
- package/Actions/directActions.js +2 -2
- package/Actions/directActions.js.map +1 -1
- package/Animations/pathCursor.js +1 -0
- package/Animations/pathCursor.js.map +1 -1
- package/Animations/runtimeAnimation.js +1 -1
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Audio/audioEngine.js +5 -0
- package/Audio/audioEngine.js.map +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.d.ts +3 -0
- package/Behaviors/Cameras/autoRotationBehavior.js +3 -0
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Behaviors/Meshes/pointerDragBehavior.d.ts +1 -0
- package/Behaviors/Meshes/pointerDragBehavior.js +2 -0
- package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
- package/Behaviors/Meshes/sixDofDragBehavior.js +14 -20
- package/Behaviors/Meshes/sixDofDragBehavior.js.map +1 -1
- package/Bones/bone.d.ts +2 -0
- package/Bones/bone.js +2 -0
- package/Bones/bone.js.map +1 -1
- package/Cameras/Inputs/BaseCameraPointersInput.d.ts +11 -11
- package/Cameras/Inputs/BaseCameraPointersInput.js +12 -12
- package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.d.ts +9 -9
- package/Cameras/Inputs/arcRotateCameraPointersInput.js +9 -9
- package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/followCameraKeyboardMoveInput.d.ts +3 -0
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js +3 -0
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.d.ts +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.js +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.d.ts +2 -2
- package/Cameras/VR/vrExperienceHelper.js +2 -2
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Cameras/arcRotateCamera.d.ts +2 -0
- package/Cameras/arcRotateCamera.js +2 -0
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/camera.d.ts +2 -0
- package/Cameras/camera.js +4 -0
- package/Cameras/camera.js.map +1 -1
- package/Cameras/followCamera.d.ts +1 -0
- package/Cameras/followCamera.js +1 -0
- package/Cameras/followCamera.js.map +1 -1
- package/Culling/Octrees/octree.d.ts +4 -4
- package/Culling/Octrees/octree.js +4 -4
- package/Culling/Octrees/octree.js.map +1 -1
- package/Debug/debugLayer.d.ts +4 -1
- package/Debug/debugLayer.js +4 -1
- package/Debug/debugLayer.js.map +1 -1
- package/Debug/physicsViewer.d.ts +6 -1
- package/Debug/physicsViewer.js +6 -1
- package/Debug/physicsViewer.js.map +1 -1
- package/Decorators/nodeDecorator.d.ts +5 -4
- package/Decorators/nodeDecorator.js +5 -4
- package/Decorators/nodeDecorator.js.map +1 -1
- package/DeviceInput/eventFactory.d.ts +2 -0
- package/DeviceInput/eventFactory.js +3 -0
- package/DeviceInput/eventFactory.js.map +1 -1
- package/DeviceInput/webDeviceInputSystem.js +3 -0
- package/DeviceInput/webDeviceInputSystem.js.map +1 -1
- package/Engines/Extensions/engine.multiview.js +2 -0
- package/Engines/Extensions/engine.multiview.js.map +1 -1
- package/Engines/Native/nativeDataStream.d.ts +32 -0
- package/Engines/Native/nativeDataStream.js +32 -0
- package/Engines/Native/nativeDataStream.js.map +1 -1
- package/Engines/Native/nativePipelineContext.d.ts +0 -3
- package/Engines/Native/nativePipelineContext.js +0 -3
- package/Engines/Native/nativePipelineContext.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.js +2 -0
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/WebGL/webGLHardwareTexture.js +1 -0
- package/Engines/WebGL/webGLHardwareTexture.js.map +1 -1
- package/Engines/WebGL/webGLPipelineContext.d.ts +0 -3
- package/Engines/WebGL/webGLPipelineContext.js +0 -3
- package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
- package/Engines/WebGL/webGLRenderTargetWrapper.js +1 -0
- package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.readTexture.js +1 -0
- package/Engines/WebGPU/Extensions/engine.readTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheBindGroups.d.ts +1 -0
- package/Engines/WebGPU/webgpuCacheBindGroups.js +1 -0
- package/Engines/WebGPU/webgpuCacheBindGroups.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js +3 -0
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuPipelineContext.d.ts +0 -3
- package/Engines/WebGPU/webgpuPipelineContext.js +0 -3
- package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessingContext.js +1 -0
- package/Engines/WebGPU/webgpuShaderProcessingContext.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.d.ts +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +11 -2
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +22 -0
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +2 -1
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/WebGPU/webgpuTintWASM.d.ts +1 -1
- package/Engines/WebGPU/webgpuTintWASM.js +5 -5
- package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
- package/Engines/engine.d.ts +1 -0
- package/Engines/engine.js +1 -0
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.d.ts +4 -0
- package/Engines/nativeEngine.js +5 -0
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.js +7 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -1
- package/Engines/webgpuEngine.js +17 -1
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +214 -2
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +214 -6
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +15 -0
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +9 -0
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +6 -6
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +4 -0
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +4 -0
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +17 -1
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +14 -1
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.d.ts +9 -0
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js +9 -0
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.d.ts +5 -0
- package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js +5 -0
- package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +16 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +13 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +12 -1
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +12 -1
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.d.ts +18 -0
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js +9 -0
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +12 -0
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +9 -0
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +15 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +12 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +18 -2
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +15 -4
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +6 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +6 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +6 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +6 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +5 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +4 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +15 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +12 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +4 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +3 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +14 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +11 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.d.ts +15 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js +12 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.d.ts +14 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js +11 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.d.ts +15 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js +12 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +3 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +6 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +6 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +15 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +12 -3
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +18 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +15 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.d.ts +6 -0
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +6 -0
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +14 -2
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +11 -4
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +15 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +12 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +14 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +11 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +16 -8
- package/FlowGraph/flowGraph.js +13 -8
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphBlock.d.ts +54 -5
- package/FlowGraph/flowGraphBlock.js +50 -11
- package/FlowGraph/flowGraphBlock.js.map +1 -1
- package/FlowGraph/flowGraphConnection.d.ts +10 -6
- package/FlowGraph/flowGraphConnection.js +10 -6
- package/FlowGraph/flowGraphConnection.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +10 -8
- package/FlowGraph/flowGraphContext.js +10 -8
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +27 -1
- package/FlowGraph/flowGraphCoordinator.js +18 -2
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.d.ts +26 -1
- package/FlowGraph/flowGraphDataConnection.js +23 -1
- package/FlowGraph/flowGraphDataConnection.js.map +1 -1
- package/FlowGraph/flowGraphExecutionBlock.d.ts +27 -1
- package/FlowGraph/flowGraphExecutionBlock.js +22 -4
- package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
- package/FlowGraph/flowGraphRichTypes.d.ts +24 -1
- package/FlowGraph/flowGraphRichTypes.js +18 -1
- package/FlowGraph/flowGraphRichTypes.js.map +1 -1
- package/FlowGraph/flowGraphSignalConnection.d.ts +2 -0
- package/FlowGraph/flowGraphSignalConnection.js +2 -0
- package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
- package/Gamepads/gamepad.d.ts +2 -2
- package/Gamepads/gamepad.js +2 -2
- package/Gamepads/gamepad.js.map +1 -1
- package/Gamepads/gamepadSceneComponent.js +2 -0
- package/Gamepads/gamepadSceneComponent.js.map +1 -1
- package/Gizmos/axisScaleGizmo.d.ts +2 -0
- package/Gizmos/axisScaleGizmo.js +2 -0
- package/Gizmos/axisScaleGizmo.js.map +1 -1
- package/Gizmos/boundingBoxGizmo.d.ts +19 -0
- package/Gizmos/boundingBoxGizmo.js +36 -15
- package/Gizmos/boundingBoxGizmo.js.map +1 -1
- package/Gizmos/cameraGizmo.js +1 -0
- package/Gizmos/cameraGizmo.js.map +1 -1
- package/Gizmos/gizmo.d.ts +4 -1
- package/Gizmos/gizmo.js +1 -0
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/gizmoManager.d.ts +18 -0
- package/Gizmos/gizmoManager.js +34 -0
- package/Gizmos/gizmoManager.js.map +1 -1
- package/Gizmos/lightGizmo.d.ts +1 -0
- package/Gizmos/lightGizmo.js +1 -0
- package/Gizmos/lightGizmo.js.map +1 -1
- package/Gizmos/planeRotationGizmo.d.ts +2 -0
- package/Gizmos/planeRotationGizmo.js +2 -0
- package/Gizmos/planeRotationGizmo.js.map +1 -1
- package/Gizmos/positionGizmo.d.ts +11 -0
- package/Gizmos/positionGizmo.js +19 -0
- package/Gizmos/positionGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.d.ts +14 -0
- package/Gizmos/rotationGizmo.js +14 -0
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Gizmos/scaleGizmo.d.ts +18 -1
- package/Gizmos/scaleGizmo.js +19 -1
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Helpers/environmentHelper.d.ts +4 -2
- package/Helpers/environmentHelper.js +4 -2
- package/Helpers/environmentHelper.js.map +1 -1
- package/Layers/effectLayer.d.ts +1 -0
- package/Layers/effectLayer.js +1 -0
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.d.ts +3 -1
- package/Layers/glowLayer.js +3 -1
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.d.ts +3 -2
- package/Layers/highlightLayer.js +3 -2
- package/Layers/highlightLayer.js.map +1 -1
- package/Lights/light.d.ts +1 -1
- package/Lights/light.js +1 -1
- package/Lights/light.js.map +1 -1
- package/Loading/sceneLoader.d.ts +9 -0
- package/Loading/sceneLoader.js +11 -0
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.d.ts +2 -2
- package/Materials/Background/backgroundMaterial.js +2 -2
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +72 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +230 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -0
- package/Materials/GreasedLine/greasedLineMaterialInterfaces.d.ts +1 -1
- package/Materials/GreasedLine/greasedLineMaterialInterfaces.js.map +1 -1
- package/Materials/GreasedLine/greasedLinePluginMaterial.d.ts +2 -2
- package/Materials/GreasedLine/greasedLinePluginMaterial.js +2 -2
- package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
- package/Materials/GreasedLine/greasedLineSimpleMaterial.d.ts +0 -1
- package/Materials/GreasedLine/greasedLineSimpleMaterial.js +0 -1
- package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/index.d.ts +1 -0
- package/Materials/Node/Blocks/Dual/index.js +1 -0
- package/Materials/Node/Blocks/Dual/index.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +7 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +6 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragCoordBlock.js +1 -0
- package/Materials/Node/Blocks/Fragment/fragCoordBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/frontFacingBlock.js +1 -0
- package/Materials/Node/Blocks/Fragment/frontFacingBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +1 -0
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
- package/Materials/Node/Blocks/Input/prePassTextureBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Input/prePassTextureBlock.js +1 -1
- package/Materials/Node/Blocks/Input/prePassTextureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Teleport/teleportInBlock.d.ts +3 -1
- package/Materials/Node/Blocks/Teleport/teleportInBlock.js +3 -1
- package/Materials/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.d.ts +1 -0
- package/Materials/Node/Blocks/triPlanarBlock.js +1 -0
- package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
- package/Materials/Node/Blocks/worleyNoise3DBlock.d.ts +2 -0
- package/Materials/Node/Blocks/worleyNoise3DBlock.js +2 -0
- package/Materials/Node/Blocks/worleyNoise3DBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +11 -3
- package/Materials/Node/nodeMaterial.js +15 -3
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBlock.d.ts +3 -1
- package/Materials/Node/nodeMaterialBlock.js +4 -1
- package/Materials/Node/nodeMaterialBlock.js.map +1 -1
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js +1 -0
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildStateSharedData.js +1 -0
- package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +10 -9
- package/Materials/PBR/pbrBaseMaterial.js +10 -9
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.d.ts +2 -1
- package/Materials/PBR/pbrMaterial.js +3 -2
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.d.ts +7 -4
- package/Materials/PBR/pbrMetallicRoughnessMaterial.js +7 -4
- package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.d.ts +7 -4
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js +7 -4
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
- package/Materials/Textures/Loaders/envTextureLoader.js +1 -0
- package/Materials/Textures/Loaders/envTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/hdrTextureLoader.js +1 -0
- package/Materials/Textures/Loaders/hdrTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/tgaTextureLoader.js +1 -0
- package/Materials/Textures/Loaders/tgaTextureLoader.js.map +1 -1
- package/Materials/Textures/Packer/packer.d.ts +0 -1
- package/Materials/Textures/Packer/packer.js +0 -1
- package/Materials/Textures/Packer/packer.js.map +1 -1
- package/Materials/Textures/Procedurals/noiseProceduralTexture.d.ts +1 -1
- package/Materials/Textures/Procedurals/noiseProceduralTexture.js +1 -1
- package/Materials/Textures/Procedurals/noiseProceduralTexture.js.map +1 -1
- package/Materials/Textures/baseTexture.js +3 -0
- package/Materials/Textures/baseTexture.js.map +1 -1
- package/Materials/Textures/colorGradingTexture.d.ts +4 -1
- package/Materials/Textures/colorGradingTexture.js +4 -1
- package/Materials/Textures/colorGradingTexture.js.map +1 -1
- package/Materials/Textures/equiRectangularCubeTexture.d.ts +1 -0
- package/Materials/Textures/equiRectangularCubeTexture.js +1 -0
- package/Materials/Textures/equiRectangularCubeTexture.js.map +1 -1
- package/Materials/Textures/hdrCubeTexture.d.ts +3 -2
- package/Materials/Textures/hdrCubeTexture.js +3 -2
- package/Materials/Textures/hdrCubeTexture.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.d.ts +1 -1
- package/Materials/Textures/htmlElementTexture.js +1 -1
- package/Materials/Textures/htmlElementTexture.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.d.ts +1 -1
- package/Materials/Textures/multiRenderTarget.js +1 -1
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/texture.d.ts +4 -1
- package/Materials/Textures/texture.js +4 -1
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/Textures/thinRenderTargetTexture.d.ts +1 -1
- package/Materials/Textures/thinRenderTargetTexture.js +1 -1
- package/Materials/Textures/thinRenderTargetTexture.js.map +1 -1
- package/Materials/Textures/thinTexture.js +3 -0
- package/Materials/Textures/thinTexture.js.map +1 -1
- package/Materials/index.d.ts +1 -0
- package/Materials/index.js +1 -0
- package/Materials/index.js.map +1 -1
- package/Materials/material.d.ts +2 -1
- package/Materials/material.decalMapConfiguration.d.ts +0 -5
- package/Materials/material.decalMapConfiguration.js +5 -5
- package/Materials/material.decalMapConfiguration.js.map +1 -1
- package/Materials/material.js +3 -2
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.d.ts +1 -1
- package/Materials/materialHelper.js +4 -3
- package/Materials/materialHelper.js.map +1 -1
- package/Materials/materialPluginManager.js +1 -0
- package/Materials/materialPluginManager.js.map +1 -1
- package/Materials/standardMaterial.d.ts +2 -2
- package/Materials/standardMaterial.js +3 -3
- package/Materials/standardMaterial.js.map +1 -1
- package/Materials/uniformBuffer.js +2 -1
- package/Materials/uniformBuffer.js.map +1 -1
- package/Maths/math.like.d.ts +3 -0
- package/Maths/math.like.js.map +1 -1
- package/Maths/math.path.d.ts +2 -1
- package/Maths/math.path.js +2 -1
- package/Maths/math.path.js.map +1 -1
- package/Maths/math.polar.d.ts +3 -2
- package/Maths/math.polar.js +8 -2
- package/Maths/math.polar.js.map +1 -1
- package/Maths/math.vector.d.ts +12 -5
- package/Maths/math.vector.js +12 -5
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/Builders/hemisphereBuilder.js +1 -0
- package/Meshes/Builders/hemisphereBuilder.js.map +1 -1
- package/Meshes/Builders/textBuilder.d.ts +26 -5
- package/Meshes/Builders/textBuilder.js +26 -5
- package/Meshes/Builders/textBuilder.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +84 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +288 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -0
- package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +2 -0
- package/Meshes/GreasedLine/greasedLineBaseMesh.js +2 -0
- package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.d.ts +2 -0
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js +9 -0
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCurveBlock.d.ts +92 -0
- package/Meshes/Node/Blocks/geometryCurveBlock.js +292 -0
- package/Meshes/Node/Blocks/geometryCurveBlock.js.map +1 -0
- package/Meshes/Node/Blocks/noiseBlock.d.ts +5 -3
- package/Meshes/Node/Blocks/noiseBlock.js +5 -3
- package/Meshes/Node/Blocks/noiseBlock.js.map +1 -1
- package/Meshes/Node/index.d.ts +1 -0
- package/Meshes/Node/index.js +1 -0
- package/Meshes/Node/index.js.map +1 -1
- package/Meshes/Node/nodeGeometry.d.ts +6 -2
- package/Meshes/Node/nodeGeometry.js +7 -2
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.js +1 -0
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.js.map +1 -1
- package/Meshes/Node/nodeGeometryBuildState.js +1 -0
- package/Meshes/Node/nodeGeometryBuildState.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +1 -0
- package/Meshes/abstractMesh.js +3 -0
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/csg.d.ts +7 -1
- package/Meshes/csg.js +9 -1
- package/Meshes/csg.js.map +1 -1
- package/Meshes/geodesicMesh.d.ts +32 -1
- package/Meshes/geodesicMesh.js +17 -1
- package/Meshes/geodesicMesh.js.map +1 -1
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/instancedMesh.d.ts +34 -17
- package/Meshes/instancedMesh.js +34 -17
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/linesMesh.d.ts +6 -5
- package/Meshes/linesMesh.js +6 -5
- package/Meshes/linesMesh.js.map +1 -1
- package/Meshes/mesh.d.ts +1 -0
- package/Meshes/mesh.js +1 -0
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/mesh.vertexData.d.ts +0 -145
- package/Meshes/mesh.vertexData.js +0 -145
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/transformNode.d.ts +1 -1
- package/Meshes/transformNode.js +19 -1
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.d.ts +1 -0
- package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js +1 -0
- package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js.map +1 -1
- package/Misc/HighDynamicRange/hdr.d.ts +1 -0
- package/Misc/HighDynamicRange/hdr.js +8 -0
- package/Misc/HighDynamicRange/hdr.js.map +1 -1
- package/Misc/HighDynamicRange/panoramaToCubemap.d.ts +1 -0
- package/Misc/HighDynamicRange/panoramaToCubemap.js +3 -0
- package/Misc/HighDynamicRange/panoramaToCubemap.js.map +1 -1
- package/Misc/assetsManager.d.ts +3 -0
- package/Misc/assetsManager.js +3 -0
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/basis.js +1 -0
- package/Misc/basis.js.map +1 -1
- package/Misc/decorators.d.ts +2 -0
- package/Misc/decorators.js +3 -1
- package/Misc/decorators.js.map +1 -1
- package/Misc/fileTools.js +2 -0
- package/Misc/fileTools.js.map +1 -1
- package/Misc/filesInput.d.ts +7 -2
- package/Misc/filesInput.js +7 -2
- package/Misc/filesInput.js.map +1 -1
- package/Misc/greasedLineTools.d.ts +6 -1
- package/Misc/greasedLineTools.js +6 -1
- package/Misc/greasedLineTools.js.map +1 -1
- package/Misc/textureTools.d.ts +2 -0
- package/Misc/textureTools.js +2 -0
- package/Misc/textureTools.js.map +1 -1
- package/Misc/timer.d.ts +2 -1
- package/Misc/timer.js +1 -0
- package/Misc/timer.js.map +1 -1
- package/Misc/tools.d.ts +5 -1
- package/Misc/tools.js +9 -1
- package/Misc/tools.js.map +1 -1
- package/Misc/videoRecorder.d.ts +4 -1
- package/Misc/videoRecorder.js +11 -5
- package/Misc/videoRecorder.js.map +1 -1
- package/Misc/webRequest.d.ts +3 -0
- package/Misc/webRequest.js +4 -1
- package/Misc/webRequest.js.map +1 -1
- package/Morph/morphTargetManager.d.ts +11 -0
- package/Morph/morphTargetManager.js +22 -2
- package/Morph/morphTargetManager.js.map +1 -1
- package/Particles/EmitterTypes/customParticleEmitter.js +10 -2
- package/Particles/EmitterTypes/customParticleEmitter.js.map +1 -1
- package/Particles/EmitterTypes/cylinderParticleEmitter.d.ts +3 -1
- package/Particles/EmitterTypes/cylinderParticleEmitter.js +7 -1
- package/Particles/EmitterTypes/cylinderParticleEmitter.js.map +1 -1
- package/Particles/IParticleSystem.d.ts +2 -2
- package/Particles/IParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.js +1 -0
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.d.ts +1 -2
- package/Particles/particleSystem.js +5 -1
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/solidParticleSystem.d.ts +1 -1
- package/Particles/solidParticleSystem.js +1 -1
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Physics/physicsHelper.d.ts +3 -2
- package/Physics/physicsHelper.js +5 -4
- package/Physics/physicsHelper.js.map +1 -1
- package/Physics/physicsRaycastResult.d.ts +2 -1
- package/Physics/physicsRaycastResult.js +2 -1
- package/Physics/physicsRaycastResult.js.map +1 -1
- package/Physics/v1/Plugins/ammoJSPlugin.d.ts +5 -0
- package/Physics/v1/Plugins/ammoJSPlugin.js +6 -0
- package/Physics/v1/Plugins/ammoJSPlugin.js.map +1 -1
- package/Physics/v1/physicsEngine.d.ts +2 -0
- package/Physics/v1/physicsEngine.js +2 -0
- package/Physics/v1/physicsEngine.js.map +1 -1
- package/Physics/v1/physicsImpostor.d.ts +2 -3
- package/Physics/v1/physicsImpostor.js +2 -3
- package/Physics/v1/physicsImpostor.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +1 -0
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.d.ts +61 -10
- package/Physics/v2/Plugins/havokPlugin.js +89 -10
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/physicsBody.d.ts +41 -3
- package/Physics/v2/physicsBody.js +42 -9
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Physics/v2/physicsConstraint.d.ts +0 -2
- package/Physics/v2/physicsConstraint.js +0 -2
- package/Physics/v2/physicsConstraint.js.map +1 -1
- package/Physics/v2/physicsEngine.d.ts +5 -3
- package/Physics/v2/physicsEngine.js +6 -3
- package/Physics/v2/physicsEngine.js.map +1 -1
- package/Physics/v2/physicsShape.d.ts +2 -0
- package/Physics/v2/physicsShape.js +5 -0
- package/Physics/v2/physicsShape.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.d.ts +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.d.ts +1 -0
- package/PostProcesses/motionBlurPostProcess.js +1 -0
- package/PostProcesses/motionBlurPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +0 -1
- package/PostProcesses/postProcess.js +0 -1
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.d.ts +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.d.ts +2 -1
- package/Rendering/GlobalIllumination/giRSMManager.js +5 -2
- package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
- package/Rendering/depthRendererSceneComponent.js +1 -0
- package/Rendering/depthRendererSceneComponent.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.js +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.d.ts +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/geometryBufferRenderer.d.ts +2 -2
- package/Rendering/geometryBufferRenderer.js +2 -2
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/index.d.ts +0 -1
- package/Rendering/index.js +0 -1
- package/Rendering/index.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +2 -2
- package/Rendering/prePassRenderer.js +2 -2
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Rendering/reflectiveShadowMap.d.ts +4 -0
- package/Rendering/reflectiveShadowMap.js +7 -0
- package/Rendering/reflectiveShadowMap.js.map +1 -1
- package/Rendering/renderingGroup.d.ts +0 -1
- package/Rendering/renderingGroup.js +3 -4
- package/Rendering/renderingGroup.js.map +1 -1
- package/Rendering/renderingManager.d.ts +2 -1
- package/Rendering/renderingManager.js +2 -1
- package/Rendering/renderingManager.js.map +1 -1
- package/Rendering/subSurfaceConfiguration.d.ts +1 -0
- package/Rendering/subSurfaceConfiguration.js +1 -0
- package/Rendering/subSurfaceConfiguration.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.d.ts +7 -0
- package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.js +13 -0
- package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.js.map +1 -0
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.d.ts +5 -0
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js +10 -0
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -0
- package/Shaders/ShadersInclude/morphTargetsVertex.js +8 -5
- package/Shaders/ShadersInclude/morphTargetsVertex.js.map +1 -1
- package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js +2 -0
- package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
- package/Shaders/gaussianSplatting.fragment.d.ts +11 -0
- package/Shaders/gaussianSplatting.fragment.js +27 -0
- package/Shaders/gaussianSplatting.fragment.js.map +1 -0
- package/Shaders/gaussianSplatting.vertex.d.ts +13 -0
- package/Shaders/gaussianSplatting.vertex.js +49 -0
- package/Shaders/gaussianSplatting.vertex.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js +5 -1
- package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js +2 -0
- package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
- package/XR/features/WebXRAbstractFeature.d.ts +7 -1
- package/XR/features/WebXRAbstractFeature.js +20 -4
- package/XR/features/WebXRAbstractFeature.js.map +1 -1
- package/XR/features/WebXRAnchorSystem.d.ts +1 -0
- package/XR/features/WebXRAnchorSystem.js +1 -0
- package/XR/features/WebXRAnchorSystem.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.js +9 -2
- package/XR/features/WebXRControllerTeleportation.js.map +1 -1
- package/XR/features/WebXRDepthSensing.d.ts +1 -1
- package/XR/features/WebXRDepthSensing.js +1 -1
- package/XR/features/WebXRDepthSensing.js.map +1 -1
- package/XR/features/WebXREyeTracking.js +1 -1
- package/XR/features/WebXREyeTracking.js.map +1 -1
- package/XR/features/WebXRHandTracking.d.ts +4 -1
- package/XR/features/WebXRHandTracking.js +18 -4
- package/XR/features/WebXRHandTracking.js.map +1 -1
- package/XR/features/WebXRHitTest.js +1 -1
- package/XR/features/WebXRHitTest.js.map +1 -1
- package/XR/features/WebXRNearInteraction.d.ts +6 -3
- package/XR/features/WebXRNearInteraction.js +9 -4
- package/XR/features/WebXRNearInteraction.js.map +1 -1
- package/XR/features/WebXRPlaneDetector.d.ts +2 -0
- package/XR/features/WebXRPlaneDetector.js +2 -0
- package/XR/features/WebXRPlaneDetector.js.map +1 -1
- package/XR/features/WebXRRawCameraAccess.d.ts +2 -0
- package/XR/features/WebXRRawCameraAccess.js +2 -0
- package/XR/features/WebXRRawCameraAccess.js.map +1 -1
- package/XR/features/WebXRSpaceWarp.d.ts +0 -27
- package/XR/features/WebXRSpaceWarp.js +0 -27
- package/XR/features/WebXRSpaceWarp.js.map +1 -1
- package/XR/index.d.ts +1 -0
- package/XR/index.js +1 -0
- package/XR/index.js.map +1 -1
- package/XR/motionController/webXROculusTouchMotionController.d.ts +1 -0
- package/XR/motionController/webXROculusTouchMotionController.js +1 -0
- package/XR/motionController/webXROculusTouchMotionController.js.map +1 -1
- package/XR/webXRCamera.d.ts +2 -0
- package/XR/webXRCamera.js +8 -6
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRExperienceHelper.js +1 -0
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRInput.js +1 -1
- package/XR/webXRInput.js.map +1 -1
- package/XR/webXRInputSource.d.ts +3 -1
- package/XR/webXRInputSource.js +6 -3
- package/XR/webXRInputSource.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +13 -0
- package/XR/webXRSessionManager.js +21 -1
- package/XR/webXRSessionManager.js.map +1 -1
- package/assetContainer.d.ts +5 -2
- package/assetContainer.js +5 -2
- package/assetContainer.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +1 -0
- package/scene.js +11 -0
- package/scene.js.map +1 -1
- package/Rendering/GaussianSplatting/gaussianSplatting.d.ts +0 -81
- package/Rendering/GaussianSplatting/gaussianSplatting.js +0 -400
- package/Rendering/GaussianSplatting/gaussianSplatting.js.map +0 -1
- package/Rendering/GaussianSplatting/index.d.ts +0 -1
- package/Rendering/GaussianSplatting/index.js +0 -2
- package/Rendering/GaussianSplatting/index.js.map +0 -1
package/Maths/math.polar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.polar.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.polar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,KAAK;IAId;;;;OAIG;IACH,YAAY,MAAc,EAAE,KAAa;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,OAAO,CAAC;IACnB,CAAC;IAED;;;OAGG;IACI,QAAQ;QACX,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED;;;OAGG;IACI,OAAO;QACV,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACI,QAAQ,CAAC,KAAY,EAAE,GAAU;QACpC,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QACxC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACrC,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,KAAY;QACnB,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,CAA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e;QACnC,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;CACJ","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { DeepImmutable } from \"../types\";\r\nimport { Vector2, Vector3 } from \"./math.vector\";\r\n\r\n/**\r\n * Class used to store (r, theta) vector representation\r\n */\r\nexport class Polar {\r\n public radius: number;\r\n public theta: number;\r\n\r\n /**\r\n * Creates a new Polar object\r\n * @param radius the radius of the vector\r\n * @param theta the angle of the vector\r\n */\r\n constructor(radius: number, theta: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n }\r\n\r\n /**\r\n * Gets the class name\r\n * @returns the string \"Polar\"\r\n */\r\n public getClassName() {\r\n return \"Polar\";\r\n }\r\n\r\n /**\r\n * Converts the current polar to a string\r\n * @returns the current polar as a string\r\n */\r\n public toString() {\r\n return JSON.stringify(this);\r\n }\r\n\r\n /**\r\n * Converts the current polar to an array\r\n * @reutrns the current polar as an array\r\n */\r\n public asArray() {\r\n return [this.radius, this.theta];\r\n }\r\n\r\n /**\r\n * Adds the current Polar and the given Polar and stores the result\r\n * @param polar the polar to add\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public addToRef(polar: Polar, ref: Polar) {\r\n ref.radius = this.radius + polar.radius;\r\n ref.theta = this.theta + polar.theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Adds the current Polar and the given Polar\r\n * @param polar the polar to add\r\n * @returns the sum polar\r\n */\r\n public add(polar: Polar) {\r\n const ref = new Polar(0, 0);\r\n this.addToRef(polar, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Adds the given polar to the current polar\r\n * @param polar the polar to add\r\n * @returns the current polar\r\n */\r\n public addInPlace(polar: Polar) {\r\n this.addToRef(polar, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the provided values to the current polar\r\n * @param radius the amount to add to the radius\r\n * @param theta the amount to add to the theta\r\n * @returns the current polar\r\n */\r\n public addInPlaceFromFloats(radius: number, theta: number) {\r\n this.radius += radius;\r\n this.theta += theta;\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtracts the given Polar from the current Polar and stores the result\r\n * @param polar the polar to subtract\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public subtractToRef(polar: Polar, ref: Polar) {\r\n ref.radius = this.radius - polar.radius;\r\n ref.theta = this.theta - polar.theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given Polar from the current Polar\r\n * @param polar the polar to subtract\r\n * @returns the difference polar\r\n */\r\n public subtract(polar: Polar) {\r\n const ref = new Polar(0, 0);\r\n this.subtractToRef(polar, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given Polar from the current Polar\r\n * @param polar the polar to subtract\r\n * @returns the current polar\r\n */\r\n public subtractInPlace(polar: Polar) {\r\n this.subtractToRef(polar, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current polar\r\n * @param radius the amount to subtract from the radius\r\n * @param theta the amount to subtract from the theta\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public subtractFromFloatsToRef(radius: number, theta: number, ref: Polar) {\r\n ref.radius = this.radius - radius;\r\n ref.theta = this.theta - theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current polar\r\n * @param radius the amount to subtract from the radius\r\n * @param theta the amount to subtract from the theta\r\n * @returns the difference polar\r\n */\r\n public subtractFromFloats(radius: number, theta: number) {\r\n const ref = new Polar(0, 0);\r\n this.subtractFromFloatsToRef(radius, theta, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Polar with the current Polar and stores the result\r\n * @param polar the polar to multiply\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public multiplyToRef(polar: Polar, ref: Polar) {\r\n ref.radius = this.radius * polar.radius;\r\n ref.theta = this.theta * polar.theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Polar with the current Polar\r\n * @param polar the polar to multiply\r\n * @returns the product polar\r\n */\r\n public multiply(polar: Polar) {\r\n const ref = new Polar(0, 0);\r\n this.multiplyToRef(polar, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Polar with the current Polar\r\n * @param polar the polar to multiply\r\n * @returns the current polar\r\n */\r\n public multiplyInPlace(polar: Polar) {\r\n this.multiplyToRef(polar, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Divides the current Polar by the given Polar and stores the result\r\n * @param polar the polar to divide\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public divideToRef(polar: Polar, ref: Polar) {\r\n ref.radius = this.radius / polar.radius;\r\n ref.theta = this.theta / polar.theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Divides the current Polar by the given Polar\r\n * @param polar the polar to divide\r\n * @returns the quotient polar\r\n */\r\n public divide(polar: Polar) {\r\n const ref = new Polar(0, 0);\r\n this.divideToRef(polar, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Divides the current Polar by the given Polar\r\n * @param polar the polar to divide\r\n * @returns the current polar\r\n */\r\n public divideInPlace(polar: Polar) {\r\n this.divideToRef(polar, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Clones the current polar\r\n * @returns a clone of the current polar\r\n */\r\n public clone() {\r\n return new Polar(this.radius, this.theta);\r\n }\r\n\r\n /**\r\n * Copies the source polar into the current polar\r\n * @param source the polar to copy from\r\n * @returns the current polar\r\n */\r\n public copyFrom(source: Polar) {\r\n this.radius = source.radius;\r\n this.theta = source.theta;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given values into the current polar\r\n * @param radius the radius to use\r\n * @param theta the theta to use\r\n * @returns the current polar\r\n */\r\n public copyFromFloats(radius: number, theta: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scales the current polar and stores the result\r\n * @param scale defines the multiplication factor\r\n * @param ref where to store the result\r\n * @returns the updated ref\r\n */\r\n public scaleToRef(scale: number, ref: Polar) {\r\n ref.radius = this.radius * scale;\r\n ref.theta = this.theta * scale;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Scales the current polar and returns a new polar with the scaled coordinates\r\n * @param scale defines the multiplication factor\r\n * @returns the scaled polar\r\n */\r\n public scale(scale: number) {\r\n const ref = new Polar(0, 0);\r\n this.scaleToRef(scale, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Scales the current polar\r\n * @param scale defines the multiplication factor\r\n * @returns the current polar\r\n */\r\n public scaleInPlace(scale: number) {\r\n this.scaleToRef(scale, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the values of the current polar\r\n * @param radius the new radius\r\n * @param theta the new theta\r\n * @returns the current polar\r\n */\r\n public set(radius: number, theta: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the values of the current polar\r\n * @param value the new values\r\n * @returns the current polar\r\n */\r\n public setAll(value: number) {\r\n this.set(value, value);\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the rectangular coordinates of the current Polar\r\n * @param ref the reference to assign the result\r\n * @returns the updated reference\r\n */\r\n public toVector2ToRef(ref: Vector2): Vector2 {\r\n const x = this.radius * Math.cos(this.theta);\r\n const y = this.radius * Math.sin(this.theta);\r\n ref.set(x, y);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Gets the rectangular coordinates of the current Polar\r\n * @returns the rectangular coordinates\r\n */\r\n public toVector2(): Vector2 {\r\n const ref = new Vector2(0, 0);\r\n return this.toVector2ToRef(ref);\r\n }\r\n\r\n /**\r\n * Converts a given Vector2 to its polar coordinates\r\n * @param v the Vector2 to convert\r\n * @param ref the reference to assign the result\r\n * @returns the updated reference\r\n */\r\n public static FromVector2ToRef(v: Vector2, ref: Polar): Polar {\r\n const theta = Math.sign(v.y) * Math.acos(v.x / v.length());\r\n ref.radius = v.length();\r\n ref.theta = theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Converts a given Vector2 to its polar coordinates\r\n * @param v the Vector2 to convert\r\n * @returns a Polar\r\n */\r\n public static FromVector2(v: Vector2): Polar {\r\n const polar = new Polar(0, 0);\r\n Polar.FromVector2ToRef(v, polar);\r\n return polar;\r\n }\r\n\r\n /**\r\n * Converts an array of floats to a polar\r\n * @param array the array to convert\r\n * @returns the converted polar\r\n */\r\n public static FromArray(array: number[]) {\r\n return new Polar(array[0], array[1]);\r\n }\r\n}\r\n\r\n/**\r\n * Class used for (radius, theta, phi) vector representation.\r\n */\r\nexport class Spherical {\r\n public radius: number;\r\n public theta: number;\r\n public phi: number;\r\n\r\n /**\r\n * @param radius spherical radius\r\n * @param theta angle from positive y axis to radial line from 0 to PI (vertical)\r\n * @param phi angle from positive x axis measured anticlockwise from -PI to PI (horizontal)\r\n */\r\n constructor(radius: number, theta: number, phi: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n this.phi = phi;\r\n }\r\n\r\n /**\r\n * Gets the class name\r\n * @returns the string \"Spherical\"\r\n */\r\n public getClassName() {\r\n return \"Spherical\";\r\n }\r\n\r\n /**\r\n * Converts the current spherical to a string\r\n * @returns the current spherical as a string\r\n */\r\n public toString() {\r\n return JSON.stringify(this);\r\n }\r\n\r\n /**\r\n * Converts the current spherical to an array\r\n * @reutrns the current spherical as an array\r\n */\r\n public asArray() {\r\n return [this.radius, this.theta, this.phi];\r\n }\r\n\r\n /**\r\n * Adds the current Spherical and the given Spherical and stores the result\r\n * @param spherical the spherical to add\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public addToRef(spherical: Spherical, ref: Spherical) {\r\n ref.radius = this.radius + spherical.radius;\r\n ref.theta = this.theta + spherical.theta;\r\n ref.phi = this.phi + spherical.phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Adds the current Spherical and the given Spherical\r\n * @param spherical the spherical to add\r\n * @returns the sum spherical\r\n */\r\n public add(spherical: Spherical) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.addToRef(spherical, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Adds the given spherical to the current spherical\r\n * @param spherical the spherical to add\r\n * @returns the current spherical\r\n */\r\n public addInPlace(spherical: Spherical) {\r\n this.addToRef(spherical, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the provided values to the current spherical\r\n * @param radius the amount to add to the radius\r\n * @param theta the amount to add to the theta\r\n * @param phi the amount to add to the phi\r\n * @returns the current spherical\r\n */\r\n public addInPlaceFromFloats(radius: number, theta: number, phi: number) {\r\n this.radius += radius;\r\n this.theta += theta;\r\n this.phi += phi;\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtracts the given Spherical from the current Spherical and stores the result\r\n * @param spherical the spherical to subtract\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public subtractToRef(spherical: Spherical, ref: Spherical) {\r\n ref.radius = this.radius - spherical.radius;\r\n ref.theta = this.theta - spherical.theta;\r\n ref.phi = this.phi - spherical.phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given Spherical from the current Spherical\r\n * @param spherical the spherical to subtract\r\n * @returns the difference spherical\r\n */\r\n public subtract(spherical: Spherical) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.subtractToRef(spherical, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given Spherical from the current Spherical\r\n * @param spherical the spherical to subtract\r\n * @returns the current spherical\r\n */\r\n public subtractInPlace(spherical: Spherical) {\r\n this.subtractToRef(spherical, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current spherical\r\n * @param radius the amount to subtract from the radius\r\n * @param theta the amount to subtract from the theta\r\n * @param phi the amount to subtract from the phi\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public subtractFromFloatsToRef(radius: number, theta: number, phi: number, ref: Spherical) {\r\n ref.radius = this.radius - radius;\r\n ref.theta = this.theta - theta;\r\n ref.phi = this.phi - phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current spherical\r\n * @param radius the amount to subtract from the radius\r\n * @param theta the amount to subtract from the theta\r\n * @param phi the amount to subtract from the phi\r\n * @returns the difference spherical\r\n */\r\n public subtractFromFloats(radius: number, theta: number, phi: number) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.subtractFromFloatsToRef(radius, theta, phi, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Spherical with the current Spherical and stores the result\r\n * @param spherical the spherical to multiply\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public multiplyToRef(spherical: Spherical, ref: Spherical) {\r\n ref.radius = this.radius * spherical.radius;\r\n ref.theta = this.theta * spherical.theta;\r\n ref.phi = this.phi * spherical.phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Spherical with the current Spherical\r\n * @param spherical the spherical to multiply\r\n * @returns the product spherical\r\n */\r\n public multiply(spherical: Spherical) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.multiplyToRef(spherical, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Spherical with the current Spherical\r\n * @param spherical the spherical to multiply\r\n * @returns the current spherical\r\n */\r\n public multiplyInPlace(spherical: Spherical) {\r\n this.multiplyToRef(spherical, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Divides the current Spherical by the given Spherical and stores the result\r\n * @param spherical the spherical to divide\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public divideToRef(spherical: Spherical, ref: Spherical) {\r\n ref.radius = this.radius / spherical.radius;\r\n ref.theta = this.theta / spherical.theta;\r\n ref.phi = this.phi / spherical.phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Divides the current Spherical by the given Spherical\r\n * @param spherical the spherical to divide\r\n * @returns the quotient spherical\r\n */\r\n public divide(spherical: Spherical) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.divideToRef(spherical, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Divides the current Spherical by the given Spherical\r\n * @param spherical the spherical to divide\r\n * @returns the current spherical\r\n */\r\n public divideInPlace(spherical: Spherical) {\r\n this.divideToRef(spherical, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Clones the current spherical\r\n * @returns a clone of the current spherical\r\n */\r\n public clone() {\r\n return new Spherical(this.radius, this.theta, this.phi);\r\n }\r\n\r\n /**\r\n * Copies the source spherical into the current spherical\r\n * @param source the spherical to copy from\r\n * @returns the current spherical\r\n */\r\n public copyFrom(source: Spherical) {\r\n this.radius = source.radius;\r\n this.theta = source.theta;\r\n this.phi = source.phi;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given values into the current spherical\r\n * @param radius the radius to use\r\n * @param theta the theta to use\r\n * @param phi the phi to use\r\n * @returns the current spherical\r\n */\r\n public copyFromFloats(radius: number, theta: number, phi: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n this.phi = phi;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scales the current spherical and stores the result\r\n * @param scale defines the multiplication factor\r\n * @param ref where to store the result\r\n * @returns the updated ref\r\n */\r\n public scaleToRef(scale: number, ref: Spherical) {\r\n ref.radius = this.radius * scale;\r\n ref.theta = this.theta * scale;\r\n ref.phi = this.phi * scale;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Scales the current spherical and returns a new spherical with the scaled coordinates\r\n * @param scale defines the multiplication factor\r\n * @returns the scaled spherical\r\n */\r\n public scale(scale: number) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.scaleToRef(scale, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Scales the current spherical\r\n * @param scale defines the multiplication factor\r\n * @returns the current spherical\r\n */\r\n public scaleInPlace(scale: number) {\r\n this.scaleToRef(scale, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the values of the current spherical\r\n * @param radius the new radius\r\n * @param theta the new theta\r\n * @param phi the new phi\r\n * @returns the current spherical\r\n */\r\n public set(radius: number, theta: number, phi: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n this.phi = phi;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the values of the current spherical\r\n * @param value the new values\r\n * @returns the current spherical\r\n */\r\n public setAll(value: number) {\r\n this.set(value, value, value);\r\n return this;\r\n }\r\n\r\n /**\r\n * Assigns the rectangular coordinates of the current Spherical to a Vector3\r\n * @param ref the Vector3 to update\r\n * @returns the updated Vector3\r\n */\r\n public toVector3ToRef(ref: DeepImmutable<Vector3>): Vector3 {\r\n const x = this.radius * Math.sin(this.theta) * Math.cos(this.phi);\r\n const y = this.radius * Math.cos(this.theta);\r\n const z = this.radius * Math.sin(this.theta) * Math.sin(this.phi);\r\n ref.set(x, y, z);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Gets a Vector3 from the current spherical coordinates\r\n * @returns the (x, y,z) form of the current Spherical\r\n */\r\n public toVector3(): Vector3 {\r\n const ref = new Vector3(0, 0, 0);\r\n return this.toVector3ToRef(ref);\r\n }\r\n\r\n /**\r\n * Assigns the spherical coordinates from a Vector3\r\n * @param vector the vector to convert\r\n * @param ref the Spherical to update\r\n * @returns the updated ref\r\n */\r\n public static FromVector3ToRef(vector: DeepImmutable<Vector3>, ref: Spherical): Spherical {\r\n ref.radius = vector.length();\r\n ref.theta = Math.acos(vector.y / ref.radius);\r\n ref.phi = Math.atan2(vector.z, vector.x);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Gets a Spherical from a Vector3\r\n * @param vector defines the vector in (x, y, z) coordinate space\r\n * @returns a new Spherical\r\n */\r\n public static FromVector3(vector: DeepImmutable<Vector3>): Spherical {\r\n const spherical = new Spherical(0, 0, 0);\r\n Spherical.FromVector3ToRef(vector, spherical);\r\n return spherical;\r\n }\r\n\r\n /**\r\n * Converts an array of floats to a spherical\r\n * @param array the array to convert\r\n * @returns the converted spherical\r\n */\r\n public static FromArray(array: number[]) {\r\n return new Spherical(array[0], array[1], array[2]);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"math.polar.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.polar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,KAAK;IACd;;;;OAIG;IACH,YACW,MAAc,EACd,KAAa;QADb,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAQ;QAEpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,OAAO,CAAC;IACnB,CAAC;IAED;;;OAGG;IACI,QAAQ;QACX,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED;;;OAGG;IACI,OAAO;QACV,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACI,QAAQ,CAAC,KAAY,EAAE,GAAU;QACpC,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QACxC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACrC,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,KAAY;QACnB,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC1B,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAC,KAAY;QAC1B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CA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;IACvD,CAAC;CACJ","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { DeepImmutable } from \"../types\";\r\nimport { Vector2, Vector3 } from \"./math.vector\";\r\n\r\n/**\r\n * Class used to store (r, theta) vector representation\r\n */\r\nexport class Polar {\r\n /**\r\n * Creates a new Polar object\r\n * @param radius the radius of the vector\r\n * @param theta the angle of the vector\r\n */\r\n constructor(\r\n public radius: number,\r\n public theta: number\r\n ) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n }\r\n\r\n /**\r\n * Gets the class name\r\n * @returns the string \"Polar\"\r\n */\r\n public getClassName() {\r\n return \"Polar\";\r\n }\r\n\r\n /**\r\n * Converts the current polar to a string\r\n * @returns the current polar as a string\r\n */\r\n public toString() {\r\n return JSON.stringify(this);\r\n }\r\n\r\n /**\r\n * Converts the current polar to an array\r\n * @returns the current polar as an array\r\n */\r\n public asArray() {\r\n return [this.radius, this.theta];\r\n }\r\n\r\n /**\r\n * Adds the current Polar and the given Polar and stores the result\r\n * @param polar the polar to add\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public addToRef(polar: Polar, ref: Polar) {\r\n ref.radius = this.radius + polar.radius;\r\n ref.theta = this.theta + polar.theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Adds the current Polar and the given Polar\r\n * @param polar the polar to add\r\n * @returns the sum polar\r\n */\r\n public add(polar: Polar) {\r\n const ref = new Polar(0, 0);\r\n this.addToRef(polar, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Adds the given polar to the current polar\r\n * @param polar the polar to add\r\n * @returns the current polar\r\n */\r\n public addInPlace(polar: Polar) {\r\n this.addToRef(polar, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the provided values to the current polar\r\n * @param radius the amount to add to the radius\r\n * @param theta the amount to add to the theta\r\n * @returns the current polar\r\n */\r\n public addInPlaceFromFloats(radius: number, theta: number) {\r\n this.radius += radius;\r\n this.theta += theta;\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtracts the given Polar from the current Polar and stores the result\r\n * @param polar the polar to subtract\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public subtractToRef(polar: Polar, ref: Polar) {\r\n ref.radius = this.radius - polar.radius;\r\n ref.theta = this.theta - polar.theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given Polar from the current Polar\r\n * @param polar the polar to subtract\r\n * @returns the difference polar\r\n */\r\n public subtract(polar: Polar) {\r\n const ref = new Polar(0, 0);\r\n this.subtractToRef(polar, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given Polar from the current Polar\r\n * @param polar the polar to subtract\r\n * @returns the current polar\r\n */\r\n public subtractInPlace(polar: Polar) {\r\n this.subtractToRef(polar, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current polar\r\n * @param radius the amount to subtract from the radius\r\n * @param theta the amount to subtract from the theta\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public subtractFromFloatsToRef(radius: number, theta: number, ref: Polar) {\r\n ref.radius = this.radius - radius;\r\n ref.theta = this.theta - theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current polar\r\n * @param radius the amount to subtract from the radius\r\n * @param theta the amount to subtract from the theta\r\n * @returns the difference polar\r\n */\r\n public subtractFromFloats(radius: number, theta: number) {\r\n const ref = new Polar(0, 0);\r\n this.subtractFromFloatsToRef(radius, theta, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Polar with the current Polar and stores the result\r\n * @param polar the polar to multiply\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public multiplyToRef(polar: Polar, ref: Polar) {\r\n ref.radius = this.radius * polar.radius;\r\n ref.theta = this.theta * polar.theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Polar with the current Polar\r\n * @param polar the polar to multiply\r\n * @returns the product polar\r\n */\r\n public multiply(polar: Polar) {\r\n const ref = new Polar(0, 0);\r\n this.multiplyToRef(polar, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Polar with the current Polar\r\n * @param polar the polar to multiply\r\n * @returns the current polar\r\n */\r\n public multiplyInPlace(polar: Polar) {\r\n this.multiplyToRef(polar, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Divides the current Polar by the given Polar and stores the result\r\n * @param polar the polar to divide\r\n * @param ref the polar to store the result in\r\n * @returns the updated ref\r\n */\r\n public divideToRef(polar: Polar, ref: Polar) {\r\n ref.radius = this.radius / polar.radius;\r\n ref.theta = this.theta / polar.theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Divides the current Polar by the given Polar\r\n * @param polar the polar to divide\r\n * @returns the quotient polar\r\n */\r\n public divide(polar: Polar) {\r\n const ref = new Polar(0, 0);\r\n this.divideToRef(polar, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Divides the current Polar by the given Polar\r\n * @param polar the polar to divide\r\n * @returns the current polar\r\n */\r\n public divideInPlace(polar: Polar) {\r\n this.divideToRef(polar, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Clones the current polar\r\n * @returns a clone of the current polar\r\n */\r\n public clone() {\r\n return new Polar(this.radius, this.theta);\r\n }\r\n\r\n /**\r\n * Copies the source polar into the current polar\r\n * @param source the polar to copy from\r\n * @returns the current polar\r\n */\r\n public copyFrom(source: Polar) {\r\n this.radius = source.radius;\r\n this.theta = source.theta;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given values into the current polar\r\n * @param radius the radius to use\r\n * @param theta the theta to use\r\n * @returns the current polar\r\n */\r\n public copyFromFloats(radius: number, theta: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scales the current polar and stores the result\r\n * @param scale defines the multiplication factor\r\n * @param ref where to store the result\r\n * @returns the updated ref\r\n */\r\n public scaleToRef(scale: number, ref: Polar) {\r\n ref.radius = this.radius * scale;\r\n ref.theta = this.theta * scale;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Scales the current polar and returns a new polar with the scaled coordinates\r\n * @param scale defines the multiplication factor\r\n * @returns the scaled polar\r\n */\r\n public scale(scale: number) {\r\n const ref = new Polar(0, 0);\r\n this.scaleToRef(scale, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Scales the current polar\r\n * @param scale defines the multiplication factor\r\n * @returns the current polar\r\n */\r\n public scaleInPlace(scale: number) {\r\n this.scaleToRef(scale, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the values of the current polar\r\n * @param radius the new radius\r\n * @param theta the new theta\r\n * @returns the current polar\r\n */\r\n public set(radius: number, theta: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the values of the current polar\r\n * @param value the new values\r\n * @returns the current polar\r\n */\r\n public setAll(value: number) {\r\n this.set(value, value);\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets the rectangular coordinates of the current Polar\r\n * @param ref the reference to assign the result\r\n * @returns the updated reference\r\n */\r\n public toVector2ToRef(ref: Vector2): Vector2 {\r\n const x = this.radius * Math.cos(this.theta);\r\n const y = this.radius * Math.sin(this.theta);\r\n ref.set(x, y);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Gets the rectangular coordinates of the current Polar\r\n * @returns the rectangular coordinates\r\n */\r\n public toVector2(): Vector2 {\r\n const ref = new Vector2(0, 0);\r\n return this.toVector2ToRef(ref);\r\n }\r\n\r\n /**\r\n * Converts a given Vector2 to its polar coordinates\r\n * @param v the Vector2 to convert\r\n * @param ref the reference to assign the result\r\n * @returns the updated reference\r\n */\r\n public static FromVector2ToRef(v: Vector2, ref: Polar): Polar {\r\n const theta = Math.sign(v.y) * Math.acos(v.x / v.length());\r\n ref.radius = v.length();\r\n ref.theta = theta;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Converts a given Vector2 to its polar coordinates\r\n * @param v the Vector2 to convert\r\n * @returns a Polar\r\n */\r\n public static FromVector2(v: Vector2): Polar {\r\n const polar = new Polar(0, 0);\r\n Polar.FromVector2ToRef(v, polar);\r\n return polar;\r\n }\r\n\r\n /**\r\n * Converts an array of floats to a polar\r\n * @param array the array to convert\r\n * @returns the converted polar\r\n */\r\n public static FromArray(array: number[]) {\r\n return new Polar(array[0], array[1]);\r\n }\r\n}\r\n\r\n/**\r\n * Class used for (radius, theta, phi) vector representation.\r\n */\r\nexport class Spherical {\r\n /**\r\n * Creates a new Spherical object from the given spherical coordinates\r\n * @param radius spherical radius\r\n * @param theta angle from positive y axis to radial line from 0 to PI (vertical)\r\n * @param phi angle from positive x axis measured anticlockwise from -PI to PI (horizontal)\r\n */\r\n constructor(\r\n public radius: number,\r\n public theta: number,\r\n public phi: number\r\n ) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n this.phi = phi;\r\n }\r\n\r\n /**\r\n * Gets the class name\r\n * @returns the string \"Spherical\"\r\n */\r\n public getClassName() {\r\n return \"Spherical\";\r\n }\r\n\r\n /**\r\n * Converts the current spherical to a string\r\n * @returns the current spherical as a string\r\n */\r\n public toString() {\r\n return JSON.stringify(this);\r\n }\r\n\r\n /**\r\n * Converts the current spherical to an array\r\n * @returns the current spherical as an array\r\n */\r\n public asArray() {\r\n return [this.radius, this.theta, this.phi];\r\n }\r\n\r\n /**\r\n * Adds the current Spherical and the given Spherical and stores the result\r\n * @param spherical the spherical to add\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public addToRef(spherical: Spherical, ref: Spherical) {\r\n ref.radius = this.radius + spherical.radius;\r\n ref.theta = this.theta + spherical.theta;\r\n ref.phi = this.phi + spherical.phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Adds the current Spherical and the given Spherical\r\n * @param spherical the spherical to add\r\n * @returns the sum spherical\r\n */\r\n public add(spherical: Spherical) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.addToRef(spherical, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Adds the given spherical to the current spherical\r\n * @param spherical the spherical to add\r\n * @returns the current spherical\r\n */\r\n public addInPlace(spherical: Spherical) {\r\n this.addToRef(spherical, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds the provided values to the current spherical\r\n * @param radius the amount to add to the radius\r\n * @param theta the amount to add to the theta\r\n * @param phi the amount to add to the phi\r\n * @returns the current spherical\r\n */\r\n public addInPlaceFromFloats(radius: number, theta: number, phi: number) {\r\n this.radius += radius;\r\n this.theta += theta;\r\n this.phi += phi;\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtracts the given Spherical from the current Spherical and stores the result\r\n * @param spherical the spherical to subtract\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public subtractToRef(spherical: Spherical, ref: Spherical) {\r\n ref.radius = this.radius - spherical.radius;\r\n ref.theta = this.theta - spherical.theta;\r\n ref.phi = this.phi - spherical.phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given Spherical from the current Spherical\r\n * @param spherical the spherical to subtract\r\n * @returns the difference spherical\r\n */\r\n public subtract(spherical: Spherical) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.subtractToRef(spherical, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given Spherical from the current Spherical\r\n * @param spherical the spherical to subtract\r\n * @returns the current spherical\r\n */\r\n public subtractInPlace(spherical: Spherical) {\r\n this.subtractToRef(spherical, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current spherical\r\n * @param radius the amount to subtract from the radius\r\n * @param theta the amount to subtract from the theta\r\n * @param phi the amount to subtract from the phi\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public subtractFromFloatsToRef(radius: number, theta: number, phi: number, ref: Spherical) {\r\n ref.radius = this.radius - radius;\r\n ref.theta = this.theta - theta;\r\n ref.phi = this.phi - phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Subtracts the given floats from the current spherical\r\n * @param radius the amount to subtract from the radius\r\n * @param theta the amount to subtract from the theta\r\n * @param phi the amount to subtract from the phi\r\n * @returns the difference spherical\r\n */\r\n public subtractFromFloats(radius: number, theta: number, phi: number) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.subtractFromFloatsToRef(radius, theta, phi, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Spherical with the current Spherical and stores the result\r\n * @param spherical the spherical to multiply\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public multiplyToRef(spherical: Spherical, ref: Spherical) {\r\n ref.radius = this.radius * spherical.radius;\r\n ref.theta = this.theta * spherical.theta;\r\n ref.phi = this.phi * spherical.phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Spherical with the current Spherical\r\n * @param spherical the spherical to multiply\r\n * @returns the product spherical\r\n */\r\n public multiply(spherical: Spherical) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.multiplyToRef(spherical, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Multiplies the given Spherical with the current Spherical\r\n * @param spherical the spherical to multiply\r\n * @returns the current spherical\r\n */\r\n public multiplyInPlace(spherical: Spherical) {\r\n this.multiplyToRef(spherical, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Divides the current Spherical by the given Spherical and stores the result\r\n * @param spherical the spherical to divide\r\n * @param ref the spherical to store the result in\r\n * @returns the updated ref\r\n */\r\n public divideToRef(spherical: Spherical, ref: Spherical) {\r\n ref.radius = this.radius / spherical.radius;\r\n ref.theta = this.theta / spherical.theta;\r\n ref.phi = this.phi / spherical.phi;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Divides the current Spherical by the given Spherical\r\n * @param spherical the spherical to divide\r\n * @returns the quotient spherical\r\n */\r\n public divide(spherical: Spherical) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.divideToRef(spherical, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Divides the current Spherical by the given Spherical\r\n * @param spherical the spherical to divide\r\n * @returns the current spherical\r\n */\r\n public divideInPlace(spherical: Spherical) {\r\n this.divideToRef(spherical, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Clones the current spherical\r\n * @returns a clone of the current spherical\r\n */\r\n public clone() {\r\n return new Spherical(this.radius, this.theta, this.phi);\r\n }\r\n\r\n /**\r\n * Copies the source spherical into the current spherical\r\n * @param source the spherical to copy from\r\n * @returns the current spherical\r\n */\r\n public copyFrom(source: Spherical) {\r\n this.radius = source.radius;\r\n this.theta = source.theta;\r\n this.phi = source.phi;\r\n return this;\r\n }\r\n\r\n /**\r\n * Copies the given values into the current spherical\r\n * @param radius the radius to use\r\n * @param theta the theta to use\r\n * @param phi the phi to use\r\n * @returns the current spherical\r\n */\r\n public copyFromFloats(radius: number, theta: number, phi: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n this.phi = phi;\r\n return this;\r\n }\r\n\r\n /**\r\n * Scales the current spherical and stores the result\r\n * @param scale defines the multiplication factor\r\n * @param ref where to store the result\r\n * @returns the updated ref\r\n */\r\n public scaleToRef(scale: number, ref: Spherical) {\r\n ref.radius = this.radius * scale;\r\n ref.theta = this.theta * scale;\r\n ref.phi = this.phi * scale;\r\n return ref;\r\n }\r\n\r\n /**\r\n * Scales the current spherical and returns a new spherical with the scaled coordinates\r\n * @param scale defines the multiplication factor\r\n * @returns the scaled spherical\r\n */\r\n public scale(scale: number) {\r\n const ref = new Spherical(0, 0, 0);\r\n this.scaleToRef(scale, ref);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Scales the current spherical\r\n * @param scale defines the multiplication factor\r\n * @returns the current spherical\r\n */\r\n public scaleInPlace(scale: number) {\r\n this.scaleToRef(scale, this);\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the values of the current spherical\r\n * @param radius the new radius\r\n * @param theta the new theta\r\n * @param phi the new phi\r\n * @returns the current spherical\r\n */\r\n public set(radius: number, theta: number, phi: number) {\r\n this.radius = radius;\r\n this.theta = theta;\r\n this.phi = phi;\r\n return this;\r\n }\r\n\r\n /**\r\n * Sets the values of the current spherical\r\n * @param value the new values\r\n * @returns the current spherical\r\n */\r\n public setAll(value: number) {\r\n this.set(value, value, value);\r\n return this;\r\n }\r\n\r\n /**\r\n * Assigns the rectangular coordinates of the current Spherical to a Vector3\r\n * @param ref the Vector3 to update\r\n * @returns the updated Vector3\r\n */\r\n public toVector3ToRef(ref: DeepImmutable<Vector3>): Vector3 {\r\n const x = this.radius * Math.sin(this.theta) * Math.cos(this.phi);\r\n const y = this.radius * Math.cos(this.theta);\r\n const z = this.radius * Math.sin(this.theta) * Math.sin(this.phi);\r\n ref.set(x, y, z);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Gets a Vector3 from the current spherical coordinates\r\n * @returns the (x, y,z) form of the current Spherical\r\n */\r\n public toVector3(): Vector3 {\r\n const ref = new Vector3(0, 0, 0);\r\n return this.toVector3ToRef(ref);\r\n }\r\n\r\n /**\r\n * Assigns the spherical coordinates from a Vector3\r\n * @param vector the vector to convert\r\n * @param ref the Spherical to update\r\n * @returns the updated ref\r\n */\r\n public static FromVector3ToRef(vector: DeepImmutable<Vector3>, ref: Spherical): Spherical {\r\n ref.radius = vector.length();\r\n ref.theta = Math.acos(vector.y / ref.radius);\r\n ref.phi = Math.atan2(vector.z, vector.x);\r\n return ref;\r\n }\r\n\r\n /**\r\n * Gets a Spherical from a Vector3\r\n * @param vector defines the vector in (x, y, z) coordinate space\r\n * @returns a new Spherical\r\n */\r\n public static FromVector3(vector: DeepImmutable<Vector3>): Spherical {\r\n const spherical = new Spherical(0, 0, 0);\r\n Spherical.FromVector3ToRef(vector, spherical);\r\n return spherical;\r\n }\r\n\r\n /**\r\n * Converts an array of floats to a spherical\r\n * @param array the array to convert\r\n * @returns the converted spherical\r\n */\r\n public static FromArray(array: number[]) {\r\n return new Spherical(array[0], array[1], array[2]);\r\n }\r\n}\r\n"]}
|
package/Maths/math.vector.d.ts
CHANGED
|
@@ -744,7 +744,7 @@ export declare class Vector3 {
|
|
|
744
744
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#230
|
|
745
745
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#231
|
|
746
746
|
* @param result defines the Vector3 object where to store the resultant normal
|
|
747
|
-
* returns the result
|
|
747
|
+
* @returns the result
|
|
748
748
|
*/
|
|
749
749
|
getNormalToRef(result: DeepImmutable<Vector3>): Vector3;
|
|
750
750
|
/**
|
|
@@ -1097,6 +1097,7 @@ export declare class Vector3 {
|
|
|
1097
1097
|
* @param vector1 End vector
|
|
1098
1098
|
* @param slerp amount (will be clamped between 0 and 1)
|
|
1099
1099
|
* @param result The slerped vector
|
|
1100
|
+
* @returns The slerped vector
|
|
1100
1101
|
*/
|
|
1101
1102
|
static SlerpToRef<T extends Vector3 = Vector3>(vector0: Vector3, vector1: Vector3, slerp: number, result: T): T;
|
|
1102
1103
|
/**
|
|
@@ -1107,6 +1108,7 @@ export declare class Vector3 {
|
|
|
1107
1108
|
* @param deltaTime current interpolation frame
|
|
1108
1109
|
* @param lerpTime total interpolation time
|
|
1109
1110
|
* @param result the smoothed vector
|
|
1111
|
+
* @returns the smoothed vector
|
|
1110
1112
|
*/
|
|
1111
1113
|
static SmoothToRef<T extends Vector3 = Vector3>(source: Vector3, goal: Vector3, deltaTime: number, lerpTime: number, result: T): T;
|
|
1112
1114
|
/**
|
|
@@ -1140,6 +1142,7 @@ export declare class Vector3 {
|
|
|
1140
1142
|
* @param offset defines the offset in the source array
|
|
1141
1143
|
* @param result defines the Vector3 where to store the result
|
|
1142
1144
|
* @deprecated Please use FromArrayToRef instead.
|
|
1145
|
+
* @returns result input
|
|
1143
1146
|
*/
|
|
1144
1147
|
static FromFloatArrayToRef<T extends Vector3>(array: DeepImmutable<Float32Array>, offset: number, result: T): T;
|
|
1145
1148
|
/**
|
|
@@ -1149,6 +1152,7 @@ export declare class Vector3 {
|
|
|
1149
1152
|
* @param y defines the y coordinate of the source
|
|
1150
1153
|
* @param z defines the z coordinate of the source
|
|
1151
1154
|
* @param result defines the Vector3 where to store the result
|
|
1155
|
+
* @returns the result vector
|
|
1152
1156
|
*/
|
|
1153
1157
|
static FromFloatsToRef<T extends Vector3 = Vector3>(x: number, y: number, z: number, result: T): T;
|
|
1154
1158
|
/**
|
|
@@ -1483,7 +1487,7 @@ export declare class Vector3 {
|
|
|
1483
1487
|
* Reflects a vector off the plane defined by a normalized normal to reference
|
|
1484
1488
|
* @param inDirection defines the vector direction
|
|
1485
1489
|
* @param normal defines the normal - Must be normalized
|
|
1486
|
-
* @param
|
|
1490
|
+
* @param ref defines the Vector3 where to store the result
|
|
1487
1491
|
* @returns the resulting vector
|
|
1488
1492
|
*/
|
|
1489
1493
|
static ReflectToRef<T extends Vector3>(inDirection: DeepImmutable<Vector3>, normal: DeepImmutable<Vector3>, ref: T): T;
|
|
@@ -2486,6 +2490,7 @@ export declare class Quaternion {
|
|
|
2486
2490
|
* @param deltaTime current interpolation frame
|
|
2487
2491
|
* @param lerpTime total interpolation time
|
|
2488
2492
|
* @param result the smoothed quaternion
|
|
2493
|
+
* @returns the smoothed quaternion
|
|
2489
2494
|
*/
|
|
2490
2495
|
static SmoothToRef<T extends Quaternion>(source: Quaternion, goal: Quaternion, deltaTime: number, lerpTime: number, result: T): T;
|
|
2491
2496
|
/**
|
|
@@ -3095,6 +3100,7 @@ export declare class Matrix {
|
|
|
3095
3100
|
* Writes to the given matrix a normal matrix, computed from this one (using values from identity matrix for fourth row and column).
|
|
3096
3101
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#17
|
|
3097
3102
|
* @param ref matrix to store the result
|
|
3103
|
+
* @returns the reference matrix
|
|
3098
3104
|
*/
|
|
3099
3105
|
toNormalMatrix<T extends Matrix>(ref: T): T;
|
|
3100
3106
|
/**
|
|
@@ -3110,10 +3116,12 @@ export declare class Matrix {
|
|
|
3110
3116
|
getRotationMatrixToRef<T extends Matrix>(result: T): T;
|
|
3111
3117
|
/**
|
|
3112
3118
|
* Toggles model matrix from being right handed to left handed in place and vice versa
|
|
3119
|
+
* @returns the current updated matrix
|
|
3113
3120
|
*/
|
|
3114
3121
|
toggleModelMatrixHandInPlace(): this;
|
|
3115
3122
|
/**
|
|
3116
3123
|
* Toggles projection matrix from being right handed to left handed in place and vice versa
|
|
3124
|
+
* @returns the current updated matrix
|
|
3117
3125
|
*/
|
|
3118
3126
|
toggleProjectionMatrixHandInPlace(): this;
|
|
3119
3127
|
/**
|
|
@@ -3166,7 +3174,6 @@ export declare class Matrix {
|
|
|
3166
3174
|
* @param initialM43 defines 3rd value of 4th row
|
|
3167
3175
|
* @param initialM44 defines 4th value of 4th row
|
|
3168
3176
|
* @param result defines the target matrix
|
|
3169
|
-
* @returns result input
|
|
3170
3177
|
*/
|
|
3171
3178
|
static FromValuesToRef(initialM11: number, initialM12: number, initialM13: number, initialM14: number, initialM21: number, initialM22: number, initialM23: number, initialM24: number, initialM31: number, initialM32: number, initialM33: number, initialM34: number, initialM41: number, initialM42: number, initialM43: number, initialM44: number, result: Matrix): void;
|
|
3172
3179
|
/**
|
|
@@ -3551,8 +3558,8 @@ export declare class Matrix {
|
|
|
3551
3558
|
* @param top defines the viewport top coordinate
|
|
3552
3559
|
* @param znear defines the near clip plane
|
|
3553
3560
|
* @param zfar defines the far clip plane
|
|
3554
|
-
* @param angle Angle (along X/Y Plane) to apply shear
|
|
3555
3561
|
* @param length Length of the shear
|
|
3562
|
+
* @param angle Angle (along X/Y Plane) to apply shear
|
|
3556
3563
|
* @param distance Distance from shear point
|
|
3557
3564
|
* @param result defines the target matrix
|
|
3558
3565
|
* @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)
|
|
@@ -3594,8 +3601,8 @@ export declare class Matrix {
|
|
|
3594
3601
|
* @param top defines the viewport top coordinate
|
|
3595
3602
|
* @param znear defines the near clip plane
|
|
3596
3603
|
* @param zfar defines the far clip plane
|
|
3597
|
-
* @param angle Angle (along X/Y Plane) to apply shear
|
|
3598
3604
|
* @param length Length of the shear
|
|
3605
|
+
* @param angle Angle (along X/Y Plane) to apply shear
|
|
3599
3606
|
* @param distance Distance from shear point
|
|
3600
3607
|
* @param result defines the target matrix
|
|
3601
3608
|
* @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)
|
package/Maths/math.vector.js
CHANGED
|
@@ -1075,7 +1075,7 @@ export class Vector3 {
|
|
|
1075
1075
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#230
|
|
1076
1076
|
* Example Playground https://playground.babylonjs.com/#R1F8YU#231
|
|
1077
1077
|
* @param result defines the Vector3 object where to store the resultant normal
|
|
1078
|
-
* returns the result
|
|
1078
|
+
* @returns the result
|
|
1079
1079
|
*/
|
|
1080
1080
|
getNormalToRef(result) {
|
|
1081
1081
|
/**
|
|
@@ -1681,6 +1681,7 @@ export class Vector3 {
|
|
|
1681
1681
|
* @param vector1 End vector
|
|
1682
1682
|
* @param slerp amount (will be clamped between 0 and 1)
|
|
1683
1683
|
* @param result The slerped vector
|
|
1684
|
+
* @returns The slerped vector
|
|
1684
1685
|
*/
|
|
1685
1686
|
static SlerpToRef(vector0, vector1, slerp, result) {
|
|
1686
1687
|
slerp = Scalar.Clamp(slerp, 0, 1);
|
|
@@ -1720,6 +1721,7 @@ export class Vector3 {
|
|
|
1720
1721
|
* @param deltaTime current interpolation frame
|
|
1721
1722
|
* @param lerpTime total interpolation time
|
|
1722
1723
|
* @param result the smoothed vector
|
|
1724
|
+
* @returns the smoothed vector
|
|
1723
1725
|
*/
|
|
1724
1726
|
static SmoothToRef(source, goal, deltaTime, lerpTime, result) {
|
|
1725
1727
|
Vector3.SlerpToRef(source, goal, lerpTime === 0 ? 1 : deltaTime / lerpTime, result);
|
|
@@ -1766,6 +1768,7 @@ export class Vector3 {
|
|
|
1766
1768
|
* @param offset defines the offset in the source array
|
|
1767
1769
|
* @param result defines the Vector3 where to store the result
|
|
1768
1770
|
* @deprecated Please use FromArrayToRef instead.
|
|
1771
|
+
* @returns result input
|
|
1769
1772
|
*/
|
|
1770
1773
|
static FromFloatArrayToRef(array, offset, result) {
|
|
1771
1774
|
return Vector3.FromArrayToRef(array, offset, result);
|
|
@@ -1777,6 +1780,7 @@ export class Vector3 {
|
|
|
1777
1780
|
* @param y defines the y coordinate of the source
|
|
1778
1781
|
* @param z defines the z coordinate of the source
|
|
1779
1782
|
* @param result defines the Vector3 where to store the result
|
|
1783
|
+
* @returns the result vector
|
|
1780
1784
|
*/
|
|
1781
1785
|
static FromFloatsToRef(x, y, z, result) {
|
|
1782
1786
|
result.copyFromFloats(x, y, z);
|
|
@@ -2293,7 +2297,7 @@ export class Vector3 {
|
|
|
2293
2297
|
* Reflects a vector off the plane defined by a normalized normal to reference
|
|
2294
2298
|
* @param inDirection defines the vector direction
|
|
2295
2299
|
* @param normal defines the normal - Must be normalized
|
|
2296
|
-
* @param
|
|
2300
|
+
* @param ref defines the Vector3 where to store the result
|
|
2297
2301
|
* @returns the resulting vector
|
|
2298
2302
|
*/
|
|
2299
2303
|
static ReflectToRef(inDirection, normal, ref) {
|
|
@@ -4069,6 +4073,7 @@ export class Quaternion {
|
|
|
4069
4073
|
* @param deltaTime current interpolation frame
|
|
4070
4074
|
* @param lerpTime total interpolation time
|
|
4071
4075
|
* @param result the smoothed quaternion
|
|
4076
|
+
* @returns the smoothed quaternion
|
|
4072
4077
|
*/
|
|
4073
4078
|
static SmoothToRef(source, goal, deltaTime, lerpTime, result) {
|
|
4074
4079
|
let slerp = lerpTime === 0 ? 1 : deltaTime / lerpTime;
|
|
@@ -5297,6 +5302,7 @@ export class Matrix {
|
|
|
5297
5302
|
* Writes to the given matrix a normal matrix, computed from this one (using values from identity matrix for fourth row and column).
|
|
5298
5303
|
* Example Playground - https://playground.babylonjs.com/#AV9X17#17
|
|
5299
5304
|
* @param ref matrix to store the result
|
|
5305
|
+
* @returns the reference matrix
|
|
5300
5306
|
*/
|
|
5301
5307
|
toNormalMatrix(ref) {
|
|
5302
5308
|
const tmp = MathTmp.Matrix[0];
|
|
@@ -5333,6 +5339,7 @@ export class Matrix {
|
|
|
5333
5339
|
}
|
|
5334
5340
|
/**
|
|
5335
5341
|
* Toggles model matrix from being right handed to left handed in place and vice versa
|
|
5342
|
+
* @returns the current updated matrix
|
|
5336
5343
|
*/
|
|
5337
5344
|
toggleModelMatrixHandInPlace() {
|
|
5338
5345
|
const m = this._m;
|
|
@@ -5346,6 +5353,7 @@ export class Matrix {
|
|
|
5346
5353
|
}
|
|
5347
5354
|
/**
|
|
5348
5355
|
* Toggles projection matrix from being right handed to left handed in place and vice versa
|
|
5356
|
+
* @returns the current updated matrix
|
|
5349
5357
|
*/
|
|
5350
5358
|
toggleProjectionMatrixHandInPlace() {
|
|
5351
5359
|
const m = this._m;
|
|
@@ -5425,7 +5433,6 @@ export class Matrix {
|
|
|
5425
5433
|
* @param initialM43 defines 3rd value of 4th row
|
|
5426
5434
|
* @param initialM44 defines 4th value of 4th row
|
|
5427
5435
|
* @param result defines the target matrix
|
|
5428
|
-
* @returns result input
|
|
5429
5436
|
*/
|
|
5430
5437
|
static FromValuesToRef(initialM11, initialM12, initialM13, initialM14, initialM21, initialM22, initialM23, initialM24, initialM31, initialM32, initialM33, initialM34, initialM41, initialM42, initialM43, initialM44, result) {
|
|
5431
5438
|
const m = result._m;
|
|
@@ -6170,8 +6177,8 @@ export class Matrix {
|
|
|
6170
6177
|
* @param top defines the viewport top coordinate
|
|
6171
6178
|
* @param znear defines the near clip plane
|
|
6172
6179
|
* @param zfar defines the far clip plane
|
|
6173
|
-
* @param angle Angle (along X/Y Plane) to apply shear
|
|
6174
6180
|
* @param length Length of the shear
|
|
6181
|
+
* @param angle Angle (along X/Y Plane) to apply shear
|
|
6175
6182
|
* @param distance Distance from shear point
|
|
6176
6183
|
* @param result defines the target matrix
|
|
6177
6184
|
* @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)
|
|
@@ -6232,8 +6239,8 @@ export class Matrix {
|
|
|
6232
6239
|
* @param top defines the viewport top coordinate
|
|
6233
6240
|
* @param znear defines the near clip plane
|
|
6234
6241
|
* @param zfar defines the far clip plane
|
|
6235
|
-
* @param angle Angle (along X/Y Plane) to apply shear
|
|
6236
6242
|
* @param length Length of the shear
|
|
6243
|
+
* @param angle Angle (along X/Y Plane) to apply shear
|
|
6237
6244
|
* @param distance Distance from shear point
|
|
6238
6245
|
* @param result defines the target matrix
|
|
6239
6246
|
* @param halfZRange true to generate NDC coordinates between 0 and 1 instead of -1 and 1 (default: false)
|