@onerjs/core 8.41.6 → 8.41.7

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 (339) 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/Extensions/engine.multiview.d.ts +2 -0
  37. package/Engines/Extensions/engine.multiview.js +7 -3
  38. package/Engines/Extensions/engine.multiview.js.map +1 -1
  39. package/Engines/abstractEngine.js +2 -2
  40. package/Engines/abstractEngine.js.map +1 -1
  41. package/Engines/constants.d.ts +4 -0
  42. package/Engines/constants.js +4 -0
  43. package/Engines/constants.js.map +1 -1
  44. package/Instrumentation/engineInstrumentation.js +2 -1
  45. package/Instrumentation/engineInstrumentation.js.map +1 -1
  46. package/Layers/effectLayer.js +1 -3
  47. package/Layers/effectLayer.js.map +1 -1
  48. package/Lights/Shadows/cascadedShadowGenerator.js +1 -1
  49. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  50. package/Lights/Shadows/shadowGenerator.js +2 -3
  51. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  52. package/Materials/Background/backgroundMaterial.js +37 -2
  53. package/Materials/Background/backgroundMaterial.js.map +1 -1
  54. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.d.ts +109 -0
  55. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js +210 -0
  56. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js.map +1 -0
  57. package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +1 -0
  58. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +71 -15
  59. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  60. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.d.ts +86 -0
  61. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js +161 -0
  62. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js.map +1 -0
  63. package/Materials/GreasedLine/greasedLinePluginMaterial.js +0 -6
  64. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
  65. package/Materials/GreasedLine/greasedLinePluginMaterialShadersGLSL.js +0 -1
  66. package/Materials/GreasedLine/greasedLinePluginMaterialShadersGLSL.js.map +1 -1
  67. package/Materials/GreasedLine/greasedLinePluginMaterialShadersWGSL.js +0 -1
  68. package/Materials/GreasedLine/greasedLinePluginMaterialShadersWGSL.js.map +1 -1
  69. package/Materials/Node/Blocks/Dual/clipPlanesBlock.d.ts +14 -0
  70. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js +14 -0
  71. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
  72. package/Materials/Node/Blocks/Dual/currentScreenBlock.d.ts +20 -1
  73. package/Materials/Node/Blocks/Dual/currentScreenBlock.js +20 -1
  74. package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
  75. package/Materials/Node/Blocks/Dual/depthSourceBlock.d.ts +13 -0
  76. package/Materials/Node/Blocks/Dual/depthSourceBlock.js +13 -0
  77. package/Materials/Node/Blocks/Dual/depthSourceBlock.js.map +1 -1
  78. package/Materials/Node/Blocks/Dual/fogBlock.d.ts +21 -0
  79. package/Materials/Node/Blocks/Dual/fogBlock.js +21 -0
  80. package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
  81. package/Materials/Node/Blocks/Dual/imageSourceBlock.d.ts +21 -0
  82. package/Materials/Node/Blocks/Dual/imageSourceBlock.js +21 -0
  83. package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
  84. package/Materials/Node/Blocks/Dual/lightBlock.d.ts +38 -0
  85. package/Materials/Node/Blocks/Dual/lightBlock.js +38 -0
  86. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  87. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.d.ts +29 -0
  88. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +29 -0
  89. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  90. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.d.ts +5 -0
  91. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js +5 -0
  92. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
  93. package/Materials/Node/Blocks/Dual/sceneDepthBlock.d.ts +16 -0
  94. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js +16 -0
  95. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
  96. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.d.ts +16 -0
  97. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js +16 -0
  98. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js.map +1 -1
  99. package/Materials/Node/Blocks/Dual/textureBlock.d.ts +34 -0
  100. package/Materials/Node/Blocks/Dual/textureBlock.js +34 -0
  101. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  102. package/Materials/Node/Blocks/Fragment/TBNBlock.d.ts +17 -0
  103. package/Materials/Node/Blocks/Fragment/TBNBlock.js +17 -2
  104. package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
  105. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.d.ts +7 -0
  106. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.js +7 -0
  107. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.js.map +1 -1
  108. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.d.ts +21 -0
  109. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +21 -0
  110. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  111. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.d.ts +10 -0
  112. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +10 -0
  113. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  114. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.d.ts +28 -0
  115. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +28 -0
  116. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  117. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.d.ts +30 -0
  118. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +30 -1
  119. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  120. package/Materials/Node/Blocks/Fragment/screenSizeBlock.d.ts +4 -0
  121. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +4 -0
  122. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
  123. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.d.ts +5 -0
  124. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js +5 -0
  125. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js.map +1 -1
  126. package/Materials/Node/Blocks/Fragment/twirlBlock.d.ts +3 -0
  127. package/Materials/Node/Blocks/Fragment/twirlBlock.js +3 -0
  128. package/Materials/Node/Blocks/Fragment/twirlBlock.js.map +1 -1
  129. package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.d.ts +6 -0
  130. package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js +6 -0
  131. package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js.map +1 -1
  132. package/Materials/Node/Blocks/Input/inputBlock.d.ts +16 -0
  133. package/Materials/Node/Blocks/Input/inputBlock.js +16 -1
  134. package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
  135. package/Materials/Node/Blocks/Input/prePassTextureBlock.d.ts +5 -0
  136. package/Materials/Node/Blocks/Input/prePassTextureBlock.js +5 -0
  137. package/Materials/Node/Blocks/Input/prePassTextureBlock.js.map +1 -1
  138. package/Materials/Node/Blocks/PBR/anisotropyBlock.d.ts +10 -0
  139. package/Materials/Node/Blocks/PBR/anisotropyBlock.js +10 -1
  140. package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
  141. package/Materials/Node/Blocks/PBR/clearCoatBlock.d.ts +23 -0
  142. package/Materials/Node/Blocks/PBR/clearCoatBlock.js +23 -1
  143. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  144. package/Materials/Node/Blocks/PBR/iridescenceBlock.d.ts +17 -0
  145. package/Materials/Node/Blocks/PBR/iridescenceBlock.js +17 -0
  146. package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
  147. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +41 -0
  148. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +41 -0
  149. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  150. package/Materials/Node/Blocks/PBR/reflectionBlock.d.ts +21 -0
  151. package/Materials/Node/Blocks/PBR/reflectionBlock.js +21 -0
  152. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  153. package/Materials/Node/Blocks/PBR/refractionBlock.d.ts +29 -0
  154. package/Materials/Node/Blocks/PBR/refractionBlock.js +29 -0
  155. package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
  156. package/Materials/Node/Blocks/PBR/sheenBlock.d.ts +14 -0
  157. package/Materials/Node/Blocks/PBR/sheenBlock.js +14 -0
  158. package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
  159. package/Materials/Node/Blocks/PBR/subSurfaceBlock.d.ts +7 -0
  160. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +7 -0
  161. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  162. package/Materials/Node/Blocks/Particle/particleTextureBlock.d.ts +23 -0
  163. package/Materials/Node/Blocks/Particle/particleTextureBlock.js +23 -0
  164. package/Materials/Node/Blocks/Particle/particleTextureBlock.js.map +1 -1
  165. package/Materials/Node/Blocks/Teleport/teleportInBlock.d.ts +6 -0
  166. package/Materials/Node/Blocks/Teleport/teleportInBlock.js +6 -0
  167. package/Materials/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
  168. package/Materials/Node/Blocks/Teleport/teleportOutBlock.d.ts +17 -0
  169. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js +17 -0
  170. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  171. package/Materials/Node/Blocks/Vertex/bonesBlock.d.ts +22 -0
  172. package/Materials/Node/Blocks/Vertex/bonesBlock.js +22 -0
  173. package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
  174. package/Materials/Node/Blocks/Vertex/instancesBlock.d.ts +13 -0
  175. package/Materials/Node/Blocks/Vertex/instancesBlock.js +13 -0
  176. package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
  177. package/Materials/Node/Blocks/Vertex/lightInformationBlock.d.ts +20 -0
  178. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js +20 -0
  179. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
  180. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.d.ts +27 -0
  181. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +27 -0
  182. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  183. package/Materials/Node/Blocks/clampBlock.d.ts +10 -0
  184. package/Materials/Node/Blocks/clampBlock.js +10 -0
  185. package/Materials/Node/Blocks/clampBlock.js.map +1 -1
  186. package/Materials/Node/Blocks/cloudBlock.d.ts +10 -0
  187. package/Materials/Node/Blocks/cloudBlock.js +10 -0
  188. package/Materials/Node/Blocks/cloudBlock.js.map +1 -1
  189. package/Materials/Node/Blocks/colorMergerBlock.d.ts +10 -0
  190. package/Materials/Node/Blocks/colorMergerBlock.js +10 -0
  191. package/Materials/Node/Blocks/colorMergerBlock.js.map +1 -1
  192. package/Materials/Node/Blocks/conditionalBlock.d.ts +14 -0
  193. package/Materials/Node/Blocks/conditionalBlock.js +14 -0
  194. package/Materials/Node/Blocks/conditionalBlock.js.map +1 -1
  195. package/Materials/Node/Blocks/curveBlock.d.ts +10 -0
  196. package/Materials/Node/Blocks/curveBlock.js +10 -0
  197. package/Materials/Node/Blocks/curveBlock.js.map +1 -1
  198. package/Materials/Node/Blocks/customBlock.d.ts +10 -0
  199. package/Materials/Node/Blocks/customBlock.js +10 -0
  200. package/Materials/Node/Blocks/customBlock.js.map +1 -1
  201. package/Materials/Node/Blocks/debugBlock.d.ts +10 -0
  202. package/Materials/Node/Blocks/debugBlock.js +10 -0
  203. package/Materials/Node/Blocks/debugBlock.js.map +1 -1
  204. package/Materials/Node/Blocks/fresnelBlock.d.ts +4 -0
  205. package/Materials/Node/Blocks/fresnelBlock.js +4 -0
  206. package/Materials/Node/Blocks/fresnelBlock.js.map +1 -1
  207. package/Materials/Node/Blocks/gradientBlock.d.ts +10 -0
  208. package/Materials/Node/Blocks/gradientBlock.js +10 -0
  209. package/Materials/Node/Blocks/gradientBlock.js.map +1 -1
  210. package/Materials/Node/Blocks/loopBlock.d.ts +10 -0
  211. package/Materials/Node/Blocks/loopBlock.js +10 -0
  212. package/Materials/Node/Blocks/loopBlock.js.map +1 -1
  213. package/Materials/Node/Blocks/matrixBuilderBlock.d.ts +1 -0
  214. package/Materials/Node/Blocks/matrixBuilderBlock.js +1 -0
  215. package/Materials/Node/Blocks/matrixBuilderBlock.js.map +1 -1
  216. package/Materials/Node/Blocks/meshAttributeExistsBlock.d.ts +10 -0
  217. package/Materials/Node/Blocks/meshAttributeExistsBlock.js +10 -0
  218. package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -1
  219. package/Materials/Node/Blocks/pannerBlock.d.ts +5 -0
  220. package/Materials/Node/Blocks/pannerBlock.js +5 -0
  221. package/Materials/Node/Blocks/pannerBlock.js.map +1 -1
  222. package/Materials/Node/Blocks/remapBlock.d.ts +10 -0
  223. package/Materials/Node/Blocks/remapBlock.js +10 -0
  224. package/Materials/Node/Blocks/remapBlock.js.map +1 -1
  225. package/Materials/Node/Blocks/rotate2dBlock.d.ts +1 -0
  226. package/Materials/Node/Blocks/rotate2dBlock.js +1 -0
  227. package/Materials/Node/Blocks/rotate2dBlock.js.map +1 -1
  228. package/Materials/Node/Blocks/transformBlock.d.ts +10 -0
  229. package/Materials/Node/Blocks/transformBlock.js +10 -0
  230. package/Materials/Node/Blocks/transformBlock.js.map +1 -1
  231. package/Materials/Node/Blocks/triPlanarBlock.d.ts +22 -0
  232. package/Materials/Node/Blocks/triPlanarBlock.js +22 -0
  233. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  234. package/Materials/Node/Blocks/trigonometryBlock.d.ts +10 -0
  235. package/Materials/Node/Blocks/trigonometryBlock.js +10 -0
  236. package/Materials/Node/Blocks/trigonometryBlock.js.map +1 -1
  237. package/Materials/Node/Blocks/vectorMergerBlock.d.ts +10 -0
  238. package/Materials/Node/Blocks/vectorMergerBlock.js +10 -0
  239. package/Materials/Node/Blocks/vectorMergerBlock.js.map +1 -1
  240. package/Materials/Node/Blocks/viewDirectionBlock.d.ts +5 -0
  241. package/Materials/Node/Blocks/viewDirectionBlock.js +5 -0
  242. package/Materials/Node/Blocks/viewDirectionBlock.js.map +1 -1
  243. package/Materials/Node/Blocks/waveBlock.d.ts +10 -0
  244. package/Materials/Node/Blocks/waveBlock.js +10 -0
  245. package/Materials/Node/Blocks/waveBlock.js.map +1 -1
  246. package/Materials/Node/Blocks/worleyNoise3DBlock.d.ts +1 -0
  247. package/Materials/Node/Blocks/worleyNoise3DBlock.js +1 -0
  248. package/Materials/Node/Blocks/worleyNoise3DBlock.js.map +1 -1
  249. package/Materials/Node/nodeMaterial.d.ts +13 -0
  250. package/Materials/Node/nodeMaterial.js +14 -2
  251. package/Materials/Node/nodeMaterial.js.map +1 -1
  252. package/Materials/Node/nodeMaterialBlock.d.ts +0 -3
  253. package/Materials/Node/nodeMaterialBlock.js +1 -6
  254. package/Materials/Node/nodeMaterialBlock.js.map +1 -1
  255. package/Materials/Node/nodeMaterialBlockConnectionPoint.js +1 -2
  256. package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
  257. package/Materials/Textures/mirrorTexture.js +1 -1
  258. package/Materials/Textures/mirrorTexture.js.map +1 -1
  259. package/Materials/index.d.ts +2 -0
  260. package/Materials/index.js +2 -0
  261. package/Materials/index.js.map +1 -1
  262. package/Maths/math.constants.d.ts +2 -1
  263. package/Maths/math.constants.js +3 -2
  264. package/Maths/math.constants.js.map +1 -1
  265. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +17 -1
  266. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  267. package/Meshes/instancedMesh.js +1 -0
  268. package/Meshes/instancedMesh.js.map +1 -1
  269. package/Meshes/mesh.d.ts +5 -0
  270. package/Meshes/mesh.js +39 -16
  271. package/Meshes/mesh.js.map +1 -1
  272. package/Misc/dataStorage.d.ts +13 -0
  273. package/Misc/dataStorage.js +25 -0
  274. package/Misc/dataStorage.js.map +1 -1
  275. package/Morph/morphTarget.d.ts +9 -5
  276. package/Morph/morphTarget.js +15 -7
  277. package/Morph/morphTarget.js.map +1 -1
  278. package/Morph/morphTargetManager.d.ts +3 -1
  279. package/Morph/morphTargetManager.js +5 -2
  280. package/Morph/morphTargetManager.js.map +1 -1
  281. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js +1 -1
  282. package/Particles/Node/Blocks/Emitters/boxShapeBlock.js.map +1 -1
  283. package/Particles/Node/Blocks/Emitters/coneShapeBlock.js +1 -1
  284. package/Particles/Node/Blocks/Emitters/coneShapeBlock.js.map +1 -1
  285. package/Particles/Node/Blocks/Emitters/customShapeBlock.js +1 -1
  286. package/Particles/Node/Blocks/Emitters/customShapeBlock.js.map +1 -1
  287. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js +1 -1
  288. package/Particles/Node/Blocks/Emitters/cylinderShapeBlock.js.map +1 -1
  289. package/Particles/Node/Blocks/Emitters/emitters.functions.js +3 -3
  290. package/Particles/Node/Blocks/Emitters/emitters.functions.js.map +1 -1
  291. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js +1 -1
  292. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js.map +1 -1
  293. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js +1 -1
  294. package/Particles/Node/Blocks/Emitters/pointShapeBlock.js.map +1 -1
  295. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js +1 -1
  296. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.js.map +1 -1
  297. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js +2 -2
  298. package/Particles/Node/Blocks/Update/basicPositionUpdateBlock.js.map +1 -1
  299. package/Particles/Node/Blocks/Update/updateNoiseBlock.js +7 -7
  300. package/Particles/Node/Blocks/Update/updateNoiseBlock.js.map +1 -1
  301. package/Particles/Node/Blocks/particleLocalVariableBlock.js +2 -2
  302. package/Particles/Node/Blocks/particleLocalVariableBlock.js.map +1 -1
  303. package/Particles/Node/nodeParticleBuildState.js +7 -7
  304. package/Particles/Node/nodeParticleBuildState.js.map +1 -1
  305. package/Particles/Node/nodeParticleSystemSet.helper.js +9 -4
  306. package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
  307. package/Particles/particle.d.ts +73 -61
  308. package/Particles/particle.js +106 -91
  309. package/Particles/particle.js.map +1 -1
  310. package/Particles/particleSystem.js +5 -5
  311. package/Particles/particleSystem.js.map +1 -1
  312. package/Particles/thinParticleSystem.function.js +83 -83
  313. package/Particles/thinParticleSystem.function.js.map +1 -1
  314. package/Particles/thinParticleSystem.js +8 -8
  315. package/Particles/thinParticleSystem.js.map +1 -1
  316. package/Physics/v2/Plugins/havokPlugin.d.ts +14 -1
  317. package/Physics/v2/Plugins/havokPlugin.js +154 -10
  318. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  319. package/Probes/reflectionProbe.js +9 -6
  320. package/Probes/reflectionProbe.js.map +1 -1
  321. package/Rendering/objectRenderer.d.ts +3 -1
  322. package/Rendering/objectRenderer.js +28 -8
  323. package/Rendering/objectRenderer.js.map +1 -1
  324. package/Rendering/reflectiveShadowMap.js +1 -1
  325. package/Rendering/reflectiveShadowMap.js.map +1 -1
  326. package/Rendering/thinDepthPeelingRenderer.js +8 -0
  327. package/Rendering/thinDepthPeelingRenderer.js.map +1 -1
  328. package/Shaders/gaussianSplatting.fragment.js +8 -2
  329. package/Shaders/gaussianSplatting.fragment.js.map +1 -1
  330. package/Shaders/gaussianSplatting.vertex.js +8 -2
  331. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  332. package/ShadersWGSL/gaussianSplatting.fragment.js +7 -1
  333. package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
  334. package/ShadersWGSL/gaussianSplatting.vertex.js +8 -2
  335. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  336. package/package.json +1 -1
  337. package/scene.d.ts +22 -1
  338. package/scene.js +15 -15
  339. package/scene.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mirrorTexture.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Textures/mirrorTexture.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAI/C;;;;;;GAMG;AACH,MAAM,OAAO,aAAc,SAAQ,mBAAmB;IAQlD;;OAEG;IACH,IAAW,SAAS,CAAC,KAAa;QAC9B,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;YAC5B,OAAO;QACX,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjC,CAAC;IAED,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,IAAW,kBAAkB,CAAC,KAAa;QACvC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACjC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,EAAE,CAAC;YACb,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAE7D,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;OAEG;IACa,OAAO;QACnB,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAE9B,IAAI,KAAK,EAAE,CAAC;YACR,KAAK,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;QAC5G,CAAC;QACD,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC;IAC9B,CAAC;CACJ;AAED,OAAO,CAAC,aAAa,GAAG,CAAC,IAAY,EAAE,gBAAwB,EAAE,KAAY,EAAE,eAAwB,EAAiB,EAAE;IACtH,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AAC7E,CAAC,CAAC","sourcesContent":["import type { Observer } from \"../../Misc/observable\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Camera } from \"../../Cameras/camera\";\r\nimport type { Scene } from \"../../scene\";\r\nimport { Matrix, Vector3, Vector2 } from \"../../Maths/math.vector\";\r\nimport { Texture } from \"../../Materials/Textures/texture\";\r\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture\";\r\nimport type { ImageProcessingConfiguration } from \"../../Materials/imageProcessingConfiguration\";\r\nimport { BlurPostProcess } from \"../../PostProcesses/blurPostProcess\";\r\nimport { Constants } from \"../../Engines/constants\";\r\nimport { Plane } from \"../../Maths/math.plane\";\r\nimport type { UniformBuffer } from \"../uniformBuffer\";\r\nimport type { TextureSize } from \"../../Materials/Textures/textureCreationOptions\";\r\n\r\n/**\r\n * Mirror texture can be used to simulate the view from a mirror in a scene.\r\n * It will dynamically be rendered every frame to adapt to the camera point of view.\r\n * You can then easily use it as a reflectionTexture on a flat surface.\r\n * In case the surface is not a plane, please consider relying on reflection probes.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrortexture\r\n */\r\nexport class MirrorTexture extends RenderTargetTexture {\r\n /**\r\n * Define the reflection plane we want to use. The mirrorPlane is usually set to the constructed reflector.\r\n * It is possible to directly set the mirrorPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the mirrorPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the reflector as stated in the doc.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrors\r\n */\r\n public mirrorPlane = new Plane(0, 1, 0, 1);\r\n\r\n /**\r\n * Define the blur ratio used to blur the reflection if needed.\r\n */\r\n public set blurRatio(value: number) {\r\n if (this._blurRatio === value) {\r\n return;\r\n }\r\n\r\n this._blurRatio = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurRatio(): number {\r\n return this._blurRatio;\r\n }\r\n\r\n /**\r\n * Define the adaptive blur kernel used to blur the reflection if needed.\r\n * This will autocompute the closest best match for the `blurKernel`\r\n */\r\n public set adaptiveBlurKernel(value: number) {\r\n this._adaptiveBlurKernel = value;\r\n this._autoComputeBlurKernel();\r\n }\r\n\r\n /**\r\n * Define the blur kernel used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernel(value: number) {\r\n this.blurKernelX = value;\r\n this.blurKernelY = value;\r\n }\r\n\r\n /**\r\n * Define the blur kernel on the X Axis used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernelX(value: number) {\r\n if (this._blurKernelX === value) {\r\n return;\r\n }\r\n\r\n this._blurKernelX = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurKernelX(): number {\r\n return this._blurKernelX;\r\n }\r\n\r\n /**\r\n * Define the blur kernel on the Y Axis used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernelY(value: number) {\r\n if (this._blurKernelY === value) {\r\n return;\r\n }\r\n\r\n this._blurKernelY = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurKernelY(): number {\r\n return this._blurKernelY;\r\n }\r\n\r\n private _autoComputeBlurKernel(): void {\r\n const engine = this.getScene()!.getEngine();\r\n\r\n const dw = this.getRenderWidth() / engine.getRenderWidth();\r\n const dh = this.getRenderHeight() / engine.getRenderHeight();\r\n this.blurKernelX = this._adaptiveBlurKernel * dw;\r\n this.blurKernelY = this._adaptiveBlurKernel * dh;\r\n }\r\n\r\n public override resize(size: TextureSize | { ratio: number }): void {\r\n super.resize(size);\r\n if (!this._adaptiveBlurKernel) {\r\n this._preparePostProcesses();\r\n } else {\r\n this._autoComputeBlurKernel();\r\n }\r\n }\r\n\r\n protected override _onRatioRescale(): void {\r\n if (this._sizeRatio) {\r\n this.resize(this._initialSizeParameter);\r\n if (!this._adaptiveBlurKernel) {\r\n this._preparePostProcesses();\r\n }\r\n }\r\n\r\n if (this._adaptiveBlurKernel) {\r\n this._autoComputeBlurKernel();\r\n }\r\n }\r\n\r\n private _updateGammaSpace() {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return;\r\n }\r\n\r\n this.gammaSpace = !scene.imageProcessingConfiguration.isEnabled || !scene.imageProcessingConfiguration.applyByPostProcess;\r\n }\r\n\r\n private _imageProcessingConfigChangeObserver: Nullable<Observer<ImageProcessingConfiguration>>;\r\n\r\n private _transformMatrix = Matrix.Zero();\r\n private _mirrorMatrix = Matrix.Zero();\r\n\r\n private _blurX: Nullable<BlurPostProcess>;\r\n private _blurY: Nullable<BlurPostProcess>;\r\n private _adaptiveBlurKernel = 0;\r\n private _blurKernelX = 0;\r\n private _blurKernelY = 0;\r\n private _blurRatio = 1.0;\r\n private _sceneUBO: UniformBuffer;\r\n private _currentSceneUBO: UniformBuffer;\r\n\r\n /**\r\n * Instantiates a Mirror Texture.\r\n * Mirror texture can be used to simulate the view from a mirror in a scene.\r\n * It will dynamically be rendered every frame to adapt to the camera point of view.\r\n * You can then easily use it as a reflectionTexture on a flat surface.\r\n * In case the surface is not a plane, please consider relying on reflection probes.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrors\r\n * @param name\r\n * @param size\r\n * @param scene\r\n * @param generateMipMaps\r\n * @param type\r\n * @param samplingMode\r\n * @param generateDepthBuffer\r\n */\r\n constructor(\r\n name: string,\r\n size: number | { width: number; height: number } | { ratio: number },\r\n scene?: Scene,\r\n generateMipMaps?: boolean,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n samplingMode = Texture.BILINEAR_SAMPLINGMODE,\r\n generateDepthBuffer = true\r\n ) {\r\n super(name, size, scene, generateMipMaps, true, type, false, samplingMode, generateDepthBuffer);\r\n\r\n scene = <Scene>this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n this.ignoreCameraViewport = true;\r\n\r\n this._updateGammaSpace();\r\n this._imageProcessingConfigChangeObserver = scene.imageProcessingConfiguration.onUpdateParameters.add(() => {\r\n this._updateGammaSpace();\r\n });\r\n\r\n const engine = scene.getEngine();\r\n\r\n if (engine.supportsUniformBuffers) {\r\n this._sceneUBO = scene.createSceneUniformBuffer(`Scene for Mirror Texture (name \"${name}\")`);\r\n }\r\n\r\n let saveClipPlane: Nullable<Plane>;\r\n\r\n this.onBeforeRenderObservable.add(() => {\r\n if (this._sceneUBO) {\r\n this._currentSceneUBO = scene.getSceneUniformBuffer();\r\n scene.setSceneUniformBuffer(this._sceneUBO);\r\n scene.getSceneUniformBuffer().unbindEffect();\r\n }\r\n\r\n Matrix.ReflectionToRef(this.mirrorPlane, this._mirrorMatrix);\r\n this._mirrorMatrix.multiplyToRef(scene.getViewMatrix(), this._transformMatrix);\r\n\r\n scene.setTransformMatrix(this._transformMatrix, scene.getProjectionMatrix());\r\n\r\n saveClipPlane = scene.clipPlane;\r\n scene.clipPlane = this.mirrorPlane;\r\n\r\n const eyePos = Vector3.TransformCoordinates((<Camera>scene.activeCamera).globalPosition, this._mirrorMatrix);\r\n scene._mirroredCameraPosition = eyePos;\r\n scene._forcedViewPosition = eyePos; // More performant to set 2 properties here than to check both mirroredCameraPos and forcedViewPos within eye binding (which happens on critical rendering path)\r\n });\r\n\r\n this.onAfterRenderObservable.add(() => {\r\n if (this._sceneUBO) {\r\n scene.setSceneUniformBuffer(this._currentSceneUBO);\r\n }\r\n scene.updateTransformMatrix();\r\n scene._mirroredCameraPosition = null;\r\n scene._forcedViewPosition = null;\r\n\r\n scene.clipPlane = saveClipPlane;\r\n });\r\n }\r\n\r\n private _preparePostProcesses(): void {\r\n this.clearPostProcesses(true);\r\n\r\n if (this._blurKernelX && this._blurKernelY) {\r\n const engine = (<Scene>this.getScene()).getEngine();\r\n\r\n const textureType =\r\n engine.getCaps().textureFloatRender && engine.getCaps().textureFloatLinearFiltering ? Constants.TEXTURETYPE_FLOAT : Constants.TEXTURETYPE_HALF_FLOAT;\r\n\r\n this._blurX = new BlurPostProcess(\r\n \"horizontal blur\",\r\n new Vector2(1.0, 0),\r\n this._blurKernelX,\r\n this._blurRatio,\r\n null,\r\n Texture.BILINEAR_SAMPLINGMODE,\r\n engine,\r\n false,\r\n textureType\r\n );\r\n this._blurX.autoClear = false;\r\n\r\n if (this._blurRatio === 1 && this.samples < 2 && this._texture) {\r\n this._blurX.inputTexture = this._renderTarget!;\r\n } else {\r\n this._blurX.alwaysForcePOT = true;\r\n }\r\n\r\n this._blurY = new BlurPostProcess(\r\n \"vertical blur\",\r\n new Vector2(0, 1.0),\r\n this._blurKernelY,\r\n this._blurRatio,\r\n null,\r\n Texture.BILINEAR_SAMPLINGMODE,\r\n engine,\r\n false,\r\n textureType\r\n );\r\n this._blurY.autoClear = false;\r\n this._blurY.alwaysForcePOT = this._blurRatio !== 1;\r\n\r\n this.addPostProcess(this._blurX);\r\n this.addPostProcess(this._blurY);\r\n } else {\r\n if (this._blurY) {\r\n this.removePostProcess(this._blurY);\r\n this._blurY.dispose();\r\n this._blurY = null;\r\n }\r\n if (this._blurX) {\r\n this.removePostProcess(this._blurX);\r\n this._blurX.dispose();\r\n this._blurX = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clone the mirror texture.\r\n * @returns the cloned texture\r\n */\r\n public override clone(): MirrorTexture {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n\r\n const textureSize = this.getSize();\r\n const newTexture = new MirrorTexture(\r\n this.name,\r\n textureSize.width,\r\n scene,\r\n this._renderTargetOptions.generateMipMaps,\r\n this._renderTargetOptions.type,\r\n this._renderTargetOptions.samplingMode,\r\n this._renderTargetOptions.generateDepthBuffer\r\n );\r\n\r\n // Base texture\r\n newTexture.hasAlpha = this.hasAlpha;\r\n newTexture.level = this.level;\r\n\r\n // Mirror Texture\r\n newTexture.mirrorPlane = this.mirrorPlane.clone();\r\n if (this.renderList) {\r\n newTexture.renderList = this.renderList.slice(0);\r\n }\r\n\r\n return newTexture;\r\n }\r\n\r\n /**\r\n * Serialize the texture to a JSON representation you could use in Parse later on\r\n * @returns the serialized JSON representation\r\n */\r\n public override serialize(): any {\r\n if (!this.name) {\r\n return null;\r\n }\r\n\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.mirrorPlane = this.mirrorPlane.asArray();\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Dispose the texture and release its associated resources.\r\n */\r\n public override dispose() {\r\n super.dispose();\r\n const scene = this.getScene();\r\n\r\n if (scene) {\r\n scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver);\r\n }\r\n this._sceneUBO?.dispose();\r\n }\r\n}\r\n\r\nTexture._CreateMirror = (name: string, renderTargetSize: number, scene: Scene, generateMipMaps: boolean): MirrorTexture => {\r\n return new MirrorTexture(name, renderTargetSize, scene, generateMipMaps);\r\n};\r\n"]}
1
+ {"version":3,"file":"mirrorTexture.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Textures/mirrorTexture.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAI/C;;;;;;GAMG;AACH,MAAM,OAAO,aAAc,SAAQ,mBAAmB;IAQlD;;OAEG;IACH,IAAW,SAAS,CAAC,KAAa;QAC9B,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;YAC5B,OAAO;QACX,CAAC;QAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjC,CAAC;IAED,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,IAAW,kBAAkB,CAAC,KAAa;QACvC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QACjC,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACH,IAAW,UAAU,CAAC,KAAa;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACH,IAAW,WAAW,CAAC,KAAa;QAChC,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,EAAE,CAAC;Y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,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAE9B,IAAI,KAAK,EAAE,CAAC;YACR,KAAK,CAAC,4BAA4B,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;QAC5G,CAAC;QACD,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,CAAC;IAC9B,CAAC;CACJ;AAED,OAAO,CAAC,aAAa,GAAG,CAAC,IAAY,EAAE,gBAAwB,EAAE,KAAY,EAAE,eAAwB,EAAiB,EAAE;IACtH,OAAO,IAAI,aAAa,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;AAC7E,CAAC,CAAC","sourcesContent":["import type { Observer } from \"../../Misc/observable\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { Camera } from \"../../Cameras/camera\";\r\nimport type { Scene } from \"../../scene\";\r\nimport { Matrix, Vector3, Vector2 } from \"../../Maths/math.vector\";\r\nimport { Texture } from \"../../Materials/Textures/texture\";\r\nimport { RenderTargetTexture } from \"../../Materials/Textures/renderTargetTexture\";\r\nimport type { ImageProcessingConfiguration } from \"../../Materials/imageProcessingConfiguration\";\r\nimport { BlurPostProcess } from \"../../PostProcesses/blurPostProcess\";\r\nimport { Constants } from \"../../Engines/constants\";\r\nimport { Plane } from \"../../Maths/math.plane\";\r\nimport type { UniformBuffer } from \"../uniformBuffer\";\r\nimport type { TextureSize } from \"../../Materials/Textures/textureCreationOptions\";\r\n\r\n/**\r\n * Mirror texture can be used to simulate the view from a mirror in a scene.\r\n * It will dynamically be rendered every frame to adapt to the camera point of view.\r\n * You can then easily use it as a reflectionTexture on a flat surface.\r\n * In case the surface is not a plane, please consider relying on reflection probes.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrortexture\r\n */\r\nexport class MirrorTexture extends RenderTargetTexture {\r\n /**\r\n * Define the reflection plane we want to use. The mirrorPlane is usually set to the constructed reflector.\r\n * It is possible to directly set the mirrorPlane by directly using a Plane(a, b, c, d) where a, b and c give the plane normal vector (a, b, c) and d is a scalar displacement from the mirrorPlane to the origin. However in all but the very simplest of situations it is more straight forward to set it to the reflector as stated in the doc.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrors\r\n */\r\n public mirrorPlane = new Plane(0, 1, 0, 1);\r\n\r\n /**\r\n * Define the blur ratio used to blur the reflection if needed.\r\n */\r\n public set blurRatio(value: number) {\r\n if (this._blurRatio === value) {\r\n return;\r\n }\r\n\r\n this._blurRatio = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurRatio(): number {\r\n return this._blurRatio;\r\n }\r\n\r\n /**\r\n * Define the adaptive blur kernel used to blur the reflection if needed.\r\n * This will autocompute the closest best match for the `blurKernel`\r\n */\r\n public set adaptiveBlurKernel(value: number) {\r\n this._adaptiveBlurKernel = value;\r\n this._autoComputeBlurKernel();\r\n }\r\n\r\n /**\r\n * Define the blur kernel used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernel(value: number) {\r\n this.blurKernelX = value;\r\n this.blurKernelY = value;\r\n }\r\n\r\n /**\r\n * Define the blur kernel on the X Axis used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernelX(value: number) {\r\n if (this._blurKernelX === value) {\r\n return;\r\n }\r\n\r\n this._blurKernelX = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurKernelX(): number {\r\n return this._blurKernelX;\r\n }\r\n\r\n /**\r\n * Define the blur kernel on the Y Axis used to blur the reflection if needed.\r\n * Please consider using `adaptiveBlurKernel` as it could find the closest best value for you.\r\n */\r\n public set blurKernelY(value: number) {\r\n if (this._blurKernelY === value) {\r\n return;\r\n }\r\n\r\n this._blurKernelY = value;\r\n this._preparePostProcesses();\r\n }\r\n\r\n public get blurKernelY(): number {\r\n return this._blurKernelY;\r\n }\r\n\r\n private _autoComputeBlurKernel(): void {\r\n const engine = this.getScene()!.getEngine();\r\n\r\n const dw = this.getRenderWidth() / engine.getRenderWidth();\r\n const dh = this.getRenderHeight() / engine.getRenderHeight();\r\n this.blurKernelX = this._adaptiveBlurKernel * dw;\r\n this.blurKernelY = this._adaptiveBlurKernel * dh;\r\n }\r\n\r\n public override resize(size: TextureSize | { ratio: number }): void {\r\n super.resize(size);\r\n if (!this._adaptiveBlurKernel) {\r\n this._preparePostProcesses();\r\n } else {\r\n this._autoComputeBlurKernel();\r\n }\r\n }\r\n\r\n protected override _onRatioRescale(): void {\r\n if (this._sizeRatio) {\r\n this.resize(this._initialSizeParameter);\r\n if (!this._adaptiveBlurKernel) {\r\n this._preparePostProcesses();\r\n }\r\n }\r\n\r\n if (this._adaptiveBlurKernel) {\r\n this._autoComputeBlurKernel();\r\n }\r\n }\r\n\r\n private _updateGammaSpace() {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return;\r\n }\r\n\r\n this.gammaSpace = !scene.imageProcessingConfiguration.isEnabled || !scene.imageProcessingConfiguration.applyByPostProcess;\r\n }\r\n\r\n private _imageProcessingConfigChangeObserver: Nullable<Observer<ImageProcessingConfiguration>>;\r\n\r\n private _transformMatrix = Matrix.Zero();\r\n private _mirrorMatrix = Matrix.Zero();\r\n\r\n private _blurX: Nullable<BlurPostProcess>;\r\n private _blurY: Nullable<BlurPostProcess>;\r\n private _adaptiveBlurKernel = 0;\r\n private _blurKernelX = 0;\r\n private _blurKernelY = 0;\r\n private _blurRatio = 1.0;\r\n private _sceneUBO: UniformBuffer;\r\n private _currentSceneUBO: UniformBuffer;\r\n\r\n /**\r\n * Instantiates a Mirror Texture.\r\n * Mirror texture can be used to simulate the view from a mirror in a scene.\r\n * It will dynamically be rendered every frame to adapt to the camera point of view.\r\n * You can then easily use it as a reflectionTexture on a flat surface.\r\n * In case the surface is not a plane, please consider relying on reflection probes.\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#mirrors\r\n * @param name\r\n * @param size\r\n * @param scene\r\n * @param generateMipMaps\r\n * @param type\r\n * @param samplingMode\r\n * @param generateDepthBuffer\r\n */\r\n constructor(\r\n name: string,\r\n size: number | { width: number; height: number } | { ratio: number },\r\n scene?: Scene,\r\n generateMipMaps?: boolean,\r\n type: number = Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n samplingMode = Texture.BILINEAR_SAMPLINGMODE,\r\n generateDepthBuffer = true\r\n ) {\r\n super(name, size, scene, generateMipMaps, true, type, false, samplingMode, generateDepthBuffer);\r\n\r\n scene = <Scene>this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n this.ignoreCameraViewport = true;\r\n\r\n this._updateGammaSpace();\r\n this._imageProcessingConfigChangeObserver = scene.imageProcessingConfiguration.onUpdateParameters.add(() => {\r\n this._updateGammaSpace();\r\n });\r\n\r\n const engine = scene.getEngine();\r\n\r\n if (engine.supportsUniformBuffers) {\r\n this._sceneUBO = scene.createSceneUniformBuffer(`Scene for Mirror Texture (name \"${name}\")`, { forceMono: true });\r\n }\r\n\r\n let saveClipPlane: Nullable<Plane>;\r\n\r\n this.onBeforeRenderObservable.add(() => {\r\n if (this._sceneUBO) {\r\n this._currentSceneUBO = scene.getSceneUniformBuffer();\r\n scene.setSceneUniformBuffer(this._sceneUBO);\r\n scene.getSceneUniformBuffer().unbindEffect();\r\n }\r\n\r\n Matrix.ReflectionToRef(this.mirrorPlane, this._mirrorMatrix);\r\n this._mirrorMatrix.multiplyToRef(scene.getViewMatrix(), this._transformMatrix);\r\n\r\n scene.setTransformMatrix(this._transformMatrix, scene.getProjectionMatrix());\r\n\r\n saveClipPlane = scene.clipPlane;\r\n scene.clipPlane = this.mirrorPlane;\r\n\r\n const eyePos = Vector3.TransformCoordinates((<Camera>scene.activeCamera).globalPosition, this._mirrorMatrix);\r\n scene._mirroredCameraPosition = eyePos;\r\n scene._forcedViewPosition = eyePos; // More performant to set 2 properties here than to check both mirroredCameraPos and forcedViewPos within eye binding (which happens on critical rendering path)\r\n });\r\n\r\n this.onAfterRenderObservable.add(() => {\r\n if (this._sceneUBO) {\r\n scene.setSceneUniformBuffer(this._currentSceneUBO);\r\n }\r\n scene.updateTransformMatrix();\r\n scene._mirroredCameraPosition = null;\r\n scene._forcedViewPosition = null;\r\n\r\n scene.clipPlane = saveClipPlane;\r\n });\r\n }\r\n\r\n private _preparePostProcesses(): void {\r\n this.clearPostProcesses(true);\r\n\r\n if (this._blurKernelX && this._blurKernelY) {\r\n const engine = (<Scene>this.getScene()).getEngine();\r\n\r\n const textureType =\r\n engine.getCaps().textureFloatRender && engine.getCaps().textureFloatLinearFiltering ? Constants.TEXTURETYPE_FLOAT : Constants.TEXTURETYPE_HALF_FLOAT;\r\n\r\n this._blurX = new BlurPostProcess(\r\n \"horizontal blur\",\r\n new Vector2(1.0, 0),\r\n this._blurKernelX,\r\n this._blurRatio,\r\n null,\r\n Texture.BILINEAR_SAMPLINGMODE,\r\n engine,\r\n false,\r\n textureType\r\n );\r\n this._blurX.autoClear = false;\r\n\r\n if (this._blurRatio === 1 && this.samples < 2 && this._texture) {\r\n this._blurX.inputTexture = this._renderTarget!;\r\n } else {\r\n this._blurX.alwaysForcePOT = true;\r\n }\r\n\r\n this._blurY = new BlurPostProcess(\r\n \"vertical blur\",\r\n new Vector2(0, 1.0),\r\n this._blurKernelY,\r\n this._blurRatio,\r\n null,\r\n Texture.BILINEAR_SAMPLINGMODE,\r\n engine,\r\n false,\r\n textureType\r\n );\r\n this._blurY.autoClear = false;\r\n this._blurY.alwaysForcePOT = this._blurRatio !== 1;\r\n\r\n this.addPostProcess(this._blurX);\r\n this.addPostProcess(this._blurY);\r\n } else {\r\n if (this._blurY) {\r\n this.removePostProcess(this._blurY);\r\n this._blurY.dispose();\r\n this._blurY = null;\r\n }\r\n if (this._blurX) {\r\n this.removePostProcess(this._blurX);\r\n this._blurX.dispose();\r\n this._blurX = null;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Clone the mirror texture.\r\n * @returns the cloned texture\r\n */\r\n public override clone(): MirrorTexture {\r\n const scene = this.getScene();\r\n\r\n if (!scene) {\r\n return this;\r\n }\r\n\r\n const textureSize = this.getSize();\r\n const newTexture = new MirrorTexture(\r\n this.name,\r\n textureSize.width,\r\n scene,\r\n this._renderTargetOptions.generateMipMaps,\r\n this._renderTargetOptions.type,\r\n this._renderTargetOptions.samplingMode,\r\n this._renderTargetOptions.generateDepthBuffer\r\n );\r\n\r\n // Base texture\r\n newTexture.hasAlpha = this.hasAlpha;\r\n newTexture.level = this.level;\r\n\r\n // Mirror Texture\r\n newTexture.mirrorPlane = this.mirrorPlane.clone();\r\n if (this.renderList) {\r\n newTexture.renderList = this.renderList.slice(0);\r\n }\r\n\r\n return newTexture;\r\n }\r\n\r\n /**\r\n * Serialize the texture to a JSON representation you could use in Parse later on\r\n * @returns the serialized JSON representation\r\n */\r\n public override serialize(): any {\r\n if (!this.name) {\r\n return null;\r\n }\r\n\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.mirrorPlane = this.mirrorPlane.asArray();\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Dispose the texture and release its associated resources.\r\n */\r\n public override dispose() {\r\n super.dispose();\r\n const scene = this.getScene();\r\n\r\n if (scene) {\r\n scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver);\r\n }\r\n this._sceneUBO?.dispose();\r\n }\r\n}\r\n\r\nTexture._CreateMirror = (name: string, renderTargetSize: number, scene: Scene, generateMipMaps: boolean): MirrorTexture => {\r\n return new MirrorTexture(name, renderTargetSize, scene, generateMipMaps);\r\n};\r\n"]}
@@ -37,6 +37,8 @@ export * from "./GreasedLine/greasedLineMaterialInterfaces.js";
37
37
  export * from "./GreasedLine/greasedLineMaterialDefaults.js";
38
38
  export * from "./meshDebugPluginMaterial.js";
39
39
  export * from "./GaussianSplatting/gaussianSplattingMaterial.js";
40
+ export * from "./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js";
41
+ export * from "./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js";
40
42
  export * from "./materialHelper.functions.js";
41
43
  export * from "./materialHelper.geometryrendering.js";
42
44
  export * from "./materialStencilState.js";
@@ -38,6 +38,8 @@ export * from "./GreasedLine/greasedLineMaterialInterfaces.js";
38
38
  export * from "./GreasedLine/greasedLineMaterialDefaults.js";
39
39
  export * from "./meshDebugPluginMaterial.js";
40
40
  export * from "./GaussianSplatting/gaussianSplattingMaterial.js";
41
+ export * from "./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js";
42
+ export * from "./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js";
41
43
  export * from "./materialHelper.functions.js";
42
44
  export * from "./materialHelper.geometryrendering.js";
43
45
  export * from "./materialStencilState.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,OAAO,qBAAqB,CAAC;AAE7B,uBAAuB;AAEvB,mBAAmB;AACnB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,2BAA2B;AAC3B,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./Background/index\";\r\nexport * from \"./colorCurves\";\r\nexport * from \"./iEffectFallbacks\";\r\nexport * from \"./effectFallbacks\";\r\nexport * from \"./effect\";\r\nexport * from \"./fresnelParameters\";\r\nexport * from \"./imageProcessing\";\r\nexport * from \"./imageProcessingConfiguration\";\r\nexport * from \"./material\";\r\nexport * from \"./materialDefines\";\r\nexport * from \"./clipPlaneMaterialHelper\";\r\nexport * from \"./materialHelper\";\r\nexport * from \"./multiMaterial\";\r\nexport * from \"./Occlusion/index\";\r\nexport * from \"./PBR/index\";\r\nexport * from \"./pushMaterial\";\r\nexport * from \"./shaderLanguage\";\r\nexport * from \"./shaderMaterial\";\r\nexport * from \"./standardMaterial\";\r\nexport * from \"./Textures/index\";\r\nexport * from \"./uniformBuffer\";\r\nexport * from \"./materialFlags\";\r\nexport * from \"./Node/index\";\r\nexport * from \"./effectRenderer\";\r\nexport * from \"./shadowDepthWrapper\";\r\nexport * from \"./drawWrapper.functions\";\r\nexport * from \"./drawWrapper\";\r\nexport * from \"./materialPluginBase\";\r\nexport * from \"./materialPluginManager\";\r\nexport * from \"./materialPluginEvent\";\r\nexport * from \"./material.detailMapConfiguration\";\r\nexport * from \"./material.decalMapConfiguration\";\r\nexport * from \"./materialPluginFactoryExport\";\r\nexport * from \"./GreasedLine/greasedLinePluginMaterial\";\r\nexport * from \"./GreasedLine/greasedLineSimpleMaterial\";\r\nexport * from \"./GreasedLine/greasedLineMaterialInterfaces\";\r\nexport * from \"./GreasedLine/greasedLineMaterialDefaults\";\r\nexport * from \"./meshDebugPluginMaterial\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingMaterial\";\r\nexport * from \"./materialHelper.functions\";\r\nexport * from \"./materialHelper.geometryrendering\";\r\nexport * from \"./materialStencilState\";\r\nexport * from \"./uv.defines\";\r\nexport * from \"./floatingOriginMatrixOverrides\";\r\nexport * from \"./vertexPullingHelper.functions\";\r\nimport \"./material.decalMap\";\r\n\r\n// async-loaded shaders\r\n\r\n// StandardMaterial\r\nexport * from \"../Shaders/default.fragment\";\r\nexport * from \"../Shaders/default.vertex\";\r\nexport * from \"../ShadersWGSL/default.fragment\";\r\nexport * from \"../ShadersWGSL/default.vertex\";\r\n\r\n// GreasedLineSimplMaterial\r\nexport * from \"../Shaders/greasedLine.fragment\";\r\nexport * from \"../Shaders/greasedLine.vertex\";\r\nexport * from \"../ShadersWGSL/greasedLine.fragment\";\r\nexport * from \"../ShadersWGSL/greasedLine.vertex\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+DAA+D,CAAC;AAC9E,cAAc,+DAA+D,CAAC;AAC9E,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,OAAO,qBAAqB,CAAC;AAE7B,uBAAuB;AAEvB,mBAAmB;AACnB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,2BAA2B;AAC3B,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./Background/index\";\r\nexport * from \"./colorCurves\";\r\nexport * from \"./iEffectFallbacks\";\r\nexport * from \"./effectFallbacks\";\r\nexport * from \"./effect\";\r\nexport * from \"./fresnelParameters\";\r\nexport * from \"./imageProcessing\";\r\nexport * from \"./imageProcessingConfiguration\";\r\nexport * from \"./material\";\r\nexport * from \"./materialDefines\";\r\nexport * from \"./clipPlaneMaterialHelper\";\r\nexport * from \"./materialHelper\";\r\nexport * from \"./multiMaterial\";\r\nexport * from \"./Occlusion/index\";\r\nexport * from \"./PBR/index\";\r\nexport * from \"./pushMaterial\";\r\nexport * from \"./shaderLanguage\";\r\nexport * from \"./shaderMaterial\";\r\nexport * from \"./standardMaterial\";\r\nexport * from \"./Textures/index\";\r\nexport * from \"./uniformBuffer\";\r\nexport * from \"./materialFlags\";\r\nexport * from \"./Node/index\";\r\nexport * from \"./effectRenderer\";\r\nexport * from \"./shadowDepthWrapper\";\r\nexport * from \"./drawWrapper.functions\";\r\nexport * from \"./drawWrapper\";\r\nexport * from \"./materialPluginBase\";\r\nexport * from \"./materialPluginManager\";\r\nexport * from \"./materialPluginEvent\";\r\nexport * from \"./material.detailMapConfiguration\";\r\nexport * from \"./material.decalMapConfiguration\";\r\nexport * from \"./materialPluginFactoryExport\";\r\nexport * from \"./GreasedLine/greasedLinePluginMaterial\";\r\nexport * from \"./GreasedLine/greasedLineSimpleMaterial\";\r\nexport * from \"./GreasedLine/greasedLineMaterialInterfaces\";\r\nexport * from \"./GreasedLine/greasedLineMaterialDefaults\";\r\nexport * from \"./meshDebugPluginMaterial\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingMaterial\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin\";\r\nexport * from \"./materialHelper.functions\";\r\nexport * from \"./materialHelper.geometryrendering\";\r\nexport * from \"./materialStencilState\";\r\nexport * from \"./uv.defines\";\r\nexport * from \"./floatingOriginMatrixOverrides\";\r\nexport * from \"./vertexPullingHelper.functions\";\r\nimport \"./material.decalMap\";\r\n\r\n// async-loaded shaders\r\n\r\n// StandardMaterial\r\nexport * from \"../Shaders/default.fragment\";\r\nexport * from \"../Shaders/default.vertex\";\r\nexport * from \"../ShadersWGSL/default.fragment\";\r\nexport * from \"../ShadersWGSL/default.vertex\";\r\n\r\n// GreasedLineSimplMaterial\r\nexport * from \"../Shaders/greasedLine.fragment\";\r\nexport * from \"../Shaders/greasedLine.vertex\";\r\nexport * from \"../ShadersWGSL/greasedLine.fragment\";\r\nexport * from \"../ShadersWGSL/greasedLine.vertex\";\r\n"]}
@@ -12,6 +12,7 @@ export declare const ToLinearSpace = 2.2;
12
12
  export declare const PHI: number;
13
13
  /**
14
14
  * Constant used to define the minimal number value in Babylon.js
15
+ * Exported as "let" so advanced users can override the epsilon value in supported build targets (for example via the global BABYLON.Epsilon)
15
16
  * @ignorenaming
16
17
  */
17
- export declare const Epsilon = 0.001;
18
+ export declare let Epsilon: number;
@@ -15,8 +15,9 @@ export const ToLinearSpace = 2.2;
15
15
  export const PHI = (1 + Math.sqrt(5)) / 2;
16
16
  /**
17
17
  * Constant used to define the minimal number value in Babylon.js
18
+ * Exported as "let" so advanced users can override the epsilon value in supported build targets (for example via the global BABYLON.Epsilon)
18
19
  * @ignorenaming
19
20
  */
20
- // eslint-disable-next-line @typescript-eslint/naming-convention
21
- export const Epsilon = 0.001;
21
+ // eslint-disable-next-line @typescript-eslint/naming-convention, prefer-const
22
+ export let Epsilon = 0.001;
22
23
  //# sourceMappingURL=math.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"math.constants.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,GAAG,CAAC;AAEpC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAE1C;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,CAAC","sourcesContent":["/**\r\n * Constant used to convert a value to gamma space\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const ToGammaSpace = 1 / 2.2;\r\n\r\n/**\r\n * Constant used to convert a value to linear space\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const ToLinearSpace = 2.2;\r\n\r\n/**\r\n * Constant Golden Ratio value in Babylon.js\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const PHI = (1 + Math.sqrt(5)) / 2;\r\n\r\n/**\r\n * Constant used to define the minimal number value in Babylon.js\r\n * @ignorenaming\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const Epsilon = 0.001;\r\n"]}
1
+ {"version":3,"file":"math.constants.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,GAAG,CAAC;AAEpC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AAEjC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAE1C;;;;GAIG;AACH,8EAA8E;AAC9E,MAAM,CAAC,IAAI,OAAO,GAAG,KAAK,CAAC","sourcesContent":["/**\r\n * Constant used to convert a value to gamma space\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const ToGammaSpace = 1 / 2.2;\r\n\r\n/**\r\n * Constant used to convert a value to linear space\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const ToLinearSpace = 2.2;\r\n\r\n/**\r\n * Constant Golden Ratio value in Babylon.js\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const PHI = (1 + Math.sqrt(5)) / 2;\r\n\r\n/**\r\n * Constant used to define the minimal number value in Babylon.js\r\n * Exported as \"let\" so advanced users can override the epsilon value in supported build targets (for example via the global BABYLON.Epsilon)\r\n * @ignorenaming\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention, prefer-const\r\nexport let Epsilon = 0.001;\r\n"]}
@@ -4,7 +4,7 @@ import { VertexData } from "../mesh.vertexData.js";
4
4
  import { Matrix, TmpVectors, Vector2, Vector3 } from "../../Maths/math.vector.js";
5
5
  import { Quaternion } from "../../Maths/math.vector.js";
6
6
  import { Logger } from "../../Misc/logger.js";
7
- import { GaussianSplattingMaterial } from "../../Materials/GaussianSplatting/gaussianSplattingMaterial.js";
7
+ import { GaussianSplattingMaterial, GaussianSplattingMaxPartCount } from "../../Materials/GaussianSplatting/gaussianSplattingMaterial.js";
8
8
  import { RawTexture } from "../../Materials/Textures/rawTexture.js";
9
9
 
10
10
  import "../thinInstanceMesh.js";
@@ -554,7 +554,20 @@ export class GaussianSplattingMesh extends Mesh {
554
554
  }
555
555
  const mesh = cameraViewInfos.mesh;
556
556
  mesh.getWorldMatrix().copyFrom(this.getWorldMatrix());
557
+ // Propagate render pass material overrides (e.g., GPU picking) to the inner camera mesh.
558
+ // When this mesh is rendered into a RenderTargetTexture with a material override (via setMaterialForRendering),
559
+ // the override is set on this proxy mesh but needs to be applied to the actual camera mesh that does the rendering.
560
+ const engine = this._scene.getEngine();
561
+ const renderPassId = engine.currentRenderPassId;
562
+ const renderPassMaterial = this.getMaterialForRenderPass(renderPassId);
563
+ if (renderPassMaterial) {
564
+ mesh.setMaterialForRenderPass(renderPassId, renderPassMaterial);
565
+ }
557
566
  const ret = mesh.render(subMesh, enableAlphaMode, effectiveMeshReplacement);
567
+ // Clean up the temporary override to avoid affecting other render passes
568
+ if (renderPassMaterial) {
569
+ mesh.setMaterialForRenderPass(renderPassId, undefined);
570
+ }
558
571
  if (this.onAfterRenderObservable) {
559
572
  this.onAfterRenderObservable.notifyObservers(this);
560
573
  }
@@ -1785,6 +1798,9 @@ export class GaussianSplattingMesh extends Mesh {
1785
1798
  * @returns a placeholder mesh that can be used to manipulate the part transform
1786
1799
  */
1787
1800
  addPart(other, disposeOther = true) {
1801
+ if (this.partCount >= GaussianSplattingMaxPartCount) {
1802
+ throw new Error(`Cannot add part, as the maximum part count (${GaussianSplattingMaxPartCount}) has been reached`);
1803
+ }
1788
1804
  const splatCountA = this._vertexCount;
1789
1805
  const splatsDataA = splatCountA == 0 ? new ArrayBuffer(0) : this.splatsData;
1790
1806
  const shDataA = this.shData;