@babylonjs/core 6.40.0 → 6.41.1

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 (729) hide show
  1. package/Animations/animatable.js +1 -2
  2. package/Animations/animatable.js.map +1 -1
  3. package/Animations/animation.js +4 -6
  4. package/Animations/animation.js.map +1 -1
  5. package/Animations/animationGroup.js +3 -3
  6. package/Animations/animationGroup.js.map +1 -1
  7. package/Animations/runtimeAnimation.js +3 -3
  8. package/Animations/runtimeAnimation.js.map +1 -1
  9. package/Audio/audioEngine.js +3 -5
  10. package/Audio/audioEngine.js.map +1 -1
  11. package/Audio/audioSceneComponent.js +1 -2
  12. package/Audio/audioSceneComponent.js.map +1 -1
  13. package/Audio/sound.js +48 -74
  14. package/Audio/sound.js.map +1 -1
  15. package/Audio/soundTrack.js +6 -12
  16. package/Audio/soundTrack.js.map +1 -1
  17. package/BakedVertexAnimation/bakedVertexAnimationManager.js +1 -2
  18. package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
  19. package/Behaviors/Cameras/autoRotationBehavior.js +1 -1
  20. package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
  21. package/Behaviors/Meshes/fadeInOutBehavior.js +2 -4
  22. package/Behaviors/Meshes/fadeInOutBehavior.js.map +1 -1
  23. package/Behaviors/Meshes/followBehavior.js +1 -2
  24. package/Behaviors/Meshes/followBehavior.js.map +1 -1
  25. package/Behaviors/Meshes/handConstraintBehavior.js +2 -2
  26. package/Behaviors/Meshes/handConstraintBehavior.js.map +1 -1
  27. package/Bones/bone.js +4 -6
  28. package/Bones/bone.js.map +1 -1
  29. package/Bones/skeleton.js +2 -3
  30. package/Bones/skeleton.js.map +1 -1
  31. package/Buffers/buffer.align.js +5 -8
  32. package/Buffers/buffer.align.js.map +1 -1
  33. package/Buffers/buffer.js +6 -8
  34. package/Buffers/buffer.js.map +1 -1
  35. package/Cameras/Inputs/BaseCameraPointersInput.js +3 -4
  36. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  37. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +3 -5
  38. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
  39. package/Cameras/Inputs/flyCameraMouseInput.js +2 -2
  40. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  41. package/Cameras/Inputs/freeCameraMouseInput.js +2 -2
  42. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  43. package/Cameras/arcRotateCamera.js +1 -2
  44. package/Cameras/arcRotateCamera.js.map +1 -1
  45. package/Cameras/camera.d.ts +5 -0
  46. package/Cameras/camera.js +18 -11
  47. package/Cameras/camera.js.map +1 -1
  48. package/Collisions/pickingInfo.js +1 -1
  49. package/Collisions/pickingInfo.js.map +1 -1
  50. package/Compute/computeEffect.js +5 -8
  51. package/Compute/computeEffect.js.map +1 -1
  52. package/Compute/computeShader.js +12 -9
  53. package/Compute/computeShader.js.map +1 -1
  54. package/Culling/Octrees/octreeSceneComponent.js +1 -2
  55. package/Culling/Octrees/octreeSceneComponent.js.map +1 -1
  56. package/Culling/boundingBox.js +2 -3
  57. package/Culling/boundingBox.js.map +1 -1
  58. package/Culling/ray.d.ts +6 -1
  59. package/Culling/ray.js +9 -4
  60. package/Culling/ray.js.map +1 -1
  61. package/Debug/debugLayer.js +4 -1
  62. package/Debug/debugLayer.js.map +1 -1
  63. package/Debug/directionalLightFrustumViewer.js +7 -9
  64. package/Debug/directionalLightFrustumViewer.js.map +1 -1
  65. package/Debug/physicsViewer.js +7 -9
  66. package/Debug/physicsViewer.js.map +1 -1
  67. package/Debug/rayHelper.js +1 -2
  68. package/Debug/rayHelper.js.map +1 -1
  69. package/Debug/skeletonViewer.js +26 -31
  70. package/Debug/skeletonViewer.js.map +1 -1
  71. package/Decorators/nodeDecorator.js +1 -1
  72. package/Decorators/nodeDecorator.js.map +1 -1
  73. package/DeviceInput/InputDevices/deviceSourceManager.js +3 -5
  74. package/DeviceInput/InputDevices/deviceSourceManager.js.map +1 -1
  75. package/DeviceInput/eventFactory.js +1 -1
  76. package/DeviceInput/eventFactory.js.map +1 -1
  77. package/DeviceInput/internalDeviceSourceManager.js +1 -2
  78. package/DeviceInput/internalDeviceSourceManager.js.map +1 -1
  79. package/DeviceInput/webDeviceInputSystem.js +9 -12
  80. package/DeviceInput/webDeviceInputSystem.js.map +1 -1
  81. package/Engines/Extensions/engine.cubeTexture.js +6 -1
  82. package/Engines/Extensions/engine.cubeTexture.js.map +1 -1
  83. package/Engines/Extensions/engine.multiRender.js +3 -4
  84. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  85. package/Engines/Extensions/engine.rawTexture.js +4 -4
  86. package/Engines/Extensions/engine.rawTexture.js.map +1 -1
  87. package/Engines/Extensions/engine.readTexture.js +2 -3
  88. package/Engines/Extensions/engine.readTexture.js.map +1 -1
  89. package/Engines/Extensions/engine.renderTarget.js +9 -5
  90. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  91. package/Engines/Extensions/engine.renderTargetCube.js +9 -1
  92. package/Engines/Extensions/engine.renderTargetCube.js.map +1 -1
  93. package/Engines/Extensions/engine.views.js +1 -2
  94. package/Engines/Extensions/engine.views.js.map +1 -1
  95. package/Engines/Processors/shaderCodeNode.js +6 -7
  96. package/Engines/Processors/shaderCodeNode.js.map +1 -1
  97. package/Engines/Processors/shaderProcessor.js +6 -11
  98. package/Engines/Processors/shaderProcessor.js.map +1 -1
  99. package/Engines/WebGL/webGLHardwareTexture.js +1 -2
  100. package/Engines/WebGL/webGLHardwareTexture.js.map +1 -1
  101. package/Engines/WebGL/webGLRenderTargetWrapper.js +3 -5
  102. package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
  103. package/Engines/WebGPU/Extensions/engine.cubeTexture.js +9 -2
  104. package/Engines/WebGPU/Extensions/engine.cubeTexture.js.map +1 -1
  105. package/Engines/WebGPU/Extensions/engine.dynamicTexture.js +1 -2
  106. package/Engines/WebGPU/Extensions/engine.dynamicTexture.js.map +1 -1
  107. package/Engines/WebGPU/Extensions/engine.multiRender.js +5 -6
  108. package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
  109. package/Engines/WebGPU/Extensions/engine.query.js +2 -4
  110. package/Engines/WebGPU/Extensions/engine.query.js.map +1 -1
  111. package/Engines/WebGPU/Extensions/engine.rawTexture.js +4 -4
  112. package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
  113. package/Engines/WebGPU/Extensions/engine.renderTarget.js +11 -5
  114. package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
  115. package/Engines/WebGPU/Extensions/engine.renderTargetCube.js +11 -3
  116. package/Engines/WebGPU/Extensions/engine.renderTargetCube.js.map +1 -1
  117. package/Engines/WebGPU/Extensions/engine.storageBuffer.js +2 -3
  118. package/Engines/WebGPU/Extensions/engine.storageBuffer.js.map +1 -1
  119. package/Engines/WebGPU/Extensions/engine.textureSampler.js +1 -2
  120. package/Engines/WebGPU/Extensions/engine.textureSampler.js.map +1 -1
  121. package/Engines/WebGPU/Extensions/engine.videoTexture.js +1 -2
  122. package/Engines/WebGPU/Extensions/engine.videoTexture.js.map +1 -1
  123. package/Engines/WebGPU/webgpuBufferManager.js +1 -1
  124. package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
  125. package/Engines/WebGPU/webgpuCacheBindGroups.js +6 -7
  126. package/Engines/WebGPU/webgpuCacheBindGroups.js.map +1 -1
  127. package/Engines/WebGPU/webgpuCacheRenderPipeline.js +15 -20
  128. package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
  129. package/Engines/WebGPU/webgpuCacheSampler.js +10 -5
  130. package/Engines/WebGPU/webgpuCacheSampler.js.map +1 -1
  131. package/Engines/WebGPU/webgpuClearQuad.js +2 -3
  132. package/Engines/WebGPU/webgpuClearQuad.js.map +1 -1
  133. package/Engines/WebGPU/webgpuComputePipelineContext.js +1 -2
  134. package/Engines/WebGPU/webgpuComputePipelineContext.js.map +1 -1
  135. package/Engines/WebGPU/webgpuDepthCullingState.js +2 -2
  136. package/Engines/WebGPU/webgpuDepthCullingState.js.map +1 -1
  137. package/Engines/WebGPU/webgpuDrawContext.js +1 -2
  138. package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
  139. package/Engines/WebGPU/webgpuHardwareTexture.js +4 -6
  140. package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
  141. package/Engines/WebGPU/webgpuMaterialContext.js +2 -3
  142. package/Engines/WebGPU/webgpuMaterialContext.js.map +1 -1
  143. package/Engines/WebGPU/webgpuOcclusionQuery.js +3 -5
  144. package/Engines/WebGPU/webgpuOcclusionQuery.js.map +1 -1
  145. package/Engines/WebGPU/webgpuPipelineContext.js +2 -4
  146. package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
  147. package/Engines/WebGPU/webgpuQuerySet.js +1 -1
  148. package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
  149. package/Engines/WebGPU/webgpuShaderProcessingContext.js +2 -4
  150. package/Engines/WebGPU/webgpuShaderProcessingContext.js.map +1 -1
  151. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js +2 -4
  152. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js.map +1 -1
  153. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +5 -4
  154. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
  155. package/Engines/WebGPU/webgpuStencilStateComposer.js +1 -2
  156. package/Engines/WebGPU/webgpuStencilStateComposer.js.map +1 -1
  157. package/Engines/WebGPU/webgpuTextureManager.js +40 -43
  158. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  159. package/Engines/WebGPU/webgpuTimestampQuery.js +12 -7
  160. package/Engines/WebGPU/webgpuTimestampQuery.js.map +1 -1
  161. package/Engines/WebGPU/webgpuTintWASM.js +4 -1
  162. package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
  163. package/Engines/engine.js +4 -7
  164. package/Engines/engine.js.map +1 -1
  165. package/Engines/nativeEngine.js +16 -22
  166. package/Engines/nativeEngine.js.map +1 -1
  167. package/Engines/nullEngine.js +9 -1
  168. package/Engines/nullEngine.js.map +1 -1
  169. package/Engines/renderTargetWrapper.js +11 -16
  170. package/Engines/renderTargetWrapper.js.map +1 -1
  171. package/Engines/thinEngine.js +32 -45
  172. package/Engines/thinEngine.js.map +1 -1
  173. package/Engines/webgpuEngine.js +77 -95
  174. package/Engines/webgpuEngine.js.map +1 -1
  175. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +2 -3
  176. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  177. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +3 -6
  178. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  179. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +1 -2
  180. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
  181. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js +1 -2
  182. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
  183. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +2 -4
  184. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
  185. package/FlowGraph/flowGraph.js +1 -2
  186. package/FlowGraph/flowGraph.js.map +1 -1
  187. package/FlowGraph/flowGraphBlock.js +2 -4
  188. package/FlowGraph/flowGraphBlock.js.map +1 -1
  189. package/FlowGraph/flowGraphContext.js +1 -2
  190. package/FlowGraph/flowGraphContext.js.map +1 -1
  191. package/FlowGraph/flowGraphCoordinator.js +4 -7
  192. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  193. package/FlowGraph/flowGraphSignalConnection.js +1 -2
  194. package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
  195. package/FlowGraph/serialization.js +2 -3
  196. package/FlowGraph/serialization.js.map +1 -1
  197. package/Gamepads/gamepadManager.js +1 -1
  198. package/Gamepads/gamepadManager.js.map +1 -1
  199. package/Gizmos/axisDragGizmo.js +2 -4
  200. package/Gizmos/axisDragGizmo.js.map +1 -1
  201. package/Gizmos/axisScaleGizmo.js +5 -8
  202. package/Gizmos/axisScaleGizmo.js.map +1 -1
  203. package/Gizmos/boundingBoxGizmo.js +1 -1
  204. package/Gizmos/boundingBoxGizmo.js.map +1 -1
  205. package/Gizmos/cameraGizmo.js +2 -3
  206. package/Gizmos/cameraGizmo.js.map +1 -1
  207. package/Gizmos/gizmo.js +4 -7
  208. package/Gizmos/gizmo.js.map +1 -1
  209. package/Gizmos/gizmoManager.js +3 -4
  210. package/Gizmos/gizmoManager.js.map +1 -1
  211. package/Gizmos/planeDragGizmo.js +2 -4
  212. package/Gizmos/planeDragGizmo.js.map +1 -1
  213. package/Gizmos/planeRotationGizmo.js +2 -4
  214. package/Gizmos/planeRotationGizmo.js.map +1 -1
  215. package/Helpers/environmentHelper.js +8 -2
  216. package/Helpers/environmentHelper.js.map +1 -1
  217. package/Helpers/videoDome.js +1 -2
  218. package/Helpers/videoDome.js.map +1 -1
  219. package/Inputs/scene.inputManager.js +8 -10
  220. package/Inputs/scene.inputManager.js.map +1 -1
  221. package/Layers/effectLayer.js +16 -10
  222. package/Layers/effectLayer.js.map +1 -1
  223. package/Layers/glowLayer.js +16 -6
  224. package/Layers/glowLayer.js.map +1 -1
  225. package/Layers/highlightLayer.js +12 -3
  226. package/Layers/highlightLayer.js.map +1 -1
  227. package/Layers/layer.js +1 -2
  228. package/Layers/layer.js.map +1 -1
  229. package/LensFlares/lensFlareSystem.js +1 -2
  230. package/LensFlares/lensFlareSystem.js.map +1 -1
  231. package/Lights/Shadows/cascadedShadowGenerator.js +21 -25
  232. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  233. package/Lights/Shadows/shadowGenerator.js +18 -21
  234. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  235. package/Lights/light.js +2 -4
  236. package/Lights/light.js.map +1 -1
  237. package/Lights/shadowLight.js +1 -1
  238. package/Lights/shadowLight.js.map +1 -1
  239. package/Loading/Plugins/babylonFileLoader.js +1 -2
  240. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  241. package/Loading/sceneLoader.js +1 -1
  242. package/Loading/sceneLoader.js.map +1 -1
  243. package/Materials/Background/backgroundMaterial.js +8 -7
  244. package/Materials/Background/backgroundMaterial.js.map +1 -1
  245. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +7 -6
  246. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  247. package/Materials/GreasedLine/greasedLinePluginMaterial.js +26 -32
  248. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
  249. package/Materials/GreasedLine/greasedLineSimpleMaterial.js +22 -27
  250. package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -1
  251. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js +6 -7
  252. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
  253. package/Materials/Node/Blocks/Dual/imageSourceBlock.js +1 -2
  254. package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
  255. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +1 -2
  256. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  257. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js +1 -1
  258. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
  259. package/Materials/Node/Blocks/Dual/textureBlock.js +10 -16
  260. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  261. package/Materials/Node/Blocks/Fragment/TBNBlock.js +2 -3
  262. package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
  263. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +1 -2
  264. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  265. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +2 -4
  266. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  267. package/Materials/Node/Blocks/Input/inputBlock.js +1 -2
  268. package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
  269. package/Materials/Node/Blocks/PBR/clearCoatBlock.js +24 -26
  270. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  271. package/Materials/Node/Blocks/PBR/iridescenceBlock.js +3 -3
  272. package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
  273. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +45 -49
  274. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  275. package/Materials/Node/Blocks/PBR/reflectionBlock.js +1 -2
  276. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  277. package/Materials/Node/Blocks/PBR/refractionBlock.js +1 -2
  278. package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
  279. package/Materials/Node/Blocks/PBR/sheenBlock.js +13 -13
  280. package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
  281. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +27 -28
  282. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  283. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js +1 -2
  284. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  285. package/Materials/Node/Blocks/Vertex/instancesBlock.js +2 -2
  286. package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
  287. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +43 -33
  288. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  289. package/Materials/Node/Blocks/biPlanarBlock.js +1 -2
  290. package/Materials/Node/Blocks/biPlanarBlock.js.map +1 -1
  291. package/Materials/Node/Blocks/cloudBlock.js +2 -3
  292. package/Materials/Node/Blocks/cloudBlock.js.map +1 -1
  293. package/Materials/Node/Blocks/colorMergerBlock.js +4 -5
  294. package/Materials/Node/Blocks/colorMergerBlock.js.map +1 -1
  295. package/Materials/Node/Blocks/customBlock.js +4 -6
  296. package/Materials/Node/Blocks/customBlock.js.map +1 -1
  297. package/Materials/Node/Blocks/meshAttributeExistsBlock.js +2 -4
  298. package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -1
  299. package/Materials/Node/Blocks/triPlanarBlock.js +14 -23
  300. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  301. package/Materials/Node/Blocks/vectorMergerBlock.js +4 -5
  302. package/Materials/Node/Blocks/vectorMergerBlock.js.map +1 -1
  303. package/Materials/Node/nodeMaterial.js +25 -23
  304. package/Materials/Node/nodeMaterial.js.map +1 -1
  305. package/Materials/Node/nodeMaterialBlock.js +3 -4
  306. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  307. package/Materials/Node/nodeMaterialBuildState.js +1 -1
  308. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  309. package/Materials/PBR/pbrBaseMaterial.js +33 -35
  310. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  311. package/Materials/PBR/pbrClearCoatConfiguration.js +6 -9
  312. package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
  313. package/Materials/PBR/pbrIridescenceConfiguration.js +4 -7
  314. package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
  315. package/Materials/PBR/pbrSheenConfiguration.js +4 -7
  316. package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
  317. package/Materials/Textures/Loaders/envTextureLoader.js +2 -2
  318. package/Materials/Textures/Loaders/envTextureLoader.js.map +1 -1
  319. package/Materials/Textures/Packer/packer.js +13 -14
  320. package/Materials/Textures/Packer/packer.js.map +1 -1
  321. package/Materials/Textures/Procedurals/noiseProceduralTexture.js +1 -2
  322. package/Materials/Textures/Procedurals/noiseProceduralTexture.js.map +1 -1
  323. package/Materials/Textures/Procedurals/proceduralTexture.js +19 -11
  324. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  325. package/Materials/Textures/baseTexture.js +2 -4
  326. package/Materials/Textures/baseTexture.js.map +1 -1
  327. package/Materials/Textures/cubeTexture.js +7 -13
  328. package/Materials/Textures/cubeTexture.js.map +1 -1
  329. package/Materials/Textures/dynamicTexture.js +1 -2
  330. package/Materials/Textures/dynamicTexture.js.map +1 -1
  331. package/Materials/Textures/hdrCubeTexture.js +2 -4
  332. package/Materials/Textures/hdrCubeTexture.js.map +1 -1
  333. package/Materials/Textures/htmlElementTexture.js +5 -3
  334. package/Materials/Textures/htmlElementTexture.js.map +1 -1
  335. package/Materials/Textures/internalTexture.js +3 -5
  336. package/Materials/Textures/internalTexture.js.map +1 -1
  337. package/Materials/Textures/mirrorTexture.js +3 -6
  338. package/Materials/Textures/mirrorTexture.js.map +1 -1
  339. package/Materials/Textures/multiRenderTarget.js +5 -8
  340. package/Materials/Textures/multiRenderTarget.js.map +1 -1
  341. package/Materials/Textures/rawTexture.js +1 -1
  342. package/Materials/Textures/rawTexture.js.map +1 -1
  343. package/Materials/Textures/renderTargetTexture.js +22 -34
  344. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  345. package/Materials/Textures/texture.js +16 -21
  346. package/Materials/Textures/texture.js.map +1 -1
  347. package/Materials/Textures/thinRenderTargetTexture.js +2 -4
  348. package/Materials/Textures/thinRenderTargetTexture.js.map +1 -1
  349. package/Materials/Textures/thinTexture.js +1 -1
  350. package/Materials/Textures/thinTexture.js.map +1 -1
  351. package/Materials/Textures/videoTexture.js +12 -10
  352. package/Materials/Textures/videoTexture.js.map +1 -1
  353. package/Materials/clipPlaneMaterialHelper.js +18 -21
  354. package/Materials/clipPlaneMaterialHelper.js.map +1 -1
  355. package/Materials/drawWrapper.d.ts +15 -0
  356. package/Materials/drawWrapper.js +17 -4
  357. package/Materials/drawWrapper.js.map +1 -1
  358. package/Materials/effect.d.ts +4 -16
  359. package/Materials/effect.js +18 -34
  360. package/Materials/effect.js.map +1 -1
  361. package/Materials/effectRenderer.js +2 -4
  362. package/Materials/effectRenderer.js.map +1 -1
  363. package/Materials/material.d.ts +3 -2
  364. package/Materials/material.decalMapConfiguration.js +3 -3
  365. package/Materials/material.decalMapConfiguration.js.map +1 -1
  366. package/Materials/material.detailMapConfiguration.js +1 -2
  367. package/Materials/material.detailMapConfiguration.js.map +1 -1
  368. package/Materials/material.js +21 -16
  369. package/Materials/material.js.map +1 -1
  370. package/Materials/materialDefines.js +5 -6
  371. package/Materials/materialDefines.js.map +1 -1
  372. package/Materials/materialHelper.d.ts +1 -1
  373. package/Materials/materialHelper.js +3 -4
  374. package/Materials/materialHelper.js.map +1 -1
  375. package/Materials/materialPluginManager.js +3 -5
  376. package/Materials/materialPluginManager.js.map +1 -1
  377. package/Materials/meshDebugPluginMaterial.js +13 -14
  378. package/Materials/meshDebugPluginMaterial.js.map +1 -1
  379. package/Materials/multiMaterial.js +1 -2
  380. package/Materials/multiMaterial.js.map +1 -1
  381. package/Materials/pushMaterial.d.ts +2 -2
  382. package/Materials/pushMaterial.js +9 -6
  383. package/Materials/pushMaterial.js.map +1 -1
  384. package/Materials/shaderMaterial.d.ts +1 -1
  385. package/Materials/shaderMaterial.js +73 -47
  386. package/Materials/shaderMaterial.js.map +1 -1
  387. package/Materials/shadowDepthWrapper.js +24 -23
  388. package/Materials/shadowDepthWrapper.js.map +1 -1
  389. package/Materials/standardMaterial.js +18 -19
  390. package/Materials/standardMaterial.js.map +1 -1
  391. package/Materials/uniformBuffer.js +1 -1
  392. package/Materials/uniformBuffer.js.map +1 -1
  393. package/Maths/math.vector.js +1 -2
  394. package/Maths/math.vector.js.map +1 -1
  395. package/Meshes/Builders/boxBuilder.d.ts +0 -33
  396. package/Meshes/Builders/boxBuilder.js +0 -33
  397. package/Meshes/Builders/boxBuilder.js.map +1 -1
  398. package/Meshes/Builders/cylinderBuilder.d.ts +0 -31
  399. package/Meshes/Builders/cylinderBuilder.js +0 -31
  400. package/Meshes/Builders/cylinderBuilder.js.map +1 -1
  401. package/Meshes/Builders/decalBuilder.d.ts +0 -7
  402. package/Meshes/Builders/decalBuilder.js +26 -36
  403. package/Meshes/Builders/decalBuilder.js.map +1 -1
  404. package/Meshes/Builders/discBuilder.d.ts +0 -13
  405. package/Meshes/Builders/discBuilder.js +0 -13
  406. package/Meshes/Builders/discBuilder.js.map +1 -1
  407. package/Meshes/Builders/geodesicBuilder.d.ts +0 -13
  408. package/Meshes/Builders/geodesicBuilder.js +0 -13
  409. package/Meshes/Builders/geodesicBuilder.js.map +1 -1
  410. package/Meshes/Builders/greasedLineBuilder.js +16 -16
  411. package/Meshes/Builders/greasedLineBuilder.js.map +1 -1
  412. package/Meshes/Builders/groundBuilder.d.ts +5 -1
  413. package/Meshes/Builders/groundBuilder.js +13 -2
  414. package/Meshes/Builders/groundBuilder.js.map +1 -1
  415. package/Meshes/Builders/hemisphereBuilder.d.ts +0 -3
  416. package/Meshes/Builders/hemisphereBuilder.js +0 -3
  417. package/Meshes/Builders/hemisphereBuilder.js.map +1 -1
  418. package/Meshes/Builders/icoSphereBuilder.d.ts +0 -19
  419. package/Meshes/Builders/icoSphereBuilder.js +0 -19
  420. package/Meshes/Builders/icoSphereBuilder.js.map +1 -1
  421. package/Meshes/Builders/latheBuilder.d.ts +0 -12
  422. package/Meshes/Builders/latheBuilder.js +0 -12
  423. package/Meshes/Builders/latheBuilder.js.map +1 -1
  424. package/Meshes/Builders/linesBuilder.d.ts +0 -26
  425. package/Meshes/Builders/linesBuilder.js +0 -26
  426. package/Meshes/Builders/linesBuilder.js.map +1 -1
  427. package/Meshes/Builders/planeBuilder.d.ts +0 -14
  428. package/Meshes/Builders/planeBuilder.js +0 -14
  429. package/Meshes/Builders/planeBuilder.js.map +1 -1
  430. package/Meshes/Builders/polygonBuilder.d.ts +0 -21
  431. package/Meshes/Builders/polygonBuilder.js +0 -21
  432. package/Meshes/Builders/polygonBuilder.js.map +1 -1
  433. package/Meshes/Builders/polyhedronBuilder.d.ts +0 -25
  434. package/Meshes/Builders/polyhedronBuilder.js +0 -25
  435. package/Meshes/Builders/polyhedronBuilder.js.map +1 -1
  436. package/Meshes/Builders/ribbonBuilder.d.ts +0 -22
  437. package/Meshes/Builders/ribbonBuilder.js +0 -22
  438. package/Meshes/Builders/ribbonBuilder.js.map +1 -1
  439. package/Meshes/Builders/shapeBuilder.d.ts +0 -32
  440. package/Meshes/Builders/shapeBuilder.js +0 -32
  441. package/Meshes/Builders/shapeBuilder.js.map +1 -1
  442. package/Meshes/Builders/sphereBuilder.d.ts +0 -22
  443. package/Meshes/Builders/sphereBuilder.js +0 -22
  444. package/Meshes/Builders/sphereBuilder.js.map +1 -1
  445. package/Meshes/Builders/textBuilder.js +2 -3
  446. package/Meshes/Builders/textBuilder.js.map +1 -1
  447. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +9 -1
  448. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +141 -12
  449. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  450. package/Meshes/GreasedLine/greasedLineBaseMesh.js +8 -11
  451. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
  452. package/Meshes/GreasedLine/greasedLineMesh.js +3 -5
  453. package/Meshes/GreasedLine/greasedLineMesh.js.map +1 -1
  454. package/Meshes/GreasedLine/greasedLineRibbonMesh.js +13 -18
  455. package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
  456. package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js +1 -2
  457. package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  458. package/Meshes/Node/Blocks/geometryDesaturateBlock.d.ts +30 -0
  459. package/Meshes/Node/Blocks/geometryDesaturateBlock.js +62 -0
  460. package/Meshes/Node/Blocks/geometryDesaturateBlock.js.map +1 -0
  461. package/Meshes/Node/index.d.ts +1 -0
  462. package/Meshes/Node/index.js +1 -0
  463. package/Meshes/Node/index.js.map +1 -1
  464. package/Meshes/Node/nodeGeometry.js +6 -3
  465. package/Meshes/Node/nodeGeometry.js.map +1 -1
  466. package/Meshes/Node/nodeGeometryBlock.js +1 -1
  467. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  468. package/Meshes/Node/nodeGeometryBlockConnectionPoint.js +1 -2
  469. package/Meshes/Node/nodeGeometryBlockConnectionPoint.js.map +1 -1
  470. package/Meshes/Node/nodeGeometryBuildState.js +1 -2
  471. package/Meshes/Node/nodeGeometryBuildState.js.map +1 -1
  472. package/Meshes/abstractMesh.js +7 -10
  473. package/Meshes/abstractMesh.js.map +1 -1
  474. package/Meshes/csg.js +1 -2
  475. package/Meshes/csg.js.map +1 -1
  476. package/Meshes/geometry.js +1 -1
  477. package/Meshes/geometry.js.map +1 -1
  478. package/Meshes/instancedMesh.js +5 -10
  479. package/Meshes/instancedMesh.js.map +1 -1
  480. package/Meshes/mesh.js +14 -23
  481. package/Meshes/mesh.js.map +1 -1
  482. package/Meshes/mesh.vertexData.js +3 -4
  483. package/Meshes/mesh.vertexData.js.map +1 -1
  484. package/Meshes/meshUVSpaceRenderer.js +18 -15
  485. package/Meshes/meshUVSpaceRenderer.js.map +1 -1
  486. package/Meshes/subMesh.js +8 -14
  487. package/Meshes/subMesh.js.map +1 -1
  488. package/Meshes/thinInstanceMesh.js +12 -18
  489. package/Meshes/thinInstanceMesh.js.map +1 -1
  490. package/Meshes/trailMesh.js +2 -3
  491. package/Meshes/trailMesh.js.map +1 -1
  492. package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js +1 -2
  493. package/Misc/HighDynamicRange/cubemapToSphericalPolynomial.js.map +1 -1
  494. package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js +9 -14
  495. package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js.map +1 -1
  496. package/Misc/PerformanceViewer/performanceViewerCollector.js +2 -3
  497. package/Misc/PerformanceViewer/performanceViewerCollector.js.map +1 -1
  498. package/Misc/arrayTools.js +1 -1
  499. package/Misc/arrayTools.js.map +1 -1
  500. package/Misc/basis.js +2 -3
  501. package/Misc/basis.js.map +1 -1
  502. package/Misc/dataStorage.js +1 -1
  503. package/Misc/dataStorage.js.map +1 -1
  504. package/Misc/deepCopier.js +1 -1
  505. package/Misc/deepCopier.js.map +1 -1
  506. package/Misc/environmentTextureTools.js +3 -4
  507. package/Misc/environmentTextureTools.js.map +1 -1
  508. package/Misc/equirectangularCapture.js +2 -3
  509. package/Misc/equirectangularCapture.js.map +1 -1
  510. package/Misc/fileTools.js +4 -4
  511. package/Misc/fileTools.js.map +1 -1
  512. package/Misc/greasedLineTools.js +3 -5
  513. package/Misc/greasedLineTools.js.map +1 -1
  514. package/Misc/logger.js +1 -2
  515. package/Misc/logger.js.map +1 -1
  516. package/Misc/minMaxReducer.js +2 -3
  517. package/Misc/minMaxReducer.js.map +1 -1
  518. package/Misc/pressureObserverWrapper.js +5 -8
  519. package/Misc/pressureObserverWrapper.js.map +1 -1
  520. package/Misc/sceneRecorder.js +1 -1
  521. package/Misc/sceneRecorder.js.map +1 -1
  522. package/Misc/screenshotTools.js +1 -1
  523. package/Misc/screenshotTools.js.map +1 -1
  524. package/Misc/textureTools.js +5 -5
  525. package/Misc/textureTools.js.map +1 -1
  526. package/Misc/timer.js +3 -5
  527. package/Misc/timer.js.map +1 -1
  528. package/Misc/tools.d.ts +3 -2
  529. package/Misc/tools.js +6 -5
  530. package/Misc/tools.js.map +1 -1
  531. package/Misc/trajectoryClassifier.js +3 -3
  532. package/Misc/trajectoryClassifier.js.map +1 -1
  533. package/Misc/videoRecorder.js +6 -4
  534. package/Misc/videoRecorder.js.map +1 -1
  535. package/Misc/virtualJoystick.js +4 -1
  536. package/Misc/virtualJoystick.js.map +1 -1
  537. package/Morph/morphTargetManager.js +1 -2
  538. package/Morph/morphTargetManager.js.map +1 -1
  539. package/Particles/EmitterTypes/meshParticleEmitter.js +1 -2
  540. package/Particles/EmitterTypes/meshParticleEmitter.js.map +1 -1
  541. package/Particles/baseParticleSystem.d.ts +4 -0
  542. package/Particles/baseParticleSystem.js +4 -0
  543. package/Particles/baseParticleSystem.js.map +1 -1
  544. package/Particles/computeShaderParticleSystem.js +3 -6
  545. package/Particles/computeShaderParticleSystem.js.map +1 -1
  546. package/Particles/gpuParticleSystem.d.ts +2 -2
  547. package/Particles/gpuParticleSystem.js +30 -20
  548. package/Particles/gpuParticleSystem.js.map +1 -1
  549. package/Particles/particleSystem.d.ts +3 -2
  550. package/Particles/particleSystem.js +33 -30
  551. package/Particles/particleSystem.js.map +1 -1
  552. package/Particles/particleSystemComponent.js +2 -3
  553. package/Particles/particleSystemComponent.js.map +1 -1
  554. package/Particles/pointsCloudSystem.js +5 -8
  555. package/Particles/pointsCloudSystem.js.map +1 -1
  556. package/Particles/solidParticleSystem.js +5 -7
  557. package/Particles/solidParticleSystem.js.map +1 -1
  558. package/Particles/webgl2ParticleSystem.js +1 -2
  559. package/Particles/webgl2ParticleSystem.js.map +1 -1
  560. package/Physics/castingResult.d.ts +66 -0
  561. package/Physics/castingResult.js +61 -0
  562. package/Physics/castingResult.js.map +1 -0
  563. package/Physics/index.d.ts +4 -0
  564. package/Physics/index.js +4 -0
  565. package/Physics/index.js.map +1 -1
  566. package/Physics/joinedPhysicsEngineComponent.js +2 -2
  567. package/Physics/joinedPhysicsEngineComponent.js.map +1 -1
  568. package/Physics/physicsHelper.js +19 -21
  569. package/Physics/physicsHelper.js.map +1 -1
  570. package/Physics/physicsPointProximityQuery.d.ts +28 -0
  571. package/Physics/physicsPointProximityQuery.js +2 -0
  572. package/Physics/physicsPointProximityQuery.js.map +1 -0
  573. package/Physics/physicsRaycastResult.d.ts +2 -44
  574. package/Physics/physicsRaycastResult.js +7 -38
  575. package/Physics/physicsRaycastResult.js.map +1 -1
  576. package/Physics/physicsShapeCastQuery.d.ts +32 -0
  577. package/Physics/physicsShapeCastQuery.js +2 -0
  578. package/Physics/physicsShapeCastQuery.js.map +1 -0
  579. package/Physics/physicsShapeProximityCastQuery.d.ts +32 -0
  580. package/Physics/physicsShapeProximityCastQuery.js +2 -0
  581. package/Physics/physicsShapeProximityCastQuery.js.map +1 -0
  582. package/Physics/proximityCastResult.d.ts +20 -0
  583. package/Physics/proximityCastResult.js +31 -0
  584. package/Physics/proximityCastResult.js.map +1 -0
  585. package/Physics/shapeCastResult.d.ts +16 -0
  586. package/Physics/shapeCastResult.js +24 -0
  587. package/Physics/shapeCastResult.js.map +1 -0
  588. package/Physics/v2/IPhysicsEnginePlugin.d.ts +20 -0
  589. package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
  590. package/Physics/v2/Plugins/havokPlugin.d.ts +28 -0
  591. package/Physics/v2/Plugins/havokPlugin.js +123 -41
  592. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  593. package/Physics/v2/physicsAggregate.js +10 -12
  594. package/Physics/v2/physicsAggregate.js.map +1 -1
  595. package/Physics/v2/physicsBody.js +2 -4
  596. package/Physics/v2/physicsBody.js.map +1 -1
  597. package/Physics/v2/physicsShape.js +1 -2
  598. package/Physics/v2/physicsShape.js.map +1 -1
  599. package/Physics/v2/ragdoll.js +6 -8
  600. package/Physics/v2/ragdoll.js.map +1 -1
  601. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +6 -8
  602. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  603. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +14 -22
  604. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  605. package/PostProcesses/colorCorrectionPostProcess.js +1 -1
  606. package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
  607. package/PostProcesses/postProcess.js +28 -34
  608. package/PostProcesses/postProcess.js.map +1 -1
  609. package/PostProcesses/postProcessManager.js +4 -6
  610. package/PostProcesses/postProcessManager.js.map +1 -1
  611. package/PostProcesses/screenSpaceReflectionPostProcess.js +2 -2
  612. package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
  613. package/PostProcesses/volumetricLightScatteringPostProcess.js +4 -7
  614. package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
  615. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +1 -1
  616. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
  617. package/Probes/reflectionProbe.js +2 -4
  618. package/Probes/reflectionProbe.js.map +1 -1
  619. package/Rendering/GlobalIllumination/giRSMManager.js +22 -19
  620. package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
  621. package/Rendering/boundingBoxRenderer.js +2 -3
  622. package/Rendering/boundingBoxRenderer.js.map +1 -1
  623. package/Rendering/depthPeelingRenderer.js +2 -4
  624. package/Rendering/depthPeelingRenderer.js.map +1 -1
  625. package/Rendering/depthPeelingSceneComponent.js +2 -4
  626. package/Rendering/depthPeelingSceneComponent.js.map +1 -1
  627. package/Rendering/depthRenderer.js +10 -13
  628. package/Rendering/depthRenderer.js.map +1 -1
  629. package/Rendering/edgesRenderer.js +8 -11
  630. package/Rendering/edgesRenderer.js.map +1 -1
  631. package/Rendering/fluidRenderer/fluidRenderer.js +6 -11
  632. package/Rendering/fluidRenderer/fluidRenderer.js.map +1 -1
  633. package/Rendering/fluidRenderer/fluidRenderingObject.js +3 -5
  634. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
  635. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +2 -4
  636. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
  637. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +30 -36
  638. package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
  639. package/Rendering/fluidRenderer/fluidRenderingTextures.js +5 -7
  640. package/Rendering/fluidRenderer/fluidRenderingTextures.js.map +1 -1
  641. package/Rendering/geometryBufferRenderer.js +3 -2
  642. package/Rendering/geometryBufferRenderer.js.map +1 -1
  643. package/Rendering/outlineRenderer.js +5 -4
  644. package/Rendering/outlineRenderer.js.map +1 -1
  645. package/Rendering/prePassRenderer.js +3 -6
  646. package/Rendering/prePassRenderer.js.map +1 -1
  647. package/Rendering/reflectiveShadowMap.d.ts +1 -0
  648. package/Rendering/reflectiveShadowMap.js +5 -5
  649. package/Rendering/reflectiveShadowMap.js.map +1 -1
  650. package/Shaders/color.fragment.d.ts +2 -0
  651. package/Shaders/color.fragment.js +4 -0
  652. package/Shaders/color.fragment.js.map +1 -1
  653. package/Shaders/color.vertex.d.ts +2 -0
  654. package/Shaders/color.vertex.js +7 -0
  655. package/Shaders/color.vertex.js.map +1 -1
  656. package/Shaders/gpuRenderParticles.fragment.d.ts +2 -0
  657. package/Shaders/gpuRenderParticles.fragment.js +4 -0
  658. package/Shaders/gpuRenderParticles.fragment.js.map +1 -1
  659. package/Shaders/gpuRenderParticles.vertex.d.ts +2 -0
  660. package/Shaders/gpuRenderParticles.vertex.js +5 -1
  661. package/Shaders/gpuRenderParticles.vertex.js.map +1 -1
  662. package/Shaders/particles.fragment.d.ts +2 -0
  663. package/Shaders/particles.fragment.js +4 -0
  664. package/Shaders/particles.fragment.js.map +1 -1
  665. package/Shaders/particles.vertex.d.ts +2 -0
  666. package/Shaders/particles.vertex.js +5 -1
  667. package/Shaders/particles.vertex.js.map +1 -1
  668. package/Sprites/spriteManager.js +1 -2
  669. package/Sprites/spriteManager.js.map +1 -1
  670. package/Sprites/spriteRenderer.js +5 -7
  671. package/Sprites/spriteRenderer.js.map +1 -1
  672. package/States/stencilStateComposer.js +2 -4
  673. package/States/stencilStateComposer.js.map +1 -1
  674. package/XR/features/WebXRAbstractFeature.js +6 -2
  675. package/XR/features/WebXRAbstractFeature.js.map +1 -1
  676. package/XR/features/WebXRAnchorSystem.js +1 -2
  677. package/XR/features/WebXRAnchorSystem.js.map +1 -1
  678. package/XR/features/WebXRControllerMovement.js +6 -7
  679. package/XR/features/WebXRControllerMovement.js.map +1 -1
  680. package/XR/features/WebXRControllerPhysics.js +17 -10
  681. package/XR/features/WebXRControllerPhysics.js.map +1 -1
  682. package/XR/features/WebXRControllerPointerSelection.js +1 -2
  683. package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
  684. package/XR/features/WebXRControllerTeleportation.d.ts +1 -0
  685. package/XR/features/WebXRControllerTeleportation.js +6 -3
  686. package/XR/features/WebXRControllerTeleportation.js.map +1 -1
  687. package/XR/features/WebXRDepthSensing.js +3 -5
  688. package/XR/features/WebXRDepthSensing.js.map +1 -1
  689. package/XR/features/WebXRHandTracking.d.ts +3 -2
  690. package/XR/features/WebXRHandTracking.js +35 -33
  691. package/XR/features/WebXRHandTracking.js.map +1 -1
  692. package/XR/features/WebXRLayers.js +9 -11
  693. package/XR/features/WebXRLayers.js.map +1 -1
  694. package/XR/features/WebXRLightEstimation.js +3 -6
  695. package/XR/features/WebXRLightEstimation.js.map +1 -1
  696. package/XR/features/WebXRMeshDetector.js +2 -4
  697. package/XR/features/WebXRMeshDetector.js.map +1 -1
  698. package/XR/features/WebXRNearInteraction.js +35 -22
  699. package/XR/features/WebXRNearInteraction.js.map +1 -1
  700. package/XR/features/WebXRPlaneDetector.js +1 -2
  701. package/XR/features/WebXRPlaneDetector.js.map +1 -1
  702. package/XR/features/WebXRRawCameraAccess.js +2 -3
  703. package/XR/features/WebXRRawCameraAccess.js.map +1 -1
  704. package/XR/features/WebXRSpaceWarp.js +1 -1
  705. package/XR/features/WebXRSpaceWarp.js.map +1 -1
  706. package/XR/motionController/webXRAbstractMotionController.js +4 -1
  707. package/XR/motionController/webXRAbstractMotionController.js.map +1 -1
  708. package/XR/native/nativeXRFrame.js +1 -2
  709. package/XR/native/nativeXRFrame.js.map +1 -1
  710. package/XR/webXRCamera.d.ts +1 -0
  711. package/XR/webXRCamera.js +20 -10
  712. package/XR/webXRCamera.js.map +1 -1
  713. package/XR/webXRDefaultExperience.js +28 -6
  714. package/XR/webXRDefaultExperience.js.map +1 -1
  715. package/XR/webXRExperienceHelper.js +5 -7
  716. package/XR/webXRExperienceHelper.js.map +1 -1
  717. package/XR/webXRFeaturesManager.js +4 -1
  718. package/XR/webXRFeaturesManager.js.map +1 -1
  719. package/XR/webXRInput.js +6 -1
  720. package/XR/webXRInput.js.map +1 -1
  721. package/XR/webXRInputSource.js +1 -2
  722. package/XR/webXRInputSource.js.map +1 -1
  723. package/XR/webXRSessionManager.js +16 -29
  724. package/XR/webXRSessionManager.js.map +1 -1
  725. package/assetContainer.js +4 -1
  726. package/assetContainer.js.map +1 -1
  727. package/package.json +1 -1
  728. package/scene.js +18 -17
  729. package/scene.js.map +1 -1
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=physicsShapeCastQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"physicsShapeCastQuery.js","sourceRoot":"","sources":["../../../../dev/core/src/Physics/physicsShapeCastQuery.ts"],"names":[],"mappings":"","sourcesContent":["import type { Quaternion, Vector3 } from \"../Maths/math.vector\";\r\nimport type { PhysicsShape } from \"./v2/physicsShape\";\r\nimport type { PhysicsBody } from \"./v2/physicsBody\";\r\n\r\n/**\r\n * Shape cast query\r\n */\r\nexport interface IPhysicsShapeCastQuery {\r\n /**\r\n * The shape to query with\r\n */\r\n shape: PhysicsShape;\r\n /**\r\n * The rotation of the shape\r\n */\r\n rotation: Quaternion;\r\n /**\r\n * The start position of the query\r\n */\r\n startPosition: Vector3;\r\n /**\r\n * The end position of the query\r\n */\r\n endPosition: Vector3;\r\n /**\r\n * Should trigger collisions be considered in the query?\r\n */\r\n shouldHitTriggers: boolean;\r\n /**\r\n * Ignores the body passed if it is in the query\r\n */\r\n ignoreBody?: PhysicsBody;\r\n}\r\n"]}
@@ -0,0 +1,32 @@
1
+ import type { Quaternion, Vector3 } from "../Maths/math.vector";
2
+ import type { PhysicsShape } from "./v2/physicsShape";
3
+ import type { PhysicsBody } from "./v2/physicsBody";
4
+ /**
5
+ * Query for shape proximity.
6
+ */
7
+ export interface IPhysicsShapeProximityCastQuery {
8
+ /**
9
+ * The shape to test proximity against
10
+ */
11
+ shape: PhysicsShape;
12
+ /**
13
+ * The position of shape
14
+ */
15
+ position: Vector3;
16
+ /**
17
+ * The rotation of shape
18
+ */
19
+ rotation: Quaternion;
20
+ /**
21
+ * Maximum distance to check for collisions. Can be set to 0 to check for overlaps.
22
+ */
23
+ maxDistance: number;
24
+ /**
25
+ * Should trigger collisions be considered in the query?
26
+ */
27
+ shouldHitTriggers: boolean;
28
+ /**
29
+ * Ignores the body passed if it is in the query
30
+ */
31
+ ignoreBody?: PhysicsBody;
32
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=physicsShapeProximityCastQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"physicsShapeProximityCastQuery.js","sourceRoot":"","sources":["../../../../dev/core/src/Physics/physicsShapeProximityCastQuery.ts"],"names":[],"mappings":"","sourcesContent":["import type { Quaternion, Vector3 } from \"../Maths/math.vector\";\r\nimport type { PhysicsShape } from \"./v2/physicsShape\";\r\nimport type { PhysicsBody } from \"./v2/physicsBody\";\r\n\r\n/**\r\n * Query for shape proximity.\r\n */\r\nexport interface IPhysicsShapeProximityCastQuery {\r\n /**\r\n * The shape to test proximity against\r\n */\r\n shape: PhysicsShape;\r\n /**\r\n * The position of shape\r\n */\r\n position: Vector3;\r\n /**\r\n * The rotation of shape\r\n */\r\n rotation: Quaternion;\r\n /**\r\n * Maximum distance to check for collisions. Can be set to 0 to check for overlaps.\r\n */\r\n maxDistance: number;\r\n /**\r\n * Should trigger collisions be considered in the query?\r\n */\r\n shouldHitTriggers: boolean;\r\n /**\r\n * Ignores the body passed if it is in the query\r\n */\r\n ignoreBody?: PhysicsBody;\r\n}\r\n"]}
@@ -0,0 +1,20 @@
1
+ import { CastingResult } from "./castingResult";
2
+ /**
3
+ * Class representing a contact point produced in a proximity cast
4
+ */
5
+ export declare class ProximityCastResult extends CastingResult {
6
+ protected _hitDistance: number;
7
+ /**
8
+ * Gets the distance from the hit
9
+ */
10
+ get hitDistance(): number;
11
+ /**
12
+ * Sets the distance from the start point to the hit point
13
+ * @param distance
14
+ */
15
+ setHitDistance(distance: number): void;
16
+ /**
17
+ * Resets all the values to default
18
+ */
19
+ reset(): void;
20
+ }
@@ -0,0 +1,31 @@
1
+ import { CastingResult } from "./castingResult.js";
2
+ /**
3
+ * Class representing a contact point produced in a proximity cast
4
+ */
5
+ export class ProximityCastResult extends CastingResult {
6
+ constructor() {
7
+ super(...arguments);
8
+ this._hitDistance = 0;
9
+ }
10
+ /**
11
+ * Gets the distance from the hit
12
+ */
13
+ get hitDistance() {
14
+ return this._hitDistance;
15
+ }
16
+ /**
17
+ * Sets the distance from the start point to the hit point
18
+ * @param distance
19
+ */
20
+ setHitDistance(distance) {
21
+ this._hitDistance = distance;
22
+ }
23
+ /**
24
+ * Resets all the values to default
25
+ */
26
+ reset() {
27
+ super.reset();
28
+ this._hitDistance = 0;
29
+ }
30
+ }
31
+ //# sourceMappingURL=proximityCastResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proximityCastResult.js","sourceRoot":"","sources":["../../../../dev/core/src/Physics/proximityCastResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IAAtD;;QACc,iBAAY,GAAW,CAAC,CAAC;IAwBvC,CAAC;IAtBG;;OAEG;IACH,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,cAAc,CAAC,QAAgB;QAClC,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,KAAK;QACR,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;IAC1B,CAAC;CACJ","sourcesContent":["import { CastingResult } from \"./castingResult\";\r\n\r\n/**\r\n * Class representing a contact point produced in a proximity cast\r\n */\r\nexport class ProximityCastResult extends CastingResult {\r\n protected _hitDistance: number = 0;\r\n\r\n /**\r\n * Gets the distance from the hit\r\n */\r\n get hitDistance(): number {\r\n return this._hitDistance;\r\n }\r\n\r\n /**\r\n * Sets the distance from the start point to the hit point\r\n * @param distance\r\n */\r\n public setHitDistance(distance: number) {\r\n this._hitDistance = distance;\r\n }\r\n\r\n /**\r\n * Resets all the values to default\r\n */\r\n public reset() {\r\n super.reset();\r\n this._hitDistance = 0;\r\n }\r\n}\r\n"]}
@@ -0,0 +1,16 @@
1
+ import { CastingResult } from "./castingResult";
2
+ /**
3
+ * Class representing a contact point produced in a shape cast
4
+ */
5
+ export declare class ShapeCastResult extends CastingResult {
6
+ private _hitFraction;
7
+ /**
8
+ * Gets the hit fraction along the casting ray
9
+ */
10
+ get hitFraction(): number;
11
+ /**
12
+ * Sets the hit fraction along the casting ray
13
+ * @param fraction
14
+ */
15
+ setHitFraction(fraction: number): void;
16
+ }
@@ -0,0 +1,24 @@
1
+ import { CastingResult } from "./castingResult.js";
2
+ /**
3
+ * Class representing a contact point produced in a shape cast
4
+ */
5
+ export class ShapeCastResult extends CastingResult {
6
+ constructor() {
7
+ super(...arguments);
8
+ this._hitFraction = 0;
9
+ }
10
+ /**
11
+ * Gets the hit fraction along the casting ray
12
+ */
13
+ get hitFraction() {
14
+ return this._hitFraction;
15
+ }
16
+ /**
17
+ * Sets the hit fraction along the casting ray
18
+ * @param fraction
19
+ */
20
+ setHitFraction(fraction) {
21
+ this._hitFraction = fraction;
22
+ }
23
+ }
24
+ //# sourceMappingURL=shapeCastResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shapeCastResult.js","sourceRoot":"","sources":["../../../../dev/core/src/Physics/shapeCastResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,aAAa;IAAlD;;QACY,iBAAY,GAAW,CAAC,CAAC;IAgBrC,CAAC;IAdG;;OAEG;IACH,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,cAAc,CAAC,QAAgB;QAClC,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC;IACjC,CAAC;CACJ","sourcesContent":["import { CastingResult } from \"./castingResult\";\r\n\r\n/**\r\n * Class representing a contact point produced in a shape cast\r\n */\r\nexport class ShapeCastResult extends CastingResult {\r\n private _hitFraction: number = 0;\r\n\r\n /**\r\n * Gets the hit fraction along the casting ray\r\n */\r\n get hitFraction(): number {\r\n return this._hitFraction;\r\n }\r\n\r\n /**\r\n * Sets the hit fraction along the casting ray\r\n * @param fraction\r\n */\r\n public setHitFraction(fraction: number) {\r\n this._hitFraction = fraction;\r\n }\r\n}\r\n"]}
@@ -162,6 +162,26 @@ export interface PhysicsShapeParameters {
162
162
  * Use children hierarchy
163
163
  */
164
164
  includeChildMeshes?: boolean;
165
+ /**
166
+ * The size of the heightfield in the X axis
167
+ */
168
+ heightFieldSizeX?: number;
169
+ /**
170
+ * The size of the heightfield in the Z axis
171
+ */
172
+ heightFieldSizeZ?: number;
173
+ /**
174
+ * The number of samples along the X axis
175
+ */
176
+ numHeightFieldSamplesX?: number;
177
+ /**
178
+ * The number of samples along the Z axis
179
+ */
180
+ numHeightFieldSamplesZ?: number;
181
+ /**
182
+ * The data for the heightfield
183
+ */
184
+ heightFieldData?: Float32Array;
165
185
  }
166
186
  /**
167
187
  * Parameters used to describe a Constraint
@@ -1 +1 @@
1
- {"version":3,"file":"IPhysicsEnginePlugin.js","sourceRoot":"","sources":["../../../../../dev/core/src/Physics/v2/IPhysicsEnginePlugin.ts"],"names":[],"mappings":"AAYA,6CAA6C;AAC7C,MAAM,CAAN,IAAY,8BAaX;AAbD,WAAY,8BAA8B;IACtC;;OAEG;IACH,mFAAI,CAAA;IACJ;;OAEG;IACH,yFAAO,CAAA;IACP;;OAEG;IACH,uFAAM,CAAA;AACV,CAAC,EAbW,8BAA8B,KAA9B,8BAA8B,QAazC;AAED,2GAA2G;AAC3G,MAAM,CAAN,IAAY,qBAqCX;AArCD,WAAY,qBAAqB;IAC7B;;;OAGG;IACH,yEAAQ,CAAA;IACR;;;OAGG;IACH,yEAAQ,CAAA;IACR;;;OAGG;IACH,yEAAQ,CAAA;IACR;;;OAGG;IACH,2EAAS,CAAA;IACT;;;OAGG;IACH,2EAAS,CAAA;IACT;;;OAGG;IACH,2EAAS,CAAA;IACT;;;;OAIG;IACH,uFAAe,CAAA;AACnB,CAAC,EArCW,qBAAqB,KAArB,qBAAqB,QAqChC;AAED,yBAAyB;AACzB,MAAM,CAAN,IAAY,qBAsCX;AAtCD,WAAY,qBAAqB;IAC7B;;;OAGG;IACH,uFAAmB,CAAA;IACnB;;;OAGG;IACH,yEAAY,CAAA;IACZ;;;OAGG;IACH,mEAAS,CAAA;IACT;;;;OAIG;IACH,qEAAU,CAAA;IACV;;;OAGG;IACH,iEAAQ,CAAA;IACR;;;OAGG;IACH,2EAAa,CAAA;IACb;;;;OAIG;IACH,uEAAW,CAAA;AACf,CAAC,EAtCW,qBAAqB,KAArB,qBAAqB,QAsChC;AAED,oBAAoB;AACpB,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IACxB,2DAAM,CAAA;IACN,6DAAO,CAAA;IACP,+DAAQ,CAAA;IACR,qDAAG,CAAA;IACH,qEAAW,CAAA;IACX,iEAAS,CAAA;IACT,uDAAI,CAAA;IACJ,qEAAW,CAAA;AACf,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED,qGAAqG;AACrG,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,2EAAI,CAAA;IACJ,mFAAQ,CAAA;IACR,mFAAQ,CAAA;AACZ,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAED,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,2DAAuC,CAAA;IACvC,+DAA2C,CAAA;IAC3C,6DAAyC,CAAA;IACzC,uDAAmC,CAAA;IACnC,qDAAiC,CAAA;AACrC,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B;AAyLD;;GAEG;AACH,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,6DAAM,CAAA;IACN,iEAAQ,CAAA;IACR,+DAAO,CAAA;AACX,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B","sourcesContent":["import type { Vector3, Quaternion } from \"../../Maths/math.vector\";\r\nimport type { IRaycastQuery, PhysicsRaycastResult } from \"../physicsRaycastResult\";\r\nimport type { PhysicsBody } from \"./physicsBody\";\r\nimport type { PhysicsShape } from \"./physicsShape\";\r\nimport type { PhysicsConstraint } from \"./physicsConstraint\";\r\nimport type { BoundingBox } from \"../../Culling/boundingBox\";\r\nimport type { TransformNode } from \"../../Meshes/transformNode\";\r\nimport type { PhysicsMaterial } from \"./physicsMaterial\";\r\nimport type { Mesh } from \"../../Meshes/mesh\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Observable } from \"core/Misc/observable\";\r\n\r\n/** How a specific axis can be constrained */\r\nexport enum PhysicsConstraintAxisLimitMode {\r\n /*\r\n * The axis is not restricted at all\r\n */\r\n FREE,\r\n /*\r\n * The axis has a minimum/maximum limit\r\n */\r\n LIMITED,\r\n /*\r\n * The axis allows no relative movement of the pivots\r\n */\r\n LOCKED,\r\n}\r\n\r\n/** The constraint specific axis to use when setting Friction, `ConstraintAxisLimitMode`, max force, ... */\r\nexport enum PhysicsConstraintAxis {\r\n /*\r\n * Translation along the primary axis of the constraint (i.e. the\r\n * direction specified by PhysicsConstraintParameters.axisA/axisB)\r\n */\r\n LINEAR_X,\r\n /*\r\n * Translation along the second axis of the constraint (i.e. the\r\n * direction specified by PhysicsConstraintParameters.perpAxisA/perpAxisB)\r\n */\r\n LINEAR_Y,\r\n /*\r\n * Translation along the third axis of the constraint. This axis is\r\n * computed from the cross product of axisA/axisB and perpAxisA/perpAxisB)\r\n */\r\n LINEAR_Z,\r\n /*\r\n * Rotation around the primary axis of the constraint (i.e. the\r\n * axis specified by PhysicsConstraintParameters.axisA/axisB)\r\n */\r\n ANGULAR_X,\r\n /*\r\n * Rotation around the second axis of the constraint (i.e. the\r\n * axis specified by PhysicsConstraintParameters.perpAxisA/perpAxisB)\r\n */\r\n ANGULAR_Y,\r\n /*\r\n * Rotation around the third axis of the constraint. This axis is\r\n * computed from the cross product of axisA/axisB and perpAxisA/perpAxisB)\r\n */\r\n ANGULAR_Z,\r\n /*\r\n * A 3D distance limit; similar to specifying the LINEAR_X/Y/Z axes\r\n * individually, but the distance calculation uses all three axes\r\n * simultaneously, instead of individually.\r\n */\r\n LINEAR_DISTANCE,\r\n}\r\n\r\n/** Type of Constraint */\r\nexport enum PhysicsConstraintType {\r\n /**\r\n * A ball and socket constraint will attempt to line up the pivot\r\n * positions in each body, and have no restrictions on rotation\r\n */\r\n BALL_AND_SOCKET = 1,\r\n /**\r\n * A distance constraint will attempt to keep the pivot locations\r\n * within a specified distance.\r\n */\r\n DISTANCE = 2,\r\n /**\r\n * A hinge constraint will keep the pivot positions aligned as well\r\n * as two angular axes. The remaining angular axis will be free to rotate.\r\n */\r\n HINGE = 3,\r\n /**\r\n * A slider constraint allows bodies to translate along one axis and\r\n * rotate about the same axis. The remaining two axes are locked in\r\n * place\r\n */\r\n SLIDER = 4,\r\n /**\r\n * A lock constraint will attempt to keep the pivots completely lined\r\n * up between both bodies, allowing no relative movement.\r\n */\r\n LOCK = 5,\r\n /*\r\n * A prismatic will lock the rotations of the bodies, and allow translation\r\n * only along one axis\r\n */\r\n PRISMATIC = 6,\r\n /*\r\n * A generic constraint; this starts with no limits on how the bodies can\r\n * move relative to each other, but limits can be added via the PhysicsConstraint\r\n * interfaces. This can be used to specify a large variety of constraints\r\n */\r\n SIX_DOF = 7,\r\n}\r\n\r\n/** Type of Shape */\r\nexport enum PhysicsShapeType {\r\n SPHERE,\r\n CAPSULE,\r\n CYLINDER,\r\n BOX,\r\n CONVEX_HULL,\r\n CONTAINER,\r\n MESH,\r\n HEIGHTFIELD,\r\n}\r\n\r\n/** Optional motor which attempts to move a body at a specific velocity, or at a specific position */\r\nexport enum PhysicsConstraintMotorType {\r\n NONE,\r\n VELOCITY,\r\n POSITION,\r\n}\r\n\r\nexport enum PhysicsEventType {\r\n COLLISION_STARTED = \"COLLISION_STARTED\",\r\n COLLISION_CONTINUED = \"COLLISION_CONTINUED\",\r\n COLLISION_FINISHED = \"COLLISION_FINISHED\",\r\n TRIGGER_ENTERED = \"TRIGGER_ENTERED\",\r\n TRIGGER_EXITED = \"TRIGGER_EXITED\",\r\n}\r\n\r\n/**\r\n * Base collision object\r\n */\r\nexport interface IBasePhysicsCollisionEvent {\r\n /**\r\n * 1st physics body that collided\r\n */\r\n collider: PhysicsBody;\r\n /**\r\n * 2nd physics body that collided\r\n */\r\n collidedAgainst: PhysicsBody;\r\n /**\r\n * index in instances array for the collider\r\n */\r\n colliderIndex: number;\r\n /**\r\n * index in instances array for the collidedAgainst\r\n */\r\n collidedAgainstIndex: number;\r\n /**\r\n * Event type\r\n */\r\n type: PhysicsEventType;\r\n}\r\n\r\n/**\r\n * Collision object that is the parameter when notification for collision fires.\r\n */\r\nexport interface IPhysicsCollisionEvent extends IBasePhysicsCollisionEvent {\r\n /**\r\n * World position where the collision occured\r\n */\r\n point: Nullable<Vector3>;\r\n /**\r\n * Penetration distance\r\n */\r\n distance: number;\r\n /**\r\n * Impulse value computed by the solver response\r\n */\r\n impulse: number;\r\n /**\r\n * Collision world normal direction\r\n */\r\n normal: Nullable<Vector3>;\r\n}\r\n\r\n/**\r\n * Parameters used to describe the Shape\r\n */\r\nexport interface PhysicsShapeParameters {\r\n /**\r\n * Shape center position\r\n */\r\n center?: Vector3;\r\n /**\r\n * Radius for cylinder, shape and capsule\r\n */\r\n radius?: number;\r\n /**\r\n * First point position that defines the cylinder or capsule\r\n */\r\n pointA?: Vector3;\r\n /**\r\n * Second point position that defines the cylinder or capsule\r\n */\r\n pointB?: Vector3;\r\n /**\r\n * Shape orientation\r\n */\r\n rotation?: Quaternion;\r\n /**\r\n * Dimesion extention for the box\r\n */\r\n extents?: Vector3;\r\n /**\r\n * Mesh used for Mesh shape or convex hull. It can be different than the mesh the body is attached to.\r\n */\r\n mesh?: Mesh;\r\n /**\r\n * Use children hierarchy\r\n */\r\n includeChildMeshes?: boolean;\r\n}\r\n\r\n/**\r\n * Parameters used to describe a Constraint\r\n */\r\nexport interface PhysicsConstraintParameters {\r\n /**\r\n * Location of the constraint pivot in the space of first body\r\n */\r\n pivotA?: Vector3;\r\n /**\r\n * Location of the constraint pivot in the space of the second body\r\n */\r\n pivotB?: Vector3;\r\n /**\r\n * An axis in the space of the first body which determines how\r\n * distances/angles are measured for LINEAR_X/ANGULAR_X limits.\r\n */\r\n axisA?: Vector3;\r\n /**\r\n * An axis in the space of the second body which determines how\r\n * distances/angles are measured for LINEAR_X/ANGULAR_X limits.\r\n */\r\n axisB?: Vector3;\r\n\r\n /**\r\n * An axis in the space of the first body which determines how\r\n * distances/angles are measured for LINEAR_Y/ANGULAR_Y limits.\r\n */\r\n perpAxisA?: Vector3;\r\n\r\n /**\r\n * An axis in the space of the second body which determines how\r\n * distances/angles are measured for LINEAR_Y/ANGULAR_Y limits.\r\n */\r\n perpAxisB?: Vector3;\r\n\r\n /**\r\n * The maximum distance that can seperate the two pivots.\r\n * Only used for DISTANCE constraints\r\n */\r\n maxDistance?: number;\r\n\r\n /**\r\n * Determines if the connected bodies should collide. Generally,\r\n * it is preferable to set this to false, especially if the constraint\r\n * positions the bodies so that they overlap. Otherwise, the constraint\r\n * will \"fight\" the collision detection and may cause jitter.\r\n */\r\n collision?: boolean;\r\n}\r\n\r\n/**\r\n * Parameters used to describe mass and inertia of the Physics Body\r\n */\r\nexport interface PhysicsMassProperties {\r\n /**\r\n * The center of mass, in local space. This is The\r\n * point the body will rotate around when applying\r\n * an angular velocity.\r\n *\r\n * If not provided, the physics engine will compute\r\n * an appropriate value.\r\n */\r\n centerOfMass?: Vector3;\r\n /**\r\n * The total mass of this object, in kilograms. This\r\n * affects how easy it is to move the body. A value\r\n * of zero will be used as an infinite mass.\r\n *\r\n * If not provided, the physics engine will compute\r\n * an appropriate value.\r\n */\r\n mass?: number;\r\n /**\r\n * The principal moments of inertia of this object\r\n * for a unit mass. This determines how easy it is\r\n * for the body to rotate. A value of zero on any\r\n * axis will be used as infinite interia about that\r\n * axis.\r\n *\r\n * If not provided, the physics engine will compute\r\n * an appropriate value.\r\n */\r\n inertia?: Vector3;\r\n /**\r\n * The rotation rotating from inertia major axis space\r\n * to parent space (i.e., the rotation which, when\r\n * applied to the 3x3 inertia tensor causes the inertia\r\n * tensor to become a diagonal matrix). This determines\r\n * how the values of inertia are aligned with the parent\r\n * object.\r\n *\r\n * If not provided, the physics engine will compute\r\n * an appropriate value.\r\n */\r\n inertiaOrientation?: Quaternion;\r\n}\r\n\r\n/**\r\n * Indicates how the body will behave.\r\n */\r\nexport enum PhysicsMotionType {\r\n STATIC,\r\n ANIMATED,\r\n DYNAMIC,\r\n}\r\n\r\n/**\r\n * Represents a pair of bodies connected by a constraint.\r\n */\r\nexport type ConstrainedBodyPair = { parentBody: PhysicsBody; parentBodyIndex: number; childBody: PhysicsBody; childBodyIndex: number };\r\n\r\n/** @internal */\r\nexport interface IPhysicsEnginePluginV2 {\r\n /**\r\n * Physics plugin world instance\r\n */\r\n world: any;\r\n /**\r\n * Physics plugin name\r\n */\r\n name: string;\r\n\r\n /**\r\n * Collision observable\r\n */\r\n onCollisionObservable: Observable<IPhysicsCollisionEvent>;\r\n /**\r\n * Collision ended observable\r\n */\r\n onCollisionEndedObservable: Observable<IBasePhysicsCollisionEvent>;\r\n /**\r\n * Trigger observable\r\n */\r\n onTriggerCollisionObservable: Observable<IBasePhysicsCollisionEvent>;\r\n\r\n setGravity(gravity: Vector3): void;\r\n setTimeStep(timeStep: number): void;\r\n getTimeStep(): number;\r\n executeStep(delta: number, bodies: Array<PhysicsBody>): void; //not forgetting pre and post events\r\n getPluginVersion(): number;\r\n\r\n // body\r\n initBody(body: PhysicsBody, motionType: PhysicsMotionType, position: Vector3, orientation: Quaternion): void;\r\n initBodyInstances(body: PhysicsBody, motionType: PhysicsMotionType, mesh: Mesh): void;\r\n updateBodyInstances(body: PhysicsBody, mesh: Mesh): void;\r\n removeBody(body: PhysicsBody): void;\r\n sync(body: PhysicsBody): void;\r\n syncTransform(body: PhysicsBody, transformNode: TransformNode): void;\r\n setShape(body: PhysicsBody, shape: Nullable<PhysicsShape>): void;\r\n getShape(body: PhysicsBody): Nullable<PhysicsShape>;\r\n getShapeType(shape: PhysicsShape): PhysicsShapeType;\r\n setEventMask(body: PhysicsBody, eventMask: number, instanceIndex?: number): void;\r\n getEventMask(body: PhysicsBody, instanceIndex?: number): number;\r\n setMotionType(body: PhysicsBody, motionType: PhysicsMotionType, instanceIndex?: number): void;\r\n getMotionType(body: PhysicsBody, instanceIndex?: number): PhysicsMotionType;\r\n computeMassProperties(body: PhysicsBody, instanceIndex?: number): PhysicsMassProperties;\r\n setMassProperties(body: PhysicsBody, massProps: PhysicsMassProperties, instanceIndex?: number): void;\r\n getMassProperties(body: PhysicsBody, instanceIndex?: number): PhysicsMassProperties;\r\n setLinearDamping(body: PhysicsBody, damping: number, instanceIndex?: number): void;\r\n getLinearDamping(body: PhysicsBody, instanceIndex?: number): number;\r\n setAngularDamping(body: PhysicsBody, damping: number, instanceIndex?: number): void;\r\n getAngularDamping(body: PhysicsBody, instanceIndex?: number): number;\r\n setLinearVelocity(body: PhysicsBody, linVel: Vector3, instanceIndex?: number): void;\r\n getLinearVelocityToRef(body: PhysicsBody, linVel: Vector3, instanceIndex?: number): void;\r\n applyImpulse(body: PhysicsBody, impulse: Vector3, location: Vector3, instanceIndex?: number): void;\r\n applyForce(body: PhysicsBody, force: Vector3, location: Vector3, instanceIndex?: number): void;\r\n setAngularVelocity(body: PhysicsBody, angVel: Vector3, instanceIndex?: number): void;\r\n getAngularVelocityToRef(body: PhysicsBody, angVel: Vector3, instanceIndex?: number): void;\r\n getBodyGeometry(body: PhysicsBody): {};\r\n disposeBody(body: PhysicsBody): void;\r\n setCollisionCallbackEnabled(body: PhysicsBody, enabled: boolean, instanceIndex?: number): void;\r\n setCollisionEndedCallbackEnabled(body: PhysicsBody, enabled: boolean, instanceIndex?: number): void;\r\n addConstraint(body: PhysicsBody, childBody: PhysicsBody, constraint: PhysicsConstraint, instanceIndex?: number, childInstanceIndex?: number): void;\r\n getCollisionObservable(body: PhysicsBody, instanceIndex?: number): Observable<IPhysicsCollisionEvent>;\r\n getCollisionEndedObservable(body: PhysicsBody, instanceIndex?: number): Observable<IBasePhysicsCollisionEvent>;\r\n setGravityFactor(body: PhysicsBody, factor: number, instanceIndex?: number): void;\r\n getGravityFactor(body: PhysicsBody, instanceIndex?: number): number;\r\n setTargetTransform(body: PhysicsBody, position: Vector3, rotation: Quaternion, instanceIndex?: number): void;\r\n\r\n // shape\r\n initShape(shape: PhysicsShape, type: PhysicsShapeType, options: PhysicsShapeParameters): void;\r\n setShapeFilterMembershipMask(shape: PhysicsShape, membershipMask: number): void;\r\n getShapeFilterMembershipMask(shape: PhysicsShape): number;\r\n setShapeFilterCollideMask(shape: PhysicsShape, collideMask: number): void;\r\n getShapeFilterCollideMask(shape: PhysicsShape): number;\r\n setMaterial(shape: PhysicsShape, material: PhysicsMaterial): void;\r\n getMaterial(shape: PhysicsShape): PhysicsMaterial;\r\n setDensity(shape: PhysicsShape, density: number): void;\r\n getDensity(shape: PhysicsShape): number;\r\n addChild(shape: PhysicsShape, newChild: PhysicsShape, translation?: Vector3, rotation?: Quaternion, scale?: Vector3): void;\r\n removeChild(shape: PhysicsShape, childIndex: number): void;\r\n getNumChildren(shape: PhysicsShape): number;\r\n getBoundingBox(shape: PhysicsShape): BoundingBox;\r\n disposeShape(shape: PhysicsShape): void;\r\n setTrigger(shape: PhysicsShape, isTrigger: boolean): void;\r\n\r\n // constraint\r\n initConstraint(constraint: PhysicsConstraint, body: PhysicsBody, childBody: PhysicsBody): void;\r\n setEnabled(constraint: PhysicsConstraint, isEnabled: boolean): void;\r\n getEnabled(constraint: PhysicsConstraint): boolean;\r\n setCollisionsEnabled(constraint: PhysicsConstraint, isEnabled: boolean): void;\r\n getCollisionsEnabled(constraint: PhysicsConstraint): boolean;\r\n setAxisFriction(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, friction: number): void;\r\n getAxisFriction(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n setAxisMode(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, limitMode: PhysicsConstraintAxisLimitMode): void;\r\n getAxisMode(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<PhysicsConstraintAxisLimitMode>;\r\n setAxisMinLimit(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, minLimit: number): void;\r\n getAxisMinLimit(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n setAxisMaxLimit(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, limit: number): void;\r\n getAxisMaxLimit(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n setAxisMotorType(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, motorType: PhysicsConstraintMotorType): void;\r\n getAxisMotorType(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<PhysicsConstraintMotorType>;\r\n setAxisMotorTarget(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, target: number): void;\r\n getAxisMotorTarget(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n setAxisMotorMaxForce(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, maxForce: number): void;\r\n getAxisMotorMaxForce(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n disposeConstraint(constraint: PhysicsConstraint): void;\r\n getBodiesUsingConstraint(constraint: PhysicsConstraint): ConstrainedBodyPair[];\r\n\r\n // raycast\r\n raycast(from: Vector3, to: Vector3, result: PhysicsRaycastResult, query?: IRaycastQuery): void;\r\n\r\n dispose(): void;\r\n}\r\n"]}
1
+ {"version":3,"file":"IPhysicsEnginePlugin.js","sourceRoot":"","sources":["../../../../../dev/core/src/Physics/v2/IPhysicsEnginePlugin.ts"],"names":[],"mappings":"AAYA,6CAA6C;AAC7C,MAAM,CAAN,IAAY,8BAaX;AAbD,WAAY,8BAA8B;IACtC;;OAEG;IACH,mFAAI,CAAA;IACJ;;OAEG;IACH,yFAAO,CAAA;IACP;;OAEG;IACH,uFAAM,CAAA;AACV,CAAC,EAbW,8BAA8B,KAA9B,8BAA8B,QAazC;AAED,2GAA2G;AAC3G,MAAM,CAAN,IAAY,qBAqCX;AArCD,WAAY,qBAAqB;IAC7B;;;OAGG;IACH,yEAAQ,CAAA;IACR;;;OAGG;IACH,yEAAQ,CAAA;IACR;;;OAGG;IACH,yEAAQ,CAAA;IACR;;;OAGG;IACH,2EAAS,CAAA;IACT;;;OAGG;IACH,2EAAS,CAAA;IACT;;;OAGG;IACH,2EAAS,CAAA;IACT;;;;OAIG;IACH,uFAAe,CAAA;AACnB,CAAC,EArCW,qBAAqB,KAArB,qBAAqB,QAqChC;AAED,yBAAyB;AACzB,MAAM,CAAN,IAAY,qBAsCX;AAtCD,WAAY,qBAAqB;IAC7B;;;OAGG;IACH,uFAAmB,CAAA;IACnB;;;OAGG;IACH,yEAAY,CAAA;IACZ;;;OAGG;IACH,mEAAS,CAAA;IACT;;;;OAIG;IACH,qEAAU,CAAA;IACV;;;OAGG;IACH,iEAAQ,CAAA;IACR;;;OAGG;IACH,2EAAa,CAAA;IACb;;;;OAIG;IACH,uEAAW,CAAA;AACf,CAAC,EAtCW,qBAAqB,KAArB,qBAAqB,QAsChC;AAED,oBAAoB;AACpB,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IACxB,2DAAM,CAAA;IACN,6DAAO,CAAA;IACP,+DAAQ,CAAA;IACR,qDAAG,CAAA;IACH,qEAAW,CAAA;IACX,iEAAS,CAAA;IACT,uDAAI,CAAA;IACJ,qEAAW,CAAA;AACf,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED,qGAAqG;AACrG,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,2EAAI,CAAA;IACJ,mFAAQ,CAAA;IACR,mFAAQ,CAAA;AACZ,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAED,MAAM,CAAN,IAAY,gBAMX;AAND,WAAY,gBAAgB;IACxB,2DAAuC,CAAA;IACvC,+DAA2C,CAAA;IAC3C,6DAAyC,CAAA;IACzC,uDAAmC,CAAA;IACnC,qDAAiC,CAAA;AACrC,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,QAM3B;AA6MD;;GAEG;AACH,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,6DAAM,CAAA;IACN,iEAAQ,CAAA;IACR,+DAAO,CAAA;AACX,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B","sourcesContent":["import type { Vector3, Quaternion } from \"../../Maths/math.vector\";\r\nimport type { IRaycastQuery, PhysicsRaycastResult } from \"../physicsRaycastResult\";\r\nimport type { PhysicsBody } from \"./physicsBody\";\r\nimport type { PhysicsShape } from \"./physicsShape\";\r\nimport type { PhysicsConstraint } from \"./physicsConstraint\";\r\nimport type { BoundingBox } from \"../../Culling/boundingBox\";\r\nimport type { TransformNode } from \"../../Meshes/transformNode\";\r\nimport type { PhysicsMaterial } from \"./physicsMaterial\";\r\nimport type { Mesh } from \"../../Meshes/mesh\";\r\nimport type { Nullable } from \"core/types\";\r\nimport type { Observable } from \"core/Misc/observable\";\r\n\r\n/** How a specific axis can be constrained */\r\nexport enum PhysicsConstraintAxisLimitMode {\r\n /*\r\n * The axis is not restricted at all\r\n */\r\n FREE,\r\n /*\r\n * The axis has a minimum/maximum limit\r\n */\r\n LIMITED,\r\n /*\r\n * The axis allows no relative movement of the pivots\r\n */\r\n LOCKED,\r\n}\r\n\r\n/** The constraint specific axis to use when setting Friction, `ConstraintAxisLimitMode`, max force, ... */\r\nexport enum PhysicsConstraintAxis {\r\n /*\r\n * Translation along the primary axis of the constraint (i.e. the\r\n * direction specified by PhysicsConstraintParameters.axisA/axisB)\r\n */\r\n LINEAR_X,\r\n /*\r\n * Translation along the second axis of the constraint (i.e. the\r\n * direction specified by PhysicsConstraintParameters.perpAxisA/perpAxisB)\r\n */\r\n LINEAR_Y,\r\n /*\r\n * Translation along the third axis of the constraint. This axis is\r\n * computed from the cross product of axisA/axisB and perpAxisA/perpAxisB)\r\n */\r\n LINEAR_Z,\r\n /*\r\n * Rotation around the primary axis of the constraint (i.e. the\r\n * axis specified by PhysicsConstraintParameters.axisA/axisB)\r\n */\r\n ANGULAR_X,\r\n /*\r\n * Rotation around the second axis of the constraint (i.e. the\r\n * axis specified by PhysicsConstraintParameters.perpAxisA/perpAxisB)\r\n */\r\n ANGULAR_Y,\r\n /*\r\n * Rotation around the third axis of the constraint. This axis is\r\n * computed from the cross product of axisA/axisB and perpAxisA/perpAxisB)\r\n */\r\n ANGULAR_Z,\r\n /*\r\n * A 3D distance limit; similar to specifying the LINEAR_X/Y/Z axes\r\n * individually, but the distance calculation uses all three axes\r\n * simultaneously, instead of individually.\r\n */\r\n LINEAR_DISTANCE,\r\n}\r\n\r\n/** Type of Constraint */\r\nexport enum PhysicsConstraintType {\r\n /**\r\n * A ball and socket constraint will attempt to line up the pivot\r\n * positions in each body, and have no restrictions on rotation\r\n */\r\n BALL_AND_SOCKET = 1,\r\n /**\r\n * A distance constraint will attempt to keep the pivot locations\r\n * within a specified distance.\r\n */\r\n DISTANCE = 2,\r\n /**\r\n * A hinge constraint will keep the pivot positions aligned as well\r\n * as two angular axes. The remaining angular axis will be free to rotate.\r\n */\r\n HINGE = 3,\r\n /**\r\n * A slider constraint allows bodies to translate along one axis and\r\n * rotate about the same axis. The remaining two axes are locked in\r\n * place\r\n */\r\n SLIDER = 4,\r\n /**\r\n * A lock constraint will attempt to keep the pivots completely lined\r\n * up between both bodies, allowing no relative movement.\r\n */\r\n LOCK = 5,\r\n /*\r\n * A prismatic will lock the rotations of the bodies, and allow translation\r\n * only along one axis\r\n */\r\n PRISMATIC = 6,\r\n /*\r\n * A generic constraint; this starts with no limits on how the bodies can\r\n * move relative to each other, but limits can be added via the PhysicsConstraint\r\n * interfaces. This can be used to specify a large variety of constraints\r\n */\r\n SIX_DOF = 7,\r\n}\r\n\r\n/** Type of Shape */\r\nexport enum PhysicsShapeType {\r\n SPHERE,\r\n CAPSULE,\r\n CYLINDER,\r\n BOX,\r\n CONVEX_HULL,\r\n CONTAINER,\r\n MESH,\r\n HEIGHTFIELD,\r\n}\r\n\r\n/** Optional motor which attempts to move a body at a specific velocity, or at a specific position */\r\nexport enum PhysicsConstraintMotorType {\r\n NONE,\r\n VELOCITY,\r\n POSITION,\r\n}\r\n\r\nexport enum PhysicsEventType {\r\n COLLISION_STARTED = \"COLLISION_STARTED\",\r\n COLLISION_CONTINUED = \"COLLISION_CONTINUED\",\r\n COLLISION_FINISHED = \"COLLISION_FINISHED\",\r\n TRIGGER_ENTERED = \"TRIGGER_ENTERED\",\r\n TRIGGER_EXITED = \"TRIGGER_EXITED\",\r\n}\r\n\r\n/**\r\n * Base collision object\r\n */\r\nexport interface IBasePhysicsCollisionEvent {\r\n /**\r\n * 1st physics body that collided\r\n */\r\n collider: PhysicsBody;\r\n /**\r\n * 2nd physics body that collided\r\n */\r\n collidedAgainst: PhysicsBody;\r\n /**\r\n * index in instances array for the collider\r\n */\r\n colliderIndex: number;\r\n /**\r\n * index in instances array for the collidedAgainst\r\n */\r\n collidedAgainstIndex: number;\r\n /**\r\n * Event type\r\n */\r\n type: PhysicsEventType;\r\n}\r\n\r\n/**\r\n * Collision object that is the parameter when notification for collision fires.\r\n */\r\nexport interface IPhysicsCollisionEvent extends IBasePhysicsCollisionEvent {\r\n /**\r\n * World position where the collision occured\r\n */\r\n point: Nullable<Vector3>;\r\n /**\r\n * Penetration distance\r\n */\r\n distance: number;\r\n /**\r\n * Impulse value computed by the solver response\r\n */\r\n impulse: number;\r\n /**\r\n * Collision world normal direction\r\n */\r\n normal: Nullable<Vector3>;\r\n}\r\n\r\n/**\r\n * Parameters used to describe the Shape\r\n */\r\nexport interface PhysicsShapeParameters {\r\n /**\r\n * Shape center position\r\n */\r\n center?: Vector3;\r\n /**\r\n * Radius for cylinder, shape and capsule\r\n */\r\n radius?: number;\r\n /**\r\n * First point position that defines the cylinder or capsule\r\n */\r\n pointA?: Vector3;\r\n /**\r\n * Second point position that defines the cylinder or capsule\r\n */\r\n pointB?: Vector3;\r\n /**\r\n * Shape orientation\r\n */\r\n rotation?: Quaternion;\r\n /**\r\n * Dimesion extention for the box\r\n */\r\n extents?: Vector3;\r\n /**\r\n * Mesh used for Mesh shape or convex hull. It can be different than the mesh the body is attached to.\r\n */\r\n mesh?: Mesh;\r\n /**\r\n * Use children hierarchy\r\n */\r\n includeChildMeshes?: boolean;\r\n /**\r\n * The size of the heightfield in the X axis\r\n */\r\n heightFieldSizeX?: number;\r\n /**\r\n * The size of the heightfield in the Z axis\r\n */\r\n heightFieldSizeZ?: number;\r\n /**\r\n * The number of samples along the X axis\r\n */\r\n numHeightFieldSamplesX?: number;\r\n /**\r\n * The number of samples along the Z axis\r\n */\r\n numHeightFieldSamplesZ?: number;\r\n /**\r\n * The data for the heightfield\r\n */\r\n heightFieldData?: Float32Array;\r\n}\r\n\r\n/**\r\n * Parameters used to describe a Constraint\r\n */\r\nexport interface PhysicsConstraintParameters {\r\n /**\r\n * Location of the constraint pivot in the space of first body\r\n */\r\n pivotA?: Vector3;\r\n /**\r\n * Location of the constraint pivot in the space of the second body\r\n */\r\n pivotB?: Vector3;\r\n /**\r\n * An axis in the space of the first body which determines how\r\n * distances/angles are measured for LINEAR_X/ANGULAR_X limits.\r\n */\r\n axisA?: Vector3;\r\n /**\r\n * An axis in the space of the second body which determines how\r\n * distances/angles are measured for LINEAR_X/ANGULAR_X limits.\r\n */\r\n axisB?: Vector3;\r\n\r\n /**\r\n * An axis in the space of the first body which determines how\r\n * distances/angles are measured for LINEAR_Y/ANGULAR_Y limits.\r\n */\r\n perpAxisA?: Vector3;\r\n\r\n /**\r\n * An axis in the space of the second body which determines how\r\n * distances/angles are measured for LINEAR_Y/ANGULAR_Y limits.\r\n */\r\n perpAxisB?: Vector3;\r\n\r\n /**\r\n * The maximum distance that can seperate the two pivots.\r\n * Only used for DISTANCE constraints\r\n */\r\n maxDistance?: number;\r\n\r\n /**\r\n * Determines if the connected bodies should collide. Generally,\r\n * it is preferable to set this to false, especially if the constraint\r\n * positions the bodies so that they overlap. Otherwise, the constraint\r\n * will \"fight\" the collision detection and may cause jitter.\r\n */\r\n collision?: boolean;\r\n}\r\n\r\n/**\r\n * Parameters used to describe mass and inertia of the Physics Body\r\n */\r\nexport interface PhysicsMassProperties {\r\n /**\r\n * The center of mass, in local space. This is The\r\n * point the body will rotate around when applying\r\n * an angular velocity.\r\n *\r\n * If not provided, the physics engine will compute\r\n * an appropriate value.\r\n */\r\n centerOfMass?: Vector3;\r\n /**\r\n * The total mass of this object, in kilograms. This\r\n * affects how easy it is to move the body. A value\r\n * of zero will be used as an infinite mass.\r\n *\r\n * If not provided, the physics engine will compute\r\n * an appropriate value.\r\n */\r\n mass?: number;\r\n /**\r\n * The principal moments of inertia of this object\r\n * for a unit mass. This determines how easy it is\r\n * for the body to rotate. A value of zero on any\r\n * axis will be used as infinite interia about that\r\n * axis.\r\n *\r\n * If not provided, the physics engine will compute\r\n * an appropriate value.\r\n */\r\n inertia?: Vector3;\r\n /**\r\n * The rotation rotating from inertia major axis space\r\n * to parent space (i.e., the rotation which, when\r\n * applied to the 3x3 inertia tensor causes the inertia\r\n * tensor to become a diagonal matrix). This determines\r\n * how the values of inertia are aligned with the parent\r\n * object.\r\n *\r\n * If not provided, the physics engine will compute\r\n * an appropriate value.\r\n */\r\n inertiaOrientation?: Quaternion;\r\n}\r\n\r\n/**\r\n * Indicates how the body will behave.\r\n */\r\nexport enum PhysicsMotionType {\r\n STATIC,\r\n ANIMATED,\r\n DYNAMIC,\r\n}\r\n\r\n/**\r\n * Represents a pair of bodies connected by a constraint.\r\n */\r\nexport type ConstrainedBodyPair = { parentBody: PhysicsBody; parentBodyIndex: number; childBody: PhysicsBody; childBodyIndex: number };\r\n\r\n/** @internal */\r\nexport interface IPhysicsEnginePluginV2 {\r\n /**\r\n * Physics plugin world instance\r\n */\r\n world: any;\r\n /**\r\n * Physics plugin name\r\n */\r\n name: string;\r\n\r\n /**\r\n * Collision observable\r\n */\r\n onCollisionObservable: Observable<IPhysicsCollisionEvent>;\r\n /**\r\n * Collision ended observable\r\n */\r\n onCollisionEndedObservable: Observable<IBasePhysicsCollisionEvent>;\r\n /**\r\n * Trigger observable\r\n */\r\n onTriggerCollisionObservable: Observable<IBasePhysicsCollisionEvent>;\r\n\r\n setGravity(gravity: Vector3): void;\r\n setTimeStep(timeStep: number): void;\r\n getTimeStep(): number;\r\n executeStep(delta: number, bodies: Array<PhysicsBody>): void; //not forgetting pre and post events\r\n getPluginVersion(): number;\r\n\r\n // body\r\n initBody(body: PhysicsBody, motionType: PhysicsMotionType, position: Vector3, orientation: Quaternion): void;\r\n initBodyInstances(body: PhysicsBody, motionType: PhysicsMotionType, mesh: Mesh): void;\r\n updateBodyInstances(body: PhysicsBody, mesh: Mesh): void;\r\n removeBody(body: PhysicsBody): void;\r\n sync(body: PhysicsBody): void;\r\n syncTransform(body: PhysicsBody, transformNode: TransformNode): void;\r\n setShape(body: PhysicsBody, shape: Nullable<PhysicsShape>): void;\r\n getShape(body: PhysicsBody): Nullable<PhysicsShape>;\r\n getShapeType(shape: PhysicsShape): PhysicsShapeType;\r\n setEventMask(body: PhysicsBody, eventMask: number, instanceIndex?: number): void;\r\n getEventMask(body: PhysicsBody, instanceIndex?: number): number;\r\n setMotionType(body: PhysicsBody, motionType: PhysicsMotionType, instanceIndex?: number): void;\r\n getMotionType(body: PhysicsBody, instanceIndex?: number): PhysicsMotionType;\r\n computeMassProperties(body: PhysicsBody, instanceIndex?: number): PhysicsMassProperties;\r\n setMassProperties(body: PhysicsBody, massProps: PhysicsMassProperties, instanceIndex?: number): void;\r\n getMassProperties(body: PhysicsBody, instanceIndex?: number): PhysicsMassProperties;\r\n setLinearDamping(body: PhysicsBody, damping: number, instanceIndex?: number): void;\r\n getLinearDamping(body: PhysicsBody, instanceIndex?: number): number;\r\n setAngularDamping(body: PhysicsBody, damping: number, instanceIndex?: number): void;\r\n getAngularDamping(body: PhysicsBody, instanceIndex?: number): number;\r\n setLinearVelocity(body: PhysicsBody, linVel: Vector3, instanceIndex?: number): void;\r\n getLinearVelocityToRef(body: PhysicsBody, linVel: Vector3, instanceIndex?: number): void;\r\n applyImpulse(body: PhysicsBody, impulse: Vector3, location: Vector3, instanceIndex?: number): void;\r\n applyForce(body: PhysicsBody, force: Vector3, location: Vector3, instanceIndex?: number): void;\r\n setAngularVelocity(body: PhysicsBody, angVel: Vector3, instanceIndex?: number): void;\r\n getAngularVelocityToRef(body: PhysicsBody, angVel: Vector3, instanceIndex?: number): void;\r\n getBodyGeometry(body: PhysicsBody): {};\r\n disposeBody(body: PhysicsBody): void;\r\n setCollisionCallbackEnabled(body: PhysicsBody, enabled: boolean, instanceIndex?: number): void;\r\n setCollisionEndedCallbackEnabled(body: PhysicsBody, enabled: boolean, instanceIndex?: number): void;\r\n addConstraint(body: PhysicsBody, childBody: PhysicsBody, constraint: PhysicsConstraint, instanceIndex?: number, childInstanceIndex?: number): void;\r\n getCollisionObservable(body: PhysicsBody, instanceIndex?: number): Observable<IPhysicsCollisionEvent>;\r\n getCollisionEndedObservable(body: PhysicsBody, instanceIndex?: number): Observable<IBasePhysicsCollisionEvent>;\r\n setGravityFactor(body: PhysicsBody, factor: number, instanceIndex?: number): void;\r\n getGravityFactor(body: PhysicsBody, instanceIndex?: number): number;\r\n setTargetTransform(body: PhysicsBody, position: Vector3, rotation: Quaternion, instanceIndex?: number): void;\r\n\r\n // shape\r\n initShape(shape: PhysicsShape, type: PhysicsShapeType, options: PhysicsShapeParameters): void;\r\n setShapeFilterMembershipMask(shape: PhysicsShape, membershipMask: number): void;\r\n getShapeFilterMembershipMask(shape: PhysicsShape): number;\r\n setShapeFilterCollideMask(shape: PhysicsShape, collideMask: number): void;\r\n getShapeFilterCollideMask(shape: PhysicsShape): number;\r\n setMaterial(shape: PhysicsShape, material: PhysicsMaterial): void;\r\n getMaterial(shape: PhysicsShape): PhysicsMaterial;\r\n setDensity(shape: PhysicsShape, density: number): void;\r\n getDensity(shape: PhysicsShape): number;\r\n addChild(shape: PhysicsShape, newChild: PhysicsShape, translation?: Vector3, rotation?: Quaternion, scale?: Vector3): void;\r\n removeChild(shape: PhysicsShape, childIndex: number): void;\r\n getNumChildren(shape: PhysicsShape): number;\r\n getBoundingBox(shape: PhysicsShape): BoundingBox;\r\n disposeShape(shape: PhysicsShape): void;\r\n setTrigger(shape: PhysicsShape, isTrigger: boolean): void;\r\n\r\n // constraint\r\n initConstraint(constraint: PhysicsConstraint, body: PhysicsBody, childBody: PhysicsBody): void;\r\n setEnabled(constraint: PhysicsConstraint, isEnabled: boolean): void;\r\n getEnabled(constraint: PhysicsConstraint): boolean;\r\n setCollisionsEnabled(constraint: PhysicsConstraint, isEnabled: boolean): void;\r\n getCollisionsEnabled(constraint: PhysicsConstraint): boolean;\r\n setAxisFriction(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, friction: number): void;\r\n getAxisFriction(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n setAxisMode(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, limitMode: PhysicsConstraintAxisLimitMode): void;\r\n getAxisMode(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<PhysicsConstraintAxisLimitMode>;\r\n setAxisMinLimit(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, minLimit: number): void;\r\n getAxisMinLimit(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n setAxisMaxLimit(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, limit: number): void;\r\n getAxisMaxLimit(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n setAxisMotorType(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, motorType: PhysicsConstraintMotorType): void;\r\n getAxisMotorType(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<PhysicsConstraintMotorType>;\r\n setAxisMotorTarget(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, target: number): void;\r\n getAxisMotorTarget(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n setAxisMotorMaxForce(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis, maxForce: number): void;\r\n getAxisMotorMaxForce(constraint: PhysicsConstraint, axis: PhysicsConstraintAxis): Nullable<number>;\r\n disposeConstraint(constraint: PhysicsConstraint): void;\r\n getBodiesUsingConstraint(constraint: PhysicsConstraint): ConstrainedBodyPair[];\r\n\r\n // raycast\r\n raycast(from: Vector3, to: Vector3, result: PhysicsRaycastResult, query?: IRaycastQuery): void;\r\n\r\n dispose(): void;\r\n}\r\n"]}
@@ -11,6 +11,11 @@ import type { TransformNode } from "../../../Meshes/transformNode";
11
11
  import { Mesh } from "../../../Meshes/mesh";
12
12
  import { Observable } from "../../../Misc/observable";
13
13
  import type { Nullable } from "../../../types";
14
+ import type { IPhysicsPointProximityQuery } from "../../physicsPointProximityQuery";
15
+ import type { ProximityCastResult } from "../../proximityCastResult";
16
+ import type { IPhysicsShapeProximityCastQuery } from "../../physicsShapeProximityCastQuery";
17
+ import type { IPhysicsShapeCastQuery } from "../../physicsShapeCastQuery";
18
+ import type { ShapeCastResult } from "../../shapeCastResult";
14
19
  declare class BodyPluginData {
15
20
  constructor(bodyId: any);
16
21
  hpBodyId: any;
@@ -42,6 +47,7 @@ export declare class HavokPlugin implements IPhysicsEnginePluginV2 {
42
47
  private _timeStep;
43
48
  private _tmpVec3;
44
49
  private _bodies;
50
+ private _shapes;
45
51
  private _bodyBuffer;
46
52
  private _bodyCollisionObservable;
47
53
  private _constraintToBodyIdPair;
@@ -736,6 +742,7 @@ export declare class HavokPlugin implements IPhysicsEnginePluginV2 {
736
742
  * the Havok constraint, when it is no longer needed. This is important for avoiding memory leaks.
737
743
  */
738
744
  disposeConstraint(constraint: PhysicsConstraint): void;
745
+ private _populateHitData;
739
746
  /**
740
747
  * Performs a raycast from a given start point to a given end point and stores the result in a given PhysicsRaycastResult object.
741
748
  *
@@ -748,6 +755,27 @@ export declare class HavokPlugin implements IPhysicsEnginePluginV2 {
748
755
  * It then performs the raycast and stores the hit data in the PhysicsRaycastResult object.
749
756
  */
750
757
  raycast(from: Vector3, to: Vector3, result: PhysicsRaycastResult, query?: IRaycastQuery): void;
758
+ /**
759
+ * Given a point, returns the closest physics
760
+ * body to that point.
761
+ * @param query the query to perform. @see IPhysicsPointProximityQuery
762
+ * @param result contact point on the hit shape, in world space
763
+ */
764
+ pointProximity(query: IPhysicsPointProximityQuery, result: ProximityCastResult): void;
765
+ /**
766
+ * Given a shape in a specific position and orientation, returns the closest point to that shape.
767
+ * @param query the query to perform. @see IPhysicsShapeProximityCastQuery
768
+ * @param inputShapeResult contact point on input shape, in input shape space
769
+ * @param hitShapeResult contact point on hit shape, in world space
770
+ */
771
+ shapeProximity(query: IPhysicsShapeProximityCastQuery, inputShapeResult: ProximityCastResult, hitShapeResult: ProximityCastResult): void;
772
+ /**
773
+ * Given a shape in a specific orientation, cast it from the start to end position specified by the query, and return the first hit.
774
+ * @param query the query to perform. @see IPhysicsShapeCastQuery
775
+ * @param inputShapeResult contact point on input shape, in input shape space
776
+ * @param hitShapeResult contact point on hit shape, in world space
777
+ */
778
+ shapeCast(query: IPhysicsShapeCastQuery, inputShapeResult: ShapeCastResult, hitShapeResult: ShapeCastResult): void;
751
779
  /**
752
780
  * Return the collision observable for a particular physics body.
753
781
  * @param body the physics body