@babylonjs/viewer 7.41.1 → 7.42.0-alpha

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 (619) hide show
  1. package/assets/photoStudio.env +0 -0
  2. package/dist/babylon-viewer.esm.js +2 -0
  3. package/dist/babylon-viewer.esm.js.map +1 -0
  4. package/dist/babylon-viewer.esm.min.js +2 -0
  5. package/dist/babylon-viewer.esm.min.js.map +1 -0
  6. package/dist/chunks/EXT_lights_ies-BHDD74jk.esm.min.js +2 -0
  7. package/dist/chunks/EXT_lights_ies-BHDD74jk.esm.min.js.map +1 -0
  8. package/dist/chunks/EXT_lights_ies-CJfRNbJm.esm.js +84 -0
  9. package/dist/chunks/EXT_lights_ies-CJfRNbJm.esm.js.map +1 -0
  10. package/dist/chunks/EXT_lights_image_based-B460Sv95.esm.min.js +2 -0
  11. package/dist/chunks/EXT_lights_image_based-B460Sv95.esm.min.js.map +1 -0
  12. package/dist/chunks/EXT_lights_image_based-CQ6UCahL.esm.js +171 -0
  13. package/dist/chunks/EXT_lights_image_based-CQ6UCahL.esm.js.map +1 -0
  14. package/dist/chunks/EXT_mesh_gpu_instancing-D77OfiDS.esm.js +86 -0
  15. package/dist/chunks/EXT_mesh_gpu_instancing-D77OfiDS.esm.js.map +1 -0
  16. package/dist/chunks/EXT_mesh_gpu_instancing-GMG29Y9J.esm.min.js +2 -0
  17. package/dist/chunks/EXT_mesh_gpu_instancing-GMG29Y9J.esm.min.js.map +1 -0
  18. package/dist/chunks/EXT_meshopt_compression-CniiOX0a.esm.js +134 -0
  19. package/dist/chunks/EXT_meshopt_compression-CniiOX0a.esm.js.map +1 -0
  20. package/dist/chunks/EXT_meshopt_compression-DCcKdizI.esm.min.js +2 -0
  21. package/dist/chunks/EXT_meshopt_compression-DCcKdizI.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_avif-By7mk6aS.esm.min.js +2 -0
  23. package/dist/chunks/EXT_texture_avif-By7mk6aS.esm.min.js.map +1 -0
  24. package/dist/chunks/EXT_texture_avif-DnaKno7b.esm.js +44 -0
  25. package/dist/chunks/EXT_texture_avif-DnaKno7b.esm.js.map +1 -0
  26. package/dist/chunks/EXT_texture_webp-Bm29ukIo.esm.js +43 -0
  27. package/dist/chunks/EXT_texture_webp-Bm29ukIo.esm.js.map +1 -0
  28. package/dist/chunks/EXT_texture_webp-DtSWYlAE.esm.min.js +2 -0
  29. package/dist/chunks/EXT_texture_webp-DtSWYlAE.esm.min.js.map +1 -0
  30. package/dist/chunks/ExtrasAsMetadata-BUO8J2zR.esm.js +64 -0
  31. package/dist/chunks/ExtrasAsMetadata-BUO8J2zR.esm.js.map +1 -0
  32. package/dist/chunks/ExtrasAsMetadata-mi3fn9sR.esm.min.js +2 -0
  33. package/dist/chunks/ExtrasAsMetadata-mi3fn9sR.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_animation_pointer-COeThtQe.esm.min.js +2 -0
  35. package/dist/chunks/KHR_animation_pointer-COeThtQe.esm.min.js.map +1 -0
  36. package/dist/chunks/KHR_animation_pointer-DXqgkZGB.esm.js +352 -0
  37. package/dist/chunks/KHR_animation_pointer-DXqgkZGB.esm.js.map +1 -0
  38. package/dist/chunks/KHR_draco_mesh_compression-Bh9XGNFd.esm.js +610 -0
  39. package/dist/chunks/KHR_draco_mesh_compression-Bh9XGNFd.esm.js.map +1 -0
  40. package/dist/chunks/KHR_draco_mesh_compression-DyU2KIa2.esm.min.js +2 -0
  41. package/dist/chunks/KHR_draco_mesh_compression-DyU2KIa2.esm.min.js.map +1 -0
  42. package/dist/chunks/KHR_interactivity-QP9zFX3U.esm.js +4033 -0
  43. package/dist/chunks/KHR_interactivity-QP9zFX3U.esm.js.map +1 -0
  44. package/dist/chunks/KHR_interactivity-_r7e7vwA.esm.min.js +2 -0
  45. package/dist/chunks/KHR_interactivity-_r7e7vwA.esm.min.js.map +1 -0
  46. package/dist/chunks/KHR_lights_punctual-DWGx9KlE.esm.js +581 -0
  47. package/dist/chunks/KHR_lights_punctual-DWGx9KlE.esm.js.map +1 -0
  48. package/dist/chunks/KHR_lights_punctual-cz3ulMW0.esm.min.js +2 -0
  49. package/dist/chunks/KHR_lights_punctual-cz3ulMW0.esm.min.js.map +1 -0
  50. package/dist/chunks/KHR_materials_anisotropy-BSvZxEnx.esm.js +65 -0
  51. package/dist/chunks/KHR_materials_anisotropy-BSvZxEnx.esm.js.map +1 -0
  52. package/dist/chunks/KHR_materials_anisotropy-CtKPvN_z.esm.min.js +2 -0
  53. package/dist/chunks/KHR_materials_anisotropy-CtKPvN_z.esm.min.js.map +1 -0
  54. package/dist/chunks/KHR_materials_clearcoat-BephgEiM.esm.min.js +2 -0
  55. package/dist/chunks/KHR_materials_clearcoat-BephgEiM.esm.min.js.map +1 -0
  56. package/dist/chunks/KHR_materials_clearcoat-C3QB9HNC.esm.js +96 -0
  57. package/dist/chunks/KHR_materials_clearcoat-C3QB9HNC.esm.js.map +1 -0
  58. package/dist/chunks/KHR_materials_diffuse_transmission-CZvfLdyF.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_diffuse_transmission-CZvfLdyF.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_diffuse_transmission-DuM5GD2L.esm.js +97 -0
  61. package/dist/chunks/KHR_materials_diffuse_transmission-DuM5GD2L.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_dispersion-0FtkqUmS.esm.js +62 -0
  63. package/dist/chunks/KHR_materials_dispersion-0FtkqUmS.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_dispersion-C7mAat5y.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_dispersion-C7mAat5y.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_emissive_strength-Bz2y9OnA.esm.js +55 -0
  67. package/dist/chunks/KHR_materials_emissive_strength-Bz2y9OnA.esm.js.map +1 -0
  68. package/dist/chunks/KHR_materials_emissive_strength-b7ZNj1HF.esm.min.js +2 -0
  69. package/dist/chunks/KHR_materials_emissive_strength-b7ZNj1HF.esm.min.js.map +1 -0
  70. package/dist/chunks/KHR_materials_ior-C5-JiuLs.esm.min.js +2 -0
  71. package/dist/chunks/KHR_materials_ior-C5-JiuLs.esm.min.js.map +1 -0
  72. package/dist/chunks/KHR_materials_ior-D1jjzmsp.esm.js +64 -0
  73. package/dist/chunks/KHR_materials_ior-D1jjzmsp.esm.js.map +1 -0
  74. package/dist/chunks/KHR_materials_iridescence-CChET9-W.esm.js +72 -0
  75. package/dist/chunks/KHR_materials_iridescence-CChET9-W.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_iridescence-hATfgETI.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_iridescence-hATfgETI.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B-HlmeqI.esm.js +81 -0
  79. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B-HlmeqI.esm.js.map +1 -0
  80. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_IaUmSJE.esm.min.js +2 -0
  81. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_IaUmSJE.esm.min.js.map +1 -0
  82. package/dist/chunks/KHR_materials_sheen-D2QD8uSC.esm.js +85 -0
  83. package/dist/chunks/KHR_materials_sheen-D2QD8uSC.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_sheen-cqxpRyXD.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_sheen-cqxpRyXD.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_specular-DnHIH9RX.esm.min.js +2 -0
  87. package/dist/chunks/KHR_materials_specular-DnHIH9RX.esm.min.js.map +1 -0
  88. package/dist/chunks/KHR_materials_specular-vwRXhXVF.esm.js +75 -0
  89. package/dist/chunks/KHR_materials_specular-vwRXhXVF.esm.js.map +1 -0
  90. package/dist/chunks/KHR_materials_transmission-D81TRCgt.esm.min.js +2 -0
  91. package/dist/chunks/KHR_materials_transmission-D81TRCgt.esm.min.js.map +1 -0
  92. package/dist/chunks/KHR_materials_transmission-nPX6lno-.esm.js +307 -0
  93. package/dist/chunks/KHR_materials_transmission-nPX6lno-.esm.js.map +1 -0
  94. package/dist/chunks/KHR_materials_unlit-CLSTXPsk.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_unlit-CLSTXPsk.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_unlit-pmQPq5qR.esm.js +74 -0
  97. package/dist/chunks/KHR_materials_unlit-pmQPq5qR.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_variants-C_XVH51a.esm.js +262 -0
  99. package/dist/chunks/KHR_materials_variants-C_XVH51a.esm.js.map +1 -0
  100. package/dist/chunks/KHR_materials_variants-Czo1ZM8r.esm.min.js +2 -0
  101. package/dist/chunks/KHR_materials_variants-Czo1ZM8r.esm.min.js.map +1 -0
  102. package/dist/chunks/KHR_materials_volume-BJVGGE1g.esm.min.js +2 -0
  103. package/dist/chunks/KHR_materials_volume-BJVGGE1g.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_materials_volume-C4EKOzF-.esm.js +87 -0
  105. package/dist/chunks/KHR_materials_volume-C4EKOzF-.esm.js.map +1 -0
  106. package/dist/chunks/KHR_mesh_quantization-CZIcA8DN.esm.min.js +2 -0
  107. package/dist/chunks/KHR_mesh_quantization-CZIcA8DN.esm.min.js.map +1 -0
  108. package/dist/chunks/KHR_mesh_quantization-DG9WNux6.esm.js +26 -0
  109. package/dist/chunks/KHR_mesh_quantization-DG9WNux6.esm.js.map +1 -0
  110. package/dist/chunks/KHR_node_hoverability-C1YMkQ95.esm.js +39 -0
  111. package/dist/chunks/KHR_node_hoverability-C1YMkQ95.esm.js.map +1 -0
  112. package/dist/chunks/KHR_node_hoverability-HxHiCdR9.esm.min.js +2 -0
  113. package/dist/chunks/KHR_node_hoverability-HxHiCdR9.esm.min.js.map +1 -0
  114. package/dist/chunks/KHR_node_visibility-C5tc6GOc.esm.js +46 -0
  115. package/dist/chunks/KHR_node_visibility-C5tc6GOc.esm.js.map +1 -0
  116. package/dist/chunks/KHR_node_visibility-CSqn8wRd.esm.min.js +2 -0
  117. package/dist/chunks/KHR_node_visibility-CSqn8wRd.esm.min.js.map +1 -0
  118. package/dist/chunks/KHR_texture_basisu-DA2FE-qb.esm.min.js +2 -0
  119. package/dist/chunks/KHR_texture_basisu-DA2FE-qb.esm.min.js.map +1 -0
  120. package/dist/chunks/KHR_texture_basisu-KtQL54P-.esm.js +43 -0
  121. package/dist/chunks/KHR_texture_basisu-KtQL54P-.esm.js.map +1 -0
  122. package/dist/chunks/KHR_texture_transform-Cb6Q41F3.esm.js +63 -0
  123. package/dist/chunks/KHR_texture_transform-Cb6Q41F3.esm.js.map +1 -0
  124. package/dist/chunks/KHR_texture_transform-GdBAq_uW.esm.min.js +2 -0
  125. package/dist/chunks/KHR_texture_transform-GdBAq_uW.esm.min.js.map +1 -0
  126. package/dist/chunks/KHR_xmp_json_ld-CD_mkZDv.esm.min.js +2 -0
  127. package/dist/chunks/KHR_xmp_json_ld-CD_mkZDv.esm.min.js.map +1 -0
  128. package/dist/chunks/KHR_xmp_json_ld-f1rcQfsd.esm.js +51 -0
  129. package/dist/chunks/KHR_xmp_json_ld-f1rcQfsd.esm.js.map +1 -0
  130. package/dist/chunks/MSFT_audio_emitter-BU83EIcP.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_audio_emitter-BU83EIcP.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_audio_emitter-ClwdeJaR.esm.js +2201 -0
  133. package/dist/chunks/MSFT_audio_emitter-ClwdeJaR.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_lod-D3MQWFc3.esm.min.js +2 -0
  135. package/dist/chunks/MSFT_lod-D3MQWFc3.esm.min.js.map +1 -0
  136. package/dist/chunks/MSFT_lod-DkM5iXcm.esm.js +337 -0
  137. package/dist/chunks/MSFT_lod-DkM5iXcm.esm.js.map +1 -0
  138. package/dist/chunks/MSFT_minecraftMesh-CG9JY5Ic.esm.min.js +2 -0
  139. package/dist/chunks/MSFT_minecraftMesh-CG9JY5Ic.esm.min.js.map +1 -0
  140. package/dist/chunks/MSFT_minecraftMesh-Cyjdx_Y_.esm.js +46 -0
  141. package/dist/chunks/MSFT_minecraftMesh-Cyjdx_Y_.esm.js.map +1 -0
  142. package/dist/chunks/MSFT_sRGBFactors-Bm3_fRmt.esm.min.js +2 -0
  143. package/dist/chunks/MSFT_sRGBFactors-Bm3_fRmt.esm.min.js.map +1 -0
  144. package/dist/chunks/MSFT_sRGBFactors-uFdNij-4.esm.js +47 -0
  145. package/dist/chunks/MSFT_sRGBFactors-uFdNij-4.esm.js.map +1 -0
  146. package/dist/chunks/animationGroup-CravGs2P.esm.min.js +2 -0
  147. package/dist/chunks/animationGroup-CravGs2P.esm.min.js.map +1 -0
  148. package/dist/chunks/animationGroup-DqmFa1Nk.esm.js +2482 -0
  149. package/dist/chunks/animationGroup-DqmFa1Nk.esm.js.map +1 -0
  150. package/dist/chunks/assetContainer-0Qu2XIWb.esm.js +1720 -0
  151. package/dist/chunks/assetContainer-0Qu2XIWb.esm.js.map +1 -0
  152. package/dist/chunks/assetContainer-CMuD-n3X.esm.min.js +2 -0
  153. package/dist/chunks/assetContainer-CMuD-n3X.esm.min.js.map +1 -0
  154. package/dist/chunks/audioEngine--EMyAh-L.esm.js +305 -0
  155. package/dist/chunks/audioEngine--EMyAh-L.esm.js.map +1 -0
  156. package/dist/chunks/audioEngine-3doZGQV6.esm.min.js +2 -0
  157. package/dist/chunks/audioEngine-3doZGQV6.esm.min.js.map +1 -0
  158. package/dist/chunks/bakedVertexAnimation-DgMI1D24.esm.min.js +2 -0
  159. package/dist/chunks/bakedVertexAnimation-DgMI1D24.esm.min.js.map +1 -0
  160. package/dist/chunks/bakedVertexAnimation-gQlUctpB.esm.js +114 -0
  161. package/dist/chunks/bakedVertexAnimation-gQlUctpB.esm.js.map +1 -0
  162. package/dist/chunks/basisTextureLoader-B0PY0ILM.esm.js +600 -0
  163. package/dist/chunks/basisTextureLoader-B0PY0ILM.esm.js.map +1 -0
  164. package/dist/chunks/basisTextureLoader-ES0mOtqQ.esm.min.js +2 -0
  165. package/dist/chunks/basisTextureLoader-ES0mOtqQ.esm.min.js.map +1 -0
  166. package/dist/chunks/dds-DEZD6DKL.esm.min.js +2 -0
  167. package/dist/chunks/dds-DEZD6DKL.esm.min.js.map +1 -0
  168. package/dist/chunks/dds-HwVEMga8.esm.js +540 -0
  169. package/dist/chunks/dds-HwVEMga8.esm.js.map +1 -0
  170. package/dist/chunks/ddsTextureLoader-3PDKukdG.esm.js +88 -0
  171. package/dist/chunks/ddsTextureLoader-3PDKukdG.esm.js.map +1 -0
  172. package/dist/chunks/ddsTextureLoader-C62DqYdE.esm.min.js +2 -0
  173. package/dist/chunks/ddsTextureLoader-C62DqYdE.esm.min.js.map +1 -0
  174. package/dist/chunks/decalFragment-B9KsZn_u.esm.min.js +2 -0
  175. package/dist/chunks/decalFragment-B9KsZn_u.esm.min.js.map +1 -0
  176. package/dist/chunks/decalFragment-CNA1EQK9.esm.js +18 -0
  177. package/dist/chunks/decalFragment-CNA1EQK9.esm.js.map +1 -0
  178. package/dist/chunks/default.fragment-BsajFq2Q.esm.js +446 -0
  179. package/dist/chunks/default.fragment-BsajFq2Q.esm.js.map +1 -0
  180. package/dist/chunks/default.fragment-C7O2NjXo.esm.min.js +2 -0
  181. package/dist/chunks/default.fragment-C7O2NjXo.esm.min.js.map +1 -0
  182. package/dist/chunks/default.fragment-CNef5Xlg.esm.min.js +2 -0
  183. package/dist/chunks/default.fragment-CNef5Xlg.esm.min.js.map +1 -0
  184. package/dist/chunks/default.fragment-DAO0SBl-.esm.js +515 -0
  185. package/dist/chunks/default.fragment-DAO0SBl-.esm.js.map +1 -0
  186. package/dist/chunks/default.vertex-Ban5pFUb.esm.js +211 -0
  187. package/dist/chunks/default.vertex-Ban5pFUb.esm.js.map +1 -0
  188. package/dist/chunks/default.vertex-CPjp6YBQ.esm.min.js +2 -0
  189. package/dist/chunks/default.vertex-CPjp6YBQ.esm.min.js.map +1 -0
  190. package/dist/chunks/default.vertex-CemfGK4Y.esm.min.js +2 -0
  191. package/dist/chunks/default.vertex-CemfGK4Y.esm.min.js.map +1 -0
  192. package/dist/chunks/default.vertex-QE4cV7Y2.esm.js +190 -0
  193. package/dist/chunks/default.vertex-QE4cV7Y2.esm.js.map +1 -0
  194. package/dist/chunks/defaultUboDeclaration-B5nIsoCQ.esm.min.js +2 -0
  195. package/dist/chunks/defaultUboDeclaration-B5nIsoCQ.esm.min.js.map +1 -0
  196. package/dist/chunks/defaultUboDeclaration-B8tY8ajW.esm.js +15 -0
  197. package/dist/chunks/defaultUboDeclaration-B8tY8ajW.esm.js.map +1 -0
  198. package/dist/chunks/defaultUboDeclaration-D7yr1BRw.esm.js +13 -0
  199. package/dist/chunks/defaultUboDeclaration-D7yr1BRw.esm.js.map +1 -0
  200. package/dist/chunks/defaultUboDeclaration-Db_EQWlv.esm.min.js +2 -0
  201. package/dist/chunks/defaultUboDeclaration-Db_EQWlv.esm.min.js.map +1 -0
  202. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  203. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  204. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  205. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  206. package/dist/chunks/dumpTools-C13JzZr_.esm.min.js +2 -0
  207. package/dist/chunks/dumpTools-C13JzZr_.esm.min.js.map +1 -0
  208. package/dist/chunks/dumpTools-D6BRv6Ws.esm.js +200 -0
  209. package/dist/chunks/dumpTools-D6BRv6Ws.esm.js.map +1 -0
  210. package/dist/chunks/engine-29lBc-mw.esm.min.js +2 -0
  211. package/dist/chunks/engine-29lBc-mw.esm.min.js.map +1 -0
  212. package/dist/chunks/engine-Bk6S663t.esm.js +2213 -0
  213. package/dist/chunks/engine-Bk6S663t.esm.js.map +1 -0
  214. package/dist/chunks/engine.common-D_DOB0rT.esm.js +1162 -0
  215. package/dist/chunks/engine.common-D_DOB0rT.esm.js.map +1 -0
  216. package/dist/chunks/engine.common-OpqDqcE2.esm.min.js +2 -0
  217. package/dist/chunks/engine.common-OpqDqcE2.esm.min.js.map +1 -0
  218. package/dist/chunks/envTextureLoader-DS13pG9w.esm.js +64 -0
  219. package/dist/chunks/envTextureLoader-DS13pG9w.esm.js.map +1 -0
  220. package/dist/chunks/envTextureLoader-Dt6q0XDu.esm.min.js +2 -0
  221. package/dist/chunks/envTextureLoader-Dt6q0XDu.esm.min.js.map +1 -0
  222. package/dist/chunks/environmentTextureTools-DKN-Hd8c.esm.min.js +2 -0
  223. package/dist/chunks/environmentTextureTools-DKN-Hd8c.esm.min.js.map +1 -0
  224. package/dist/chunks/environmentTextureTools-DWkvV21A.esm.js +382 -0
  225. package/dist/chunks/environmentTextureTools-DWkvV21A.esm.js.map +1 -0
  226. package/dist/chunks/exrTextureLoader-6o4jfUaF.esm.js +1683 -0
  227. package/dist/chunks/exrTextureLoader-6o4jfUaF.esm.js.map +1 -0
  228. package/dist/chunks/exrTextureLoader-CXV9O3pZ.esm.min.js +2 -0
  229. package/dist/chunks/exrTextureLoader-CXV9O3pZ.esm.min.js.map +1 -0
  230. package/dist/chunks/fogFragment-BdOtsPe3.esm.js +102 -0
  231. package/dist/chunks/fogFragment-BdOtsPe3.esm.js.map +1 -0
  232. package/dist/chunks/fogFragment-Cv3Bqrrg.esm.js +101 -0
  233. package/dist/chunks/fogFragment-Cv3Bqrrg.esm.js.map +1 -0
  234. package/dist/chunks/fogFragment-D91rqvp0.esm.min.js +2 -0
  235. package/dist/chunks/fogFragment-D91rqvp0.esm.min.js.map +1 -0
  236. package/dist/chunks/fogFragment-qdYpZbGA.esm.min.js +2 -0
  237. package/dist/chunks/fogFragment-qdYpZbGA.esm.min.js.map +1 -0
  238. package/dist/chunks/fresnelFunction-DBMK4K-2.esm.min.js +2 -0
  239. package/dist/chunks/fresnelFunction-DBMK4K-2.esm.min.js.map +1 -0
  240. package/dist/chunks/fresnelFunction-o5ZOc6C0.esm.js +12 -0
  241. package/dist/chunks/fresnelFunction-o5ZOc6C0.esm.js.map +1 -0
  242. package/dist/chunks/glTFLoader-Dj_JCgqJ.esm.min.js +2 -0
  243. package/dist/chunks/glTFLoader-Dj_JCgqJ.esm.min.js.map +1 -0
  244. package/dist/chunks/glTFLoader-DnWHbX53.esm.js +7693 -0
  245. package/dist/chunks/glTFLoader-DnWHbX53.esm.js.map +1 -0
  246. package/dist/chunks/glTFLoaderAnimation-A_WVS-lt.esm.min.js +2 -0
  247. package/dist/chunks/glTFLoaderAnimation-A_WVS-lt.esm.min.js.map +1 -0
  248. package/dist/chunks/glTFLoaderAnimation-C3gHlipY.esm.js +77 -0
  249. package/dist/chunks/glTFLoaderAnimation-C3gHlipY.esm.js.map +1 -0
  250. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  251. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  252. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  253. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  254. package/dist/chunks/harmonicsFunctions-91QStv6v.esm.min.js +2 -0
  255. package/dist/chunks/harmonicsFunctions-91QStv6v.esm.min.js.map +1 -0
  256. package/dist/chunks/harmonicsFunctions-DBJQNoSA.esm.min.js +2 -0
  257. package/dist/chunks/harmonicsFunctions-DBJQNoSA.esm.min.js.map +1 -0
  258. package/dist/chunks/harmonicsFunctions-DXdlMMN6.esm.js +34 -0
  259. package/dist/chunks/harmonicsFunctions-DXdlMMN6.esm.js.map +1 -0
  260. package/dist/chunks/harmonicsFunctions-VtAD6DeX.esm.js +35 -0
  261. package/dist/chunks/harmonicsFunctions-VtAD6DeX.esm.js.map +1 -0
  262. package/dist/chunks/hdrTextureLoader-CYtpPSzs.esm.js +253 -0
  263. package/dist/chunks/hdrTextureLoader-CYtpPSzs.esm.js.map +1 -0
  264. package/dist/chunks/hdrTextureLoader-CzZ1hV7q.esm.min.js +2 -0
  265. package/dist/chunks/hdrTextureLoader-CzZ1hV7q.esm.min.js.map +1 -0
  266. package/dist/chunks/helperFunctions-Bn3a_gzG.esm.js +110 -0
  267. package/dist/chunks/helperFunctions-Bn3a_gzG.esm.js.map +1 -0
  268. package/dist/chunks/helperFunctions-CA_QOVSE.esm.js +83 -0
  269. package/dist/chunks/helperFunctions-CA_QOVSE.esm.js.map +1 -0
  270. package/dist/chunks/helperFunctions-mebe29sq.esm.min.js +2 -0
  271. package/dist/chunks/helperFunctions-mebe29sq.esm.min.js.map +1 -0
  272. package/dist/chunks/helperFunctions-wIdfkMdZ.esm.min.js +2 -0
  273. package/dist/chunks/helperFunctions-wIdfkMdZ.esm.min.js.map +1 -0
  274. package/dist/chunks/iesTextureLoader-D8_bkaCP.esm.min.js +2 -0
  275. package/dist/chunks/iesTextureLoader-D8_bkaCP.esm.min.js.map +1 -0
  276. package/dist/chunks/iesTextureLoader-K1MQUalq.esm.js +189 -0
  277. package/dist/chunks/iesTextureLoader-K1MQUalq.esm.js.map +1 -0
  278. package/dist/chunks/index-Bo5F_mGk.esm.min.js +57 -0
  279. package/dist/chunks/index-Bo5F_mGk.esm.min.js.map +1 -0
  280. package/dist/chunks/index-Dlf001gP.esm.js +74889 -0
  281. package/dist/chunks/index-Dlf001gP.esm.js.map +1 -0
  282. package/dist/chunks/ktxTextureLoader-B6UHYOxL.esm.js +814 -0
  283. package/dist/chunks/ktxTextureLoader-B6UHYOxL.esm.js.map +1 -0
  284. package/dist/chunks/ktxTextureLoader-s_dbtiwN.esm.min.js +2 -0
  285. package/dist/chunks/ktxTextureLoader-s_dbtiwN.esm.min.js.map +1 -0
  286. package/dist/chunks/logDepthDeclaration--xmemf5p.esm.min.js +2 -0
  287. package/dist/chunks/logDepthDeclaration--xmemf5p.esm.min.js.map +1 -0
  288. package/dist/chunks/logDepthDeclaration-Babs-3_m.esm.js +35 -0
  289. package/dist/chunks/logDepthDeclaration-Babs-3_m.esm.js.map +1 -0
  290. package/dist/chunks/logDepthDeclaration-BvoznvSG.esm.min.js +2 -0
  291. package/dist/chunks/logDepthDeclaration-BvoznvSG.esm.min.js.map +1 -0
  292. package/dist/chunks/logDepthDeclaration-_EPT9ybx.esm.js +11 -0
  293. package/dist/chunks/logDepthDeclaration-_EPT9ybx.esm.js.map +1 -0
  294. package/dist/chunks/logDepthVertex-0vve_qKh.esm.js +77 -0
  295. package/dist/chunks/logDepthVertex-0vve_qKh.esm.js.map +1 -0
  296. package/dist/chunks/logDepthVertex-BkGmO8_s.esm.js +81 -0
  297. package/dist/chunks/logDepthVertex-BkGmO8_s.esm.js.map +1 -0
  298. package/dist/chunks/logDepthVertex-CVcNpHQe.esm.min.js +2 -0
  299. package/dist/chunks/logDepthVertex-CVcNpHQe.esm.min.js.map +1 -0
  300. package/dist/chunks/logDepthVertex-DL8eWalk.esm.min.js +2 -0
  301. package/dist/chunks/logDepthVertex-DL8eWalk.esm.min.js.map +1 -0
  302. package/dist/chunks/mainUVVaryingDeclaration-9DUO7sPf.esm.js +11 -0
  303. package/dist/chunks/mainUVVaryingDeclaration-9DUO7sPf.esm.js.map +1 -0
  304. package/dist/chunks/mainUVVaryingDeclaration-DXZGPs7O.esm.js +11 -0
  305. package/dist/chunks/mainUVVaryingDeclaration-DXZGPs7O.esm.js.map +1 -0
  306. package/dist/chunks/mainUVVaryingDeclaration-DaFtbg5X.esm.min.js +2 -0
  307. package/dist/chunks/mainUVVaryingDeclaration-DaFtbg5X.esm.min.js.map +1 -0
  308. package/dist/chunks/mainUVVaryingDeclaration-lKBcMFcP.esm.min.js +2 -0
  309. package/dist/chunks/mainUVVaryingDeclaration-lKBcMFcP.esm.min.js.map +1 -0
  310. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +119 -0
  311. package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +1 -0
  312. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +2 -0
  313. package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +1 -0
  314. package/dist/chunks/meshUboDeclaration-BN0BlYEZ.esm.js +26 -0
  315. package/dist/chunks/meshUboDeclaration-BN0BlYEZ.esm.js.map +1 -0
  316. package/dist/chunks/meshUboDeclaration-BcQ1P_co.esm.min.js +2 -0
  317. package/dist/chunks/meshUboDeclaration-BcQ1P_co.esm.min.js.map +1 -0
  318. package/dist/chunks/objFileLoader-Lx7JtYFA.esm.min.js +2 -0
  319. package/dist/chunks/objFileLoader-Lx7JtYFA.esm.min.js.map +1 -0
  320. package/dist/chunks/objFileLoader-_nxEPYB4.esm.js +1338 -0
  321. package/dist/chunks/objFileLoader-_nxEPYB4.esm.js.map +1 -0
  322. package/dist/chunks/oitFragment-BPgREULe.esm.js +1240 -0
  323. package/dist/chunks/oitFragment-BPgREULe.esm.js.map +1 -0
  324. package/dist/chunks/oitFragment-CKNxTV0T.esm.min.js +2 -0
  325. package/dist/chunks/oitFragment-CKNxTV0T.esm.min.js.map +1 -0
  326. package/dist/chunks/oitFragment-CT3oWGRL.esm.js +1078 -0
  327. package/dist/chunks/oitFragment-CT3oWGRL.esm.js.map +1 -0
  328. package/dist/chunks/oitFragment-CXrV_64a.esm.min.js +2 -0
  329. package/dist/chunks/oitFragment-CXrV_64a.esm.min.js.map +1 -0
  330. package/dist/chunks/pass.fragment-BugqjVKo.esm.js +15 -0
  331. package/dist/chunks/pass.fragment-BugqjVKo.esm.js.map +1 -0
  332. package/dist/chunks/pass.fragment-X-KK3tOa.esm.min.js +2 -0
  333. package/dist/chunks/pass.fragment-X-KK3tOa.esm.min.js.map +1 -0
  334. package/dist/chunks/pass.fragment-pJ1J3AeO.esm.min.js +2 -0
  335. package/dist/chunks/pass.fragment-pJ1J3AeO.esm.min.js.map +1 -0
  336. package/dist/chunks/pass.fragment-tk9KCmM-.esm.js +15 -0
  337. package/dist/chunks/pass.fragment-tk9KCmM-.esm.js.map +1 -0
  338. package/dist/chunks/pbr.fragment-C4BFWzEP.esm.js +3269 -0
  339. package/dist/chunks/pbr.fragment-C4BFWzEP.esm.js.map +1 -0
  340. package/dist/chunks/pbr.fragment-CTE0zFNb.esm.min.js +2 -0
  341. package/dist/chunks/pbr.fragment-CTE0zFNb.esm.min.js.map +1 -0
  342. package/dist/chunks/pbr.fragment-DZRIiJzv.esm.js +3222 -0
  343. package/dist/chunks/pbr.fragment-DZRIiJzv.esm.js.map +1 -0
  344. package/dist/chunks/pbr.fragment-Dk1kkP87.esm.min.js +2 -0
  345. package/dist/chunks/pbr.fragment-Dk1kkP87.esm.min.js.map +1 -0
  346. package/dist/chunks/pbr.vertex-Ba8BDEep.esm.min.js +2 -0
  347. package/dist/chunks/pbr.vertex-Ba8BDEep.esm.min.js.map +1 -0
  348. package/dist/chunks/pbr.vertex-DM2WONhK.esm.js +223 -0
  349. package/dist/chunks/pbr.vertex-DM2WONhK.esm.js.map +1 -0
  350. package/dist/chunks/pbr.vertex-DVghYyb7.esm.min.js +2 -0
  351. package/dist/chunks/pbr.vertex-DVghYyb7.esm.min.js.map +1 -0
  352. package/dist/chunks/pbr.vertex-DiVjR6Bs.esm.js +348 -0
  353. package/dist/chunks/pbr.vertex-DiVjR6Bs.esm.js.map +1 -0
  354. package/dist/chunks/postprocess.vertex-CtVD6qfW.esm.min.js +2 -0
  355. package/dist/chunks/postprocess.vertex-CtVD6qfW.esm.min.js.map +1 -0
  356. package/dist/chunks/postprocess.vertex-DntzOpKV.esm.js +20 -0
  357. package/dist/chunks/postprocess.vertex-DntzOpKV.esm.js.map +1 -0
  358. package/dist/chunks/rawTexture-BAt5J3G4.esm.min.js +2 -0
  359. package/dist/chunks/rawTexture-BAt5J3G4.esm.min.js.map +1 -0
  360. package/dist/chunks/rawTexture-D0O_yrdQ.esm.js +191 -0
  361. package/dist/chunks/rawTexture-D0O_yrdQ.esm.js.map +1 -0
  362. package/dist/chunks/ray-Bbt37I0I.esm.js +946 -0
  363. package/dist/chunks/ray-Bbt37I0I.esm.js.map +1 -0
  364. package/dist/chunks/ray-OQ0d0a-k.esm.min.js +2 -0
  365. package/dist/chunks/ray-OQ0d0a-k.esm.min.js.map +1 -0
  366. package/dist/chunks/rgbdDecode.fragment-4HjKGwMm.esm.min.js +2 -0
  367. package/dist/chunks/rgbdDecode.fragment-4HjKGwMm.esm.min.js.map +1 -0
  368. package/dist/chunks/rgbdDecode.fragment-CKVGwRZO.esm.js +13 -0
  369. package/dist/chunks/rgbdDecode.fragment-CKVGwRZO.esm.js.map +1 -0
  370. package/dist/chunks/rgbdDecode.fragment-Cn6YVnkB.esm.js +13 -0
  371. package/dist/chunks/rgbdDecode.fragment-Cn6YVnkB.esm.js.map +1 -0
  372. package/dist/chunks/rgbdDecode.fragment-DwcDy8Eo.esm.min.js +2 -0
  373. package/dist/chunks/rgbdDecode.fragment-DwcDy8Eo.esm.min.js.map +1 -0
  374. package/dist/chunks/rgbdEncode.fragment-BUluDIqG.esm.min.js +2 -0
  375. package/dist/chunks/rgbdEncode.fragment-BUluDIqG.esm.min.js.map +1 -0
  376. package/dist/chunks/rgbdEncode.fragment-CEiZq0Qt.esm.js +13 -0
  377. package/dist/chunks/rgbdEncode.fragment-CEiZq0Qt.esm.js.map +1 -0
  378. package/dist/chunks/rgbdEncode.fragment-CY0yYtEl.esm.js +13 -0
  379. package/dist/chunks/rgbdEncode.fragment-CY0yYtEl.esm.js.map +1 -0
  380. package/dist/chunks/rgbdEncode.fragment-DS4_h_Qc.esm.min.js +2 -0
  381. package/dist/chunks/rgbdEncode.fragment-DS4_h_Qc.esm.min.js.map +1 -0
  382. package/dist/chunks/splatFileLoader-C9ykR2nU.esm.js +3387 -0
  383. package/dist/chunks/splatFileLoader-C9ykR2nU.esm.js.map +1 -0
  384. package/dist/chunks/splatFileLoader-fz6lXWf1.esm.min.js +2 -0
  385. package/dist/chunks/splatFileLoader-fz6lXWf1.esm.min.js.map +1 -0
  386. package/dist/chunks/spotLight-BJUVKiS1.esm.min.js +2 -0
  387. package/dist/chunks/spotLight-BJUVKiS1.esm.min.js.map +1 -0
  388. package/dist/chunks/spotLight-DPadbSE2.esm.js +701 -0
  389. package/dist/chunks/spotLight-DPadbSE2.esm.js.map +1 -0
  390. package/dist/chunks/standardMaterial-BFBsF3pv.esm.min.js +2 -0
  391. package/dist/chunks/standardMaterial-BFBsF3pv.esm.min.js.map +1 -0
  392. package/dist/chunks/standardMaterial-eJkfs5dX.esm.js +1807 -0
  393. package/dist/chunks/standardMaterial-eJkfs5dX.esm.js.map +1 -0
  394. package/dist/chunks/stlFileLoader-D-4wZdg7.esm.js +238 -0
  395. package/dist/chunks/stlFileLoader-D-4wZdg7.esm.js.map +1 -0
  396. package/dist/chunks/stlFileLoader-DFdDdaYW.esm.min.js +2 -0
  397. package/dist/chunks/stlFileLoader-DFdDdaYW.esm.min.js.map +1 -0
  398. package/dist/chunks/tgaTextureLoader-84Uwk9uE.esm.min.js +2 -0
  399. package/dist/chunks/tgaTextureLoader-84Uwk9uE.esm.min.js.map +1 -0
  400. package/dist/chunks/tgaTextureLoader-DDAxGDFK.esm.js +349 -0
  401. package/dist/chunks/tgaTextureLoader-DDAxGDFK.esm.js.map +1 -0
  402. package/dist/chunks/thinEngine-CiBi1yBe.esm.min.js +2 -0
  403. package/dist/chunks/thinEngine-CiBi1yBe.esm.min.js.map +1 -0
  404. package/dist/chunks/thinEngine-iDkoF96X.esm.js +3848 -0
  405. package/dist/chunks/thinEngine-iDkoF96X.esm.js.map +1 -0
  406. package/dist/chunks/thinInstanceMesh-DGBYkFXN.esm.js +314 -0
  407. package/dist/chunks/thinInstanceMesh-DGBYkFXN.esm.js.map +1 -0
  408. package/dist/chunks/thinInstanceMesh-MROq1d7v.esm.min.js +2 -0
  409. package/dist/chunks/thinInstanceMesh-MROq1d7v.esm.min.js.map +1 -0
  410. package/dist/chunks/vertexColorMixing-0VXbzCuF.esm.js +428 -0
  411. package/dist/chunks/vertexColorMixing-0VXbzCuF.esm.js.map +1 -0
  412. package/dist/chunks/vertexColorMixing-B3GD6hE2.esm.js +538 -0
  413. package/dist/chunks/vertexColorMixing-B3GD6hE2.esm.js.map +1 -0
  414. package/dist/chunks/vertexColorMixing-ClVYo-h9.esm.min.js +2 -0
  415. package/dist/chunks/vertexColorMixing-ClVYo-h9.esm.min.js.map +1 -0
  416. package/dist/chunks/vertexColorMixing-j0Dix_Wy.esm.min.js +2 -0
  417. package/dist/chunks/vertexColorMixing-j0Dix_Wy.esm.min.js.map +1 -0
  418. package/dist/chunks/webgpuEngine-BLhhEybd.esm.min.js +2 -0
  419. package/dist/chunks/webgpuEngine-BLhhEybd.esm.min.js.map +1 -0
  420. package/dist/chunks/webgpuEngine-Cs5fkngY.esm.js +11533 -0
  421. package/dist/chunks/webgpuEngine-Cs5fkngY.esm.js.map +1 -0
  422. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  423. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  424. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  425. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  426. package/lib/index.d.ts +591 -0
  427. package/lib/index.js +2165 -0
  428. package/lib/index.js.map +1 -0
  429. package/package.json +19 -28
  430. package/readme.md +28 -28
  431. package/configuration/configuration.d.ts +0 -107
  432. package/configuration/configuration.js +0 -16
  433. package/configuration/configuration.js.map +0 -1
  434. package/configuration/configurationCompatibility.d.ts +0 -8
  435. package/configuration/configurationCompatibility.js +0 -66
  436. package/configuration/configurationCompatibility.js.map +0 -1
  437. package/configuration/configurationContainer.d.ts +0 -10
  438. package/configuration/configurationContainer.js +0 -10
  439. package/configuration/configurationContainer.js.map +0 -1
  440. package/configuration/globals.d.ts +0 -6
  441. package/configuration/globals.js +0 -18
  442. package/configuration/globals.js.map +0 -1
  443. package/configuration/index.d.ts +0 -2
  444. package/configuration/index.js +0 -4
  445. package/configuration/index.js.map +0 -1
  446. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  447. package/configuration/interfaces/cameraConfiguration.js +0 -2
  448. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  449. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  450. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  451. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  452. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  453. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  454. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  455. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  456. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  457. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  458. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  459. package/configuration/interfaces/groundConfiguration.js +0 -2
  460. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  461. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  462. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  463. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  464. package/configuration/interfaces/index.d.ts +0 -15
  465. package/configuration/interfaces/index.js +0 -16
  466. package/configuration/interfaces/index.js.map +0 -1
  467. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  468. package/configuration/interfaces/lightConfiguration.js +0 -2
  469. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  470. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  471. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  472. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  473. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  474. package/configuration/interfaces/modelConfiguration.js +0 -2
  475. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  476. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  477. package/configuration/interfaces/observersConfiguration.js +0 -2
  478. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  479. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  480. package/configuration/interfaces/sceneConfiguration.js +0 -2
  481. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  482. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  483. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  484. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  485. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  486. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  487. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  488. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  489. package/configuration/interfaces/templateConfiguration.js +0 -2
  490. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  491. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  492. package/configuration/interfaces/vrConfiguration.js +0 -2
  493. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  494. package/configuration/loader.d.ts +0 -4
  495. package/configuration/loader.js +0 -17
  496. package/configuration/loader.js.map +0 -1
  497. package/configuration/mappers.d.ts +0 -43
  498. package/configuration/mappers.js +0 -193
  499. package/configuration/mappers.js.map +0 -1
  500. package/configuration/renderOnlyLoader.d.ts +0 -33
  501. package/configuration/renderOnlyLoader.js +0 -162
  502. package/configuration/renderOnlyLoader.js.map +0 -1
  503. package/configuration/types/default.d.ts +0 -6
  504. package/configuration/types/default.js +0 -121
  505. package/configuration/types/default.js.map +0 -1
  506. package/configuration/types/environmentMap.d.ts +0 -5
  507. package/configuration/types/environmentMap.js +0 -14
  508. package/configuration/types/environmentMap.js.map +0 -1
  509. package/configuration/types/extended.d.ts +0 -6
  510. package/configuration/types/extended.js +0 -317
  511. package/configuration/types/extended.js.map +0 -1
  512. package/configuration/types/index.d.ts +0 -14
  513. package/configuration/types/index.js +0 -51
  514. package/configuration/types/index.js.map +0 -1
  515. package/configuration/types/minimal.d.ts +0 -6
  516. package/configuration/types/minimal.js +0 -43
  517. package/configuration/types/minimal.js.map +0 -1
  518. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  519. package/configuration/types/renderOnlyDefault.js +0 -31
  520. package/configuration/types/renderOnlyDefault.js.map +0 -1
  521. package/configuration/types/shadowLight.d.ts +0 -9
  522. package/configuration/types/shadowLight.js +0 -64
  523. package/configuration/types/shadowLight.js.map +0 -1
  524. package/helper/index.d.ts +0 -29
  525. package/helper/index.js +0 -66
  526. package/helper/index.js.map +0 -1
  527. package/index.d.ts +0 -30
  528. package/index.js +0 -46
  529. package/index.js.map +0 -1
  530. package/initializer.d.ts +0 -11
  531. package/initializer.js +0 -35
  532. package/initializer.js.map +0 -1
  533. package/interfaces.d.ts +0 -5
  534. package/interfaces.js +0 -7
  535. package/interfaces.js.map +0 -1
  536. package/labs/environmentSerializer.d.ts +0 -126
  537. package/labs/environmentSerializer.js +0 -191
  538. package/labs/environmentSerializer.js.map +0 -1
  539. package/labs/texture.d.ts +0 -183
  540. package/labs/texture.js +0 -351
  541. package/labs/texture.js.map +0 -1
  542. package/labs/viewerLabs.d.ts +0 -51
  543. package/labs/viewerLabs.js +0 -134
  544. package/labs/viewerLabs.js.map +0 -1
  545. package/loader/modelLoader.d.ts +0 -56
  546. package/loader/modelLoader.js +0 -202
  547. package/loader/modelLoader.js.map +0 -1
  548. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  549. package/loader/plugins/applyMaterialConfig.js +0 -16
  550. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  551. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  552. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  553. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  554. package/loader/plugins/index.d.ts +0 -19
  555. package/loader/plugins/index.js +0 -44
  556. package/loader/plugins/index.js.map +0 -1
  557. package/loader/plugins/loaderPlugin.d.ts +0 -24
  558. package/loader/plugins/loaderPlugin.js +0 -2
  559. package/loader/plugins/loaderPlugin.js.map +0 -1
  560. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  561. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  562. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  563. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  564. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  565. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  566. package/managers/observablesManager.d.ts +0 -66
  567. package/managers/observablesManager.js +0 -35
  568. package/managers/observablesManager.js.map +0 -1
  569. package/managers/sceneManager.d.ts +0 -245
  570. package/managers/sceneManager.js +0 -1375
  571. package/managers/sceneManager.js.map +0 -1
  572. package/managers/telemetryManager.d.ts +0 -78
  573. package/managers/telemetryManager.js +0 -117
  574. package/managers/telemetryManager.js.map +0 -1
  575. package/model/modelAnimation.d.ts +0 -215
  576. package/model/modelAnimation.js +0 -237
  577. package/model/modelAnimation.js.map +0 -1
  578. package/model/viewerModel.d.ts +0 -233
  579. package/model/viewerModel.js +0 -673
  580. package/model/viewerModel.js.map +0 -1
  581. package/optimizer/custom/extended.d.ts +0 -13
  582. package/optimizer/custom/extended.js +0 -101
  583. package/optimizer/custom/extended.js.map +0 -1
  584. package/optimizer/custom/index.d.ts +0 -9
  585. package/optimizer/custom/index.js +0 -26
  586. package/optimizer/custom/index.js.map +0 -1
  587. package/renderOnlyIndex.d.ts +0 -11
  588. package/renderOnlyIndex.js +0 -18
  589. package/renderOnlyIndex.js.map +0 -1
  590. package/templating/eventManager.d.ts +0 -35
  591. package/templating/eventManager.js +0 -66
  592. package/templating/eventManager.js.map +0 -1
  593. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  594. package/templating/plugins/hdButtonPlugin.js +0 -22
  595. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  596. package/templating/plugins/printButton.d.ts +0 -9
  597. package/templating/plugins/printButton.js +0 -41
  598. package/templating/plugins/printButton.js.map +0 -1
  599. package/templating/templateManager.d.ts +0 -197
  600. package/templating/templateManager.js +0 -561
  601. package/templating/templateManager.js.map +0 -1
  602. package/templating/viewerTemplatePlugin.d.ts +0 -21
  603. package/templating/viewerTemplatePlugin.js +0 -69
  604. package/templating/viewerTemplatePlugin.js.map +0 -1
  605. package/viewer/defaultViewer.d.ts +0 -130
  606. package/viewer/defaultViewer.js +0 -672
  607. package/viewer/defaultViewer.js.map +0 -1
  608. package/viewer/renderOnlyViewer.d.ts +0 -9
  609. package/viewer/renderOnlyViewer.js +0 -46
  610. package/viewer/renderOnlyViewer.js.map +0 -1
  611. package/viewer/viewer.d.ts +0 -258
  612. package/viewer/viewer.js +0 -783
  613. package/viewer/viewer.js.map +0 -1
  614. package/viewer/viewerManager.d.ts +0 -58
  615. package/viewer/viewerManager.js +0 -91
  616. package/viewer/viewerManager.js.map +0 -1
  617. package/viewer/viewerWithTemplate.d.ts +0 -9
  618. package/viewer/viewerWithTemplate.js +0 -20
  619. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{i as e,R as t,z as s,J as n,K as r,N as i,Q as a,W as o,X as c,Y as l,Z as h,$ as u,a0 as d,a1 as p,a2 as _,V as x,a3 as f,a4 as m,M as v,a5 as g,v as y,x as S,a6 as T,a7 as E,L as w,a8 as C,T as A,a9 as P,C as z,aa as b,u as D,ab as M,m as I,ac as R,E as U,s as V,ad as B,ae as F,B as L,af as k,y as H}from"./index-Bo5F_mGk.esm.min.js";import"./fogFragment-D91rqvp0.esm.min.js";import"./logDepthDeclaration-BvoznvSG.esm.min.js";import"./logDepthVertex-CVcNpHQe.esm.min.js";import"./fogFragment-qdYpZbGA.esm.min.js";import"./logDepthDeclaration--xmemf5p.esm.min.js";import"./meshUboDeclaration-BcQ1P_co.esm.min.js";import"./logDepthVertex-DL8eWalk.esm.min.js";import{R as G}from"./rawTexture-BAt5J3G4.esm.min.js";import"./thinInstanceMesh-MROq1d7v.esm.min.js";import{A as N}from"./assetContainer-CMuD-n3X.esm.min.js";import{Ray as O}from"./ray-OQ0d0a-k.esm.min.js";import{S as W}from"./standardMaterial-BFBsF3pv.esm.min.js";e.IncludesShadersStore.gaussianSplattingFragmentDeclaration="vec4 gaussianColor(vec4 inColor)\n{float A=-dot(vPosition,vPosition);if (A<-4.0) discard;float B=exp(A)*inColor.a;\n#include<logDepthFragment>\nvec3 color=inColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\nreturn vec4(color,B);}\n";const X="gaussianSplattingPixelShader",Z="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplattingFragmentDeclaration>\nvoid main () { \n#include<clipPlaneFragment>\ngl_FragColor=gaussianColor(vColor);}\n";e.ShadersStore[X]=Z;const j={name:X,shader:Z};var Y=Object.freeze({__proto__:null,gaussianSplattingPixelShader:j});e.IncludesShadersStore.gaussianSplattingVertexDeclaration="attribute vec2 position;uniform mat4 view;uniform mat4 projection;uniform mat4 world;uniform vec4 vEyePosition;";e.IncludesShadersStore.gaussianSplattingUboDeclaration="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nattribute vec2 position;";e.IncludesShadersStore.gaussianSplatting="#if !defined(WEBGL2) && !defined(WEBGPU) && !defined(NATIVE)\nmat3 transpose(mat3 matrix) {return mat3(matrix[0][0],matrix[1][0],matrix[2][0],\nmatrix[0][1],matrix[1][1],matrix[2][1],\nmatrix[0][2],matrix[1][2],matrix[2][2]);}\n#endif\nvec2 getDataUV(float index,vec2 textureSize) {float y=floor(index/textureSize.x);float x=index-y*textureSize.x;return vec2((x+0.5)/textureSize.x,(y+0.5)/textureSize.y);}\n#if SH_DEGREE>0\nivec2 getDataUVint(float index,vec2 textureSize) {float y=floor(index/textureSize.x);float x=index-y*textureSize.x;return ivec2(uint(x+0.5),uint(y+0.5));}\n#endif\nstruct Splat {vec4 center;vec4 color;vec4 covA;vec4 covB;\n#if SH_DEGREE>0\nuvec4 sh0; \n#endif\n#if SH_DEGREE>1\nuvec4 sh1;\n#endif\n#if SH_DEGREE>2\nuvec4 sh2;\n#endif\n};Splat readSplat(float splatIndex)\n{Splat splat;vec2 splatUV=getDataUV(splatIndex,dataTextureSize);splat.center=texture2D(centersTexture,splatUV);splat.color=texture2D(colorsTexture,splatUV);splat.covA=texture2D(covariancesATexture,splatUV)*splat.center.w;splat.covB=texture2D(covariancesBTexture,splatUV)*splat.center.w;\n#if SH_DEGREE>0\nivec2 splatUVint=getDataUVint(splatIndex,dataTextureSize);splat.sh0=texelFetch(shTexture0,splatUVint,0);\n#endif\n#if SH_DEGREE>1\nsplat.sh1=texelFetch(shTexture1,splatUVint,0);\n#endif\n#if SH_DEGREE>2\nsplat.sh2=texelFetch(shTexture2,splatUVint,0);\n#endif\nreturn splat;}\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nvec3 computeColorFromSHDegree(vec3 dir,const vec3 sh[16])\n{const float SH_C0=0.28209479;const float SH_C1=0.48860251;float SH_C2[5];SH_C2[0]=1.092548430;SH_C2[1]=-1.09254843;SH_C2[2]=0.315391565;SH_C2[3]=-1.09254843;SH_C2[4]=0.546274215;float SH_C3[7];SH_C3[0]=-0.59004358;SH_C3[1]=2.890611442;SH_C3[2]=-0.45704579;SH_C3[3]=0.373176332;SH_C3[4]=-0.45704579;SH_C3[5]=1.445305721;SH_C3[6]=-0.59004358;vec3 result=/*SH_C0**/sh[0];\n#if SH_DEGREE>0\nfloat x=dir.x;float y=dir.y;float z=dir.z;result+=- SH_C1*y*sh[1]+SH_C1*z*sh[2]-SH_C1*x*sh[3];\n#if SH_DEGREE>1\nfloat xx=x*x,yy=y*y,zz=z*z;float xy=x*y,yz=y*z,xz=x*z;result+=\nSH_C2[0]*xy*sh[4] +\nSH_C2[1]*yz*sh[5] +\nSH_C2[2]*(2.0f*zz-xx-yy)*sh[6] +\nSH_C2[3]*xz*sh[7] +\nSH_C2[4]*(xx-yy)*sh[8];\n#if SH_DEGREE>2\nresult+=\nSH_C3[0]*y*(3.0f*xx-yy)*sh[9] +\nSH_C3[1]*xy*z*sh[10] +\nSH_C3[2]*y*(4.0f*zz-xx-yy)*sh[11] +\nSH_C3[3]*z*(2.0f*zz-3.0f*xx-3.0f*yy)*sh[12] +\nSH_C3[4]*x*(4.0f*zz-xx-yy)*sh[13] +\nSH_C3[5]*z*(xx-yy)*sh[14] +\nSH_C3[6]*x*(xx-3.0f*yy)*sh[15];\n#endif\n#endif\n#endif\nreturn result;}\nvec4 decompose(uint value)\n{vec4 components=vec4(\nfloat((value ) & 255u),\nfloat((value>>uint( 8)) & 255u),\nfloat((value>>uint(16)) & 255u),\nfloat((value>>uint(24)) & 255u));return components*vec4(2./255.)-vec4(1.);}\nvec3 computeSH(Splat splat,vec3 color,vec3 dir)\n{vec3 sh[16];sh[0]=color;\n#if SH_DEGREE>0\nvec4 sh00=decompose(splat.sh0.x);vec4 sh01=decompose(splat.sh0.y);vec4 sh02=decompose(splat.sh0.z);sh[1]=vec3(sh00.x,sh00.y,sh00.z);sh[2]=vec3(sh00.w,sh01.x,sh01.y);sh[3]=vec3(sh01.z,sh01.w,sh02.x);\n#endif\n#if SH_DEGREE>1\nvec4 sh03=decompose(splat.sh0.w);vec4 sh04=decompose(splat.sh1.x);vec4 sh05=decompose(splat.sh1.y);sh[4]=vec3(sh02.y,sh02.z,sh02.w);sh[5]=vec3(sh03.x,sh03.y,sh03.z);sh[6]=vec3(sh03.w,sh04.x,sh04.y);sh[7]=vec3(sh04.z,sh04.w,sh05.x);sh[8]=vec3(sh05.y,sh05.z,sh05.w);\n#endif\n#if SH_DEGREE>2\nvec4 sh06=decompose(splat.sh1.z);vec4 sh07=decompose(splat.sh1.w);vec4 sh08=decompose(splat.sh2.x);vec4 sh09=decompose(splat.sh2.y);vec4 sh10=decompose(splat.sh2.z);vec4 sh11=decompose(splat.sh2.w);sh[9]=vec3(sh06.x,sh06.y,sh06.z);sh[10]=vec3(sh06.w,sh07.x,sh07.y);sh[11]=vec3(sh07.z,sh07.w,sh08.x);sh[12]=vec3(sh08.y,sh08.z,sh08.w);sh[13]=vec3(sh09.x,sh09.y,sh09.z);sh[14]=vec3(sh09.w,sh10.x,sh10.y);sh[15]=vec3(sh10.z,sh10.w,sh11.x); \n#endif\nreturn computeColorFromSHDegree(dir,sh);}\n#else\nvec3 computeSH(Splat splat,vec3 color,vec3 dir)\n{return color;}\n#endif\nvec4 gaussianSplatting(vec2 meshPos,vec3 worldPos,vec2 scale,vec3 covA,vec3 covB,mat4 worldMatrix,mat4 viewMatrix,mat4 projectionMatrix)\n{mat4 modelView=viewMatrix*worldMatrix;vec4 camspace=viewMatrix*vec4(worldPos,1.);vec4 pos2d=projectionMatrix*camspace;float bounds=1.2*pos2d.w;if (pos2d.z<-pos2d.w || pos2d.x<-bounds || pos2d.x>bounds\n|| pos2d.y<-bounds || pos2d.y>bounds) {return vec4(0.0,0.0,2.0,1.0);}\nmat3 Vrk=mat3(\ncovA.x,covA.y,covA.z,\ncovA.y,covB.x,covB.y,\ncovA.z,covB.y,covB.z\n);mat3 J=mat3(\nfocal.x/camspace.z,0.,-(focal.x*camspace.x)/(camspace.z*camspace.z),\n0.,focal.y/camspace.z,-(focal.y*camspace.y)/(camspace.z*camspace.z),\n0.,0.,0.\n);mat3 invy=mat3(1,0,0,0,-1,0,0,0,1);mat3 T=invy*transpose(mat3(modelView))*J;mat3 cov2d=transpose(T)*Vrk*T;float mid=(cov2d[0][0]+cov2d[1][1])/2.0;float radius=length(vec2((cov2d[0][0]-cov2d[1][1])/2.0,cov2d[0][1]));float lambda1=mid+radius,lambda2=mid-radius;if (lambda2<0.0)\n{return vec4(0.0,0.0,2.0,1.0);}\nvec2 diagonalVector=normalize(vec2(cov2d[0][1],lambda1-cov2d[0][0]));vec2 majorAxis=min(sqrt(2.0*lambda1),1024.0)*diagonalVector;vec2 minorAxis=min(sqrt(2.0*lambda2),1024.0)*vec2(diagonalVector.y,-diagonalVector.x);vec2 vCenter=vec2(pos2d);return vec4(\nvCenter \n+ ((meshPos.x*majorAxis\n+ meshPos.y*minorAxis)*invViewport*pos2d.w)*scale,pos2d.zw);}";const K="gaussianSplattingVertexShader",q="#include<__decl__gaussianSplattingVertex>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute float splatIndex;uniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;\n#if SH_DEGREE>0\nuniform highp usampler2D shTexture0;\n#endif\n#if SH_DEGREE>1\nuniform highp usampler2D shTexture1;\n#endif\n#if SH_DEGREE>2\nuniform highp usampler2D shTexture2;\n#endif\nvarying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplatting>\nvoid main () {Splat splat=readSplat(splatIndex);vec3 covA=splat.covA.xyz;vec3 covB=vec3(splat.covA.w,splat.covB.xy);vec4 worldPos=world*vec4(splat.center.xyz,1.0);vColor=splat.color;vPosition=position;\n#if SH_DEGREE>0\nvec3 dir=normalize(worldPos.xyz-vEyePosition.xyz);vColor.xyz=computeSH(splat,splat.color.xyz,dir);\n#endif\ngl_Position=gaussianSplatting(position,worldPos.xyz,vec2(1.,1.),covA,covB,world,view,projection);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";e.ShadersStore[K]=q;const Q={name:K,shader:q};var J=Object.freeze({__proto__:null,gaussianSplattingVertexShader:Q});e.IncludesShadersStoreWGSL.gaussianSplattingFragmentDeclaration="fn gaussianColor(inColor: vec4f,inPosition: vec2f)->vec4f\n{var A : f32=-dot(inPosition,inPosition);if (A>-4.0)\n{var B: f32=exp(A)*inColor.a;\n#include<logDepthFragment>\nvar color: vec3f=inColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\nreturn vec4f(color,B);} else {return vec4f(0.0);}}\n";const $="gaussianSplattingPixelShader",ee="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vColor: vec4f;varying vPosition: vec2f;\n#include<gaussianSplattingFragmentDeclaration>\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#include<clipPlaneFragment>\nfragmentOutputs.color=gaussianColor(input.vColor,input.vPosition);}\n";e.ShadersStoreWGSL[$]=ee;const te={name:$,shader:ee};var se=Object.freeze({__proto__:null,gaussianSplattingPixelShaderWGSL:te});e.IncludesShadersStoreWGSL.gaussianSplatting="fn getDataUV(index: f32,dataTextureSize: vec2f)->vec2<f32> {let y: f32=floor(index/dataTextureSize.x);let x: f32=index-y*dataTextureSize.x;return vec2f((x+0.5),(y+0.5));}\nstruct Splat {center: vec4f,\ncolor: vec4f,\ncovA: vec4f,\ncovB: vec4f,\n#if SH_DEGREE>0\nsh0: vec4<u32>,\n#endif\n#if SH_DEGREE>1\nsh1: vec4<u32>,\n#endif\n#if SH_DEGREE>2\nsh2: vec4<u32>,\n#endif\n};fn readSplat(splatIndex: f32,dataTextureSize: vec2f)->Splat {var splat: Splat;let splatUV=getDataUV(splatIndex,dataTextureSize);let splatUVi32=vec2<i32>(i32(splatUV.x),i32(splatUV.y));splat.center=textureLoad(centersTexture,splatUVi32,0);splat.color=textureLoad(colorsTexture,splatUVi32,0);splat.covA=textureLoad(covariancesATexture,splatUVi32,0)*splat.center.w;splat.covB=textureLoad(covariancesBTexture,splatUVi32,0)*splat.center.w;\n#if SH_DEGREE>0\nsplat.sh0=textureLoad(shTexture0,splatUVi32,0);\n#endif\n#if SH_DEGREE>1\nsplat.sh1=textureLoad(shTexture1,splatUVi32,0);\n#endif\n#if SH_DEGREE>2\nsplat.sh2=textureLoad(shTexture2,splatUVi32,0);\n#endif\nreturn splat;}\nfn computeColorFromSHDegree(dir: vec3f,sh: array<vec3<f32>,16>)->vec3f\n{let SH_C0: f32=0.28209479;let SH_C1: f32=0.48860251;var SH_C2: array<f32,5>=array<f32,5>(\n1.092548430,\n-1.09254843,\n0.315391565,\n-1.09254843,\n0.546274215\n);var SH_C3: array<f32,7>=array<f32,7>(\n-0.59004358,\n2.890611442,\n-0.45704579,\n0.373176332,\n-0.45704579,\n1.445305721,\n-0.59004358\n);var result: vec3f=/*SH_C0**/sh[0];\n#if SH_DEGREE>0\nlet x: f32=dir.x;let y: f32=dir.y;let z: f32=dir.z;result+=-SH_C1*y*sh[1]+SH_C1*z*sh[2]-SH_C1*x*sh[3];\n#if SH_DEGREE>1\nlet xx: f32=x*x;let yy: f32=y*y;let zz: f32=z*z;let xy: f32=x*y;let yz: f32=y*z;let xz: f32=x*z;result+=\nSH_C2[0]*xy*sh[4] +\nSH_C2[1]*yz*sh[5] +\nSH_C2[2]*(2.0f*zz-xx-yy)*sh[6] +\nSH_C2[3]*xz*sh[7] +\nSH_C2[4]*(xx-yy)*sh[8];\n#if SH_DEGREE>2\nresult+=\nSH_C3[0]*y*(3.0f*xx-yy)*sh[9] +\nSH_C3[1]*xy*z*sh[10] +\nSH_C3[2]*y*(4.0f*zz-xx-yy)*sh[11] +\nSH_C3[3]*z*(2.0f*zz-3.0f*xx-3.0f*yy)*sh[12] +\nSH_C3[4]*x*(4.0f*zz-xx-yy)*sh[13] +\nSH_C3[5]*z*(xx-yy)*sh[14] +\nSH_C3[6]*x*(xx-3.0f*yy)*sh[15];\n#endif\n#endif\n#endif\nreturn result;}\nfn decompose(value: u32)->vec4f\n{let components : vec4f=vec4f(\nf32((value ) & 255u),\nf32((value>>u32( 8)) & 255u),\nf32((value>>u32(16)) & 255u),\nf32((value>>u32(24)) & 255u));return components*vec4f(2./255.)-vec4f(1.);}\nfn computeSH(splat: Splat,color: vec3f,dir: vec3f)->vec3f\n{var sh: array<vec3<f32>,16>;sh[0]=color;\n#if SH_DEGREE>0\nlet sh00: vec4f=decompose(splat.sh0.x);let sh01: vec4f=decompose(splat.sh0.y);let sh02: vec4f=decompose(splat.sh0.z);sh[1]=vec3f(sh00.x,sh00.y,sh00.z);sh[2]=vec3f(sh00.w,sh01.x,sh01.y);sh[3]=vec3f(sh01.z,sh01.w,sh02.x);\n#endif\n#if SH_DEGREE>1\nlet sh03: vec4f=decompose(splat.sh0.w);let sh04: vec4f=decompose(splat.sh1.x);let sh05: vec4f=decompose(splat.sh1.y);sh[4]=vec3f(sh02.y,sh02.z,sh02.w);sh[5]=vec3f(sh03.x,sh03.y,sh03.z);sh[6]=vec3f(sh03.w,sh04.x,sh04.y);sh[7]=vec3f(sh04.z,sh04.w,sh05.x);sh[8]=vec3f(sh05.y,sh05.z,sh05.w);\n#endif\n#if SH_DEGREE>2\nlet sh06: vec4f=decompose(splat.sh1.z);let sh07: vec4f=decompose(splat.sh1.w);let sh08: vec4f=decompose(splat.sh2.x);let sh09: vec4f=decompose(splat.sh2.y);let sh10: vec4f=decompose(splat.sh2.z);let sh11: vec4f=decompose(splat.sh2.w);sh[9]=vec3f(sh06.x,sh06.y,sh06.z);sh[10]=vec3f(sh06.w,sh07.x,sh07.y);sh[11]=vec3f(sh07.z,sh07.w,sh08.x);sh[12]=vec3f(sh08.y,sh08.z,sh08.w);sh[13]=vec3f(sh09.x,sh09.y,sh09.z);sh[14]=vec3f(sh09.w,sh10.x,sh10.y);sh[15]=vec3f(sh10.z,sh10.w,sh11.x); \n#endif\nreturn computeColorFromSHDegree(dir,sh);}\nfn gaussianSplatting(\nmeshPos: vec2<f32>,\nworldPos: vec3<f32>,\nscale: vec2<f32>,\ncovA: vec3<f32>,\ncovB: vec3<f32>,\nworldMatrix: mat4x4<f32>,\nviewMatrix: mat4x4<f32>,\nprojectionMatrix: mat4x4<f32>,\nfocal: vec2f,\ninvViewport: vec2f\n)->vec4f {let modelView=viewMatrix*worldMatrix;let camspace=viewMatrix*vec4f(worldPos,1.0);let pos2d=projectionMatrix*camspace;let bounds=1.2*pos2d.w;if (pos2d.z<0. || pos2d.x<-bounds || pos2d.x>bounds || pos2d.y<-bounds || pos2d.y>bounds) {return vec4f(0.0,0.0,2.0,1.0);}\nlet Vrk=mat3x3<f32>(\ncovA.x,covA.y,covA.z,\ncovA.y,covB.x,covB.y,\ncovA.z,covB.y,covB.z\n);let J=mat3x3<f32>(\nfocal.x/camspace.z,0.0,-(focal.x*camspace.x)/(camspace.z*camspace.z),\n0.0,focal.y/camspace.z,-(focal.y*camspace.y)/(camspace.z*camspace.z),\n0.0,0.0,0.0\n);let invy=mat3x3<f32>(\n1.0,0.0,0.0,\n0.0,-1.0,0.0,\n0.0,0.0,1.0\n);let T=invy*transpose(mat3x3<f32>(\nmodelView[0].xyz,\nmodelView[1].xyz,\nmodelView[2].xyz))*J;let cov2d=transpose(T)*Vrk*T;let mid=(cov2d[0][0]+cov2d[1][1])/2.0;let radius=length(vec2<f32>((cov2d[0][0]-cov2d[1][1])/2.0,cov2d[0][1]));let lambda1=mid+radius;let lambda2=mid-radius;if (lambda2<0.0) {return vec4f(0.0,0.0,2.0,1.0);}\nlet diagonalVector=normalize(vec2<f32>(cov2d[0][1],lambda1-cov2d[0][0]));let majorAxis=min(sqrt(2.0*lambda1),1024.0)*diagonalVector;let minorAxis=min(sqrt(2.0*lambda2),1024.0)*vec2<f32>(diagonalVector.y,-diagonalVector.x);let vCenter=vec2<f32>(pos2d.x,pos2d.y);return vec4f(\nvCenter+((meshPos.x*majorAxis+meshPos.y*minorAxis)*invViewport*pos2d.w)*scale,\npos2d.z,\npos2d.w\n);}\n";const ne="gaussianSplattingVertexShader",re="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute splatIndex: f32;attribute position: vec2f;uniform invViewport: vec2f;uniform dataTextureSize: vec2f;uniform focal: vec2f;var covariancesATexture: texture_2d<f32>;var covariancesBTexture: texture_2d<f32>;var centersTexture: texture_2d<f32>;var colorsTexture: texture_2d<f32>;\n#if SH_DEGREE>0\nvar shTexture0: texture_2d<u32>;\n#endif\n#if SH_DEGREE>1\nvar shTexture1: texture_2d<u32>;\n#endif\n#if SH_DEGREE>2\nvar shTexture2: texture_2d<u32>;\n#endif\nvarying vColor: vec4f;varying vPosition: vec2f;\n#include<gaussianSplatting>\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {var splat: Splat=readSplat(input.splatIndex,uniforms.dataTextureSize);var covA: vec3f=splat.covA.xyz;var covB: vec3f=vec3f(splat.covA.w,splat.covB.xy);let worldPos: vec4f=mesh.world*vec4f(splat.center.xyz,1.0);vertexOutputs.vPosition=input.position;\n#if SH_DEGREE>0\nlet dir: vec3f=normalize(worldPos.xyz-scene.vEyePosition.xyz);vertexOutputs.vColor=vec4f(computeSH(splat,splat.color.xyz,dir),1.0);\n#else\nvertexOutputs.vColor=splat.color;\n#endif\nvertexOutputs.position=gaussianSplatting(input.position,worldPos.xyz,vec2f(1.0,1.0),covA,covB,mesh.world,scene.view,scene.projection,uniforms.focal,uniforms.invViewport);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";e.ShadersStoreWGSL[ne]=re;const ie={name:ne,shader:re};var ae=Object.freeze({__proto__:null,gaussianSplattingVertexShaderWGSL:ie});class oe extends _{constructor(){super(),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.SH_DEGREE=0,this.rebuild()}}class ce extends s{constructor(e,t){super(e,t),this.backFaceCulling=!1}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(e,t){const s=!0,l=t._drawWrapper;if(l.effect&&this.isFrozen&&l._wasPreviouslyReady&&l._wasPreviouslyUsingInstances===s)return!0;t.materialDefines||(t.materialDefines=new oe);const h=this.getScene(),u=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;const d=h.getEngine();if(n(e,h,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,u),r(h,d,this,u,s,null,!0),i(e,u,!1,!1),(d.version>1||d.isWebGPU)&&(u.SH_DEGREE=e.shDegree),u.isDirty){u.markAsProcessed(),h.resetCachedMaterial();const e=[x.PositionKind,"splatIndex"];a(e,u);const s=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal","vEyePosition"],n=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture","shTexture0","shTexture1","shTexture2"],r=["Scene","Mesh"];o({uniformsNames:s,uniformBuffersNames:r,samplers:n,defines:u}),c(s);const i=u.toString(),l=h.getEngine().createEffect("gaussianSplatting",{attributes:e,uniformsNames:s,uniformBuffersNames:r,samplers:n,defines:i,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{},shaderLanguage:this._shaderLanguage,extraInitializationsAsync:async()=>{1===this._shaderLanguage?await Promise.all([Promise.resolve().then((function(){return se})),Promise.resolve().then((function(){return ae}))]):await Promise.all([Promise.resolve().then((function(){return Y})),Promise.resolve().then((function(){return J}))])}},d);t.setEffect(l,u,this._materialContext)}return!(!t.effect||!t.effect.isReady())&&(u._renderId=h.getRenderId(),l._wasPreviouslyReady=!0,l._wasPreviouslyUsingInstances=s,!0)}static BindEffect(e,t,s){const n=s.getEngine(),r=s.activeCamera,i=n.getRenderWidth(),a=n.getRenderHeight(),o=r?.rigParent?.rigCameras.length||1;t.setFloat2("invViewport",1/(i/o),1/a);let c=1e3;if(r){const e=r.getProjectionMatrix().m[5];c=r.fovMode==l.FOVMODE_VERTICAL_FIXED?a*e/2:i*e/2}t.setFloat2("focal",c,c);const h=e;if(h.covariancesATexture){const e=h.covariancesATexture.getSize();if(t.setFloat2("dataTextureSize",e.width,e.height),t.setTexture("covariancesATexture",h.covariancesATexture),t.setTexture("covariancesBTexture",h.covariancesBTexture),t.setTexture("centersTexture",h.centersTexture),t.setTexture("colorsTexture",h.colorsTexture),h.shTextures)for(let e=0;e<h.shTextures?.length;e++)t.setTexture(`shTexture${e}`,h.shTextures[e])}}bindForSubMesh(e,t,s){const n=this.getScene(),r=s.materialDefines;if(!r)return;const i=s.effect;if(!i)return;this._activeEffect=i,t.getMeshUniformBuffer().bindToEffect(i,"Mesh"),t.transferToEffect(e);this._mustRebind(n,i,s,t.visibility)?(this.bindView(i),this.bindViewProjection(i),ce.BindEffect(t,this._activeEffect,n),h(i,this,n)):n.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0),u(n,t,i),this.useLogarithmicDepth&&d(r,i,n),this._afterBind(t,this._activeEffect,s)}clone(e){return p.Clone((()=>new ce(e,this.getScene())),this)}serialize(){const e=super.serialize();return e.customType="BABYLON.GaussianSplattingMaterial",e}getClassName(){return"GaussianSplattingMaterial"}static Parse(e,t,s){return p.Parse((()=>new ce(e.name,t)),e,t,s)}}t("BABYLON.GaussianSplattingMaterial",ce);const le=m,he={...f,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:le},ue=(e,t)=>{const s=(1<<t)-1;return(e&s)/s},de=(e,t)=>{t.x=ue(e>>>21,11),t.y=ue(e>>>11,10),t.z=ue(e,11)},pe=(e,t)=>{t[0]=255*ue(e>>>24,8),t[1]=255*ue(e>>>16,8),t[2]=255*ue(e>>>8,8),t[3]=255*ue(e,8)},_e=(e,t)=>{const s=1/(.5*Math.sqrt(2)),n=(ue(e>>>20,10)-.5)*s,r=(ue(e>>>10,10)-.5)*s,i=(ue(e,10)-.5)*s,a=Math.sqrt(1-(n*n+r*r+i*i));switch(e>>>30){case 0:t.set(a,n,r,i);break;case 1:t.set(n,a,r,i);break;case 2:t.set(n,r,a,i);break;case 3:t.set(n,r,i,a)}};var xe,fe,me,ve;!function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e[e.DOUBLE=3]="DOUBLE",e[e.UCHAR=4]="UCHAR",e[e.UNDEFINED=5]="UNDEFINED"}(xe||(xe={})),function(e){e[e.MIN_X=0]="MIN_X",e[e.MIN_Y=1]="MIN_Y",e[e.MIN_Z=2]="MIN_Z",e[e.MAX_X=3]="MAX_X",e[e.MAX_Y=4]="MAX_Y",e[e.MAX_Z=5]="MAX_Z",e[e.MIN_SCALE_X=6]="MIN_SCALE_X",e[e.MIN_SCALE_Y=7]="MIN_SCALE_Y",e[e.MIN_SCALE_Z=8]="MIN_SCALE_Z",e[e.MAX_SCALE_X=9]="MAX_SCALE_X",e[e.MAX_SCALE_Y=10]="MAX_SCALE_Y",e[e.MAX_SCALE_Z=11]="MAX_SCALE_Z",e[e.PACKED_POSITION=12]="PACKED_POSITION",e[e.PACKED_ROTATION=13]="PACKED_ROTATION",e[e.PACKED_SCALE=14]="PACKED_SCALE",e[e.PACKED_COLOR=15]="PACKED_COLOR",e[e.X=16]="X",e[e.Y=17]="Y",e[e.Z=18]="Z",e[e.SCALE_0=19]="SCALE_0",e[e.SCALE_1=20]="SCALE_1",e[e.SCALE_2=21]="SCALE_2",e[e.DIFFUSE_RED=22]="DIFFUSE_RED",e[e.DIFFUSE_GREEN=23]="DIFFUSE_GREEN",e[e.DIFFUSE_BLUE=24]="DIFFUSE_BLUE",e[e.OPACITY=25]="OPACITY",e[e.F_DC_0=26]="F_DC_0",e[e.F_DC_1=27]="F_DC_1",e[e.F_DC_2=28]="F_DC_2",e[e.F_DC_3=29]="F_DC_3",e[e.ROT_0=30]="ROT_0",e[e.ROT_1=31]="ROT_1",e[e.ROT_2=32]="ROT_2",e[e.ROT_3=33]="ROT_3",e[e.UNDEFINED=34]="UNDEFINED"}(fe||(fe={}));class ge extends v{get shDegree(){return this._shDegree}get splatsData(){return this._splatsData}get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}get shTextures(){return this._shTextures}set material(e){this._material=e,this._material.backFaceCulling=!0,this._material.cullBackFaces=!1,e.resetDrawCache()}get material(){return this._material}constructor(e,t=null,s=null,n=!1){super(e,s),this._vertexCount=0,this._worker=null,this._frameIdLastUpdate=-1,this._modelViewMatrix=g.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._splatPositions=null,this._splatIndex=null,this._shTextures=null,this._splatsData=null,this._sh=null,this._keepInRam=!1,this._delayedTextureUpdate=null,this._oldDirection=new y,this._useRGBACovariants=!1,this._material=null,this._tmpCovariances=[0,0,0,0,0,0],this._sortIsDirty=!1,this._shDegree=0;const r=new S;r.positions=[-3,-2,0,3,-2,0,0,4,0],r.indices=[0,1,2],r.applyToMesh(this),this.subMeshes=[],new T(0,0,3,0,3,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,this._keepInRam=n,t&&this.loadFileAsync(t),this._material=new ce(this.name+"_material",this._scene)}getClassName(){return"GaussianSplattingMesh"}getTotalVertices(){return this._vertexCount}isReady(e=!1){return!!super.isReady(e,!0)&&(!!this._readyToDisplay||(this._postToWorker(!0),!1))}_postToWorker(e=!1){const t=this.getScene().getFrameId();if((e||t!==this._frameIdLastUpdate)&&this._worker&&this._scene.activeCamera&&this._canPostToWorker){const s=this._scene.activeCamera.getViewMatrix();this.getWorldMatrix().multiplyToRef(s,this._modelViewMatrix),s.invertToRef(E.Matrix[0]),this.getWorldMatrix().multiplyToRef(E.Matrix[0],E.Matrix[1]),y.TransformNormalToRef(y.Forward(this._scene.useRightHandedSystem),E.Matrix[1],E.Vector3[2]),E.Vector3[2].normalize();const n=y.Dot(E.Vector3[2],this._oldDirection);(e||Math.abs(n-1)>=.01)&&(this._oldDirection.copyFrom(E.Vector3[2]),this._frameIdLastUpdate=t,this._canPostToWorker=!1,this._worker.postMessage({view:this._modelViewMatrix.m,depthMix:this._depthMix,useRightHandedSystem:this._scene.useRightHandedSystem},[this._depthMix.buffer]))}}render(e,t,s){return this._postToWorker(),super.render(e,t,s)}static _TypeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4}return 5}static _ValueNameToEnum(e){switch(e){case"min_x":return 0;case"min_y":return 1;case"min_z":return 2;case"max_x":return 3;case"max_y":return 4;case"max_z":return 5;case"min_scale_x":return 6;case"min_scale_y":return 7;case"min_scale_z":return 8;case"max_scale_x":return 9;case"max_scale_y":return 10;case"max_scale_z":return 11;case"packed_position":return 12;case"packed_rotation":return 13;case"packed_scale":return 14;case"packed_color":return 15;case"x":return 16;case"y":return 17;case"z":return 18;case"scale_0":return 19;case"scale_1":return 20;case"scale_2":return 21;case"diffuse_red":case"red":return 22;case"diffuse_green":case"green":return 23;case"diffuse_blue":case"blue":return 24;case"f_dc_0":return 26;case"f_dc_1":return 27;case"f_dc_2":return 28;case"f_dc_3":return 29;case"opacity":return 25;case"rot_0":return 30;case"rot_1":return 31;case"rot_2":return 32;case"rot_3":return 33}return 34}static ParseHeader(e){const t=new Uint8Array(e),s=(new TextDecoder).decode(t.slice(0,10240)),n="end_header\n",r=s.indexOf(n);if(r<0||!s)return null;const i=parseInt(/element vertex (\d+)\n/.exec(s)[1]),a=/element chunk (\d+)\n/.exec(s);let o=0;a&&(o=parseInt(a[1]));let c=0,l=0;const h={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let u;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(u||(u={}));let d=1;const p=[],_=[],x=s.slice(0,r).split("\n");for(const e of x)if(e.startsWith("property ")){const[,t,s]=e.split(" "),n=ge._ValueNameToEnum(s),r=ge._TypeNameToEnum(t);1==d?(_.push({value:n,type:r,offset:l}),l+=h[t]):0==d&&(p.push({value:n,type:r,offset:c}),c+=h[t]),h[t]||w.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?d=1:"vertex"==t&&(d=0)}return{vertexCount:i,chunkCount:o,rowVertexLength:c,rowChunkLength:l,vertexProperties:p,chunkProperties:_,dataView:new DataView(e,r+11),buffer:new ArrayBuffer(ge._RowOutputLength*i)}}static _GetCompressedChunks(e,t){if(!e.chunkCount)return null;const s=e.dataView,n=new Array(e.chunkCount);for(let r=0;r<e.chunkCount;r++){const i={min:new y,max:new y,minScale:new y,maxScale:new y};n[r]=i;for(let n=0;n<e.chunkProperties.length;n++){const r=e.chunkProperties[n];let a;if(0===r.type)switch(a=s.getFloat32(r.offset+t.value,!0),r.value){case 0:i.min.x=a;break;case 1:i.min.y=a;break;case 2:i.min.z=a;break;case 3:i.max.x=a;break;case 4:i.max.y=a;break;case 5:i.max.z=a;break;case 6:i.minScale.x=a;break;case 7:i.minScale.y=a;break;case 8:i.minScale.z=a;break;case 9:i.maxScale.x=a;break;case 10:i.maxScale.y=a;break;case 11:i.maxScale.z=a}}t.value+=e.rowChunkLength}return n}static _GetSplat(e,t,s,n){const r=E.Quaternion[0],i=E.Vector3[0],a=ge._RowOutputLength,o=e.buffer,c=e.dataView,l=new Float32Array(o,t*a,3),h=new Float32Array(o,t*a+12,3),u=new Uint8ClampedArray(o,t*a+24,4),d=new Uint8ClampedArray(o,t*a+28,4),p=t>>8;let _=255,x=0,f=0,m=0;for(let t=0;t<e.vertexProperties.length;t++){const a=e.vertexProperties[t];let o;switch(a.type){case 0:o=c.getFloat32(n.value+a.offset,!0);break;case 1:o=c.getInt32(n.value+a.offset,!0);break;case 2:o=c.getUint32(n.value+a.offset,!0);break;case 3:o=c.getFloat64(n.value+a.offset,!0);break;case 4:o=c.getUint8(n.value+a.offset);break;default:continue}switch(a.value){case 12:{const e=s[p];de(o,i),l[0]=he.Lerp(e.min.x,e.max.x,i.x),l[1]=-he.Lerp(e.min.y,e.max.y,i.y),l[2]=he.Lerp(e.min.z,e.max.z,i.z)}break;case 13:_e(o,r),_=r.w,x=r.z,f=r.y,m=r.x;break;case 14:{const e=s[p];de(o,i),h[0]=Math.exp(he.Lerp(e.minScale.x,e.maxScale.x,i.x)),h[1]=Math.exp(he.Lerp(e.minScale.y,e.maxScale.y,i.y)),h[2]=Math.exp(he.Lerp(e.minScale.z,e.maxScale.z,i.z))}break;case 15:pe(o,u);break;case 16:l[0]=o;break;case 17:l[1]=o;break;case 18:l[2]=o;break;case 19:h[0]=Math.exp(o);break;case 20:h[1]=Math.exp(o);break;case 21:h[2]=Math.exp(o);break;case 22:u[0]=o;break;case 23:u[1]=o;break;case 24:u[2]=o;break;case 26:u[0]=255*(.5+ge._SH_C0*o);break;case 27:u[1]=255*(.5+ge._SH_C0*o);break;case 28:u[2]=255*(.5+ge._SH_C0*o);break;case 29:u[3]=255*(.5+ge._SH_C0*o);break;case 25:u[3]=1/(1+Math.exp(-o))*255;break;case 30:_=o;break;case 31:x=o;break;case 32:f=o;break;case 33:m=o}}r.set(x,f,m,_),r.normalize(),d[0]=128*r.w+128,d[1]=128*r.x+128,d[2]=128*r.y+128,d[3]=128*r.z+128,n.value+=e.rowVertexLength}static*ConvertPLYToSplat(e,t=!1){const s=ge.ParseHeader(e);if(!s)return e;const n={value:0},r=ge._GetCompressedChunks(s,n);for(let e=0;e<s.vertexCount;e++)ge._GetSplat(s,e,r,n),e%ge._PlyConversionBatchSize==0&&t&&(yield);return s.buffer}static async ConvertPLYToSplatAsync(e){return C(ge.ConvertPLYToSplat(e,!0),M())}loadDataAsync(e){return this.updateDataAsync(e)}loadFileAsync(e){return A.LoadFileAsync(e,!0).then((async e=>{ge.ConvertPLYToSplatAsync(e).then((e=>{this.updateDataAsync(e)}))}))}dispose(e){this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._shTextures&&this._shTextures.forEach((e=>{e.dispose()})),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._shTextures=null,this._worker?.terminate(),this._worker=null,super.dispose(e,!0)}_copyTextures(e){this._covariancesATexture=e.covariancesATexture?.clone(),this._covariancesBTexture=e.covariancesBTexture?.clone(),this._centersTexture=e.centersTexture?.clone(),this._colorsTexture=e.colorsTexture?.clone(),e._shTextures&&(this._shTextures=[],this._shTextures.forEach((e=>{this._shTextures?.push(e.clone())})))}clone(e=""){const t=new ge(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewMatrix=g.Identity(),t._splatPositions=this._splatPositions,t._readyToDisplay=!1,t._instanciateWorker();const s=this.getBoundingInfo();return t.getBoundingInfo().reConstruct(s.minimum,s.maximum,this.getWorldMatrix()),t.forcedInstanceCount=t._vertexCount,t.setEnabled(!0),t}_makeSplat(e,t,s,n,r,i,a,o,c){const l=E.Matrix[0],h=E.Matrix[1],u=E.Quaternion[0],d=this._useRGBACovariants?4:2,p=s[8*e+0],_=-s[8*e+1],x=s[8*e+2];this._splatPositions[4*e+0]=p,this._splatPositions[4*e+1]=_,this._splatPositions[4*e+2]=x,o.minimizeInPlaceFromFloats(p,_,x),c.maximizeInPlaceFromFloats(p,_,x),u.set((n[32*e+28+1]-127.5)/127.5,(n[32*e+28+2]-127.5)/127.5,(n[32*e+28+3]-127.5)/127.5,-(n[32*e+28+0]-127.5)/127.5),u.toRotationMatrix(l),g.ScalingToRef(2*s[8*e+3+0],2*s[8*e+3+1],2*s[8*e+3+2],h);const f=l.multiplyToRef(h,E.Matrix[0]).m,m=this._tmpCovariances;m[0]=f[0]*f[0]+f[1]*f[1]+f[2]*f[2],m[1]=f[0]*f[4]+f[1]*f[5]+f[2]*f[6],m[2]=f[0]*f[8]+f[1]*f[9]+f[2]*f[10],m[3]=f[4]*f[4]+f[5]*f[5]+f[6]*f[6],m[4]=f[4]*f[8]+f[5]*f[9]+f[6]*f[10],m[5]=f[8]*f[8]+f[9]*f[9]+f[10]*f[10];let v=-1e4;for(let e=0;e<6;e++)v=Math.max(v,Math.abs(m[e]));this._splatPositions[4*e+3]=v;const y=v;r[4*t+0]=P(m[0]/y),r[4*t+1]=P(m[1]/y),r[4*t+2]=P(m[2]/y),r[4*t+3]=P(m[3]/y),i[t*d+0]=P(m[4]/y),i[t*d+1]=P(m[5]/y),a[4*t+0]=n[32*e+24+0],a[4*t+1]=n[32*e+24+1],a[4*t+2]=n[32*e+24+2],a[4*t+3]=n[32*e+24+3]}_updateTextures(e,t,s,n){const r=this._getTextureSize(this._vertexCount),i=(e,t,s,n)=>new G(e,t,s,n,this._scene,!1,!1,z.TEXTURE_BILINEAR_SAMPLINGMODE,z.TEXTURETYPE_FLOAT),a=(e,t,s,n)=>new G(e,t,s,n,this._scene,!1,!1,z.TEXTURE_BILINEAR_SAMPLINGMODE,z.TEXTURETYPE_UNSIGNED_BYTE),o=(e,t,s,n)=>new G(e,t,s,n,this._scene,!1,!1,z.TEXTURE_NEAREST_SAMPLINGMODE,z.TEXTURETYPE_UNSIGNED_INTEGER),c=(e,t,s,n)=>new G(e,t,s,n,this._scene,!1,!1,z.TEXTURE_BILINEAR_SAMPLINGMODE,z.TEXTURETYPE_HALF_FLOAT);if(this._covariancesATexture){this._delayedTextureUpdate={covA:e,covB:t,colors:s,centers:this._splatPositions,sh:n};const r=Float32Array.from(this._splatPositions),i=this._vertexCount;this._worker.postMessage({positions:r,vertexCount:i},[r.buffer]),this._postToWorker(!0)}else this._covariancesATexture=c(e,r.x,r.y,z.TEXTUREFORMAT_RGBA),this._covariancesBTexture=c(t,r.x,r.y,this._useRGBACovariants?z.TEXTUREFORMAT_RGBA:z.TEXTUREFORMAT_RG),this._centersTexture=i(this._splatPositions,r.x,r.y,z.TEXTUREFORMAT_RGBA),this._colorsTexture=a(s,r.x,r.y,z.TEXTUREFORMAT_RGBA),n&&(this._shTextures=[],n.forEach((e=>{const t=new Uint32Array(e.buffer),s=o(t,r.x,r.y,z.TEXTUREFORMAT_RGBA_INTEGER);s.wrapU=z.TEXTURE_CLAMP_ADDRESSMODE,s.wrapV=z.TEXTURE_CLAMP_ADDRESSMODE,this._shTextures.push(s)}))),this._instanciateWorker()}*_updateData(e,t,s){this._covariancesATexture||(this._readyToDisplay=!1);const n=new Uint8Array(e),r=new Float32Array(n.buffer);this._keepInRam&&(this._splatsData=e,s&&(this._sh=s));const i=n.length/ge._RowOutputLength;i!=this._vertexCount&&this._updateSplatIndexBuffer(i),this._vertexCount=i,this._shDegree=s?s.length:0;const a=this._getTextureSize(i),o=a.x*a.y,c=ge.ProgressiveUpdateAmount??a.y,l=a.x*c;this._splatPositions=new Float32Array(4*o);const h=new Uint16Array(4*o),u=new Uint16Array((this._useRGBACovariants?4:2)*o),d=new Uint8Array(4*o),p=new y(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),_=new y(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(ge.ProgressiveUpdateAmount){this._updateTextures(h,u,d,s),this.setEnabled(!0);const e=Math.ceil(a.y/c);for(let s=0;s<e;s++){const e=s*c,i=e*a.x;for(let e=0;e<l;e++)this._makeSplat(i+e,i+e,r,n,h,u,d,p,_);this._updateSubTextures(this._splatPositions,h,u,d,e,Math.min(c,a.y-e)),this.getBoundingInfo().reConstruct(p,_,this.getWorldMatrix()),t&&(yield)}const i=Float32Array.from(this._splatPositions),o=this._vertexCount;this._worker.postMessage({positions:i,vertexCount:o},[i.buffer]),this._sortIsDirty=!0}else{for(let e=0;e<i;e++)this._makeSplat(e,e,r,n,h,u,d,p,_),t&&e%ge._SplatBatchSize==0&&(yield);this._updateTextures(h,u,d,s),this.getBoundingInfo().reConstruct(p,_,this.getWorldMatrix()),this.setEnabled(!0)}this._postToWorker(!0)}async updateDataAsync(e,t){return C(this._updateData(e,!0,t),M())}updateData(e,t){b(this._updateData(e,!1,t))}refreshBoundingInfo(){return this.thinInstanceRefreshBoundingInfo(!1),this}_updateSplatIndexBuffer(e){(!this._splatIndex||e>this._splatIndex.length)&&(this._splatIndex=new Float32Array(e),this.thinInstanceSetBuffer("splatIndex",this._splatIndex,1,!1)),this.forcedInstanceCount=e}_updateSubTextures(e,t,s,n,r,i,a){const o=(e,t,s,n,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,n,s,r,0,0,!1)},c=this._getTextureSize(this._vertexCount),l=this._useRGBACovariants?4:2,h=r*c.x,u=i*c.x,d=new Uint16Array(t.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),p=new Uint16Array(s.buffer,h*l*Uint16Array.BYTES_PER_ELEMENT,u*l),_=new Uint8Array(n.buffer,4*h,4*u),x=new Float32Array(e.buffer,4*h*Float32Array.BYTES_PER_ELEMENT,4*u);if(o(this._covariancesATexture,d,c.x,r,i),o(this._covariancesBTexture,p,c.x,r,i),o(this._centersTexture,x,c.x,r,i),o(this._colorsTexture,_,c.x,r,i),a)for(let e=0;e<a.length;e++){const t=4,s=new Uint8Array(this._sh[e].buffer,h*t,u*t);o(this._shTextures[e],s,c.x,r,i)}}_instanciateWorker(){if(!this._vertexCount)return;this._updateSplatIndexBuffer(this._vertexCount),this._worker?.terminate(),this._worker=new Worker(URL.createObjectURL(new Blob(["(",ge._CreateWorker.toString(),")(self)"],{type:"application/javascript"}))),this._depthMix=new BigInt64Array(this._vertexCount);const e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({positions:e,vertexCount:t},[e.buffer]),this._worker.onmessage=e=>{this._depthMix=e.data.depthMix;const s=new Uint32Array(e.data.depthMix.buffer);if(this._splatIndex)for(let e=0;e<this._vertexCount;e++)this._splatIndex[e]=s[2*e];if(this._delayedTextureUpdate){const e=this._getTextureSize(t);this._updateSubTextures(this._delayedTextureUpdate.centers,this._delayedTextureUpdate.covA,this._delayedTextureUpdate.covB,this._delayedTextureUpdate.colors,0,e.y,this._delayedTextureUpdate.sh),this._delayedTextureUpdate=null}this.thinInstanceBufferUpdated("splatIndex"),this._canPostToWorker=!0,this._readyToDisplay=!0,this._sortIsDirty&&(this._postToWorker(!0),this._sortIsDirty=!1)}}_getTextureSize(e){const t=this._scene.getEngine(),s=t.getCaps().maxTextureSize;let n=1;if(1!==t.version||t.isWebGPU)n=Math.ceil(e/s);else for(;s*n<e;)n*=2;return n>s&&(w.Error("GaussianSplatting texture size: ("+s+", "+n+"), maxTextureSize: "+s),n=s),new D(s,n)}}ge._RowOutputLength=32,ge._SH_C0=.28209479177387814,ge._SplatBatchSize=327680,ge._PlyConversionBatchSize=32768,ge.ProgressiveUpdateAmount=0,ge._CreateWorker=function(e){let t,s,n,r,i=0;e.onmessage=a=>{if(a.data.positions)t=a.data.positions,i=a.data.vertexCount;else{const o=a.data.view;if(!t||!o)throw new Error("positions or view is not defined!");s=a.data.depthMix,n=new Uint32Array(s.buffer),r=new Float32Array(s.buffer);for(let e=0;e<i;e++)n[2*e]=e;let c=-1;a.data.useRightHandedSystem&&(c=1);for(let e=0;e<i;e++)r[2*e+1]=1e4+(o[2]*t[4*e+0]+o[6]*t[4*e+1]+o[10]*t[4*e+2])*c;s.sort(),e.postMessage({depthMix:s},[s.buffer])}}};class ye{constructor(e,t,s,n,r){this.idx=0,this.color=new I(1,1,1,1),this.position=y.Zero(),this.rotation=y.Zero(),this.uv=new D(0,0),this.velocity=y.Zero(),this.pivot=y.Zero(),this.translateFromPivot=!1,this._pos=0,this._ind=0,this.groupId=0,this.idxInGroup=0,this._stillInvisible=!1,this._rotationMatrix=[1,0,0,0,1,0,0,0,1],this.parentId=null,this._globalPosition=y.Zero(),this.idx=e,this._group=t,this.groupId=s,this.idxInGroup=n,this._pcs=r}get size(){return this.size}set size(e){this.size=e}get quaternion(){return this.rotationQuaternion}set quaternion(e){this.rotationQuaternion=e}intersectsMesh(e,t){if(!e.hasBoundingInfo)return!1;if(!this._pcs.mesh)throw new Error("Point Cloud System doesnt contain the Mesh");if(t)return e.getBoundingInfo().boundingSphere.intersectsPoint(this.position.add(this._pcs.mesh.position));const s=e.getBoundingInfo().boundingBox,n=s.maximumWorld.x,r=s.minimumWorld.x,i=s.maximumWorld.y,a=s.minimumWorld.y,o=s.maximumWorld.z,c=s.minimumWorld.z,l=this.position.x+this._pcs.mesh.position.x,h=this.position.y+this._pcs.mesh.position.y,u=this.position.z+this._pcs.mesh.position.z;return r<=l&&l<=n&&a<=h&&h<=i&&c<=u&&u<=o}getRotationMatrix(e){let t;if(this.rotationQuaternion)t=this.rotationQuaternion;else{t=E.Quaternion[0];const e=this.rotation;R.RotationYawPitchRollToRef(e.y,e.x,e.z,t)}t.toRotationMatrix(e)}}class Se{get groupID(){return this.groupId}set groupID(e){this.groupId=e}constructor(e,t){this.groupId=e,this._positionFunction=t}}!function(e){e[e.Color=2]="Color",e[e.UV=1]="UV",e[e.Random=0]="Random",e[e.Stated=3]="Stated"}(me||(me={}));class Te{get positions(){return this._positions32}get colors(){return this._colors32}get uvs(){return this._uvs32}constructor(e,t,s,n){this.particles=new Array,this.nbParticles=0,this.counter=0,this.vars={},this._promises=[],this._positions=new Array,this._indices=new Array,this._normals=new Array,this._colors=new Array,this._uvs=new Array,this._updatable=!0,this._isVisibilityBoxLocked=!1,this._alwaysVisible=!1,this._groups=new Array,this._groupCounter=0,this._computeParticleColor=!0,this._computeParticleTexture=!0,this._computeParticleRotation=!0,this._computeBoundingBox=!1,this._isReady=!1,this.name=e,this._size=t,this._scene=s||U.LastCreatedScene,n&&void 0!==n.updatable?this._updatable=n.updatable:this._updatable=!0}buildMeshAsync(e){return Promise.all(this._promises).then((()=>(this._isReady=!0,this._buildMesh(e))))}_buildMesh(e){0===this.nbParticles&&this.addPoints(1),this._positions32=new Float32Array(this._positions),this._uvs32=new Float32Array(this._uvs),this._colors32=new Float32Array(this._colors);const t=new S;t.set(this._positions32,x.PositionKind),this._uvs32.length>0&&t.set(this._uvs32,x.UVKind);let s=0;this._colors32.length>0&&(s=1,t.set(this._colors32,x.ColorKind));const n=new v(this.name,this._scene);t.applyToMesh(n,this._updatable),this.mesh=n,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);let r=e;return r||(r=new W("point cloud material",this._scene),r.emissiveColor=new V(s,s,s),r.disableLighting=!0,r.pointsCloud=!0,r.pointSize=this._size),n.material=r,new Promise((e=>e(n)))}_addParticle(e,t,s,n){const r=new ye(e,t,s,n,this);return this.particles.push(r),r}_randomUnitVector(e){e.position=new y(Math.random(),Math.random(),Math.random()),e.color=new I(1,1,1,1)}_getColorIndicesForCoord(e,t,s,n){const r=e._groupImageData,i=s*(4*n)+4*t,a=[i,i+1,i+2,i+3],o=a[1],c=a[2],l=a[3],h=r[a[0]],u=r[o],d=r[c],p=r[l];return new I(h/255,u/255,d/255,p)}_setPointsColorOrUV(e,t,s,n,r,i,a,o){o=o??0,s&&e.updateFacetData();const c=2*e.getBoundingInfo().boundingSphere.radius;let l=e.getVerticesData(x.PositionKind);const h=e.getIndices(),u=e.getVerticesData(x.UVKind+(o?o+1:"")),d=e.getVerticesData(x.ColorKind),p=y.Zero();e.computeWorldMatrix();const _=e.getWorldMatrix();if(!_.isIdentity()){l=l.slice(0);for(let e=0;e<l.length/3;e++)y.TransformCoordinatesFromFloatsToRef(l[3*e],l[3*e+1],l[3*e+2],_,p),l[3*e]=p.x,l[3*e+1]=p.y,l[3*e+2]=p.z}let f=0,m=0,v=0,g=0,S=0,T=0,E=0,w=0,C=0,A=0,P=0,z=0,b=0;const M=y.Zero(),R=y.Zero(),U=y.Zero(),L=y.Zero(),k=y.Zero();let H=0,G=0,N=0,W=0,X=0,Z=0;const j=D.Zero(),Y=D.Zero(),K=D.Zero(),q=D.Zero(),Q=D.Zero();let J=0,$=0,ee=0,te=0,se=0,ne=0,re=0,ie=0,ae=0,oe=0,ce=0,le=0;const he=B.Zero(),ue=B.Zero(),de=B.Zero(),pe=B.Zero(),_e=B.Zero();let xe,fe,me=0,ve=0;a=a||0;let ge=new B(0,0,0,0),ye=y.Zero(),Se=y.Zero(),Te=y.Zero(),Ee=0,we=y.Zero(),Ce=0,Ae=0;const Pe=new O(y.Zero(),new y(1,0,0));let ze,be=y.Zero();for(let o=0;o<h.length/3;o++){let p,_,x,D,B,O,De,Me;m=h[3*o],v=h[3*o+1],g=h[3*o+2],S=l[3*m],T=l[3*m+1],E=l[3*m+2],w=l[3*v],C=l[3*v+1],A=l[3*v+2],P=l[3*g],z=l[3*g+1],b=l[3*g+2],M.set(S,T,E),R.set(w,C,A),U.set(P,z,b),R.subtractToRef(M,L),U.subtractToRef(R,k),u&&(H=u[2*m],G=u[2*m+1],N=u[2*v],W=u[2*v+1],X=u[2*g],Z=u[2*g+1],j.set(H,G),Y.set(N,W),K.set(X,Z),Y.subtractToRef(j,q),K.subtractToRef(Y,Q)),d&&n&&(J=d[4*m],$=d[4*m+1],ee=d[4*m+2],te=d[4*m+3],se=d[4*v],ne=d[4*v+1],re=d[4*v+2],ie=d[4*v+3],ae=d[4*g],oe=d[4*g+1],ce=d[4*g+2],le=d[4*g+3],he.set(J,$,ee,te),ue.set(se,ne,re,ie),de.set(ae,oe,ce,le),ue.subtractToRef(he,pe),de.subtractToRef(ue,_e));const Ie=new V(0,0,0),Re=new V(0,0,0);let Ue,Ve;for(let l=0;l<t._groupDensity[o];l++)f=this.particles.length,this._addParticle(f,t,this._groupCounter,o+l),Ve=this.particles[f],me=Math.sqrt(F(0,1)),ve=F(0,1),xe=M.add(L.scale(me)).add(k.scale(me*ve)),s&&(ye=e.getFacetNormal(o).normalize().scale(-1),Se=L.clone().normalize(),Te=y.Cross(ye,Se),Ee=F(0,2*Math.PI),we=Se.scale(Math.cos(Ee)).add(Te.scale(Math.sin(Ee))),Ee=F(.1,Math.PI/2),be=we.scale(Math.cos(Ee)).add(ye.scale(Math.sin(Ee))),Pe.origin=xe.add(be.scale(1e-5)),Pe.direction=be,Pe.length=c,ze=Pe.intersectsMesh(e),ze.hit&&(Ae=ze.pickedPoint.subtract(xe).length(),Ce=F(0,1)*Ae,xe.addInPlace(be.scale(Ce)))),Ve.position=xe.clone(),this._positions.push(Ve.position.x,Ve.position.y,Ve.position.z),void 0!==n?u&&(fe=j.add(q.scale(me)).add(Q.scale(me*ve)),n?r&&null!==t._groupImageData?(p=t._groupImgWidth,_=t._groupImgHeight,Ue=this._getColorIndicesForCoord(t,Math.round(fe.x*p),Math.round(fe.y*_),p),Ve.color=Ue,this._colors.push(Ue.r,Ue.g,Ue.b,Ue.a)):d?(ge=he.add(pe.scale(me)).add(_e.scale(me*ve)),Ve.color=new I(ge.x,ge.y,ge.z,ge.w),this._colors.push(ge.x,ge.y,ge.z,ge.w)):(ge=he.set(Math.random(),Math.random(),Math.random(),1),Ve.color=new I(ge.x,ge.y,ge.z,ge.w),this._colors.push(ge.x,ge.y,ge.z,ge.w)):(Ve.uv=fe.clone(),this._uvs.push(Ve.uv.x,Ve.uv.y))):(i?(Ie.set(i.r,i.g,i.b),x=F(-a,a),D=F(-a,a),Me=Ie.toHSV(),B=Me.r,O=Me.g+x,De=Me.b+D,O<0&&(O=0),O>1&&(O=1),De<0&&(De=0),De>1&&(De=1),V.HSVtoRGBToRef(B,O,De,Re),ge.set(Re.r,Re.g,Re.b,1)):ge=he.set(Math.random(),Math.random(),Math.random(),1),Ve.color=new I(ge.x,ge.y,ge.z,ge.w),this._colors.push(ge.x,ge.y,ge.z,ge.w))}}_colorFromTexture(e,t,s){if(null===e.material)return w.Warn(e.name+"has no material."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const n=e.material.getActiveTextures();if(0===n.length)return w.Warn(e.name+"has no usable texture."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const r=e.clone();r.setEnabled(!1),this._promises.push(new Promise((e=>{L.WhenAllReady(n,(()=>{let i=t._textureNb;i<0&&(i=0),i>n.length-1&&(i=n.length-1);const a=()=>{t._groupImgWidth=n[i].getSize().width,t._groupImgHeight=n[i].getSize().height,this._setPointsColorOrUV(r,t,s,!0,!0,void 0,void 0,n[i].coordinatesIndex),r.dispose(),e()};t._groupImageData=null;const o=n[i].readPixels();o?o.then((e=>{t._groupImageData=e,a()})):a()}))})))}_calculateDensity(e,t,s){let n,r,i,a,o,c,l,h,u,d,p,_;const x=y.Zero(),f=y.Zero(),m=y.Zero(),v=y.Zero(),g=y.Zero(),S=y.Zero();let T;const E=[];let w=0;const C=s.length/3;for(let e=0;e<C;e++)n=s[3*e],r=s[3*e+1],i=s[3*e+2],a=t[3*n],o=t[3*n+1],c=t[3*n+2],l=t[3*r],h=t[3*r+1],u=t[3*r+2],d=t[3*i],p=t[3*i+1],_=t[3*i+2],x.set(a,o,c),f.set(l,h,u),m.set(d,p,_),f.subtractToRef(x,v),m.subtractToRef(f,g),y.CrossToRef(v,g,S),T=.5*S.length(),w+=T,E[e]=w;const A=new Array(C);let P=e;for(let e=C-1;e>0;e--){const t=E[e];if(0===t)A[e]=0;else{const s=(t-E[e-1])/t*P,n=Math.floor(s),r=s-n,i=n+Number(Math.random()<r);A[e]=i,P-=i}}return A[0]=P,A}addPoints(e,t=this._randomUnitVector){const s=new Se(this._groupCounter,t);let n,r=this.nbParticles;for(let t=0;t<e;t++)n=this._addParticle(r,s,this._groupCounter,t),s&&s._positionFunction&&s._positionFunction(n,r,t),this._positions.push(n.position.x,n.position.y,n.position.z),n.color&&this._colors.push(n.color.r,n.color.g,n.color.b,n.color.a),n.uv&&this._uvs.push(n.uv.x,n.uv.y),r++;return this.nbParticles+=e,this._groupCounter++,this._groupCounter}addSurfacePoints(e,t,s,n,r){let i=s||0;(isNaN(i)||i<0||i>3)&&(i=0);const a=e.getVerticesData(x.PositionKind),o=e.getIndices();this._groups.push(this._groupCounter);const c=new Se(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,a,o),2===i?c._textureNb=n||0:n=n||new I(1,1,1,1),i){case 2:this._colorFromTexture(e,c,!1);break;case 1:this._setPointsColorOrUV(e,c,!1,!1,!1);break;case 0:this._setPointsColorOrUV(e,c,!1);break;case 3:this._setPointsColorOrUV(e,c,!1,void 0,void 0,n,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}addVolumePoints(e,t,s,n,r){let i=s||0;(isNaN(i)||i<0||i>3)&&(i=0);const a=e.getVerticesData(x.PositionKind),o=e.getIndices();this._groups.push(this._groupCounter);const c=new Se(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,a,o),2===i?c._textureNb=n||0:n=n||new I(1,1,1,1),i){case 2:this._colorFromTexture(e,c,!0);break;case 1:this._setPointsColorOrUV(e,c,!0,!1,!1);break;case 0:this._setPointsColorOrUV(e,c,!0);break;case 3:this._setPointsColorOrUV(e,c,!0,void 0,void 0,n,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}setParticles(e=0,t=this.nbParticles-1,s=!0){if(!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(e,t,s);const n=E.Matrix[0],r=this.mesh,i=this._colors32,a=this._positions32,o=this._uvs32,c=E.Vector3,l=c[5].copyFromFloats(1,0,0),h=c[6].copyFromFloats(0,1,0),u=c[7].copyFromFloats(0,0,1),d=c[8].setAll(Number.MAX_VALUE),p=c[9].setAll(-Number.MAX_VALUE);g.IdentityToRef(n);let _=0;if(this.mesh?.isFacetDataEnabled&&(this._computeBoundingBox=!0),t=t>=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0!=e||t!=this.nbParticles-1)){const e=this.mesh?.getBoundingInfo();e&&(d.copyFrom(e.minimum),p.copyFrom(e.maximum))}_=0;let f=0,m=0,v=0;for(let s=e;s<=t;s++){const e=this.particles[s];_=e.idx,f=3*_,m=4*_,v=2*_,this.updateParticle(e);const t=e._rotationMatrix,r=e.position,i=e._globalPosition;this._computeParticleRotation&&e.getRotationMatrix(n);if(null!==e.parentId){const s=this.particles[e.parentId],a=s._rotationMatrix,o=s._globalPosition,c=r.x*a[1]+r.y*a[4]+r.z*a[7],l=r.x*a[0]+r.y*a[3]+r.z*a[6],h=r.x*a[2]+r.y*a[5]+r.z*a[8];if(i.x=o.x+l,i.y=o.y+c,i.z=o.z+h,this._computeParticleRotation){const e=n.m;t[0]=e[0]*a[0]+e[1]*a[3]+e[2]*a[6],t[1]=e[0]*a[1]+e[1]*a[4]+e[2]*a[7],t[2]=e[0]*a[2]+e[1]*a[5]+e[2]*a[8],t[3]=e[4]*a[0]+e[5]*a[3]+e[6]*a[6],t[4]=e[4]*a[1]+e[5]*a[4]+e[6]*a[7],t[5]=e[4]*a[2]+e[5]*a[5]+e[6]*a[8],t[6]=e[8]*a[0]+e[9]*a[3]+e[10]*a[6],t[7]=e[8]*a[1]+e[9]*a[4]+e[10]*a[7],t[8]=e[8]*a[2]+e[9]*a[5]+e[10]*a[8]}}else if(i.x=0,i.y=0,i.z=0,this._computeParticleRotation){const e=n.m;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10]}const o=c[11];e.translateFromPivot?o.setAll(0):o.copyFrom(e.pivot);const x=c[0];x.copyFrom(e.position);const g=x.x-e.pivot.x,y=x.y-e.pivot.y,S=x.z-e.pivot.z;let T=g*t[0]+y*t[3]+S*t[6],E=g*t[1]+y*t[4]+S*t[7],w=g*t[2]+y*t[5]+S*t[8];T+=o.x,E+=o.y,w+=o.z;const C=a[f]=i.x+l.x*T+h.x*E+u.x*w,A=a[f+1]=i.y+l.y*T+h.y*E+u.y*w,P=a[f+2]=i.z+l.z*T+h.z*E+u.z*w;if(this._computeBoundingBox&&(d.minimizeInPlaceFromFloats(C,A,P),p.maximizeInPlaceFromFloats(C,A,P)),this._computeParticleColor&&e.color){const t=e.color,s=this._colors32;s[m]=t.r,s[m+1]=t.g,s[m+2]=t.b,s[m+3]=t.a}if(this._computeParticleTexture&&e.uv){const t=e.uv,s=this._uvs32;s[v]=t.x,s[v+1]=t.y}}return r&&(s&&(this._computeParticleColor&&r.updateVerticesData(x.ColorKind,i,!1,!1),this._computeParticleTexture&&r.updateVerticesData(x.UVKind,o,!1,!1),r.updateVerticesData(x.PositionKind,a,!1,!1)),this._computeBoundingBox&&(r.hasBoundingInfo?r.getBoundingInfo().reConstruct(d,p,r._worldMatrix):r.buildBoundingInfo(d,p,r._worldMatrix))),this.afterUpdateParticles(e,t,s),this}dispose(){this.mesh?.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._uvs32=null,this._colors32=null}refreshVisibleSize(){return this._isVisibilityBoxLocked||this.mesh?.refreshBoundingInfo(),this}setVisibilityBox(e){if(!this.mesh)return;const t=e/2;this.mesh.buildBoundingInfo(new y(-t,-t,-t),new y(t,t,t))}get isAlwaysVisible(){return this._alwaysVisible}set isAlwaysVisible(e){this.mesh&&(this._alwaysVisible=e,this.mesh.alwaysSelectAsActiveMesh=e)}set computeParticleRotation(e){this._computeParticleRotation=e}set computeParticleColor(e){this._computeParticleColor=e}set computeParticleTexture(e){this._computeParticleTexture=e}get computeParticleColor(){return this._computeParticleColor}get computeParticleTexture(){return this._computeParticleTexture}set computeBoundingBox(e){this._computeBoundingBox=e}get computeBoundingBox(){return this._computeBoundingBox}initParticles(){}recycleParticle(e){return e}updateParticle(e){return e}beforeUpdateParticles(e,t,s){}afterUpdateParticles(e,t,s){}}!function(e){e[e.Splat=0]="Splat",e[e.PointCloud=1]="PointCloud",e[e.Mesh=2]="Mesh",e[e.Reject=3]="Reject"}(ve||(ve={}));class Ee{constructor(e=Ee._DefaultLoadingOptions){this.name=k.name,this._assetContainer=null,this.extensions=k.extensions,this._loadingOptions=e}createPlugin(e){return new Ee(e[k.name])}async importMeshAsync(e,t,s,n,r,i){return this._parse(e,t,s,n).then((e=>({meshes:e,particleSystems:[],skeletons:[],animationGroups:[],transformNodes:[],geometries:[],lights:[],spriteManagers:[]})))}static _BuildPointCloud(e,t){if(!t.byteLength)return!1;const s=new Uint8Array(t),n=new Float32Array(t),r=s.length/32;return e.addPoints(r,(function(e,t){const r=n[8*t+0],i=n[8*t+1],a=n[8*t+2];e.position=new y(r,i,a);const o=s[32*t+24+0]/255,c=s[32*t+24+1]/255,l=s[32*t+24+2]/255;e.color=new I(o,c,l,1)})),!0}static _BuildMesh(e,t){const s=new v("PLYMesh",e),n=new Uint8Array(t.data),r=new Float32Array(t.data),i=n.length/32,a=[],o=new S;for(let e=0;e<i;e++){const t=r[8*e+0],s=r[8*e+1],n=r[8*e+2];a.push(t,s,n)}if(t.hasVertexColors){const e=new Float32Array(4*i);for(let t=0;t<i;t++){const s=n[32*t+24+0]/255,r=n[32*t+24+1]/255,i=n[32*t+24+2]/255;e[4*t+0]=s,e[4*t+1]=r,e[4*t+2]=i,e[4*t+3]=1}o.colors=e}return o.positions=a,o.indices=t.faces,o.applyToMesh(s),s}_parseSPZ(e,t){const s=new Uint8Array(e),n=new Uint32Array(e),r=n[2],i=s[12],a=s[13];if(s[15]||1347635022!=n[0]||2!=n[1])return new Promise((e=>{e({mode:3,data:o,hasVertexColors:!1})}));const o=new ArrayBuffer(32*r),c=1/(1<<a),l=new Int32Array(1),h=new Uint8Array(l.buffer),u=function(e,t){return h[0]=e[t+0],h[1]=e[t+1],h[2]=e[t+2],h[3]=128&e[t+2]?255:0,l[0]*c};let d=16;const p=new Float32Array(o),_=new Float32Array(o),x=new Uint8ClampedArray(o),f=new Uint8ClampedArray(o);for(let e=0;e<r;e++)p[8*e+0]=u(s,d+0),p[8*e+1]=-u(s,d+3),p[8*e+2]=u(s,d+6),d+=9;const m=.282;for(let e=0;e<r;e++){const t=s[d+r+3*e+0],n=s[d+r+3*e+1],i=s[d+r+3*e+2];x[32*e+24+0]=Math.max(Math.min(2.128*(t/255-m)*255,255),0),x[32*e+24+1]=Math.max(Math.min(2.128*(n/255-m)*255,255),0),x[32*e+24+2]=Math.max(Math.min(2.128*(i/255-m)*255,255),0),x[32*e+24+3]=s[d+e]}d+=4*r;for(let e=0;e<r;e++)_[8*e+3+0]=Math.exp(s[d+0]/16-10),_[8*e+3+1]=Math.exp(s[d+1]/16-10),_[8*e+3+2]=Math.exp(s[d+2]/16-10),d+=3;for(let e=0;e<r;e++){const t=s[d+0],n=s[d+1],r=s[d+2],i=t/127.5-1,a=n/127.5-1,o=r/127.5-1;f[32*e+28+1]=t,f[32*e+28+2]=n,f[32*e+28+3]=r;const c=1-(i*i+a*a+o*o);f[32*e+28+0]=127.5-127.5*Math.sqrt(c<0?0:c),d+=3}if(i){const e=3*((i+1)*(i+1)-1),n=Math.ceil(e/16);let a=d;const c=[],l=t.getEngine().getCaps().maxTextureSize,h=Math.ceil(r/l);for(let e=0;e<n;e++){const e=new Uint8Array(h*l*4*4);c.push(e)}for(let t=0;t<r;t++)for(let n=0;n<e;n++){const e=s[a++],r=Math.floor(n/16);c[r][n%16+16*t]=e}return new Promise((e=>{e({mode:0,data:o,hasVertexColors:!1,sh:c})}))}return new Promise((e=>{e({mode:0,data:o,hasVertexColors:!1})}))}_parse(e,t,s,n){const r=[],i=new ReadableStream({start(e){e.enqueue(new Uint8Array(s)),e.close()}}),a=new DecompressionStream("gzip"),o=i.pipeThrough(a);return new Promise((e=>{new Response(o).arrayBuffer().then((s=>{this._parseSPZ(s,t).then((e=>{const s=new ge("GaussianSplatting",null,t,this._loadingOptions.keepInRam);s._parentContainer=this._assetContainer,r.push(s),s.updateData(e.data,e.sh)})),e(r)})).catch((()=>{Ee._ConvertPLYToSplat(s).then((async e=>{switch(e.mode){case 0:{const s=new ge("GaussianSplatting",null,t,this._loadingOptions.keepInRam);s._parentContainer=this._assetContainer,r.push(s),s.updateData(e.data)}break;case 1:{const s=new Te("PointCloud",1,t);Ee._BuildPointCloud(s,e.data)?await s.buildMeshAsync().then((e=>{r.push(e)})):s.dispose()}break;case 2:if(!e.faces)throw new Error("PLY mesh doesn't contain face informations.");r.push(Ee._BuildMesh(t,e));break;default:throw new Error("Unsupported Splat mode")}})),e(r)}))}))}loadAssetContainerAsync(e,t,s){const n=new N(e);return this._assetContainer=n,this.importMeshAsync(null,e,t,s).then((e=>(e.meshes.forEach((e=>n.meshes.push(e))),this._assetContainer=null,n))).catch((e=>{throw this._assetContainer=null,e}))}loadAsync(e,t,s){return this.importMeshAsync(null,e,t,s).then((()=>{}))}static _ConvertPLYToSplat(e){const t=new Uint8Array(e),s=(new TextDecoder).decode(t.slice(0,10240)),n="end_header\n",r=s.indexOf(n);if(r<0||!s)return new Promise((t=>{t({mode:0,data:e})}));const i=parseInt(/element vertex (\d+)\n/.exec(s)[1]),a=/element face (\d+)\n/.exec(s);let o=0;a&&(o=parseInt(a[1]));const c=/element chunk (\d+)\n/.exec(s);let l=0;c&&(l=parseInt(c[1]));let h=0,u=0;const d={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let p;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(p||(p={}));let _=1;const x=[],f=s.slice(0,r).split("\n");for(const e of f)if(e.startsWith("property ")){const[,t,s]=e.split(" ");1==_?u+=d[t]:0==_&&(x.push({name:s,type:t,offset:h}),h+=d[t]),d[t]||w.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?_=1:"vertex"==t&&(_=0)}const m=h,v=u;return ge.ConvertPLYToSplatAsync(e).then((t=>{const s=new DataView(e,r+11);let n=v*l+m*i;const a=[];if(o)for(let e=0;e<o;e++){const e=s.getUint8(n);if(3==e){n+=1;for(let t=0;t<e;t++){const e=s.getUint32(n+4*(2-t),!0);a.push(e)}n+=12}}if(l)return new Promise((e=>{e({mode:0,data:t,faces:a,hasVertexColors:!1})}));let c=0,h=0;const u=["x","y","z","scale_0","scale_1","scale_2","opacity","rot_0","rot_1","rot_2","rot_3"],d=["red","green","blue","f_dc_0","f_dc_1","f_dc_2"];for(let e=0;e<x.length;e++){const t=x[e];u.includes(t.name)&&c++,d.includes(t.name)&&h++}const p=c==u.length&&3==h,_=o?2:p?0:1;return new Promise((e=>{e({mode:_,data:t,faces:a,hasVertexColors:!!h})}))}))}}Ee._DefaultLoadingOptions={keepInRam:!1},H(new Ee);export{Ee as SPLATFileLoader};
2
+ //# sourceMappingURL=splatFileLoader-fz6lXWf1.esm.min.js.map