@babylonjs/viewer 7.36.0 → 7.37.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 (599) 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_image_based-B3i_v86N.esm.js +171 -0
  7. package/dist/chunks/EXT_lights_image_based-B3i_v86N.esm.js.map +1 -0
  8. package/dist/chunks/EXT_lights_image_based-F9_9oKGw.esm.min.js +2 -0
  9. package/dist/chunks/EXT_lights_image_based-F9_9oKGw.esm.min.js.map +1 -0
  10. package/dist/chunks/EXT_mesh_gpu_instancing-BUGJNTuv.esm.js +86 -0
  11. package/dist/chunks/EXT_mesh_gpu_instancing-BUGJNTuv.esm.js.map +1 -0
  12. package/dist/chunks/EXT_mesh_gpu_instancing-ouu-sC4v.esm.min.js +2 -0
  13. package/dist/chunks/EXT_mesh_gpu_instancing-ouu-sC4v.esm.min.js.map +1 -0
  14. package/dist/chunks/EXT_meshopt_compression-BoFlIVIo.esm.js +134 -0
  15. package/dist/chunks/EXT_meshopt_compression-BoFlIVIo.esm.js.map +1 -0
  16. package/dist/chunks/EXT_meshopt_compression-CBHVR9-g.esm.min.js +2 -0
  17. package/dist/chunks/EXT_meshopt_compression-CBHVR9-g.esm.min.js.map +1 -0
  18. package/dist/chunks/EXT_texture_avif-BiDJEaYr.esm.js +44 -0
  19. package/dist/chunks/EXT_texture_avif-BiDJEaYr.esm.js.map +1 -0
  20. package/dist/chunks/EXT_texture_avif-CpcKIP2U.esm.min.js +2 -0
  21. package/dist/chunks/EXT_texture_avif-CpcKIP2U.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_webp-9-weZ5t9.esm.js +43 -0
  23. package/dist/chunks/EXT_texture_webp-9-weZ5t9.esm.js.map +1 -0
  24. package/dist/chunks/EXT_texture_webp-BEzvwccL.esm.min.js +2 -0
  25. package/dist/chunks/EXT_texture_webp-BEzvwccL.esm.min.js.map +1 -0
  26. package/dist/chunks/ExtrasAsMetadata-2fKDjP-P.esm.min.js +2 -0
  27. package/dist/chunks/ExtrasAsMetadata-2fKDjP-P.esm.min.js.map +1 -0
  28. package/dist/chunks/ExtrasAsMetadata-DGBpP5kO.esm.js +64 -0
  29. package/dist/chunks/ExtrasAsMetadata-DGBpP5kO.esm.js.map +1 -0
  30. package/dist/chunks/KHR_animation_pointer-BGUym5aA.esm.min.js +2 -0
  31. package/dist/chunks/KHR_animation_pointer-BGUym5aA.esm.min.js.map +1 -0
  32. package/dist/chunks/KHR_animation_pointer-Bs26S___.esm.js +343 -0
  33. package/dist/chunks/KHR_animation_pointer-Bs26S___.esm.js.map +1 -0
  34. package/dist/chunks/KHR_draco_mesh_compression-BgmSGmi8.esm.min.js +2 -0
  35. package/dist/chunks/KHR_draco_mesh_compression-BgmSGmi8.esm.min.js.map +1 -0
  36. package/dist/chunks/KHR_draco_mesh_compression-sPxRDkD2.esm.js +617 -0
  37. package/dist/chunks/KHR_draco_mesh_compression-sPxRDkD2.esm.js.map +1 -0
  38. package/dist/chunks/KHR_interactivity-DDWPhJ-6.esm.js +4033 -0
  39. package/dist/chunks/KHR_interactivity-DDWPhJ-6.esm.js.map +1 -0
  40. package/dist/chunks/KHR_interactivity-DE92WJwh.esm.min.js +2 -0
  41. package/dist/chunks/KHR_interactivity-DE92WJwh.esm.min.js.map +1 -0
  42. package/dist/chunks/KHR_lights_punctual-C_akUY-5.esm.js +1253 -0
  43. package/dist/chunks/KHR_lights_punctual-C_akUY-5.esm.js.map +1 -0
  44. package/dist/chunks/KHR_lights_punctual-D-NJr9sx.esm.min.js +2 -0
  45. package/dist/chunks/KHR_lights_punctual-D-NJr9sx.esm.min.js.map +1 -0
  46. package/dist/chunks/KHR_materials_anisotropy-DuBZh7v4.esm.js +65 -0
  47. package/dist/chunks/KHR_materials_anisotropy-DuBZh7v4.esm.js.map +1 -0
  48. package/dist/chunks/KHR_materials_anisotropy-XJzw4SB7.esm.min.js +2 -0
  49. package/dist/chunks/KHR_materials_anisotropy-XJzw4SB7.esm.min.js.map +1 -0
  50. package/dist/chunks/KHR_materials_clearcoat-BjeqEjMn.esm.min.js +2 -0
  51. package/dist/chunks/KHR_materials_clearcoat-BjeqEjMn.esm.min.js.map +1 -0
  52. package/dist/chunks/KHR_materials_clearcoat-C_mF7kgI.esm.js +96 -0
  53. package/dist/chunks/KHR_materials_clearcoat-C_mF7kgI.esm.js.map +1 -0
  54. package/dist/chunks/KHR_materials_diffuse_transmission-B5xJ8gLo.esm.min.js +2 -0
  55. package/dist/chunks/KHR_materials_diffuse_transmission-B5xJ8gLo.esm.min.js.map +1 -0
  56. package/dist/chunks/KHR_materials_diffuse_transmission-BvtuXbx8.esm.js +97 -0
  57. package/dist/chunks/KHR_materials_diffuse_transmission-BvtuXbx8.esm.js.map +1 -0
  58. package/dist/chunks/KHR_materials_dispersion-DceW_6jg.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_dispersion-DceW_6jg.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_dispersion-DnMdHuwS.esm.js +62 -0
  61. package/dist/chunks/KHR_materials_dispersion-DnMdHuwS.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_emissive_strength-BJxrDXxa.esm.js +55 -0
  63. package/dist/chunks/KHR_materials_emissive_strength-BJxrDXxa.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_emissive_strength-T7Ioofbj.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_emissive_strength-T7Ioofbj.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_ior-BebDlrzl.esm.js +64 -0
  67. package/dist/chunks/KHR_materials_ior-BebDlrzl.esm.js.map +1 -0
  68. package/dist/chunks/KHR_materials_ior-BiXD3wbo.esm.min.js +2 -0
  69. package/dist/chunks/KHR_materials_ior-BiXD3wbo.esm.min.js.map +1 -0
  70. package/dist/chunks/KHR_materials_iridescence-BG0uvS2K.esm.min.js +2 -0
  71. package/dist/chunks/KHR_materials_iridescence-BG0uvS2K.esm.min.js.map +1 -0
  72. package/dist/chunks/KHR_materials_iridescence-DQz8GQbO.esm.js +72 -0
  73. package/dist/chunks/KHR_materials_iridescence-DQz8GQbO.esm.js.map +1 -0
  74. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B3r0Mafb.esm.js +81 -0
  75. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B3r0Mafb.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_lN5X8jS.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_lN5X8jS.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_sheen-BtnO_FAS.esm.min.js +2 -0
  79. package/dist/chunks/KHR_materials_sheen-BtnO_FAS.esm.min.js.map +1 -0
  80. package/dist/chunks/KHR_materials_sheen-Ca0m-FCR.esm.js +85 -0
  81. package/dist/chunks/KHR_materials_sheen-Ca0m-FCR.esm.js.map +1 -0
  82. package/dist/chunks/KHR_materials_specular-Coku-eWK.esm.js +75 -0
  83. package/dist/chunks/KHR_materials_specular-Coku-eWK.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_specular-DV0Eoetb.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_specular-DV0Eoetb.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_transmission-Ca9E-UZ-.esm.min.js +2 -0
  87. package/dist/chunks/KHR_materials_transmission-Ca9E-UZ-.esm.min.js.map +1 -0
  88. package/dist/chunks/KHR_materials_transmission-CuudPQVC.esm.js +307 -0
  89. package/dist/chunks/KHR_materials_transmission-CuudPQVC.esm.js.map +1 -0
  90. package/dist/chunks/KHR_materials_unlit-BAGBsUkU.esm.min.js +2 -0
  91. package/dist/chunks/KHR_materials_unlit-BAGBsUkU.esm.min.js.map +1 -0
  92. package/dist/chunks/KHR_materials_unlit-Buu1Z1HL.esm.js +74 -0
  93. package/dist/chunks/KHR_materials_unlit-Buu1Z1HL.esm.js.map +1 -0
  94. package/dist/chunks/KHR_materials_variants-CMcKgGG2.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_variants-CMcKgGG2.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_variants-DFu4FrrH.esm.js +238 -0
  97. package/dist/chunks/KHR_materials_variants-DFu4FrrH.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_volume-CQMEAbf4.esm.js +87 -0
  99. package/dist/chunks/KHR_materials_volume-CQMEAbf4.esm.js.map +1 -0
  100. package/dist/chunks/KHR_materials_volume-ClGrFvKp.esm.min.js +2 -0
  101. package/dist/chunks/KHR_materials_volume-ClGrFvKp.esm.min.js.map +1 -0
  102. package/dist/chunks/KHR_mesh_quantization-Cbejp093.esm.js +26 -0
  103. package/dist/chunks/KHR_mesh_quantization-Cbejp093.esm.js.map +1 -0
  104. package/dist/chunks/KHR_mesh_quantization-DRPaTiWR.esm.min.js +2 -0
  105. package/dist/chunks/KHR_mesh_quantization-DRPaTiWR.esm.min.js.map +1 -0
  106. package/dist/chunks/KHR_node_visibility-BjfB0zna.esm.js +46 -0
  107. package/dist/chunks/KHR_node_visibility-BjfB0zna.esm.js.map +1 -0
  108. package/dist/chunks/KHR_node_visibility-CBw8B38Q.esm.min.js +2 -0
  109. package/dist/chunks/KHR_node_visibility-CBw8B38Q.esm.min.js.map +1 -0
  110. package/dist/chunks/KHR_texture_basisu-DBjIO7B4.esm.js +43 -0
  111. package/dist/chunks/KHR_texture_basisu-DBjIO7B4.esm.js.map +1 -0
  112. package/dist/chunks/KHR_texture_basisu-DKylW8Yx.esm.min.js +2 -0
  113. package/dist/chunks/KHR_texture_basisu-DKylW8Yx.esm.min.js.map +1 -0
  114. package/dist/chunks/KHR_texture_transform-D6mg2ZiK.esm.js +63 -0
  115. package/dist/chunks/KHR_texture_transform-D6mg2ZiK.esm.js.map +1 -0
  116. package/dist/chunks/KHR_texture_transform-htHBWqOc.esm.min.js +2 -0
  117. package/dist/chunks/KHR_texture_transform-htHBWqOc.esm.min.js.map +1 -0
  118. package/dist/chunks/KHR_xmp_json_ld-CvW3Ai8F.esm.js +51 -0
  119. package/dist/chunks/KHR_xmp_json_ld-CvW3Ai8F.esm.js.map +1 -0
  120. package/dist/chunks/KHR_xmp_json_ld-uYsLxYOz.esm.min.js +2 -0
  121. package/dist/chunks/KHR_xmp_json_ld-uYsLxYOz.esm.min.js.map +1 -0
  122. package/dist/chunks/MSFT_audio_emitter-DTJWk2eV.esm.min.js +2 -0
  123. package/dist/chunks/MSFT_audio_emitter-DTJWk2eV.esm.min.js.map +1 -0
  124. package/dist/chunks/MSFT_audio_emitter-oPM3iu4F.esm.js +2207 -0
  125. package/dist/chunks/MSFT_audio_emitter-oPM3iu4F.esm.js.map +1 -0
  126. package/dist/chunks/MSFT_lod-CuSynNTS.esm.js +337 -0
  127. package/dist/chunks/MSFT_lod-CuSynNTS.esm.js.map +1 -0
  128. package/dist/chunks/MSFT_lod-PjlomwUl.esm.min.js +2 -0
  129. package/dist/chunks/MSFT_lod-PjlomwUl.esm.min.js.map +1 -0
  130. package/dist/chunks/MSFT_minecraftMesh-BRBTW8ta.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_minecraftMesh-BRBTW8ta.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_minecraftMesh-DDlu3iRW.esm.js +46 -0
  133. package/dist/chunks/MSFT_minecraftMesh-DDlu3iRW.esm.js.map +1 -0
  134. package/dist/chunks/MSFT_sRGBFactors-BIOzrPxY.esm.min.js +2 -0
  135. package/dist/chunks/MSFT_sRGBFactors-BIOzrPxY.esm.min.js.map +1 -0
  136. package/dist/chunks/MSFT_sRGBFactors-CspQlvZh.esm.js +47 -0
  137. package/dist/chunks/MSFT_sRGBFactors-CspQlvZh.esm.js.map +1 -0
  138. package/dist/chunks/animationGroup-CL3Oz5Z0.esm.min.js +2 -0
  139. package/dist/chunks/animationGroup-CL3Oz5Z0.esm.min.js.map +1 -0
  140. package/dist/chunks/animationGroup-DRKiD9h6.esm.js +2482 -0
  141. package/dist/chunks/animationGroup-DRKiD9h6.esm.js.map +1 -0
  142. package/dist/chunks/assetContainer-D_8hiZKA.esm.js +1720 -0
  143. package/dist/chunks/assetContainer-D_8hiZKA.esm.js.map +1 -0
  144. package/dist/chunks/assetContainer-FA9ojI1I.esm.min.js +2 -0
  145. package/dist/chunks/assetContainer-FA9ojI1I.esm.min.js.map +1 -0
  146. package/dist/chunks/audioEngine-C-sKz5RP.esm.min.js +2 -0
  147. package/dist/chunks/audioEngine-C-sKz5RP.esm.min.js.map +1 -0
  148. package/dist/chunks/audioEngine-CvJDx4Q8.esm.js +305 -0
  149. package/dist/chunks/audioEngine-CvJDx4Q8.esm.js.map +1 -0
  150. package/dist/chunks/bakedVertexAnimation-BsPKKHjr.esm.min.js +2 -0
  151. package/dist/chunks/bakedVertexAnimation-BsPKKHjr.esm.min.js.map +1 -0
  152. package/dist/chunks/bakedVertexAnimation-DulpQEBV.esm.js +114 -0
  153. package/dist/chunks/bakedVertexAnimation-DulpQEBV.esm.js.map +1 -0
  154. package/dist/chunks/basisTextureLoader-B_r12OUF.esm.min.js +2 -0
  155. package/dist/chunks/basisTextureLoader-B_r12OUF.esm.min.js.map +1 -0
  156. package/dist/chunks/basisTextureLoader-Drw-ZVC0.esm.js +600 -0
  157. package/dist/chunks/basisTextureLoader-Drw-ZVC0.esm.js.map +1 -0
  158. package/dist/chunks/dds-BXiJypJ7.esm.js +540 -0
  159. package/dist/chunks/dds-BXiJypJ7.esm.js.map +1 -0
  160. package/dist/chunks/dds-C6ZHg-Bp.esm.min.js +2 -0
  161. package/dist/chunks/dds-C6ZHg-Bp.esm.min.js.map +1 -0
  162. package/dist/chunks/ddsTextureLoader-DgfGb80Z.esm.js +88 -0
  163. package/dist/chunks/ddsTextureLoader-DgfGb80Z.esm.js.map +1 -0
  164. package/dist/chunks/ddsTextureLoader-bPQ4ZVv4.esm.min.js +2 -0
  165. package/dist/chunks/ddsTextureLoader-bPQ4ZVv4.esm.min.js.map +1 -0
  166. package/dist/chunks/decalFragment-BpOnZOVp.esm.js +18 -0
  167. package/dist/chunks/decalFragment-BpOnZOVp.esm.js.map +1 -0
  168. package/dist/chunks/decalFragment-DbkDUo1S.esm.min.js +2 -0
  169. package/dist/chunks/decalFragment-DbkDUo1S.esm.min.js.map +1 -0
  170. package/dist/chunks/default.fragment-Crru0QNN.esm.min.js +2 -0
  171. package/dist/chunks/default.fragment-Crru0QNN.esm.min.js.map +1 -0
  172. package/dist/chunks/default.fragment-CxCyfbls.esm.js +433 -0
  173. package/dist/chunks/default.fragment-CxCyfbls.esm.js.map +1 -0
  174. package/dist/chunks/default.fragment-DA6kjpAQ.esm.min.js +2 -0
  175. package/dist/chunks/default.fragment-DA6kjpAQ.esm.min.js.map +1 -0
  176. package/dist/chunks/default.fragment-DWYF0Ivm.esm.js +497 -0
  177. package/dist/chunks/default.fragment-DWYF0Ivm.esm.js.map +1 -0
  178. package/dist/chunks/default.vertex-Bpzr6sJq.esm.min.js +2 -0
  179. package/dist/chunks/default.vertex-Bpzr6sJq.esm.min.js.map +1 -0
  180. package/dist/chunks/default.vertex-C5owo_r2.esm.js +181 -0
  181. package/dist/chunks/default.vertex-C5owo_r2.esm.js.map +1 -0
  182. package/dist/chunks/default.vertex-ClbZq87W.esm.min.js +2 -0
  183. package/dist/chunks/default.vertex-ClbZq87W.esm.min.js.map +1 -0
  184. package/dist/chunks/default.vertex-DvfVsBbt.esm.js +201 -0
  185. package/dist/chunks/default.vertex-DvfVsBbt.esm.js.map +1 -0
  186. package/dist/chunks/defaultUboDeclaration-BCpFsRl0.esm.js +13 -0
  187. package/dist/chunks/defaultUboDeclaration-BCpFsRl0.esm.js.map +1 -0
  188. package/dist/chunks/defaultUboDeclaration-BkPkSkeR.esm.min.js +2 -0
  189. package/dist/chunks/defaultUboDeclaration-BkPkSkeR.esm.min.js.map +1 -0
  190. package/dist/chunks/defaultUboDeclaration-CBkzLqUL.esm.js +15 -0
  191. package/dist/chunks/defaultUboDeclaration-CBkzLqUL.esm.js.map +1 -0
  192. package/dist/chunks/defaultUboDeclaration-DM6YTmmJ.esm.min.js +2 -0
  193. package/dist/chunks/defaultUboDeclaration-DM6YTmmJ.esm.min.js.map +1 -0
  194. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  195. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  196. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  197. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  198. package/dist/chunks/dumpTools-DEE0JNhe.esm.js +200 -0
  199. package/dist/chunks/dumpTools-DEE0JNhe.esm.js.map +1 -0
  200. package/dist/chunks/dumpTools-Dq65RGnm.esm.min.js +2 -0
  201. package/dist/chunks/dumpTools-Dq65RGnm.esm.min.js.map +1 -0
  202. package/dist/chunks/engine-CeL5Q4lw.esm.js +2220 -0
  203. package/dist/chunks/engine-CeL5Q4lw.esm.js.map +1 -0
  204. package/dist/chunks/engine-DT2G_lds.esm.min.js +2 -0
  205. package/dist/chunks/engine-DT2G_lds.esm.min.js.map +1 -0
  206. package/dist/chunks/engine.common-C9H9gh9W.esm.js +1162 -0
  207. package/dist/chunks/engine.common-C9H9gh9W.esm.js.map +1 -0
  208. package/dist/chunks/engine.common-CdhJvxwm.esm.min.js +2 -0
  209. package/dist/chunks/engine.common-CdhJvxwm.esm.min.js.map +1 -0
  210. package/dist/chunks/envTextureLoader-74tnifoT.esm.js +64 -0
  211. package/dist/chunks/envTextureLoader-74tnifoT.esm.js.map +1 -0
  212. package/dist/chunks/envTextureLoader-Dl937sIO.esm.min.js +2 -0
  213. package/dist/chunks/envTextureLoader-Dl937sIO.esm.min.js.map +1 -0
  214. package/dist/chunks/environmentTextureTools-ClEgwgya.esm.js +382 -0
  215. package/dist/chunks/environmentTextureTools-ClEgwgya.esm.js.map +1 -0
  216. package/dist/chunks/environmentTextureTools-DURIVP9U.esm.min.js +2 -0
  217. package/dist/chunks/environmentTextureTools-DURIVP9U.esm.min.js.map +1 -0
  218. package/dist/chunks/exrTextureLoader-BGXbJGBe.esm.js +1682 -0
  219. package/dist/chunks/exrTextureLoader-BGXbJGBe.esm.js.map +1 -0
  220. package/dist/chunks/exrTextureLoader-ZRs_EAQa.esm.min.js +2 -0
  221. package/dist/chunks/exrTextureLoader-ZRs_EAQa.esm.min.js.map +1 -0
  222. package/dist/chunks/fogFragment-BFKmSOC6.esm.js +102 -0
  223. package/dist/chunks/fogFragment-BFKmSOC6.esm.js.map +1 -0
  224. package/dist/chunks/fogFragment-BPVmPyK6.esm.js +101 -0
  225. package/dist/chunks/fogFragment-BPVmPyK6.esm.js.map +1 -0
  226. package/dist/chunks/fogFragment-DfLgusf7.esm.min.js +2 -0
  227. package/dist/chunks/fogFragment-DfLgusf7.esm.min.js.map +1 -0
  228. package/dist/chunks/fogFragment-uKmBf3r6.esm.min.js +2 -0
  229. package/dist/chunks/fogFragment-uKmBf3r6.esm.min.js.map +1 -0
  230. package/dist/chunks/fresnelFunction-69xZoG8U.esm.min.js +2 -0
  231. package/dist/chunks/fresnelFunction-69xZoG8U.esm.min.js.map +1 -0
  232. package/dist/chunks/fresnelFunction-piF4l7eF.esm.js +12 -0
  233. package/dist/chunks/fresnelFunction-piF4l7eF.esm.js.map +1 -0
  234. package/dist/chunks/glTFLoader-C1ef0xPc.esm.min.js +2 -0
  235. package/dist/chunks/glTFLoader-C1ef0xPc.esm.min.js.map +1 -0
  236. package/dist/chunks/glTFLoader-UTdbOHEt.esm.js +7606 -0
  237. package/dist/chunks/glTFLoader-UTdbOHEt.esm.js.map +1 -0
  238. package/dist/chunks/glTFLoaderAnimation-CapCmtyI.esm.js +77 -0
  239. package/dist/chunks/glTFLoaderAnimation-CapCmtyI.esm.js.map +1 -0
  240. package/dist/chunks/glTFLoaderAnimation-D31eUw-v.esm.min.js +2 -0
  241. package/dist/chunks/glTFLoaderAnimation-D31eUw-v.esm.min.js.map +1 -0
  242. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  243. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  244. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  245. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  246. package/dist/chunks/harmonicsFunctions-BOh29Gl-.esm.min.js +2 -0
  247. package/dist/chunks/harmonicsFunctions-BOh29Gl-.esm.min.js.map +1 -0
  248. package/dist/chunks/harmonicsFunctions-CPE4kiHw.esm.js +35 -0
  249. package/dist/chunks/harmonicsFunctions-CPE4kiHw.esm.js.map +1 -0
  250. package/dist/chunks/harmonicsFunctions-RPeiDmS4.esm.js +34 -0
  251. package/dist/chunks/harmonicsFunctions-RPeiDmS4.esm.js.map +1 -0
  252. package/dist/chunks/harmonicsFunctions-rQv4s0QP.esm.min.js +2 -0
  253. package/dist/chunks/harmonicsFunctions-rQv4s0QP.esm.min.js.map +1 -0
  254. package/dist/chunks/hdrTextureLoader-Dd17jp9W.esm.min.js +2 -0
  255. package/dist/chunks/hdrTextureLoader-Dd17jp9W.esm.min.js.map +1 -0
  256. package/dist/chunks/hdrTextureLoader-DsR_wESy.esm.js +252 -0
  257. package/dist/chunks/hdrTextureLoader-DsR_wESy.esm.js.map +1 -0
  258. package/dist/chunks/helperFunctions-Ce53D1y-.esm.min.js +2 -0
  259. package/dist/chunks/helperFunctions-Ce53D1y-.esm.min.js.map +1 -0
  260. package/dist/chunks/helperFunctions-D2c1ru49.esm.js +80 -0
  261. package/dist/chunks/helperFunctions-D2c1ru49.esm.js.map +1 -0
  262. package/dist/chunks/helperFunctions-VmMN0Mna.esm.js +108 -0
  263. package/dist/chunks/helperFunctions-VmMN0Mna.esm.js.map +1 -0
  264. package/dist/chunks/helperFunctions-zdjEtnRv.esm.min.js +2 -0
  265. package/dist/chunks/helperFunctions-zdjEtnRv.esm.min.js.map +1 -0
  266. package/dist/chunks/index-DBm7fzXf.esm.js +74321 -0
  267. package/dist/chunks/index-DBm7fzXf.esm.js.map +1 -0
  268. package/dist/chunks/index-jZFAQQur.esm.min.js +57 -0
  269. package/dist/chunks/index-jZFAQQur.esm.min.js.map +1 -0
  270. package/dist/chunks/ktxTextureLoader-9vfBC6UL.esm.js +814 -0
  271. package/dist/chunks/ktxTextureLoader-9vfBC6UL.esm.js.map +1 -0
  272. package/dist/chunks/ktxTextureLoader-B7knlkAj.esm.min.js +2 -0
  273. package/dist/chunks/ktxTextureLoader-B7knlkAj.esm.min.js.map +1 -0
  274. package/dist/chunks/logDepthDeclaration-BftGsCo7.esm.js +11 -0
  275. package/dist/chunks/logDepthDeclaration-BftGsCo7.esm.js.map +1 -0
  276. package/dist/chunks/logDepthDeclaration-Bm8zN8U1.esm.js +35 -0
  277. package/dist/chunks/logDepthDeclaration-Bm8zN8U1.esm.js.map +1 -0
  278. package/dist/chunks/logDepthDeclaration-D73_rPEp.esm.min.js +2 -0
  279. package/dist/chunks/logDepthDeclaration-D73_rPEp.esm.min.js.map +1 -0
  280. package/dist/chunks/logDepthDeclaration-Dine9EAs.esm.min.js +2 -0
  281. package/dist/chunks/logDepthDeclaration-Dine9EAs.esm.min.js.map +1 -0
  282. package/dist/chunks/logDepthVertex-3p3eoh78.esm.min.js +2 -0
  283. package/dist/chunks/logDepthVertex-3p3eoh78.esm.min.js.map +1 -0
  284. package/dist/chunks/logDepthVertex-CQfs32P9.esm.js +77 -0
  285. package/dist/chunks/logDepthVertex-CQfs32P9.esm.js.map +1 -0
  286. package/dist/chunks/logDepthVertex-Dr2Pw6AH.esm.js +77 -0
  287. package/dist/chunks/logDepthVertex-Dr2Pw6AH.esm.js.map +1 -0
  288. package/dist/chunks/logDepthVertex-Duy4jBoh.esm.min.js +2 -0
  289. package/dist/chunks/logDepthVertex-Duy4jBoh.esm.min.js.map +1 -0
  290. package/dist/chunks/mainUVVaryingDeclaration-63j_hdLk.esm.min.js +2 -0
  291. package/dist/chunks/mainUVVaryingDeclaration-63j_hdLk.esm.min.js.map +1 -0
  292. package/dist/chunks/mainUVVaryingDeclaration-BYMyGmMe.esm.js +11 -0
  293. package/dist/chunks/mainUVVaryingDeclaration-BYMyGmMe.esm.js.map +1 -0
  294. package/dist/chunks/mainUVVaryingDeclaration-D1G2R6CM.esm.min.js +2 -0
  295. package/dist/chunks/mainUVVaryingDeclaration-D1G2R6CM.esm.min.js.map +1 -0
  296. package/dist/chunks/mainUVVaryingDeclaration-DmvpmbUk.esm.js +11 -0
  297. package/dist/chunks/mainUVVaryingDeclaration-DmvpmbUk.esm.js.map +1 -0
  298. package/dist/chunks/meshUboDeclaration-BJv8KmAx.esm.min.js +2 -0
  299. package/dist/chunks/meshUboDeclaration-BJv8KmAx.esm.min.js.map +1 -0
  300. package/dist/chunks/meshUboDeclaration-yc1dSO0t.esm.js +24 -0
  301. package/dist/chunks/meshUboDeclaration-yc1dSO0t.esm.js.map +1 -0
  302. package/dist/chunks/objFileLoader-BMu0qrzr.esm.js +1338 -0
  303. package/dist/chunks/objFileLoader-BMu0qrzr.esm.js.map +1 -0
  304. package/dist/chunks/objFileLoader-i02qqOmW.esm.min.js +2 -0
  305. package/dist/chunks/objFileLoader-i02qqOmW.esm.min.js.map +1 -0
  306. package/dist/chunks/oitFragment-CH-SMl3Y.esm.js +1051 -0
  307. package/dist/chunks/oitFragment-CH-SMl3Y.esm.js.map +1 -0
  308. package/dist/chunks/oitFragment-Dv1eSAch.esm.min.js +2 -0
  309. package/dist/chunks/oitFragment-Dv1eSAch.esm.min.js.map +1 -0
  310. package/dist/chunks/oitFragment-Dy4y_3Q1.esm.min.js +2 -0
  311. package/dist/chunks/oitFragment-Dy4y_3Q1.esm.min.js.map +1 -0
  312. package/dist/chunks/oitFragment-gO2AJPMS.esm.js +1210 -0
  313. package/dist/chunks/oitFragment-gO2AJPMS.esm.js.map +1 -0
  314. package/dist/chunks/pass.fragment-3MBFymab.esm.js +15 -0
  315. package/dist/chunks/pass.fragment-3MBFymab.esm.js.map +1 -0
  316. package/dist/chunks/pass.fragment-9DV47zDM.esm.min.js +2 -0
  317. package/dist/chunks/pass.fragment-9DV47zDM.esm.min.js.map +1 -0
  318. package/dist/chunks/pass.fragment-CjPVw0cM.esm.js +15 -0
  319. package/dist/chunks/pass.fragment-CjPVw0cM.esm.js.map +1 -0
  320. package/dist/chunks/pass.fragment-DniCNtXz.esm.min.js +2 -0
  321. package/dist/chunks/pass.fragment-DniCNtXz.esm.min.js.map +1 -0
  322. package/dist/chunks/pbr.fragment-BfcLIVzL.esm.js +3218 -0
  323. package/dist/chunks/pbr.fragment-BfcLIVzL.esm.js.map +1 -0
  324. package/dist/chunks/pbr.fragment-C3w-Umr6.esm.js +3165 -0
  325. package/dist/chunks/pbr.fragment-C3w-Umr6.esm.js.map +1 -0
  326. package/dist/chunks/pbr.fragment-COVEAvqz.esm.min.js +2 -0
  327. package/dist/chunks/pbr.fragment-COVEAvqz.esm.min.js.map +1 -0
  328. package/dist/chunks/pbr.fragment-CYaflBNP.esm.min.js +2 -0
  329. package/dist/chunks/pbr.fragment-CYaflBNP.esm.min.js.map +1 -0
  330. package/dist/chunks/pbr.vertex-Bplm1RvR.esm.min.js +2 -0
  331. package/dist/chunks/pbr.vertex-Bplm1RvR.esm.min.js.map +1 -0
  332. package/dist/chunks/pbr.vertex-CJ6LxTam.esm.min.js +2 -0
  333. package/dist/chunks/pbr.vertex-CJ6LxTam.esm.min.js.map +1 -0
  334. package/dist/chunks/pbr.vertex-aEZZaJVy.esm.js +214 -0
  335. package/dist/chunks/pbr.vertex-aEZZaJVy.esm.js.map +1 -0
  336. package/dist/chunks/pbr.vertex-yjDKBRFi.esm.js +338 -0
  337. package/dist/chunks/pbr.vertex-yjDKBRFi.esm.js.map +1 -0
  338. package/dist/chunks/postprocess.vertex-DkSqDp_B.esm.js +20 -0
  339. package/dist/chunks/postprocess.vertex-DkSqDp_B.esm.js.map +1 -0
  340. package/dist/chunks/postprocess.vertex-jcsw-UdE.esm.min.js +2 -0
  341. package/dist/chunks/postprocess.vertex-jcsw-UdE.esm.min.js.map +1 -0
  342. package/dist/chunks/rawTexture-CYKKtww2.esm.min.js +2 -0
  343. package/dist/chunks/rawTexture-CYKKtww2.esm.min.js.map +1 -0
  344. package/dist/chunks/rawTexture-Dincgc4_.esm.js +191 -0
  345. package/dist/chunks/rawTexture-Dincgc4_.esm.js.map +1 -0
  346. package/dist/chunks/rgbdDecode.fragment-B1L0EyYQ.esm.js +17 -0
  347. package/dist/chunks/rgbdDecode.fragment-B1L0EyYQ.esm.js.map +1 -0
  348. package/dist/chunks/rgbdDecode.fragment-Bf3XkJ56.esm.js +17 -0
  349. package/dist/chunks/rgbdDecode.fragment-Bf3XkJ56.esm.js.map +1 -0
  350. package/dist/chunks/rgbdDecode.fragment-DehfVUqU.esm.min.js +2 -0
  351. package/dist/chunks/rgbdDecode.fragment-DehfVUqU.esm.min.js.map +1 -0
  352. package/dist/chunks/rgbdDecode.fragment-ObclIREU.esm.min.js +2 -0
  353. package/dist/chunks/rgbdDecode.fragment-ObclIREU.esm.min.js.map +1 -0
  354. package/dist/chunks/rgbdEncode.fragment-BUFNbMJl.esm.js +17 -0
  355. package/dist/chunks/rgbdEncode.fragment-BUFNbMJl.esm.js.map +1 -0
  356. package/dist/chunks/rgbdEncode.fragment-C5eGI_F7.esm.min.js +2 -0
  357. package/dist/chunks/rgbdEncode.fragment-C5eGI_F7.esm.min.js.map +1 -0
  358. package/dist/chunks/rgbdEncode.fragment-Cv2rZN9H.esm.js +17 -0
  359. package/dist/chunks/rgbdEncode.fragment-Cv2rZN9H.esm.js.map +1 -0
  360. package/dist/chunks/rgbdEncode.fragment-a2UFva1K.esm.min.js +2 -0
  361. package/dist/chunks/rgbdEncode.fragment-a2UFva1K.esm.min.js.map +1 -0
  362. package/dist/chunks/splatFileLoader-Ci35-grq.esm.js +3948 -0
  363. package/dist/chunks/splatFileLoader-Ci35-grq.esm.js.map +1 -0
  364. package/dist/chunks/splatFileLoader-D6TovORe.esm.min.js +2 -0
  365. package/dist/chunks/splatFileLoader-D6TovORe.esm.min.js.map +1 -0
  366. package/dist/chunks/standardMaterial-CWe_HbM8.esm.js +1805 -0
  367. package/dist/chunks/standardMaterial-CWe_HbM8.esm.js.map +1 -0
  368. package/dist/chunks/standardMaterial-S43MSA6g.esm.min.js +2 -0
  369. package/dist/chunks/standardMaterial-S43MSA6g.esm.min.js.map +1 -0
  370. package/dist/chunks/stlFileLoader-BKWCF44z.esm.min.js +2 -0
  371. package/dist/chunks/stlFileLoader-BKWCF44z.esm.min.js.map +1 -0
  372. package/dist/chunks/stlFileLoader-yX9YZMTi.esm.js +238 -0
  373. package/dist/chunks/stlFileLoader-yX9YZMTi.esm.js.map +1 -0
  374. package/dist/chunks/tgaTextureLoader-Cplo6n3C.esm.min.js +2 -0
  375. package/dist/chunks/tgaTextureLoader-Cplo6n3C.esm.min.js.map +1 -0
  376. package/dist/chunks/tgaTextureLoader-Ih4TItIE.esm.js +349 -0
  377. package/dist/chunks/tgaTextureLoader-Ih4TItIE.esm.js.map +1 -0
  378. package/dist/chunks/thinEngine-CxcDG6-R.esm.min.js +2 -0
  379. package/dist/chunks/thinEngine-CxcDG6-R.esm.min.js.map +1 -0
  380. package/dist/chunks/thinEngine-vHy0Qu0Z.esm.js +3842 -0
  381. package/dist/chunks/thinEngine-vHy0Qu0Z.esm.js.map +1 -0
  382. package/dist/chunks/thinInstanceMesh-CfVH9qgD.esm.js +314 -0
  383. package/dist/chunks/thinInstanceMesh-CfVH9qgD.esm.js.map +1 -0
  384. package/dist/chunks/thinInstanceMesh-DsyDWStO.esm.min.js +2 -0
  385. package/dist/chunks/thinInstanceMesh-DsyDWStO.esm.min.js.map +1 -0
  386. package/dist/chunks/vertexColorMixing-BTsACspH.esm.min.js +2 -0
  387. package/dist/chunks/vertexColorMixing-BTsACspH.esm.min.js.map +1 -0
  388. package/dist/chunks/vertexColorMixing-C7lCJCs9.esm.js +412 -0
  389. package/dist/chunks/vertexColorMixing-C7lCJCs9.esm.js.map +1 -0
  390. package/dist/chunks/vertexColorMixing-CtbEZ5C1.esm.js +522 -0
  391. package/dist/chunks/vertexColorMixing-CtbEZ5C1.esm.js.map +1 -0
  392. package/dist/chunks/vertexColorMixing-mccpwG_C.esm.min.js +2 -0
  393. package/dist/chunks/vertexColorMixing-mccpwG_C.esm.min.js.map +1 -0
  394. package/dist/chunks/webgpuEngine-B8X6Ca_-.esm.min.js +2 -0
  395. package/dist/chunks/webgpuEngine-B8X6Ca_-.esm.min.js.map +1 -0
  396. package/dist/chunks/webgpuEngine-BnnNyU1U.esm.js +11533 -0
  397. package/dist/chunks/webgpuEngine-BnnNyU1U.esm.js.map +1 -0
  398. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  399. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  400. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  401. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  402. package/docs/ViewerDefault.jpg +0 -0
  403. package/docs/ViewerParts.jpg +0 -0
  404. package/docs/ViewerSlots.jpg +0 -0
  405. package/docs/ViewerStyled.jpg +0 -0
  406. package/lib/index.d.ts +534 -0
  407. package/lib/index.js +1939 -0
  408. package/lib/index.js.map +1 -0
  409. package/package.json +18 -27
  410. package/readme.md +145 -21
  411. package/configuration/configuration.d.ts +0 -107
  412. package/configuration/configuration.js +0 -16
  413. package/configuration/configuration.js.map +0 -1
  414. package/configuration/configurationCompatibility.d.ts +0 -8
  415. package/configuration/configurationCompatibility.js +0 -66
  416. package/configuration/configurationCompatibility.js.map +0 -1
  417. package/configuration/configurationContainer.d.ts +0 -10
  418. package/configuration/configurationContainer.js +0 -10
  419. package/configuration/configurationContainer.js.map +0 -1
  420. package/configuration/globals.d.ts +0 -6
  421. package/configuration/globals.js +0 -18
  422. package/configuration/globals.js.map +0 -1
  423. package/configuration/index.d.ts +0 -2
  424. package/configuration/index.js +0 -4
  425. package/configuration/index.js.map +0 -1
  426. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  427. package/configuration/interfaces/cameraConfiguration.js +0 -2
  428. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  429. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  430. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  431. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  432. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  433. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  434. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  435. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  436. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  437. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  438. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  439. package/configuration/interfaces/groundConfiguration.js +0 -2
  440. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  441. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  442. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  443. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  444. package/configuration/interfaces/index.d.ts +0 -15
  445. package/configuration/interfaces/index.js +0 -16
  446. package/configuration/interfaces/index.js.map +0 -1
  447. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  448. package/configuration/interfaces/lightConfiguration.js +0 -2
  449. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  450. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  451. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  452. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  453. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  454. package/configuration/interfaces/modelConfiguration.js +0 -2
  455. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  456. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  457. package/configuration/interfaces/observersConfiguration.js +0 -2
  458. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  459. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  460. package/configuration/interfaces/sceneConfiguration.js +0 -2
  461. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  462. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  463. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  464. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  465. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  466. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  467. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  468. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  469. package/configuration/interfaces/templateConfiguration.js +0 -2
  470. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  471. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  472. package/configuration/interfaces/vrConfiguration.js +0 -2
  473. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  474. package/configuration/loader.d.ts +0 -4
  475. package/configuration/loader.js +0 -17
  476. package/configuration/loader.js.map +0 -1
  477. package/configuration/mappers.d.ts +0 -43
  478. package/configuration/mappers.js +0 -193
  479. package/configuration/mappers.js.map +0 -1
  480. package/configuration/renderOnlyLoader.d.ts +0 -33
  481. package/configuration/renderOnlyLoader.js +0 -162
  482. package/configuration/renderOnlyLoader.js.map +0 -1
  483. package/configuration/types/default.d.ts +0 -6
  484. package/configuration/types/default.js +0 -121
  485. package/configuration/types/default.js.map +0 -1
  486. package/configuration/types/environmentMap.d.ts +0 -5
  487. package/configuration/types/environmentMap.js +0 -14
  488. package/configuration/types/environmentMap.js.map +0 -1
  489. package/configuration/types/extended.d.ts +0 -6
  490. package/configuration/types/extended.js +0 -317
  491. package/configuration/types/extended.js.map +0 -1
  492. package/configuration/types/index.d.ts +0 -14
  493. package/configuration/types/index.js +0 -51
  494. package/configuration/types/index.js.map +0 -1
  495. package/configuration/types/minimal.d.ts +0 -6
  496. package/configuration/types/minimal.js +0 -43
  497. package/configuration/types/minimal.js.map +0 -1
  498. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  499. package/configuration/types/renderOnlyDefault.js +0 -31
  500. package/configuration/types/renderOnlyDefault.js.map +0 -1
  501. package/configuration/types/shadowLight.d.ts +0 -9
  502. package/configuration/types/shadowLight.js +0 -64
  503. package/configuration/types/shadowLight.js.map +0 -1
  504. package/helper/index.d.ts +0 -29
  505. package/helper/index.js +0 -66
  506. package/helper/index.js.map +0 -1
  507. package/index.d.ts +0 -30
  508. package/index.js +0 -46
  509. package/index.js.map +0 -1
  510. package/initializer.d.ts +0 -11
  511. package/initializer.js +0 -35
  512. package/initializer.js.map +0 -1
  513. package/interfaces.d.ts +0 -5
  514. package/interfaces.js +0 -7
  515. package/interfaces.js.map +0 -1
  516. package/labs/environmentSerializer.d.ts +0 -126
  517. package/labs/environmentSerializer.js +0 -191
  518. package/labs/environmentSerializer.js.map +0 -1
  519. package/labs/texture.d.ts +0 -183
  520. package/labs/texture.js +0 -351
  521. package/labs/texture.js.map +0 -1
  522. package/labs/viewerLabs.d.ts +0 -51
  523. package/labs/viewerLabs.js +0 -134
  524. package/labs/viewerLabs.js.map +0 -1
  525. package/loader/modelLoader.d.ts +0 -56
  526. package/loader/modelLoader.js +0 -202
  527. package/loader/modelLoader.js.map +0 -1
  528. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  529. package/loader/plugins/applyMaterialConfig.js +0 -16
  530. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  531. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  532. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  533. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  534. package/loader/plugins/index.d.ts +0 -19
  535. package/loader/plugins/index.js +0 -44
  536. package/loader/plugins/index.js.map +0 -1
  537. package/loader/plugins/loaderPlugin.d.ts +0 -24
  538. package/loader/plugins/loaderPlugin.js +0 -2
  539. package/loader/plugins/loaderPlugin.js.map +0 -1
  540. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  541. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  542. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  543. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  544. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  545. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  546. package/managers/observablesManager.d.ts +0 -66
  547. package/managers/observablesManager.js +0 -35
  548. package/managers/observablesManager.js.map +0 -1
  549. package/managers/sceneManager.d.ts +0 -245
  550. package/managers/sceneManager.js +0 -1375
  551. package/managers/sceneManager.js.map +0 -1
  552. package/managers/telemetryManager.d.ts +0 -78
  553. package/managers/telemetryManager.js +0 -117
  554. package/managers/telemetryManager.js.map +0 -1
  555. package/model/modelAnimation.d.ts +0 -215
  556. package/model/modelAnimation.js +0 -237
  557. package/model/modelAnimation.js.map +0 -1
  558. package/model/viewerModel.d.ts +0 -233
  559. package/model/viewerModel.js +0 -673
  560. package/model/viewerModel.js.map +0 -1
  561. package/optimizer/custom/extended.d.ts +0 -13
  562. package/optimizer/custom/extended.js +0 -101
  563. package/optimizer/custom/extended.js.map +0 -1
  564. package/optimizer/custom/index.d.ts +0 -9
  565. package/optimizer/custom/index.js +0 -26
  566. package/optimizer/custom/index.js.map +0 -1
  567. package/renderOnlyIndex.d.ts +0 -11
  568. package/renderOnlyIndex.js +0 -18
  569. package/renderOnlyIndex.js.map +0 -1
  570. package/templating/eventManager.d.ts +0 -35
  571. package/templating/eventManager.js +0 -66
  572. package/templating/eventManager.js.map +0 -1
  573. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  574. package/templating/plugins/hdButtonPlugin.js +0 -22
  575. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  576. package/templating/plugins/printButton.d.ts +0 -9
  577. package/templating/plugins/printButton.js +0 -41
  578. package/templating/plugins/printButton.js.map +0 -1
  579. package/templating/templateManager.d.ts +0 -197
  580. package/templating/templateManager.js +0 -561
  581. package/templating/templateManager.js.map +0 -1
  582. package/templating/viewerTemplatePlugin.d.ts +0 -21
  583. package/templating/viewerTemplatePlugin.js +0 -69
  584. package/templating/viewerTemplatePlugin.js.map +0 -1
  585. package/viewer/defaultViewer.d.ts +0 -130
  586. package/viewer/defaultViewer.js +0 -672
  587. package/viewer/defaultViewer.js.map +0 -1
  588. package/viewer/renderOnlyViewer.d.ts +0 -9
  589. package/viewer/renderOnlyViewer.js +0 -46
  590. package/viewer/renderOnlyViewer.js.map +0 -1
  591. package/viewer/viewer.d.ts +0 -258
  592. package/viewer/viewer.js +0 -783
  593. package/viewer/viewer.js.map +0 -1
  594. package/viewer/viewerManager.d.ts +0 -58
  595. package/viewer/viewerManager.js +0 -91
  596. package/viewer/viewerManager.js.map +0 -1
  597. package/viewer/viewerWithTemplate.d.ts +0 -9
  598. package/viewer/viewerWithTemplate.js +0 -20
  599. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{i as e,R as t,z as s,J as i,K as r,N as n,Q as o,W as a,X as c,Y as l,Z as u,_ as h,$ as d,a0 as p,a1 as _,V as m,a2 as f,a3 as x,M as g,a4 as v,v as y,x as T,a5 as w,a6 as P,L as A,a7 as C,T as b,a8 as S,C as M,a9 as R,u as I,aa as D,m as E,ab as V,ac as z,ad as F,ae as k,E as B,af as U,ag as L,ah as N,s as O,ai as W,aj as Z,B as G,ak as X,y as j}from"./index-jZFAQQur.esm.min.js";import"./fogFragment-DfLgusf7.esm.min.js";import"./logDepthDeclaration-Dine9EAs.esm.min.js";import"./logDepthVertex-3p3eoh78.esm.min.js";import"./fogFragment-uKmBf3r6.esm.min.js";import"./logDepthDeclaration-D73_rPEp.esm.min.js";import"./meshUboDeclaration-BJv8KmAx.esm.min.js";import"./logDepthVertex-Duy4jBoh.esm.min.js";import{R as Y}from"./rawTexture-CYKKtww2.esm.min.js";import"./thinInstanceMesh-DsyDWStO.esm.min.js";import{A as H}from"./assetContainer-FA9ojI1I.esm.min.js";import{S as K}from"./standardMaterial-S43MSA6g.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 q="gaussianSplattingPixelShader",Q="#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[q]=Q;const J={name:q,shader:Q};var $=Object.freeze({__proto__:null,gaussianSplattingPixelShader:J});e.IncludesShadersStore.gaussianSplattingVertexDeclaration="attribute vec2 position;uniform mat4 view;uniform mat4 projection;uniform mat4 world;";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);}\nstruct Splat {vec4 center;vec4 color;vec4 covA;vec4 covB;};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;return splat;}\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 ee="gaussianSplattingVertexShader",te="#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;varying 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;gl_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[ee]=te;const se={name:ee,shader:te};var ie=Object.freeze({__proto__:null,gaussianSplattingVertexShader:se});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 re="gaussianSplattingPixelShader",ne="#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[re]=ne;const oe={name:re,shader:ne};var ae=Object.freeze({__proto__:null,gaussianSplattingPixelShaderWGSL:oe});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,};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;return splat;}\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 ce="gaussianSplattingVertexShader",le="#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>;varying 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.vColor=splat.color;vertexOutputs.vPosition=input.position;vertexOutputs.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[ce]=le;const ue={name:ce,shader:le};var he=Object.freeze({__proto__:null,gaussianSplattingVertexShaderWGSL:ue});class de 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.rebuild()}}class pe 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 de);const u=this.getScene(),h=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;const d=u.getEngine();if(i(e,u,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,h),r(u,d,this,h,s,null,!0),n(e,h,!1,!1),h.isDirty){h.markAsProcessed(),u.resetCachedMaterial();const e=[m.PositionKind,"splatIndex"];o(e,h);const s=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal"],i=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture"],r=["Scene","Mesh"];a({uniformsNames:s,uniformBuffersNames:r,samplers:i,defines:h}),c(s);const n=h.toString(),l=u.getEngine().createEffect("gaussianSplatting",{attributes:e,uniformsNames:s,uniformBuffersNames:r,samplers:i,defines:n,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{},shaderLanguage:this._shaderLanguage,extraInitializationsAsync:async()=>{1===this._shaderLanguage?await Promise.all([Promise.resolve().then((function(){return ae})),Promise.resolve().then((function(){return he}))]):await Promise.all([Promise.resolve().then((function(){return $})),Promise.resolve().then((function(){return ie}))])}},d);t.setEffect(l,h,this._materialContext)}return!(!t.effect||!t.effect.isReady())&&(h._renderId=u.getRenderId(),l._wasPreviouslyReady=!0,l._wasPreviouslyUsingInstances=s,!0)}static BindEffect(e,t,s){const i=s.getEngine(),r=s.activeCamera,n=i.getRenderWidth(),o=i.getRenderHeight(),a=r?.rigParent?.rigCameras.length||1;t.setFloat2("invViewport",1/(n/a),1/o);let c=1e3;if(r){const e=r.getProjectionMatrix().m[5];c=r.fovMode==l.FOVMODE_VERTICAL_FIXED?o*e/2:n*e/2}t.setFloat2("focal",c,c);const u=e;if(u.covariancesATexture){const e=u.covariancesATexture.getSize();t.setFloat2("dataTextureSize",e.width,e.height),t.setTexture("covariancesATexture",u.covariancesATexture),t.setTexture("covariancesBTexture",u.covariancesBTexture),t.setTexture("centersTexture",u.centersTexture),t.setTexture("colorsTexture",u.colorsTexture)}}bindForSubMesh(e,t,s){const i=this.getScene(),r=s.materialDefines;if(!r)return;const n=s.effect;if(!n)return;this._activeEffect=n,t.getMeshUniformBuffer().bindToEffect(n,"Mesh"),t.transferToEffect(e);this._mustRebind(i,n,s,t.visibility)?(this.bindView(n),this.bindViewProjection(n),pe.BindEffect(t,this._activeEffect,i),u(n,this,i)):i.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0),h(i,t,n),this.useLogarithmicDepth&&d(r,n,i),this._afterBind(t,this._activeEffect,s)}clone(e){return p.Clone((()=>new pe(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 pe(e.name,t)),e,t,s)}}t("BABYLON.GaussianSplattingMaterial",pe);const _e=x,me={...f,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:_e},fe=(e,t)=>{const s=(1<<t)-1;return(e&s)/s},xe=(e,t)=>{t.x=fe(e>>>21,11),t.y=fe(e>>>11,10),t.z=fe(e,11)},ge=(e,t)=>{t[0]=255*fe(e>>>24,8),t[1]=255*fe(e>>>16,8),t[2]=255*fe(e>>>8,8),t[3]=255*fe(e,8)},ve=(e,t)=>{const s=1/(.5*Math.sqrt(2)),i=(fe(e>>>20,10)-.5)*s,r=(fe(e>>>10,10)-.5)*s,n=(fe(e,10)-.5)*s,o=Math.sqrt(1-(i*i+r*r+n*n));switch(e>>>30){case 0:t.set(o,i,r,n);break;case 1:t.set(i,o,r,n);break;case 2:t.set(i,r,o,n);break;case 3:t.set(i,r,n,o)}};var ye,Te,we,Pe,Ae,Ce;!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"}(ye||(ye={})),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"}(Te||(Te={}));class be extends g{get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}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,i=!1){super(e,s),this._vertexCount=0,this._worker=null,this._frameIdLastUpdate=-1,this._modelViewMatrix=v.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._covariancesA=null,this._covariancesB=null,this._colors=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;const r=new T;r.positions=[-3,-2,0,3,-2,0,0,4,0],r.indices=[0,1,2],r.applyToMesh(this),this.subMeshes=[],new w(0,0,3,0,3,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,this._keepInRam=i,t&&this.loadFileAsync(t),this._material=new pe(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(P.Matrix[0]),this.getWorldMatrix().multiplyToRef(P.Matrix[0],P.Matrix[1]),y.TransformNormalToRef(y.Forward(this._scene.useRightHandedSystem),P.Matrix[1],P.Vector3[2]),P.Vector3[2].normalize();const i=y.Dot(P.Vector3[2],this._oldDirection);(e||Math.abs(i-1)>=.01)&&(this._oldDirection.copyFrom(P.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)),i="end_header\n",r=s.indexOf(i);if(r<0||!s)return null;const n=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element chunk (\d+)\n/.exec(s);let a=0;o&&(a=parseInt(o[1]));let c=0,l=0;const u={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let h;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(h||(h={}));let d=1;const p=[],_=[],m=s.slice(0,r).split("\n");for(const e of m)if(e.startsWith("property ")){const[,t,s]=e.split(" "),i=be._ValueNameToEnum(s),r=be._TypeNameToEnum(t);1==d?(_.push({value:i,type:r,offset:l}),l+=u[t]):0==d&&(p.push({value:i,type:r,offset:c}),c+=u[t]),u[t]||A.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?d=1:"vertex"==t&&(d=0)}return{vertexCount:n,chunkCount:a,rowVertexLength:c,rowChunkLength:l,vertexProperties:p,chunkProperties:_,dataView:new DataView(e,r+11),buffer:new ArrayBuffer(be._RowOutputLength*n)}}static _GetCompressedChunks(e,t){if(!e.chunkCount)return null;const s=e.dataView,i=new Array(e.chunkCount);for(let r=0;r<e.chunkCount;r++){const n={min:new y,max:new y,minScale:new y,maxScale:new y};i[r]=n;for(let i=0;i<e.chunkProperties.length;i++){const r=e.chunkProperties[i];let o;if(0===r.type)switch(o=s.getFloat32(r.offset+t.value,!0),r.value){case 0:n.min.x=o;break;case 1:n.min.y=o;break;case 2:n.min.z=o;break;case 3:n.max.x=o;break;case 4:n.max.y=o;break;case 5:n.max.z=o;break;case 6:n.minScale.x=o;break;case 7:n.minScale.y=o;break;case 8:n.minScale.z=o;break;case 9:n.maxScale.x=o;break;case 10:n.maxScale.y=o;break;case 11:n.maxScale.z=o}}t.value+=e.rowChunkLength}return i}static _GetSplat(e,t,s,i){const r=P.Quaternion[0],n=P.Vector3[0],o=be._RowOutputLength,a=e.buffer,c=e.dataView,l=new Float32Array(a,t*o,3),u=new Float32Array(a,t*o+12,3),h=new Uint8ClampedArray(a,t*o+24,4),d=new Uint8ClampedArray(a,t*o+28,4),p=t>>8;let _=255,m=0,f=0,x=0;for(let t=0;t<e.vertexProperties.length;t++){const o=e.vertexProperties[t];let a;switch(o.type){case 0:a=c.getFloat32(i.value+o.offset,!0);break;case 1:a=c.getInt32(i.value+o.offset,!0);break;case 2:a=c.getUint32(i.value+o.offset,!0);break;case 3:a=c.getFloat64(i.value+o.offset,!0);break;case 4:a=c.getUint8(i.value+o.offset);break;default:continue}switch(o.value){case 12:{const e=s[p];xe(a,n),l[0]=me.Lerp(e.min.x,e.max.x,n.x),l[1]=-me.Lerp(e.min.y,e.max.y,n.y),l[2]=me.Lerp(e.min.z,e.max.z,n.z)}break;case 13:ve(a,r),_=r.w,m=r.z,f=r.y,x=r.x;break;case 14:{const e=s[p];xe(a,n),u[0]=Math.exp(me.Lerp(e.minScale.x,e.maxScale.x,n.x)),u[1]=Math.exp(me.Lerp(e.minScale.y,e.maxScale.y,n.y)),u[2]=Math.exp(me.Lerp(e.minScale.z,e.maxScale.z,n.z))}break;case 15:ge(a,h);break;case 16:l[0]=a;break;case 17:l[1]=a;break;case 18:l[2]=a;break;case 19:u[0]=Math.exp(a);break;case 20:u[1]=Math.exp(a);break;case 21:u[2]=Math.exp(a);break;case 22:h[0]=a;break;case 23:h[1]=a;break;case 24:h[2]=a;break;case 26:h[0]=255*(.5+be._SH_C0*a);break;case 27:h[1]=255*(.5+be._SH_C0*a);break;case 28:h[2]=255*(.5+be._SH_C0*a);break;case 29:h[3]=255*(.5+be._SH_C0*a);break;case 25:h[3]=1/(1+Math.exp(-a))*255;break;case 30:_=a;break;case 31:m=a;break;case 32:f=a;break;case 33:x=a}}r.set(m,f,x,_),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,i.value+=e.rowVertexLength}static*ConvertPLYToSplat(e,t=!1){const s=be.ParseHeader(e);if(!s)return e;const i={value:0},r=be._GetCompressedChunks(s,i);for(let e=0;e<s.vertexCount;e++)be._GetSplat(s,e,r,i),e%be._PlyConversionBatchSize==0&&t&&(yield);return s.buffer}static async ConvertPLYToSplatAsync(e){return C(be.ConvertPLYToSplat(e,!0),D())}loadDataAsync(e){return this.updateDataAsync(e)}loadFileAsync(e){return b.LoadFileAsync(e,!0).then((async e=>{be.ConvertPLYToSplatAsync(e).then((e=>{this.updateDataAsync(e)}))}))}dispose(e){this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=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()}clone(e=""){const t=new be(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewMatrix=v.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,i,r,n,o,a,c){const l=P.Matrix[0],u=P.Matrix[1],h=P.Quaternion[0],d=this._useRGBACovariants?4:2,p=s[8*e+0],_=-s[8*e+1],m=s[8*e+2];this._splatPositions[4*e+0]=p,this._splatPositions[4*e+1]=_,this._splatPositions[4*e+2]=m,a.minimizeInPlaceFromFloats(p,_,m),c.maximizeInPlaceFromFloats(p,_,m),h.set((i[32*e+28+1]-128)/128,(i[32*e+28+2]-128)/128,(i[32*e+28+3]-128)/128,-(i[32*e+28+0]-128)/128),h.toRotationMatrix(l),v.ScalingToRef(2*s[8*e+3+0],2*s[8*e+3+1],2*s[8*e+3+2],u);const f=l.multiplyToRef(u,P.Matrix[0]).m,x=this._tmpCovariances;x[0]=f[0]*f[0]+f[1]*f[1]+f[2]*f[2],x[1]=f[0]*f[4]+f[1]*f[5]+f[2]*f[6],x[2]=f[0]*f[8]+f[1]*f[9]+f[2]*f[10],x[3]=f[4]*f[4]+f[5]*f[5]+f[6]*f[6],x[4]=f[4]*f[8]+f[5]*f[9]+f[6]*f[10],x[5]=f[8]*f[8]+f[9]*f[9]+f[10]*f[10];let g=-1e4;for(let e=0;e<6;e++)g=Math.max(g,Math.abs(x[e]));this._splatPositions[4*e+3]=g;const y=g;r[4*t+0]=S(x[0]/y),r[4*t+1]=S(x[1]/y),r[4*t+2]=S(x[2]/y),r[4*t+3]=S(x[3]/y),n[t*d+0]=S(x[4]/y),n[t*d+1]=S(x[5]/y),o[4*t+0]=i[32*e+24+0],o[4*t+1]=i[32*e+24+1],o[4*t+2]=i[32*e+24+2],o[4*t+3]=i[32*e+24+3]}_updateTextures(e,t,s){const i=this._getTextureSize(this._vertexCount),r=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,M.TEXTURE_BILINEAR_SAMPLINGMODE,M.TEXTURETYPE_FLOAT),n=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,M.TEXTURE_BILINEAR_SAMPLINGMODE,M.TEXTURETYPE_UNSIGNED_BYTE),o=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,M.TEXTURE_BILINEAR_SAMPLINGMODE,M.TEXTURETYPE_HALF_FLOAT);if(this._keepInRam&&(this._covariancesA=e,this._covariancesB=t,this._colors=s),this._covariancesATexture){this._delayedTextureUpdate={covA:e,covB:t,colors:s,centers:this._splatPositions};const i=Float32Array.from(this._splatPositions),r=this._vertexCount;this._worker.postMessage({positions:i,vertexCount:r},[i.buffer]),this._postToWorker(!0)}else this._covariancesATexture=o(e,i.x,i.y,M.TEXTUREFORMAT_RGBA),this._covariancesBTexture=o(t,i.x,i.y,this._useRGBACovariants?M.TEXTUREFORMAT_RGBA:M.TEXTUREFORMAT_RG),this._centersTexture=r(this._splatPositions,i.x,i.y,M.TEXTUREFORMAT_RGBA),this._colorsTexture=n(s,i.x,i.y,M.TEXTUREFORMAT_RGBA),this._instanciateWorker()}*_updateData(e,t){this._covariancesATexture||(this._readyToDisplay=!1);const s=new Uint8Array(e),i=new Float32Array(s.buffer),r=s.length/be._RowOutputLength;r!=this._vertexCount&&this._updateSplatIndexBuffer(r),this._vertexCount=r;const n=this._getTextureSize(r),o=n.x*n.y,a=be.ProgressiveUpdateAmount??n.y,c=n.x*a;this._splatPositions=new Float32Array(4*o);const l=new Uint16Array(4*o),u=new Uint16Array((this._useRGBACovariants?4:2)*o),h=new Uint8Array(4*o),d=new y(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),p=new y(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(be.ProgressiveUpdateAmount){this._updateTextures(l,u,h),this.setEnabled(!0);const e=Math.ceil(n.y/a);for(let r=0;r<e;r++){const e=r*a,o=e*n.x;for(let e=0;e<c;e++)this._makeSplat(o+e,o+e,i,s,l,u,h,d,p);this._updateSubTextures(this._splatPositions,l,u,h,e,Math.min(a,n.y-e)),this.getBoundingInfo().reConstruct(d,p,this.getWorldMatrix()),t&&(yield)}const r=Float32Array.from(this._splatPositions),o=this._vertexCount;this._worker.postMessage({positions:r,vertexCount:o},[r.buffer]),this._sortIsDirty=!0}else{for(let e=0;e<r;e++)this._makeSplat(e,e,i,s,l,u,h,d,p),t&&e%be._SplatBatchSize==0&&(yield);this._updateTextures(l,u,h),this.getBoundingInfo().reConstruct(d,p,this.getWorldMatrix()),this.setEnabled(!0)}this._postToWorker(!0)}async updateDataAsync(e){return C(this._updateData(e,!0),D())}updateData(e){R(this._updateData(e,!1))}_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,i,r,n){const o=(e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)},a=this._getTextureSize(this._vertexCount),c=this._useRGBACovariants?4:2,l=r*a.x,u=n*a.x,h=new Uint16Array(t.buffer,4*l*Uint16Array.BYTES_PER_ELEMENT,4*u),d=new Uint16Array(s.buffer,l*c*Uint16Array.BYTES_PER_ELEMENT,u*c),p=new Uint8Array(i.buffer,4*l,4*u),_=new Float32Array(e.buffer,4*l*Float32Array.BYTES_PER_ELEMENT,4*u);o(this._covariancesATexture,h,a.x,r,n),o(this._covariancesBTexture,d,a.x,r,n),((e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)})(this._centersTexture,_,a.x,r,n),((e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)})(this._colorsTexture,p,a.x,r,n)}_instanciateWorker(){if(!this._vertexCount)return;this._updateSplatIndexBuffer(this._vertexCount),this._worker?.terminate(),this._worker=new Worker(URL.createObjectURL(new Blob(["(",be._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=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 i=1;if(1!==t.version||t.isWebGPU)i=Math.ceil(e/s);else for(;s*i<e;)i*=2;return i>s&&(A.Error("GaussianSplatting texture size: ("+s+", "+i+"), maxTextureSize: "+s),i=s),new I(s,i)}}be._RowOutputLength=32,be._SH_C0=.28209479177387814,be._SplatBatchSize=327680,be._PlyConversionBatchSize=32768,be.ProgressiveUpdateAmount=0,be._CreateWorker=function(e){let t,s,i,r,n=0;e.onmessage=o=>{if(o.data.positions)t=o.data.positions,n=o.data.vertexCount;else{const a=o.data.view;if(!t||!a)throw new Error("positions or view is not defined!");s=o.data.depthMix,i=new Uint32Array(s.buffer),r=new Float32Array(s.buffer);for(let e=0;e<n;e++)i[2*e]=e;let c=-1;o.data.useRightHandedSystem&&(c=1);for(let e=0;e<n;e++)r[2*e+1]=1e4+(a[2]*t[4*e+0]+a[6]*t[4*e+1]+a[10]*t[4*e+2])*c;s.sort(),e.postMessage({depthMix:s},[s.buffer])}}};class Se{constructor(e,t,s,i,r){this.idx=0,this.color=new E(1,1,1,1),this.position=y.Zero(),this.rotation=y.Zero(),this.uv=new I(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=i,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,i=s.maximumWorld.x,r=s.minimumWorld.x,n=s.maximumWorld.y,o=s.minimumWorld.y,a=s.maximumWorld.z,c=s.minimumWorld.z,l=this.position.x+this._pcs.mesh.position.x,u=this.position.y+this._pcs.mesh.position.y,h=this.position.z+this._pcs.mesh.position.z;return r<=l&&l<=i&&o<=u&&u<=n&&c<=h&&h<=a}getRotationMatrix(e){let t;if(this.rotationQuaternion)t=this.rotationQuaternion;else{t=P.Quaternion[0];const e=this.rotation;V.RotationYawPitchRollToRef(e.y,e.x,e.z,t)}t.toRotationMatrix(e)}}class Me{get groupID(){return this.groupId}set groupID(e){this.groupId=e}constructor(e,t){this.groupId=e,this._positionFunction=t}}class Re{constructor(e,t,s=Number.MAX_VALUE,i=F){this.origin=e,this.direction=t,this.length=s,this.epsilon=i}clone(){return new Re(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(e,t,s=0){const i=Re._TmpVector3[0].copyFromFloats(e.x-s,e.y-s,e.z-s),r=Re._TmpVector3[1].copyFromFloats(t.x+s,t.y+s,t.z+s);let n,o,a,c,l=0,u=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<i.x||this.origin.x>r.x)return!1}else if(n=1/this.direction.x,o=(i.x-this.origin.x)*n,a=(r.x-this.origin.x)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<i.y||this.origin.y>r.y)return!1}else if(n=1/this.direction.y,o=(i.y-this.origin.y)*n,a=(r.y-this.origin.y)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<i.z||this.origin.z>r.z)return!1}else if(n=1/this.direction.z,o=(i.z-this.origin.z)*n,a=(r.z-this.origin.z)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;return!0}intersectsBox(e,t=0){return this.intersectsBoxMinMax(e.minimum,e.maximum,t)}intersectsSphere(e,t=0){const s=e.center.x-this.origin.x,i=e.center.y-this.origin.y,r=e.center.z-this.origin.z,n=s*s+i*i+r*r,o=e.radius+t,a=o*o;if(n<=a)return!0;const c=s*this.direction.x+i*this.direction.y+r*this.direction.z;if(c<0)return!1;return n-c*c<=a}intersectsTriangle(e,t,s){const i=Re._TmpVector3[0],r=Re._TmpVector3[1],n=Re._TmpVector3[2],o=Re._TmpVector3[3],a=Re._TmpVector3[4];t.subtractToRef(e,i),s.subtractToRef(e,r),y.CrossToRef(this.direction,r,n);const c=y.Dot(i,n);if(0===c)return null;const l=1/c;this.origin.subtractToRef(e,o);const u=y.Dot(o,n)*l;if(u<-this.epsilon||u>1+this.epsilon)return null;y.CrossToRef(o,i,a);const h=y.Dot(this.direction,a)*l;if(h<-this.epsilon||u+h>1+this.epsilon)return null;const d=y.Dot(r,a)*l;return d>this.length?null:new k(1-u-h,u,d)}intersectsPlane(e){let t;const s=y.Dot(e.normal,this.direction);if(Math.abs(s)<9.99999997475243e-7)return null;{const i=y.Dot(e.normal,this.origin);return t=(-e.d-i)/s,t<0?t<-9.99999997475243e-7?null:0:t}}intersectsAxis(e,t=0){switch(e){case"y":{const e=(this.origin.y-t)/this.direction.y;return e>0?null:new y(this.origin.x+this.direction.x*-e,t,this.origin.z+this.direction.z*-e)}case"x":{const e=(this.origin.x-t)/this.direction.x;return e>0?null:new y(t,this.origin.y+this.direction.y*-e,this.origin.z+this.direction.z*-e)}case"z":{const e=(this.origin.z-t)/this.direction.z;return e>0?null:new y(this.origin.x+this.direction.x*-e,this.origin.y+this.direction.y*-e,t)}default:return null}}intersectsMesh(e,t,s,i=!1,r,n=!1){const o=P.Matrix[0];return e.getWorldMatrix().invertToRef(o),this._tmpRay?Re.TransformToRef(this,o,this._tmpRay):this._tmpRay=Re.Transform(this,o),e.intersects(this._tmpRay,t,s,i,r,n)}intersectsMeshes(e,t,s){s?s.length=0:s=[];for(let i=0;i<e.length;i++){const r=this.intersectsMesh(e[i],t);r.hit&&s.push(r)}return s.sort(this._comparePickingInfo),s}_comparePickingInfo(e,t){return e.distance<t.distance?-1:e.distance>t.distance?1:0}intersectionSegment(e,t,s){const i=this.origin,r=P.Vector3[0],n=P.Vector3[1],o=P.Vector3[2],a=P.Vector3[3];t.subtractToRef(e,r),this.direction.scaleToRef(Re._Rayl,o),i.addToRef(o,n),e.subtractToRef(i,a);const c=y.Dot(r,r),l=y.Dot(r,o),u=y.Dot(o,o),h=y.Dot(r,a),d=y.Dot(o,a),p=c*u-l*l;let _,m,f=p,x=p;p<Re._Smallnum?(_=0,f=1,m=d,x=u):(_=l*d-u*h,m=c*d-l*h,_<0?(_=0,m=d,x=u):_>f&&(_=f,m=d+l,x=u)),m<0?(m=0,-h<0?_=0:-h>c?_=f:(_=-h,f=c)):m>x&&(m=x,-h+l<0?_=0:-h+l>c?_=f:(_=-h+l,f=c));const g=Math.abs(_)<Re._Smallnum?0:_/f,v=Math.abs(m)<Re._Smallnum?0:m/x,T=P.Vector3[4];o.scaleToRef(v,T);const w=P.Vector3[5];r.scaleToRef(g,w),w.addInPlace(a);const A=P.Vector3[6];w.subtractToRef(T,A);return v>0&&v<=this.length&&A.lengthSquared()<s*s?w.length():-1}update(e,t,s,i,r,n,o,a=!1){if(a){Re._RayDistant||(Re._RayDistant=Re.Zero()),Re._RayDistant.unprojectRayToRef(e,t,s,i,v.IdentityReadOnly,n,o);const a=P.Matrix[0];r.invertToRef(a),Re.TransformToRef(Re._RayDistant,a,this)}else this.unprojectRayToRef(e,t,s,i,r,n,o);return this}static Zero(){return new Re(y.Zero(),y.Zero())}static CreateNew(e,t,s,i,r,n,o){return Re.Zero().update(e,t,s,i,r,n,o)}static CreateNewFromTo(e,t,s=v.IdentityReadOnly){const i=new Re(new y(0,0,0),new y(0,0,0));return Re.CreateFromToToRef(e,t,i,s)}static CreateFromToToRef(e,t,s,i=v.IdentityReadOnly){s.origin.copyFrom(e);const r=t.subtractToRef(e,s.direction),n=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return s.length=n,s.direction.normalize(),Re.TransformToRef(s,i,s)}static Transform(e,t){const s=new Re(new y(0,0,0),new y(0,0,0));return Re.TransformToRef(e,t,s),s}static TransformToRef(e,t,s){y.TransformCoordinatesToRef(e.origin,t,s.origin),y.TransformNormalToRef(e.direction,t,s.direction),s.length=e.length,s.epsilon=e.epsilon;const i=s.direction,r=i.length();if(0!==r&&1!==r){const e=1/r;i.x*=e,i.y*=e,i.z*=e,s.length*=r}return s}unprojectRayToRef(e,t,s,i,r,n,o){const a=P.Matrix[0];r.multiplyToRef(n,a),a.multiplyToRef(o,a),a.invert();const c=B.LastCreatedEngine,l=P.Vector3[0];l.x=e/s*2-1,l.y=-(t/i*2-1),l.z=c?.useReverseDepthBuffer?1:c?.isNDCHalfZRange?0:-1;const u=P.Vector3[1].copyFromFloats(l.x,l.y,1-1e-8),h=P.Vector3[2],d=P.Vector3[3];y._UnprojectFromInvertedMatrixToRef(l,a,h),y._UnprojectFromInvertedMatrixToRef(u,a,d),this.origin.copyFrom(h),d.subtractToRef(h,this.direction),this.direction.normalize()}}function Ie(e,t,s,i,r,n=!1){const o=Re.Zero();return De(e,t,s,i,o,r,n),o}function De(e,t,s,i,r,n,o=!1,a=!1){const c=e.getEngine();if(!n&&!(n=e.activeCamera))return e;const l=n.viewport,u=c.getRenderHeight(),{x:h,y:d,width:p,height:_}=l.toGlobal(c.getRenderWidth(),u),m=1/c.getHardwareScalingLevel();return t=t*m-h,s=s*m-(u-d-_),r.update(t,s,p,_,i||v.IdentityReadOnly,o?v.IdentityReadOnly:n.getViewMatrix(),n.getProjectionMatrix(),a),e}function Ee(e,t,s,i,r){if(!U)return e;const n=e.getEngine();if(!r&&!(r=e.activeCamera))throw new Error("Active camera not set");const o=r.viewport,a=n.getRenderHeight(),{x:c,y:l,width:u,height:h}=o.toGlobal(n.getRenderWidth(),a),d=v.Identity(),p=1/n.getHardwareScalingLevel();return t=t*p-c,s=s*p-(a-l-h),i.update(t,s,u,h,d,d,r.getProjectionMatrix()),e}function Ve(e,t,s,i,r,n,o,a){const c=t(i,s.enableDistantPicking),l=s.intersects(c,r,o,n,i,a);return l&&l.hit?!r&&null!=e&&l.distance>=e.distance?null:l:null}function ze(e,t,s,i,r,n){let o=null;const a=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),c=e.cameraToUseForPointers||e.activeCamera,l=Ve;for(let u=0;u<e.meshes.length;u++){const h=e.meshes[u];if(s){if(!s(h,-1))continue}else if(!h.isEnabled()||!h.isVisible||!h.isPickable)continue;const d=a&&h.isWorldMatrixCameraDependent(),p=h.computeWorldMatrix(d,c);if(h.hasThinInstances&&h.thinInstanceEnablePicking){const e=l(o,t,h,p,!0,!0,n);if(e){if(r)return e;const a=P.Matrix[1],c=h.thinInstanceGetWorldMatrices();for(let e=0;e<c.length;e++){if(s&&!s(h,e))continue;c[e].multiplyToRef(p,a);const u=l(o,t,h,a,i,r,n,!0);if(u&&(o=u,o.thinInstanceIndex=e,i))return o}}}else{const e=l(o,t,h,p,i,r,n);if(e&&(o=e,i))return o}}return o||new U}function Fe(e,t,s,i){if(!U)return null;const r=[],n=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),o=e.cameraToUseForPointers||e.activeCamera,a=Ve;for(let c=0;c<e.meshes.length;c++){const l=e.meshes[c];if(s){if(!s(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;const u=n&&l.isWorldMatrixCameraDependent(),h=l.computeWorldMatrix(u,o);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(a(null,t,l,h,!0,!0,i)){const e=P.Matrix[1],n=l.thinInstanceGetWorldMatrices();for(let o=0;o<n.length;o++){if(s&&!s(l,o))continue;n[o].multiplyToRef(h,e);const c=a(null,t,l,e,!1,!1,i,!0);c&&(c.thinInstanceIndex=o,r.push(c))}}}else{const e=a(null,t,l,h,!1,!1,i);e&&r.push(e)}}return r}function ke(e,t,s=100,i,r){i||(i=e.getWorldMatrix()),t.length=s,r?t.origin.copyFrom(r):t.origin.copyFrom(e.position);const n=P.Vector3[2];n.set(0,0,e._scene.useRightHandedSystem?-1:1);const o=P.Vector3[3];return y.TransformNormalToRef(n,i,o),y.NormalizeToRef(o,t.direction),t}Re._TmpVector3=z(6,y.Zero),Re._RayDistant=Re.Zero(),Re._Smallnum=1e-8,Re._Rayl=1e9,we=N,(Pe=l)&&(Pe.prototype.getForwardRay=function(e=100,t,s){return ke(this,new Re(y.Zero(),y.Zero(),e),e,t,s)},Pe.prototype.getForwardRayToRef=function(e,t=100,s,i){return ke(this,e,t,s,i)}),we&&(L._IsPickingAvailable=!0,we.prototype.createPickingRay=function(e,t,s,i,r=!1){return Ie(this,e,t,s,i,r)}),N.prototype.createPickingRayToRef=function(e,t,s,i,r,n=!1,o=!1){return De(this,e,t,s,i,r,n,o)},N.prototype.createPickingRayInCameraSpace=function(e,t,s){return function(e,t,s,i){const r=Re.Zero();return Ee(e,t,s,r,i),r}(this,e,t,s)},N.prototype.createPickingRayInCameraSpaceToRef=function(e,t,s,i){return Ee(this,e,t,s,i)},N.prototype.pickWithBoundingInfo=function(e,t,s,i,r){return function(e,t,s,i,r,n){if(!U)return null;const o=ze(e,(i=>(e._tempPickingRay||(e._tempPickingRay=Re.Zero()),De(e,t,s,i,e._tempPickingRay,n||null),e._tempPickingRay)),i,r,!0);return o&&(o.ray=Ie(e,t,s,v.Identity(),n||null)),o}(this,e,t,s,i,r)},N.prototype.pick=function(e,t,s,i,r,n,o=!1){return function(e,t,s,i,r,n,o){const a=ze(e,((i,r)=>(e._tempPickingRay||(e._tempPickingRay=Re.Zero()),De(e,t,s,i,e._tempPickingRay,n||null,!1,r),e._tempPickingRay)),i,r,!1,o);return a&&(a.ray=Ie(e,t,s,v.Identity(),n||null)),a}(this,e,t,s,i,r,n,o)},N.prototype.pickWithRay=function(e,t,s,i){return function(e,t,s,i,r){const n=ze(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=v.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=Re.Zero()),Re.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,i,!1,r);return n&&(n.ray=t),n}(this,e,t,s,i)},N.prototype.multiPick=function(e,t,s,i,r){return function(e,t,s,i,r,n){return Fe(e,(i=>Ie(e,t,s,i,r||null)),i,n)}(this,e,t,s,i,r)},N.prototype.multiPickWithRay=function(e,t,s){return function(e,t,s,i){return Fe(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=v.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=Re.Zero()),Re.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,i)}(this,e,t,s)},function(e){e[e.Color=2]="Color",e[e.UV=1]="UV",e[e.Random=0]="Random",e[e.Stated=3]="Stated"}(Ae||(Ae={}));class Be{get positions(){return this._positions32}get colors(){return this._colors32}get uvs(){return this._uvs32}constructor(e,t,s,i){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||B.LastCreatedScene,i&&void 0!==i.updatable?this._updatable=i.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 T;t.set(this._positions32,m.PositionKind),this._uvs32.length>0&&t.set(this._uvs32,m.UVKind);let s=0;this._colors32.length>0&&(s=1,t.set(this._colors32,m.ColorKind));const i=new g(this.name,this._scene);t.applyToMesh(i,this._updatable),this.mesh=i,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);let r=e;return r||(r=new K("point cloud material",this._scene),r.emissiveColor=new O(s,s,s),r.disableLighting=!0,r.pointsCloud=!0,r.pointSize=this._size),i.material=r,new Promise((e=>e(i)))}_addParticle(e,t,s,i){const r=new Se(e,t,s,i,this);return this.particles.push(r),r}_randomUnitVector(e){e.position=new y(Math.random(),Math.random(),Math.random()),e.color=new E(1,1,1,1)}_getColorIndicesForCoord(e,t,s,i){const r=e._groupImageData,n=s*(4*i)+4*t,o=[n,n+1,n+2,n+3],a=o[1],c=o[2],l=o[3],u=r[o[0]],h=r[a],d=r[c],p=r[l];return new E(u/255,h/255,d/255,p)}_setPointsColorOrUV(e,t,s,i,r,n,o,a){a=a??0,s&&e.updateFacetData();const c=2*e.getBoundingInfo().boundingSphere.radius;let l=e.getVerticesData(m.PositionKind);const u=e.getIndices(),h=e.getVerticesData(m.UVKind+(a?a+1:"")),d=e.getVerticesData(m.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,x=0,g=0,v=0,T=0,w=0,P=0,A=0,C=0,b=0,S=0,M=0,R=0;const D=y.Zero(),V=y.Zero(),z=y.Zero(),F=y.Zero(),k=y.Zero();let B=0,U=0,L=0,N=0,G=0,X=0;const j=I.Zero(),Y=I.Zero(),H=I.Zero(),K=I.Zero(),q=I.Zero();let Q=0,J=0,$=0,ee=0,te=0,se=0,ie=0,re=0,ne=0,oe=0,ae=0,ce=0;const le=W.Zero(),ue=W.Zero(),he=W.Zero(),de=W.Zero(),pe=W.Zero();let _e,me,fe=0,xe=0;o=o||0;let ge=new W(0,0,0,0),ve=y.Zero(),ye=y.Zero(),Te=y.Zero(),we=0,Pe=y.Zero(),Ae=0,Ce=0;const be=new Re(y.Zero(),new y(1,0,0));let Se,Me=y.Zero();for(let a=0;a<u.length/3;a++){let p,_,m,I,W,Re,Ie,De;x=u[3*a],g=u[3*a+1],v=u[3*a+2],T=l[3*x],w=l[3*x+1],P=l[3*x+2],A=l[3*g],C=l[3*g+1],b=l[3*g+2],S=l[3*v],M=l[3*v+1],R=l[3*v+2],D.set(T,w,P),V.set(A,C,b),z.set(S,M,R),V.subtractToRef(D,F),z.subtractToRef(V,k),h&&(B=h[2*x],U=h[2*x+1],L=h[2*g],N=h[2*g+1],G=h[2*v],X=h[2*v+1],j.set(B,U),Y.set(L,N),H.set(G,X),Y.subtractToRef(j,K),H.subtractToRef(Y,q)),d&&i&&(Q=d[4*x],J=d[4*x+1],$=d[4*x+2],ee=d[4*x+3],te=d[4*g],se=d[4*g+1],ie=d[4*g+2],re=d[4*g+3],ne=d[4*v],oe=d[4*v+1],ae=d[4*v+2],ce=d[4*v+3],le.set(Q,J,$,ee),ue.set(te,se,ie,re),he.set(ne,oe,ae,ce),ue.subtractToRef(le,de),he.subtractToRef(ue,pe));const Ee=new O(0,0,0),Ve=new O(0,0,0);let ze,Fe;for(let l=0;l<t._groupDensity[a];l++)f=this.particles.length,this._addParticle(f,t,this._groupCounter,a+l),Fe=this.particles[f],fe=Math.sqrt(Z(0,1)),xe=Z(0,1),_e=D.add(F.scale(fe)).add(k.scale(fe*xe)),s&&(ve=e.getFacetNormal(a).normalize().scale(-1),ye=F.clone().normalize(),Te=y.Cross(ve,ye),we=Z(0,2*Math.PI),Pe=ye.scale(Math.cos(we)).add(Te.scale(Math.sin(we))),we=Z(.1,Math.PI/2),Me=Pe.scale(Math.cos(we)).add(ve.scale(Math.sin(we))),be.origin=_e.add(Me.scale(1e-5)),be.direction=Me,be.length=c,Se=be.intersectsMesh(e),Se.hit&&(Ce=Se.pickedPoint.subtract(_e).length(),Ae=Z(0,1)*Ce,_e.addInPlace(Me.scale(Ae)))),Fe.position=_e.clone(),this._positions.push(Fe.position.x,Fe.position.y,Fe.position.z),void 0!==i?h&&(me=j.add(K.scale(fe)).add(q.scale(fe*xe)),i?r&&null!==t._groupImageData?(p=t._groupImgWidth,_=t._groupImgHeight,ze=this._getColorIndicesForCoord(t,Math.round(me.x*p),Math.round(me.y*_),p),Fe.color=ze,this._colors.push(ze.r,ze.g,ze.b,ze.a)):d?(ge=le.add(de.scale(fe)).add(pe.scale(fe*xe)),Fe.color=new E(ge.x,ge.y,ge.z,ge.w),this._colors.push(ge.x,ge.y,ge.z,ge.w)):(ge=le.set(Math.random(),Math.random(),Math.random(),1),Fe.color=new E(ge.x,ge.y,ge.z,ge.w),this._colors.push(ge.x,ge.y,ge.z,ge.w)):(Fe.uv=me.clone(),this._uvs.push(Fe.uv.x,Fe.uv.y))):(n?(Ee.set(n.r,n.g,n.b),m=Z(-o,o),I=Z(-o,o),De=Ee.toHSV(),W=De.r,Re=De.g+m,Ie=De.b+I,Re<0&&(Re=0),Re>1&&(Re=1),Ie<0&&(Ie=0),Ie>1&&(Ie=1),O.HSVtoRGBToRef(W,Re,Ie,Ve),ge.set(Ve.r,Ve.g,Ve.b,1)):ge=le.set(Math.random(),Math.random(),Math.random(),1),Fe.color=new E(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 A.Warn(e.name+"has no material."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const i=e.material.getActiveTextures();if(0===i.length)return A.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=>{G.WhenAllReady(i,(()=>{let n=t._textureNb;n<0&&(n=0),n>i.length-1&&(n=i.length-1);const o=()=>{t._groupImgWidth=i[n].getSize().width,t._groupImgHeight=i[n].getSize().height,this._setPointsColorOrUV(r,t,s,!0,!0,void 0,void 0,i[n].coordinatesIndex),r.dispose(),e()};t._groupImageData=null;const a=i[n].readPixels();a?a.then((e=>{t._groupImageData=e,o()})):o()}))})))}_calculateDensity(e,t,s){let i,r,n,o,a,c,l,u,h,d,p,_;const m=y.Zero(),f=y.Zero(),x=y.Zero(),g=y.Zero(),v=y.Zero(),T=y.Zero();let w;const P=[];let A=0;const C=s.length/3;for(let e=0;e<C;e++)i=s[3*e],r=s[3*e+1],n=s[3*e+2],o=t[3*i],a=t[3*i+1],c=t[3*i+2],l=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*n],p=t[3*n+1],_=t[3*n+2],m.set(o,a,c),f.set(l,u,h),x.set(d,p,_),f.subtractToRef(m,g),x.subtractToRef(f,v),y.CrossToRef(g,v,T),w=.5*T.length(),A+=w,P[e]=A;const b=new Array(C);let S=e;for(let e=C-1;e>0;e--){const t=P[e];if(0===t)b[e]=0;else{const s=(t-P[e-1])/t*S,i=Math.floor(s),r=s-i,n=i+Number(Math.random()<r);b[e]=n,S-=n}}return b[0]=S,b}addPoints(e,t=this._randomUnitVector){const s=new Me(this._groupCounter,t);let i,r=this.nbParticles;for(let t=0;t<e;t++)i=this._addParticle(r,s,this._groupCounter,t),s&&s._positionFunction&&s._positionFunction(i,r,t),this._positions.push(i.position.x,i.position.y,i.position.z),i.color&&this._colors.push(i.color.r,i.color.g,i.color.b,i.color.a),i.uv&&this._uvs.push(i.uv.x,i.uv.y),r++;return this.nbParticles+=e,this._groupCounter++,this._groupCounter}addSurfacePoints(e,t,s,i,r){let n=s||0;(isNaN(n)||n<0||n>3)&&(n=0);const o=e.getVerticesData(m.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new Me(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===n?c._textureNb=i||0:i=i||new E(1,1,1,1),n){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,i,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}addVolumePoints(e,t,s,i,r){let n=s||0;(isNaN(n)||n<0||n>3)&&(n=0);const o=e.getVerticesData(m.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new Me(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===n?c._textureNb=i||0:i=i||new E(1,1,1,1),n){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,i,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 i=P.Matrix[0],r=this.mesh,n=this._colors32,o=this._positions32,a=this._uvs32,c=P.Vector3,l=c[5].copyFromFloats(1,0,0),u=c[6].copyFromFloats(0,1,0),h=c[7].copyFromFloats(0,0,1),d=c[8].setAll(Number.MAX_VALUE),p=c[9].setAll(-Number.MAX_VALUE);v.IdentityToRef(i);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,x=0,g=0;for(let s=e;s<=t;s++){const e=this.particles[s];_=e.idx,f=3*_,x=4*_,g=2*_,this.updateParticle(e);const t=e._rotationMatrix,r=e.position,n=e._globalPosition;this._computeParticleRotation&&e.getRotationMatrix(i);if(null!==e.parentId){const s=this.particles[e.parentId],o=s._rotationMatrix,a=s._globalPosition,c=r.x*o[1]+r.y*o[4]+r.z*o[7],l=r.x*o[0]+r.y*o[3]+r.z*o[6],u=r.x*o[2]+r.y*o[5]+r.z*o[8];if(n.x=a.x+l,n.y=a.y+c,n.z=a.z+u,this._computeParticleRotation){const e=i.m;t[0]=e[0]*o[0]+e[1]*o[3]+e[2]*o[6],t[1]=e[0]*o[1]+e[1]*o[4]+e[2]*o[7],t[2]=e[0]*o[2]+e[1]*o[5]+e[2]*o[8],t[3]=e[4]*o[0]+e[5]*o[3]+e[6]*o[6],t[4]=e[4]*o[1]+e[5]*o[4]+e[6]*o[7],t[5]=e[4]*o[2]+e[5]*o[5]+e[6]*o[8],t[6]=e[8]*o[0]+e[9]*o[3]+e[10]*o[6],t[7]=e[8]*o[1]+e[9]*o[4]+e[10]*o[7],t[8]=e[8]*o[2]+e[9]*o[5]+e[10]*o[8]}}else if(n.x=0,n.y=0,n.z=0,this._computeParticleRotation){const e=i.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 a=c[11];e.translateFromPivot?a.setAll(0):a.copyFrom(e.pivot);const m=c[0];m.copyFrom(e.position);const v=m.x-e.pivot.x,y=m.y-e.pivot.y,T=m.z-e.pivot.z;let w=v*t[0]+y*t[3]+T*t[6],P=v*t[1]+y*t[4]+T*t[7],A=v*t[2]+y*t[5]+T*t[8];w+=a.x,P+=a.y,A+=a.z;const C=o[f]=n.x+l.x*w+u.x*P+h.x*A,b=o[f+1]=n.y+l.y*w+u.y*P+h.y*A,S=o[f+2]=n.z+l.z*w+u.z*P+h.z*A;if(this._computeBoundingBox&&(d.minimizeInPlaceFromFloats(C,b,S),p.maximizeInPlaceFromFloats(C,b,S)),this._computeParticleColor&&e.color){const t=e.color,s=this._colors32;s[x]=t.r,s[x+1]=t.g,s[x+2]=t.b,s[x+3]=t.a}if(this._computeParticleTexture&&e.uv){const t=e.uv,s=this._uvs32;s[g]=t.x,s[g+1]=t.y}}return r&&(s&&(this._computeParticleColor&&r.updateVerticesData(m.ColorKind,n,!1,!1),this._computeParticleTexture&&r.updateVerticesData(m.UVKind,a,!1,!1),r.updateVerticesData(m.PositionKind,o,!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"}(Ce||(Ce={}));class Ue{constructor(e=Ue._DefaultLoadingOptions){this.name=X.name,this._assetContainer=null,this.extensions=X.extensions,this._loadingOptions=e}createPlugin(e){return new Ue(e[X.name])}async importMeshAsync(e,t,s,i,r,n){return this._parse(e,t,s,i).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),i=new Float32Array(t),r=s.length/32;return e.addPoints(r,(function(e,t){const r=i[8*t+0],n=i[8*t+1],o=i[8*t+2];e.position=new y(r,n,o);const a=s[32*t+24+0]/255,c=s[32*t+24+1]/255,l=s[32*t+24+2]/255;e.color=new E(a,c,l,1)})),!0}static _BuildMesh(e,t){const s=new g("PLYMesh",e),i=new Uint8Array(t.data),r=new Float32Array(t.data),n=i.length/32,o=[],a=new T;for(let e=0;e<n;e++){const t=r[8*e+0],s=r[8*e+1],i=r[8*e+2];o.push(t,s,i)}if(t.hasVertexColors){const e=new Float32Array(4*n);for(let t=0;t<n;t++){const s=i[32*t+24+0]/255,r=i[32*t+24+1]/255,n=i[32*t+24+2]/255;e[4*t+0]=s,e[4*t+1]=r,e[4*t+2]=n,e[4*t+3]=1}a.colors=e}return a.positions=o,a.indices=t.faces,a.applyToMesh(s),s}_parse(e,t,s,i){return Ue._ConvertPLYToSplat(s).then((async e=>{const s=[];switch(e.mode){case 0:{const i=new be("GaussianSplatting",null,t,this._loadingOptions.keepInRam);i._parentContainer=this._assetContainer,s.push(i),await i.updateDataAsync(e.data)}break;case 1:{const i=new Be("PointCloud",1,t);if(Ue._BuildPointCloud(i,e.data))return Promise.all([i.buildMeshAsync()]).then((e=>(s.push(e[0]),s)));i.dispose()}break;case 2:if(!e.faces)throw new Error("PLY mesh doesn't contain face informations.");s.push(Ue._BuildMesh(t,e));break;default:throw new Error("Unsupported Splat mode")}return new Promise((e=>{e(s)}))}))}loadAssetContainerAsync(e,t,s){const i=new H(e);return this._assetContainer=i,this.importMeshAsync(null,e,t,s).then((e=>(e.meshes.forEach((e=>i.meshes.push(e))),this._assetContainer=null,i))).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)),i="end_header\n",r=s.indexOf(i);if(r<0||!s)return new Promise((t=>{t({mode:0,data:e})}));const n=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element face (\d+)\n/.exec(s);let a=0;o&&(a=parseInt(o[1]));const c=/element chunk (\d+)\n/.exec(s);let l=0;c&&(l=parseInt(c[1]));let u=0,h=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 m=[],f=s.slice(0,r).split("\n");for(const e of f)if(e.startsWith("property ")){const[,t,s]=e.split(" ");1==_?h+=d[t]:0==_&&(m.push({name:s,type:t,offset:u}),u+=d[t]),d[t]||A.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?_=1:"vertex"==t&&(_=0)}const x=u,g=h;return be.ConvertPLYToSplatAsync(e).then((t=>{const s=new DataView(e,r+11);let i=g*l+x*n;const o=[];if(a)for(let e=0;e<a;e++){const e=s.getUint8(i);if(3==e){i+=1;for(let t=0;t<e;t++){const e=s.getUint32(i+4*(2-t),!0);o.push(e)}i+=12}}if(l)return new Promise((e=>{e({mode:0,data:t,faces:o,hasVertexColors:!1})}));let c=0,u=0;const h=["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<m.length;e++){const t=m[e];h.includes(t.name)&&c++,d.includes(t.name)&&u++}const p=c==h.length&&3==u,_=a?2:p?0:1;return new Promise((e=>{e({mode:_,data:t,faces:o,hasVertexColors:!!u})}))}))}}Ue._DefaultLoadingOptions={keepInRam:!1},j(new Ue);export{Ue as SPLATFileLoader};
2
+ //# sourceMappingURL=splatFileLoader-D6TovORe.esm.min.js.map