@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":"sixDofDragBehavior.js","sourceRoot":"","sources":["../../../../../dev/core/src/Behaviors/Meshes/sixDofDragBehavior.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,sBAA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AC;YACnC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,IAAI,CAAC,qBAAqB,GAAG,sBAAsB,CAAC;SACvD;IACL,CAAC;IAED;;OAEG;IACI,MAAM;QACT,KAAK,CAAC,MAAM,EAAE,CAAC;QAEf,IAAI,IAAI,CAAC,UAAU,EAAE;YAChB,IAAI,CAAC,UAAmB,CAAC,eAAe,GAAG,KAAK,CAAC;YAClD,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,wBAAwB,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACzF;QAED,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC5B,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,CAAC;SACxC;IACL,CAAC;CACJ","sourcesContent":["import type { Mesh } from \"../../Meshes/mesh\";\r\nimport type { Scene } from \"../../scene\";\r\nimport type { Nullable } from \"../../types\";\r\nimport { Vector3, Quaternion, Matrix, TmpVectors } from \"../../Maths/math.vector\";\r\nimport type { Observer } from \"../../Misc/observable\";\r\nimport { Observable } from \"../../Misc/observable\";\r\nimport { BaseSixDofDragBehavior } from \"./baseSixDofDragBehavior\";\r\nimport { TransformNode } from \"../../Meshes/transformNode\";\r\nimport { Space } from \"../../Maths/math.axis\";\r\n\r\n/**\r\n * A behavior that when attached to a mesh will allow the mesh to be dragged around based on directions and origin of the pointer's ray\r\n */\r\nexport class SixDofDragBehavior extends BaseSixDofDragBehavior {\r\n private _sceneRenderObserver: Nullable<Observer<Scene>> = null;\r\n private _virtualTransformNode: TransformNode;\r\n\r\n protected _targetPosition = new Vector3(0, 0, 0);\r\n protected _targetOrientation = new Quaternion();\r\n protected _targetScaling = new Vector3(1, 1, 1);\r\n protected _startingPosition = new Vector3(0, 0, 0);\r\n protected _startingOrientation = new Quaternion();\r\n protected _startingScaling = new Vector3(1, 1, 1);\r\n\r\n /**\r\n * Fires when position is updated\r\n */\r\n public onPositionChangedObservable = new Observable<{ position: Vector3 }>();\r\n\r\n /**\r\n * The distance towards the target drag position to move each frame. This can be useful to avoid jitter. Set this to 1 for no delay. (Default: 0.2)\r\n */\r\n public dragDeltaRatio = 0.2;\r\n\r\n /**\r\n * If the object should rotate to face the drag origin\r\n */\r\n public rotateDraggedObject = true;\r\n\r\n /**\r\n * If `rotateDraggedObject` is set to `true`, this parameter determines if we are only rotating around the y axis (yaw)\r\n */\r\n public rotateAroundYOnly = false;\r\n\r\n /**\r\n * Should the behavior rotate 1:1 with the motion controller, when one is used.\r\n */\r\n public rotateWithMotionController = true;\r\n\r\n /**\r\n * The name of the behavior\r\n */\r\n public get name(): string {\r\n return \"SixDofDrag\";\r\n }\r\n\r\n /**\r\n * Use this flag to update the target but not move the owner node towards the target\r\n */\r\n public disableMovement: boolean = false;\r\n\r\n /**\r\n * Should the object rotate towards the camera when we start dragging it\r\n */\r\n public faceCameraOnDragStart = false;\r\n\r\n /**\r\n * Attaches the six DoF drag behavior\r\n * @param ownerNode The mesh that will be dragged around once attached\r\n */\r\n public attach(ownerNode: Mesh): void {\r\n super.attach(ownerNode);\r\n\r\n ownerNode.isNearGrabbable = true;\r\n\r\n // Node that will save the owner's transform\r\n this._virtualTransformNode = new TransformNode(\"virtual_sixDof\", BaseSixDofDragBehavior._virtualScene);\r\n this._virtualTransformNode.rotationQuaternion = Quaternion.Identity();\r\n\r\n // On every frame move towards target scaling to avoid jitter caused by vr controllers\r\n this._sceneRenderObserver = ownerNode.getScene().onBeforeRenderObservable.add(() => {\r\n if (this.currentDraggingPointerIds.length === 1 && this._moving && !this.disableMovement) {\r\n // 1 pointer only drags mesh\r\n const deltaToAdd = TmpVectors.Vector3[0];\r\n deltaToAdd.copyFrom(this._targetPosition).subtractInPlace(ownerNode.absolutePosition).scaleInPlace(this.dragDeltaRatio);\r\n const deltaToAddTransformed = TmpVectors.Vector3[1];\r\n deltaToAddTransformed.copyFrom(deltaToAdd);\r\n // If the node has a parent, transform the delta to local space, so it can be added to the\r\n // position in local space\r\n if (ownerNode.parent) {\r\n const parentWorld = ownerNode.parent.getWorldMatrix();\r\n Vector3.TransformNormalToRef(deltaToAdd, parentWorld, deltaToAddTransformed);\r\n }\r\n ownerNode.position.addInPlace(deltaToAddTransformed);\r\n\r\n this.onPositionChangedObservable.notifyObservers({ position: ownerNode.absolutePosition });\r\n\r\n // Only rotate the mesh if it's parent has uniform scaling\r\n if (!ownerNode.parent || ((ownerNode.parent as TransformNode).scaling && !(ownerNode.parent as TransformNode).scaling.isNonUniformWithinEpsilon(0.001))) {\r\n const rotationToApply = TmpVectors.Quaternion[0];\r\n rotationToApply.copyFrom(this._targetOrientation);\r\n // If the node has a parent, transform the rotation to local space so it can be applied\r\n // to the node's own rotation\r\n if (ownerNode.parent) {\r\n const parentWorld = ownerNode.parent?.getWorldMatrix();\r\n const rotation = TmpVectors.Matrix[0];\r\n this._targetOrientation.toRotationMatrix(rotation);\r\n const rotationTransformed = TmpVectors.Matrix[1];\r\n parentWorld?.multiplyToRef(rotation, rotationTransformed);\r\n Quaternion.FromRotationMatrixToRef(rotationTransformed, rotationToApply);\r\n }\r\n Quaternion.SlerpToRef(ownerNode.rotationQuaternion!, rotationToApply, this.dragDeltaRatio, ownerNode.rotationQuaternion!);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private _getPositionOffsetAround(transformationLocalOrigin: Vector3, scaling: number, rotation: Quaternion): Vector3 {\r\n const translationMatrix = TmpVectors.Matrix[0]; // T\r\n const translationMatrixInv = TmpVectors.Matrix[1]; // T'\r\n const rotationMatrix = TmpVectors.Matrix[2]; // R\r\n const scaleMatrix = TmpVectors.Matrix[3]; // S\r\n const finalMatrix = TmpVectors.Matrix[4]; // T' x R x S x T\r\n\r\n Matrix.TranslationToRef(transformationLocalOrigin.x, transformationLocalOrigin.y, transformationLocalOrigin.z, translationMatrix); // T\r\n Matrix.TranslationToRef(-transformationLocalOrigin.x, -transformationLocalOrigin.y, -transformationLocalOrigin.z, translationMatrixInv); // T'\r\n Matrix.FromQuaternionToRef(rotation, rotationMatrix); // R\r\n Matrix.ScalingToRef(scaling, scaling, scaling, scaleMatrix);\r\n translationMatrixInv.multiplyToRef(rotationMatrix, finalMatrix); // T' x R\r\n finalMatrix.multiplyToRef(scaleMatrix, finalMatrix); // T' x R x S\r\n finalMatrix.multiplyToRef(translationMatrix, finalMatrix); // T' x R x S x T\r\n\r\n return finalMatrix.getTranslation();\r\n }\r\n\r\n private _onePointerPositionUpdated(worldDeltaPosition: Vector3, worldDeltaRotation: Quaternion) {\r\n const pointerDelta = TmpVectors.Vector3[0];\r\n pointerDelta.setAll(0);\r\n\r\n if (this._dragging === this._dragType.DRAG) {\r\n if (this.rotateDraggedObject) {\r\n if (this.rotateAroundYOnly) {\r\n // Convert change in rotation to only y axis rotation\r\n Quaternion.RotationYawPitchRollToRef(worldDeltaRotation.toEulerAngles().y, 0, 0, TmpVectors.Quaternion[0]);\r\n } else {\r\n TmpVectors.Quaternion[0].copyFrom(worldDeltaRotation);\r\n }\r\n TmpVectors.Quaternion[0].multiplyToRef(this._startingOrientation, this._targetOrientation);\r\n }\r\n } else if (this._dragging === this._dragType.NEAR_DRAG || (this._dragging === this._dragType.DRAG_WITH_CONTROLLER && this.rotateWithMotionController)) {\r\n worldDeltaRotation.multiplyToRef(this._startingOrientation, this._targetOrientation);\r\n }\r\n\r\n this._targetPosition.copyFrom(this._startingPosition).addInPlace(worldDeltaPosition);\r\n }\r\n\r\n private _twoPointersPositionUpdated() {\r\n const startingPosition0 = this._virtualMeshesInfo[this.currentDraggingPointerIds[0]].startingPosition;\r\n const startingPosition1 = this._virtualMeshesInfo[this.currentDraggingPointerIds[1]].startingPosition;\r\n const startingCenter = TmpVectors.Vector3[0];\r\n startingPosition0.addToRef(startingPosition1, startingCenter);\r\n startingCenter.scaleInPlace(0.5);\r\n const startingVector = TmpVectors.Vector3[1];\r\n startingPosition1.subtractToRef(startingPosition0, startingVector);\r\n\r\n const currentPosition0 = this._virtualMeshesInfo[this.currentDraggingPointerIds[0]].dragMesh.absolutePosition;\r\n const currentPosition1 = this._virtualMeshesInfo[this.currentDraggingPointerIds[1]].dragMesh.absolutePosition;\r\n const currentCenter = TmpVectors.Vector3[2];\r\n currentPosition0.addToRef(currentPosition1, currentCenter);\r\n currentCenter.scaleInPlace(0.5);\r\n const currentVector = TmpVectors.Vector3[3];\r\n currentPosition1.subtractToRef(currentPosition0, currentVector);\r\n\r\n const scaling = currentVector.length() / startingVector.length();\r\n const translation = currentCenter.subtract(startingCenter);\r\n const rotationQuaternion = Quaternion.FromEulerAngles(\r\n 0,\r\n Vector3.GetAngleBetweenVectorsOnPlane(startingVector.normalize(), currentVector.normalize(), Vector3.UpReadOnly),\r\n 0\r\n );\r\n\r\n const oldParent = this._ownerNode.parent;\r\n this._ownerNode.setParent(null);\r\n\r\n const positionOffset = this._getPositionOffsetAround(startingCenter.subtract(this._virtualTransformNode.getAbsolutePivotPoint()), scaling, rotationQuaternion);\r\n this._virtualTransformNode.rotationQuaternion!.multiplyToRef(rotationQuaternion, this._ownerNode.rotationQuaternion!);\r\n this._virtualTransformNode.scaling.scaleToRef(scaling, this._ownerNode.scaling);\r\n this._virtualTransformNode.position.addToRef(translation.addInPlace(positionOffset), this._ownerNode.position);\r\n this.onPositionChangedObservable.notifyObservers({ position: this._ownerNode.position });\r\n\r\n this._ownerNode.setParent(oldParent);\r\n }\r\n\r\n protected _targetDragStart() {\r\n const pointerCount = this.currentDraggingPointerIds.length;\r\n const oldParent = this._ownerNode.parent;\r\n\r\n if (!this._ownerNode.rotationQuaternion) {\r\n this._ownerNode.rotationQuaternion = Quaternion.RotationYawPitchRoll(this._ownerNode.rotation.y, this._ownerNode.rotation.x, this._ownerNode.rotation.z);\r\n }\r\n const worldPivot = this._ownerNode.getAbsolutePivotPoint();\r\n this._ownerNode.setParent(null);\r\n\r\n if (pointerCount === 1) {\r\n this._targetPosition.copyFrom(this._ownerNode.position);\r\n this._targetOrientation.copyFrom(this._ownerNode.rotationQuaternion);\r\n this._targetScaling.copyFrom(this._ownerNode.scaling);\r\n\r\n if (this.faceCameraOnDragStart && this._scene.activeCamera) {\r\n const toCamera = TmpVectors.Vector3[0];\r\n this._scene.activeCamera.position.subtractToRef(worldPivot, toCamera);\r\n toCamera.normalize();\r\n const quat = TmpVectors.Quaternion[0];\r\n if (this._scene.useRightHandedSystem) {\r\n Quaternion.FromLookDirectionRHToRef(toCamera, new Vector3(0, 1, 0), quat);\r\n } else {\r\n Quaternion.FromLookDirectionLHToRef(toCamera, new Vector3(0, 1, 0), quat);\r\n }\r\n quat.normalize();\r\n Quaternion.RotationYawPitchRollToRef(quat.toEulerAngles().y, 0, 0, TmpVectors.Quaternion[0]);\r\n this._targetOrientation.copyFrom(TmpVectors.Quaternion[0]);\r\n }\r\n this._startingPosition.copyFrom(this._targetPosition);\r\n this._startingOrientation.copyFrom(this._targetOrientation);\r\n this._startingScaling.copyFrom(this._targetScaling);\r\n } else if (pointerCount === 2) {\r\n this._virtualTransformNode.setPivotPoint(new Vector3(0, 0, 0), Space.LOCAL);\r\n this._virtualTransformNode.position.copyFrom(this._ownerNode.position);\r\n this._virtualTransformNode.scaling.copyFrom(this._ownerNode.scaling);\r\n this._virtualTransformNode.rotationQuaternion!.copyFrom(this._ownerNode.rotationQuaternion);\r\n this._virtualTransformNode.setPivotPoint(worldPivot, Space.WORLD);\r\n this._resetVirtualMeshesPosition();\r\n }\r\n\r\n this._ownerNode.setParent(oldParent);\r\n }\r\n\r\n protected _targetDrag(worldDeltaPosition: Vector3, worldDeltaRotation: Quaternion) {\r\n if (this.currentDraggingPointerIds.length === 1) {\r\n this._onePointerPositionUpdated(worldDeltaPosition, worldDeltaRotation);\r\n } else if (this.currentDraggingPointerIds.length === 2) {\r\n this._twoPointersPositionUpdated();\r\n }\r\n }\r\n\r\n protected _targetDragEnd() {\r\n if (this.currentDraggingPointerIds.length === 1) {\r\n // We still have 1 active pointer, we must simulate a dragstart with a reseted position/orientation\r\n this._resetVirtualMeshesPosition();\r\n const previousFaceCameraFlag = this.faceCameraOnDragStart;\r\n this.faceCameraOnDragStart = false;\r\n this._targetDragStart();\r\n this.faceCameraOnDragStart = previousFaceCameraFlag;\r\n }\r\n }\r\n\r\n /**\r\n * Detaches the behavior from the mesh\r\n */\r\n public detach(): void {\r\n super.detach();\r\n\r\n if (this._ownerNode) {\r\n (this._ownerNode as Mesh).isNearGrabbable = false;\r\n this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver);\r\n }\r\n\r\n if (this._virtualTransformNode) {\r\n this._virtualTransformNode.dispose();\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"sixDofDragBehavior.js","sourceRoot":"","sources":["../../../../../dev/core/src/Behaviors/Meshes/sixDofDragBehavior.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,sBAAsB;IAA9D;;QACY,yBAAoB,GAA8B,IAAI,CAAC;QAGrD,oBAAe,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACvC,uBAAkB,GAAG,IAAI,UAAU,EAAE,CAAC;QACtC,mBAAc,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACtC,sBAAiB,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACzC,yBAAoB,GAAG,IAAI,UAAU,EAAE,CAAC;QACxC,qBAAgB,GAAG,IAAI,OAAO,CAAC,CAAC,EAAE,CAA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,EAAE,CAAC;SACtC;IACL,CAAC;IAES,WAAW,CAAC,kBAA2B,EAAE,kBAA8B;QAC7E,IAAI,IAAI,CAAC,yBAAyB,CAAC,MAAM,KAAK,CAAC,EAAE;YAC7C,IAAI,CAAC,0BAA0B,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;SAC3E;aAAM,IAAI,IAAI,CAAC,yBAAyB,CAAC,MAAM,KAAK,CAAC,EAAE;YACpD,IAAI,CAAC,2BAA2B,EAAE,CAAC;SACtC;IACL,CAAC;IAES,cAAc;QACpB,IAAI,IAAI,CAAC,yBAAyB,CAAC,MAAM,KAAK,CAAC,EAAE;YAC7C,mGAAmG;YACnG,IAAI,CAAC,2BAA2B,EAAE,CAAC;YACnC,MAAM,sBAAsB,GAAG,IAAI,CAAC,qBAAqB,CAAC;YAC1D,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;YACnC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACxB,IAAI,CAAC,qBAAqB,GAAG,sBAAsB,CAAC;SACvD;IACL,CAAC;IAED;;OAEG;IACI,MAAM;QACT,KAAK,CAAC,MAAM,EAAE,CAAC;QAEf,IAAI,IAAI,CAAC,UAAU,EAAE;YAChB,IAAI,CAAC,UAAmB,CAAC,eAAe,GAAG,KAAK,CAAC;YAClD,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,wBAAwB,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;SACzF;QAED,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC5B,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,CAAC;SACxC;IACL,CAAC;CACJ","sourcesContent":["import type { Mesh } from \"../../Meshes/mesh\";\r\nimport type { Scene } from \"../../scene\";\r\nimport type { Nullable } from \"../../types\";\r\nimport { Vector3, Quaternion, Matrix, TmpVectors } from \"../../Maths/math.vector\";\r\nimport type { Observer } from \"../../Misc/observable\";\r\nimport { Observable } from \"../../Misc/observable\";\r\nimport { BaseSixDofDragBehavior } from \"./baseSixDofDragBehavior\";\r\nimport { TransformNode } from \"../../Meshes/transformNode\";\r\nimport { Space } from \"../../Maths/math.axis\";\r\n\r\n/**\r\n * A behavior that when attached to a mesh will allow the mesh to be dragged around based on directions and origin of the pointer's ray\r\n */\r\nexport class SixDofDragBehavior extends BaseSixDofDragBehavior {\r\n private _sceneRenderObserver: Nullable<Observer<Scene>> = null;\r\n private _virtualTransformNode: TransformNode;\r\n\r\n protected _targetPosition = new Vector3(0, 0, 0);\r\n protected _targetOrientation = new Quaternion();\r\n protected _targetScaling = new Vector3(1, 1, 1);\r\n protected _startingPosition = new Vector3(0, 0, 0);\r\n protected _startingOrientation = new Quaternion();\r\n protected _startingScaling = new Vector3(1, 1, 1);\r\n\r\n /**\r\n * Fires when position is updated\r\n */\r\n public onPositionChangedObservable = new Observable<{ position: Vector3 }>();\r\n\r\n /**\r\n * The distance towards the target drag position to move each frame. This can be useful to avoid jitter. Set this to 1 for no delay. (Default: 0.2)\r\n */\r\n public dragDeltaRatio = 0.2;\r\n\r\n /**\r\n * If the object should rotate to face the drag origin\r\n */\r\n public rotateDraggedObject = true;\r\n\r\n /**\r\n * If `rotateDraggedObject` is set to `true`, this parameter determines if we are only rotating around the y axis (yaw)\r\n */\r\n public rotateAroundYOnly = false;\r\n\r\n /**\r\n * Should the behavior rotate 1:1 with the motion controller, when one is used.\r\n */\r\n public rotateWithMotionController = true;\r\n\r\n /**\r\n * The name of the behavior\r\n */\r\n public get name(): string {\r\n return \"SixDofDrag\";\r\n }\r\n\r\n /**\r\n * Use this flag to update the target but not move the owner node towards the target\r\n */\r\n public disableMovement: boolean = false;\r\n\r\n /**\r\n * Should the object rotate towards the camera when we start dragging it\r\n */\r\n public faceCameraOnDragStart = false;\r\n\r\n /**\r\n * Attaches the six DoF drag behavior\r\n * @param ownerNode The mesh that will be dragged around once attached\r\n */\r\n public attach(ownerNode: Mesh): void {\r\n super.attach(ownerNode);\r\n\r\n ownerNode.isNearGrabbable = true;\r\n\r\n // Node that will save the owner's transform\r\n this._virtualTransformNode = new TransformNode(\"virtual_sixDof\", BaseSixDofDragBehavior._virtualScene);\r\n this._virtualTransformNode.rotationQuaternion = Quaternion.Identity();\r\n\r\n // On every frame move towards target scaling to avoid jitter caused by vr controllers\r\n this._sceneRenderObserver = ownerNode.getScene().onBeforeRenderObservable.add(() => {\r\n if (this.currentDraggingPointerIds.length === 1 && this._moving && !this.disableMovement) {\r\n // 1 pointer only drags mesh\r\n const deltaToAdd = TmpVectors.Vector3[0];\r\n deltaToAdd.copyFrom(this._targetPosition).subtractInPlace(ownerNode.absolutePosition).scaleInPlace(this.dragDeltaRatio);\r\n const deltaToAddTransformed = TmpVectors.Vector3[1];\r\n deltaToAddTransformed.copyFrom(deltaToAdd);\r\n // If the node has a parent, transform the delta to local space, so it can be added to the\r\n // position in local space\r\n if (ownerNode.parent) {\r\n const parentRotationMatrixInverse = TmpVectors.Matrix[0];\r\n (ownerNode.parent as TransformNode).absoluteRotationQuaternion.toRotationMatrix(parentRotationMatrixInverse);\r\n parentRotationMatrixInverse.invert();\r\n Vector3.TransformNormalToRef(deltaToAdd, parentRotationMatrixInverse, deltaToAddTransformed);\r\n }\r\n ownerNode.position.addInPlace(deltaToAddTransformed);\r\n\r\n this.onPositionChangedObservable.notifyObservers({ position: ownerNode.absolutePosition });\r\n\r\n // Only rotate the mesh if it's parent has uniform scaling\r\n if (!ownerNode.parent || ((ownerNode.parent as TransformNode).scaling && !(ownerNode.parent as TransformNode).scaling.isNonUniformWithinEpsilon(0.001))) {\r\n const rotationToApply = TmpVectors.Quaternion[0];\r\n rotationToApply.copyFrom(this._targetOrientation);\r\n if (ownerNode.parent) {\r\n const parentRotationInverse = TmpVectors.Quaternion[0];\r\n parentRotationInverse.copyFrom((ownerNode.parent as TransformNode).absoluteRotationQuaternion);\r\n parentRotationInverse.invertInPlace();\r\n parentRotationInverse.multiplyToRef(this._targetOrientation, rotationToApply);\r\n }\r\n Quaternion.SlerpToRef(ownerNode.rotationQuaternion!, rotationToApply, this.dragDeltaRatio, ownerNode.rotationQuaternion!);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private _getPositionOffsetAround(transformationLocalOrigin: Vector3, scaling: number, rotation: Quaternion): Vector3 {\r\n const translationMatrix = TmpVectors.Matrix[0]; // T\r\n const translationMatrixInv = TmpVectors.Matrix[1]; // T'\r\n const rotationMatrix = TmpVectors.Matrix[2]; // R\r\n const scaleMatrix = TmpVectors.Matrix[3]; // S\r\n const finalMatrix = TmpVectors.Matrix[4]; // T' x R x S x T\r\n\r\n Matrix.TranslationToRef(transformationLocalOrigin.x, transformationLocalOrigin.y, transformationLocalOrigin.z, translationMatrix); // T\r\n Matrix.TranslationToRef(-transformationLocalOrigin.x, -transformationLocalOrigin.y, -transformationLocalOrigin.z, translationMatrixInv); // T'\r\n Matrix.FromQuaternionToRef(rotation, rotationMatrix); // R\r\n Matrix.ScalingToRef(scaling, scaling, scaling, scaleMatrix);\r\n translationMatrixInv.multiplyToRef(rotationMatrix, finalMatrix); // T' x R\r\n finalMatrix.multiplyToRef(scaleMatrix, finalMatrix); // T' x R x S\r\n finalMatrix.multiplyToRef(translationMatrix, finalMatrix); // T' x R x S x T\r\n\r\n return finalMatrix.getTranslation();\r\n }\r\n\r\n private _onePointerPositionUpdated(worldDeltaPosition: Vector3, worldDeltaRotation: Quaternion) {\r\n const pointerDelta = TmpVectors.Vector3[0];\r\n pointerDelta.setAll(0);\r\n\r\n if (this._dragging === this._dragType.DRAG) {\r\n if (this.rotateDraggedObject) {\r\n if (this.rotateAroundYOnly) {\r\n // Convert change in rotation to only y axis rotation\r\n Quaternion.RotationYawPitchRollToRef(worldDeltaRotation.toEulerAngles().y, 0, 0, TmpVectors.Quaternion[0]);\r\n } else {\r\n TmpVectors.Quaternion[0].copyFrom(worldDeltaRotation);\r\n }\r\n TmpVectors.Quaternion[0].multiplyToRef(this._startingOrientation, this._targetOrientation);\r\n }\r\n } else if (this._dragging === this._dragType.NEAR_DRAG || (this._dragging === this._dragType.DRAG_WITH_CONTROLLER && this.rotateWithMotionController)) {\r\n worldDeltaRotation.multiplyToRef(this._startingOrientation, this._targetOrientation);\r\n }\r\n\r\n this._targetPosition.copyFrom(this._startingPosition).addInPlace(worldDeltaPosition);\r\n }\r\n\r\n private _twoPointersPositionUpdated() {\r\n const startingPosition0 = this._virtualMeshesInfo[this.currentDraggingPointerIds[0]].startingPosition;\r\n const startingPosition1 = this._virtualMeshesInfo[this.currentDraggingPointerIds[1]].startingPosition;\r\n const startingCenter = TmpVectors.Vector3[0];\r\n startingPosition0.addToRef(startingPosition1, startingCenter);\r\n startingCenter.scaleInPlace(0.5);\r\n const startingVector = TmpVectors.Vector3[1];\r\n startingPosition1.subtractToRef(startingPosition0, startingVector);\r\n\r\n const currentPosition0 = this._virtualMeshesInfo[this.currentDraggingPointerIds[0]].dragMesh.absolutePosition;\r\n const currentPosition1 = this._virtualMeshesInfo[this.currentDraggingPointerIds[1]].dragMesh.absolutePosition;\r\n const currentCenter = TmpVectors.Vector3[2];\r\n currentPosition0.addToRef(currentPosition1, currentCenter);\r\n currentCenter.scaleInPlace(0.5);\r\n const currentVector = TmpVectors.Vector3[3];\r\n currentPosition1.subtractToRef(currentPosition0, currentVector);\r\n\r\n const scaling = currentVector.length() / startingVector.length();\r\n const translation = currentCenter.subtract(startingCenter);\r\n const rotationQuaternion = Quaternion.FromEulerAngles(\r\n 0,\r\n Vector3.GetAngleBetweenVectorsOnPlane(startingVector.normalize(), currentVector.normalize(), Vector3.UpReadOnly),\r\n 0\r\n );\r\n\r\n const oldParent = this._ownerNode.parent;\r\n this._ownerNode.setParent(null);\r\n\r\n const positionOffset = this._getPositionOffsetAround(startingCenter.subtract(this._virtualTransformNode.getAbsolutePivotPoint()), scaling, rotationQuaternion);\r\n this._virtualTransformNode.rotationQuaternion!.multiplyToRef(rotationQuaternion, this._ownerNode.rotationQuaternion!);\r\n this._virtualTransformNode.scaling.scaleToRef(scaling, this._ownerNode.scaling);\r\n this._virtualTransformNode.position.addToRef(translation.addInPlace(positionOffset), this._ownerNode.position);\r\n this.onPositionChangedObservable.notifyObservers({ position: this._ownerNode.position });\r\n\r\n this._ownerNode.setParent(oldParent);\r\n }\r\n\r\n protected _targetDragStart() {\r\n const pointerCount = this.currentDraggingPointerIds.length;\r\n\r\n if (!this._ownerNode.rotationQuaternion) {\r\n this._ownerNode.rotationQuaternion = Quaternion.RotationYawPitchRoll(this._ownerNode.rotation.y, this._ownerNode.rotation.x, this._ownerNode.rotation.z);\r\n }\r\n const worldPivot = this._ownerNode.getAbsolutePivotPoint();\r\n\r\n if (pointerCount === 1) {\r\n this._targetPosition.copyFrom(this._ownerNode.absolutePosition);\r\n this._targetOrientation.copyFrom(this._ownerNode.absoluteRotationQuaternion);\r\n this._targetScaling.copyFrom(this._ownerNode.absoluteScaling);\r\n\r\n if (this.faceCameraOnDragStart && this._scene.activeCamera) {\r\n const toCamera = TmpVectors.Vector3[0];\r\n this._scene.activeCamera.position.subtractToRef(worldPivot, toCamera);\r\n toCamera.normalize();\r\n const quat = TmpVectors.Quaternion[0];\r\n if (this._scene.useRightHandedSystem) {\r\n Quaternion.FromLookDirectionRHToRef(toCamera, new Vector3(0, 1, 0), quat);\r\n } else {\r\n Quaternion.FromLookDirectionLHToRef(toCamera, new Vector3(0, 1, 0), quat);\r\n }\r\n quat.normalize();\r\n Quaternion.RotationYawPitchRollToRef(quat.toEulerAngles().y, 0, 0, TmpVectors.Quaternion[0]);\r\n this._targetOrientation.copyFrom(TmpVectors.Quaternion[0]);\r\n }\r\n this._startingPosition.copyFrom(this._targetPosition);\r\n this._startingOrientation.copyFrom(this._targetOrientation);\r\n this._startingScaling.copyFrom(this._targetScaling);\r\n } else if (pointerCount === 2) {\r\n this._virtualTransformNode.setPivotPoint(new Vector3(0, 0, 0), Space.LOCAL);\r\n this._virtualTransformNode.position.copyFrom(this._ownerNode.absolutePosition);\r\n this._virtualTransformNode.scaling.copyFrom(this._ownerNode.absoluteScaling);\r\n this._virtualTransformNode.rotationQuaternion!.copyFrom(this._ownerNode.absoluteRotationQuaternion);\r\n this._virtualTransformNode.setPivotPoint(worldPivot, Space.WORLD);\r\n this._resetVirtualMeshesPosition();\r\n }\r\n }\r\n\r\n protected _targetDrag(worldDeltaPosition: Vector3, worldDeltaRotation: Quaternion) {\r\n if (this.currentDraggingPointerIds.length === 1) {\r\n this._onePointerPositionUpdated(worldDeltaPosition, worldDeltaRotation);\r\n } else if (this.currentDraggingPointerIds.length === 2) {\r\n this._twoPointersPositionUpdated();\r\n }\r\n }\r\n\r\n protected _targetDragEnd() {\r\n if (this.currentDraggingPointerIds.length === 1) {\r\n // We still have 1 active pointer, we must simulate a dragstart with a reseted position/orientation\r\n this._resetVirtualMeshesPosition();\r\n const previousFaceCameraFlag = this.faceCameraOnDragStart;\r\n this.faceCameraOnDragStart = false;\r\n this._targetDragStart();\r\n this.faceCameraOnDragStart = previousFaceCameraFlag;\r\n }\r\n }\r\n\r\n /**\r\n * Detaches the behavior from the mesh\r\n */\r\n public detach(): void {\r\n super.detach();\r\n\r\n if (this._ownerNode) {\r\n (this._ownerNode as Mesh).isNearGrabbable = false;\r\n this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver);\r\n }\r\n\r\n if (this._virtualTransformNode) {\r\n this._virtualTransformNode.dispose();\r\n }\r\n }\r\n}\r\n"]}
package/Bones/bone.d.ts CHANGED
@@ -163,11 +163,13 @@ export declare class Bone extends Node {
163
163
  setBindPose(matrix: Matrix): void;
164
164
  /**
165
165
  * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)
166
+ * @returns the final world matrix
166
167
  */
167
168
  getFinalMatrix(): Matrix;
168
169
  /**
169
170
  * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)
170
171
  * @deprecated Please use getFinalMatrix instead
172
+ * @returns the final world matrix
171
173
  */
172
174
  getWorldMatrix(): Matrix;
173
175
  /**
package/Bones/bone.js CHANGED
@@ -218,6 +218,7 @@ export class Bone extends Node {
218
218
  }
219
219
  /**
220
220
  * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)
221
+ * @returns the final world matrix
221
222
  */
222
223
  getFinalMatrix() {
223
224
  return this._finalMatrix;
@@ -225,6 +226,7 @@ export class Bone extends Node {
225
226
  /**
226
227
  * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)
227
228
  * @deprecated Please use getFinalMatrix instead
229
+ * @returns the final world matrix
228
230
  */
229
231
  getWorldMatrix() {
230
232
  return this.getFinalMatrix();
package/Bones/bone.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bone.js","sourceRoot":"","sources":["../../../../dev/core/src/Bones/bone.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C;;;GAGG;AACH,MAAM,OAAO,IAAK,SAAQ,IAAI;IA+C1B,gBAAgB;IAChB,IAAI,OAAO;QACP,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,gBAAgB;IAChB,IAAI,OAAO,CAAC,KAAa;QACrB,oCAAoC;QACpC,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC,YAAY,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;YAC3E,OAAO;SACV;QAED,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC,sCAAsC;QAEnE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,wBAAwB,EAAE,CAAC;IACpC,CAAC;IAED;;;;;;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E,AAAxB,CAAyB;AACjC,aAAQ,GAAa,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,AAAtD,CAAuD","sourcesContent":["import type { Skeleton } from \"./skeleton\";\r\nimport { Vector3, Quaternion, Matrix, TmpVectors } from \"../Maths/math.vector\";\r\nimport { ArrayTools } from \"../Misc/arrayTools\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { TransformNode } from \"../Meshes/transformNode\";\r\nimport { Node } from \"../node\";\r\nimport { Space } from \"../Maths/math.axis\";\r\n\r\nimport type { Animation } from \"../Animations/animation\";\r\nimport type { AnimationPropertiesOverride } from \"../Animations/animationPropertiesOverride\";\r\n\r\n/**\r\n * Class used to store bone information\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\r\n */\r\nexport class Bone extends Node {\r\n private static _TmpVecs: Vector3[] = ArrayTools.BuildArray(2, Vector3.Zero);\r\n private static _TmpQuat = Quaternion.Identity();\r\n private static _TmpMats: Matrix[] = ArrayTools.BuildArray(5, Matrix.Identity);\r\n\r\n /**\r\n * Gets the list of child bones\r\n */\r\n public children: Bone[] = [];\r\n\r\n /** Gets the animations associated with this bone */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * Gets or sets bone length\r\n */\r\n public length: number;\r\n\r\n /**\r\n * @internal Internal only\r\n * Set this value to map this bone to a different index in the transform matrices\r\n * Set this value to -1 to exclude the bone from the transform matrices\r\n */\r\n public _index: Nullable<number> = null;\r\n\r\n private _skeleton: Skeleton;\r\n private _localMatrix: Matrix; // transformation of the bone, in local space\r\n private _absoluteMatrix: Matrix; // transformation of the bone, in world space (relative to the skeleton root)\r\n private _bindMatrix: Matrix; // the bind matrix, in local space\r\n private _absoluteBindMatrix: Matrix; // the bind matrix, in world space (relative to the skeleton root)\r\n private _absoluteInverseBindMatrix: Matrix; // the inverse of the bind matrix, in world space (relative to the skeleton root)\r\n private _finalMatrix: Matrix; // the final matrix used to transform vertices of the mesh according to the bone, in world space (relative to the skeleton root). It is the multiplication of _absoluteInverseBindMatrix with _absoluteMatrix.\r\n private _restMatrix: Matrix; // a matrix for the exclusive use of the end user (not used internally by the framework), in local space\r\n private _scalingDeterminant = 1;\r\n\r\n private _localScaling: Vector3;\r\n private _localRotation: Quaternion;\r\n private _localPosition: Vector3;\r\n private _needToDecompose = true;\r\n private _needToCompose = false;\r\n\r\n /** @internal */\r\n public _linkedTransformNode: Nullable<TransformNode> = null;\r\n\r\n /** @internal */\r\n public _waitingTransformNodeId: Nullable<string> = null;\r\n\r\n /** @internal */\r\n get _matrix(): Matrix {\r\n this._compose();\r\n return this._localMatrix;\r\n }\r\n\r\n /** @internal */\r\n set _matrix(value: Matrix) {\r\n // skip if the matrices are the same\r\n if (value.updateFlag === this._localMatrix.updateFlag && !this._needToCompose) {\r\n return;\r\n }\r\n\r\n this._needToCompose = false; // in case there was a pending compose\r\n\r\n this._localMatrix.copyFrom(value);\r\n this._markAsDirtyAndDecompose();\r\n }\r\n\r\n /**\r\n * Create a new bone\r\n * @param name defines the bone name\r\n * @param skeleton defines the parent skeleton\r\n * @param parentBone defines the parent (can be null if the bone is the root)\r\n * @param localMatrix defines the local matrix (default: identity)\r\n * @param restMatrix defines the rest matrix (default: localMatrix)\r\n * @param bindMatrix defines the bind matrix (default: localMatrix)\r\n * @param index defines index of the bone in the hierarchy (default: null)\r\n */\r\n constructor(\r\n /**\r\n * defines the bone name\r\n */\r\n public name: string,\r\n skeleton: Skeleton,\r\n parentBone: Nullable<Bone> = null,\r\n localMatrix: Nullable<Matrix> = null,\r\n restMatrix: Nullable<Matrix> = null,\r\n bindMatrix: Nullable<Matrix> = null,\r\n index: Nullable<number> = null\r\n ) {\r\n super(name, skeleton.getScene());\r\n this._skeleton = skeleton;\r\n this._localMatrix = localMatrix?.clone() ?? Matrix.Identity();\r\n this._restMatrix = restMatrix ?? this._localMatrix.clone();\r\n this._bindMatrix = bindMatrix ?? this._localMatrix.clone();\r\n this._index = index;\r\n\r\n this._absoluteMatrix = new Matrix();\r\n this._absoluteBindMatrix = new Matrix();\r\n this._absoluteInverseBindMatrix = new Matrix();\r\n this._finalMatrix = new Matrix();\r\n\r\n skeleton.bones.push(this);\r\n\r\n this.setParent(parentBone, false);\r\n\r\n this._updateAbsoluteBindMatrices();\r\n }\r\n\r\n /**\r\n * Gets the current object class name.\r\n * @returns the class name\r\n */\r\n public getClassName(): string {\r\n return \"Bone\";\r\n }\r\n\r\n // Members\r\n\r\n /**\r\n * Gets the parent skeleton\r\n * @returns a skeleton\r\n */\r\n public getSkeleton(): Skeleton {\r\n return this._skeleton;\r\n }\r\n\r\n public get parent(): Bone {\r\n return this._parentNode as Bone;\r\n }\r\n\r\n /**\r\n * Gets parent bone\r\n * @returns a bone or null if the bone is the root of the bone hierarchy\r\n */\r\n public getParent(): Nullable<Bone> {\r\n return this.parent;\r\n }\r\n\r\n /**\r\n * Returns an array containing the children of the bone\r\n * @returns an array containing the children of the bone (can be empty if the bone has no children)\r\n */\r\n public getChildren(): Array<Bone> {\r\n return this.children;\r\n }\r\n\r\n /**\r\n * Gets the node index in matrix array generated for rendering\r\n * @returns the node index\r\n */\r\n public getIndex(): number {\r\n return this._index === null ? this.getSkeleton().bones.indexOf(this) : this._index;\r\n }\r\n\r\n public set parent(newParent: Nullable<Bone>) {\r\n this.setParent(newParent);\r\n }\r\n\r\n /**\r\n * Sets the parent bone\r\n * @param parent defines the parent (can be null if the bone is the root)\r\n * @param updateAbsoluteBindMatrices defines if the absolute bind and absolute inverse bind matrices must be updated\r\n */\r\n public setParent(parent: Nullable<Bone>, updateAbsoluteBindMatrices: boolean = true): void {\r\n if (this.parent === parent) {\r\n return;\r\n }\r\n\r\n if (this.parent) {\r\n const index = this.parent.children.indexOf(this);\r\n if (index !== -1) {\r\n this.parent.children.splice(index, 1);\r\n }\r\n }\r\n\r\n this._parentNode = parent;\r\n\r\n if (this.parent) {\r\n this.parent.children.push(this);\r\n }\r\n\r\n if (updateAbsoluteBindMatrices) {\r\n this._updateAbsoluteBindMatrices();\r\n }\r\n\r\n this.markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets the local matrix\r\n * @returns the local matrix\r\n */\r\n public getLocalMatrix(): Matrix {\r\n this._compose();\r\n return this._localMatrix;\r\n }\r\n\r\n /**\r\n * Gets the bind matrix\r\n * @returns the bind matrix\r\n */\r\n public getBindMatrix(): Matrix {\r\n return this._bindMatrix;\r\n }\r\n\r\n /**\r\n * Gets the bind matrix.\r\n * @returns the bind matrix\r\n * @deprecated Please use getBindMatrix instead\r\n */\r\n public getBaseMatrix(): Matrix {\r\n return this.getBindMatrix();\r\n }\r\n\r\n /**\r\n * Gets the rest matrix\r\n * @returns the rest matrix\r\n */\r\n public getRestMatrix(): Matrix {\r\n return this._restMatrix;\r\n }\r\n\r\n /**\r\n * Gets the rest matrix\r\n * @returns the rest matrix\r\n * @deprecated Please use getRestMatrix instead\r\n */\r\n public getRestPose(): Matrix {\r\n return this.getRestMatrix();\r\n }\r\n\r\n /**\r\n * Sets the rest matrix\r\n * @param matrix the local-space rest matrix to set for this bone\r\n */\r\n public setRestMatrix(matrix: Matrix): void {\r\n this._restMatrix.copyFrom(matrix);\r\n }\r\n\r\n /**\r\n * Sets the rest matrix\r\n * @param matrix the local-space rest to set for this bone\r\n * @deprecated Please use setRestMatrix instead\r\n */\r\n public setRestPose(matrix: Matrix): void {\r\n this.setRestMatrix(matrix);\r\n }\r\n\r\n /**\r\n * Gets the bind matrix\r\n * @returns the bind matrix\r\n * @deprecated Please use getBindMatrix instead\r\n */\r\n public getBindPose(): Matrix {\r\n return this.getBindMatrix();\r\n }\r\n\r\n /**\r\n * Sets the bind matrix\r\n * This will trigger a recomputation of the absolute bind and absolute inverse bind matrices for this bone and its children\r\n * Note that the local matrix will also be set with the matrix passed in parameter!\r\n * @param matrix the local-space bind matrix to set for this bone\r\n */\r\n public setBindMatrix(matrix: Matrix): void {\r\n this.updateMatrix(matrix);\r\n }\r\n\r\n /**\r\n * Sets the bind matrix\r\n * @param matrix the local-space bind to set for this bone\r\n * @deprecated Please use setBindMatrix instead\r\n */\r\n public setBindPose(matrix: Matrix): void {\r\n this.setBindMatrix(matrix);\r\n }\r\n\r\n /**\r\n * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)\r\n */\r\n public getFinalMatrix(): Matrix {\r\n return this._finalMatrix;\r\n }\r\n\r\n /**\r\n * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)\r\n * @deprecated Please use getFinalMatrix instead\r\n */\r\n public getWorldMatrix(): Matrix {\r\n return this.getFinalMatrix();\r\n }\r\n\r\n /**\r\n * Sets the local matrix to the rest matrix\r\n */\r\n public returnToRest(): void {\r\n if (this._linkedTransformNode) {\r\n const localScaling = TmpVectors.Vector3[0];\r\n const localRotation = TmpVectors.Quaternion[0];\r\n const localPosition = TmpVectors.Vector3[1];\r\n\r\n this.getRestMatrix().decompose(localScaling, localRotation, localPosition);\r\n\r\n this._linkedTransformNode.position.copyFrom(localPosition);\r\n this._linkedTransformNode.rotationQuaternion = this._linkedTransformNode.rotationQuaternion ?? Quaternion.Identity();\r\n this._linkedTransformNode.rotationQuaternion.copyFrom(localRotation);\r\n this._linkedTransformNode.scaling.copyFrom(localScaling);\r\n } else {\r\n this._matrix = this._restMatrix;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the inverse of the bind matrix, in world space (relative to the skeleton root)\r\n * @returns the inverse bind matrix, in world space\r\n */\r\n public getAbsoluteInverseBindMatrix(): Matrix {\r\n return this._absoluteInverseBindMatrix;\r\n }\r\n\r\n /**\r\n * Gets the inverse of the bind matrix, in world space (relative to the skeleton root)\r\n * @returns the inverse bind matrix, in world space\r\n * @deprecated Please use getAbsoluteInverseBindMatrix instead\r\n */\r\n public getInvertedAbsoluteTransform(): Matrix {\r\n return this.getAbsoluteInverseBindMatrix();\r\n }\r\n\r\n /**\r\n * Gets the bone matrix, in world space (relative to the skeleton root)\r\n * @returns the bone matrix, in world space\r\n */\r\n public getAbsoluteMatrix(): Matrix {\r\n return this._absoluteMatrix;\r\n }\r\n\r\n /**\r\n * Gets the bone matrix, in world space (relative to the skeleton root)\r\n * @returns the bone matrix, in world space\r\n * @deprecated Please use getAbsoluteMatrix instead\r\n */\r\n public getAbsoluteTransform(): Matrix {\r\n return this._absoluteMatrix;\r\n }\r\n\r\n /**\r\n * Links with the given transform node.\r\n * The local matrix of this bone is overwritten by the transform of the node every frame.\r\n * @param transformNode defines the transform node to link to\r\n */\r\n public linkTransformNode(transformNode: Nullable<TransformNode>): void {\r\n if (this._linkedTransformNode) {\r\n this._skeleton._numBonesWithLinkedTransformNode--;\r\n }\r\n\r\n this._linkedTransformNode = transformNode;\r\n\r\n if (this._linkedTransformNode) {\r\n this._skeleton._numBonesWithLinkedTransformNode++;\r\n }\r\n }\r\n\r\n // Properties (matches TransformNode properties)\r\n\r\n /**\r\n * Gets the node used to drive the bone's transformation\r\n * @returns a transform node or null\r\n */\r\n public getTransformNode() {\r\n return this._linkedTransformNode;\r\n }\r\n\r\n /** Gets or sets current position (in local space) */\r\n public get position(): Vector3 {\r\n this._decompose();\r\n return this._localPosition;\r\n }\r\n\r\n public set position(newPosition: Vector3) {\r\n this._decompose();\r\n this._localPosition.copyFrom(newPosition);\r\n\r\n this._markAsDirtyAndCompose();\r\n }\r\n\r\n /** Gets or sets current rotation (in local space) */\r\n public get rotation(): Vector3 {\r\n return this.getRotation();\r\n }\r\n\r\n public set rotation(newRotation: Vector3) {\r\n this.setRotation(newRotation);\r\n }\r\n\r\n /** Gets or sets current rotation quaternion (in local space) */\r\n public get rotationQuaternion() {\r\n this._decompose();\r\n return this._localRotation;\r\n }\r\n\r\n public set rotationQuaternion(newRotation: Quaternion) {\r\n this.setRotationQuaternion(newRotation);\r\n }\r\n\r\n /** Gets or sets current scaling (in local space) */\r\n public get scaling(): Vector3 {\r\n return this.getScale();\r\n }\r\n\r\n public set scaling(newScaling: Vector3) {\r\n this.setScale(newScaling);\r\n }\r\n\r\n /**\r\n * Gets the animation properties override\r\n */\r\n public get animationPropertiesOverride(): Nullable<AnimationPropertiesOverride> {\r\n return this._skeleton.animationPropertiesOverride;\r\n }\r\n\r\n // Methods\r\n private _decompose() {\r\n if (!this._needToDecompose) {\r\n return;\r\n }\r\n\r\n this._needToDecompose = false;\r\n\r\n if (!this._localScaling) {\r\n this._localScaling = Vector3.Zero();\r\n this._localRotation = Quaternion.Zero();\r\n this._localPosition = Vector3.Zero();\r\n }\r\n this._localMatrix.decompose(this._localScaling, this._localRotation, this._localPosition);\r\n }\r\n\r\n private _compose() {\r\n if (!this._needToCompose) {\r\n return;\r\n }\r\n\r\n if (!this._localScaling) {\r\n this._needToCompose = false;\r\n return;\r\n }\r\n\r\n this._needToCompose = false;\r\n Matrix.ComposeToRef(this._localScaling, this._localRotation, this._localPosition, this._localMatrix);\r\n }\r\n\r\n /**\r\n * Update the bind (and optionally the local) matrix\r\n * @param bindMatrix defines the new matrix to set to the bind/local matrix, in local space\r\n * @param updateAbsoluteBindMatrices defines if the absolute bind and absolute inverse bind matrices must be recomputed (default: true)\r\n * @param updateLocalMatrix defines if the local matrix should also be updated with the matrix passed in parameter (default: true)\r\n */\r\n public updateMatrix(bindMatrix: Matrix, updateAbsoluteBindMatrices = true, updateLocalMatrix = true): void {\r\n this._bindMatrix.copyFrom(bindMatrix);\r\n\r\n if (updateAbsoluteBindMatrices) {\r\n this._updateAbsoluteBindMatrices();\r\n }\r\n\r\n if (updateLocalMatrix) {\r\n this._matrix = bindMatrix;\r\n } else {\r\n this.markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _updateAbsoluteBindMatrices(bindMatrix?: Matrix, updateChildren = true): void {\r\n if (!bindMatrix) {\r\n bindMatrix = this._bindMatrix;\r\n }\r\n\r\n if (this.parent) {\r\n bindMatrix.multiplyToRef(this.parent._absoluteBindMatrix, this._absoluteBindMatrix);\r\n } else {\r\n this._absoluteBindMatrix.copyFrom(bindMatrix);\r\n }\r\n\r\n this._absoluteBindMatrix.invertToRef(this._absoluteInverseBindMatrix);\r\n\r\n if (updateChildren) {\r\n for (let index = 0; index < this.children.length; index++) {\r\n this.children[index]._updateAbsoluteBindMatrices();\r\n }\r\n }\r\n\r\n this._scalingDeterminant = this._absoluteBindMatrix.determinant() < 0 ? -1 : 1;\r\n }\r\n\r\n /**\r\n * Flag the bone as dirty (Forcing it to update everything)\r\n * @returns this bone\r\n */\r\n public markAsDirty(): Bone {\r\n this._currentRenderId++;\r\n this._childUpdateId++;\r\n this._skeleton._markAsDirty();\r\n return this;\r\n }\r\n\r\n /** @internal */\r\n public _markAsDirtyAndCompose() {\r\n this.markAsDirty();\r\n this._needToCompose = true;\r\n }\r\n\r\n private _markAsDirtyAndDecompose() {\r\n this.markAsDirty();\r\n this._needToDecompose = true;\r\n }\r\n\r\n private _updatePosition(vec: Vector3, space = Space.LOCAL, tNode?: TransformNode, translationMode = true): void {\r\n const lm = this.getLocalMatrix();\r\n\r\n if (space == Space.LOCAL) {\r\n if (translationMode) {\r\n lm.addAtIndex(12, vec.x);\r\n lm.addAtIndex(13, vec.y);\r\n lm.addAtIndex(14, vec.z);\r\n } else {\r\n lm.setTranslationFromFloats(vec.x, vec.y, vec.z);\r\n }\r\n } else {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n const tmat = Bone._TmpMats[0];\r\n const tvec = Bone._TmpVecs[0];\r\n\r\n if (this.parent) {\r\n if (tNode && wm) {\r\n tmat.copyFrom(this.parent.getAbsoluteMatrix());\r\n tmat.multiplyToRef(wm, tmat);\r\n } else {\r\n tmat.copyFrom(this.parent.getAbsoluteMatrix());\r\n }\r\n } else {\r\n Matrix.IdentityToRef(tmat);\r\n }\r\n\r\n if (translationMode) {\r\n tmat.setTranslationFromFloats(0, 0, 0);\r\n }\r\n tmat.invert();\r\n Vector3.TransformCoordinatesToRef(vec, tmat, tvec);\r\n\r\n if (translationMode) {\r\n lm.addAtIndex(12, tvec.x);\r\n lm.addAtIndex(13, tvec.y);\r\n lm.addAtIndex(14, tvec.z);\r\n } else {\r\n lm.setTranslationFromFloats(tvec.x, tvec.y, tvec.z);\r\n }\r\n }\r\n\r\n this._markAsDirtyAndDecompose();\r\n }\r\n\r\n /**\r\n * Translate the bone in local or world space\r\n * @param vec The amount to translate the bone\r\n * @param space The space that the translation is in (default: Space.LOCAL)\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public translate(vec: Vector3, space = Space.LOCAL, tNode?: TransformNode): void {\r\n this._updatePosition(vec, space, tNode, true);\r\n }\r\n\r\n /**\r\n * Set the position of the bone in local or world space\r\n * @param position The position to set the bone\r\n * @param space The space that the position is in (default: Space.LOCAL)\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setPosition(position: Vector3, space = Space.LOCAL, tNode?: TransformNode): void {\r\n this._updatePosition(position, space, tNode, false);\r\n }\r\n\r\n /**\r\n * Set the absolute position of the bone (world space)\r\n * @param position The position to set the bone\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setAbsolutePosition(position: Vector3, tNode?: TransformNode) {\r\n this.setPosition(position, Space.WORLD, tNode);\r\n }\r\n\r\n /**\r\n * Scale the bone on the x, y and z axes (in local space)\r\n * @param x The amount to scale the bone on the x axis\r\n * @param y The amount to scale the bone on the y axis\r\n * @param z The amount to scale the bone on the z axis\r\n * @param scaleChildren sets this to true if children of the bone should be scaled as well (false by default)\r\n */\r\n public scale(x: number, y: number, z: number, scaleChildren = false): void {\r\n const locMat = this.getLocalMatrix();\r\n\r\n // Apply new scaling on top of current local matrix\r\n const scaleMat = Bone._TmpMats[0];\r\n Matrix.ScalingToRef(x, y, z, scaleMat);\r\n scaleMat.multiplyToRef(locMat, locMat);\r\n\r\n // Invert scaling matrix and apply the inverse to all children\r\n scaleMat.invert();\r\n\r\n for (const child of this.children) {\r\n const cm = child.getLocalMatrix();\r\n cm.multiplyToRef(scaleMat, cm);\r\n cm.multiplyAtIndex(12, x);\r\n cm.multiplyAtIndex(13, y);\r\n cm.multiplyAtIndex(14, z);\r\n\r\n child._markAsDirtyAndDecompose();\r\n }\r\n\r\n this._markAsDirtyAndDecompose();\r\n\r\n if (scaleChildren) {\r\n for (const child of this.children) {\r\n child.scale(x, y, z, scaleChildren);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set the bone scaling in local space\r\n * @param scale defines the scaling vector\r\n */\r\n public setScale(scale: Vector3): void {\r\n this._decompose();\r\n this._localScaling.copyFrom(scale);\r\n this._markAsDirtyAndCompose();\r\n }\r\n\r\n /**\r\n * Gets the current scaling in local space\r\n * @returns the current scaling vector\r\n */\r\n public getScale(): Vector3 {\r\n this._decompose();\r\n return this._localScaling;\r\n }\r\n\r\n /**\r\n * Gets the current scaling in local space and stores it in a target vector\r\n * @param result defines the target vector\r\n */\r\n public getScaleToRef(result: Vector3) {\r\n this._decompose();\r\n result.copyFrom(this._localScaling);\r\n }\r\n\r\n /**\r\n * Set the yaw, pitch, and roll of the bone in local or world space\r\n * @param yaw The rotation of the bone on the y axis\r\n * @param pitch The rotation of the bone on the x axis\r\n * @param roll The rotation of the bone on the z axis\r\n * @param space The space that the axes of rotation are in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setYawPitchRoll(yaw: number, pitch: number, roll: number, space = Space.LOCAL, tNode?: TransformNode): void {\r\n if (space === Space.LOCAL) {\r\n const quat = Bone._TmpQuat;\r\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, quat);\r\n this.setRotationQuaternion(quat, space, tNode);\r\n return;\r\n }\r\n\r\n const rotMatInv = Bone._TmpMats[0];\r\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\r\n return;\r\n }\r\n\r\n const rotMat = Bone._TmpMats[1];\r\n Matrix.RotationYawPitchRollToRef(yaw, pitch, roll, rotMat);\r\n\r\n rotMatInv.multiplyToRef(rotMat, rotMat);\r\n this._rotateWithMatrix(rotMat, space, tNode);\r\n }\r\n\r\n /**\r\n * Add a rotation to the bone on an axis in local or world space\r\n * @param axis The axis to rotate the bone on\r\n * @param amount The amount to rotate the bone\r\n * @param space The space that the axis is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public rotate(axis: Vector3, amount: number, space = Space.LOCAL, tNode?: TransformNode): void {\r\n const rmat = Bone._TmpMats[0];\r\n rmat.setTranslationFromFloats(0, 0, 0);\r\n Matrix.RotationAxisToRef(axis, amount, rmat);\r\n this._rotateWithMatrix(rmat, space, tNode);\r\n }\r\n\r\n /**\r\n * Set the rotation of the bone to a particular axis angle in local or world space\r\n * @param axis The axis to rotate the bone on\r\n * @param angle The angle that the bone should be rotated to\r\n * @param space The space that the axis is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setAxisAngle(axis: Vector3, angle: number, space = Space.LOCAL, tNode?: TransformNode): void {\r\n if (space === Space.LOCAL) {\r\n const quat = Bone._TmpQuat;\r\n Quaternion.RotationAxisToRef(axis, angle, quat);\r\n\r\n this.setRotationQuaternion(quat, space, tNode);\r\n return;\r\n }\r\n\r\n const rotMatInv = Bone._TmpMats[0];\r\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\r\n return;\r\n }\r\n\r\n const rotMat = Bone._TmpMats[1];\r\n Matrix.RotationAxisToRef(axis, angle, rotMat);\r\n\r\n rotMatInv.multiplyToRef(rotMat, rotMat);\r\n this._rotateWithMatrix(rotMat, space, tNode);\r\n }\r\n\r\n /**\r\n * Set the euler rotation of the bone in local or world space\r\n * @param rotation The euler rotation that the bone should be set to\r\n * @param space The space that the rotation is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setRotation(rotation: Vector3, space = Space.LOCAL, tNode?: TransformNode): void {\r\n this.setYawPitchRoll(rotation.y, rotation.x, rotation.z, space, tNode);\r\n }\r\n\r\n /**\r\n * Set the quaternion rotation of the bone in local or world space\r\n * @param quat The quaternion rotation that the bone should be set to\r\n * @param space The space that the rotation is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setRotationQuaternion(quat: Quaternion, space = Space.LOCAL, tNode?: TransformNode): void {\r\n if (space === Space.LOCAL) {\r\n this._decompose();\r\n this._localRotation.copyFrom(quat);\r\n\r\n this._markAsDirtyAndCompose();\r\n\r\n return;\r\n }\r\n\r\n const rotMatInv = Bone._TmpMats[0];\r\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\r\n return;\r\n }\r\n\r\n const rotMat = Bone._TmpMats[1];\r\n Matrix.FromQuaternionToRef(quat, rotMat);\r\n\r\n rotMatInv.multiplyToRef(rotMat, rotMat);\r\n\r\n this._rotateWithMatrix(rotMat, space, tNode);\r\n }\r\n\r\n /**\r\n * Set the rotation matrix of the bone in local or world space\r\n * @param rotMat The rotation matrix that the bone should be set to\r\n * @param space The space that the rotation is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setRotationMatrix(rotMat: Matrix, space = Space.LOCAL, tNode?: TransformNode): void {\r\n if (space === Space.LOCAL) {\r\n const quat = Bone._TmpQuat;\r\n Quaternion.FromRotationMatrixToRef(rotMat, quat);\r\n this.setRotationQuaternion(quat, space, tNode);\r\n return;\r\n }\r\n\r\n const rotMatInv = Bone._TmpMats[0];\r\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\r\n return;\r\n }\r\n\r\n const rotMat2 = Bone._TmpMats[1];\r\n rotMat2.copyFrom(rotMat);\r\n\r\n rotMatInv.multiplyToRef(rotMat, rotMat2);\r\n\r\n this._rotateWithMatrix(rotMat2, space, tNode);\r\n }\r\n\r\n private _rotateWithMatrix(rmat: Matrix, space = Space.LOCAL, tNode?: TransformNode): void {\r\n const lmat = this.getLocalMatrix();\r\n const lx = lmat.m[12];\r\n const ly = lmat.m[13];\r\n const lz = lmat.m[14];\r\n const parent = this.getParent();\r\n const parentScale = Bone._TmpMats[3];\r\n const parentScaleInv = Bone._TmpMats[4];\r\n\r\n if (parent && space == Space.WORLD) {\r\n if (tNode) {\r\n parentScale.copyFrom(tNode.getWorldMatrix());\r\n parent.getAbsoluteMatrix().multiplyToRef(parentScale, parentScale);\r\n } else {\r\n parentScale.copyFrom(parent.getAbsoluteMatrix());\r\n }\r\n parentScaleInv.copyFrom(parentScale);\r\n parentScaleInv.invert();\r\n lmat.multiplyToRef(parentScale, lmat);\r\n lmat.multiplyToRef(rmat, lmat);\r\n lmat.multiplyToRef(parentScaleInv, lmat);\r\n } else {\r\n if (space == Space.WORLD && tNode) {\r\n parentScale.copyFrom(tNode.getWorldMatrix());\r\n parentScaleInv.copyFrom(parentScale);\r\n parentScaleInv.invert();\r\n lmat.multiplyToRef(parentScale, lmat);\r\n lmat.multiplyToRef(rmat, lmat);\r\n lmat.multiplyToRef(parentScaleInv, lmat);\r\n } else {\r\n lmat.multiplyToRef(rmat, lmat);\r\n }\r\n }\r\n\r\n lmat.setTranslationFromFloats(lx, ly, lz);\r\n\r\n this.computeAbsoluteMatrices();\r\n this._markAsDirtyAndDecompose();\r\n }\r\n\r\n private _getAbsoluteInverseMatrixUnscaledToRef(rotMatInv: Matrix, tNode?: TransformNode): boolean {\r\n const scaleMatrix = Bone._TmpMats[2];\r\n rotMatInv.copyFrom(this.getAbsoluteMatrix());\r\n\r\n if (tNode) {\r\n rotMatInv.multiplyToRef(tNode.getWorldMatrix(), rotMatInv);\r\n Matrix.ScalingToRef(tNode.scaling.x, tNode.scaling.y, tNode.scaling.z, scaleMatrix);\r\n } else {\r\n Matrix.IdentityToRef(scaleMatrix);\r\n }\r\n\r\n rotMatInv.invert();\r\n if (isNaN(rotMatInv.m[0])) {\r\n // Matrix failed to invert.\r\n // This can happen if scale is zero for example.\r\n return false;\r\n }\r\n\r\n scaleMatrix.multiplyAtIndex(0, this._scalingDeterminant);\r\n rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Get the position of the bone in local or world space\r\n * @param space The space that the returned position is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The position of the bone\r\n */\r\n public getPosition(space = Space.LOCAL, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const pos = Vector3.Zero();\r\n\r\n this.getPositionToRef(space, tNode, pos);\r\n\r\n return pos;\r\n }\r\n\r\n /**\r\n * Copy the position of the bone to a vector3 in local or world space\r\n * @param space The space that the returned position is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 to copy the position to\r\n */\r\n public getPositionToRef(space = Space.LOCAL, tNode: Nullable<TransformNode>, result: Vector3): void {\r\n if (space == Space.LOCAL) {\r\n const lm = this.getLocalMatrix();\r\n\r\n result.x = lm.m[12];\r\n result.y = lm.m[13];\r\n result.z = lm.m[14];\r\n } else {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n let tmat = Bone._TmpMats[0];\r\n\r\n if (tNode && wm) {\r\n tmat.copyFrom(this.getAbsoluteMatrix());\r\n tmat.multiplyToRef(wm, tmat);\r\n } else {\r\n tmat = this.getAbsoluteMatrix();\r\n }\r\n\r\n result.x = tmat.m[12];\r\n result.y = tmat.m[13];\r\n result.z = tmat.m[14];\r\n }\r\n }\r\n\r\n /**\r\n * Get the absolute position of the bone (world space)\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The absolute position of the bone\r\n */\r\n public getAbsolutePosition(tNode: Nullable<TransformNode> = null): Vector3 {\r\n const pos = Vector3.Zero();\r\n\r\n this.getPositionToRef(Space.WORLD, tNode, pos);\r\n\r\n return pos;\r\n }\r\n\r\n /**\r\n * Copy the absolute position of the bone (world space) to the result param\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 to copy the absolute position to\r\n */\r\n public getAbsolutePositionToRef(tNode: TransformNode, result: Vector3) {\r\n this.getPositionToRef(Space.WORLD, tNode, result);\r\n }\r\n\r\n /**\r\n * Compute the absolute matrices of this bone and its children\r\n */\r\n public computeAbsoluteMatrices(): void {\r\n this._compose();\r\n\r\n if (this.parent) {\r\n this._localMatrix.multiplyToRef(this.parent._absoluteMatrix, this._absoluteMatrix);\r\n } else {\r\n this._absoluteMatrix.copyFrom(this._localMatrix);\r\n\r\n const poseMatrix = this._skeleton.getPoseMatrix();\r\n\r\n if (poseMatrix) {\r\n this._absoluteMatrix.multiplyToRef(poseMatrix, this._absoluteMatrix);\r\n }\r\n }\r\n\r\n const children = this.children;\r\n const len = children.length;\r\n\r\n for (let i = 0; i < len; i++) {\r\n children[i].computeAbsoluteMatrices();\r\n }\r\n }\r\n\r\n /**\r\n * Compute the absolute matrices of this bone and its children\r\n * @deprecated Please use computeAbsoluteMatrices instead\r\n */\r\n public computeAbsoluteTransforms(): void {\r\n this.computeAbsoluteMatrices();\r\n }\r\n\r\n /**\r\n * Get the world direction from an axis that is in the local space of the bone\r\n * @param localAxis The local direction that is used to compute the world direction\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The world direction\r\n */\r\n public getDirection(localAxis: Vector3, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.getDirectionToRef(localAxis, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the world direction to a vector3 from an axis that is in the local space of the bone\r\n * @param localAxis The local direction that is used to compute the world direction\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 that the world direction will be copied to\r\n */\r\n public getDirectionToRef(localAxis: Vector3, tNode: Nullable<TransformNode> = null, result: Vector3): void {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n const mat = Bone._TmpMats[0];\r\n\r\n mat.copyFrom(this.getAbsoluteMatrix());\r\n\r\n if (tNode && wm) {\r\n mat.multiplyToRef(wm, mat);\r\n }\r\n\r\n Vector3.TransformNormalToRef(localAxis, mat, result);\r\n\r\n result.normalize();\r\n }\r\n\r\n /**\r\n * Get the euler rotation of the bone in local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The euler rotation\r\n */\r\n public getRotation(space = Space.LOCAL, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.getRotationToRef(space, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the euler rotation of the bone to a vector3. The rotation can be in either local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 that the rotation should be copied to\r\n */\r\n public getRotationToRef(space = Space.LOCAL, tNode: Nullable<TransformNode> = null, result: Vector3): void {\r\n const quat = Bone._TmpQuat;\r\n\r\n this.getRotationQuaternionToRef(space, tNode, quat);\r\n\r\n quat.toEulerAnglesToRef(result);\r\n }\r\n\r\n /**\r\n * Get the quaternion rotation of the bone in either local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The quaternion rotation\r\n */\r\n public getRotationQuaternion(space = Space.LOCAL, tNode: Nullable<TransformNode> = null): Quaternion {\r\n const result = Quaternion.Identity();\r\n\r\n this.getRotationQuaternionToRef(space, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the quaternion rotation of the bone to a quaternion. The rotation can be in either local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The quaternion that the rotation should be copied to\r\n */\r\n public getRotationQuaternionToRef(space = Space.LOCAL, tNode: Nullable<TransformNode> = null, result: Quaternion): void {\r\n if (space == Space.LOCAL) {\r\n this._decompose();\r\n result.copyFrom(this._localRotation);\r\n } else {\r\n const mat = Bone._TmpMats[0];\r\n const amat = this.getAbsoluteMatrix();\r\n\r\n if (tNode) {\r\n amat.multiplyToRef(tNode.getWorldMatrix(), mat);\r\n } else {\r\n mat.copyFrom(amat);\r\n }\r\n\r\n mat.multiplyAtIndex(0, this._scalingDeterminant);\r\n mat.multiplyAtIndex(1, this._scalingDeterminant);\r\n mat.multiplyAtIndex(2, this._scalingDeterminant);\r\n\r\n mat.decompose(undefined, result, undefined);\r\n }\r\n }\r\n\r\n /**\r\n * Get the rotation matrix of the bone in local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The rotation matrix\r\n */\r\n public getRotationMatrix(space = Space.LOCAL, tNode: TransformNode): Matrix {\r\n const result = Matrix.Identity();\r\n\r\n this.getRotationMatrixToRef(space, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the rotation matrix of the bone to a matrix. The rotation can be in either local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The quaternion that the rotation should be copied to\r\n */\r\n public getRotationMatrixToRef(space = Space.LOCAL, tNode: TransformNode, result: Matrix): void {\r\n if (space == Space.LOCAL) {\r\n this.getLocalMatrix().getRotationMatrixToRef(result);\r\n } else {\r\n const mat = Bone._TmpMats[0];\r\n const amat = this.getAbsoluteMatrix();\r\n\r\n if (tNode) {\r\n amat.multiplyToRef(tNode.getWorldMatrix(), mat);\r\n } else {\r\n mat.copyFrom(amat);\r\n }\r\n\r\n mat.multiplyAtIndex(0, this._scalingDeterminant);\r\n mat.multiplyAtIndex(1, this._scalingDeterminant);\r\n mat.multiplyAtIndex(2, this._scalingDeterminant);\r\n\r\n mat.getRotationMatrixToRef(result);\r\n }\r\n }\r\n\r\n /**\r\n * Get the world position of a point that is in the local space of the bone\r\n * @param position The local position\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The world position\r\n */\r\n public getAbsolutePositionFromLocal(position: Vector3, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.getAbsolutePositionFromLocalToRef(position, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Get the world position of a point that is in the local space of the bone and copy it to the result param\r\n * @param position The local position\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 that the world position should be copied to\r\n */\r\n public getAbsolutePositionFromLocalToRef(position: Vector3, tNode: Nullable<TransformNode> = null, result: Vector3): void {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n const tmat = Bone._TmpMats[0];\r\n\r\n tmat.copyFrom(this.getAbsoluteMatrix());\r\n\r\n if (tNode && wm) {\r\n tmat.multiplyToRef(wm, tmat);\r\n }\r\n\r\n Vector3.TransformCoordinatesToRef(position, tmat, result);\r\n }\r\n\r\n /**\r\n * Get the local position of a point that is in world space\r\n * @param position The world position\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The local position\r\n */\r\n public getLocalPositionFromAbsolute(position: Vector3, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.getLocalPositionFromAbsoluteToRef(position, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Get the local position of a point that is in world space and copy it to the result param\r\n * @param position The world position\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 that the local position should be copied to\r\n */\r\n public getLocalPositionFromAbsoluteToRef(position: Vector3, tNode: Nullable<TransformNode> = null, result: Vector3): void {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n const tmat = Bone._TmpMats[0];\r\n\r\n tmat.copyFrom(this.getAbsoluteMatrix());\r\n\r\n if (tNode && wm) {\r\n tmat.multiplyToRef(wm, tmat);\r\n }\r\n\r\n tmat.invert();\r\n\r\n Vector3.TransformCoordinatesToRef(position, tmat, result);\r\n }\r\n\r\n /**\r\n * Set the current local matrix as the restMatrix for this bone.\r\n */\r\n public setCurrentPoseAsRest(): void {\r\n this.setRestMatrix(this.getLocalMatrix());\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"bone.js","sourceRoot":"","sources":["../../../../dev/core/src/Bones/bone.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC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IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAExC,IAAI,KAAK,IAAI,EAAE,EAAE;YACb,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAChC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;QAEd,OAAO,CAAC,yBAAyB,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACI,oBAAoB;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IAC9C,CAAC;;AA/rCc,aAAQ,GAAc,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,AAApD,CAAqD;AAC7D,aAAQ,GAAG,UAAU,CAAC,QAAQ,EAAE,AAAxB,CAAyB;AACjC,aAAQ,GAAa,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,AAAtD,CAAuD","sourcesContent":["import type { Skeleton } from \"./skeleton\";\r\nimport { Vector3, Quaternion, Matrix, TmpVectors } from \"../Maths/math.vector\";\r\nimport { ArrayTools } from \"../Misc/arrayTools\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { TransformNode } from \"../Meshes/transformNode\";\r\nimport { Node } from \"../node\";\r\nimport { Space } from \"../Maths/math.axis\";\r\n\r\nimport type { Animation } from \"../Animations/animation\";\r\nimport type { AnimationPropertiesOverride } from \"../Animations/animationPropertiesOverride\";\r\n\r\n/**\r\n * Class used to store bone information\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/bonesSkeletons\r\n */\r\nexport class Bone extends Node {\r\n private static _TmpVecs: Vector3[] = ArrayTools.BuildArray(2, Vector3.Zero);\r\n private static _TmpQuat = Quaternion.Identity();\r\n private static _TmpMats: Matrix[] = ArrayTools.BuildArray(5, Matrix.Identity);\r\n\r\n /**\r\n * Gets the list of child bones\r\n */\r\n public children: Bone[] = [];\r\n\r\n /** Gets the animations associated with this bone */\r\n public animations: Animation[] = [];\r\n\r\n /**\r\n * Gets or sets bone length\r\n */\r\n public length: number;\r\n\r\n /**\r\n * @internal Internal only\r\n * Set this value to map this bone to a different index in the transform matrices\r\n * Set this value to -1 to exclude the bone from the transform matrices\r\n */\r\n public _index: Nullable<number> = null;\r\n\r\n private _skeleton: Skeleton;\r\n private _localMatrix: Matrix; // transformation of the bone, in local space\r\n private _absoluteMatrix: Matrix; // transformation of the bone, in world space (relative to the skeleton root)\r\n private _bindMatrix: Matrix; // the bind matrix, in local space\r\n private _absoluteBindMatrix: Matrix; // the bind matrix, in world space (relative to the skeleton root)\r\n private _absoluteInverseBindMatrix: Matrix; // the inverse of the bind matrix, in world space (relative to the skeleton root)\r\n private _finalMatrix: Matrix; // the final matrix used to transform vertices of the mesh according to the bone, in world space (relative to the skeleton root). It is the multiplication of _absoluteInverseBindMatrix with _absoluteMatrix.\r\n private _restMatrix: Matrix; // a matrix for the exclusive use of the end user (not used internally by the framework), in local space\r\n private _scalingDeterminant = 1;\r\n\r\n private _localScaling: Vector3;\r\n private _localRotation: Quaternion;\r\n private _localPosition: Vector3;\r\n private _needToDecompose = true;\r\n private _needToCompose = false;\r\n\r\n /** @internal */\r\n public _linkedTransformNode: Nullable<TransformNode> = null;\r\n\r\n /** @internal */\r\n public _waitingTransformNodeId: Nullable<string> = null;\r\n\r\n /** @internal */\r\n get _matrix(): Matrix {\r\n this._compose();\r\n return this._localMatrix;\r\n }\r\n\r\n /** @internal */\r\n set _matrix(value: Matrix) {\r\n // skip if the matrices are the same\r\n if (value.updateFlag === this._localMatrix.updateFlag && !this._needToCompose) {\r\n return;\r\n }\r\n\r\n this._needToCompose = false; // in case there was a pending compose\r\n\r\n this._localMatrix.copyFrom(value);\r\n this._markAsDirtyAndDecompose();\r\n }\r\n\r\n /**\r\n * Create a new bone\r\n * @param name defines the bone name\r\n * @param skeleton defines the parent skeleton\r\n * @param parentBone defines the parent (can be null if the bone is the root)\r\n * @param localMatrix defines the local matrix (default: identity)\r\n * @param restMatrix defines the rest matrix (default: localMatrix)\r\n * @param bindMatrix defines the bind matrix (default: localMatrix)\r\n * @param index defines index of the bone in the hierarchy (default: null)\r\n */\r\n constructor(\r\n /**\r\n * defines the bone name\r\n */\r\n public name: string,\r\n skeleton: Skeleton,\r\n parentBone: Nullable<Bone> = null,\r\n localMatrix: Nullable<Matrix> = null,\r\n restMatrix: Nullable<Matrix> = null,\r\n bindMatrix: Nullable<Matrix> = null,\r\n index: Nullable<number> = null\r\n ) {\r\n super(name, skeleton.getScene());\r\n this._skeleton = skeleton;\r\n this._localMatrix = localMatrix?.clone() ?? Matrix.Identity();\r\n this._restMatrix = restMatrix ?? this._localMatrix.clone();\r\n this._bindMatrix = bindMatrix ?? this._localMatrix.clone();\r\n this._index = index;\r\n\r\n this._absoluteMatrix = new Matrix();\r\n this._absoluteBindMatrix = new Matrix();\r\n this._absoluteInverseBindMatrix = new Matrix();\r\n this._finalMatrix = new Matrix();\r\n\r\n skeleton.bones.push(this);\r\n\r\n this.setParent(parentBone, false);\r\n\r\n this._updateAbsoluteBindMatrices();\r\n }\r\n\r\n /**\r\n * Gets the current object class name.\r\n * @returns the class name\r\n */\r\n public getClassName(): string {\r\n return \"Bone\";\r\n }\r\n\r\n // Members\r\n\r\n /**\r\n * Gets the parent skeleton\r\n * @returns a skeleton\r\n */\r\n public getSkeleton(): Skeleton {\r\n return this._skeleton;\r\n }\r\n\r\n public get parent(): Bone {\r\n return this._parentNode as Bone;\r\n }\r\n\r\n /**\r\n * Gets parent bone\r\n * @returns a bone or null if the bone is the root of the bone hierarchy\r\n */\r\n public getParent(): Nullable<Bone> {\r\n return this.parent;\r\n }\r\n\r\n /**\r\n * Returns an array containing the children of the bone\r\n * @returns an array containing the children of the bone (can be empty if the bone has no children)\r\n */\r\n public getChildren(): Array<Bone> {\r\n return this.children;\r\n }\r\n\r\n /**\r\n * Gets the node index in matrix array generated for rendering\r\n * @returns the node index\r\n */\r\n public getIndex(): number {\r\n return this._index === null ? this.getSkeleton().bones.indexOf(this) : this._index;\r\n }\r\n\r\n public set parent(newParent: Nullable<Bone>) {\r\n this.setParent(newParent);\r\n }\r\n\r\n /**\r\n * Sets the parent bone\r\n * @param parent defines the parent (can be null if the bone is the root)\r\n * @param updateAbsoluteBindMatrices defines if the absolute bind and absolute inverse bind matrices must be updated\r\n */\r\n public setParent(parent: Nullable<Bone>, updateAbsoluteBindMatrices: boolean = true): void {\r\n if (this.parent === parent) {\r\n return;\r\n }\r\n\r\n if (this.parent) {\r\n const index = this.parent.children.indexOf(this);\r\n if (index !== -1) {\r\n this.parent.children.splice(index, 1);\r\n }\r\n }\r\n\r\n this._parentNode = parent;\r\n\r\n if (this.parent) {\r\n this.parent.children.push(this);\r\n }\r\n\r\n if (updateAbsoluteBindMatrices) {\r\n this._updateAbsoluteBindMatrices();\r\n }\r\n\r\n this.markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets the local matrix\r\n * @returns the local matrix\r\n */\r\n public getLocalMatrix(): Matrix {\r\n this._compose();\r\n return this._localMatrix;\r\n }\r\n\r\n /**\r\n * Gets the bind matrix\r\n * @returns the bind matrix\r\n */\r\n public getBindMatrix(): Matrix {\r\n return this._bindMatrix;\r\n }\r\n\r\n /**\r\n * Gets the bind matrix.\r\n * @returns the bind matrix\r\n * @deprecated Please use getBindMatrix instead\r\n */\r\n public getBaseMatrix(): Matrix {\r\n return this.getBindMatrix();\r\n }\r\n\r\n /**\r\n * Gets the rest matrix\r\n * @returns the rest matrix\r\n */\r\n public getRestMatrix(): Matrix {\r\n return this._restMatrix;\r\n }\r\n\r\n /**\r\n * Gets the rest matrix\r\n * @returns the rest matrix\r\n * @deprecated Please use getRestMatrix instead\r\n */\r\n public getRestPose(): Matrix {\r\n return this.getRestMatrix();\r\n }\r\n\r\n /**\r\n * Sets the rest matrix\r\n * @param matrix the local-space rest matrix to set for this bone\r\n */\r\n public setRestMatrix(matrix: Matrix): void {\r\n this._restMatrix.copyFrom(matrix);\r\n }\r\n\r\n /**\r\n * Sets the rest matrix\r\n * @param matrix the local-space rest to set for this bone\r\n * @deprecated Please use setRestMatrix instead\r\n */\r\n public setRestPose(matrix: Matrix): void {\r\n this.setRestMatrix(matrix);\r\n }\r\n\r\n /**\r\n * Gets the bind matrix\r\n * @returns the bind matrix\r\n * @deprecated Please use getBindMatrix instead\r\n */\r\n public getBindPose(): Matrix {\r\n return this.getBindMatrix();\r\n }\r\n\r\n /**\r\n * Sets the bind matrix\r\n * This will trigger a recomputation of the absolute bind and absolute inverse bind matrices for this bone and its children\r\n * Note that the local matrix will also be set with the matrix passed in parameter!\r\n * @param matrix the local-space bind matrix to set for this bone\r\n */\r\n public setBindMatrix(matrix: Matrix): void {\r\n this.updateMatrix(matrix);\r\n }\r\n\r\n /**\r\n * Sets the bind matrix\r\n * @param matrix the local-space bind to set for this bone\r\n * @deprecated Please use setBindMatrix instead\r\n */\r\n public setBindPose(matrix: Matrix): void {\r\n this.setBindMatrix(matrix);\r\n }\r\n\r\n /**\r\n * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)\r\n * @returns the final world matrix\r\n */\r\n public getFinalMatrix(): Matrix {\r\n return this._finalMatrix;\r\n }\r\n\r\n /**\r\n * Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)\r\n * @deprecated Please use getFinalMatrix instead\r\n * @returns the final world matrix\r\n */\r\n public getWorldMatrix(): Matrix {\r\n return this.getFinalMatrix();\r\n }\r\n\r\n /**\r\n * Sets the local matrix to the rest matrix\r\n */\r\n public returnToRest(): void {\r\n if (this._linkedTransformNode) {\r\n const localScaling = TmpVectors.Vector3[0];\r\n const localRotation = TmpVectors.Quaternion[0];\r\n const localPosition = TmpVectors.Vector3[1];\r\n\r\n this.getRestMatrix().decompose(localScaling, localRotation, localPosition);\r\n\r\n this._linkedTransformNode.position.copyFrom(localPosition);\r\n this._linkedTransformNode.rotationQuaternion = this._linkedTransformNode.rotationQuaternion ?? Quaternion.Identity();\r\n this._linkedTransformNode.rotationQuaternion.copyFrom(localRotation);\r\n this._linkedTransformNode.scaling.copyFrom(localScaling);\r\n } else {\r\n this._matrix = this._restMatrix;\r\n }\r\n }\r\n\r\n /**\r\n * Gets the inverse of the bind matrix, in world space (relative to the skeleton root)\r\n * @returns the inverse bind matrix, in world space\r\n */\r\n public getAbsoluteInverseBindMatrix(): Matrix {\r\n return this._absoluteInverseBindMatrix;\r\n }\r\n\r\n /**\r\n * Gets the inverse of the bind matrix, in world space (relative to the skeleton root)\r\n * @returns the inverse bind matrix, in world space\r\n * @deprecated Please use getAbsoluteInverseBindMatrix instead\r\n */\r\n public getInvertedAbsoluteTransform(): Matrix {\r\n return this.getAbsoluteInverseBindMatrix();\r\n }\r\n\r\n /**\r\n * Gets the bone matrix, in world space (relative to the skeleton root)\r\n * @returns the bone matrix, in world space\r\n */\r\n public getAbsoluteMatrix(): Matrix {\r\n return this._absoluteMatrix;\r\n }\r\n\r\n /**\r\n * Gets the bone matrix, in world space (relative to the skeleton root)\r\n * @returns the bone matrix, in world space\r\n * @deprecated Please use getAbsoluteMatrix instead\r\n */\r\n public getAbsoluteTransform(): Matrix {\r\n return this._absoluteMatrix;\r\n }\r\n\r\n /**\r\n * Links with the given transform node.\r\n * The local matrix of this bone is overwritten by the transform of the node every frame.\r\n * @param transformNode defines the transform node to link to\r\n */\r\n public linkTransformNode(transformNode: Nullable<TransformNode>): void {\r\n if (this._linkedTransformNode) {\r\n this._skeleton._numBonesWithLinkedTransformNode--;\r\n }\r\n\r\n this._linkedTransformNode = transformNode;\r\n\r\n if (this._linkedTransformNode) {\r\n this._skeleton._numBonesWithLinkedTransformNode++;\r\n }\r\n }\r\n\r\n // Properties (matches TransformNode properties)\r\n\r\n /**\r\n * Gets the node used to drive the bone's transformation\r\n * @returns a transform node or null\r\n */\r\n public getTransformNode() {\r\n return this._linkedTransformNode;\r\n }\r\n\r\n /** Gets or sets current position (in local space) */\r\n public get position(): Vector3 {\r\n this._decompose();\r\n return this._localPosition;\r\n }\r\n\r\n public set position(newPosition: Vector3) {\r\n this._decompose();\r\n this._localPosition.copyFrom(newPosition);\r\n\r\n this._markAsDirtyAndCompose();\r\n }\r\n\r\n /** Gets or sets current rotation (in local space) */\r\n public get rotation(): Vector3 {\r\n return this.getRotation();\r\n }\r\n\r\n public set rotation(newRotation: Vector3) {\r\n this.setRotation(newRotation);\r\n }\r\n\r\n /** Gets or sets current rotation quaternion (in local space) */\r\n public get rotationQuaternion() {\r\n this._decompose();\r\n return this._localRotation;\r\n }\r\n\r\n public set rotationQuaternion(newRotation: Quaternion) {\r\n this.setRotationQuaternion(newRotation);\r\n }\r\n\r\n /** Gets or sets current scaling (in local space) */\r\n public get scaling(): Vector3 {\r\n return this.getScale();\r\n }\r\n\r\n public set scaling(newScaling: Vector3) {\r\n this.setScale(newScaling);\r\n }\r\n\r\n /**\r\n * Gets the animation properties override\r\n */\r\n public get animationPropertiesOverride(): Nullable<AnimationPropertiesOverride> {\r\n return this._skeleton.animationPropertiesOverride;\r\n }\r\n\r\n // Methods\r\n private _decompose() {\r\n if (!this._needToDecompose) {\r\n return;\r\n }\r\n\r\n this._needToDecompose = false;\r\n\r\n if (!this._localScaling) {\r\n this._localScaling = Vector3.Zero();\r\n this._localRotation = Quaternion.Zero();\r\n this._localPosition = Vector3.Zero();\r\n }\r\n this._localMatrix.decompose(this._localScaling, this._localRotation, this._localPosition);\r\n }\r\n\r\n private _compose() {\r\n if (!this._needToCompose) {\r\n return;\r\n }\r\n\r\n if (!this._localScaling) {\r\n this._needToCompose = false;\r\n return;\r\n }\r\n\r\n this._needToCompose = false;\r\n Matrix.ComposeToRef(this._localScaling, this._localRotation, this._localPosition, this._localMatrix);\r\n }\r\n\r\n /**\r\n * Update the bind (and optionally the local) matrix\r\n * @param bindMatrix defines the new matrix to set to the bind/local matrix, in local space\r\n * @param updateAbsoluteBindMatrices defines if the absolute bind and absolute inverse bind matrices must be recomputed (default: true)\r\n * @param updateLocalMatrix defines if the local matrix should also be updated with the matrix passed in parameter (default: true)\r\n */\r\n public updateMatrix(bindMatrix: Matrix, updateAbsoluteBindMatrices = true, updateLocalMatrix = true): void {\r\n this._bindMatrix.copyFrom(bindMatrix);\r\n\r\n if (updateAbsoluteBindMatrices) {\r\n this._updateAbsoluteBindMatrices();\r\n }\r\n\r\n if (updateLocalMatrix) {\r\n this._matrix = bindMatrix;\r\n } else {\r\n this.markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _updateAbsoluteBindMatrices(bindMatrix?: Matrix, updateChildren = true): void {\r\n if (!bindMatrix) {\r\n bindMatrix = this._bindMatrix;\r\n }\r\n\r\n if (this.parent) {\r\n bindMatrix.multiplyToRef(this.parent._absoluteBindMatrix, this._absoluteBindMatrix);\r\n } else {\r\n this._absoluteBindMatrix.copyFrom(bindMatrix);\r\n }\r\n\r\n this._absoluteBindMatrix.invertToRef(this._absoluteInverseBindMatrix);\r\n\r\n if (updateChildren) {\r\n for (let index = 0; index < this.children.length; index++) {\r\n this.children[index]._updateAbsoluteBindMatrices();\r\n }\r\n }\r\n\r\n this._scalingDeterminant = this._absoluteBindMatrix.determinant() < 0 ? -1 : 1;\r\n }\r\n\r\n /**\r\n * Flag the bone as dirty (Forcing it to update everything)\r\n * @returns this bone\r\n */\r\n public markAsDirty(): Bone {\r\n this._currentRenderId++;\r\n this._childUpdateId++;\r\n this._skeleton._markAsDirty();\r\n return this;\r\n }\r\n\r\n /** @internal */\r\n public _markAsDirtyAndCompose() {\r\n this.markAsDirty();\r\n this._needToCompose = true;\r\n }\r\n\r\n private _markAsDirtyAndDecompose() {\r\n this.markAsDirty();\r\n this._needToDecompose = true;\r\n }\r\n\r\n private _updatePosition(vec: Vector3, space = Space.LOCAL, tNode?: TransformNode, translationMode = true): void {\r\n const lm = this.getLocalMatrix();\r\n\r\n if (space == Space.LOCAL) {\r\n if (translationMode) {\r\n lm.addAtIndex(12, vec.x);\r\n lm.addAtIndex(13, vec.y);\r\n lm.addAtIndex(14, vec.z);\r\n } else {\r\n lm.setTranslationFromFloats(vec.x, vec.y, vec.z);\r\n }\r\n } else {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n const tmat = Bone._TmpMats[0];\r\n const tvec = Bone._TmpVecs[0];\r\n\r\n if (this.parent) {\r\n if (tNode && wm) {\r\n tmat.copyFrom(this.parent.getAbsoluteMatrix());\r\n tmat.multiplyToRef(wm, tmat);\r\n } else {\r\n tmat.copyFrom(this.parent.getAbsoluteMatrix());\r\n }\r\n } else {\r\n Matrix.IdentityToRef(tmat);\r\n }\r\n\r\n if (translationMode) {\r\n tmat.setTranslationFromFloats(0, 0, 0);\r\n }\r\n tmat.invert();\r\n Vector3.TransformCoordinatesToRef(vec, tmat, tvec);\r\n\r\n if (translationMode) {\r\n lm.addAtIndex(12, tvec.x);\r\n lm.addAtIndex(13, tvec.y);\r\n lm.addAtIndex(14, tvec.z);\r\n } else {\r\n lm.setTranslationFromFloats(tvec.x, tvec.y, tvec.z);\r\n }\r\n }\r\n\r\n this._markAsDirtyAndDecompose();\r\n }\r\n\r\n /**\r\n * Translate the bone in local or world space\r\n * @param vec The amount to translate the bone\r\n * @param space The space that the translation is in (default: Space.LOCAL)\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public translate(vec: Vector3, space = Space.LOCAL, tNode?: TransformNode): void {\r\n this._updatePosition(vec, space, tNode, true);\r\n }\r\n\r\n /**\r\n * Set the position of the bone in local or world space\r\n * @param position The position to set the bone\r\n * @param space The space that the position is in (default: Space.LOCAL)\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setPosition(position: Vector3, space = Space.LOCAL, tNode?: TransformNode): void {\r\n this._updatePosition(position, space, tNode, false);\r\n }\r\n\r\n /**\r\n * Set the absolute position of the bone (world space)\r\n * @param position The position to set the bone\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setAbsolutePosition(position: Vector3, tNode?: TransformNode) {\r\n this.setPosition(position, Space.WORLD, tNode);\r\n }\r\n\r\n /**\r\n * Scale the bone on the x, y and z axes (in local space)\r\n * @param x The amount to scale the bone on the x axis\r\n * @param y The amount to scale the bone on the y axis\r\n * @param z The amount to scale the bone on the z axis\r\n * @param scaleChildren sets this to true if children of the bone should be scaled as well (false by default)\r\n */\r\n public scale(x: number, y: number, z: number, scaleChildren = false): void {\r\n const locMat = this.getLocalMatrix();\r\n\r\n // Apply new scaling on top of current local matrix\r\n const scaleMat = Bone._TmpMats[0];\r\n Matrix.ScalingToRef(x, y, z, scaleMat);\r\n scaleMat.multiplyToRef(locMat, locMat);\r\n\r\n // Invert scaling matrix and apply the inverse to all children\r\n scaleMat.invert();\r\n\r\n for (const child of this.children) {\r\n const cm = child.getLocalMatrix();\r\n cm.multiplyToRef(scaleMat, cm);\r\n cm.multiplyAtIndex(12, x);\r\n cm.multiplyAtIndex(13, y);\r\n cm.multiplyAtIndex(14, z);\r\n\r\n child._markAsDirtyAndDecompose();\r\n }\r\n\r\n this._markAsDirtyAndDecompose();\r\n\r\n if (scaleChildren) {\r\n for (const child of this.children) {\r\n child.scale(x, y, z, scaleChildren);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set the bone scaling in local space\r\n * @param scale defines the scaling vector\r\n */\r\n public setScale(scale: Vector3): void {\r\n this._decompose();\r\n this._localScaling.copyFrom(scale);\r\n this._markAsDirtyAndCompose();\r\n }\r\n\r\n /**\r\n * Gets the current scaling in local space\r\n * @returns the current scaling vector\r\n */\r\n public getScale(): Vector3 {\r\n this._decompose();\r\n return this._localScaling;\r\n }\r\n\r\n /**\r\n * Gets the current scaling in local space and stores it in a target vector\r\n * @param result defines the target vector\r\n */\r\n public getScaleToRef(result: Vector3) {\r\n this._decompose();\r\n result.copyFrom(this._localScaling);\r\n }\r\n\r\n /**\r\n * Set the yaw, pitch, and roll of the bone in local or world space\r\n * @param yaw The rotation of the bone on the y axis\r\n * @param pitch The rotation of the bone on the x axis\r\n * @param roll The rotation of the bone on the z axis\r\n * @param space The space that the axes of rotation are in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setYawPitchRoll(yaw: number, pitch: number, roll: number, space = Space.LOCAL, tNode?: TransformNode): void {\r\n if (space === Space.LOCAL) {\r\n const quat = Bone._TmpQuat;\r\n Quaternion.RotationYawPitchRollToRef(yaw, pitch, roll, quat);\r\n this.setRotationQuaternion(quat, space, tNode);\r\n return;\r\n }\r\n\r\n const rotMatInv = Bone._TmpMats[0];\r\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\r\n return;\r\n }\r\n\r\n const rotMat = Bone._TmpMats[1];\r\n Matrix.RotationYawPitchRollToRef(yaw, pitch, roll, rotMat);\r\n\r\n rotMatInv.multiplyToRef(rotMat, rotMat);\r\n this._rotateWithMatrix(rotMat, space, tNode);\r\n }\r\n\r\n /**\r\n * Add a rotation to the bone on an axis in local or world space\r\n * @param axis The axis to rotate the bone on\r\n * @param amount The amount to rotate the bone\r\n * @param space The space that the axis is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public rotate(axis: Vector3, amount: number, space = Space.LOCAL, tNode?: TransformNode): void {\r\n const rmat = Bone._TmpMats[0];\r\n rmat.setTranslationFromFloats(0, 0, 0);\r\n Matrix.RotationAxisToRef(axis, amount, rmat);\r\n this._rotateWithMatrix(rmat, space, tNode);\r\n }\r\n\r\n /**\r\n * Set the rotation of the bone to a particular axis angle in local or world space\r\n * @param axis The axis to rotate the bone on\r\n * @param angle The angle that the bone should be rotated to\r\n * @param space The space that the axis is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setAxisAngle(axis: Vector3, angle: number, space = Space.LOCAL, tNode?: TransformNode): void {\r\n if (space === Space.LOCAL) {\r\n const quat = Bone._TmpQuat;\r\n Quaternion.RotationAxisToRef(axis, angle, quat);\r\n\r\n this.setRotationQuaternion(quat, space, tNode);\r\n return;\r\n }\r\n\r\n const rotMatInv = Bone._TmpMats[0];\r\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\r\n return;\r\n }\r\n\r\n const rotMat = Bone._TmpMats[1];\r\n Matrix.RotationAxisToRef(axis, angle, rotMat);\r\n\r\n rotMatInv.multiplyToRef(rotMat, rotMat);\r\n this._rotateWithMatrix(rotMat, space, tNode);\r\n }\r\n\r\n /**\r\n * Set the euler rotation of the bone in local or world space\r\n * @param rotation The euler rotation that the bone should be set to\r\n * @param space The space that the rotation is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setRotation(rotation: Vector3, space = Space.LOCAL, tNode?: TransformNode): void {\r\n this.setYawPitchRoll(rotation.y, rotation.x, rotation.z, space, tNode);\r\n }\r\n\r\n /**\r\n * Set the quaternion rotation of the bone in local or world space\r\n * @param quat The quaternion rotation that the bone should be set to\r\n * @param space The space that the rotation is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setRotationQuaternion(quat: Quaternion, space = Space.LOCAL, tNode?: TransformNode): void {\r\n if (space === Space.LOCAL) {\r\n this._decompose();\r\n this._localRotation.copyFrom(quat);\r\n\r\n this._markAsDirtyAndCompose();\r\n\r\n return;\r\n }\r\n\r\n const rotMatInv = Bone._TmpMats[0];\r\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\r\n return;\r\n }\r\n\r\n const rotMat = Bone._TmpMats[1];\r\n Matrix.FromQuaternionToRef(quat, rotMat);\r\n\r\n rotMatInv.multiplyToRef(rotMat, rotMat);\r\n\r\n this._rotateWithMatrix(rotMat, space, tNode);\r\n }\r\n\r\n /**\r\n * Set the rotation matrix of the bone in local or world space\r\n * @param rotMat The rotation matrix that the bone should be set to\r\n * @param space The space that the rotation is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n */\r\n public setRotationMatrix(rotMat: Matrix, space = Space.LOCAL, tNode?: TransformNode): void {\r\n if (space === Space.LOCAL) {\r\n const quat = Bone._TmpQuat;\r\n Quaternion.FromRotationMatrixToRef(rotMat, quat);\r\n this.setRotationQuaternion(quat, space, tNode);\r\n return;\r\n }\r\n\r\n const rotMatInv = Bone._TmpMats[0];\r\n if (!this._getAbsoluteInverseMatrixUnscaledToRef(rotMatInv, tNode)) {\r\n return;\r\n }\r\n\r\n const rotMat2 = Bone._TmpMats[1];\r\n rotMat2.copyFrom(rotMat);\r\n\r\n rotMatInv.multiplyToRef(rotMat, rotMat2);\r\n\r\n this._rotateWithMatrix(rotMat2, space, tNode);\r\n }\r\n\r\n private _rotateWithMatrix(rmat: Matrix, space = Space.LOCAL, tNode?: TransformNode): void {\r\n const lmat = this.getLocalMatrix();\r\n const lx = lmat.m[12];\r\n const ly = lmat.m[13];\r\n const lz = lmat.m[14];\r\n const parent = this.getParent();\r\n const parentScale = Bone._TmpMats[3];\r\n const parentScaleInv = Bone._TmpMats[4];\r\n\r\n if (parent && space == Space.WORLD) {\r\n if (tNode) {\r\n parentScale.copyFrom(tNode.getWorldMatrix());\r\n parent.getAbsoluteMatrix().multiplyToRef(parentScale, parentScale);\r\n } else {\r\n parentScale.copyFrom(parent.getAbsoluteMatrix());\r\n }\r\n parentScaleInv.copyFrom(parentScale);\r\n parentScaleInv.invert();\r\n lmat.multiplyToRef(parentScale, lmat);\r\n lmat.multiplyToRef(rmat, lmat);\r\n lmat.multiplyToRef(parentScaleInv, lmat);\r\n } else {\r\n if (space == Space.WORLD && tNode) {\r\n parentScale.copyFrom(tNode.getWorldMatrix());\r\n parentScaleInv.copyFrom(parentScale);\r\n parentScaleInv.invert();\r\n lmat.multiplyToRef(parentScale, lmat);\r\n lmat.multiplyToRef(rmat, lmat);\r\n lmat.multiplyToRef(parentScaleInv, lmat);\r\n } else {\r\n lmat.multiplyToRef(rmat, lmat);\r\n }\r\n }\r\n\r\n lmat.setTranslationFromFloats(lx, ly, lz);\r\n\r\n this.computeAbsoluteMatrices();\r\n this._markAsDirtyAndDecompose();\r\n }\r\n\r\n private _getAbsoluteInverseMatrixUnscaledToRef(rotMatInv: Matrix, tNode?: TransformNode): boolean {\r\n const scaleMatrix = Bone._TmpMats[2];\r\n rotMatInv.copyFrom(this.getAbsoluteMatrix());\r\n\r\n if (tNode) {\r\n rotMatInv.multiplyToRef(tNode.getWorldMatrix(), rotMatInv);\r\n Matrix.ScalingToRef(tNode.scaling.x, tNode.scaling.y, tNode.scaling.z, scaleMatrix);\r\n } else {\r\n Matrix.IdentityToRef(scaleMatrix);\r\n }\r\n\r\n rotMatInv.invert();\r\n if (isNaN(rotMatInv.m[0])) {\r\n // Matrix failed to invert.\r\n // This can happen if scale is zero for example.\r\n return false;\r\n }\r\n\r\n scaleMatrix.multiplyAtIndex(0, this._scalingDeterminant);\r\n rotMatInv.multiplyToRef(scaleMatrix, rotMatInv);\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Get the position of the bone in local or world space\r\n * @param space The space that the returned position is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The position of the bone\r\n */\r\n public getPosition(space = Space.LOCAL, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const pos = Vector3.Zero();\r\n\r\n this.getPositionToRef(space, tNode, pos);\r\n\r\n return pos;\r\n }\r\n\r\n /**\r\n * Copy the position of the bone to a vector3 in local or world space\r\n * @param space The space that the returned position is in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 to copy the position to\r\n */\r\n public getPositionToRef(space = Space.LOCAL, tNode: Nullable<TransformNode>, result: Vector3): void {\r\n if (space == Space.LOCAL) {\r\n const lm = this.getLocalMatrix();\r\n\r\n result.x = lm.m[12];\r\n result.y = lm.m[13];\r\n result.z = lm.m[14];\r\n } else {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n let tmat = Bone._TmpMats[0];\r\n\r\n if (tNode && wm) {\r\n tmat.copyFrom(this.getAbsoluteMatrix());\r\n tmat.multiplyToRef(wm, tmat);\r\n } else {\r\n tmat = this.getAbsoluteMatrix();\r\n }\r\n\r\n result.x = tmat.m[12];\r\n result.y = tmat.m[13];\r\n result.z = tmat.m[14];\r\n }\r\n }\r\n\r\n /**\r\n * Get the absolute position of the bone (world space)\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The absolute position of the bone\r\n */\r\n public getAbsolutePosition(tNode: Nullable<TransformNode> = null): Vector3 {\r\n const pos = Vector3.Zero();\r\n\r\n this.getPositionToRef(Space.WORLD, tNode, pos);\r\n\r\n return pos;\r\n }\r\n\r\n /**\r\n * Copy the absolute position of the bone (world space) to the result param\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 to copy the absolute position to\r\n */\r\n public getAbsolutePositionToRef(tNode: TransformNode, result: Vector3) {\r\n this.getPositionToRef(Space.WORLD, tNode, result);\r\n }\r\n\r\n /**\r\n * Compute the absolute matrices of this bone and its children\r\n */\r\n public computeAbsoluteMatrices(): void {\r\n this._compose();\r\n\r\n if (this.parent) {\r\n this._localMatrix.multiplyToRef(this.parent._absoluteMatrix, this._absoluteMatrix);\r\n } else {\r\n this._absoluteMatrix.copyFrom(this._localMatrix);\r\n\r\n const poseMatrix = this._skeleton.getPoseMatrix();\r\n\r\n if (poseMatrix) {\r\n this._absoluteMatrix.multiplyToRef(poseMatrix, this._absoluteMatrix);\r\n }\r\n }\r\n\r\n const children = this.children;\r\n const len = children.length;\r\n\r\n for (let i = 0; i < len; i++) {\r\n children[i].computeAbsoluteMatrices();\r\n }\r\n }\r\n\r\n /**\r\n * Compute the absolute matrices of this bone and its children\r\n * @deprecated Please use computeAbsoluteMatrices instead\r\n */\r\n public computeAbsoluteTransforms(): void {\r\n this.computeAbsoluteMatrices();\r\n }\r\n\r\n /**\r\n * Get the world direction from an axis that is in the local space of the bone\r\n * @param localAxis The local direction that is used to compute the world direction\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The world direction\r\n */\r\n public getDirection(localAxis: Vector3, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.getDirectionToRef(localAxis, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the world direction to a vector3 from an axis that is in the local space of the bone\r\n * @param localAxis The local direction that is used to compute the world direction\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 that the world direction will be copied to\r\n */\r\n public getDirectionToRef(localAxis: Vector3, tNode: Nullable<TransformNode> = null, result: Vector3): void {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n const mat = Bone._TmpMats[0];\r\n\r\n mat.copyFrom(this.getAbsoluteMatrix());\r\n\r\n if (tNode && wm) {\r\n mat.multiplyToRef(wm, mat);\r\n }\r\n\r\n Vector3.TransformNormalToRef(localAxis, mat, result);\r\n\r\n result.normalize();\r\n }\r\n\r\n /**\r\n * Get the euler rotation of the bone in local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The euler rotation\r\n */\r\n public getRotation(space = Space.LOCAL, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.getRotationToRef(space, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the euler rotation of the bone to a vector3. The rotation can be in either local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 that the rotation should be copied to\r\n */\r\n public getRotationToRef(space = Space.LOCAL, tNode: Nullable<TransformNode> = null, result: Vector3): void {\r\n const quat = Bone._TmpQuat;\r\n\r\n this.getRotationQuaternionToRef(space, tNode, quat);\r\n\r\n quat.toEulerAnglesToRef(result);\r\n }\r\n\r\n /**\r\n * Get the quaternion rotation of the bone in either local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The quaternion rotation\r\n */\r\n public getRotationQuaternion(space = Space.LOCAL, tNode: Nullable<TransformNode> = null): Quaternion {\r\n const result = Quaternion.Identity();\r\n\r\n this.getRotationQuaternionToRef(space, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the quaternion rotation of the bone to a quaternion. The rotation can be in either local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The quaternion that the rotation should be copied to\r\n */\r\n public getRotationQuaternionToRef(space = Space.LOCAL, tNode: Nullable<TransformNode> = null, result: Quaternion): void {\r\n if (space == Space.LOCAL) {\r\n this._decompose();\r\n result.copyFrom(this._localRotation);\r\n } else {\r\n const mat = Bone._TmpMats[0];\r\n const amat = this.getAbsoluteMatrix();\r\n\r\n if (tNode) {\r\n amat.multiplyToRef(tNode.getWorldMatrix(), mat);\r\n } else {\r\n mat.copyFrom(amat);\r\n }\r\n\r\n mat.multiplyAtIndex(0, this._scalingDeterminant);\r\n mat.multiplyAtIndex(1, this._scalingDeterminant);\r\n mat.multiplyAtIndex(2, this._scalingDeterminant);\r\n\r\n mat.decompose(undefined, result, undefined);\r\n }\r\n }\r\n\r\n /**\r\n * Get the rotation matrix of the bone in local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The rotation matrix\r\n */\r\n public getRotationMatrix(space = Space.LOCAL, tNode: TransformNode): Matrix {\r\n const result = Matrix.Identity();\r\n\r\n this.getRotationMatrixToRef(space, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Copy the rotation matrix of the bone to a matrix. The rotation can be in either local or world space\r\n * @param space The space that the rotation should be in\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The quaternion that the rotation should be copied to\r\n */\r\n public getRotationMatrixToRef(space = Space.LOCAL, tNode: TransformNode, result: Matrix): void {\r\n if (space == Space.LOCAL) {\r\n this.getLocalMatrix().getRotationMatrixToRef(result);\r\n } else {\r\n const mat = Bone._TmpMats[0];\r\n const amat = this.getAbsoluteMatrix();\r\n\r\n if (tNode) {\r\n amat.multiplyToRef(tNode.getWorldMatrix(), mat);\r\n } else {\r\n mat.copyFrom(amat);\r\n }\r\n\r\n mat.multiplyAtIndex(0, this._scalingDeterminant);\r\n mat.multiplyAtIndex(1, this._scalingDeterminant);\r\n mat.multiplyAtIndex(2, this._scalingDeterminant);\r\n\r\n mat.getRotationMatrixToRef(result);\r\n }\r\n }\r\n\r\n /**\r\n * Get the world position of a point that is in the local space of the bone\r\n * @param position The local position\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The world position\r\n */\r\n public getAbsolutePositionFromLocal(position: Vector3, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.getAbsolutePositionFromLocalToRef(position, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Get the world position of a point that is in the local space of the bone and copy it to the result param\r\n * @param position The local position\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 that the world position should be copied to\r\n */\r\n public getAbsolutePositionFromLocalToRef(position: Vector3, tNode: Nullable<TransformNode> = null, result: Vector3): void {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n const tmat = Bone._TmpMats[0];\r\n\r\n tmat.copyFrom(this.getAbsoluteMatrix());\r\n\r\n if (tNode && wm) {\r\n tmat.multiplyToRef(wm, tmat);\r\n }\r\n\r\n Vector3.TransformCoordinatesToRef(position, tmat, result);\r\n }\r\n\r\n /**\r\n * Get the local position of a point that is in world space\r\n * @param position The world position\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @returns The local position\r\n */\r\n public getLocalPositionFromAbsolute(position: Vector3, tNode: Nullable<TransformNode> = null): Vector3 {\r\n const result = Vector3.Zero();\r\n\r\n this.getLocalPositionFromAbsoluteToRef(position, tNode, result);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Get the local position of a point that is in world space and copy it to the result param\r\n * @param position The world position\r\n * @param tNode A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD\r\n * @param result The vector3 that the local position should be copied to\r\n */\r\n public getLocalPositionFromAbsoluteToRef(position: Vector3, tNode: Nullable<TransformNode> = null, result: Vector3): void {\r\n let wm: Nullable<Matrix> = null;\r\n\r\n //tNode.getWorldMatrix() needs to be called before skeleton.computeAbsoluteMatrices()\r\n if (tNode) {\r\n wm = tNode.getWorldMatrix();\r\n }\r\n\r\n this._skeleton.computeAbsoluteMatrices();\r\n\r\n const tmat = Bone._TmpMats[0];\r\n\r\n tmat.copyFrom(this.getAbsoluteMatrix());\r\n\r\n if (tNode && wm) {\r\n tmat.multiplyToRef(wm, tmat);\r\n }\r\n\r\n tmat.invert();\r\n\r\n Vector3.TransformCoordinatesToRef(position, tmat, result);\r\n }\r\n\r\n /**\r\n * Set the current local matrix as the restMatrix for this bone.\r\n */\r\n public setCurrentPoseAsRest(): void {\r\n this.setRestMatrix(this.getLocalMatrix());\r\n }\r\n}\r\n"]}
@@ -53,32 +53,32 @@ export declare abstract class BaseCameraPointersInput implements ICameraInput<Ca
53
53
  /**
54
54
  * Called on pointer POINTERDOUBLETAP event.
55
55
  * Override this method to provide functionality on POINTERDOUBLETAP event.
56
- * @param type
56
+ * @param type type of event
57
57
  */
58
58
  onDoubleTap(type: string): void;
59
59
  /**
60
60
  * Called on pointer POINTERMOVE event if only a single touch is active.
61
61
  * Override this method to provide functionality.
62
- * @param point
63
- * @param offsetX
64
- * @param offsetY
62
+ * @param point The current position of the pointer
63
+ * @param offsetX The offsetX of the pointer when the event occurred
64
+ * @param offsetY The offsetY of the pointer when the event occurred
65
65
  */
66
66
  onTouch(point: Nullable<PointerTouch>, offsetX: number, offsetY: number): void;
67
67
  /**
68
68
  * Called on pointer POINTERMOVE event if multiple touches are active.
69
69
  * Override this method to provide functionality.
70
- * @param _pointA
71
- * @param _pointB
72
- * @param previousPinchSquaredDistance
73
- * @param pinchSquaredDistance
74
- * @param previousMultiTouchPanPosition
75
- * @param multiTouchPanPosition
70
+ * @param _pointA First point in the pair
71
+ * @param _pointB Second point in the pair
72
+ * @param previousPinchSquaredDistance Sqr Distance between the points the last time this event was fired (by this input)
73
+ * @param pinchSquaredDistance Sqr Distance between the points this time
74
+ * @param previousMultiTouchPanPosition Previous center point between the points
75
+ * @param multiTouchPanPosition Current center point between the points
76
76
  */
77
77
  onMultiTouch(_pointA: Nullable<PointerTouch>, _pointB: Nullable<PointerTouch>, previousPinchSquaredDistance: number, pinchSquaredDistance: number, previousMultiTouchPanPosition: Nullable<PointerTouch>, multiTouchPanPosition: Nullable<PointerTouch>): void;
78
78
  /**
79
79
  * Called on JS contextmenu event.
80
80
  * Override this method to provide functionality.
81
- * @param evt
81
+ * @param evt the event to be handled
82
82
  */
83
83
  onContextMenu(evt: PointerEvent): void;
84
84
  /**
@@ -232,35 +232,35 @@ export class BaseCameraPointersInput {
232
232
  /**
233
233
  * Called on pointer POINTERDOUBLETAP event.
234
234
  * Override this method to provide functionality on POINTERDOUBLETAP event.
235
- * @param type
235
+ * @param type type of event
236
236
  */
237
237
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
238
238
  onDoubleTap(type) { }
239
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
239
240
  /**
240
241
  * Called on pointer POINTERMOVE event if only a single touch is active.
241
242
  * Override this method to provide functionality.
242
- * @param point
243
- * @param offsetX
244
- * @param offsetY
243
+ * @param point The current position of the pointer
244
+ * @param offsetX The offsetX of the pointer when the event occurred
245
+ * @param offsetY The offsetY of the pointer when the event occurred
245
246
  */
246
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
247
247
  onTouch(point, offsetX, offsetY) { }
248
248
  /**
249
249
  * Called on pointer POINTERMOVE event if multiple touches are active.
250
250
  * Override this method to provide functionality.
251
- * @param _pointA
252
- * @param _pointB
253
- * @param previousPinchSquaredDistance
254
- * @param pinchSquaredDistance
255
- * @param previousMultiTouchPanPosition
256
- * @param multiTouchPanPosition
251
+ * @param _pointA First point in the pair
252
+ * @param _pointB Second point in the pair
253
+ * @param previousPinchSquaredDistance Sqr Distance between the points the last time this event was fired (by this input)
254
+ * @param pinchSquaredDistance Sqr Distance between the points this time
255
+ * @param previousMultiTouchPanPosition Previous center point between the points
256
+ * @param multiTouchPanPosition Current center point between the points
257
257
  */
258
258
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
259
259
  onMultiTouch(_pointA, _pointB, previousPinchSquaredDistance, pinchSquaredDistance, previousMultiTouchPanPosition, multiTouchPanPosition) { }
260
260
  /**
261
261
  * Called on JS contextmenu event.
262
262
  * Override this method to provide functionality.
263
- * @param evt
263
+ * @param evt the event to be handled
264
264
  */
265
265
  onContextMenu(evt) {
266
266
  evt.preventDefault();