@onerjs/core 8.41.6 → 8.41.8

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 (342) hide show
  1. package/Animations/animation.d.ts +6 -2
  2. package/Animations/animation.js +28 -4
  3. package/Animations/animation.js.map +1 -1
  4. package/Animations/animationGroup.d.ts +2 -1
  5. package/Animations/animationGroup.js +3 -2
  6. package/Animations/animationGroup.js.map +1 -1
  7. package/Animations/animatorAvatar.d.ts +161 -0
  8. package/Animations/animatorAvatar.js +573 -0
  9. package/Animations/animatorAvatar.js.map +1 -0
  10. package/Animations/index.d.ts +1 -0
  11. package/Animations/index.js +1 -0
  12. package/Animations/index.js.map +1 -1
  13. package/AudioV2/webAudio/webAudioSoundSource.d.ts +2 -2
  14. package/AudioV2/webAudio/webAudioSoundSource.js +12 -2
  15. package/AudioV2/webAudio/webAudioSoundSource.js.map +1 -1
  16. package/Bones/index.d.ts +1 -0
  17. package/Bones/index.js +1 -0
  18. package/Bones/index.js.map +1 -1
  19. package/Bones/skeleton.d.ts +13 -0
  20. package/Bones/skeleton.functions.d.ts +26 -0
  21. package/Bones/skeleton.functions.js +91 -0
  22. package/Bones/skeleton.functions.js.map +1 -0
  23. package/Bones/skeleton.js +26 -0
  24. package/Bones/skeleton.js.map +1 -1
  25. package/Cameras/geospatialCamera.js +21 -20
  26. package/Cameras/geospatialCamera.js.map +1 -1
  27. package/Cameras/geospatialCameraMovement.d.ts +8 -1
  28. package/Cameras/geospatialCameraMovement.js +29 -8
  29. package/Cameras/geospatialCameraMovement.js.map +1 -1
  30. package/Collisions/gpuPicker.d.ts +11 -0
  31. package/Collisions/gpuPicker.js +148 -19
  32. package/Collisions/gpuPicker.js.map +1 -1
  33. package/Debug/skeletonViewer.d.ts +4 -8
  34. package/Debug/skeletonViewer.js +13 -22
  35. package/Debug/skeletonViewer.js.map +1 -1
  36. package/Engines/AbstractEngine/abstractEngine.views.js +5 -2
  37. package/Engines/AbstractEngine/abstractEngine.views.js.map +1 -1
  38. package/Engines/Extensions/engine.multiview.d.ts +2 -0
  39. package/Engines/Extensions/engine.multiview.js +7 -3
  40. package/Engines/Extensions/engine.multiview.js.map +1 -1
  41. package/Engines/abstractEngine.d.ts +2 -0
  42. package/Engines/abstractEngine.js +11 -2
  43. package/Engines/abstractEngine.js.map +1 -1
  44. package/Engines/constants.d.ts +4 -0
  45. package/Engines/constants.js +4 -0
  46. package/Engines/constants.js.map +1 -1
  47. package/Instrumentation/engineInstrumentation.js +2 -1
  48. package/Instrumentation/engineInstrumentation.js.map +1 -1
  49. package/Layers/effectLayer.js +1 -3
  50. package/Layers/effectLayer.js.map +1 -1
  51. package/Lights/Shadows/cascadedShadowGenerator.js +1 -1
  52. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  53. package/Lights/Shadows/shadowGenerator.js +2 -3
  54. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  55. package/Materials/Background/backgroundMaterial.js +37 -2
  56. package/Materials/Background/backgroundMaterial.js.map +1 -1
  57. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.d.ts +109 -0
  58. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js +210 -0
  59. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js.map +1 -0
  60. package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +1 -0
  61. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +71 -15
  62. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  63. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.d.ts +86 -0
  64. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js +161 -0
  65. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js.map +1 -0
  66. package/Materials/GreasedLine/greasedLinePluginMaterial.js +0 -6
  67. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
  68. package/Materials/GreasedLine/greasedLinePluginMaterialShadersGLSL.js +0 -1
  69. package/Materials/GreasedLine/greasedLinePluginMaterialShadersGLSL.js.map +1 -1
  70. package/Materials/GreasedLine/greasedLinePluginMaterialShadersWGSL.js +0 -1
  71. package/Materials/GreasedLine/greasedLinePluginMaterialShadersWGSL.js.map +1 -1
  72. package/Materials/Node/Blocks/Dual/clipPlanesBlock.d.ts +14 -0
  73. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js +14 -0
  74. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
  75. package/Materials/Node/Blocks/Dual/currentScreenBlock.d.ts +20 -1
  76. package/Materials/Node/Blocks/Dual/currentScreenBlock.js +20 -1
  77. package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
  78. package/Materials/Node/Blocks/Dual/depthSourceBlock.d.ts +13 -0
  79. package/Materials/Node/Blocks/Dual/depthSourceBlock.js +13 -0
  80. package/Materials/Node/Blocks/Dual/depthSourceBlock.js.map +1 -1
  81. package/Materials/Node/Blocks/Dual/fogBlock.d.ts +21 -0
  82. package/Materials/Node/Blocks/Dual/fogBlock.js +21 -0
  83. package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
  84. package/Materials/Node/Blocks/Dual/imageSourceBlock.d.ts +21 -0
  85. package/Materials/Node/Blocks/Dual/imageSourceBlock.js +21 -0
  86. package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
  87. package/Materials/Node/Blocks/Dual/lightBlock.d.ts +38 -0
  88. package/Materials/Node/Blocks/Dual/lightBlock.js +38 -0
  89. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  90. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +29 -0
  91. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +29 -0
  92. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  93. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.d.ts +5 -0
  94. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js +5 -0
  95. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
  96. package/Materials/Node/Blocks/Dual/sceneDepthBlock.d.ts +16 -0
  97. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js +16 -0
  98. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
  99. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.d.ts +16 -0
  100. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js +16 -0
  101. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js.map +1 -1
  102. package/Materials/Node/Blocks/Dual/textureBlock.d.ts +34 -0
  103. package/Materials/Node/Blocks/Dual/textureBlock.js +34 -0
  104. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  105. package/Materials/Node/Blocks/Fragment/TBNBlock.d.ts +17 -0
  106. package/Materials/Node/Blocks/Fragment/TBNBlock.js +17 -2
  107. package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
  108. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.d.ts +7 -0
  109. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.js +7 -0
  110. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.js.map +1 -1
  111. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +21 -0
  112. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +21 -0
  113. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  114. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.d.ts +10 -0
  115. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +10 -0
  116. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  117. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.d.ts +28 -0
  118. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +28 -0
  119. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  120. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.d.ts +30 -0
  121. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +30 -1
  122. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  123. package/Materials/Node/Blocks/Fragment/screenSizeBlock.d.ts +4 -0
  124. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +4 -0
  125. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
  126. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.d.ts +5 -0
  127. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js +5 -0
  128. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js.map +1 -1
  129. package/Materials/Node/Blocks/Fragment/twirlBlock.d.ts +3 -0
  130. package/Materials/Node/Blocks/Fragment/twirlBlock.js +3 -0
  131. package/Materials/Node/Blocks/Fragment/twirlBlock.js.map +1 -1
  132. package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.d.ts +6 -0
  133. package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js +6 -0
  134. package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js.map +1 -1
  135. package/Materials/Node/Blocks/Input/inputBlock.d.ts +16 -0
  136. package/Materials/Node/Blocks/Input/inputBlock.js +16 -1
  137. package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
  138. package/Materials/Node/Blocks/Input/prePassTextureBlock.d.ts +5 -0
  139. package/Materials/Node/Blocks/Input/prePassTextureBlock.js +5 -0
  140. package/Materials/Node/Blocks/Input/prePassTextureBlock.js.map +1 -1
  141. package/Materials/Node/Blocks/PBR/anisotropyBlock.d.ts +10 -0
  142. package/Materials/Node/Blocks/PBR/anisotropyBlock.js +10 -1
  143. package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
  144. package/Materials/Node/Blocks/PBR/clearCoatBlock.d.ts +23 -0
  145. package/Materials/Node/Blocks/PBR/clearCoatBlock.js +23 -1
  146. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  147. package/Materials/Node/Blocks/PBR/iridescenceBlock.d.ts +17 -0
  148. package/Materials/Node/Blocks/PBR/iridescenceBlock.js +17 -0
  149. package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
  150. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +41 -0
  151. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +41 -0
  152. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  153. package/Materials/Node/Blocks/PBR/reflectionBlock.d.ts +21 -0
  154. package/Materials/Node/Blocks/PBR/reflectionBlock.js +21 -0
  155. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  156. package/Materials/Node/Blocks/PBR/refractionBlock.d.ts +29 -0
  157. package/Materials/Node/Blocks/PBR/refractionBlock.js +29 -0
  158. package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
  159. package/Materials/Node/Blocks/PBR/sheenBlock.d.ts +14 -0
  160. package/Materials/Node/Blocks/PBR/sheenBlock.js +14 -0
  161. package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
  162. package/Materials/Node/Blocks/PBR/subSurfaceBlock.d.ts +7 -0
  163. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +7 -0
  164. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  165. package/Materials/Node/Blocks/Particle/particleTextureBlock.d.ts +23 -0
  166. package/Materials/Node/Blocks/Particle/particleTextureBlock.js +23 -0
  167. package/Materials/Node/Blocks/Particle/particleTextureBlock.js.map +1 -1
  168. package/Materials/Node/Blocks/Teleport/teleportInBlock.d.ts +6 -0
  169. package/Materials/Node/Blocks/Teleport/teleportInBlock.js +6 -0
  170. package/Materials/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
  171. package/Materials/Node/Blocks/Teleport/teleportOutBlock.d.ts +17 -0
  172. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js +17 -0
  173. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  174. package/Materials/Node/Blocks/Vertex/bonesBlock.d.ts +22 -0
  175. package/Materials/Node/Blocks/Vertex/bonesBlock.js +22 -0
  176. package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
  177. package/Materials/Node/Blocks/Vertex/instancesBlock.d.ts +13 -0
  178. package/Materials/Node/Blocks/Vertex/instancesBlock.js +13 -0
  179. package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
  180. package/Materials/Node/Blocks/Vertex/lightInformationBlock.d.ts +20 -0
  181. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js +20 -0
  182. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
  183. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.d.ts +27 -0
  184. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +27 -0
  185. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  186. package/Materials/Node/Blocks/clampBlock.d.ts +10 -0
  187. package/Materials/Node/Blocks/clampBlock.js +10 -0
  188. package/Materials/Node/Blocks/clampBlock.js.map +1 -1
  189. package/Materials/Node/Blocks/cloudBlock.d.ts +10 -0
  190. package/Materials/Node/Blocks/cloudBlock.js +10 -0
  191. package/Materials/Node/Blocks/cloudBlock.js.map +1 -1
  192. package/Materials/Node/Blocks/colorMergerBlock.d.ts +10 -0
  193. package/Materials/Node/Blocks/colorMergerBlock.js +10 -0
  194. package/Materials/Node/Blocks/colorMergerBlock.js.map +1 -1
  195. package/Materials/Node/Blocks/conditionalBlock.d.ts +14 -0
  196. package/Materials/Node/Blocks/conditionalBlock.js +14 -0
  197. package/Materials/Node/Blocks/conditionalBlock.js.map +1 -1
  198. package/Materials/Node/Blocks/curveBlock.d.ts +10 -0
  199. package/Materials/Node/Blocks/curveBlock.js +10 -0
  200. package/Materials/Node/Blocks/curveBlock.js.map +1 -1
  201. package/Materials/Node/Blocks/customBlock.d.ts +10 -0
  202. package/Materials/Node/Blocks/customBlock.js +10 -0
  203. package/Materials/Node/Blocks/customBlock.js.map +1 -1
  204. package/Materials/Node/Blocks/debugBlock.d.ts +10 -0
  205. package/Materials/Node/Blocks/debugBlock.js +10 -0
  206. package/Materials/Node/Blocks/debugBlock.js.map +1 -1
  207. package/Materials/Node/Blocks/fresnelBlock.d.ts +4 -0
  208. package/Materials/Node/Blocks/fresnelBlock.js +4 -0
  209. package/Materials/Node/Blocks/fresnelBlock.js.map +1 -1
  210. package/Materials/Node/Blocks/gradientBlock.d.ts +10 -0
  211. package/Materials/Node/Blocks/gradientBlock.js +10 -0
  212. package/Materials/Node/Blocks/gradientBlock.js.map +1 -1
  213. package/Materials/Node/Blocks/loopBlock.d.ts +10 -0
  214. package/Materials/Node/Blocks/loopBlock.js +10 -0
  215. package/Materials/Node/Blocks/loopBlock.js.map +1 -1
  216. package/Materials/Node/Blocks/matrixBuilderBlock.d.ts +1 -0
  217. package/Materials/Node/Blocks/matrixBuilderBlock.js +1 -0
  218. package/Materials/Node/Blocks/matrixBuilderBlock.js.map +1 -1
  219. package/Materials/Node/Blocks/meshAttributeExistsBlock.d.ts +10 -0
  220. package/Materials/Node/Blocks/meshAttributeExistsBlock.js +10 -0
  221. package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -1
  222. package/Materials/Node/Blocks/pannerBlock.d.ts +5 -0
  223. package/Materials/Node/Blocks/pannerBlock.js +5 -0
  224. package/Materials/Node/Blocks/pannerBlock.js.map +1 -1
  225. package/Materials/Node/Blocks/remapBlock.d.ts +10 -0
  226. package/Materials/Node/Blocks/remapBlock.js +10 -0
  227. package/Materials/Node/Blocks/remapBlock.js.map +1 -1
  228. package/Materials/Node/Blocks/rotate2dBlock.d.ts +1 -0
  229. package/Materials/Node/Blocks/rotate2dBlock.js +1 -0
  230. package/Materials/Node/Blocks/rotate2dBlock.js.map +1 -1
  231. package/Materials/Node/Blocks/transformBlock.d.ts +10 -0
  232. package/Materials/Node/Blocks/transformBlock.js +10 -0
  233. package/Materials/Node/Blocks/transformBlock.js.map +1 -1
  234. package/Materials/Node/Blocks/triPlanarBlock.d.ts +22 -0
  235. package/Materials/Node/Blocks/triPlanarBlock.js +22 -0
  236. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  237. package/Materials/Node/Blocks/trigonometryBlock.d.ts +10 -0
  238. package/Materials/Node/Blocks/trigonometryBlock.js +10 -0
  239. package/Materials/Node/Blocks/trigonometryBlock.js.map +1 -1
  240. package/Materials/Node/Blocks/vectorMergerBlock.d.ts +10 -0
  241. package/Materials/Node/Blocks/vectorMergerBlock.js +10 -0
  242. package/Materials/Node/Blocks/vectorMergerBlock.js.map +1 -1
  243. package/Materials/Node/Blocks/viewDirectionBlock.d.ts +5 -0
  244. package/Materials/Node/Blocks/viewDirectionBlock.js +5 -0
  245. package/Materials/Node/Blocks/viewDirectionBlock.js.map +1 -1
  246. package/Materials/Node/Blocks/waveBlock.d.ts +10 -0
  247. package/Materials/Node/Blocks/waveBlock.js +10 -0
  248. package/Materials/Node/Blocks/waveBlock.js.map +1 -1
  249. package/Materials/Node/Blocks/worleyNoise3DBlock.d.ts +1 -0
  250. package/Materials/Node/Blocks/worleyNoise3DBlock.js +1 -0
  251. package/Materials/Node/Blocks/worleyNoise3DBlock.js.map +1 -1
  252. package/Materials/Node/nodeMaterial.d.ts +13 -0
  253. package/Materials/Node/nodeMaterial.js +14 -2
  254. package/Materials/Node/nodeMaterial.js.map +1 -1
  255. package/Materials/Node/nodeMaterialBlock.d.ts +0 -3
  256. package/Materials/Node/nodeMaterialBlock.js +1 -6
  257. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  258. package/Materials/Node/nodeMaterialBlockConnectionPoint.js +1 -2
  259. package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
  260. package/Materials/Textures/mirrorTexture.js +1 -1
  261. package/Materials/Textures/mirrorTexture.js.map +1 -1
  262. package/Materials/index.d.ts +2 -0
  263. package/Materials/index.js +2 -0
  264. package/Materials/index.js.map +1 -1
  265. package/Maths/math.constants.d.ts +2 -1
  266. package/Maths/math.constants.js +3 -2
  267. package/Maths/math.constants.js.map +1 -1
  268. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +17 -1
  269. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  270. package/Meshes/instancedMesh.js +1 -0
  271. package/Meshes/instancedMesh.js.map +1 -1
  272. package/Meshes/mesh.d.ts +5 -0
  273. package/Meshes/mesh.js +39 -16
  274. package/Meshes/mesh.js.map +1 -1
  275. package/Misc/dataStorage.d.ts +13 -0
  276. package/Misc/dataStorage.js +25 -0
  277. package/Misc/dataStorage.js.map +1 -1
  278. package/Morph/morphTarget.d.ts +9 -5
  279. package/Morph/morphTarget.js +15 -7
  280. package/Morph/morphTarget.js.map +1 -1
  281. package/Morph/morphTargetManager.d.ts +3 -1
  282. package/Morph/morphTargetManager.js +5 -2
  283. package/Morph/morphTargetManager.js.map +1 -1
  284. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +1 -1
  285. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -1
  286. package/Particles/Node/Blocks/Emitters/coneShapeBlock.js +1 -1
  287. package/Particles/Node/Blocks/Emitters/coneShapeBlock.js.map +1 -1
  288. package/Particles/Node/Blocks/Emitters/customShapeBlock.js +1 -1
  289. package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -1
  290. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +1 -1
  291. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -1
  292. package/Particles/Node/Blocks/Emitters/emitters.functions.js +3 -3
  293. package/Particles/Node/Blocks/Emitters/emitters.functions.js.map +1 -1
  294. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js +1 -1
  295. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js.map +1 -1
  296. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +1 -1
  297. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -1
  298. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +1 -1
  299. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -1
  300. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js +2 -2
  301. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js.map +1 -1
  302. package/Particles/Node/Blocks/Update/updateNoiseBlock.js +7 -7
  303. package/Particles/Node/Blocks/Update/updateNoiseBlock.js.map +1 -1
  304. package/Particles/Node/Blocks/particleLocalVariableBlock.js +2 -2
  305. package/Particles/Node/Blocks/particleLocalVariableBlock.js.map +1 -1
  306. package/Particles/Node/nodeParticleBuildState.js +7 -7
  307. package/Particles/Node/nodeParticleBuildState.js.map +1 -1
  308. package/Particles/Node/nodeParticleSystemSet.helper.js +9 -4
  309. package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
  310. package/Particles/particle.d.ts +73 -61
  311. package/Particles/particle.js +106 -91
  312. package/Particles/particle.js.map +1 -1
  313. package/Particles/particleSystem.js +5 -5
  314. package/Particles/particleSystem.js.map +1 -1
  315. package/Particles/thinParticleSystem.function.js +83 -83
  316. package/Particles/thinParticleSystem.function.js.map +1 -1
  317. package/Particles/thinParticleSystem.js +8 -8
  318. package/Particles/thinParticleSystem.js.map +1 -1
  319. package/Physics/v2/Plugins/havokPlugin.d.ts +14 -1
  320. package/Physics/v2/Plugins/havokPlugin.js +154 -10
  321. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  322. package/Probes/reflectionProbe.js +9 -6
  323. package/Probes/reflectionProbe.js.map +1 -1
  324. package/Rendering/objectRenderer.d.ts +3 -1
  325. package/Rendering/objectRenderer.js +28 -8
  326. package/Rendering/objectRenderer.js.map +1 -1
  327. package/Rendering/reflectiveShadowMap.js +1 -1
  328. package/Rendering/reflectiveShadowMap.js.map +1 -1
  329. package/Rendering/thinDepthPeelingRenderer.js +8 -0
  330. package/Rendering/thinDepthPeelingRenderer.js.map +1 -1
  331. package/Shaders/gaussianSplatting.fragment.js +8 -2
  332. package/Shaders/gaussianSplatting.fragment.js.map +1 -1
  333. package/Shaders/gaussianSplatting.vertex.js +8 -2
  334. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  335. package/ShadersWGSL/gaussianSplatting.fragment.js +7 -1
  336. package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
  337. package/ShadersWGSL/gaussianSplatting.vertex.js +8 -2
  338. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  339. package/package.json +1 -1
  340. package/scene.d.ts +22 -1
  341. package/scene.js +15 -15
  342. package/scene.js.map +1 -1
@@ -82,7 +82,6 @@ export declare class HavokPlugin implements IPhysicsEnginePluginV2 {
82
82
  private _tmpVec3;
83
83
  private _bodies;
84
84
  private _shapes;
85
- private _bodyBuffer;
86
85
  private _bodyCollisionObservable;
87
86
  private _constraintToBodyIdPair;
88
87
  private _bodyCollisionEndedObservable;
@@ -112,6 +111,20 @@ export declare class HavokPlugin implements IPhysicsEnginePluginV2 {
112
111
  * @returns The world region to use for this body
113
112
  */
114
113
  private _getOrCreateWorldRegion;
114
+ /**
115
+ * Checks if a body's world position has left its current region and, if so,
116
+ * moves it to the correct region (existing or newly created).
117
+ * This preserves linear and angular velocity across the transition.
118
+ *
119
+ * @param pluginData - The plugin data for the body (or instance) to check
120
+ */
121
+ private _reRegionBodyPluginData;
122
+ /**
123
+ * Searches existing world regions for one that contains the given position.
124
+ * @param worldPosition - The world position to find a region for
125
+ * @returns null if no existing region contains it (does NOT create a new one).
126
+ */
127
+ private _findExistingRegion;
115
128
  /**
116
129
  * Observable for collision started and collision continued events
117
130
  */
@@ -250,6 +250,98 @@ export class HavokPlugin {
250
250
  this._worldRegions.push(newRegion);
251
251
  return newRegion;
252
252
  }
253
+ /**
254
+ * Checks if a body's world position has left its current region and, if so,
255
+ * moves it to the correct region (existing or newly created).
256
+ * This preserves linear and angular velocity across the transition.
257
+ *
258
+ * @param pluginData - The plugin data for the body (or instance) to check
259
+ */
260
+ _reRegionBodyPluginData(pluginData) {
261
+ const currentRegion = pluginData.worldRegion;
262
+ if (!currentRegion) {
263
+ return;
264
+ }
265
+ // Read the body's current local transform from Havok
266
+ const bodyTransform = this._hknp.HP_Body_GetQTransform(pluginData.hpBodyId)[1];
267
+ const localPos = bodyTransform[0];
268
+ const orientation = bodyTransform[1];
269
+ // Compute world position = local position + floating origin
270
+ const worldPos = TmpVectors.Vector3[2];
271
+ worldPos.set(localPos[0] + currentRegion.floatingOrigin._x, localPos[1] + currentRegion.floatingOrigin._y, localPos[2] + currentRegion.floatingOrigin._z);
272
+ // Check if still within the current region.
273
+ // Use a 20% hysteresis margin so that bodies near the boundary
274
+ // don't oscillate between regions every frame.
275
+ const distToCurrent = Vector3.Distance(worldPos, currentRegion.floatingOrigin);
276
+ if (distToCurrent <= this._floatingOriginWorldRadius * 1.2) {
277
+ return; // still in region (with hysteresis), nothing to do
278
+ }
279
+ // Body has left its region. Use velocity to look ahead and find the best
280
+ // region to join. This prevents creating throwaway intermediate regions
281
+ // when a fast body is heading toward an existing region (e.g. a target).
282
+ const linVel = this._hknp.HP_Body_GetLinearVelocity(pluginData.hpBodyId)[1];
283
+ const angVel = this._hknp.HP_Body_GetAngularVelocity(pluginData.hpBodyId)[1];
284
+ // Project position forward by one second of travel to find a suitable existing region.
285
+ // This is purely for region selection — the body's actual position is not changed.
286
+ const lookAheadPos = TmpVectors.Vector3[3];
287
+ lookAheadPos.set(worldPos._x + linVel[0], worldPos._y + linVel[1], worldPos._z + linVel[2]);
288
+ // Try to find the best region: first check if look-ahead position falls in an existing region
289
+ let newRegion = this._findExistingRegion(lookAheadPos);
290
+ if (!newRegion || newRegion === currentRegion) {
291
+ // Fall back to current position
292
+ newRegion = this._findExistingRegion(worldPos);
293
+ }
294
+ if (!newRegion || newRegion === currentRegion) {
295
+ // No existing region works — create one at the current position
296
+ newRegion = this._getOrCreateWorldRegion(worldPos);
297
+ }
298
+ if (newRegion === currentRegion) {
299
+ return;
300
+ }
301
+ // Remove from old world
302
+ this._hknp.HP_World_RemoveBody(currentRegion.world, pluginData.hpBodyId);
303
+ // Set transform relative to the new region's floating origin
304
+ const newOffset = newRegion.floatingOrigin;
305
+ const newLocalPos = [worldPos._x - newOffset._x, worldPos._y - newOffset._y, worldPos._z - newOffset._z];
306
+ this._hknp.HP_Body_SetQTransform(pluginData.hpBodyId, [newLocalPos, orientation]);
307
+ // Add to new world
308
+ this._hknp.HP_World_AddBody(newRegion.world, pluginData.hpBodyId, false);
309
+ // Restore velocity
310
+ this._hknp.HP_Body_SetLinearVelocity(pluginData.hpBodyId, linVel);
311
+ this._hknp.HP_Body_SetAngularVelocity(pluginData.hpBodyId, angVel);
312
+ // Update the region reference and world transform offset
313
+ pluginData.worldRegion = newRegion;
314
+ pluginData.worldTransformOffset = this._hknp.HP_Body_GetWorldTransformOffset(pluginData.hpBodyId)[1];
315
+ // Garbage-collect the old region if it has no bodies left and it's not the default world
316
+ if (currentRegion !== this._worldRegions[0]) {
317
+ const bodyCount = this._hknp.HP_World_GetNumBodies(currentRegion.world)[1];
318
+ if (bodyCount === 0) {
319
+ this._hknp.HP_World_Release(currentRegion.world);
320
+ const idx = this._worldRegions.indexOf(currentRegion);
321
+ if (idx > 0) {
322
+ this._worldRegions.splice(idx, 1);
323
+ }
324
+ }
325
+ }
326
+ }
327
+ /**
328
+ * Searches existing world regions for one that contains the given position.
329
+ * @param worldPosition - The world position to find a region for
330
+ * @returns null if no existing region contains it (does NOT create a new one).
331
+ */
332
+ _findExistingRegion(worldPosition) {
333
+ const scene = FloatingOriginCurrentScene.getScene();
334
+ if (!scene?.floatingOriginMode) {
335
+ return this._worldRegions[0];
336
+ }
337
+ for (const region of this._worldRegions) {
338
+ const distance = Vector3.Distance(worldPosition, region.floatingOrigin);
339
+ if (distance <= this._floatingOriginWorldRadius) {
340
+ return region;
341
+ }
342
+ }
343
+ return null;
344
+ }
253
345
  constructor(_useDeltaForWorldStep = true, hpInjection = HK, parameters = {}) {
254
346
  this._useDeltaForWorldStep = _useDeltaForWorldStep;
255
347
  /**
@@ -419,6 +511,21 @@ export class HavokPlugin {
419
511
  * to accurately simulate the physics bodies in the world.
420
512
  */
421
513
  executeStep(delta, physicsBodies) {
514
+ // Re-region bodies that have moved outside their current world region
515
+ // BEFORE pre-step and stepping, so the body participates in the correct
516
+ // world's step and its body buffer transform is valid when sync reads it.
517
+ if (this._worldRegions.length > 1 || FloatingOriginCurrentScene.getScene()?.floatingOriginMode) {
518
+ for (const physicsBody of physicsBodies) {
519
+ if (physicsBody._pluginDataInstances.length > 0) {
520
+ for (const instance of physicsBody._pluginDataInstances) {
521
+ this._reRegionBodyPluginData(instance);
522
+ }
523
+ }
524
+ else if (physicsBody._pluginData) {
525
+ this._reRegionBodyPluginData(physicsBody._pluginData);
526
+ }
527
+ }
528
+ }
422
529
  for (const physicsBody of physicsBodies) {
423
530
  if (physicsBody.disablePreStep) {
424
531
  continue;
@@ -431,8 +538,6 @@ export class HavokPlugin {
431
538
  this._hknp.HP_World_SetIdealStepTime(region.world, deltaTime);
432
539
  this._hknp.HP_World_Step(region.world, deltaTime);
433
540
  }
434
- // Get body buffer from the default world (first region)
435
- this._bodyBuffer = this._hknp.HP_World_GetBodyBuffer(this.world)[1];
436
541
  for (const physicsBody of physicsBodies) {
437
542
  if (!physicsBody.disableSync) {
438
543
  this.sync(physicsBody);
@@ -665,7 +770,8 @@ export class HavokPlugin {
665
770
  const pluginData = body._pluginDataInstances[i];
666
771
  // Use instance's world region offset
667
772
  const instanceOffset = pluginData.worldRegion.floatingOrigin;
668
- const bodyBuffer = this._bodyBuffer;
773
+ // Get body buffer from the instance's own world region (not always the default world)
774
+ const bodyBuffer = this._hknp.HP_World_GetBodyBuffer(pluginData.worldRegion.world)[1];
669
775
  const bufOffset = pluginData.worldTransformOffset;
670
776
  const transformBuffer = new Float32Array(this._hknp.HEAPU8.buffer, bodyBuffer + bufOffset, 16);
671
777
  const index = i * 16;
@@ -1169,7 +1275,43 @@ export class HavokPlugin {
1169
1275
  this._createOrUpdateBodyInstances(body, body.getMotionType(), matrixData, 0, instancesCount, true);
1170
1276
  }
1171
1277
  else {
1172
- // regular - use body's world region offset
1278
+ // Check if the node's new world position requires a region change.
1279
+ // This ensures teleports (e.g. toggling disablePreStep after moving
1280
+ // the transform node) immediately land in the correct region with
1281
+ // correct local coordinates, avoiding a one-frame precision glitch.
1282
+ const pluginData = body._pluginData;
1283
+ if (pluginData.worldRegion && (this._worldRegions.length > 1 || FloatingOriginCurrentScene.getScene()?.floatingOriginMode)) {
1284
+ // Get world position of the node
1285
+ const worldPos = TmpVectors.Vector3[3];
1286
+ if (node.parent) {
1287
+ node.computeWorldMatrix(true);
1288
+ worldPos.copyFrom(node.absolutePosition);
1289
+ }
1290
+ else {
1291
+ worldPos.copyFrom(node.position);
1292
+ }
1293
+ const currentRegion = pluginData.worldRegion;
1294
+ const distToCurrent = Vector3.Distance(worldPos, currentRegion.floatingOrigin);
1295
+ if (distToCurrent > this._floatingOriginWorldRadius * 1.2) {
1296
+ // Teleporting outside current region - re-region before setting transform
1297
+ const newRegion = this._getOrCreateWorldRegion(worldPos);
1298
+ if (newRegion !== currentRegion) {
1299
+ // Save velocity before removing from old world
1300
+ const linVel = this._hknp.HP_Body_GetLinearVelocity(pluginData.hpBodyId)[1];
1301
+ const angVel = this._hknp.HP_Body_GetAngularVelocity(pluginData.hpBodyId)[1];
1302
+ // Remove from old world, add to new world
1303
+ this._hknp.HP_World_RemoveBody(currentRegion.world, pluginData.hpBodyId);
1304
+ this._hknp.HP_World_AddBody(newRegion.world, pluginData.hpBodyId, false);
1305
+ // Restore velocity
1306
+ this._hknp.HP_Body_SetLinearVelocity(pluginData.hpBodyId, linVel);
1307
+ this._hknp.HP_Body_SetAngularVelocity(pluginData.hpBodyId, angVel);
1308
+ // Update region reference and cached world transform offset
1309
+ pluginData.worldRegion = newRegion;
1310
+ pluginData.worldTransformOffset = this._hknp.HP_Body_GetWorldTransformOffset(pluginData.hpBodyId)[1];
1311
+ }
1312
+ }
1313
+ }
1314
+ // Set transform using the (possibly updated) region offset
1173
1315
  const offset = body._pluginData.worldRegion.floatingOrigin;
1174
1316
  this._hknp.HP_Body_SetQTransform(body._pluginData.hpBodyId, this._getTransformInfos(node, offset));
1175
1317
  }
@@ -2289,16 +2431,18 @@ export class HavokPlugin {
2289
2431
  let eventAddress = this._hknp.HP_World_GetCollisionEvents(targetWorld)[1];
2290
2432
  const event = new CollisionEvent();
2291
2433
  const worldAddr = Number(targetWorld);
2434
+ // Find the region for this world to get the correct floating origin offset.
2435
+ // All bodies in a collision share the same world, so use one offset for both.
2436
+ const region = this._worldRegions.find((r) => Number(r.world) === worldAddr) ?? this._worldRegions[0];
2437
+ const regionOffset = region.floatingOrigin;
2292
2438
  while (eventAddress) {
2293
2439
  CollisionEvent.readToRef(this._hknp.HEAPU8.buffer, eventAddress, event);
2294
2440
  const bodyInfoA = this._bodies.get(event.contactOnA.bodyId);
2295
2441
  const bodyInfoB = this._bodies.get(event.contactOnB.bodyId);
2296
- // Add floating origin offset back to collision contact positions using the body's world region offset
2297
- // If body doesn't exist, use default region's offset (zero)
2298
- const offsetA = bodyInfoA?.body?._pluginData?.worldRegion?.floatingOrigin ?? this._worldRegions[0].floatingOrigin;
2299
- event.contactOnA.position.addInPlace(offsetA);
2300
- const offsetB = bodyInfoB?.body?._pluginData?.worldRegion?.floatingOrigin ?? this._worldRegions[0].floatingOrigin;
2301
- event.contactOnB.position.addInPlace(offsetB);
2442
+ // Add floating origin offset back to collision contact positions.
2443
+ // Both contacts are in the same world, so use the region's floating origin.
2444
+ event.contactOnA.position.addInPlace(regionOffset);
2445
+ event.contactOnB.position.addInPlace(regionOffset);
2302
2446
  // Bodies may have been disposed between events. Check both still exist.
2303
2447
  if (bodyInfoA && bodyInfoB) {
2304
2448
  const collisionInfo = {