@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.
Files changed (710) hide show
  1. package/Actions/action.js +3 -1
  2. package/Actions/action.js.map +1 -1
  3. package/Actions/condition.js +1 -0
  4. package/Actions/condition.js.map +1 -1
  5. package/Actions/directActions.d.ts +2 -2
  6. package/Actions/directActions.js +2 -2
  7. package/Actions/directActions.js.map +1 -1
  8. package/Animations/pathCursor.js +1 -0
  9. package/Animations/pathCursor.js.map +1 -1
  10. package/Animations/runtimeAnimation.js +1 -1
  11. package/Animations/runtimeAnimation.js.map +1 -1
  12. package/Audio/audioEngine.js +5 -0
  13. package/Audio/audioEngine.js.map +1 -1
  14. package/Behaviors/Cameras/autoRotationBehavior.d.ts +3 -0
  15. package/Behaviors/Cameras/autoRotationBehavior.js +3 -0
  16. package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
  17. package/Behaviors/Meshes/pointerDragBehavior.d.ts +1 -0
  18. package/Behaviors/Meshes/pointerDragBehavior.js +2 -0
  19. package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
  20. package/Behaviors/Meshes/sixDofDragBehavior.js +14 -20
  21. package/Behaviors/Meshes/sixDofDragBehavior.js.map +1 -1
  22. package/Bones/bone.d.ts +2 -0
  23. package/Bones/bone.js +2 -0
  24. package/Bones/bone.js.map +1 -1
  25. package/Cameras/Inputs/BaseCameraPointersInput.d.ts +11 -11
  26. package/Cameras/Inputs/BaseCameraPointersInput.js +12 -12
  27. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  28. package/Cameras/Inputs/arcRotateCameraPointersInput.d.ts +9 -9
  29. package/Cameras/Inputs/arcRotateCameraPointersInput.js +9 -9
  30. package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
  31. package/Cameras/Inputs/followCameraKeyboardMoveInput.d.ts +3 -0
  32. package/Cameras/Inputs/followCameraKeyboardMoveInput.js +3 -0
  33. package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
  34. package/Cameras/Inputs/freeCameraMouseInput.d.ts +1 -1
  35. package/Cameras/Inputs/freeCameraMouseInput.js +1 -1
  36. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  37. package/Cameras/VR/vrExperienceHelper.d.ts +2 -2
  38. package/Cameras/VR/vrExperienceHelper.js +2 -2
  39. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  40. package/Cameras/arcRotateCamera.d.ts +2 -0
  41. package/Cameras/arcRotateCamera.js +2 -0
  42. package/Cameras/arcRotateCamera.js.map +1 -1
  43. package/Cameras/camera.d.ts +2 -0
  44. package/Cameras/camera.js +4 -0
  45. package/Cameras/camera.js.map +1 -1
  46. package/Cameras/followCamera.d.ts +1 -0
  47. package/Cameras/followCamera.js +1 -0
  48. package/Cameras/followCamera.js.map +1 -1
  49. package/Culling/Octrees/octree.d.ts +4 -4
  50. package/Culling/Octrees/octree.js +4 -4
  51. package/Culling/Octrees/octree.js.map +1 -1
  52. package/Debug/debugLayer.d.ts +4 -1
  53. package/Debug/debugLayer.js +4 -1
  54. package/Debug/debugLayer.js.map +1 -1
  55. package/Debug/physicsViewer.d.ts +6 -1
  56. package/Debug/physicsViewer.js +6 -1
  57. package/Debug/physicsViewer.js.map +1 -1
  58. package/Decorators/nodeDecorator.d.ts +5 -4
  59. package/Decorators/nodeDecorator.js +5 -4
  60. package/Decorators/nodeDecorator.js.map +1 -1
  61. package/DeviceInput/eventFactory.d.ts +2 -0
  62. package/DeviceInput/eventFactory.js +3 -0
  63. package/DeviceInput/eventFactory.js.map +1 -1
  64. package/DeviceInput/webDeviceInputSystem.js +3 -0
  65. package/DeviceInput/webDeviceInputSystem.js.map +1 -1
  66. package/Engines/Extensions/engine.multiview.js +2 -0
  67. package/Engines/Extensions/engine.multiview.js.map +1 -1
  68. package/Engines/Native/nativeDataStream.d.ts +32 -0
  69. package/Engines/Native/nativeDataStream.js +32 -0
  70. package/Engines/Native/nativeDataStream.js.map +1 -1
  71. package/Engines/Native/nativePipelineContext.d.ts +0 -3
  72. package/Engines/Native/nativePipelineContext.js +0 -3
  73. package/Engines/Native/nativePipelineContext.js.map +1 -1
  74. package/Engines/Native/nativeRenderTargetWrapper.js +2 -0
  75. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  76. package/Engines/WebGL/webGLHardwareTexture.js +1 -0
  77. package/Engines/WebGL/webGLHardwareTexture.js.map +1 -1
  78. package/Engines/WebGL/webGLPipelineContext.d.ts +0 -3
  79. package/Engines/WebGL/webGLPipelineContext.js +0 -3
  80. package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
  81. package/Engines/WebGL/webGLRenderTargetWrapper.js +1 -0
  82. package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
  83. package/Engines/WebGPU/Extensions/engine.readTexture.js +1 -0
  84. package/Engines/WebGPU/Extensions/engine.readTexture.js.map +1 -1
  85. package/Engines/WebGPU/webgpuCacheBindGroups.d.ts +1 -0
  86. package/Engines/WebGPU/webgpuCacheBindGroups.js +1 -0
  87. package/Engines/WebGPU/webgpuCacheBindGroups.js.map +1 -1
  88. package/Engines/WebGPU/webgpuCacheRenderPipeline.js +3 -0
  89. package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
  90. package/Engines/WebGPU/webgpuPipelineContext.d.ts +0 -3
  91. package/Engines/WebGPU/webgpuPipelineContext.js +0 -3
  92. package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
  93. package/Engines/WebGPU/webgpuShaderProcessingContext.js +1 -0
  94. package/Engines/WebGPU/webgpuShaderProcessingContext.js.map +1 -1
  95. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.d.ts +1 -1
  96. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +11 -2
  97. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
  98. package/Engines/WebGPU/webgpuTextureHelper.js +22 -0
  99. package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
  100. package/Engines/WebGPU/webgpuTextureManager.js +2 -1
  101. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  102. package/Engines/WebGPU/webgpuTintWASM.d.ts +1 -1
  103. package/Engines/WebGPU/webgpuTintWASM.js +5 -5
  104. package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
  105. package/Engines/engine.d.ts +1 -0
  106. package/Engines/engine.js +1 -0
  107. package/Engines/engine.js.map +1 -1
  108. package/Engines/nativeEngine.d.ts +4 -0
  109. package/Engines/nativeEngine.js +5 -0
  110. package/Engines/nativeEngine.js.map +1 -1
  111. package/Engines/thinEngine.js +7 -2
  112. package/Engines/thinEngine.js.map +1 -1
  113. package/Engines/webgpuEngine.d.ts +1 -1
  114. package/Engines/webgpuEngine.js +17 -1
  115. package/Engines/webgpuEngine.js.map +1 -1
  116. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +214 -2
  117. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +214 -6
  118. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -1
  119. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +15 -0
  120. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +9 -0
  121. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
  122. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +6 -6
  123. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
  124. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +4 -0
  125. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +4 -0
  126. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -1
  127. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +17 -1
  128. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +14 -1
  129. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
  130. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.d.ts +9 -0
  131. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js +9 -0
  132. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -1
  133. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.d.ts +5 -0
  134. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js +5 -0
  135. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js.map +1 -1
  136. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +16 -1
  137. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +13 -1
  138. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -1
  139. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +12 -1
  140. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +12 -1
  141. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
  142. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.d.ts +18 -0
  143. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js +9 -0
  144. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js.map +1 -1
  145. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +12 -0
  146. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +9 -0
  147. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
  148. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +15 -1
  149. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +12 -1
  150. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  151. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +18 -2
  152. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +15 -4
  153. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
  154. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +6 -0
  155. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +6 -0
  156. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
  157. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +6 -0
  158. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +6 -0
  159. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
  160. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +5 -2
  161. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +4 -1
  162. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
  163. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +15 -1
  164. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +12 -1
  165. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  166. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +4 -1
  167. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +3 -0
  168. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  169. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.d.ts +3 -0
  170. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js +3 -0
  171. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js.map +1 -1
  172. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +3 -0
  173. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +3 -0
  174. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
  175. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +3 -0
  176. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +3 -0
  177. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
  178. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +14 -1
  179. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +11 -1
  180. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
  181. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.d.ts +3 -0
  182. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js +3 -0
  183. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js.map +1 -1
  184. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +3 -0
  185. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +3 -0
  186. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
  187. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.d.ts +15 -2
  188. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js +12 -4
  189. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
  190. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.d.ts +14 -2
  191. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js +11 -4
  192. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -1
  193. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.d.ts +15 -2
  194. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js +12 -4
  195. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js.map +1 -1
  196. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +3 -0
  197. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +3 -0
  198. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
  199. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +6 -0
  200. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +6 -0
  201. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +1 -1
  202. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +15 -2
  203. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +12 -3
  204. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
  205. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +18 -1
  206. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +15 -1
  207. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
  208. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.d.ts +6 -0
  209. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +6 -0
  210. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
  211. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +14 -2
  212. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +11 -4
  213. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -1
  214. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +15 -1
  215. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +12 -1
  216. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
  217. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +14 -1
  218. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +11 -1
  219. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
  220. package/FlowGraph/flowGraph.d.ts +16 -8
  221. package/FlowGraph/flowGraph.js +13 -8
  222. package/FlowGraph/flowGraph.js.map +1 -1
  223. package/FlowGraph/flowGraphBlock.d.ts +54 -5
  224. package/FlowGraph/flowGraphBlock.js +50 -11
  225. package/FlowGraph/flowGraphBlock.js.map +1 -1
  226. package/FlowGraph/flowGraphConnection.d.ts +10 -6
  227. package/FlowGraph/flowGraphConnection.js +10 -6
  228. package/FlowGraph/flowGraphConnection.js.map +1 -1
  229. package/FlowGraph/flowGraphContext.d.ts +10 -8
  230. package/FlowGraph/flowGraphContext.js +10 -8
  231. package/FlowGraph/flowGraphContext.js.map +1 -1
  232. package/FlowGraph/flowGraphCoordinator.d.ts +27 -1
  233. package/FlowGraph/flowGraphCoordinator.js +18 -2
  234. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  235. package/FlowGraph/flowGraphDataConnection.d.ts +26 -1
  236. package/FlowGraph/flowGraphDataConnection.js +23 -1
  237. package/FlowGraph/flowGraphDataConnection.js.map +1 -1
  238. package/FlowGraph/flowGraphExecutionBlock.d.ts +27 -1
  239. package/FlowGraph/flowGraphExecutionBlock.js +22 -4
  240. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  241. package/FlowGraph/flowGraphRichTypes.d.ts +24 -1
  242. package/FlowGraph/flowGraphRichTypes.js +18 -1
  243. package/FlowGraph/flowGraphRichTypes.js.map +1 -1
  244. package/FlowGraph/flowGraphSignalConnection.d.ts +2 -0
  245. package/FlowGraph/flowGraphSignalConnection.js +2 -0
  246. package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
  247. package/Gamepads/gamepad.d.ts +2 -2
  248. package/Gamepads/gamepad.js +2 -2
  249. package/Gamepads/gamepad.js.map +1 -1
  250. package/Gamepads/gamepadSceneComponent.js +2 -0
  251. package/Gamepads/gamepadSceneComponent.js.map +1 -1
  252. package/Gizmos/axisScaleGizmo.d.ts +2 -0
  253. package/Gizmos/axisScaleGizmo.js +2 -0
  254. package/Gizmos/axisScaleGizmo.js.map +1 -1
  255. package/Gizmos/boundingBoxGizmo.d.ts +19 -0
  256. package/Gizmos/boundingBoxGizmo.js +36 -15
  257. package/Gizmos/boundingBoxGizmo.js.map +1 -1
  258. package/Gizmos/cameraGizmo.js +1 -0
  259. package/Gizmos/cameraGizmo.js.map +1 -1
  260. package/Gizmos/gizmo.d.ts +4 -1
  261. package/Gizmos/gizmo.js +1 -0
  262. package/Gizmos/gizmo.js.map +1 -1
  263. package/Gizmos/gizmoManager.d.ts +18 -0
  264. package/Gizmos/gizmoManager.js +34 -0
  265. package/Gizmos/gizmoManager.js.map +1 -1
  266. package/Gizmos/lightGizmo.d.ts +1 -0
  267. package/Gizmos/lightGizmo.js +1 -0
  268. package/Gizmos/lightGizmo.js.map +1 -1
  269. package/Gizmos/planeRotationGizmo.d.ts +2 -0
  270. package/Gizmos/planeRotationGizmo.js +2 -0
  271. package/Gizmos/planeRotationGizmo.js.map +1 -1
  272. package/Gizmos/positionGizmo.d.ts +11 -0
  273. package/Gizmos/positionGizmo.js +19 -0
  274. package/Gizmos/positionGizmo.js.map +1 -1
  275. package/Gizmos/rotationGizmo.d.ts +14 -0
  276. package/Gizmos/rotationGizmo.js +14 -0
  277. package/Gizmos/rotationGizmo.js.map +1 -1
  278. package/Gizmos/scaleGizmo.d.ts +18 -1
  279. package/Gizmos/scaleGizmo.js +19 -1
  280. package/Gizmos/scaleGizmo.js.map +1 -1
  281. package/Helpers/environmentHelper.d.ts +4 -2
  282. package/Helpers/environmentHelper.js +4 -2
  283. package/Helpers/environmentHelper.js.map +1 -1
  284. package/Layers/effectLayer.d.ts +1 -0
  285. package/Layers/effectLayer.js +1 -0
  286. package/Layers/effectLayer.js.map +1 -1
  287. package/Layers/glowLayer.d.ts +3 -1
  288. package/Layers/glowLayer.js +3 -1
  289. package/Layers/glowLayer.js.map +1 -1
  290. package/Layers/highlightLayer.d.ts +3 -2
  291. package/Layers/highlightLayer.js +3 -2
  292. package/Layers/highlightLayer.js.map +1 -1
  293. package/Lights/light.d.ts +1 -1
  294. package/Lights/light.js +1 -1
  295. package/Lights/light.js.map +1 -1
  296. package/Loading/sceneLoader.d.ts +9 -0
  297. package/Loading/sceneLoader.js +11 -0
  298. package/Loading/sceneLoader.js.map +1 -1
  299. package/Materials/Background/backgroundMaterial.d.ts +2 -2
  300. package/Materials/Background/backgroundMaterial.js +2 -2
  301. package/Materials/Background/backgroundMaterial.js.map +1 -1
  302. package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +72 -0
  303. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +230 -0
  304. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -0
  305. package/Materials/GreasedLine/greasedLineMaterialInterfaces.d.ts +1 -1
  306. package/Materials/GreasedLine/greasedLineMaterialInterfaces.js.map +1 -1
  307. package/Materials/GreasedLine/greasedLinePluginMaterial.d.ts +2 -2
  308. package/Materials/GreasedLine/greasedLinePluginMaterial.js +2 -2
  309. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
  310. package/Materials/GreasedLine/greasedLineSimpleMaterial.d.ts +0 -1
  311. package/Materials/GreasedLine/greasedLineSimpleMaterial.js +0 -1
  312. package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -1
  313. package/Materials/Node/Blocks/Dual/index.d.ts +1 -0
  314. package/Materials/Node/Blocks/Dual/index.js +1 -0
  315. package/Materials/Node/Blocks/Dual/index.js.map +1 -1
  316. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +7 -1
  317. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +6 -1
  318. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  319. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js +1 -0
  320. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js.map +1 -1
  321. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js +1 -0
  322. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js.map +1 -1
  323. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +1 -0
  324. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
  325. package/Materials/Node/Blocks/Input/prePassTextureBlock.d.ts +1 -1
  326. package/Materials/Node/Blocks/Input/prePassTextureBlock.js +1 -1
  327. package/Materials/Node/Blocks/Input/prePassTextureBlock.js.map +1 -1
  328. package/Materials/Node/Blocks/Teleport/teleportInBlock.d.ts +3 -1
  329. package/Materials/Node/Blocks/Teleport/teleportInBlock.js +3 -1
  330. package/Materials/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
  331. package/Materials/Node/Blocks/triPlanarBlock.d.ts +1 -0
  332. package/Materials/Node/Blocks/triPlanarBlock.js +1 -0
  333. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  334. package/Materials/Node/Blocks/worleyNoise3DBlock.d.ts +2 -0
  335. package/Materials/Node/Blocks/worleyNoise3DBlock.js +2 -0
  336. package/Materials/Node/Blocks/worleyNoise3DBlock.js.map +1 -1
  337. package/Materials/Node/nodeMaterial.d.ts +11 -3
  338. package/Materials/Node/nodeMaterial.js +15 -3
  339. package/Materials/Node/nodeMaterial.js.map +1 -1
  340. package/Materials/Node/nodeMaterialBlock.d.ts +3 -1
  341. package/Materials/Node/nodeMaterialBlock.js +4 -1
  342. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  343. package/Materials/Node/nodeMaterialBlockConnectionPoint.js +1 -0
  344. package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
  345. package/Materials/Node/nodeMaterialBuildStateSharedData.js +1 -0
  346. package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
  347. package/Materials/PBR/pbrBaseMaterial.d.ts +10 -9
  348. package/Materials/PBR/pbrBaseMaterial.js +10 -9
  349. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  350. package/Materials/PBR/pbrMaterial.d.ts +2 -1
  351. package/Materials/PBR/pbrMaterial.js +3 -2
  352. package/Materials/PBR/pbrMaterial.js.map +1 -1
  353. package/Materials/PBR/pbrMetallicRoughnessMaterial.d.ts +7 -4
  354. package/Materials/PBR/pbrMetallicRoughnessMaterial.js +7 -4
  355. package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
  356. package/Materials/PBR/pbrSpecularGlossinessMaterial.d.ts +7 -4
  357. package/Materials/PBR/pbrSpecularGlossinessMaterial.js +7 -4
  358. package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
  359. package/Materials/Textures/Loaders/envTextureLoader.js +1 -0
  360. package/Materials/Textures/Loaders/envTextureLoader.js.map +1 -1
  361. package/Materials/Textures/Loaders/hdrTextureLoader.js +1 -0
  362. package/Materials/Textures/Loaders/hdrTextureLoader.js.map +1 -1
  363. package/Materials/Textures/Loaders/tgaTextureLoader.js +1 -0
  364. package/Materials/Textures/Loaders/tgaTextureLoader.js.map +1 -1
  365. package/Materials/Textures/Packer/packer.d.ts +0 -1
  366. package/Materials/Textures/Packer/packer.js +0 -1
  367. package/Materials/Textures/Packer/packer.js.map +1 -1
  368. package/Materials/Textures/Procedurals/noiseProceduralTexture.d.ts +1 -1
  369. package/Materials/Textures/Procedurals/noiseProceduralTexture.js +1 -1
  370. package/Materials/Textures/Procedurals/noiseProceduralTexture.js.map +1 -1
  371. package/Materials/Textures/baseTexture.js +3 -0
  372. package/Materials/Textures/baseTexture.js.map +1 -1
  373. package/Materials/Textures/colorGradingTexture.d.ts +4 -1
  374. package/Materials/Textures/colorGradingTexture.js +4 -1
  375. package/Materials/Textures/colorGradingTexture.js.map +1 -1
  376. package/Materials/Textures/equiRectangularCubeTexture.d.ts +1 -0
  377. package/Materials/Textures/equiRectangularCubeTexture.js +1 -0
  378. package/Materials/Textures/equiRectangularCubeTexture.js.map +1 -1
  379. package/Materials/Textures/hdrCubeTexture.d.ts +3 -2
  380. package/Materials/Textures/hdrCubeTexture.js +3 -2
  381. package/Materials/Textures/hdrCubeTexture.js.map +1 -1
  382. package/Materials/Textures/htmlElementTexture.d.ts +1 -1
  383. package/Materials/Textures/htmlElementTexture.js +1 -1
  384. package/Materials/Textures/htmlElementTexture.js.map +1 -1
  385. package/Materials/Textures/multiRenderTarget.d.ts +1 -1
  386. package/Materials/Textures/multiRenderTarget.js +1 -1
  387. package/Materials/Textures/multiRenderTarget.js.map +1 -1
  388. package/Materials/Textures/texture.d.ts +4 -1
  389. package/Materials/Textures/texture.js +4 -1
  390. package/Materials/Textures/texture.js.map +1 -1
  391. package/Materials/Textures/thinRenderTargetTexture.d.ts +1 -1
  392. package/Materials/Textures/thinRenderTargetTexture.js +1 -1
  393. package/Materials/Textures/thinRenderTargetTexture.js.map +1 -1
  394. package/Materials/Textures/thinTexture.js +3 -0
  395. package/Materials/Textures/thinTexture.js.map +1 -1
  396. package/Materials/index.d.ts +1 -0
  397. package/Materials/index.js +1 -0
  398. package/Materials/index.js.map +1 -1
  399. package/Materials/material.d.ts +2 -1
  400. package/Materials/material.decalMapConfiguration.d.ts +0 -5
  401. package/Materials/material.decalMapConfiguration.js +5 -5
  402. package/Materials/material.decalMapConfiguration.js.map +1 -1
  403. package/Materials/material.js +3 -2
  404. package/Materials/material.js.map +1 -1
  405. package/Materials/materialHelper.d.ts +1 -1
  406. package/Materials/materialHelper.js +4 -3
  407. package/Materials/materialHelper.js.map +1 -1
  408. package/Materials/materialPluginManager.js +1 -0
  409. package/Materials/materialPluginManager.js.map +1 -1
  410. package/Materials/standardMaterial.d.ts +2 -2
  411. package/Materials/standardMaterial.js +3 -3
  412. package/Materials/standardMaterial.js.map +1 -1
  413. package/Materials/uniformBuffer.js +2 -1
  414. package/Materials/uniformBuffer.js.map +1 -1
  415. package/Maths/math.like.d.ts +3 -0
  416. package/Maths/math.like.js.map +1 -1
  417. package/Maths/math.path.d.ts +2 -1
  418. package/Maths/math.path.js +2 -1
  419. package/Maths/math.path.js.map +1 -1
  420. package/Maths/math.polar.d.ts +3 -2
  421. package/Maths/math.polar.js +8 -2
  422. package/Maths/math.polar.js.map +1 -1
  423. package/Maths/math.vector.d.ts +12 -5
  424. package/Maths/math.vector.js +12 -5
  425. package/Maths/math.vector.js.map +1 -1
  426. package/Meshes/Builders/hemisphereBuilder.js +1 -0
  427. package/Meshes/Builders/hemisphereBuilder.js.map +1 -1
  428. package/Meshes/Builders/textBuilder.d.ts +26 -5
  429. package/Meshes/Builders/textBuilder.js +26 -5
  430. package/Meshes/Builders/textBuilder.js.map +1 -1
  431. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +84 -0
  432. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +288 -0
  433. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -0
  434. package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +2 -0
  435. package/Meshes/GreasedLine/greasedLineBaseMesh.js +2 -0
  436. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
  437. package/Meshes/GreasedLine/greasedLineRibbonMesh.d.ts +2 -0
  438. package/Meshes/GreasedLine/greasedLineRibbonMesh.js +9 -0
  439. package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
  440. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +1 -1
  441. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +1 -1
  442. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
  443. package/Meshes/Node/Blocks/geometryCurveBlock.d.ts +92 -0
  444. package/Meshes/Node/Blocks/geometryCurveBlock.js +292 -0
  445. package/Meshes/Node/Blocks/geometryCurveBlock.js.map +1 -0
  446. package/Meshes/Node/Blocks/noiseBlock.d.ts +5 -3
  447. package/Meshes/Node/Blocks/noiseBlock.js +5 -3
  448. package/Meshes/Node/Blocks/noiseBlock.js.map +1 -1
  449. package/Meshes/Node/index.d.ts +1 -0
  450. package/Meshes/Node/index.js +1 -0
  451. package/Meshes/Node/index.js.map +1 -1
  452. package/Meshes/Node/nodeGeometry.d.ts +6 -2
  453. package/Meshes/Node/nodeGeometry.js +7 -2
  454. package/Meshes/Node/nodeGeometry.js.map +1 -1
  455. package/Meshes/Node/nodeGeometryBlockConnectionPoint.js +1 -0
  456. package/Meshes/Node/nodeGeometryBlockConnectionPoint.js.map +1 -1
  457. package/Meshes/Node/nodeGeometryBuildState.js +1 -0
  458. package/Meshes/Node/nodeGeometryBuildState.js.map +1 -1
  459. package/Meshes/abstractMesh.d.ts +1 -0
  460. package/Meshes/abstractMesh.js +3 -0
  461. package/Meshes/abstractMesh.js.map +1 -1
  462. package/Meshes/csg.d.ts +7 -1
  463. package/Meshes/csg.js +9 -1
  464. package/Meshes/csg.js.map +1 -1
  465. package/Meshes/geodesicMesh.d.ts +32 -1
  466. package/Meshes/geodesicMesh.js +17 -1
  467. package/Meshes/geodesicMesh.js.map +1 -1
  468. package/Meshes/index.d.ts +1 -0
  469. package/Meshes/index.js +1 -0
  470. package/Meshes/index.js.map +1 -1
  471. package/Meshes/instancedMesh.d.ts +34 -17
  472. package/Meshes/instancedMesh.js +34 -17
  473. package/Meshes/instancedMesh.js.map +1 -1
  474. package/Meshes/linesMesh.d.ts +6 -5
  475. package/Meshes/linesMesh.js +6 -5
  476. package/Meshes/linesMesh.js.map +1 -1
  477. package/Meshes/mesh.d.ts +1 -0
  478. package/Meshes/mesh.js +1 -0
  479. package/Meshes/mesh.js.map +1 -1
  480. package/Meshes/mesh.vertexData.d.ts +0 -145
  481. package/Meshes/mesh.vertexData.js +0 -145
  482. package/Meshes/mesh.vertexData.js.map +1 -1
  483. package/Meshes/transformNode.d.ts +1 -1
  484. package/Meshes/transformNode.js +19 -1
  485. package/Meshes/transformNode.js.map +1 -1
  486. package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.d.ts +1 -0
  487. package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js +1 -0
  488. package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js.map +1 -1
  489. package/Misc/HighDynamicRange/hdr.d.ts +1 -0
  490. package/Misc/HighDynamicRange/hdr.js +8 -0
  491. package/Misc/HighDynamicRange/hdr.js.map +1 -1
  492. package/Misc/HighDynamicRange/panoramaToCubemap.d.ts +1 -0
  493. package/Misc/HighDynamicRange/panoramaToCubemap.js +3 -0
  494. package/Misc/HighDynamicRange/panoramaToCubemap.js.map +1 -1
  495. package/Misc/assetsManager.d.ts +3 -0
  496. package/Misc/assetsManager.js +3 -0
  497. package/Misc/assetsManager.js.map +1 -1
  498. package/Misc/basis.js +1 -0
  499. package/Misc/basis.js.map +1 -1
  500. package/Misc/decorators.d.ts +2 -0
  501. package/Misc/decorators.js +3 -1
  502. package/Misc/decorators.js.map +1 -1
  503. package/Misc/fileTools.js +2 -0
  504. package/Misc/fileTools.js.map +1 -1
  505. package/Misc/filesInput.d.ts +7 -2
  506. package/Misc/filesInput.js +7 -2
  507. package/Misc/filesInput.js.map +1 -1
  508. package/Misc/greasedLineTools.d.ts +6 -1
  509. package/Misc/greasedLineTools.js +6 -1
  510. package/Misc/greasedLineTools.js.map +1 -1
  511. package/Misc/textureTools.d.ts +2 -0
  512. package/Misc/textureTools.js +2 -0
  513. package/Misc/textureTools.js.map +1 -1
  514. package/Misc/timer.d.ts +2 -1
  515. package/Misc/timer.js +1 -0
  516. package/Misc/timer.js.map +1 -1
  517. package/Misc/tools.d.ts +5 -1
  518. package/Misc/tools.js +9 -1
  519. package/Misc/tools.js.map +1 -1
  520. package/Misc/videoRecorder.d.ts +4 -1
  521. package/Misc/videoRecorder.js +11 -5
  522. package/Misc/videoRecorder.js.map +1 -1
  523. package/Misc/webRequest.d.ts +3 -0
  524. package/Misc/webRequest.js +4 -1
  525. package/Misc/webRequest.js.map +1 -1
  526. package/Morph/morphTargetManager.d.ts +11 -0
  527. package/Morph/morphTargetManager.js +22 -2
  528. package/Morph/morphTargetManager.js.map +1 -1
  529. package/Particles/EmitterTypes/customParticleEmitter.js +10 -2
  530. package/Particles/EmitterTypes/customParticleEmitter.js.map +1 -1
  531. package/Particles/EmitterTypes/cylinderParticleEmitter.d.ts +3 -1
  532. package/Particles/EmitterTypes/cylinderParticleEmitter.js +7 -1
  533. package/Particles/EmitterTypes/cylinderParticleEmitter.js.map +1 -1
  534. package/Particles/IParticleSystem.d.ts +2 -2
  535. package/Particles/IParticleSystem.js.map +1 -1
  536. package/Particles/gpuParticleSystem.js +1 -0
  537. package/Particles/gpuParticleSystem.js.map +1 -1
  538. package/Particles/particleSystem.d.ts +1 -2
  539. package/Particles/particleSystem.js +5 -1
  540. package/Particles/particleSystem.js.map +1 -1
  541. package/Particles/solidParticleSystem.d.ts +1 -1
  542. package/Particles/solidParticleSystem.js +1 -1
  543. package/Particles/solidParticleSystem.js.map +1 -1
  544. package/Physics/physicsHelper.d.ts +3 -2
  545. package/Physics/physicsHelper.js +5 -4
  546. package/Physics/physicsHelper.js.map +1 -1
  547. package/Physics/physicsRaycastResult.d.ts +2 -1
  548. package/Physics/physicsRaycastResult.js +2 -1
  549. package/Physics/physicsRaycastResult.js.map +1 -1
  550. package/Physics/v1/Plugins/ammoJSPlugin.d.ts +5 -0
  551. package/Physics/v1/Plugins/ammoJSPlugin.js +6 -0
  552. package/Physics/v1/Plugins/ammoJSPlugin.js.map +1 -1
  553. package/Physics/v1/physicsEngine.d.ts +2 -0
  554. package/Physics/v1/physicsEngine.js +2 -0
  555. package/Physics/v1/physicsEngine.js.map +1 -1
  556. package/Physics/v1/physicsImpostor.d.ts +2 -3
  557. package/Physics/v1/physicsImpostor.js +2 -3
  558. package/Physics/v1/physicsImpostor.js.map +1 -1
  559. package/Physics/v2/IPhysicsEnginePlugin.d.ts +1 -0
  560. package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
  561. package/Physics/v2/Plugins/havokPlugin.d.ts +61 -10
  562. package/Physics/v2/Plugins/havokPlugin.js +89 -10
  563. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  564. package/Physics/v2/physicsBody.d.ts +41 -3
  565. package/Physics/v2/physicsBody.js +42 -9
  566. package/Physics/v2/physicsBody.js.map +1 -1
  567. package/Physics/v2/physicsConstraint.d.ts +0 -2
  568. package/Physics/v2/physicsConstraint.js +0 -2
  569. package/Physics/v2/physicsConstraint.js.map +1 -1
  570. package/Physics/v2/physicsEngine.d.ts +5 -3
  571. package/Physics/v2/physicsEngine.js +6 -3
  572. package/Physics/v2/physicsEngine.js.map +1 -1
  573. package/Physics/v2/physicsShape.d.ts +2 -0
  574. package/Physics/v2/physicsShape.js +5 -0
  575. package/Physics/v2/physicsShape.js.map +1 -1
  576. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +1 -1
  577. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +1 -1
  578. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  579. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +1 -1
  580. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +1 -1
  581. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
  582. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.d.ts +1 -1
  583. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +1 -1
  584. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  585. package/PostProcesses/motionBlurPostProcess.d.ts +1 -0
  586. package/PostProcesses/motionBlurPostProcess.js +1 -0
  587. package/PostProcesses/motionBlurPostProcess.js.map +1 -1
  588. package/PostProcesses/postProcess.d.ts +0 -1
  589. package/PostProcesses/postProcess.js +0 -1
  590. package/PostProcesses/postProcess.js.map +1 -1
  591. package/PostProcesses/volumetricLightScatteringPostProcess.d.ts +1 -1
  592. package/PostProcesses/volumetricLightScatteringPostProcess.js +1 -1
  593. package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
  594. package/Rendering/GlobalIllumination/giRSMManager.d.ts +2 -1
  595. package/Rendering/GlobalIllumination/giRSMManager.js +5 -2
  596. package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
  597. package/Rendering/depthRendererSceneComponent.js +1 -0
  598. package/Rendering/depthRendererSceneComponent.js.map +1 -1
  599. package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +1 -1
  600. package/Rendering/fluidRenderer/fluidRenderingObject.js +1 -1
  601. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
  602. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.d.ts +1 -1
  603. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +1 -1
  604. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
  605. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +1 -1
  606. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +1 -1
  607. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
  608. package/Rendering/geometryBufferRenderer.d.ts +2 -2
  609. package/Rendering/geometryBufferRenderer.js +2 -2
  610. package/Rendering/geometryBufferRenderer.js.map +1 -1
  611. package/Rendering/index.d.ts +0 -1
  612. package/Rendering/index.js +0 -1
  613. package/Rendering/index.js.map +1 -1
  614. package/Rendering/prePassRenderer.d.ts +2 -2
  615. package/Rendering/prePassRenderer.js +2 -2
  616. package/Rendering/prePassRenderer.js.map +1 -1
  617. package/Rendering/reflectiveShadowMap.d.ts +4 -0
  618. package/Rendering/reflectiveShadowMap.js +7 -0
  619. package/Rendering/reflectiveShadowMap.js.map +1 -1
  620. package/Rendering/renderingGroup.d.ts +0 -1
  621. package/Rendering/renderingGroup.js +3 -4
  622. package/Rendering/renderingGroup.js.map +1 -1
  623. package/Rendering/renderingManager.d.ts +2 -1
  624. package/Rendering/renderingManager.js +2 -1
  625. package/Rendering/renderingManager.js.map +1 -1
  626. package/Rendering/subSurfaceConfiguration.d.ts +1 -0
  627. package/Rendering/subSurfaceConfiguration.js +1 -0
  628. package/Rendering/subSurfaceConfiguration.js.map +1 -1
  629. package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.d.ts +7 -0
  630. package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.js +13 -0
  631. package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.js.map +1 -0
  632. package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.d.ts +5 -0
  633. package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js +10 -0
  634. package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -0
  635. package/Shaders/ShadersInclude/morphTargetsVertex.js +8 -5
  636. package/Shaders/ShadersInclude/morphTargetsVertex.js.map +1 -1
  637. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js +2 -0
  638. package/Shaders/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  639. package/Shaders/gaussianSplatting.fragment.d.ts +11 -0
  640. package/Shaders/gaussianSplatting.fragment.js +27 -0
  641. package/Shaders/gaussianSplatting.fragment.js.map +1 -0
  642. package/Shaders/gaussianSplatting.vertex.d.ts +13 -0
  643. package/Shaders/gaussianSplatting.vertex.js +49 -0
  644. package/Shaders/gaussianSplatting.vertex.js.map +1 -0
  645. package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js +5 -1
  646. package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js.map +1 -1
  647. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js +2 -0
  648. package/ShadersWGSL/ShadersInclude/morphTargetsVertexDeclaration.js.map +1 -1
  649. package/XR/features/WebXRAbstractFeature.d.ts +7 -1
  650. package/XR/features/WebXRAbstractFeature.js +20 -4
  651. package/XR/features/WebXRAbstractFeature.js.map +1 -1
  652. package/XR/features/WebXRAnchorSystem.d.ts +1 -0
  653. package/XR/features/WebXRAnchorSystem.js +1 -0
  654. package/XR/features/WebXRAnchorSystem.js.map +1 -1
  655. package/XR/features/WebXRControllerTeleportation.js +9 -2
  656. package/XR/features/WebXRControllerTeleportation.js.map +1 -1
  657. package/XR/features/WebXRDepthSensing.d.ts +1 -1
  658. package/XR/features/WebXRDepthSensing.js +1 -1
  659. package/XR/features/WebXRDepthSensing.js.map +1 -1
  660. package/XR/features/WebXREyeTracking.js +1 -1
  661. package/XR/features/WebXREyeTracking.js.map +1 -1
  662. package/XR/features/WebXRHandTracking.d.ts +4 -1
  663. package/XR/features/WebXRHandTracking.js +18 -4
  664. package/XR/features/WebXRHandTracking.js.map +1 -1
  665. package/XR/features/WebXRHitTest.js +1 -1
  666. package/XR/features/WebXRHitTest.js.map +1 -1
  667. package/XR/features/WebXRNearInteraction.d.ts +6 -3
  668. package/XR/features/WebXRNearInteraction.js +9 -4
  669. package/XR/features/WebXRNearInteraction.js.map +1 -1
  670. package/XR/features/WebXRPlaneDetector.d.ts +2 -0
  671. package/XR/features/WebXRPlaneDetector.js +2 -0
  672. package/XR/features/WebXRPlaneDetector.js.map +1 -1
  673. package/XR/features/WebXRRawCameraAccess.d.ts +2 -0
  674. package/XR/features/WebXRRawCameraAccess.js +2 -0
  675. package/XR/features/WebXRRawCameraAccess.js.map +1 -1
  676. package/XR/features/WebXRSpaceWarp.d.ts +0 -27
  677. package/XR/features/WebXRSpaceWarp.js +0 -27
  678. package/XR/features/WebXRSpaceWarp.js.map +1 -1
  679. package/XR/index.d.ts +1 -0
  680. package/XR/index.js +1 -0
  681. package/XR/index.js.map +1 -1
  682. package/XR/motionController/webXROculusTouchMotionController.d.ts +1 -0
  683. package/XR/motionController/webXROculusTouchMotionController.js +1 -0
  684. package/XR/motionController/webXROculusTouchMotionController.js.map +1 -1
  685. package/XR/webXRCamera.d.ts +2 -0
  686. package/XR/webXRCamera.js +8 -6
  687. package/XR/webXRCamera.js.map +1 -1
  688. package/XR/webXRExperienceHelper.js +1 -0
  689. package/XR/webXRExperienceHelper.js.map +1 -1
  690. package/XR/webXRInput.js +1 -1
  691. package/XR/webXRInput.js.map +1 -1
  692. package/XR/webXRInputSource.d.ts +3 -1
  693. package/XR/webXRInputSource.js +6 -3
  694. package/XR/webXRInputSource.js.map +1 -1
  695. package/XR/webXRSessionManager.d.ts +13 -0
  696. package/XR/webXRSessionManager.js +21 -1
  697. package/XR/webXRSessionManager.js.map +1 -1
  698. package/assetContainer.d.ts +5 -2
  699. package/assetContainer.js +5 -2
  700. package/assetContainer.js.map +1 -1
  701. package/package.json +1 -1
  702. package/scene.d.ts +1 -0
  703. package/scene.js +11 -0
  704. package/scene.js.map +1 -1
  705. package/Rendering/GaussianSplatting/gaussianSplatting.d.ts +0 -81
  706. package/Rendering/GaussianSplatting/gaussianSplatting.js +0 -400
  707. package/Rendering/GaussianSplatting/gaussianSplatting.js.map +0 -1
  708. package/Rendering/GaussianSplatting/index.d.ts +0 -1
  709. package/Rendering/GaussianSplatting/index.js +0 -2
  710. package/Rendering/GaussianSplatting/index.js.map +0 -1
@@ -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,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,CAAC,MAAM,CAAC,CAAC;QAC7C,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;QACzC,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,MAA8B;QACpD,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACzC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC9C,OAAO,SAAS,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,KAAe;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,MAA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QACzC,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,MAA8B;QACpD,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACzC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QAC9C,OAAO,SAAS,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,KAAe;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 /**\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"]}
@@ -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 result defines the Vector3 where to store the result
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)
@@ -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 result defines the Vector3 where to store the result
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)