@babylonjs/viewer 7.30.0 → 7.30.1-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 (587) 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-B8QkHePo.esm.js +172 -0
  7. package/dist/chunks/EXT_lights_image_based-B8QkHePo.esm.js.map +1 -0
  8. package/dist/chunks/EXT_lights_image_based-BSiU8YlV.esm.min.js +2 -0
  9. package/dist/chunks/EXT_lights_image_based-BSiU8YlV.esm.min.js.map +1 -0
  10. package/dist/chunks/EXT_mesh_gpu_instancing-hZ-8qY7C.esm.min.js +2 -0
  11. package/dist/chunks/EXT_mesh_gpu_instancing-hZ-8qY7C.esm.min.js.map +1 -0
  12. package/dist/chunks/EXT_mesh_gpu_instancing-wJVTdqxC.esm.js +86 -0
  13. package/dist/chunks/EXT_mesh_gpu_instancing-wJVTdqxC.esm.js.map +1 -0
  14. package/dist/chunks/EXT_meshopt_compression-B2B6s_wQ.esm.min.js +2 -0
  15. package/dist/chunks/EXT_meshopt_compression-B2B6s_wQ.esm.min.js.map +1 -0
  16. package/dist/chunks/EXT_meshopt_compression-NtmqtMgU.esm.js +134 -0
  17. package/dist/chunks/EXT_meshopt_compression-NtmqtMgU.esm.js.map +1 -0
  18. package/dist/chunks/EXT_texture_avif-CHILVmx8.esm.js +44 -0
  19. package/dist/chunks/EXT_texture_avif-CHILVmx8.esm.js.map +1 -0
  20. package/dist/chunks/EXT_texture_avif-CS00cTRS.esm.min.js +2 -0
  21. package/dist/chunks/EXT_texture_avif-CS00cTRS.esm.min.js.map +1 -0
  22. package/dist/chunks/EXT_texture_webp-Bkq-q6FG.esm.min.js +2 -0
  23. package/dist/chunks/EXT_texture_webp-Bkq-q6FG.esm.min.js.map +1 -0
  24. package/dist/chunks/EXT_texture_webp-DN0lE3ZI.esm.js +43 -0
  25. package/dist/chunks/EXT_texture_webp-DN0lE3ZI.esm.js.map +1 -0
  26. package/dist/chunks/ExtrasAsMetadata-BBYH2MWy.esm.js +64 -0
  27. package/dist/chunks/ExtrasAsMetadata-BBYH2MWy.esm.js.map +1 -0
  28. package/dist/chunks/ExtrasAsMetadata-DIPrXR0e.esm.min.js +2 -0
  29. package/dist/chunks/ExtrasAsMetadata-DIPrXR0e.esm.min.js.map +1 -0
  30. package/dist/chunks/KHR_animation_pointer-Bi9FNmzm.esm.js +343 -0
  31. package/dist/chunks/KHR_animation_pointer-Bi9FNmzm.esm.js.map +1 -0
  32. package/dist/chunks/KHR_animation_pointer-cRE1VpCW.esm.min.js +2 -0
  33. package/dist/chunks/KHR_animation_pointer-cRE1VpCW.esm.min.js.map +1 -0
  34. package/dist/chunks/KHR_draco_mesh_compression-B7X-Y-9y.esm.js +610 -0
  35. package/dist/chunks/KHR_draco_mesh_compression-B7X-Y-9y.esm.js.map +1 -0
  36. package/dist/chunks/KHR_draco_mesh_compression-C3N7uxkp.esm.min.js +2 -0
  37. package/dist/chunks/KHR_draco_mesh_compression-C3N7uxkp.esm.min.js.map +1 -0
  38. package/dist/chunks/KHR_interactivity-C0idLGI_.esm.min.js +2 -0
  39. package/dist/chunks/KHR_interactivity-C0idLGI_.esm.min.js.map +1 -0
  40. package/dist/chunks/KHR_interactivity-DP9ukTBy.esm.js +4033 -0
  41. package/dist/chunks/KHR_interactivity-DP9ukTBy.esm.js.map +1 -0
  42. package/dist/chunks/KHR_lights_punctual-Brv0Wuoh.esm.js +1253 -0
  43. package/dist/chunks/KHR_lights_punctual-Brv0Wuoh.esm.js.map +1 -0
  44. package/dist/chunks/KHR_lights_punctual-D5rY7e9I.esm.min.js +2 -0
  45. package/dist/chunks/KHR_lights_punctual-D5rY7e9I.esm.min.js.map +1 -0
  46. package/dist/chunks/KHR_materials_anisotropy-CNTB-Obv.esm.min.js +2 -0
  47. package/dist/chunks/KHR_materials_anisotropy-CNTB-Obv.esm.min.js.map +1 -0
  48. package/dist/chunks/KHR_materials_anisotropy-uViUcrBX.esm.js +64 -0
  49. package/dist/chunks/KHR_materials_anisotropy-uViUcrBX.esm.js.map +1 -0
  50. package/dist/chunks/KHR_materials_clearcoat-C3xAVuBX.esm.min.js +2 -0
  51. package/dist/chunks/KHR_materials_clearcoat-C3xAVuBX.esm.min.js.map +1 -0
  52. package/dist/chunks/KHR_materials_clearcoat-CGnx-Def.esm.js +96 -0
  53. package/dist/chunks/KHR_materials_clearcoat-CGnx-Def.esm.js.map +1 -0
  54. package/dist/chunks/KHR_materials_diffuse_transmission-C6jtnXQp.esm.js +97 -0
  55. package/dist/chunks/KHR_materials_diffuse_transmission-C6jtnXQp.esm.js.map +1 -0
  56. package/dist/chunks/KHR_materials_diffuse_transmission-Chq7fNC6.esm.min.js +2 -0
  57. package/dist/chunks/KHR_materials_diffuse_transmission-Chq7fNC6.esm.min.js.map +1 -0
  58. package/dist/chunks/KHR_materials_dispersion-CdwDEjkD.esm.min.js +2 -0
  59. package/dist/chunks/KHR_materials_dispersion-CdwDEjkD.esm.min.js.map +1 -0
  60. package/dist/chunks/KHR_materials_dispersion-i3C5_tOQ.esm.js +62 -0
  61. package/dist/chunks/KHR_materials_dispersion-i3C5_tOQ.esm.js.map +1 -0
  62. package/dist/chunks/KHR_materials_emissive_strength-Ci0aHrSf.esm.js +55 -0
  63. package/dist/chunks/KHR_materials_emissive_strength-Ci0aHrSf.esm.js.map +1 -0
  64. package/dist/chunks/KHR_materials_emissive_strength-oOS672hJ.esm.min.js +2 -0
  65. package/dist/chunks/KHR_materials_emissive_strength-oOS672hJ.esm.min.js.map +1 -0
  66. package/dist/chunks/KHR_materials_ior-BczbilaN.esm.min.js +2 -0
  67. package/dist/chunks/KHR_materials_ior-BczbilaN.esm.min.js.map +1 -0
  68. package/dist/chunks/KHR_materials_ior-DAgTpEPO.esm.js +64 -0
  69. package/dist/chunks/KHR_materials_ior-DAgTpEPO.esm.js.map +1 -0
  70. package/dist/chunks/KHR_materials_iridescence-BvH-DyMM.esm.js +72 -0
  71. package/dist/chunks/KHR_materials_iridescence-BvH-DyMM.esm.js.map +1 -0
  72. package/dist/chunks/KHR_materials_iridescence-Cs329Tec.esm.min.js +2 -0
  73. package/dist/chunks/KHR_materials_iridescence-Cs329Tec.esm.min.js.map +1 -0
  74. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BAoCWbDD.esm.js +81 -0
  75. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BAoCWbDD.esm.js.map +1 -0
  76. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-RptdeCpW.esm.min.js +2 -0
  77. package/dist/chunks/KHR_materials_pbrSpecularGlossiness-RptdeCpW.esm.min.js.map +1 -0
  78. package/dist/chunks/KHR_materials_sheen-C48YqGyP.esm.js +85 -0
  79. package/dist/chunks/KHR_materials_sheen-C48YqGyP.esm.js.map +1 -0
  80. package/dist/chunks/KHR_materials_sheen-CENbfA8s.esm.min.js +2 -0
  81. package/dist/chunks/KHR_materials_sheen-CENbfA8s.esm.min.js.map +1 -0
  82. package/dist/chunks/KHR_materials_specular-BVunKKIv.esm.js +75 -0
  83. package/dist/chunks/KHR_materials_specular-BVunKKIv.esm.js.map +1 -0
  84. package/dist/chunks/KHR_materials_specular-DzkwSxAP.esm.min.js +2 -0
  85. package/dist/chunks/KHR_materials_specular-DzkwSxAP.esm.min.js.map +1 -0
  86. package/dist/chunks/KHR_materials_transmission-BTHUpaVT.esm.min.js +2 -0
  87. package/dist/chunks/KHR_materials_transmission-BTHUpaVT.esm.min.js.map +1 -0
  88. package/dist/chunks/KHR_materials_transmission-BgZKGZqg.esm.js +307 -0
  89. package/dist/chunks/KHR_materials_transmission-BgZKGZqg.esm.js.map +1 -0
  90. package/dist/chunks/KHR_materials_unlit-CU2DPO94.esm.js +74 -0
  91. package/dist/chunks/KHR_materials_unlit-CU2DPO94.esm.js.map +1 -0
  92. package/dist/chunks/KHR_materials_unlit-qeFFDJsN.esm.min.js +2 -0
  93. package/dist/chunks/KHR_materials_unlit-qeFFDJsN.esm.min.js.map +1 -0
  94. package/dist/chunks/KHR_materials_variants-BYcHAfKt.esm.min.js +2 -0
  95. package/dist/chunks/KHR_materials_variants-BYcHAfKt.esm.min.js.map +1 -0
  96. package/dist/chunks/KHR_materials_variants-DfibokCz.esm.js +238 -0
  97. package/dist/chunks/KHR_materials_variants-DfibokCz.esm.js.map +1 -0
  98. package/dist/chunks/KHR_materials_volume-BLgQKdLc.esm.min.js +2 -0
  99. package/dist/chunks/KHR_materials_volume-BLgQKdLc.esm.min.js.map +1 -0
  100. package/dist/chunks/KHR_materials_volume-CeusrX5Q.esm.js +87 -0
  101. package/dist/chunks/KHR_materials_volume-CeusrX5Q.esm.js.map +1 -0
  102. package/dist/chunks/KHR_mesh_quantization-B1lFBE4i.esm.min.js +2 -0
  103. package/dist/chunks/KHR_mesh_quantization-B1lFBE4i.esm.min.js.map +1 -0
  104. package/dist/chunks/KHR_mesh_quantization-CTlthm9b.esm.js +26 -0
  105. package/dist/chunks/KHR_mesh_quantization-CTlthm9b.esm.js.map +1 -0
  106. package/dist/chunks/KHR_texture_basisu-DxfhU-WD.esm.min.js +2 -0
  107. package/dist/chunks/KHR_texture_basisu-DxfhU-WD.esm.min.js.map +1 -0
  108. package/dist/chunks/KHR_texture_basisu-kee0jVUy.esm.js +43 -0
  109. package/dist/chunks/KHR_texture_basisu-kee0jVUy.esm.js.map +1 -0
  110. package/dist/chunks/KHR_texture_transform-9DUjN2OI.esm.js +63 -0
  111. package/dist/chunks/KHR_texture_transform-9DUjN2OI.esm.js.map +1 -0
  112. package/dist/chunks/KHR_texture_transform-DbQFyzy6.esm.min.js +2 -0
  113. package/dist/chunks/KHR_texture_transform-DbQFyzy6.esm.min.js.map +1 -0
  114. package/dist/chunks/KHR_xmp_json_ld-CXJGx-sA.esm.js +51 -0
  115. package/dist/chunks/KHR_xmp_json_ld-CXJGx-sA.esm.js.map +1 -0
  116. package/dist/chunks/KHR_xmp_json_ld-tRIKOwLG.esm.min.js +2 -0
  117. package/dist/chunks/KHR_xmp_json_ld-tRIKOwLG.esm.min.js.map +1 -0
  118. package/dist/chunks/MSFT_audio_emitter-CI0Nml3O.esm.js +2207 -0
  119. package/dist/chunks/MSFT_audio_emitter-CI0Nml3O.esm.js.map +1 -0
  120. package/dist/chunks/MSFT_audio_emitter-DpCifHwR.esm.min.js +2 -0
  121. package/dist/chunks/MSFT_audio_emitter-DpCifHwR.esm.min.js.map +1 -0
  122. package/dist/chunks/MSFT_lod-B9ex3lVq.esm.js +337 -0
  123. package/dist/chunks/MSFT_lod-B9ex3lVq.esm.js.map +1 -0
  124. package/dist/chunks/MSFT_lod-z8dJ8Drm.esm.min.js +2 -0
  125. package/dist/chunks/MSFT_lod-z8dJ8Drm.esm.min.js.map +1 -0
  126. package/dist/chunks/MSFT_minecraftMesh-CtBZz4pl.esm.min.js +2 -0
  127. package/dist/chunks/MSFT_minecraftMesh-CtBZz4pl.esm.min.js.map +1 -0
  128. package/dist/chunks/MSFT_minecraftMesh-nf1sPsge.esm.js +46 -0
  129. package/dist/chunks/MSFT_minecraftMesh-nf1sPsge.esm.js.map +1 -0
  130. package/dist/chunks/MSFT_sRGBFactors-CRYLn1p6.esm.min.js +2 -0
  131. package/dist/chunks/MSFT_sRGBFactors-CRYLn1p6.esm.min.js.map +1 -0
  132. package/dist/chunks/MSFT_sRGBFactors-CeWD8LAk.esm.js +47 -0
  133. package/dist/chunks/MSFT_sRGBFactors-CeWD8LAk.esm.js.map +1 -0
  134. package/dist/chunks/animationGroup-B_9qZnYC.esm.min.js +2 -0
  135. package/dist/chunks/animationGroup-B_9qZnYC.esm.min.js.map +1 -0
  136. package/dist/chunks/animationGroup-Caf5e8cG.esm.js +2479 -0
  137. package/dist/chunks/animationGroup-Caf5e8cG.esm.js.map +1 -0
  138. package/dist/chunks/assetContainer-B2UWLifX.esm.min.js +2 -0
  139. package/dist/chunks/assetContainer-B2UWLifX.esm.min.js.map +1 -0
  140. package/dist/chunks/assetContainer-C3VbcE_z.esm.js +1720 -0
  141. package/dist/chunks/assetContainer-C3VbcE_z.esm.js.map +1 -0
  142. package/dist/chunks/audioEngine-BsSa5q28.esm.js +305 -0
  143. package/dist/chunks/audioEngine-BsSa5q28.esm.js.map +1 -0
  144. package/dist/chunks/audioEngine-Q9RaM40V.esm.min.js +2 -0
  145. package/dist/chunks/audioEngine-Q9RaM40V.esm.min.js.map +1 -0
  146. package/dist/chunks/bakedVertexAnimation-Dl6TUwlE.esm.min.js +2 -0
  147. package/dist/chunks/bakedVertexAnimation-Dl6TUwlE.esm.min.js.map +1 -0
  148. package/dist/chunks/bakedVertexAnimation-FeXNV03T.esm.js +119 -0
  149. package/dist/chunks/bakedVertexAnimation-FeXNV03T.esm.js.map +1 -0
  150. package/dist/chunks/basisTextureLoader-BDG3XE5Y.esm.min.js +2 -0
  151. package/dist/chunks/basisTextureLoader-BDG3XE5Y.esm.min.js.map +1 -0
  152. package/dist/chunks/basisTextureLoader-DfZMofRb.esm.js +600 -0
  153. package/dist/chunks/basisTextureLoader-DfZMofRb.esm.js.map +1 -0
  154. package/dist/chunks/dds-Igr2kHF_.esm.min.js +2 -0
  155. package/dist/chunks/dds-Igr2kHF_.esm.min.js.map +1 -0
  156. package/dist/chunks/dds-o4OMNRtH.esm.js +540 -0
  157. package/dist/chunks/dds-o4OMNRtH.esm.js.map +1 -0
  158. package/dist/chunks/ddsTextureLoader-CnyOXLtf.esm.min.js +2 -0
  159. package/dist/chunks/ddsTextureLoader-CnyOXLtf.esm.min.js.map +1 -0
  160. package/dist/chunks/ddsTextureLoader-VMzKzLn-.esm.js +88 -0
  161. package/dist/chunks/ddsTextureLoader-VMzKzLn-.esm.js.map +1 -0
  162. package/dist/chunks/decalFragment-Dd54mbG2.esm.min.js +2 -0
  163. package/dist/chunks/decalFragment-Dd54mbG2.esm.min.js.map +1 -0
  164. package/dist/chunks/decalFragment-DfryH-xh.esm.js +18 -0
  165. package/dist/chunks/decalFragment-DfryH-xh.esm.js.map +1 -0
  166. package/dist/chunks/default.fragment-CnYfGMJp.esm.js +449 -0
  167. package/dist/chunks/default.fragment-CnYfGMJp.esm.js.map +1 -0
  168. package/dist/chunks/default.fragment-CsdUsRw_.esm.min.js +2 -0
  169. package/dist/chunks/default.fragment-CsdUsRw_.esm.min.js.map +1 -0
  170. package/dist/chunks/default.fragment-D0ITB58w.esm.js +515 -0
  171. package/dist/chunks/default.fragment-D0ITB58w.esm.js.map +1 -0
  172. package/dist/chunks/default.fragment-D6IvjaEp.esm.min.js +2 -0
  173. package/dist/chunks/default.fragment-D6IvjaEp.esm.min.js.map +1 -0
  174. package/dist/chunks/default.vertex-Ch_6OmJk.esm.min.js +2 -0
  175. package/dist/chunks/default.vertex-Ch_6OmJk.esm.min.js.map +1 -0
  176. package/dist/chunks/default.vertex-DqT17MVn.esm.js +199 -0
  177. package/dist/chunks/default.vertex-DqT17MVn.esm.js.map +1 -0
  178. package/dist/chunks/default.vertex-ld9hqDyj.esm.js +180 -0
  179. package/dist/chunks/default.vertex-ld9hqDyj.esm.js.map +1 -0
  180. package/dist/chunks/default.vertex-wi8elnOd.esm.min.js +2 -0
  181. package/dist/chunks/default.vertex-wi8elnOd.esm.min.js.map +1 -0
  182. package/dist/chunks/defaultUboDeclaration--F3dwx1S.esm.js +15 -0
  183. package/dist/chunks/defaultUboDeclaration--F3dwx1S.esm.js.map +1 -0
  184. package/dist/chunks/defaultUboDeclaration-B1N9B5Gl.esm.min.js +2 -0
  185. package/dist/chunks/defaultUboDeclaration-B1N9B5Gl.esm.min.js.map +1 -0
  186. package/dist/chunks/defaultUboDeclaration-CVb37fjo.esm.min.js +2 -0
  187. package/dist/chunks/defaultUboDeclaration-CVb37fjo.esm.min.js.map +1 -0
  188. package/dist/chunks/defaultUboDeclaration-OtAuvsYL.esm.js +13 -0
  189. package/dist/chunks/defaultUboDeclaration-OtAuvsYL.esm.js.map +1 -0
  190. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
  191. package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
  192. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
  193. package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
  194. package/dist/chunks/dumpTools-Cd98CM01.esm.js +402 -0
  195. package/dist/chunks/dumpTools-Cd98CM01.esm.js.map +1 -0
  196. package/dist/chunks/dumpTools-kyQtrfmm.esm.min.js +2 -0
  197. package/dist/chunks/dumpTools-kyQtrfmm.esm.min.js.map +1 -0
  198. package/dist/chunks/engine-B3yxhwnS.esm.js +2174 -0
  199. package/dist/chunks/engine-B3yxhwnS.esm.js.map +1 -0
  200. package/dist/chunks/engine-CPXcFlBT.esm.min.js +2 -0
  201. package/dist/chunks/engine-CPXcFlBT.esm.min.js.map +1 -0
  202. package/dist/chunks/engine.common-B6M8bu3t.esm.js +1088 -0
  203. package/dist/chunks/engine.common-B6M8bu3t.esm.js.map +1 -0
  204. package/dist/chunks/engine.common-cpembRo8.esm.min.js +2 -0
  205. package/dist/chunks/engine.common-cpembRo8.esm.min.js.map +1 -0
  206. package/dist/chunks/envTextureLoader-BtwI9GPN.esm.js +65 -0
  207. package/dist/chunks/envTextureLoader-BtwI9GPN.esm.js.map +1 -0
  208. package/dist/chunks/envTextureLoader-D9erruFA.esm.min.js +2 -0
  209. package/dist/chunks/envTextureLoader-D9erruFA.esm.min.js.map +1 -0
  210. package/dist/chunks/environmentTextureTools-BCJKgGWI.esm.min.js +2 -0
  211. package/dist/chunks/environmentTextureTools-BCJKgGWI.esm.min.js.map +1 -0
  212. package/dist/chunks/environmentTextureTools-DIr7XYmL.esm.js +382 -0
  213. package/dist/chunks/environmentTextureTools-DIr7XYmL.esm.js.map +1 -0
  214. package/dist/chunks/exrTextureLoader-BIpKPFKS.esm.js +1682 -0
  215. package/dist/chunks/exrTextureLoader-BIpKPFKS.esm.js.map +1 -0
  216. package/dist/chunks/exrTextureLoader-D4DP8CEI.esm.min.js +2 -0
  217. package/dist/chunks/exrTextureLoader-D4DP8CEI.esm.min.js.map +1 -0
  218. package/dist/chunks/fogFragment-CT1rtmII.esm.js +102 -0
  219. package/dist/chunks/fogFragment-CT1rtmII.esm.js.map +1 -0
  220. package/dist/chunks/fogFragment-Caucp7gO.esm.min.js +2 -0
  221. package/dist/chunks/fogFragment-Caucp7gO.esm.min.js.map +1 -0
  222. package/dist/chunks/fresnelFunction-C-YnVKZy.esm.js +12 -0
  223. package/dist/chunks/fresnelFunction-C-YnVKZy.esm.js.map +1 -0
  224. package/dist/chunks/fresnelFunction-DXV-Gn3X.esm.min.js +2 -0
  225. package/dist/chunks/fresnelFunction-DXV-Gn3X.esm.min.js.map +1 -0
  226. package/dist/chunks/glTFLoader-BUEhZ_Yx.esm.js +7577 -0
  227. package/dist/chunks/glTFLoader-BUEhZ_Yx.esm.js.map +1 -0
  228. package/dist/chunks/glTFLoader-Bikb9kQP.esm.min.js +2 -0
  229. package/dist/chunks/glTFLoader-Bikb9kQP.esm.min.js.map +1 -0
  230. package/dist/chunks/glTFLoaderAnimation-DoayKrau.esm.min.js +2 -0
  231. package/dist/chunks/glTFLoaderAnimation-DoayKrau.esm.min.js.map +1 -0
  232. package/dist/chunks/glTFLoaderAnimation-DrC2hKeR.esm.js +77 -0
  233. package/dist/chunks/glTFLoaderAnimation-DrC2hKeR.esm.js.map +1 -0
  234. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
  235. package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
  236. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
  237. package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
  238. package/dist/chunks/harmonicsFunctions-CvPMLLnj.esm.js +34 -0
  239. package/dist/chunks/harmonicsFunctions-CvPMLLnj.esm.js.map +1 -0
  240. package/dist/chunks/harmonicsFunctions-D36-AdS5.esm.js +35 -0
  241. package/dist/chunks/harmonicsFunctions-D36-AdS5.esm.js.map +1 -0
  242. package/dist/chunks/harmonicsFunctions-DZ2FogZq.esm.min.js +2 -0
  243. package/dist/chunks/harmonicsFunctions-DZ2FogZq.esm.min.js.map +1 -0
  244. package/dist/chunks/harmonicsFunctions-Dqm6bWBy.esm.min.js +2 -0
  245. package/dist/chunks/harmonicsFunctions-Dqm6bWBy.esm.min.js.map +1 -0
  246. package/dist/chunks/hdrTextureLoader-CiuIhL8I.esm.js +252 -0
  247. package/dist/chunks/hdrTextureLoader-CiuIhL8I.esm.js.map +1 -0
  248. package/dist/chunks/hdrTextureLoader-QQ6TEFPn.esm.min.js +2 -0
  249. package/dist/chunks/hdrTextureLoader-QQ6TEFPn.esm.min.js.map +1 -0
  250. package/dist/chunks/helperFunctions-BmpTMP9U.esm.min.js +2 -0
  251. package/dist/chunks/helperFunctions-BmpTMP9U.esm.min.js.map +1 -0
  252. package/dist/chunks/helperFunctions-Cb7U87AV.esm.js +108 -0
  253. package/dist/chunks/helperFunctions-Cb7U87AV.esm.js.map +1 -0
  254. package/dist/chunks/helperFunctions-DbJ3JhM0.esm.js +80 -0
  255. package/dist/chunks/helperFunctions-DbJ3JhM0.esm.js.map +1 -0
  256. package/dist/chunks/helperFunctions-M382PZ6f.esm.min.js +2 -0
  257. package/dist/chunks/helperFunctions-M382PZ6f.esm.min.js.map +1 -0
  258. package/dist/chunks/index-CIyiNmMD.esm.min.js +57 -0
  259. package/dist/chunks/index-CIyiNmMD.esm.min.js.map +1 -0
  260. package/dist/chunks/index-DV_mRp0V.esm.js +72045 -0
  261. package/dist/chunks/index-DV_mRp0V.esm.js.map +1 -0
  262. package/dist/chunks/ktxTextureLoader-B1e7g2Se.esm.js +814 -0
  263. package/dist/chunks/ktxTextureLoader-B1e7g2Se.esm.js.map +1 -0
  264. package/dist/chunks/ktxTextureLoader-CfLNNmBj.esm.min.js +2 -0
  265. package/dist/chunks/ktxTextureLoader-CfLNNmBj.esm.min.js.map +1 -0
  266. package/dist/chunks/logDepthDeclaration-AKRPAXbv.esm.js +20 -0
  267. package/dist/chunks/logDepthDeclaration-AKRPAXbv.esm.js.map +1 -0
  268. package/dist/chunks/logDepthDeclaration-BFlc1Sz5.esm.js +35 -0
  269. package/dist/chunks/logDepthDeclaration-BFlc1Sz5.esm.js.map +1 -0
  270. package/dist/chunks/logDepthDeclaration-BkU1fH0B.esm.min.js +2 -0
  271. package/dist/chunks/logDepthDeclaration-BkU1fH0B.esm.min.js.map +1 -0
  272. package/dist/chunks/logDepthDeclaration-C6GKSjog.esm.min.js +2 -0
  273. package/dist/chunks/logDepthDeclaration-C6GKSjog.esm.min.js.map +1 -0
  274. package/dist/chunks/logDepthVertex-BOQAtuDj.esm.js +77 -0
  275. package/dist/chunks/logDepthVertex-BOQAtuDj.esm.js.map +1 -0
  276. package/dist/chunks/logDepthVertex-Co2KvxUo.esm.min.js +2 -0
  277. package/dist/chunks/logDepthVertex-Co2KvxUo.esm.min.js.map +1 -0
  278. package/dist/chunks/logDepthVertex-H_MJJ_GQ.esm.min.js +2 -0
  279. package/dist/chunks/logDepthVertex-H_MJJ_GQ.esm.min.js.map +1 -0
  280. package/dist/chunks/logDepthVertex-u512xo4x.esm.js +488 -0
  281. package/dist/chunks/logDepthVertex-u512xo4x.esm.js.map +1 -0
  282. package/dist/chunks/mainUVVaryingDeclaration-BeDhg2oD.esm.js +11 -0
  283. package/dist/chunks/mainUVVaryingDeclaration-BeDhg2oD.esm.js.map +1 -0
  284. package/dist/chunks/mainUVVaryingDeclaration-C3OpRYwk.esm.min.js +2 -0
  285. package/dist/chunks/mainUVVaryingDeclaration-C3OpRYwk.esm.min.js.map +1 -0
  286. package/dist/chunks/meshUboDeclaration-DS9O2grO.esm.min.js +2 -0
  287. package/dist/chunks/meshUboDeclaration-DS9O2grO.esm.min.js.map +1 -0
  288. package/dist/chunks/meshUboDeclaration-Dj2hscRy.esm.js +24 -0
  289. package/dist/chunks/meshUboDeclaration-Dj2hscRy.esm.js.map +1 -0
  290. package/dist/chunks/objFileLoader-BbMgApzR.esm.min.js +2 -0
  291. package/dist/chunks/objFileLoader-BbMgApzR.esm.min.js.map +1 -0
  292. package/dist/chunks/objFileLoader-BpsC8pGC.esm.js +1338 -0
  293. package/dist/chunks/objFileLoader-BpsC8pGC.esm.js.map +1 -0
  294. package/dist/chunks/oitFragment-BlZOVBNE.esm.js +1210 -0
  295. package/dist/chunks/oitFragment-BlZOVBNE.esm.js.map +1 -0
  296. package/dist/chunks/oitFragment-D5kQEOJH.esm.min.js +2 -0
  297. package/dist/chunks/oitFragment-D5kQEOJH.esm.min.js.map +1 -0
  298. package/dist/chunks/oitFragment-HW7VZaca.esm.min.js +2 -0
  299. package/dist/chunks/oitFragment-HW7VZaca.esm.min.js.map +1 -0
  300. package/dist/chunks/oitFragment-JXDEu0bi.esm.js +1150 -0
  301. package/dist/chunks/oitFragment-JXDEu0bi.esm.js.map +1 -0
  302. package/dist/chunks/pass.fragment-BJQq2qAp.esm.js +15 -0
  303. package/dist/chunks/pass.fragment-BJQq2qAp.esm.js.map +1 -0
  304. package/dist/chunks/pass.fragment-BxD_kCkX.esm.min.js +2 -0
  305. package/dist/chunks/pass.fragment-BxD_kCkX.esm.min.js.map +1 -0
  306. package/dist/chunks/pass.fragment-By7gsCOP.esm.js +15 -0
  307. package/dist/chunks/pass.fragment-By7gsCOP.esm.js.map +1 -0
  308. package/dist/chunks/pass.fragment-CBeObuzk.esm.min.js +2 -0
  309. package/dist/chunks/pass.fragment-CBeObuzk.esm.min.js.map +1 -0
  310. package/dist/chunks/pbr.fragment-BYJy3TyL.esm.js +3165 -0
  311. package/dist/chunks/pbr.fragment-BYJy3TyL.esm.js.map +1 -0
  312. package/dist/chunks/pbr.fragment-Cjqfjhki.esm.min.js +2 -0
  313. package/dist/chunks/pbr.fragment-Cjqfjhki.esm.min.js.map +1 -0
  314. package/dist/chunks/pbr.fragment-fj1P_BfA.esm.min.js +2 -0
  315. package/dist/chunks/pbr.fragment-fj1P_BfA.esm.min.js.map +1 -0
  316. package/dist/chunks/pbr.fragment-wP-c85IY.esm.js +3219 -0
  317. package/dist/chunks/pbr.fragment-wP-c85IY.esm.js.map +1 -0
  318. package/dist/chunks/pbr.vertex-BviiatXf.esm.js +335 -0
  319. package/dist/chunks/pbr.vertex-BviiatXf.esm.js.map +1 -0
  320. package/dist/chunks/pbr.vertex-DEEQfrHH.esm.js +210 -0
  321. package/dist/chunks/pbr.vertex-DEEQfrHH.esm.js.map +1 -0
  322. package/dist/chunks/pbr.vertex-DK-wI3nj.esm.min.js +2 -0
  323. package/dist/chunks/pbr.vertex-DK-wI3nj.esm.min.js.map +1 -0
  324. package/dist/chunks/pbr.vertex-SS6Eh96F.esm.min.js +2 -0
  325. package/dist/chunks/pbr.vertex-SS6Eh96F.esm.min.js.map +1 -0
  326. package/dist/chunks/postprocess.vertex-BbTJmjCf.esm.min.js +2 -0
  327. package/dist/chunks/postprocess.vertex-BbTJmjCf.esm.min.js.map +1 -0
  328. package/dist/chunks/postprocess.vertex-CNs3MRKb.esm.js +20 -0
  329. package/dist/chunks/postprocess.vertex-CNs3MRKb.esm.js.map +1 -0
  330. package/dist/chunks/postprocess.vertex-CTo285Z2.esm.min.js +2 -0
  331. package/dist/chunks/postprocess.vertex-CTo285Z2.esm.min.js.map +1 -0
  332. package/dist/chunks/postprocess.vertex-y147vu4l.esm.js +18 -0
  333. package/dist/chunks/postprocess.vertex-y147vu4l.esm.js.map +1 -0
  334. package/dist/chunks/rawTexture-6isRmFti.esm.js +191 -0
  335. package/dist/chunks/rawTexture-6isRmFti.esm.js.map +1 -0
  336. package/dist/chunks/rawTexture-D4XnSF1r.esm.min.js +2 -0
  337. package/dist/chunks/rawTexture-D4XnSF1r.esm.min.js.map +1 -0
  338. package/dist/chunks/rgbdDecode.fragment-3lEy-Ka7.esm.js +17 -0
  339. package/dist/chunks/rgbdDecode.fragment-3lEy-Ka7.esm.js.map +1 -0
  340. package/dist/chunks/rgbdDecode.fragment-COQem3tF.esm.js +17 -0
  341. package/dist/chunks/rgbdDecode.fragment-COQem3tF.esm.js.map +1 -0
  342. package/dist/chunks/rgbdDecode.fragment-DXGiOnN0.esm.min.js +2 -0
  343. package/dist/chunks/rgbdDecode.fragment-DXGiOnN0.esm.min.js.map +1 -0
  344. package/dist/chunks/rgbdDecode.fragment-H721Xf9-.esm.min.js +2 -0
  345. package/dist/chunks/rgbdDecode.fragment-H721Xf9-.esm.min.js.map +1 -0
  346. package/dist/chunks/rgbdEncode.fragment-B4OD9ZtF.esm.min.js +2 -0
  347. package/dist/chunks/rgbdEncode.fragment-B4OD9ZtF.esm.min.js.map +1 -0
  348. package/dist/chunks/rgbdEncode.fragment-CQiCuTLF.esm.js +17 -0
  349. package/dist/chunks/rgbdEncode.fragment-CQiCuTLF.esm.js.map +1 -0
  350. package/dist/chunks/rgbdEncode.fragment-CX3nTLp5.esm.js +17 -0
  351. package/dist/chunks/rgbdEncode.fragment-CX3nTLp5.esm.js.map +1 -0
  352. package/dist/chunks/rgbdEncode.fragment-CdBxB5jv.esm.min.js +2 -0
  353. package/dist/chunks/rgbdEncode.fragment-CdBxB5jv.esm.min.js.map +1 -0
  354. package/dist/chunks/splatFileLoader-3iaRLBaz.esm.min.js +2 -0
  355. package/dist/chunks/splatFileLoader-3iaRLBaz.esm.min.js.map +1 -0
  356. package/dist/chunks/splatFileLoader-B9nfzA38.esm.js +3598 -0
  357. package/dist/chunks/splatFileLoader-B9nfzA38.esm.js.map +1 -0
  358. package/dist/chunks/standardMaterial-PSnYwoCV.esm.min.js +2 -0
  359. package/dist/chunks/standardMaterial-PSnYwoCV.esm.min.js.map +1 -0
  360. package/dist/chunks/standardMaterial-sHuTQ1tu.esm.js +1800 -0
  361. package/dist/chunks/standardMaterial-sHuTQ1tu.esm.js.map +1 -0
  362. package/dist/chunks/stlFileLoader-CGeDwcKD.esm.js +238 -0
  363. package/dist/chunks/stlFileLoader-CGeDwcKD.esm.js.map +1 -0
  364. package/dist/chunks/stlFileLoader-CMvJa97I.esm.min.js +2 -0
  365. package/dist/chunks/stlFileLoader-CMvJa97I.esm.min.js.map +1 -0
  366. package/dist/chunks/tgaTextureLoader-DA9PD4-W.esm.min.js +2 -0
  367. package/dist/chunks/tgaTextureLoader-DA9PD4-W.esm.min.js.map +1 -0
  368. package/dist/chunks/tgaTextureLoader-tLbUn9Fj.esm.js +349 -0
  369. package/dist/chunks/tgaTextureLoader-tLbUn9Fj.esm.js.map +1 -0
  370. package/dist/chunks/thinEngine-BHJfErVb.esm.js +3721 -0
  371. package/dist/chunks/thinEngine-BHJfErVb.esm.js.map +1 -0
  372. package/dist/chunks/thinEngine-Dm9mz21A.esm.min.js +2 -0
  373. package/dist/chunks/thinEngine-Dm9mz21A.esm.min.js.map +1 -0
  374. package/dist/chunks/thinInstanceMesh-BmyPW1W0.esm.js +314 -0
  375. package/dist/chunks/thinInstanceMesh-BmyPW1W0.esm.js.map +1 -0
  376. package/dist/chunks/thinInstanceMesh-FE1_0Dpq.esm.min.js +2 -0
  377. package/dist/chunks/thinInstanceMesh-FE1_0Dpq.esm.min.js.map +1 -0
  378. package/dist/chunks/vertexColorMixing-q2DcZ4Dn.esm.js +528 -0
  379. package/dist/chunks/vertexColorMixing-q2DcZ4Dn.esm.js.map +1 -0
  380. package/dist/chunks/vertexColorMixing-rp5ckHF-.esm.min.js +2 -0
  381. package/dist/chunks/vertexColorMixing-rp5ckHF-.esm.min.js.map +1 -0
  382. package/dist/chunks/webgpuEngine-B_ikij35.esm.js +11191 -0
  383. package/dist/chunks/webgpuEngine-B_ikij35.esm.js.map +1 -0
  384. package/dist/chunks/webgpuEngine-CsJfrYZY.esm.min.js +2 -0
  385. package/dist/chunks/webgpuEngine-CsJfrYZY.esm.min.js.map +1 -0
  386. package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
  387. package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
  388. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
  389. package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
  390. package/docs/ViewerDefault.jpg +0 -0
  391. package/docs/ViewerParts.jpg +0 -0
  392. package/docs/ViewerSlots.jpg +0 -0
  393. package/docs/ViewerStyled.jpg +0 -0
  394. package/lib/index.d.ts +325 -0
  395. package/lib/index.js +1116 -0
  396. package/lib/index.js.map +1 -0
  397. package/package.json +18 -27
  398. package/readme.md +145 -21
  399. package/configuration/configuration.d.ts +0 -107
  400. package/configuration/configuration.js +0 -16
  401. package/configuration/configuration.js.map +0 -1
  402. package/configuration/configurationCompatibility.d.ts +0 -8
  403. package/configuration/configurationCompatibility.js +0 -66
  404. package/configuration/configurationCompatibility.js.map +0 -1
  405. package/configuration/configurationContainer.d.ts +0 -10
  406. package/configuration/configurationContainer.js +0 -10
  407. package/configuration/configurationContainer.js.map +0 -1
  408. package/configuration/globals.d.ts +0 -6
  409. package/configuration/globals.js +0 -18
  410. package/configuration/globals.js.map +0 -1
  411. package/configuration/index.d.ts +0 -2
  412. package/configuration/index.js +0 -4
  413. package/configuration/index.js.map +0 -1
  414. package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
  415. package/configuration/interfaces/cameraConfiguration.js +0 -2
  416. package/configuration/interfaces/cameraConfiguration.js.map +0 -1
  417. package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
  418. package/configuration/interfaces/colorGradingConfiguration.js +0 -2
  419. package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
  420. package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
  421. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
  422. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
  423. package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
  424. package/configuration/interfaces/environmentMapConfiguration.js +0 -2
  425. package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
  426. package/configuration/interfaces/groundConfiguration.d.ts +0 -24
  427. package/configuration/interfaces/groundConfiguration.js +0 -2
  428. package/configuration/interfaces/groundConfiguration.js.map +0 -1
  429. package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
  430. package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
  431. package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
  432. package/configuration/interfaces/index.d.ts +0 -15
  433. package/configuration/interfaces/index.js +0 -16
  434. package/configuration/interfaces/index.js.map +0 -1
  435. package/configuration/interfaces/lightConfiguration.d.ts +0 -60
  436. package/configuration/interfaces/lightConfiguration.js +0 -2
  437. package/configuration/interfaces/lightConfiguration.js.map +0 -1
  438. package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
  439. package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
  440. package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
  441. package/configuration/interfaces/modelConfiguration.d.ts +0 -65
  442. package/configuration/interfaces/modelConfiguration.js +0 -2
  443. package/configuration/interfaces/modelConfiguration.js.map +0 -1
  444. package/configuration/interfaces/observersConfiguration.d.ts +0 -5
  445. package/configuration/interfaces/observersConfiguration.js +0 -2
  446. package/configuration/interfaces/observersConfiguration.js.map +0 -1
  447. package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
  448. package/configuration/interfaces/sceneConfiguration.js +0 -2
  449. package/configuration/interfaces/sceneConfiguration.js.map +0 -1
  450. package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
  451. package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
  452. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
  453. package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
  454. package/configuration/interfaces/skyboxConfiguration.js +0 -2
  455. package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
  456. package/configuration/interfaces/templateConfiguration.d.ts +0 -67
  457. package/configuration/interfaces/templateConfiguration.js +0 -2
  458. package/configuration/interfaces/templateConfiguration.js.map +0 -1
  459. package/configuration/interfaces/vrConfiguration.d.ts +0 -16
  460. package/configuration/interfaces/vrConfiguration.js +0 -2
  461. package/configuration/interfaces/vrConfiguration.js.map +0 -1
  462. package/configuration/loader.d.ts +0 -4
  463. package/configuration/loader.js +0 -17
  464. package/configuration/loader.js.map +0 -1
  465. package/configuration/mappers.d.ts +0 -43
  466. package/configuration/mappers.js +0 -192
  467. package/configuration/mappers.js.map +0 -1
  468. package/configuration/renderOnlyLoader.d.ts +0 -33
  469. package/configuration/renderOnlyLoader.js +0 -162
  470. package/configuration/renderOnlyLoader.js.map +0 -1
  471. package/configuration/types/default.d.ts +0 -6
  472. package/configuration/types/default.js +0 -121
  473. package/configuration/types/default.js.map +0 -1
  474. package/configuration/types/environmentMap.d.ts +0 -5
  475. package/configuration/types/environmentMap.js +0 -14
  476. package/configuration/types/environmentMap.js.map +0 -1
  477. package/configuration/types/extended.d.ts +0 -6
  478. package/configuration/types/extended.js +0 -317
  479. package/configuration/types/extended.js.map +0 -1
  480. package/configuration/types/index.d.ts +0 -14
  481. package/configuration/types/index.js +0 -51
  482. package/configuration/types/index.js.map +0 -1
  483. package/configuration/types/minimal.d.ts +0 -6
  484. package/configuration/types/minimal.js +0 -43
  485. package/configuration/types/minimal.js.map +0 -1
  486. package/configuration/types/renderOnlyDefault.d.ts +0 -30
  487. package/configuration/types/renderOnlyDefault.js +0 -31
  488. package/configuration/types/renderOnlyDefault.js.map +0 -1
  489. package/configuration/types/shadowLight.d.ts +0 -9
  490. package/configuration/types/shadowLight.js +0 -64
  491. package/configuration/types/shadowLight.js.map +0 -1
  492. package/helper/index.d.ts +0 -29
  493. package/helper/index.js +0 -66
  494. package/helper/index.js.map +0 -1
  495. package/index.d.ts +0 -30
  496. package/index.js +0 -46
  497. package/index.js.map +0 -1
  498. package/initializer.d.ts +0 -11
  499. package/initializer.js +0 -35
  500. package/initializer.js.map +0 -1
  501. package/interfaces.d.ts +0 -5
  502. package/interfaces.js +0 -7
  503. package/interfaces.js.map +0 -1
  504. package/labs/environmentSerializer.d.ts +0 -126
  505. package/labs/environmentSerializer.js +0 -191
  506. package/labs/environmentSerializer.js.map +0 -1
  507. package/labs/texture.d.ts +0 -183
  508. package/labs/texture.js +0 -350
  509. package/labs/texture.js.map +0 -1
  510. package/labs/viewerLabs.d.ts +0 -51
  511. package/labs/viewerLabs.js +0 -134
  512. package/labs/viewerLabs.js.map +0 -1
  513. package/loader/modelLoader.d.ts +0 -56
  514. package/loader/modelLoader.js +0 -199
  515. package/loader/modelLoader.js.map +0 -1
  516. package/loader/plugins/applyMaterialConfig.d.ts +0 -12
  517. package/loader/plugins/applyMaterialConfig.js +0 -16
  518. package/loader/plugins/applyMaterialConfig.js.map +0 -1
  519. package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
  520. package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
  521. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
  522. package/loader/plugins/index.d.ts +0 -19
  523. package/loader/plugins/index.js +0 -44
  524. package/loader/plugins/index.js.map +0 -1
  525. package/loader/plugins/loaderPlugin.d.ts +0 -24
  526. package/loader/plugins/loaderPlugin.js +0 -2
  527. package/loader/plugins/loaderPlugin.js.map +0 -1
  528. package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
  529. package/loader/plugins/msftLodLoaderPlugin.js +0 -21
  530. package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
  531. package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
  532. package/loader/plugins/telemetryLoaderPlugin.js +0 -36
  533. package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
  534. package/managers/observablesManager.d.ts +0 -66
  535. package/managers/observablesManager.js +0 -35
  536. package/managers/observablesManager.js.map +0 -1
  537. package/managers/sceneManager.d.ts +0 -245
  538. package/managers/sceneManager.js +0 -1375
  539. package/managers/sceneManager.js.map +0 -1
  540. package/managers/telemetryManager.d.ts +0 -78
  541. package/managers/telemetryManager.js +0 -117
  542. package/managers/telemetryManager.js.map +0 -1
  543. package/model/modelAnimation.d.ts +0 -215
  544. package/model/modelAnimation.js +0 -237
  545. package/model/modelAnimation.js.map +0 -1
  546. package/model/viewerModel.d.ts +0 -233
  547. package/model/viewerModel.js +0 -673
  548. package/model/viewerModel.js.map +0 -1
  549. package/optimizer/custom/extended.d.ts +0 -13
  550. package/optimizer/custom/extended.js +0 -101
  551. package/optimizer/custom/extended.js.map +0 -1
  552. package/optimizer/custom/index.d.ts +0 -9
  553. package/optimizer/custom/index.js +0 -26
  554. package/optimizer/custom/index.js.map +0 -1
  555. package/renderOnlyIndex.d.ts +0 -11
  556. package/renderOnlyIndex.js +0 -18
  557. package/renderOnlyIndex.js.map +0 -1
  558. package/templating/eventManager.d.ts +0 -35
  559. package/templating/eventManager.js +0 -66
  560. package/templating/eventManager.js.map +0 -1
  561. package/templating/plugins/hdButtonPlugin.d.ts +0 -9
  562. package/templating/plugins/hdButtonPlugin.js +0 -21
  563. package/templating/plugins/hdButtonPlugin.js.map +0 -1
  564. package/templating/plugins/printButton.d.ts +0 -9
  565. package/templating/plugins/printButton.js +0 -40
  566. package/templating/plugins/printButton.js.map +0 -1
  567. package/templating/templateManager.d.ts +0 -197
  568. package/templating/templateManager.js +0 -561
  569. package/templating/templateManager.js.map +0 -1
  570. package/templating/viewerTemplatePlugin.d.ts +0 -21
  571. package/templating/viewerTemplatePlugin.js +0 -69
  572. package/templating/viewerTemplatePlugin.js.map +0 -1
  573. package/viewer/defaultViewer.d.ts +0 -130
  574. package/viewer/defaultViewer.js +0 -672
  575. package/viewer/defaultViewer.js.map +0 -1
  576. package/viewer/renderOnlyViewer.d.ts +0 -9
  577. package/viewer/renderOnlyViewer.js +0 -46
  578. package/viewer/renderOnlyViewer.js.map +0 -1
  579. package/viewer/viewer.d.ts +0 -258
  580. package/viewer/viewer.js +0 -783
  581. package/viewer/viewer.js.map +0 -1
  582. package/viewer/viewerManager.d.ts +0 -58
  583. package/viewer/viewerManager.js +0 -91
  584. package/viewer/viewerManager.js.map +0 -1
  585. package/viewer/viewerWithTemplate.d.ts +0 -9
  586. package/viewer/viewerWithTemplate.js +0 -20
  587. package/viewer/viewerWithTemplate.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ import { i as ShaderStore } from './index-DV_mRp0V.esm.js';
2
+ import './helperFunctions-Cb7U87AV.esm.js';
3
+
4
+ // Do not edit.
5
+ const name = "rgbdEncodePixelShader";
6
+ const shader = `varying vec2 vUV;uniform sampler2D textureSampler;
7
+ #include<helperFunctions>
8
+ #define CUSTOM_FRAGMENT_DEFINITIONS
9
+ void main(void)
10
+ {gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;
11
+ // Sideeffect
12
+ ShaderStore.ShadersStore[name] = shader;
13
+ /** @internal */
14
+ const rgbdEncodePixelShader = { name, shader };
15
+
16
+ export { rgbdEncodePixelShader };
17
+ //# sourceMappingURL=rgbdEncode.fragment-CQiCuTLF.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rgbdEncode.fragment-CQiCuTLF.esm.js","sources":["../../../../../dev/core/dist/Shaders/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,yDAAyD,CAAC,CAAC;AAC3D;AACA,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC;AACY,MAAC,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
@@ -0,0 +1,17 @@
1
+ import { i as ShaderStore } from './index-DV_mRp0V.esm.js';
2
+ import './helperFunctions-DbJ3JhM0.esm.js';
3
+
4
+ // Do not edit.
5
+ const name = "rgbdEncodePixelShader";
6
+ const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
7
+ #include<helperFunctions>
8
+ #define CUSTOM_FRAGMENT_DEFINITIONS
9
+ @fragment
10
+ fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;
11
+ // Sideeffect
12
+ ShaderStore.ShadersStoreWGSL[name] = shader;
13
+ /** @internal */
14
+ const rgbdEncodePixelShaderWGSL = { name, shader };
15
+
16
+ export { rgbdEncodePixelShaderWGSL };
17
+ //# sourceMappingURL=rgbdEncode.fragment-CX3nTLp5.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rgbdEncode.fragment-CX3nTLp5.esm.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,kJAAkJ,CAAC,CAAC;AACpJ;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C;AACY,MAAC,yBAAyB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
@@ -0,0 +1,2 @@
1
+ import{i as e}from"./index-CIyiNmMD.esm.min.js";import"./helperFunctions-BmpTMP9U.esm.min.js";const r="rgbdEncodePixelShader",n="varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}";e.ShadersStore[r]=n;const o={name:r,shader:n};export{o as rgbdEncodePixelShader};
2
+ //# sourceMappingURL=rgbdEncode.fragment-CdBxB5jv.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rgbdEncode.fragment-CdBxB5jv.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStore","rgbdEncodePixelShader"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,kMAMfC,EAAYC,aAAaH,GAAQC,EAErB,MAACG,EAAwB,CAAEJ,OAAMC"}
@@ -0,0 +1,2 @@
1
+ import{i as e,R as t,x as s,y as i,z as r,H as n,J as o,K as a,N as c,Q as l,W as u,X as h,Y as d,Z as p,_ as m,V as _,M as f,$ as x,t as g,v as y,a0 as v,a1 as T,L as b,T as w,a2 as P,C as R,s as M,a3 as A,k as C,a4 as I,a5 as k,a6 as S,E as z,a7 as V,a8 as F,a9 as B,p as D,aa as U,ab as E,B as L,ac as W,ad as N,ae as Z,w as O}from"./index-CIyiNmMD.esm.min.js";import"./fogFragment-Caucp7gO.esm.min.js";import"./logDepthDeclaration-C6GKSjog.esm.min.js";import"./logDepthVertex-Co2KvxUo.esm.min.js";import{R as G}from"./rawTexture-D4XnSF1r.esm.min.js";import"./thinInstanceMesh-FE1_0Dpq.esm.min.js";import{A as j}from"./assetContainer-B2UWLifX.esm.min.js";import{S as X}from"./standardMaterial-PSnYwoCV.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";e.ShadersStore.gaussianSplattingPixelShader="#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.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);}";e.ShadersStore.gaussianSplattingVertexShader="#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";class H extends m{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 Y 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 H);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=[_.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},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),Y.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 Y(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 Y(e.name,t)),e,t,s)}}t("BABYLON.GaussianSplattingMaterial",Y);class K extends f{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}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=x.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 g,this._useRGBACovariants=!1,this._material=null;const r=new y;r.positions=[-2,-2,0,2,-2,0,2,2,0,-2,2,0],r.indices=[0,1,2,0,2,3],r.applyToMesh(this),this.subMeshes=[],new v(0,0,4,0,6,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,this._keepInRam=i,t&&this.loadFileAsync(t),this._material=new Y(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(t!==this._frameIdLastUpdate&&this._worker&&this._scene.activeCamera&&this._canPostToWorker){const s=this._scene.activeCamera.getViewMatrix();this.getWorldMatrix().multiplyToRef(s,this._modelViewMatrix),s.invertToRef(T.Matrix[0]),this.getWorldMatrix().multiplyToRef(T.Matrix[0],T.Matrix[1]),g.TransformNormalToRef(g.Forward(this._scene.useRightHandedSystem),T.Matrix[1],T.Vector3[2]),T.Vector3[2].normalize();const i=g.Dot(T.Vector3[2],this._oldDirection);(e||Math.abs(i-1)>=.01)&&(this._oldDirection.copyFrom(T.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 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 e;const n=parseInt(/element vertex (\d+)\n/.exec(s)[1]);let o=0;const a={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1},c=[],l=s.slice(0,r).split("\n").filter((e=>e.startsWith("property ")));for(const e of l){const[,t,s]=e.split(" ");if(c.push({name:s,type:t,offset:o}),!a[t])return b.Error(`Unsupported property type: ${t}. Are you sure it's a valid Gaussian Splatting file?`),new ArrayBuffer(0);o+=a[t]}const u=.28209479177387814,h=new DataView(e,r+11),d=new ArrayBuffer(32*n),p=new A;for(let e=0;e<n;e++){const t=new Float32Array(d,32*e,3),s=new Float32Array(d,32*e+12,3),i=new Uint8ClampedArray(d,32*e+24,4),r=new Uint8ClampedArray(d,32*e+28,4);let n=255,a=0,l=0,m=0;for(let r=0;r<c.length;r++){const d=c[r];let p;switch(d.type){case"float":p=h.getFloat32(d.offset+e*o,!0);break;case"int":p=h.getInt32(d.offset+e*o,!0);break;default:throw new Error(`Unsupported property type: ${d.type}`)}switch(d.name){case"x":t[0]=p;break;case"y":t[1]=p;break;case"z":t[2]=p;break;case"scale_0":s[0]=Math.exp(p);break;case"scale_1":s[1]=Math.exp(p);break;case"scale_2":s[2]=Math.exp(p);break;case"red":i[0]=p;break;case"green":i[1]=p;break;case"blue":i[2]=p;break;case"f_dc_0":i[0]=255*(.5+u*p);break;case"f_dc_1":i[1]=255*(.5+u*p);break;case"f_dc_2":i[2]=255*(.5+u*p);break;case"f_dc_3":i[3]=255*(.5+u*p);break;case"opacity":i[3]=1/(1+Math.exp(-p))*255;break;case"rot_0":n=p;break;case"rot_1":a=p;break;case"rot_2":l=p;break;case"rot_3":m=p}}p.set(a,l,m,n),p.normalize(),r[0]=128*p.w+128,r[1]=128*p.x+128,r[2]=128*p.y+128,r[3]=128*p.z+128}return d}loadDataAsync(e){return Promise.resolve(this._loadData(e))}loadFileAsync(e){return w.LoadFileAsync(e,!0).then((e=>{this._loadData(K.ConvertPLYToSplat(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 K(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewMatrix=x.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}updateData(e){if(!e.byteLength)return;this._covariancesATexture||(this._readyToDisplay=!1);const t=new Uint8Array(e),s=new Float32Array(t.buffer),i=t.length/32;i!=this._vertexCount&&this._updateSplatIndexBuffer(i),this._vertexCount=i;const r=this._getTextureSize(i),n=r.x*r.y;this._splatPositions=new Float32Array(4*n);const o=new Uint16Array(4*n),a=new Uint16Array((this._useRGBACovariants?4:2)*n),c=T.Matrix[0],l=T.Matrix[1],u=T.Quaternion[0],h=new g(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=new g(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),p=[0,0,0,0,0,0],m=this._useRGBACovariants?4:2;for(let e=0;e<i;e++){const i=s[8*e+0],r=-s[8*e+1],n=s[8*e+2];this._splatPositions[4*e+0]=i,this._splatPositions[4*e+1]=r,this._splatPositions[4*e+2]=n,h.minimizeInPlaceFromFloats(i,r,n),d.maximizeInPlaceFromFloats(i,r,n),u.set((t[32*e+28+1]-128)/128,(t[32*e+28+2]-128)/128,(t[32*e+28+3]-128)/128,-(t[32*e+28+0]-128)/128),u.toRotationMatrix(c),x.ScalingToRef(2*s[8*e+3+0],2*s[8*e+3+1],2*s[8*e+3+2],l);const _=c.multiplyToRef(l,T.Matrix[0]).m;p[0]=_[0]*_[0]+_[1]*_[1]+_[2]*_[2],p[1]=_[0]*_[4]+_[1]*_[5]+_[2]*_[6],p[2]=_[0]*_[8]+_[1]*_[9]+_[2]*_[10],p[3]=_[4]*_[4]+_[5]*_[5]+_[6]*_[6],p[4]=_[4]*_[8]+_[5]*_[9]+_[6]*_[10],p[5]=_[8]*_[8]+_[9]*_[9]+_[10]*_[10];let f=-1e4;for(let e=0;e<6;e++)f=Math.max(f,Math.abs(p[e]));this._splatPositions[4*e+3]=f;const g=f;o[4*e+0]=P(p[0]/g),o[4*e+1]=P(p[1]/g),o[4*e+2]=P(p[2]/g),o[4*e+3]=P(p[3]/g),a[e*m+0]=P(p[4]/g),a[e*m+1]=P(p[5]/g)}this.getBoundingInfo().reConstruct(h,d,this.getWorldMatrix()),this.setEnabled(!0);const _=(e,t,s,i)=>new G(e,t,s,i,this._scene,!1,!1,R.TEXTURE_BILINEAR_SAMPLINGMODE,R.TEXTURETYPE_FLOAT),f=(e,t,s,i)=>new G(e,t,s,i,this._scene,!1,!1,R.TEXTURE_BILINEAR_SAMPLINGMODE,R.TEXTURETYPE_UNSIGNED_BYTE),y=(e,t,s,i)=>new G(e,t,s,i,this._scene,!1,!1,R.TEXTURE_BILINEAR_SAMPLINGMODE,R.TEXTURETYPE_HALF_FLOAT),v=new Uint8Array(r.x*r.y*4);for(let e=0;e<this._vertexCount;++e)v[4*e+0]=t[32*e+24+0],v[4*e+1]=t[32*e+24+1],v[4*e+2]=t[32*e+24+2],v[4*e+3]=t[32*e+24+3];if(this._keepInRam&&(this._covariancesA=o,this._covariancesB=a,this._colors=v),this._covariancesATexture){this._delayedTextureUpdate={covA:o,covB:a,colors:v,centers:this._splatPositions};const e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({positions:e,vertexCount:t},[e.buffer]),this._postToWorker(!0)}else this._covariancesATexture=y(o,r.x,r.y,R.TEXTUREFORMAT_RGBA),this._covariancesBTexture=y(a,r.x,r.y,this._useRGBACovariants?R.TEXTUREFORMAT_RGBA:R.TEXTUREFORMAT_RG),this._centersTexture=_(this._splatPositions,r.x,r.y,R.TEXTUREFORMAT_RGBA),this._colorsTexture=f(v,r.x,r.y,R.TEXTUREFORMAT_RGBA),this._instanciateWorker()}_loadData(e){e.byteLength&&this.updateData(e)}_updateSplatIndexBuffer(e){(!this._splatIndex||e>this._splatIndex.length)&&(this._splatIndex=new Float32Array(e),this.thinInstanceSetBuffer("splatIndex",this._splatIndex,1,!1)),this.forcedInstanceCount=e}_instanciateWorker(){if(!this._vertexCount)return;this._updateSplatIndexBuffer(this._vertexCount),this._worker?.terminate(),this._worker=new Worker(URL.createObjectURL(new Blob(["(",K._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=(e,t,s,i)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,0,s,i,0,0,!1)},s=(e,t,s,i)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,0,s,i,0,0,!1)},i=(e,t,s,i)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,0,s,i,0,0,!1)},r=this._getTextureSize(t);i(this._covariancesATexture,this._delayedTextureUpdate.covA,r.x,r.y),i(this._covariancesBTexture,this._delayedTextureUpdate.covB,r.x,r.y),e(this._centersTexture,this._delayedTextureUpdate.centers,r.x,r.y),s(this._colorsTexture,this._delayedTextureUpdate.colors,r.x,r.y),this._delayedTextureUpdate=null}this.thinInstanceBufferUpdated("splatIndex"),this._canPostToWorker=!0,this._readyToDisplay=!0}}_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&&(b.Error("GaussianSplatting texture size: ("+s+", "+i+"), maxTextureSize: "+s),i=s),new M(s,i)}}K._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 q{constructor(e,t,s,i,r){this.idx=0,this.color=new C(1,1,1,1),this.position=g.Zero(),this.rotation=g.Zero(),this.uv=new M(0,0),this.velocity=g.Zero(),this.pivot=g.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=g.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=T.Quaternion[0];const e=this.rotation;A.RotationYawPitchRollToRef(e.y,e.x,e.z,t)}t.toRotationMatrix(e)}}class Q{get groupID(){return this.groupId}set groupID(e){this.groupId=e}constructor(e,t){this.groupId=e,this._positionFunction=t}}class ${constructor(e,t,s=Number.MAX_VALUE,i=k){this.origin=e,this.direction=t,this.length=s,this.epsilon=i}clone(){return new $(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(e,t,s=0){const i=$._TmpVector3[0].copyFromFloats(e.x-s,e.y-s,e.z-s),r=$._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=$._TmpVector3[0],r=$._TmpVector3[1],n=$._TmpVector3[2],o=$._TmpVector3[3],a=$._TmpVector3[4];t.subtractToRef(e,i),s.subtractToRef(e,r),g.CrossToRef(this.direction,r,n);const c=g.Dot(i,n);if(0===c)return null;const l=1/c;this.origin.subtractToRef(e,o);const u=g.Dot(o,n)*l;if(u<-this.epsilon||u>1+this.epsilon)return null;g.CrossToRef(o,i,a);const h=g.Dot(this.direction,a)*l;if(h<-this.epsilon||u+h>1+this.epsilon)return null;const d=g.Dot(r,a)*l;return d>this.length?null:new S(1-u-h,u,d)}intersectsPlane(e){let t;const s=g.Dot(e.normal,this.direction);if(Math.abs(s)<9.99999997475243e-7)return null;{const i=g.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 g(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 g(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 g(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=T.Matrix[0];return e.getWorldMatrix().invertToRef(o),this._tmpRay?$.TransformToRef(this,o,this._tmpRay):this._tmpRay=$.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=T.Vector3[0],n=T.Vector3[1],o=T.Vector3[2],a=T.Vector3[3];t.subtractToRef(e,r),this.direction.scaleToRef($._Rayl,o),i.addToRef(o,n),e.subtractToRef(i,a);const c=g.Dot(r,r),l=g.Dot(r,o),u=g.Dot(o,o),h=g.Dot(r,a),d=g.Dot(o,a),p=c*u-l*l;let m,_,f=p,x=p;p<$._Smallnum?(m=0,f=1,_=d,x=u):(m=l*d-u*h,_=c*d-l*h,m<0?(m=0,_=d,x=u):m>f&&(m=f,_=d+l,x=u)),_<0?(_=0,-h<0?m=0:-h>c?m=f:(m=-h,f=c)):_>x&&(_=x,-h+l<0?m=0:-h+l>c?m=f:(m=-h+l,f=c));const y=Math.abs(m)<$._Smallnum?0:m/f,v=Math.abs(_)<$._Smallnum?0:_/x,b=T.Vector3[4];o.scaleToRef(v,b);const w=T.Vector3[5];r.scaleToRef(y,w),w.addInPlace(a);const P=T.Vector3[6];w.subtractToRef(b,P);return v>0&&v<=this.length&&P.lengthSquared()<s*s?w.length():-1}update(e,t,s,i,r,n,o,a=!1){if(a){$._RayDistant||($._RayDistant=$.Zero()),$._RayDistant.unprojectRayToRef(e,t,s,i,x.IdentityReadOnly,n,o);const a=T.Matrix[0];r.invertToRef(a),$.TransformToRef($._RayDistant,a,this)}else this.unprojectRayToRef(e,t,s,i,r,n,o);return this}static Zero(){return new $(g.Zero(),g.Zero())}static CreateNew(e,t,s,i,r,n,o){return $.Zero().update(e,t,s,i,r,n,o)}static CreateNewFromTo(e,t,s=x.IdentityReadOnly){const i=new $(new g(0,0,0),new g(0,0,0));return $.CreateFromToToRef(e,t,i,s)}static CreateFromToToRef(e,t,s,i=x.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(),$.TransformToRef(s,i,s)}static Transform(e,t){const s=new $(new g(0,0,0),new g(0,0,0));return $.TransformToRef(e,t,s),s}static TransformToRef(e,t,s){g.TransformCoordinatesToRef(e.origin,t,s.origin),g.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=T.Matrix[0];r.multiplyToRef(n,a),a.multiplyToRef(o,a),a.invert();const c=z.LastCreatedEngine,l=T.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=T.Vector3[1].copyFromFloats(l.x,l.y,1-1e-8),h=T.Vector3[2],d=T.Vector3[3];g._UnprojectFromInvertedMatrixToRef(l,a,h),g._UnprojectFromInvertedMatrixToRef(u,a,d),this.origin.copyFrom(h),d.subtractToRef(h,this.direction),this.direction.normalize()}}function J(e,t,s,i,r,n=!1){const o=$.Zero();return ee(e,t,s,i,o,r,n),o}function ee(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:m}=l.toGlobal(c.getRenderWidth(),u),_=1/c.getHardwareScalingLevel();return t=t*_-h,s=s*_-(u-d-m),r.update(t,s,p,m,i||x.IdentityReadOnly,o?x.IdentityReadOnly:n.getViewMatrix(),n.getProjectionMatrix(),a),e}function te(e,t,s,i,r){if(!V)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=x.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 se(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 ie(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=se;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=T.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 V}function re(e,t,s,i){if(!V)return null;const r=[],n=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),o=e.cameraToUseForPointers||e.activeCamera,a=se;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=T.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 ne(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=T.Vector3[2];n.set(0,0,e._scene.useRightHandedSystem?-1:1);const o=T.Vector3[3];return g.TransformNormalToRef(n,i,o),g.NormalizeToRef(o,t.direction),t}var oe,ae,ce;$._TmpVector3=I(6,g.Zero),$._RayDistant=$.Zero(),$._Smallnum=1e-8,$._Rayl=1e9,oe=B,(ae=l)&&(ae.prototype.getForwardRay=function(e=100,t,s){return ne(this,new $(g.Zero(),g.Zero(),e),e,t,s)},ae.prototype.getForwardRayToRef=function(e,t=100,s,i){return ne(this,e,t,s,i)}),oe&&(F._IsPickingAvailable=!0,oe.prototype.createPickingRay=function(e,t,s,i,r=!1){return J(this,e,t,s,i,r)}),B.prototype.createPickingRayToRef=function(e,t,s,i,r,n=!1,o=!1){return ee(this,e,t,s,i,r,n,o)},B.prototype.createPickingRayInCameraSpace=function(e,t,s){return function(e,t,s,i){const r=$.Zero();return te(e,t,s,r,i),r}(this,e,t,s)},B.prototype.createPickingRayInCameraSpaceToRef=function(e,t,s,i){return te(this,e,t,s,i)},B.prototype.pickWithBoundingInfo=function(e,t,s,i,r){return function(e,t,s,i,r,n){if(!V)return null;const o=ie(e,(i=>(e._tempPickingRay||(e._tempPickingRay=$.Zero()),ee(e,t,s,i,e._tempPickingRay,n||null),e._tempPickingRay)),i,r,!0);return o&&(o.ray=J(e,t,s,x.Identity(),n||null)),o}(this,e,t,s,i,r)},B.prototype.pick=function(e,t,s,i,r,n,o=!1){return function(e,t,s,i,r,n,o){const a=ie(e,((i,r)=>(e._tempPickingRay||(e._tempPickingRay=$.Zero()),ee(e,t,s,i,e._tempPickingRay,n||null,!1,r),e._tempPickingRay)),i,r,!1,o);return a&&(a.ray=J(e,t,s,x.Identity(),n||null)),a}(this,e,t,s,i,r,n,o)},B.prototype.pickWithRay=function(e,t,s,i){return function(e,t,s,i,r){const n=ie(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=x.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=$.Zero()),$.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,i,!1,r);return n&&(n.ray=t),n}(this,e,t,s,i)},B.prototype.multiPick=function(e,t,s,i,r){return function(e,t,s,i,r,n){return re(e,(i=>J(e,t,s,i,r||null)),i,n)}(this,e,t,s,i,r)},B.prototype.multiPickWithRay=function(e,t,s){return function(e,t,s,i){return re(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=x.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=$.Zero()),$.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"}(ce||(ce={}));class le{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||z.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 y;t.set(this._positions32,_.PositionKind),this._uvs32.length>0&&t.set(this._uvs32,_.UVKind);let s=0;this._colors32.length>0&&(s=1,t.set(this._colors32,_.ColorKind));const i=new f(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 X("point cloud material",this._scene),r.emissiveColor=new D(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 q(e,t,s,i,this);return this.particles.push(r),r}_randomUnitVector(e){e.position=new g(Math.random(),Math.random(),Math.random()),e.color=new C(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 C(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(_.PositionKind);const u=e.getIndices(),h=e.getVerticesData(_.UVKind+(a?a+1:"")),d=e.getVerticesData(_.ColorKind),p=g.Zero();e.computeWorldMatrix();const m=e.getWorldMatrix();if(!m.isIdentity()){l=l.slice(0);for(let e=0;e<l.length/3;e++)g.TransformCoordinatesFromFloatsToRef(l[3*e],l[3*e+1],l[3*e+2],m,p),l[3*e]=p.x,l[3*e+1]=p.y,l[3*e+2]=p.z}let f=0,x=0,y=0,v=0,T=0,b=0,w=0,P=0,R=0,A=0,I=0,k=0,S=0;const z=g.Zero(),V=g.Zero(),F=g.Zero(),B=g.Zero(),L=g.Zero();let W=0,N=0,Z=0,O=0,G=0,j=0;const X=M.Zero(),H=M.Zero(),Y=M.Zero(),K=M.Zero(),q=M.Zero();let Q=0,J=0,ee=0,te=0,se=0,ie=0,re=0,ne=0,oe=0,ae=0,ce=0,le=0;const ue=U.Zero(),he=U.Zero(),de=U.Zero(),pe=U.Zero(),me=U.Zero();let _e,fe,xe=0,ge=0;o=o||0;let ye=new U(0,0,0,0),ve=g.Zero(),Te=g.Zero(),be=g.Zero(),we=0,Pe=g.Zero(),Re=0,Me=0;const Ae=new $(g.Zero(),new g(1,0,0));let Ce,Ie=g.Zero();for(let a=0;a<u.length/3;a++){let p,m,_,M,U,$,ke,Se;x=u[3*a],y=u[3*a+1],v=u[3*a+2],T=l[3*x],b=l[3*x+1],w=l[3*x+2],P=l[3*y],R=l[3*y+1],A=l[3*y+2],I=l[3*v],k=l[3*v+1],S=l[3*v+2],z.set(T,b,w),V.set(P,R,A),F.set(I,k,S),V.subtractToRef(z,B),F.subtractToRef(V,L),h&&(W=h[2*x],N=h[2*x+1],Z=h[2*y],O=h[2*y+1],G=h[2*v],j=h[2*v+1],X.set(W,N),H.set(Z,O),Y.set(G,j),H.subtractToRef(X,K),Y.subtractToRef(H,q)),d&&i&&(Q=d[4*x],J=d[4*x+1],ee=d[4*x+2],te=d[4*x+3],se=d[4*y],ie=d[4*y+1],re=d[4*y+2],ne=d[4*y+3],oe=d[4*v],ae=d[4*v+1],ce=d[4*v+2],le=d[4*v+3],ue.set(Q,J,ee,te),he.set(se,ie,re,ne),de.set(oe,ae,ce,le),he.subtractToRef(ue,pe),de.subtractToRef(he,me));const ze=new D(0,0,0),Ve=new D(0,0,0);let Fe,Be;for(let l=0;l<t._groupDensity[a];l++)f=this.particles.length,this._addParticle(f,t,this._groupCounter,a+l),Be=this.particles[f],xe=Math.sqrt(E(0,1)),ge=E(0,1),_e=z.add(B.scale(xe)).add(L.scale(xe*ge)),s&&(ve=e.getFacetNormal(a).normalize().scale(-1),Te=B.clone().normalize(),be=g.Cross(ve,Te),we=E(0,2*Math.PI),Pe=Te.scale(Math.cos(we)).add(be.scale(Math.sin(we))),we=E(.1,Math.PI/2),Ie=Pe.scale(Math.cos(we)).add(ve.scale(Math.sin(we))),Ae.origin=_e.add(Ie.scale(1e-5)),Ae.direction=Ie,Ae.length=c,Ce=Ae.intersectsMesh(e),Ce.hit&&(Me=Ce.pickedPoint.subtract(_e).length(),Re=E(0,1)*Me,_e.addInPlace(Ie.scale(Re)))),Be.position=_e.clone(),this._positions.push(Be.position.x,Be.position.y,Be.position.z),void 0!==i?h&&(fe=X.add(K.scale(xe)).add(q.scale(xe*ge)),i?r&&null!==t._groupImageData?(p=t._groupImgWidth,m=t._groupImgHeight,Fe=this._getColorIndicesForCoord(t,Math.round(fe.x*p),Math.round(fe.y*m),p),Be.color=Fe,this._colors.push(Fe.r,Fe.g,Fe.b,Fe.a)):d?(ye=ue.add(pe.scale(xe)).add(me.scale(xe*ge)),Be.color=new C(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w)):(ye=ue.set(Math.random(),Math.random(),Math.random(),1),Be.color=new C(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w)):(Be.uv=fe.clone(),this._uvs.push(Be.uv.x,Be.uv.y))):(n?(ze.set(n.r,n.g,n.b),_=E(-o,o),M=E(-o,o),Se=ze.toHSV(),U=Se.r,$=Se.g+_,ke=Se.b+M,$<0&&($=0),$>1&&($=1),ke<0&&(ke=0),ke>1&&(ke=1),D.HSVtoRGBToRef(U,$,ke,Ve),ye.set(Ve.r,Ve.g,Ve.b,1)):ye=ue.set(Math.random(),Math.random(),Math.random(),1),Be.color=new C(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w))}}_colorFromTexture(e,t,s){if(null===e.material)return b.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 b.Warn(e.name+"has no usable texture."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const r=e.clone();r.setEnabled(!1),this._promises.push(new Promise((e=>{L.WhenAllReady(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,m;const _=g.Zero(),f=g.Zero(),x=g.Zero(),y=g.Zero(),v=g.Zero(),T=g.Zero();let b;const w=[];let P=0;const R=s.length/3;for(let e=0;e<R;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],m=t[3*n+2],_.set(o,a,c),f.set(l,u,h),x.set(d,p,m),f.subtractToRef(_,y),x.subtractToRef(f,v),g.CrossToRef(y,v,T),b=.5*T.length(),P+=b,w[e]=P;const M=new Array(R);let A=e;for(let e=R-1;e>0;e--){const t=w[e];if(0===t)M[e]=0;else{const s=(t-w[e-1])/t*A,i=Math.floor(s),r=s-i,n=i+Number(Math.random()<r);M[e]=n,A-=n}}return M[0]=A,M}addPoints(e,t=this._randomUnitVector){const s=new Q(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(_.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new Q(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===n?c._textureNb=i||0:i=i||new C(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(_.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new Q(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===n?c._textureNb=i||0:i=i||new C(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=T.Matrix[0],r=this.mesh,n=this._colors32,o=this._positions32,a=this._uvs32,c=T.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);x.IdentityToRef(i);let m=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))}m=0;let f=0,g=0,y=0;for(let s=e;s<=t;s++){const e=this.particles[s];m=e.idx,f=3*m,g=4*m,y=2*m,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 _=c[0];_.copyFrom(e.position);const x=_.x-e.pivot.x,v=_.y-e.pivot.y,T=_.z-e.pivot.z;let b=x*t[0]+v*t[3]+T*t[6],w=x*t[1]+v*t[4]+T*t[7],P=x*t[2]+v*t[5]+T*t[8];b+=a.x,w+=a.y,P+=a.z;const R=o[f]=n.x+l.x*b+u.x*w+h.x*P,M=o[f+1]=n.y+l.y*b+u.y*w+h.y*P,A=o[f+2]=n.z+l.z*b+u.z*w+h.z*P;if(this._computeBoundingBox&&(d.minimizeInPlaceFromFloats(R,M,A),p.maximizeInPlaceFromFloats(R,M,A)),this._computeParticleColor&&e.color){const t=e.color,s=this._colors32;s[g]=t.r,s[g+1]=t.g,s[g+2]=t.b,s[g+3]=t.a}if(this._computeParticleTexture&&e.uv){const t=e.uv,s=this._uvs32;s[y]=t.x,s[y+1]=t.y}}return r&&(s&&(this._computeParticleColor&&r.updateVerticesData(_.ColorKind,n,!1,!1),this._computeParticleTexture&&r.updateVerticesData(_.UVKind,a,!1,!1),r.updateVerticesData(_.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 g(-t,-t,-t),new g(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){}}const ue=N,he={...W,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:ue};var de,pe;!function(e){e[e.Splat=0]="Splat",e[e.PointCloud=1]="PointCloud",e[e.Mesh=2]="Mesh"}(de||(de={})),function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(pe||(pe={}));class me{constructor(e=me._DefaultLoadingOptions){this.name=Z.name,this._assetContainer=null,this.extensions=Z.extensions,this._loadingOptions=e}createPlugin(e){return new me(e[Z.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 g(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 C(a,c,l,1)})),!0}static _BuildMesh(e,t){const s=new f("PLYMesh",e),i=new Uint8Array(t.data),r=new Float32Array(t.data),n=i.length/32,o=[],a=new y;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){const r=[],n=me._ConvertPLYToSplat(s);switch(n.mode){case 0:{const e=new K("GaussianSplatting",null,t,this._loadingOptions.keepInRam);e._parentContainer=this._assetContainer,r.push(e),e.loadDataAsync(n.data)}break;case 1:{const e=new le("PointCloud",1,t);if(me._BuildPointCloud(e,n.data))return Promise.all([e.buildMeshAsync()]).then((e=>(r.push(e[0]),r)));e.dispose()}break;case 2:if(!n.faces)throw new Error("PLY mesh doesn't contain face informations.");r.push(me._BuildMesh(t,n));break;default:throw new Error("Unsupported Splat mode")}return Promise.resolve(r)}loadAssetContainerAsync(e,t,s){const i=new j(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{mode:0,data:e};const n=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element face (\d+)\n/.exec(s),a=/element chunk (\d+)\n/.exec(s);let c=0,l=0;o&&(c=parseInt(o[1])),a&&(l=parseInt(a[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=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==p?(_.push({name:s,type:t,offset:h}),h+=d[t]):0==p&&(m.push({name:s,type:t,offset:u}),u+=d[t]),d[t]||b.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?p=1:"vertex"==t&&(p=0)}const x=u,y=h,v=.28209479177387814;let w=0;const P=new DataView(e,r+11),R=new ArrayBuffer(32*n),M=new A,C=T.Vector3[0],I=(e,t)=>{const s=(1<<t)-1;return(e&s)/s},k=(e,t)=>{t.x=I(e>>>21,11),t.y=I(e>>>11,10),t.z=I(e,11)},S=(e,t)=>{t[0]=255*I(e>>>24,8),t[1]=255*I(e>>>16,8),t[2]=255*I(e>>>8,8),t[3]=255*I(e,8)},z=(e,t)=>{const s=1/(.5*Math.sqrt(2)),i=(I(e>>>20,10)-.5)*s,r=(I(e>>>10,10)-.5)*s,n=(I(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)}},V=new Array(l);for(let e=0;e<l;e++){const t={min:new g,max:new g,minScale:new g,maxScale:new g};V[e]=t;for(let e=0;e<_.length;e++){const s=_[e];let i;if("float"===s.type)switch(i=P.getFloat32(s.offset+w,!0),s.name){case"min_x":t.min.x=i;break;case"min_y":t.min.y=i;break;case"min_z":t.min.z=i;break;case"max_x":t.max.x=i;break;case"max_y":t.max.y=i;break;case"max_z":t.max.z=i;break;case"min_scale_x":t.minScale.x=i;break;case"min_scale_y":t.minScale.y=i;break;case"min_scale_z":t.minScale.z=i;break;case"max_scale_x":t.maxScale.x=i;break;case"max_scale_y":t.maxScale.y=i;break;case"max_scale_z":t.maxScale.z=i}}w+=y}for(let e=0;e<n;e++){const t=new Float32Array(R,32*e,3),s=new Float32Array(R,32*e+12,3),i=new Uint8ClampedArray(R,32*e+24,4),r=new Uint8ClampedArray(R,32*e+28,4),n=e>>8;let o=255,a=0,c=0,l=0;for(let e=0;e<m.length;e++){const r=m[e];let u;switch(r.type){case"float":u=P.getFloat32(w+r.offset,!0);break;case"int":u=P.getInt32(w+r.offset,!0);break;case"uint":u=P.getUint32(w+r.offset,!0);break;case"double":u=P.getFloat64(w+r.offset,!0);break;case"uchar":u=P.getUint8(w+r.offset);break;default:continue}switch(r.name){case"packed_position":{const e=V[n];k(u,C),t[0]=he.Lerp(e.min.x,e.max.x,C.x),t[1]=-he.Lerp(e.min.y,e.max.y,C.y),t[2]=he.Lerp(e.min.z,e.max.z,C.z)}break;case"packed_rotation":z(u,M),o=M.w,a=M.z,c=M.y,l=M.x;break;case"packed_scale":{const e=V[n];k(u,C),s[0]=Math.exp(he.Lerp(e.minScale.x,e.maxScale.x,C.x)),s[1]=Math.exp(he.Lerp(e.minScale.y,e.maxScale.y,C.y)),s[2]=Math.exp(he.Lerp(e.minScale.z,e.maxScale.z,C.z))}break;case"packed_color":S(u,i);break;case"x":t[0]=u;break;case"y":t[1]=u;break;case"z":t[2]=u;break;case"scale_0":s[0]=Math.exp(u);break;case"scale_1":s[1]=Math.exp(u);break;case"scale_2":s[2]=Math.exp(u);break;case"diffuse_red":case"red":i[0]=u;break;case"diffuse_green":case"green":i[1]=u;break;case"diffuse_blue":case"blue":i[2]=u;break;case"f_dc_0":i[0]=255*(.5+v*u);break;case"f_dc_1":i[1]=255*(.5+v*u);break;case"f_dc_2":i[2]=255*(.5+v*u);break;case"f_dc_3":i[3]=255*(.5+v*u);break;case"opacity":i[3]=1/(1+Math.exp(-u))*255;break;case"rot_0":o=u;break;case"rot_1":a=u;break;case"rot_2":c=u;break;case"rot_3":l=u}}M.set(a,c,l,o),M.normalize(),r[0]=128*M.w+128,r[1]=128*M.x+128,r[2]=128*M.y+128,r[3]=128*M.z+128,w+=x}const F=[];if(c)for(let e=0;e<c;e++){const e=P.getUint8(w);if(3==e){w+=1;for(let t=0;t<e;t++){const e=P.getUint32(w+4*(2-t),!0);F.push(e)}w+=12}}if(l)return{mode:0,data:R,faces:F,hasVertexColors:!1};let B=0,D=0;const U=["x","y","z","scale_0","scale_1","scale_2","opacity","rot_0","rot_1","rot_2","rot_3"],E=["red","green","blue","f_dc_0","f_dc_1","f_dc_2"];for(let e=0;e<m.length;e++){const t=m[e];U.includes(t.name)&&B++,E.includes(t.name)&&D++}const L=B==U.length&&3==D;return{mode:c?2:L?0:1,data:R,faces:F,hasVertexColors:!!D}}}me._DefaultLoadingOptions={keepInRam:!1},O(new me);export{me as SPLATFileLoader};
2
+ //# sourceMappingURL=splatFileLoader-3iaRLBaz.esm.min.js.map