@babylonjs/viewer 7.37.0 → 7.37.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.
- package/assets/photoStudio.env +0 -0
- package/dist/babylon-viewer.esm.js +2 -0
- package/dist/babylon-viewer.esm.js.map +1 -0
- package/dist/babylon-viewer.esm.min.js +2 -0
- package/dist/babylon-viewer.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-BTTJ2JSt.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-BTTJ2JSt.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-mCt1KUiF.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-mCt1KUiF.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-BCgQFq6R.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-BCgQFq6R.esm.min.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-CpjETToP.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-CpjETToP.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-4wJlE2Do.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-4wJlE2Do.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-BzfAhd0k.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-BzfAhd0k.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-DZwUnu-Q.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-DZwUnu-Q.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-yX71qV2W.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-yX71qV2W.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-COXIl9Hz.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-COXIl9Hz.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-nGZbK5Pe.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-nGZbK5Pe.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-DUET0pv1.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-DUET0pv1.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-DrcrrXzY.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-DrcrrXzY.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-CEl0j147.esm.js +343 -0
- package/dist/chunks/KHR_animation_pointer-CEl0j147.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-DQ_C7F9b.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-DQ_C7F9b.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-C8ZM8r8Y.esm.js +617 -0
- package/dist/chunks/KHR_draco_mesh_compression-C8ZM8r8Y.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-Cl89FvcS.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-Cl89FvcS.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-B1iMXK-h.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-B1iMXK-h.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-CLFlYbRq.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-CLFlYbRq.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-C-Z_EBCh.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-C-Z_EBCh.esm.min.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-DNHTEebm.esm.js +1253 -0
- package/dist/chunks/KHR_lights_punctual-DNHTEebm.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-CvKEdc3d.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-CvKEdc3d.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-bDPhW1cK.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-bDPhW1cK.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-2tGYyrqV.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-2tGYyrqV.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-KjnHHLBM.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-KjnHHLBM.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-Doqv4nTI.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-Doqv4nTI.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-xmLmQPZg.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-xmLmQPZg.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-CYhdzD3k.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-CYhdzD3k.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-IBPQk406.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-IBPQk406.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-CDKCAd-o.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-CDKCAd-o.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-zMb2iaCe.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-zMb2iaCe.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-8K0WIK8R.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-8K0WIK8R.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-B_s6wgCK.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-B_s6wgCK.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-DNRfYFR1.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-DNRfYFR1.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-Lk_cRmU6.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-Lk_cRmU6.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B2JD91j_.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B2JD91j_.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DKLrtJGj.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DKLrtJGj.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-C6yyaBK_.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-C6yyaBK_.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-DSieQRYY.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-DSieQRYY.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-C39zFYoJ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-C39zFYoJ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-D8eHI5SD.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-D8eHI5SD.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-BKBEK-Pr.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-BKBEK-Pr.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-BbZ0iPcE.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-BbZ0iPcE.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-BlH7nnlb.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-BlH7nnlb.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-QeYg1Vup.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-QeYg1Vup.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-BP5P-s3S.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-BP5P-s3S.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-YGdMNusB.esm.js +262 -0
- package/dist/chunks/KHR_materials_variants-YGdMNusB.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-DfgYbLDf.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-DfgYbLDf.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-Dha6NaMB.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-Dha6NaMB.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-CkgFZADd.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-CkgFZADd.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-DdszX7d9.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-DdszX7d9.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-BVqrUzew.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-BVqrUzew.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-Dx5_M0yu.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-Dx5_M0yu.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-C6wS0ywQ.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-C6wS0ywQ.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-Ur5SaidK.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-Ur5SaidK.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-C-QM24AO.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-C-QM24AO.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-Dpdib7O3.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-Dpdib7O3.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-CqwNTmrx.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-CqwNTmrx.esm.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-S6fxRXLv.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-S6fxRXLv.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-Bjh6cLZb.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-Bjh6cLZb.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-CfsWIxyJ.esm.js +2207 -0
- package/dist/chunks/MSFT_audio_emitter-CfsWIxyJ.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-CZ__xodu.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-CZ__xodu.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_lod-CzMztdpf.esm.js +337 -0
- package/dist/chunks/MSFT_lod-CzMztdpf.esm.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-C427ldkX.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-C427ldkX.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-DnxkOe8i.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-DnxkOe8i.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-CkV5G330.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-CkV5G330.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-DDIZdWTr.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-DDIZdWTr.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-BKfJQilu.esm.js +2482 -0
- package/dist/chunks/animationGroup-BKfJQilu.esm.js.map +1 -0
- package/dist/chunks/animationGroup-oTbb0nLn.esm.min.js +2 -0
- package/dist/chunks/animationGroup-oTbb0nLn.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-BDuQ9TBc.esm.js +1720 -0
- package/dist/chunks/assetContainer-BDuQ9TBc.esm.js.map +1 -0
- package/dist/chunks/assetContainer-Dkp9h8Nk.esm.min.js +2 -0
- package/dist/chunks/assetContainer-Dkp9h8Nk.esm.min.js.map +1 -0
- package/dist/chunks/audioEngine-PbWm6naZ.esm.min.js +2 -0
- package/dist/chunks/audioEngine-PbWm6naZ.esm.min.js.map +1 -0
- package/dist/chunks/audioEngine-YGEF6yUK.esm.js +305 -0
- package/dist/chunks/audioEngine-YGEF6yUK.esm.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-CC0DpkaK.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-CC0DpkaK.esm.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-CFdpJmq_.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-CFdpJmq_.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-DT5ZuZjv.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-DT5ZuZjv.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-SHKWwrIc.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-SHKWwrIc.esm.js.map +1 -0
- package/dist/chunks/dds-HX8yeT_e.esm.min.js +2 -0
- package/dist/chunks/dds-HX8yeT_e.esm.min.js.map +1 -0
- package/dist/chunks/dds-vQ-Nb197.esm.js +540 -0
- package/dist/chunks/dds-vQ-Nb197.esm.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-BaUUWNli.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-BaUUWNli.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-DQNi9sT8.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-DQNi9sT8.esm.js.map +1 -0
- package/dist/chunks/decalFragment-D2w8icPy.esm.js +18 -0
- package/dist/chunks/decalFragment-D2w8icPy.esm.js.map +1 -0
- package/dist/chunks/decalFragment-xzxcUxJ8.esm.min.js +2 -0
- package/dist/chunks/decalFragment-xzxcUxJ8.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-3u7hEV9p.esm.js +433 -0
- package/dist/chunks/default.fragment-3u7hEV9p.esm.js.map +1 -0
- package/dist/chunks/default.fragment-BNyzlMGw.esm.js +497 -0
- package/dist/chunks/default.fragment-BNyzlMGw.esm.js.map +1 -0
- package/dist/chunks/default.fragment-BYeFenXp.esm.min.js +2 -0
- package/dist/chunks/default.fragment-BYeFenXp.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-BZTPSd0S.esm.min.js +2 -0
- package/dist/chunks/default.fragment-BZTPSd0S.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-COzqeVfA.esm.js +201 -0
- package/dist/chunks/default.vertex-COzqeVfA.esm.js.map +1 -0
- package/dist/chunks/default.vertex-Cq8745-M.esm.js +181 -0
- package/dist/chunks/default.vertex-Cq8745-M.esm.js.map +1 -0
- package/dist/chunks/default.vertex-gHqSMlcv.esm.min.js +2 -0
- package/dist/chunks/default.vertex-gHqSMlcv.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-uxBts4pr.esm.min.js +2 -0
- package/dist/chunks/default.vertex-uxBts4pr.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-C8a-iWXW.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-C8a-iWXW.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-COUxsT02.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-COUxsT02.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-GAZtMI4g.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-GAZtMI4g.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-wunm8_kR.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-wunm8_kR.esm.min.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
- package/dist/chunks/dumpTools-DEHzgH2e.esm.min.js +2 -0
- package/dist/chunks/dumpTools-DEHzgH2e.esm.min.js.map +1 -0
- package/dist/chunks/dumpTools-cCiLRzhx.esm.js +200 -0
- package/dist/chunks/dumpTools-cCiLRzhx.esm.js.map +1 -0
- package/dist/chunks/engine-CtoA0nUe.esm.js +2220 -0
- package/dist/chunks/engine-CtoA0nUe.esm.js.map +1 -0
- package/dist/chunks/engine-D-ALFUqi.esm.min.js +2 -0
- package/dist/chunks/engine-D-ALFUqi.esm.min.js.map +1 -0
- package/dist/chunks/engine.common-BBs3lswu.esm.js +1162 -0
- package/dist/chunks/engine.common-BBs3lswu.esm.js.map +1 -0
- package/dist/chunks/engine.common-fhQflGOP.esm.min.js +2 -0
- package/dist/chunks/engine.common-fhQflGOP.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-BQ0ZLpIZ.esm.js +64 -0
- package/dist/chunks/envTextureLoader-BQ0ZLpIZ.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-Clo69VZm.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-Clo69VZm.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-CKcnvQvE.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-CKcnvQvE.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-Dv4OYysb.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-Dv4OYysb.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-1Qk-QkDv.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-1Qk-QkDv.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-DFUZJxaC.esm.js +1682 -0
- package/dist/chunks/exrTextureLoader-DFUZJxaC.esm.js.map +1 -0
- package/dist/chunks/fogFragment-B4-SlSDo.esm.js +101 -0
- package/dist/chunks/fogFragment-B4-SlSDo.esm.js.map +1 -0
- package/dist/chunks/fogFragment-BKD4e7Ph.esm.min.js +2 -0
- package/dist/chunks/fogFragment-BKD4e7Ph.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-DTaKEUGB.esm.min.js +2 -0
- package/dist/chunks/fogFragment-DTaKEUGB.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-h9FPnPoM.esm.js +102 -0
- package/dist/chunks/fogFragment-h9FPnPoM.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-DghEYnyJ.esm.js +12 -0
- package/dist/chunks/fresnelFunction-DghEYnyJ.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-DocHkMCd.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-DocHkMCd.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-c3PKGkcy.esm.js +7606 -0
- package/dist/chunks/glTFLoader-c3PKGkcy.esm.js.map +1 -0
- package/dist/chunks/glTFLoader-vKjW1nNZ.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-vKjW1nNZ.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-B6CGd8Cm.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-B6CGd8Cm.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-BcKbtbAU.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-BcKbtbAU.esm.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-BFgQNOzG.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-BFgQNOzG.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-BnOdQYv0.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-BnOdQYv0.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-BryBP7jB.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-BryBP7jB.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-CKGE8BeQ.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-CKGE8BeQ.esm.min.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-CxAR4jBp.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-CxAR4jBp.esm.min.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-DezOXXlV.esm.js +252 -0
- package/dist/chunks/hdrTextureLoader-DezOXXlV.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-BCdxmjWw.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-BCdxmjWw.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-CK2I9A9w.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-CK2I9A9w.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-D3PjirGO.esm.js +80 -0
- package/dist/chunks/helperFunctions-D3PjirGO.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-DVaaLHM8.esm.js +108 -0
- package/dist/chunks/helperFunctions-DVaaLHM8.esm.js.map +1 -0
- package/dist/chunks/index-BJLUfgJX.esm.min.js +57 -0
- package/dist/chunks/index-BJLUfgJX.esm.min.js.map +1 -0
- package/dist/chunks/index-ft-NqTCE.esm.js +74479 -0
- package/dist/chunks/index-ft-NqTCE.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-D9IBlv-B.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-D9IBlv-B.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-Df3A32Nm.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-Df3A32Nm.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BMa31LAb.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-BMa31LAb.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BffNcd79.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-BffNcd79.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BkgrzFr-.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-BkgrzFr-.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-uuaJZU_f.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-uuaJZU_f.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-C-tEJ4YD.esm.js +77 -0
- package/dist/chunks/logDepthVertex-C-tEJ4YD.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-CDQb6tt8.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-CDQb6tt8.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-DiLmNz-k.esm.js +77 -0
- package/dist/chunks/logDepthVertex-DiLmNz-k.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-Dpw-9K14.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-Dpw-9K14.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-BP9Oh5Cu.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-BP9Oh5Cu.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CEXOi0id.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-CEXOi0id.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CS_CRHYh.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-CS_CRHYh.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-z3TYsjH4.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-z3TYsjH4.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-BWZH2NAD.esm.js +24 -0
- package/dist/chunks/meshUboDeclaration-BWZH2NAD.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-GE0scsI9.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-GE0scsI9.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-BVetxPxf.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-BVetxPxf.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-Bf8yc_Mr.esm.js +1338 -0
- package/dist/chunks/objFileLoader-Bf8yc_Mr.esm.js.map +1 -0
- package/dist/chunks/oitFragment-CB2fmldL.esm.min.js +2 -0
- package/dist/chunks/oitFragment-CB2fmldL.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-CVpK7aQA.esm.min.js +2 -0
- package/dist/chunks/oitFragment-CVpK7aQA.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-Di4uP35N.esm.js +1051 -0
- package/dist/chunks/oitFragment-Di4uP35N.esm.js.map +1 -0
- package/dist/chunks/oitFragment-DxB5sJ7I.esm.js +1210 -0
- package/dist/chunks/oitFragment-DxB5sJ7I.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-BOOcB5_Y.esm.js +15 -0
- package/dist/chunks/pass.fragment-BOOcB5_Y.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-CxR7KxRY.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-CxR7KxRY.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-DQ5Y_qQy.esm.js +15 -0
- package/dist/chunks/pass.fragment-DQ5Y_qQy.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-DsSd-rC5.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-DsSd-rC5.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-16p9WLNX.esm.js +3270 -0
- package/dist/chunks/pbr.fragment-16p9WLNX.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-CypWnzkM.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-CypWnzkM.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-Dj075y2L.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-Dj075y2L.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-DnltvcZL.esm.js +3230 -0
- package/dist/chunks/pbr.fragment-DnltvcZL.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-CtJMBHs5.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-CtJMBHs5.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-CxEuPOXA.esm.js +214 -0
- package/dist/chunks/pbr.vertex-CxEuPOXA.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-DkGFY3yL.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-DkGFY3yL.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-OluCj4rQ.esm.js +338 -0
- package/dist/chunks/pbr.vertex-OluCj4rQ.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-Cm9j6ldo.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-Cm9j6ldo.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-DAzFX1GF.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-DAzFX1GF.esm.js.map +1 -0
- package/dist/chunks/rawTexture-BdnztUXL.esm.js +191 -0
- package/dist/chunks/rawTexture-BdnztUXL.esm.js.map +1 -0
- package/dist/chunks/rawTexture-YAJTylc3.esm.min.js +2 -0
- package/dist/chunks/rawTexture-YAJTylc3.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-BIW9mWHJ.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-BIW9mWHJ.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-BSYBZgmx.esm.js +17 -0
- package/dist/chunks/rgbdDecode.fragment-BSYBZgmx.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CM4RUdq0.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-CM4RUdq0.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-a0vLXyTd.esm.js +17 -0
- package/dist/chunks/rgbdDecode.fragment-a0vLXyTd.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BGFa9L4r.esm.js +17 -0
- package/dist/chunks/rgbdEncode.fragment-BGFa9L4r.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-CDZppTnS.esm.js +17 -0
- package/dist/chunks/rgbdEncode.fragment-CDZppTnS.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-Cs9jvfWk.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-Cs9jvfWk.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-M7N8vQ29.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-M7N8vQ29.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-Bg4G8Ae2.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-Bg4G8Ae2.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-CCCmIOu_.esm.js +4312 -0
- package/dist/chunks/splatFileLoader-CCCmIOu_.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-DnghlXVE.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-DnghlXVE.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-DsjgYxIo.esm.js +1805 -0
- package/dist/chunks/standardMaterial-DsjgYxIo.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-B9qcDBe1.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-B9qcDBe1.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-C-YVvwrI.esm.js +238 -0
- package/dist/chunks/stlFileLoader-C-YVvwrI.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-CDVceO8i.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-CDVceO8i.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-CIl0jvmm.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-CIl0jvmm.esm.js.map +1 -0
- package/dist/chunks/thinEngine-CJHphAue.esm.js +3842 -0
- package/dist/chunks/thinEngine-CJHphAue.esm.js.map +1 -0
- package/dist/chunks/thinEngine-DRwVgQob.esm.min.js +2 -0
- package/dist/chunks/thinEngine-DRwVgQob.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-C46IYDPb.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-C46IYDPb.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-DEwtxS2k.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-DEwtxS2k.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-B-uQHNRm.esm.js +412 -0
- package/dist/chunks/vertexColorMixing-B-uQHNRm.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-BOFnmWz0.esm.js +522 -0
- package/dist/chunks/vertexColorMixing-BOFnmWz0.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-BY6WcZDw.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-BY6WcZDw.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-CQAc7_ro.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-CQAc7_ro.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-CyWPMPDu.esm.js +11533 -0
- package/dist/chunks/webgpuEngine-CyWPMPDu.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-xvli57PA.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-xvli57PA.esm.min.js.map +1 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
- package/docs/ViewerDefault.jpg +0 -0
- package/docs/ViewerParts.jpg +0 -0
- package/docs/ViewerSlots.jpg +0 -0
- package/docs/ViewerStyled.jpg +0 -0
- package/lib/index.d.ts +568 -0
- package/lib/index.js +2067 -0
- package/lib/index.js.map +1 -0
- package/package.json +18 -27
- package/readme.md +145 -21
- package/configuration/configuration.d.ts +0 -107
- package/configuration/configuration.js +0 -16
- package/configuration/configuration.js.map +0 -1
- package/configuration/configurationCompatibility.d.ts +0 -8
- package/configuration/configurationCompatibility.js +0 -66
- package/configuration/configurationCompatibility.js.map +0 -1
- package/configuration/configurationContainer.d.ts +0 -10
- package/configuration/configurationContainer.js +0 -10
- package/configuration/configurationContainer.js.map +0 -1
- package/configuration/globals.d.ts +0 -6
- package/configuration/globals.js +0 -18
- package/configuration/globals.js.map +0 -1
- package/configuration/index.d.ts +0 -2
- package/configuration/index.js +0 -4
- package/configuration/index.js.map +0 -1
- package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
- package/configuration/interfaces/cameraConfiguration.js +0 -2
- package/configuration/interfaces/cameraConfiguration.js.map +0 -1
- package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
- package/configuration/interfaces/colorGradingConfiguration.js +0 -2
- package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
- package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
- package/configuration/interfaces/environmentMapConfiguration.js +0 -2
- package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
- package/configuration/interfaces/groundConfiguration.d.ts +0 -24
- package/configuration/interfaces/groundConfiguration.js +0 -2
- package/configuration/interfaces/groundConfiguration.js.map +0 -1
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
- package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
- package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
- package/configuration/interfaces/index.d.ts +0 -15
- package/configuration/interfaces/index.js +0 -16
- package/configuration/interfaces/index.js.map +0 -1
- package/configuration/interfaces/lightConfiguration.d.ts +0 -60
- package/configuration/interfaces/lightConfiguration.js +0 -2
- package/configuration/interfaces/lightConfiguration.js.map +0 -1
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
- package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
- package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
- package/configuration/interfaces/modelConfiguration.d.ts +0 -65
- package/configuration/interfaces/modelConfiguration.js +0 -2
- package/configuration/interfaces/modelConfiguration.js.map +0 -1
- package/configuration/interfaces/observersConfiguration.d.ts +0 -5
- package/configuration/interfaces/observersConfiguration.js +0 -2
- package/configuration/interfaces/observersConfiguration.js.map +0 -1
- package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
- package/configuration/interfaces/sceneConfiguration.js +0 -2
- package/configuration/interfaces/sceneConfiguration.js.map +0 -1
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
- package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
- package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
- package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
- package/configuration/interfaces/skyboxConfiguration.js +0 -2
- package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
- package/configuration/interfaces/templateConfiguration.d.ts +0 -67
- package/configuration/interfaces/templateConfiguration.js +0 -2
- package/configuration/interfaces/templateConfiguration.js.map +0 -1
- package/configuration/interfaces/vrConfiguration.d.ts +0 -16
- package/configuration/interfaces/vrConfiguration.js +0 -2
- package/configuration/interfaces/vrConfiguration.js.map +0 -1
- package/configuration/loader.d.ts +0 -4
- package/configuration/loader.js +0 -17
- package/configuration/loader.js.map +0 -1
- package/configuration/mappers.d.ts +0 -43
- package/configuration/mappers.js +0 -193
- package/configuration/mappers.js.map +0 -1
- package/configuration/renderOnlyLoader.d.ts +0 -33
- package/configuration/renderOnlyLoader.js +0 -162
- package/configuration/renderOnlyLoader.js.map +0 -1
- package/configuration/types/default.d.ts +0 -6
- package/configuration/types/default.js +0 -121
- package/configuration/types/default.js.map +0 -1
- package/configuration/types/environmentMap.d.ts +0 -5
- package/configuration/types/environmentMap.js +0 -14
- package/configuration/types/environmentMap.js.map +0 -1
- package/configuration/types/extended.d.ts +0 -6
- package/configuration/types/extended.js +0 -317
- package/configuration/types/extended.js.map +0 -1
- package/configuration/types/index.d.ts +0 -14
- package/configuration/types/index.js +0 -51
- package/configuration/types/index.js.map +0 -1
- package/configuration/types/minimal.d.ts +0 -6
- package/configuration/types/minimal.js +0 -43
- package/configuration/types/minimal.js.map +0 -1
- package/configuration/types/renderOnlyDefault.d.ts +0 -30
- package/configuration/types/renderOnlyDefault.js +0 -31
- package/configuration/types/renderOnlyDefault.js.map +0 -1
- package/configuration/types/shadowLight.d.ts +0 -9
- package/configuration/types/shadowLight.js +0 -64
- package/configuration/types/shadowLight.js.map +0 -1
- package/helper/index.d.ts +0 -29
- package/helper/index.js +0 -66
- package/helper/index.js.map +0 -1
- package/index.d.ts +0 -30
- package/index.js +0 -46
- package/index.js.map +0 -1
- package/initializer.d.ts +0 -11
- package/initializer.js +0 -35
- package/initializer.js.map +0 -1
- package/interfaces.d.ts +0 -5
- package/interfaces.js +0 -7
- package/interfaces.js.map +0 -1
- package/labs/environmentSerializer.d.ts +0 -126
- package/labs/environmentSerializer.js +0 -191
- package/labs/environmentSerializer.js.map +0 -1
- package/labs/texture.d.ts +0 -183
- package/labs/texture.js +0 -351
- package/labs/texture.js.map +0 -1
- package/labs/viewerLabs.d.ts +0 -51
- package/labs/viewerLabs.js +0 -134
- package/labs/viewerLabs.js.map +0 -1
- package/loader/modelLoader.d.ts +0 -56
- package/loader/modelLoader.js +0 -202
- package/loader/modelLoader.js.map +0 -1
- package/loader/plugins/applyMaterialConfig.d.ts +0 -12
- package/loader/plugins/applyMaterialConfig.js +0 -16
- package/loader/plugins/applyMaterialConfig.js.map +0 -1
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
- package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
- package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
- package/loader/plugins/index.d.ts +0 -19
- package/loader/plugins/index.js +0 -44
- package/loader/plugins/index.js.map +0 -1
- package/loader/plugins/loaderPlugin.d.ts +0 -24
- package/loader/plugins/loaderPlugin.js +0 -2
- package/loader/plugins/loaderPlugin.js.map +0 -1
- package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
- package/loader/plugins/msftLodLoaderPlugin.js +0 -21
- package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
- package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
- package/loader/plugins/telemetryLoaderPlugin.js +0 -36
- package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
- package/managers/observablesManager.d.ts +0 -66
- package/managers/observablesManager.js +0 -35
- package/managers/observablesManager.js.map +0 -1
- package/managers/sceneManager.d.ts +0 -245
- package/managers/sceneManager.js +0 -1375
- package/managers/sceneManager.js.map +0 -1
- package/managers/telemetryManager.d.ts +0 -78
- package/managers/telemetryManager.js +0 -117
- package/managers/telemetryManager.js.map +0 -1
- package/model/modelAnimation.d.ts +0 -215
- package/model/modelAnimation.js +0 -237
- package/model/modelAnimation.js.map +0 -1
- package/model/viewerModel.d.ts +0 -233
- package/model/viewerModel.js +0 -673
- package/model/viewerModel.js.map +0 -1
- package/optimizer/custom/extended.d.ts +0 -13
- package/optimizer/custom/extended.js +0 -101
- package/optimizer/custom/extended.js.map +0 -1
- package/optimizer/custom/index.d.ts +0 -9
- package/optimizer/custom/index.js +0 -26
- package/optimizer/custom/index.js.map +0 -1
- package/renderOnlyIndex.d.ts +0 -11
- package/renderOnlyIndex.js +0 -18
- package/renderOnlyIndex.js.map +0 -1
- package/templating/eventManager.d.ts +0 -35
- package/templating/eventManager.js +0 -66
- package/templating/eventManager.js.map +0 -1
- package/templating/plugins/hdButtonPlugin.d.ts +0 -9
- package/templating/plugins/hdButtonPlugin.js +0 -22
- package/templating/plugins/hdButtonPlugin.js.map +0 -1
- package/templating/plugins/printButton.d.ts +0 -9
- package/templating/plugins/printButton.js +0 -41
- package/templating/plugins/printButton.js.map +0 -1
- package/templating/templateManager.d.ts +0 -197
- package/templating/templateManager.js +0 -561
- package/templating/templateManager.js.map +0 -1
- package/templating/viewerTemplatePlugin.d.ts +0 -21
- package/templating/viewerTemplatePlugin.js +0 -69
- package/templating/viewerTemplatePlugin.js.map +0 -1
- package/viewer/defaultViewer.d.ts +0 -130
- package/viewer/defaultViewer.js +0 -672
- package/viewer/defaultViewer.js.map +0 -1
- package/viewer/renderOnlyViewer.d.ts +0 -9
- package/viewer/renderOnlyViewer.js +0 -46
- package/viewer/renderOnlyViewer.js.map +0 -1
- package/viewer/viewer.d.ts +0 -258
- package/viewer/viewer.js +0 -783
- package/viewer/viewer.js.map +0 -1
- package/viewer/viewerManager.d.ts +0 -58
- package/viewer/viewerManager.js +0 -91
- package/viewer/viewerManager.js.map +0 -1
- package/viewer/viewerWithTemplate.d.ts +0 -9
- package/viewer/viewerWithTemplate.js +0 -20
- package/viewer/viewerWithTemplate.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,R as t,z as s,J as n,K as r,N as i,Q as o,W as a,X as c,Y as l,Z as h,_ as u,$ as d,a0 as p,a1 as _,V as f,a2 as x,a3 as m,M as v,a4 as y,v as g,x as T,a5 as S,a6 as w,L as C,a7 as E,T as P,a8 as R,C as A,a9 as z,u as b,aa as M,m as D,ab as I,ac as V,ad as F,ae as U,E as k,af as B,ag as L,ah as H,s as N,ai as G,aj as O,B as W,ak as Z,y as X}from"./index-BJLUfgJX.esm.min.js";import"./fogFragment-BKD4e7Ph.esm.min.js";import"./logDepthDeclaration-BffNcd79.esm.min.js";import"./logDepthVertex-CDQb6tt8.esm.min.js";import"./fogFragment-DTaKEUGB.esm.min.js";import"./logDepthDeclaration-BMa31LAb.esm.min.js";import"./meshUboDeclaration-GE0scsI9.esm.min.js";import"./logDepthVertex-Dpw-9K14.esm.min.js";import{R as j}from"./rawTexture-YAJTylc3.esm.min.js";import"./thinInstanceMesh-DEwtxS2k.esm.min.js";import{A as Y}from"./assetContainer-Dkp9h8Nk.esm.min.js";import{S as K}from"./standardMaterial-DnghlXVE.esm.min.js";e.IncludesShadersStore.gaussianSplattingFragmentDeclaration="vec4 gaussianColor(vec4 inColor)\n{float A=-dot(vPosition,vPosition);if (A<-4.0) discard;float B=exp(A)*inColor.a;\n#include<logDepthFragment>\nvec3 color=inColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\nreturn vec4(color,B);}\n";const q="gaussianSplattingPixelShader",Q="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplattingFragmentDeclaration>\nvoid main () { \n#include<clipPlaneFragment>\ngl_FragColor=gaussianColor(vColor);}\n";e.ShadersStore[q]=Q;const J={name:q,shader:Q};var $=Object.freeze({__proto__:null,gaussianSplattingPixelShader:J});e.IncludesShadersStore.gaussianSplattingVertexDeclaration="attribute vec2 position;uniform mat4 view;uniform mat4 projection;uniform mat4 world;uniform vec4 vEyePosition;";e.IncludesShadersStore.gaussianSplattingUboDeclaration="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nattribute vec2 position;";e.IncludesShadersStore.gaussianSplatting="#if !defined(WEBGL2) && !defined(WEBGPU) && !defined(NATIVE)\nmat3 transpose(mat3 matrix) {return mat3(matrix[0][0],matrix[1][0],matrix[2][0],\nmatrix[0][1],matrix[1][1],matrix[2][1],\nmatrix[0][2],matrix[1][2],matrix[2][2]);}\n#endif\nvec2 getDataUV(float index,vec2 textureSize) {float y=floor(index/textureSize.x);float x=index-y*textureSize.x;return vec2((x+0.5)/textureSize.x,(y+0.5)/textureSize.y);}\n#if SH_DEGREE>0\nivec2 getDataUVint(float index,vec2 textureSize) {float y=floor(index/textureSize.x);float x=index-y*textureSize.x;return ivec2(uint(x+0.5),uint(y+0.5));}\n#endif\nstruct Splat {vec4 center;vec4 color;vec4 covA;vec4 covB;\n#if SH_DEGREE>0\nuvec4 sh0; \n#endif\n#if SH_DEGREE>1\nuvec4 sh1;\n#endif\n#if SH_DEGREE>2\nuvec4 sh2;\n#endif\n};Splat readSplat(float splatIndex)\n{Splat splat;vec2 splatUV=getDataUV(splatIndex,dataTextureSize);splat.center=texture2D(centersTexture,splatUV);splat.color=texture2D(colorsTexture,splatUV);splat.covA=texture2D(covariancesATexture,splatUV)*splat.center.w;splat.covB=texture2D(covariancesBTexture,splatUV)*splat.center.w;\n#if SH_DEGREE>0\nivec2 splatUVint=getDataUVint(splatIndex,dataTextureSize);splat.sh0=texelFetch(shTexture0,splatUVint,0);\n#endif\n#if SH_DEGREE>1\nsplat.sh1=texelFetch(shTexture1,splatUVint,0);\n#endif\n#if SH_DEGREE>2\nsplat.sh2=texelFetch(shTexture2,splatUVint,0);\n#endif\nreturn splat;}\n#if defined(WEBGL2) || defined(WEBGPU) || defined(NATIVE)\nvec3 computeColorFromSHDegree(vec3 dir,const vec3 sh[16])\n{const float SH_C0=0.28209479;const float SH_C1=0.48860251;float SH_C2[5];SH_C2[0]=1.092548430;SH_C2[1]=-1.09254843;SH_C2[2]=0.315391565;SH_C2[3]=-1.09254843;SH_C2[4]=0.546274215;float SH_C3[7];SH_C3[0]=-0.59004358;SH_C3[1]=2.890611442;SH_C3[2]=-0.45704579;SH_C3[3]=0.373176332;SH_C3[4]=-0.45704579;SH_C3[5]=1.445305721;SH_C3[6]=-0.59004358;vec3 result=/*SH_C0**/sh[0];\n#if SH_DEGREE>0\nfloat x=dir.x;float y=dir.y;float z=dir.z;result+=- SH_C1*y*sh[1]+SH_C1*z*sh[2]-SH_C1*x*sh[3];\n#if SH_DEGREE>1\nfloat xx=x*x,yy=y*y,zz=z*z;float xy=x*y,yz=y*z,xz=x*z;result+=\nSH_C2[0]*xy*sh[4] +\nSH_C2[1]*yz*sh[5] +\nSH_C2[2]*(2.0f*zz-xx-yy)*sh[6] +\nSH_C2[3]*xz*sh[7] +\nSH_C2[4]*(xx-yy)*sh[8];\n#if SH_DEGREE>2\nresult+=\nSH_C3[0]*y*(3.0f*xx-yy)*sh[9] +\nSH_C3[1]*xy*z*sh[10] +\nSH_C3[2]*y*(4.0f*zz-xx-yy)*sh[11] +\nSH_C3[3]*z*(2.0f*zz-3.0f*xx-3.0f*yy)*sh[12] +\nSH_C3[4]*x*(4.0f*zz-xx-yy)*sh[13] +\nSH_C3[5]*z*(xx-yy)*sh[14] +\nSH_C3[6]*x*(xx-3.0f*yy)*sh[15];\n#endif\n#endif\n#endif\nreturn result;}\nvec4 decompose(uint value)\n{vec4 components=vec4(\nfloat((value ) & 255u),\nfloat((value>>uint( 8)) & 255u),\nfloat((value>>uint(16)) & 255u),\nfloat((value>>uint(24)) & 255u));return components*vec4(2./255.)-vec4(1.);}\nvec3 computeSH(Splat splat,vec3 color,vec3 dir)\n{vec3 sh[16];sh[0]=color;\n#if SH_DEGREE>0\nvec4 sh00=decompose(splat.sh0.x);vec4 sh01=decompose(splat.sh0.y);vec4 sh02=decompose(splat.sh0.z);sh[1]=vec3(sh00.x,sh00.y,sh00.z);sh[2]=vec3(sh00.w,sh01.x,sh01.y);sh[3]=vec3(sh01.z,sh01.w,sh02.x);\n#endif\n#if SH_DEGREE>1\nvec4 sh03=decompose(splat.sh0.w);vec4 sh04=decompose(splat.sh1.x);vec4 sh05=decompose(splat.sh1.y);sh[4]=vec3(sh02.y,sh02.z,sh02.w);sh[5]=vec3(sh03.x,sh03.y,sh03.z);sh[6]=vec3(sh03.w,sh04.x,sh04.y);sh[7]=vec3(sh04.z,sh04.w,sh05.x);sh[8]=vec3(sh05.y,sh05.z,sh05.w);\n#endif\n#if SH_DEGREE>2\nvec4 sh06=decompose(splat.sh1.z);vec4 sh07=decompose(splat.sh1.w);vec4 sh08=decompose(splat.sh2.x);vec4 sh09=decompose(splat.sh2.y);vec4 sh10=decompose(splat.sh2.z);vec4 sh11=decompose(splat.sh2.w);sh[9]=vec3(sh06.x,sh06.y,sh06.z);sh[10]=vec3(sh06.w,sh07.x,sh07.y);sh[11]=vec3(sh07.z,sh07.w,sh08.x);sh[12]=vec3(sh08.y,sh08.z,sh08.w);sh[13]=vec3(sh09.x,sh09.y,sh09.z);sh[14]=vec3(sh09.w,sh10.x,sh10.y);sh[15]=vec3(sh10.z,sh10.w,sh11.x); \n#endif\nreturn computeColorFromSHDegree(dir,sh);}\n#else\nvec3 computeSH(Splat splat,vec3 color,vec3 dir)\n{return color;}\n#endif\nvec4 gaussianSplatting(vec2 meshPos,vec3 worldPos,vec2 scale,vec3 covA,vec3 covB,mat4 worldMatrix,mat4 viewMatrix,mat4 projectionMatrix)\n{mat4 modelView=viewMatrix*worldMatrix;vec4 camspace=viewMatrix*vec4(worldPos,1.);vec4 pos2d=projectionMatrix*camspace;float bounds=1.2*pos2d.w;if (pos2d.z<-pos2d.w || pos2d.x<-bounds || pos2d.x>bounds\n|| pos2d.y<-bounds || pos2d.y>bounds) {return vec4(0.0,0.0,2.0,1.0);}\nmat3 Vrk=mat3(\ncovA.x,covA.y,covA.z,\ncovA.y,covB.x,covB.y,\ncovA.z,covB.y,covB.z\n);mat3 J=mat3(\nfocal.x/camspace.z,0.,-(focal.x*camspace.x)/(camspace.z*camspace.z),\n0.,focal.y/camspace.z,-(focal.y*camspace.y)/(camspace.z*camspace.z),\n0.,0.,0.\n);mat3 invy=mat3(1,0,0,0,-1,0,0,0,1);mat3 T=invy*transpose(mat3(modelView))*J;mat3 cov2d=transpose(T)*Vrk*T;float mid=(cov2d[0][0]+cov2d[1][1])/2.0;float radius=length(vec2((cov2d[0][0]-cov2d[1][1])/2.0,cov2d[0][1]));float lambda1=mid+radius,lambda2=mid-radius;if (lambda2<0.0)\n{return vec4(0.0,0.0,2.0,1.0);}\nvec2 diagonalVector=normalize(vec2(cov2d[0][1],lambda1-cov2d[0][0]));vec2 majorAxis=min(sqrt(2.0*lambda1),1024.0)*diagonalVector;vec2 minorAxis=min(sqrt(2.0*lambda2),1024.0)*vec2(diagonalVector.y,-diagonalVector.x);vec2 vCenter=vec2(pos2d);return vec4(\nvCenter \n+ ((meshPos.x*majorAxis\n+ meshPos.y*minorAxis)*invViewport*pos2d.w)*scale,pos2d.zw);}";const ee="gaussianSplattingVertexShader",te="#include<__decl__gaussianSplattingVertex>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute float splatIndex;uniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;\n#if SH_DEGREE>0\nuniform highp usampler2D shTexture0;\n#endif\n#if SH_DEGREE>1\nuniform highp usampler2D shTexture1;\n#endif\n#if SH_DEGREE>2\nuniform highp usampler2D shTexture2;\n#endif\nvarying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplatting>\nvoid main () {Splat splat=readSplat(splatIndex);vec3 covA=splat.covA.xyz;vec3 covB=vec3(splat.covA.w,splat.covB.xy);vec4 worldPos=world*vec4(splat.center.xyz,1.0);vColor=splat.color;vPosition=position;\n#if SH_DEGREE>0\nvec3 dir=normalize(worldPos.xyz-vEyePosition.xyz);vColor.xyz=computeSH(splat,splat.color.xyz,dir);\n#endif\ngl_Position=gaussianSplatting(position,worldPos.xyz,vec2(1.,1.),covA,covB,world,view,projection);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";e.ShadersStore[ee]=te;const se={name:ee,shader:te};var ne=Object.freeze({__proto__:null,gaussianSplattingVertexShader:se});e.IncludesShadersStoreWGSL.gaussianSplattingFragmentDeclaration="fn gaussianColor(inColor: vec4f,inPosition: vec2f)->vec4f\n{var A : f32=-dot(inPosition,inPosition);if (A>-4.0)\n{var B: f32=exp(A)*inColor.a;\n#include<logDepthFragment>\nvar color: vec3f=inColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\nreturn vec4f(color,B);} else {return vec4f(0.0);}}\n";const re="gaussianSplattingPixelShader",ie="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vColor: vec4f;varying vPosition: vec2f;\n#include<gaussianSplattingFragmentDeclaration>\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#include<clipPlaneFragment>\nfragmentOutputs.color=gaussianColor(input.vColor,input.vPosition);}\n";e.ShadersStoreWGSL[re]=ie;const oe={name:re,shader:ie};var ae=Object.freeze({__proto__:null,gaussianSplattingPixelShaderWGSL:oe});e.IncludesShadersStoreWGSL.gaussianSplatting="fn getDataUV(index: f32,dataTextureSize: vec2f)->vec2<f32> {let y: f32=floor(index/dataTextureSize.x);let x: f32=index-y*dataTextureSize.x;return vec2f((x+0.5),(y+0.5));}\nstruct Splat {center: vec4f,\ncolor: vec4f,\ncovA: vec4f,\ncovB: vec4f,\n#if SH_DEGREE>0\nsh0: vec4<u32>,\n#endif\n#if SH_DEGREE>1\nsh1: vec4<u32>,\n#endif\n#if SH_DEGREE>2\nsh2: vec4<u32>,\n#endif\n};fn readSplat(splatIndex: f32,dataTextureSize: vec2f)->Splat {var splat: Splat;let splatUV=getDataUV(splatIndex,dataTextureSize);let splatUVi32=vec2<i32>(i32(splatUV.x),i32(splatUV.y));splat.center=textureLoad(centersTexture,splatUVi32,0);splat.color=textureLoad(colorsTexture,splatUVi32,0);splat.covA=textureLoad(covariancesATexture,splatUVi32,0)*splat.center.w;splat.covB=textureLoad(covariancesBTexture,splatUVi32,0)*splat.center.w;\n#if SH_DEGREE>0\nsplat.sh0=textureLoad(shTexture0,splatUVi32,0);\n#endif\n#if SH_DEGREE>1\nsplat.sh1=textureLoad(shTexture1,splatUVi32,0);\n#endif\n#if SH_DEGREE>2\nsplat.sh2=textureLoad(shTexture2,splatUVi32,0);\n#endif\nreturn splat;}\nfn computeColorFromSHDegree(dir: vec3f,sh: array<vec3<f32>,16>)->vec3f\n{let SH_C0: f32=0.28209479;let SH_C1: f32=0.48860251;var SH_C2: array<f32,5>=array<f32,5>(\n1.092548430,\n-1.09254843,\n0.315391565,\n-1.09254843,\n0.546274215\n);var SH_C3: array<f32,7>=array<f32,7>(\n-0.59004358,\n2.890611442,\n-0.45704579,\n0.373176332,\n-0.45704579,\n1.445305721,\n-0.59004358\n);var result: vec3f=/*SH_C0**/sh[0];\n#if SH_DEGREE>0\nlet x: f32=dir.x;let y: f32=dir.y;let z: f32=dir.z;result+=-SH_C1*y*sh[1]+SH_C1*z*sh[2]-SH_C1*x*sh[3];\n#if SH_DEGREE>1\nlet xx: f32=x*x;let yy: f32=y*y;let zz: f32=z*z;let xy: f32=x*y;let yz: f32=y*z;let xz: f32=x*z;result+=\nSH_C2[0]*xy*sh[4] +\nSH_C2[1]*yz*sh[5] +\nSH_C2[2]*(2.0f*zz-xx-yy)*sh[6] +\nSH_C2[3]*xz*sh[7] +\nSH_C2[4]*(xx-yy)*sh[8];\n#if SH_DEGREE>2\nresult+=\nSH_C3[0]*y*(3.0f*xx-yy)*sh[9] +\nSH_C3[1]*xy*z*sh[10] +\nSH_C3[2]*y*(4.0f*zz-xx-yy)*sh[11] +\nSH_C3[3]*z*(2.0f*zz-3.0f*xx-3.0f*yy)*sh[12] +\nSH_C3[4]*x*(4.0f*zz-xx-yy)*sh[13] +\nSH_C3[5]*z*(xx-yy)*sh[14] +\nSH_C3[6]*x*(xx-3.0f*yy)*sh[15];\n#endif\n#endif\n#endif\nreturn result;}\nfn decompose(value: u32)->vec4f\n{let components : vec4f=vec4f(\nf32((value ) & 255u),\nf32((value>>u32( 8)) & 255u),\nf32((value>>u32(16)) & 255u),\nf32((value>>u32(24)) & 255u));return components*vec4f(2./255.)-vec4f(1.);}\nfn computeSH(splat: Splat,color: vec3f,dir: vec3f)->vec3f\n{var sh: array<vec3<f32>,16>;sh[0]=color;\n#if SH_DEGREE>0\nlet sh00: vec4f=decompose(splat.sh0.x);let sh01: vec4f=decompose(splat.sh0.y);let sh02: vec4f=decompose(splat.sh0.z);sh[1]=vec3f(sh00.x,sh00.y,sh00.z);sh[2]=vec3f(sh00.w,sh01.x,sh01.y);sh[3]=vec3f(sh01.z,sh01.w,sh02.x);\n#endif\n#if SH_DEGREE>1\nlet sh03: vec4f=decompose(splat.sh0.w);let sh04: vec4f=decompose(splat.sh1.x);let sh05: vec4f=decompose(splat.sh1.y);sh[4]=vec3f(sh02.y,sh02.z,sh02.w);sh[5]=vec3f(sh03.x,sh03.y,sh03.z);sh[6]=vec3f(sh03.w,sh04.x,sh04.y);sh[7]=vec3f(sh04.z,sh04.w,sh05.x);sh[8]=vec3f(sh05.y,sh05.z,sh05.w);\n#endif\n#if SH_DEGREE>2\nlet sh06: vec4f=decompose(splat.sh1.z);let sh07: vec4f=decompose(splat.sh1.w);let sh08: vec4f=decompose(splat.sh2.x);let sh09: vec4f=decompose(splat.sh2.y);let sh10: vec4f=decompose(splat.sh2.z);let sh11: vec4f=decompose(splat.sh2.w);sh[9]=vec3f(sh06.x,sh06.y,sh06.z);sh[10]=vec3f(sh06.w,sh07.x,sh07.y);sh[11]=vec3f(sh07.z,sh07.w,sh08.x);sh[12]=vec3f(sh08.y,sh08.z,sh08.w);sh[13]=vec3f(sh09.x,sh09.y,sh09.z);sh[14]=vec3f(sh09.w,sh10.x,sh10.y);sh[15]=vec3f(sh10.z,sh10.w,sh11.x); \n#endif\nreturn computeColorFromSHDegree(dir,sh);}\nfn gaussianSplatting(\nmeshPos: vec2<f32>,\nworldPos: vec3<f32>,\nscale: vec2<f32>,\ncovA: vec3<f32>,\ncovB: vec3<f32>,\nworldMatrix: mat4x4<f32>,\nviewMatrix: mat4x4<f32>,\nprojectionMatrix: mat4x4<f32>,\nfocal: vec2f,\ninvViewport: vec2f\n)->vec4f {let modelView=viewMatrix*worldMatrix;let camspace=viewMatrix*vec4f(worldPos,1.0);let pos2d=projectionMatrix*camspace;let bounds=1.2*pos2d.w;if (pos2d.z<0. || pos2d.x<-bounds || pos2d.x>bounds || pos2d.y<-bounds || pos2d.y>bounds) {return vec4f(0.0,0.0,2.0,1.0);}\nlet Vrk=mat3x3<f32>(\ncovA.x,covA.y,covA.z,\ncovA.y,covB.x,covB.y,\ncovA.z,covB.y,covB.z\n);let J=mat3x3<f32>(\nfocal.x/camspace.z,0.0,-(focal.x*camspace.x)/(camspace.z*camspace.z),\n0.0,focal.y/camspace.z,-(focal.y*camspace.y)/(camspace.z*camspace.z),\n0.0,0.0,0.0\n);let invy=mat3x3<f32>(\n1.0,0.0,0.0,\n0.0,-1.0,0.0,\n0.0,0.0,1.0\n);let T=invy*transpose(mat3x3<f32>(\nmodelView[0].xyz,\nmodelView[1].xyz,\nmodelView[2].xyz))*J;let cov2d=transpose(T)*Vrk*T;let mid=(cov2d[0][0]+cov2d[1][1])/2.0;let radius=length(vec2<f32>((cov2d[0][0]-cov2d[1][1])/2.0,cov2d[0][1]));let lambda1=mid+radius;let lambda2=mid-radius;if (lambda2<0.0) {return vec4f(0.0,0.0,2.0,1.0);}\nlet diagonalVector=normalize(vec2<f32>(cov2d[0][1],lambda1-cov2d[0][0]));let majorAxis=min(sqrt(2.0*lambda1),1024.0)*diagonalVector;let minorAxis=min(sqrt(2.0*lambda2),1024.0)*vec2<f32>(diagonalVector.y,-diagonalVector.x);let vCenter=vec2<f32>(pos2d.x,pos2d.y);return vec4f(\nvCenter+((meshPos.x*majorAxis+meshPos.y*minorAxis)*invViewport*pos2d.w)*scale,\npos2d.z,\npos2d.w\n);}\n";const ce="gaussianSplattingVertexShader",le="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute splatIndex: f32;attribute position: vec2f;uniform invViewport: vec2f;uniform dataTextureSize: vec2f;uniform focal: vec2f;var covariancesATexture: texture_2d<f32>;var covariancesBTexture: texture_2d<f32>;var centersTexture: texture_2d<f32>;var colorsTexture: texture_2d<f32>;\n#if SH_DEGREE>0\nvar shTexture0: texture_2d<u32>;\n#endif\n#if SH_DEGREE>1\nvar shTexture1: texture_2d<u32>;\n#endif\n#if SH_DEGREE>2\nvar shTexture2: texture_2d<u32>;\n#endif\nvarying vColor: vec4f;varying vPosition: vec2f;\n#include<gaussianSplatting>\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {var splat: Splat=readSplat(input.splatIndex,uniforms.dataTextureSize);var covA: vec3f=splat.covA.xyz;var covB: vec3f=vec3f(splat.covA.w,splat.covB.xy);let worldPos: vec4f=mesh.world*vec4f(splat.center.xyz,1.0);vertexOutputs.vPosition=input.position;\n#if SH_DEGREE>0\nlet dir: vec3f=normalize(worldPos.xyz-scene.vEyePosition.xyz);vertexOutputs.vColor=vec4f(computeSH(splat,splat.color.xyz,dir),1.0);\n#else\nvertexOutputs.vColor=splat.color;\n#endif\nvertexOutputs.position=gaussianSplatting(input.position,worldPos.xyz,vec2f(1.0,1.0),covA,covB,mesh.world,scene.view,scene.projection,uniforms.focal,uniforms.invViewport);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";e.ShadersStoreWGSL[ce]=le;const he={name:ce,shader:le};var ue=Object.freeze({__proto__:null,gaussianSplattingVertexShaderWGSL:he});class de extends _{constructor(){super(),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.SH_DEGREE=0,this.rebuild()}}class pe extends s{constructor(e,t){super(e,t),this.backFaceCulling=!1}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(e,t){const s=!0,l=t._drawWrapper;if(l.effect&&this.isFrozen&&l._wasPreviouslyReady&&l._wasPreviouslyUsingInstances===s)return!0;t.materialDefines||(t.materialDefines=new de);const h=this.getScene(),u=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;const d=h.getEngine();if(n(e,h,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,u),r(h,d,this,u,s,null,!0),i(e,u,!1,!1),(d.version>1||d.isWebGPU)&&(u.SH_DEGREE=e.shDegree),u.isDirty){u.markAsProcessed(),h.resetCachedMaterial();const e=[f.PositionKind,"splatIndex"];o(e,u);const s=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal","vEyePosition"],n=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture","shTexture0","shTexture1","shTexture2"],r=["Scene","Mesh"];a({uniformsNames:s,uniformBuffersNames:r,samplers:n,defines:u}),c(s);const i=u.toString(),l=h.getEngine().createEffect("gaussianSplatting",{attributes:e,uniformsNames:s,uniformBuffersNames:r,samplers:n,defines:i,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{},shaderLanguage:this._shaderLanguage,extraInitializationsAsync:async()=>{1===this._shaderLanguage?await Promise.all([Promise.resolve().then((function(){return ae})),Promise.resolve().then((function(){return ue}))]):await Promise.all([Promise.resolve().then((function(){return $})),Promise.resolve().then((function(){return ne}))])}},d);t.setEffect(l,u,this._materialContext)}return!(!t.effect||!t.effect.isReady())&&(u._renderId=h.getRenderId(),l._wasPreviouslyReady=!0,l._wasPreviouslyUsingInstances=s,!0)}static BindEffect(e,t,s){const n=s.getEngine(),r=s.activeCamera,i=n.getRenderWidth(),o=n.getRenderHeight(),a=r?.rigParent?.rigCameras.length||1;t.setFloat2("invViewport",1/(i/a),1/o);let c=1e3;if(r){const e=r.getProjectionMatrix().m[5];c=r.fovMode==l.FOVMODE_VERTICAL_FIXED?o*e/2:i*e/2}t.setFloat2("focal",c,c);const h=e;if(h.covariancesATexture){const e=h.covariancesATexture.getSize();if(t.setFloat2("dataTextureSize",e.width,e.height),t.setTexture("covariancesATexture",h.covariancesATexture),t.setTexture("covariancesBTexture",h.covariancesBTexture),t.setTexture("centersTexture",h.centersTexture),t.setTexture("colorsTexture",h.colorsTexture),h.shTextures)for(let e=0;e<h.shTextures?.length;e++)t.setTexture(`shTexture${e}`,h.shTextures[e])}}bindForSubMesh(e,t,s){const n=this.getScene(),r=s.materialDefines;if(!r)return;const i=s.effect;if(!i)return;this._activeEffect=i,t.getMeshUniformBuffer().bindToEffect(i,"Mesh"),t.transferToEffect(e);this._mustRebind(n,i,s,t.visibility)?(this.bindView(i),this.bindViewProjection(i),pe.BindEffect(t,this._activeEffect,n),h(i,this,n)):n.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0),u(n,t,i),this.useLogarithmicDepth&&d(r,i,n),this._afterBind(t,this._activeEffect,s)}clone(e){return p.Clone((()=>new pe(e,this.getScene())),this)}serialize(){const e=super.serialize();return e.customType="BABYLON.GaussianSplattingMaterial",e}getClassName(){return"GaussianSplattingMaterial"}static Parse(e,t,s){return p.Parse((()=>new pe(e.name,t)),e,t,s)}}t("BABYLON.GaussianSplattingMaterial",pe);const _e=m,fe={...x,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:_e},xe=(e,t)=>{const s=(1<<t)-1;return(e&s)/s},me=(e,t)=>{t.x=xe(e>>>21,11),t.y=xe(e>>>11,10),t.z=xe(e,11)},ve=(e,t)=>{t[0]=255*xe(e>>>24,8),t[1]=255*xe(e>>>16,8),t[2]=255*xe(e>>>8,8),t[3]=255*xe(e,8)},ye=(e,t)=>{const s=1/(.5*Math.sqrt(2)),n=(xe(e>>>20,10)-.5)*s,r=(xe(e>>>10,10)-.5)*s,i=(xe(e,10)-.5)*s,o=Math.sqrt(1-(n*n+r*r+i*i));switch(e>>>30){case 0:t.set(o,n,r,i);break;case 1:t.set(n,o,r,i);break;case 2:t.set(n,r,o,i);break;case 3:t.set(n,r,i,o)}};var ge,Te,Se,we,Ce,Ee;!function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e[e.DOUBLE=3]="DOUBLE",e[e.UCHAR=4]="UCHAR",e[e.UNDEFINED=5]="UNDEFINED"}(ge||(ge={})),function(e){e[e.MIN_X=0]="MIN_X",e[e.MIN_Y=1]="MIN_Y",e[e.MIN_Z=2]="MIN_Z",e[e.MAX_X=3]="MAX_X",e[e.MAX_Y=4]="MAX_Y",e[e.MAX_Z=5]="MAX_Z",e[e.MIN_SCALE_X=6]="MIN_SCALE_X",e[e.MIN_SCALE_Y=7]="MIN_SCALE_Y",e[e.MIN_SCALE_Z=8]="MIN_SCALE_Z",e[e.MAX_SCALE_X=9]="MAX_SCALE_X",e[e.MAX_SCALE_Y=10]="MAX_SCALE_Y",e[e.MAX_SCALE_Z=11]="MAX_SCALE_Z",e[e.PACKED_POSITION=12]="PACKED_POSITION",e[e.PACKED_ROTATION=13]="PACKED_ROTATION",e[e.PACKED_SCALE=14]="PACKED_SCALE",e[e.PACKED_COLOR=15]="PACKED_COLOR",e[e.X=16]="X",e[e.Y=17]="Y",e[e.Z=18]="Z",e[e.SCALE_0=19]="SCALE_0",e[e.SCALE_1=20]="SCALE_1",e[e.SCALE_2=21]="SCALE_2",e[e.DIFFUSE_RED=22]="DIFFUSE_RED",e[e.DIFFUSE_GREEN=23]="DIFFUSE_GREEN",e[e.DIFFUSE_BLUE=24]="DIFFUSE_BLUE",e[e.OPACITY=25]="OPACITY",e[e.F_DC_0=26]="F_DC_0",e[e.F_DC_1=27]="F_DC_1",e[e.F_DC_2=28]="F_DC_2",e[e.F_DC_3=29]="F_DC_3",e[e.ROT_0=30]="ROT_0",e[e.ROT_1=31]="ROT_1",e[e.ROT_2=32]="ROT_2",e[e.ROT_3=33]="ROT_3",e[e.UNDEFINED=34]="UNDEFINED"}(Te||(Te={}));class Pe extends v{get shDegree(){return this._shDegree}get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}get shTextures(){return this._shTextures}set material(e){this._material=e,this._material.backFaceCulling=!0,this._material.cullBackFaces=!1,e.resetDrawCache()}get material(){return this._material}constructor(e,t=null,s=null,n=!1){super(e,s),this._vertexCount=0,this._worker=null,this._frameIdLastUpdate=-1,this._modelViewMatrix=y.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._splatPositions=null,this._splatIndex=null,this._shTextures=null,this._covariancesA=null,this._covariancesB=null,this._colors=null,this._sh=null,this._keepInRam=!1,this._delayedTextureUpdate=null,this._oldDirection=new g,this._useRGBACovariants=!1,this._material=null,this._tmpCovariances=[0,0,0,0,0,0],this._sortIsDirty=!1,this._shDegree=0;const r=new T;r.positions=[-3,-2,0,3,-2,0,0,4,0],r.indices=[0,1,2],r.applyToMesh(this),this.subMeshes=[],new S(0,0,3,0,3,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,this._keepInRam=n,t&&this.loadFileAsync(t),this._material=new pe(this.name+"_material",this._scene)}getClassName(){return"GaussianSplattingMesh"}getTotalVertices(){return this._vertexCount}isReady(e=!1){return!!super.isReady(e,!0)&&(!!this._readyToDisplay||(this._postToWorker(!0),!1))}_postToWorker(e=!1){const t=this.getScene().getFrameId();if((e||t!==this._frameIdLastUpdate)&&this._worker&&this._scene.activeCamera&&this._canPostToWorker){const s=this._scene.activeCamera.getViewMatrix();this.getWorldMatrix().multiplyToRef(s,this._modelViewMatrix),s.invertToRef(w.Matrix[0]),this.getWorldMatrix().multiplyToRef(w.Matrix[0],w.Matrix[1]),g.TransformNormalToRef(g.Forward(this._scene.useRightHandedSystem),w.Matrix[1],w.Vector3[2]),w.Vector3[2].normalize();const n=g.Dot(w.Vector3[2],this._oldDirection);(e||Math.abs(n-1)>=.01)&&(this._oldDirection.copyFrom(w.Vector3[2]),this._frameIdLastUpdate=t,this._canPostToWorker=!1,this._worker.postMessage({view:this._modelViewMatrix.m,depthMix:this._depthMix,useRightHandedSystem:this._scene.useRightHandedSystem},[this._depthMix.buffer]))}}render(e,t,s){return this._postToWorker(),super.render(e,t,s)}static _TypeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4}return 5}static _ValueNameToEnum(e){switch(e){case"min_x":return 0;case"min_y":return 1;case"min_z":return 2;case"max_x":return 3;case"max_y":return 4;case"max_z":return 5;case"min_scale_x":return 6;case"min_scale_y":return 7;case"min_scale_z":return 8;case"max_scale_x":return 9;case"max_scale_y":return 10;case"max_scale_z":return 11;case"packed_position":return 12;case"packed_rotation":return 13;case"packed_scale":return 14;case"packed_color":return 15;case"x":return 16;case"y":return 17;case"z":return 18;case"scale_0":return 19;case"scale_1":return 20;case"scale_2":return 21;case"diffuse_red":case"red":return 22;case"diffuse_green":case"green":return 23;case"diffuse_blue":case"blue":return 24;case"f_dc_0":return 26;case"f_dc_1":return 27;case"f_dc_2":return 28;case"f_dc_3":return 29;case"opacity":return 25;case"rot_0":return 30;case"rot_1":return 31;case"rot_2":return 32;case"rot_3":return 33}return 34}static ParseHeader(e){const t=new Uint8Array(e),s=(new TextDecoder).decode(t.slice(0,10240)),n="end_header\n",r=s.indexOf(n);if(r<0||!s)return null;const i=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element chunk (\d+)\n/.exec(s);let a=0;o&&(a=parseInt(o[1]));let c=0,l=0;const h={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let u;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(u||(u={}));let d=1;const p=[],_=[],f=s.slice(0,r).split("\n");for(const e of f)if(e.startsWith("property ")){const[,t,s]=e.split(" "),n=Pe._ValueNameToEnum(s),r=Pe._TypeNameToEnum(t);1==d?(_.push({value:n,type:r,offset:l}),l+=h[t]):0==d&&(p.push({value:n,type:r,offset:c}),c+=h[t]),h[t]||C.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?d=1:"vertex"==t&&(d=0)}return{vertexCount:i,chunkCount:a,rowVertexLength:c,rowChunkLength:l,vertexProperties:p,chunkProperties:_,dataView:new DataView(e,r+11),buffer:new ArrayBuffer(Pe._RowOutputLength*i)}}static _GetCompressedChunks(e,t){if(!e.chunkCount)return null;const s=e.dataView,n=new Array(e.chunkCount);for(let r=0;r<e.chunkCount;r++){const i={min:new g,max:new g,minScale:new g,maxScale:new g};n[r]=i;for(let n=0;n<e.chunkProperties.length;n++){const r=e.chunkProperties[n];let o;if(0===r.type)switch(o=s.getFloat32(r.offset+t.value,!0),r.value){case 0:i.min.x=o;break;case 1:i.min.y=o;break;case 2:i.min.z=o;break;case 3:i.max.x=o;break;case 4:i.max.y=o;break;case 5:i.max.z=o;break;case 6:i.minScale.x=o;break;case 7:i.minScale.y=o;break;case 8:i.minScale.z=o;break;case 9:i.maxScale.x=o;break;case 10:i.maxScale.y=o;break;case 11:i.maxScale.z=o}}t.value+=e.rowChunkLength}return n}static _GetSplat(e,t,s,n){const r=w.Quaternion[0],i=w.Vector3[0],o=Pe._RowOutputLength,a=e.buffer,c=e.dataView,l=new Float32Array(a,t*o,3),h=new Float32Array(a,t*o+12,3),u=new Uint8ClampedArray(a,t*o+24,4),d=new Uint8ClampedArray(a,t*o+28,4),p=t>>8;let _=255,f=0,x=0,m=0;for(let t=0;t<e.vertexProperties.length;t++){const o=e.vertexProperties[t];let a;switch(o.type){case 0:a=c.getFloat32(n.value+o.offset,!0);break;case 1:a=c.getInt32(n.value+o.offset,!0);break;case 2:a=c.getUint32(n.value+o.offset,!0);break;case 3:a=c.getFloat64(n.value+o.offset,!0);break;case 4:a=c.getUint8(n.value+o.offset);break;default:continue}switch(o.value){case 12:{const e=s[p];me(a,i),l[0]=fe.Lerp(e.min.x,e.max.x,i.x),l[1]=-fe.Lerp(e.min.y,e.max.y,i.y),l[2]=fe.Lerp(e.min.z,e.max.z,i.z)}break;case 13:ye(a,r),_=r.w,f=r.z,x=r.y,m=r.x;break;case 14:{const e=s[p];me(a,i),h[0]=Math.exp(fe.Lerp(e.minScale.x,e.maxScale.x,i.x)),h[1]=Math.exp(fe.Lerp(e.minScale.y,e.maxScale.y,i.y)),h[2]=Math.exp(fe.Lerp(e.minScale.z,e.maxScale.z,i.z))}break;case 15:ve(a,u);break;case 16:l[0]=a;break;case 17:l[1]=a;break;case 18:l[2]=a;break;case 19:h[0]=Math.exp(a);break;case 20:h[1]=Math.exp(a);break;case 21:h[2]=Math.exp(a);break;case 22:u[0]=a;break;case 23:u[1]=a;break;case 24:u[2]=a;break;case 26:u[0]=255*(.5+Pe._SH_C0*a);break;case 27:u[1]=255*(.5+Pe._SH_C0*a);break;case 28:u[2]=255*(.5+Pe._SH_C0*a);break;case 29:u[3]=255*(.5+Pe._SH_C0*a);break;case 25:u[3]=1/(1+Math.exp(-a))*255;break;case 30:_=a;break;case 31:f=a;break;case 32:x=a;break;case 33:m=a}}r.set(f,x,m,_),r.normalize(),d[0]=128*r.w+128,d[1]=128*r.x+128,d[2]=128*r.y+128,d[3]=128*r.z+128,n.value+=e.rowVertexLength}static*ConvertPLYToSplat(e,t=!1){const s=Pe.ParseHeader(e);if(!s)return e;const n={value:0},r=Pe._GetCompressedChunks(s,n);for(let e=0;e<s.vertexCount;e++)Pe._GetSplat(s,e,r,n),e%Pe._PlyConversionBatchSize==0&&t&&(yield);return s.buffer}static async ConvertPLYToSplatAsync(e){return E(Pe.ConvertPLYToSplat(e,!0),M())}loadDataAsync(e){return this.updateDataAsync(e)}loadFileAsync(e){return P.LoadFileAsync(e,!0).then((async e=>{Pe.ConvertPLYToSplatAsync(e).then((e=>{this.updateDataAsync(e)}))}))}dispose(e){this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._shTextures&&this._shTextures.forEach((e=>{e.dispose()})),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._shTextures=null,this._worker?.terminate(),this._worker=null,super.dispose(e,!0)}_copyTextures(e){this._covariancesATexture=e.covariancesATexture?.clone(),this._covariancesBTexture=e.covariancesBTexture?.clone(),this._centersTexture=e.centersTexture?.clone(),this._colorsTexture=e.colorsTexture?.clone(),e._shTextures&&(this._shTextures=[],this._shTextures.forEach((e=>{this._shTextures?.push(e.clone())})))}clone(e=""){const t=new Pe(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewMatrix=y.Identity(),t._splatPositions=this._splatPositions,t._readyToDisplay=!1,t._instanciateWorker();const s=this.getBoundingInfo();return t.getBoundingInfo().reConstruct(s.minimum,s.maximum,this.getWorldMatrix()),t.forcedInstanceCount=t._vertexCount,t.setEnabled(!0),t}_makeSplat(e,t,s,n,r,i,o,a,c){const l=w.Matrix[0],h=w.Matrix[1],u=w.Quaternion[0],d=this._useRGBACovariants?4:2,p=s[8*e+0],_=-s[8*e+1],f=s[8*e+2];this._splatPositions[4*e+0]=p,this._splatPositions[4*e+1]=_,this._splatPositions[4*e+2]=f,a.minimizeInPlaceFromFloats(p,_,f),c.maximizeInPlaceFromFloats(p,_,f),u.set((n[32*e+28+1]-128)/128,(n[32*e+28+2]-128)/128,(n[32*e+28+3]-128)/128,-(n[32*e+28+0]-128)/128),u.toRotationMatrix(l),y.ScalingToRef(2*s[8*e+3+0],2*s[8*e+3+1],2*s[8*e+3+2],h);const x=l.multiplyToRef(h,w.Matrix[0]).m,m=this._tmpCovariances;m[0]=x[0]*x[0]+x[1]*x[1]+x[2]*x[2],m[1]=x[0]*x[4]+x[1]*x[5]+x[2]*x[6],m[2]=x[0]*x[8]+x[1]*x[9]+x[2]*x[10],m[3]=x[4]*x[4]+x[5]*x[5]+x[6]*x[6],m[4]=x[4]*x[8]+x[5]*x[9]+x[6]*x[10],m[5]=x[8]*x[8]+x[9]*x[9]+x[10]*x[10];let v=-1e4;for(let e=0;e<6;e++)v=Math.max(v,Math.abs(m[e]));this._splatPositions[4*e+3]=v;const g=v;r[4*t+0]=R(m[0]/g),r[4*t+1]=R(m[1]/g),r[4*t+2]=R(m[2]/g),r[4*t+3]=R(m[3]/g),i[t*d+0]=R(m[4]/g),i[t*d+1]=R(m[5]/g),o[4*t+0]=n[32*e+24+0],o[4*t+1]=n[32*e+24+1],o[4*t+2]=n[32*e+24+2],o[4*t+3]=n[32*e+24+3]}_updateTextures(e,t,s,n){const r=this._getTextureSize(this._vertexCount),i=(e,t,s,n)=>new j(e,t,s,n,this._scene,!1,!1,A.TEXTURE_BILINEAR_SAMPLINGMODE,A.TEXTURETYPE_FLOAT),o=(e,t,s,n)=>new j(e,t,s,n,this._scene,!1,!1,A.TEXTURE_BILINEAR_SAMPLINGMODE,A.TEXTURETYPE_UNSIGNED_BYTE),a=(e,t,s,n)=>new j(e,t,s,n,this._scene,!1,!1,A.TEXTURE_NEAREST_SAMPLINGMODE,A.TEXTURETYPE_UNSIGNED_INTEGER),c=(e,t,s,n)=>new j(e,t,s,n,this._scene,!1,!1,A.TEXTURE_BILINEAR_SAMPLINGMODE,A.TEXTURETYPE_HALF_FLOAT);if(this._keepInRam&&(this._covariancesA=e,this._covariancesB=t,this._colors=s,n&&(this._sh=n)),this._covariancesATexture){this._delayedTextureUpdate={covA:e,covB:t,colors:s,centers:this._splatPositions,sh:n};const r=Float32Array.from(this._splatPositions),i=this._vertexCount;this._worker.postMessage({positions:r,vertexCount:i},[r.buffer]),this._postToWorker(!0)}else this._covariancesATexture=c(e,r.x,r.y,A.TEXTUREFORMAT_RGBA),this._covariancesBTexture=c(t,r.x,r.y,this._useRGBACovariants?A.TEXTUREFORMAT_RGBA:A.TEXTUREFORMAT_RG),this._centersTexture=i(this._splatPositions,r.x,r.y,A.TEXTUREFORMAT_RGBA),this._colorsTexture=o(s,r.x,r.y,A.TEXTUREFORMAT_RGBA),n&&(this._shTextures=[],n.forEach((e=>{const t=new Uint32Array(e.buffer),s=a(t,r.x,r.y,A.TEXTUREFORMAT_RGBA_INTEGER);s.wrapU=A.TEXTURE_CLAMP_ADDRESSMODE,s.wrapV=A.TEXTURE_CLAMP_ADDRESSMODE,this._shTextures.push(s)}))),this._instanciateWorker()}*_updateData(e,t,s){this._covariancesATexture||(this._readyToDisplay=!1);const n=new Uint8Array(e),r=new Float32Array(n.buffer),i=n.length/Pe._RowOutputLength;i!=this._vertexCount&&this._updateSplatIndexBuffer(i),this._vertexCount=i,this._shDegree=s?s.length:0;const o=this._getTextureSize(i),a=o.x*o.y,c=Pe.ProgressiveUpdateAmount??o.y,l=o.x*c;this._splatPositions=new Float32Array(4*a);const h=new Uint16Array(4*a),u=new Uint16Array((this._useRGBACovariants?4:2)*a),d=new Uint8Array(4*a),p=new g(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),_=new g(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(Pe.ProgressiveUpdateAmount){this._updateTextures(h,u,d,s),this.setEnabled(!0);const e=Math.ceil(o.y/c);for(let s=0;s<e;s++){const e=s*c,i=e*o.x;for(let e=0;e<l;e++)this._makeSplat(i+e,i+e,r,n,h,u,d,p,_);this._updateSubTextures(this._splatPositions,h,u,d,e,Math.min(c,o.y-e)),this.getBoundingInfo().reConstruct(p,_,this.getWorldMatrix()),t&&(yield)}const i=Float32Array.from(this._splatPositions),a=this._vertexCount;this._worker.postMessage({positions:i,vertexCount:a},[i.buffer]),this._sortIsDirty=!0}else{for(let e=0;e<i;e++)this._makeSplat(e,e,r,n,h,u,d,p,_),t&&e%Pe._SplatBatchSize==0&&(yield);this._updateTextures(h,u,d,s),this.getBoundingInfo().reConstruct(p,_,this.getWorldMatrix()),this.setEnabled(!0)}this._postToWorker(!0)}async updateDataAsync(e,t){return E(this._updateData(e,!0,t),M())}updateData(e,t){z(this._updateData(e,!1,t))}_updateSplatIndexBuffer(e){(!this._splatIndex||e>this._splatIndex.length)&&(this._splatIndex=new Float32Array(e),this.thinInstanceSetBuffer("splatIndex",this._splatIndex,1,!1)),this.forcedInstanceCount=e}_updateSubTextures(e,t,s,n,r,i,o){const a=(e,t,s,n,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,n,s,r,0,0,!1)},c=this._getTextureSize(this._vertexCount),l=this._useRGBACovariants?4:2,h=r*c.x,u=i*c.x,d=new Uint16Array(t.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),p=new Uint16Array(s.buffer,h*l*Uint16Array.BYTES_PER_ELEMENT,u*l),_=new Uint8Array(n.buffer,4*h,4*u),f=new Float32Array(e.buffer,4*h*Float32Array.BYTES_PER_ELEMENT,4*u);if(a(this._covariancesATexture,d,c.x,r,i),a(this._covariancesBTexture,p,c.x,r,i),a(this._centersTexture,f,c.x,r,i),a(this._colorsTexture,_,c.x,r,i),o)for(let e=0;e<o.length;e++){const t=4,s=new Uint8Array(this._sh[e].buffer,h*t,u*t);a(this._shTextures[e],s,c.x,r,i)}}_instanciateWorker(){if(!this._vertexCount)return;this._updateSplatIndexBuffer(this._vertexCount),this._worker?.terminate(),this._worker=new Worker(URL.createObjectURL(new Blob(["(",Pe._CreateWorker.toString(),")(self)"],{type:"application/javascript"}))),this._depthMix=new BigInt64Array(this._vertexCount);const e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({positions:e,vertexCount:t},[e.buffer]),this._worker.onmessage=e=>{this._depthMix=e.data.depthMix;const s=new Uint32Array(e.data.depthMix.buffer);if(this._splatIndex)for(let e=0;e<this._vertexCount;e++)this._splatIndex[e]=s[2*e];if(this._delayedTextureUpdate){const e=this._getTextureSize(t);this._updateSubTextures(this._delayedTextureUpdate.centers,this._delayedTextureUpdate.covA,this._delayedTextureUpdate.covB,this._delayedTextureUpdate.colors,0,e.y,this._delayedTextureUpdate.sh),this._delayedTextureUpdate=null}this.thinInstanceBufferUpdated("splatIndex"),this._canPostToWorker=!0,this._readyToDisplay=!0,this._sortIsDirty&&(this._postToWorker(!0),this._sortIsDirty=!1)}}_getTextureSize(e){const t=this._scene.getEngine(),s=t.getCaps().maxTextureSize;let n=1;if(1!==t.version||t.isWebGPU)n=Math.ceil(e/s);else for(;s*n<e;)n*=2;return n>s&&(C.Error("GaussianSplatting texture size: ("+s+", "+n+"), maxTextureSize: "+s),n=s),new b(s,n)}}Pe._RowOutputLength=32,Pe._SH_C0=.28209479177387814,Pe._SplatBatchSize=327680,Pe._PlyConversionBatchSize=32768,Pe.ProgressiveUpdateAmount=0,Pe._CreateWorker=function(e){let t,s,n,r,i=0;e.onmessage=o=>{if(o.data.positions)t=o.data.positions,i=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,n=new Uint32Array(s.buffer),r=new Float32Array(s.buffer);for(let e=0;e<i;e++)n[2*e]=e;let c=-1;o.data.useRightHandedSystem&&(c=1);for(let e=0;e<i;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 Re{constructor(e,t,s,n,r){this.idx=0,this.color=new D(1,1,1,1),this.position=g.Zero(),this.rotation=g.Zero(),this.uv=new b(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=n,this._pcs=r}get size(){return this.size}set size(e){this.size=e}get quaternion(){return this.rotationQuaternion}set quaternion(e){this.rotationQuaternion=e}intersectsMesh(e,t){if(!e.hasBoundingInfo)return!1;if(!this._pcs.mesh)throw new Error("Point Cloud System doesnt contain the Mesh");if(t)return e.getBoundingInfo().boundingSphere.intersectsPoint(this.position.add(this._pcs.mesh.position));const s=e.getBoundingInfo().boundingBox,n=s.maximumWorld.x,r=s.minimumWorld.x,i=s.maximumWorld.y,o=s.minimumWorld.y,a=s.maximumWorld.z,c=s.minimumWorld.z,l=this.position.x+this._pcs.mesh.position.x,h=this.position.y+this._pcs.mesh.position.y,u=this.position.z+this._pcs.mesh.position.z;return r<=l&&l<=n&&o<=h&&h<=i&&c<=u&&u<=a}getRotationMatrix(e){let t;if(this.rotationQuaternion)t=this.rotationQuaternion;else{t=w.Quaternion[0];const e=this.rotation;I.RotationYawPitchRollToRef(e.y,e.x,e.z,t)}t.toRotationMatrix(e)}}class Ae{get groupID(){return this.groupId}set groupID(e){this.groupId=e}constructor(e,t){this.groupId=e,this._positionFunction=t}}class ze{constructor(e,t,s=Number.MAX_VALUE,n=F){this.origin=e,this.direction=t,this.length=s,this.epsilon=n}clone(){return new ze(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(e,t,s=0){const n=ze._TmpVector3[0].copyFromFloats(e.x-s,e.y-s,e.z-s),r=ze._TmpVector3[1].copyFromFloats(t.x+s,t.y+s,t.z+s);let i,o,a,c,l=0,h=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<n.x||this.origin.x>r.x)return!1}else if(i=1/this.direction.x,o=(n.x-this.origin.x)*i,a=(r.x-this.origin.x)*i,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),h=Math.min(a,h),l>h)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<n.y||this.origin.y>r.y)return!1}else if(i=1/this.direction.y,o=(n.y-this.origin.y)*i,a=(r.y-this.origin.y)*i,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),h=Math.min(a,h),l>h)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<n.z||this.origin.z>r.z)return!1}else if(i=1/this.direction.z,o=(n.z-this.origin.z)*i,a=(r.z-this.origin.z)*i,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),h=Math.min(a,h),l>h)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,n=e.center.y-this.origin.y,r=e.center.z-this.origin.z,i=s*s+n*n+r*r,o=e.radius+t,a=o*o;if(i<=a)return!0;const c=s*this.direction.x+n*this.direction.y+r*this.direction.z;if(c<0)return!1;return i-c*c<=a}intersectsTriangle(e,t,s){const n=ze._TmpVector3[0],r=ze._TmpVector3[1],i=ze._TmpVector3[2],o=ze._TmpVector3[3],a=ze._TmpVector3[4];t.subtractToRef(e,n),s.subtractToRef(e,r),g.CrossToRef(this.direction,r,i);const c=g.Dot(n,i);if(0===c)return null;const l=1/c;this.origin.subtractToRef(e,o);const h=g.Dot(o,i)*l;if(h<-this.epsilon||h>1+this.epsilon)return null;g.CrossToRef(o,n,a);const u=g.Dot(this.direction,a)*l;if(u<-this.epsilon||h+u>1+this.epsilon)return null;const d=g.Dot(r,a)*l;return d>this.length?null:new U(1-h-u,h,d)}intersectsPlane(e){let t;const s=g.Dot(e.normal,this.direction);if(Math.abs(s)<9.99999997475243e-7)return null;{const n=g.Dot(e.normal,this.origin);return t=(-e.d-n)/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,n=!1,r,i=!1){const o=w.Matrix[0];return e.getWorldMatrix().invertToRef(o),this._tmpRay?ze.TransformToRef(this,o,this._tmpRay):this._tmpRay=ze.Transform(this,o),e.intersects(this._tmpRay,t,s,n,r,i)}intersectsMeshes(e,t,s){s?s.length=0:s=[];for(let n=0;n<e.length;n++){const r=this.intersectsMesh(e[n],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 n=this.origin,r=w.Vector3[0],i=w.Vector3[1],o=w.Vector3[2],a=w.Vector3[3];t.subtractToRef(e,r),this.direction.scaleToRef(ze._Rayl,o),n.addToRef(o,i),e.subtractToRef(n,a);const c=g.Dot(r,r),l=g.Dot(r,o),h=g.Dot(o,o),u=g.Dot(r,a),d=g.Dot(o,a),p=c*h-l*l;let _,f,x=p,m=p;p<ze._Smallnum?(_=0,x=1,f=d,m=h):(_=l*d-h*u,f=c*d-l*u,_<0?(_=0,f=d,m=h):_>x&&(_=x,f=d+l,m=h)),f<0?(f=0,-u<0?_=0:-u>c?_=x:(_=-u,x=c)):f>m&&(f=m,-u+l<0?_=0:-u+l>c?_=x:(_=-u+l,x=c));const v=Math.abs(_)<ze._Smallnum?0:_/x,y=Math.abs(f)<ze._Smallnum?0:f/m,T=w.Vector3[4];o.scaleToRef(y,T);const S=w.Vector3[5];r.scaleToRef(v,S),S.addInPlace(a);const C=w.Vector3[6];S.subtractToRef(T,C);return y>0&&y<=this.length&&C.lengthSquared()<s*s?S.length():-1}update(e,t,s,n,r,i,o,a=!1){if(a){ze._RayDistant||(ze._RayDistant=ze.Zero()),ze._RayDistant.unprojectRayToRef(e,t,s,n,y.IdentityReadOnly,i,o);const a=w.Matrix[0];r.invertToRef(a),ze.TransformToRef(ze._RayDistant,a,this)}else this.unprojectRayToRef(e,t,s,n,r,i,o);return this}static Zero(){return new ze(g.Zero(),g.Zero())}static CreateNew(e,t,s,n,r,i,o){return ze.Zero().update(e,t,s,n,r,i,o)}static CreateNewFromTo(e,t,s=y.IdentityReadOnly){const n=new ze(new g(0,0,0),new g(0,0,0));return ze.CreateFromToToRef(e,t,n,s)}static CreateFromToToRef(e,t,s,n=y.IdentityReadOnly){s.origin.copyFrom(e);const r=t.subtractToRef(e,s.direction),i=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return s.length=i,s.direction.normalize(),ze.TransformToRef(s,n,s)}static Transform(e,t){const s=new ze(new g(0,0,0),new g(0,0,0));return ze.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 n=s.direction,r=n.length();if(0!==r&&1!==r){const e=1/r;n.x*=e,n.y*=e,n.z*=e,s.length*=r}return s}unprojectRayToRef(e,t,s,n,r,i,o){const a=w.Matrix[0];r.multiplyToRef(i,a),a.multiplyToRef(o,a),a.invert();const c=k.LastCreatedEngine,l=w.Vector3[0];l.x=e/s*2-1,l.y=-(t/n*2-1),l.z=c?.useReverseDepthBuffer?1:c?.isNDCHalfZRange?0:-1;const h=w.Vector3[1].copyFromFloats(l.x,l.y,1-1e-8),u=w.Vector3[2],d=w.Vector3[3];g._UnprojectFromInvertedMatrixToRef(l,a,u),g._UnprojectFromInvertedMatrixToRef(h,a,d),this.origin.copyFrom(u),d.subtractToRef(u,this.direction),this.direction.normalize()}}function be(e,t,s,n,r,i=!1){const o=ze.Zero();return Me(e,t,s,n,o,r,i),o}function Me(e,t,s,n,r,i,o=!1,a=!1){const c=e.getEngine();if(!i&&!(i=e.activeCamera))return e;const l=i.viewport,h=c.getRenderHeight(),{x:u,y:d,width:p,height:_}=l.toGlobal(c.getRenderWidth(),h),f=1/c.getHardwareScalingLevel();return t=t*f-u,s=s*f-(h-d-_),r.update(t,s,p,_,n||y.IdentityReadOnly,o?y.IdentityReadOnly:i.getViewMatrix(),i.getProjectionMatrix(),a),e}function De(e,t,s,n,r){if(!B)return e;const i=e.getEngine();if(!r&&!(r=e.activeCamera))throw new Error("Active camera not set");const o=r.viewport,a=i.getRenderHeight(),{x:c,y:l,width:h,height:u}=o.toGlobal(i.getRenderWidth(),a),d=y.Identity(),p=1/i.getHardwareScalingLevel();return t=t*p-c,s=s*p-(a-l-u),n.update(t,s,h,u,d,d,r.getProjectionMatrix()),e}function Ie(e,t,s,n,r,i,o,a){const c=t(n,s.enableDistantPicking),l=s.intersects(c,r,o,i,n,a);return l&&l.hit?!r&&null!=e&&l.distance>=e.distance?null:l:null}function Ve(e,t,s,n,r,i){let o=null;const a=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),c=e.cameraToUseForPointers||e.activeCamera,l=Ie;for(let h=0;h<e.meshes.length;h++){const u=e.meshes[h];if(s){if(!s(u,-1))continue}else if(!u.isEnabled()||!u.isVisible||!u.isPickable)continue;const d=a&&u.isWorldMatrixCameraDependent(),p=u.computeWorldMatrix(d,c);if(u.hasThinInstances&&u.thinInstanceEnablePicking){const e=l(o,t,u,p,!0,!0,i);if(e){if(r)return e;const a=w.Matrix[1],c=u.thinInstanceGetWorldMatrices();for(let e=0;e<c.length;e++){if(s&&!s(u,e))continue;c[e].multiplyToRef(p,a);const h=l(o,t,u,a,n,r,i,!0);if(h&&(o=h,o.thinInstanceIndex=e,n))return o}}}else{const e=l(o,t,u,p,n,r,i);if(e&&(o=e,n))return o}}return o||new B}function Fe(e,t,s,n){if(!B)return null;const r=[],i=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),o=e.cameraToUseForPointers||e.activeCamera,a=Ie;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 h=i&&l.isWorldMatrixCameraDependent(),u=l.computeWorldMatrix(h,o);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(a(null,t,l,u,!0,!0,n)){const e=w.Matrix[1],i=l.thinInstanceGetWorldMatrices();for(let o=0;o<i.length;o++){if(s&&!s(l,o))continue;i[o].multiplyToRef(u,e);const c=a(null,t,l,e,!1,!1,n,!0);c&&(c.thinInstanceIndex=o,r.push(c))}}}else{const e=a(null,t,l,u,!1,!1,n);e&&r.push(e)}}return r}function Ue(e,t,s=100,n,r){n||(n=e.getWorldMatrix()),t.length=s,r?t.origin.copyFrom(r):t.origin.copyFrom(e.position);const i=w.Vector3[2];i.set(0,0,e._scene.useRightHandedSystem?-1:1);const o=w.Vector3[3];return g.TransformNormalToRef(i,n,o),g.NormalizeToRef(o,t.direction),t}ze._TmpVector3=V(6,g.Zero),ze._RayDistant=ze.Zero(),ze._Smallnum=1e-8,ze._Rayl=1e9,Se=H,(we=l)&&(we.prototype.getForwardRay=function(e=100,t,s){return Ue(this,new ze(g.Zero(),g.Zero(),e),e,t,s)},we.prototype.getForwardRayToRef=function(e,t=100,s,n){return Ue(this,e,t,s,n)}),Se&&(L._IsPickingAvailable=!0,Se.prototype.createPickingRay=function(e,t,s,n,r=!1){return be(this,e,t,s,n,r)}),H.prototype.createPickingRayToRef=function(e,t,s,n,r,i=!1,o=!1){return Me(this,e,t,s,n,r,i,o)},H.prototype.createPickingRayInCameraSpace=function(e,t,s){return function(e,t,s,n){const r=ze.Zero();return De(e,t,s,r,n),r}(this,e,t,s)},H.prototype.createPickingRayInCameraSpaceToRef=function(e,t,s,n){return De(this,e,t,s,n)},H.prototype.pickWithBoundingInfo=function(e,t,s,n,r){return function(e,t,s,n,r,i){if(!B)return null;const o=Ve(e,(n=>(e._tempPickingRay||(e._tempPickingRay=ze.Zero()),Me(e,t,s,n,e._tempPickingRay,i||null),e._tempPickingRay)),n,r,!0);return o&&(o.ray=be(e,t,s,y.Identity(),i||null)),o}(this,e,t,s,n,r)},H.prototype.pick=function(e,t,s,n,r,i,o=!1){return function(e,t,s,n,r,i,o){const a=Ve(e,((n,r)=>(e._tempPickingRay||(e._tempPickingRay=ze.Zero()),Me(e,t,s,n,e._tempPickingRay,i||null,!1,r),e._tempPickingRay)),n,r,!1,o);return a&&(a.ray=be(e,t,s,y.Identity(),i||null)),a}(this,e,t,s,n,r,i,o)},H.prototype.pickWithRay=function(e,t,s,n){return function(e,t,s,n,r){const i=Ve(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=y.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=ze.Zero()),ze.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,n,!1,r);return i&&(i.ray=t),i}(this,e,t,s,n)},H.prototype.multiPick=function(e,t,s,n,r){return function(e,t,s,n,r,i){return Fe(e,(n=>be(e,t,s,n,r||null)),n,i)}(this,e,t,s,n,r)},H.prototype.multiPickWithRay=function(e,t,s){return function(e,t,s,n){return Fe(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=y.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=ze.Zero()),ze.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,n)}(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 ke{get positions(){return this._positions32}get colors(){return this._colors32}get uvs(){return this._uvs32}constructor(e,t,s,n){this.particles=new Array,this.nbParticles=0,this.counter=0,this.vars={},this._promises=[],this._positions=new Array,this._indices=new Array,this._normals=new Array,this._colors=new Array,this._uvs=new Array,this._updatable=!0,this._isVisibilityBoxLocked=!1,this._alwaysVisible=!1,this._groups=new Array,this._groupCounter=0,this._computeParticleColor=!0,this._computeParticleTexture=!0,this._computeParticleRotation=!0,this._computeBoundingBox=!1,this._isReady=!1,this.name=e,this._size=t,this._scene=s||k.LastCreatedScene,n&&void 0!==n.updatable?this._updatable=n.updatable:this._updatable=!0}buildMeshAsync(e){return Promise.all(this._promises).then((()=>(this._isReady=!0,this._buildMesh(e))))}_buildMesh(e){0===this.nbParticles&&this.addPoints(1),this._positions32=new Float32Array(this._positions),this._uvs32=new Float32Array(this._uvs),this._colors32=new Float32Array(this._colors);const t=new T;t.set(this._positions32,f.PositionKind),this._uvs32.length>0&&t.set(this._uvs32,f.UVKind);let s=0;this._colors32.length>0&&(s=1,t.set(this._colors32,f.ColorKind));const n=new v(this.name,this._scene);t.applyToMesh(n,this._updatable),this.mesh=n,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);let r=e;return r||(r=new K("point cloud material",this._scene),r.emissiveColor=new N(s,s,s),r.disableLighting=!0,r.pointsCloud=!0,r.pointSize=this._size),n.material=r,new Promise((e=>e(n)))}_addParticle(e,t,s,n){const r=new Re(e,t,s,n,this);return this.particles.push(r),r}_randomUnitVector(e){e.position=new g(Math.random(),Math.random(),Math.random()),e.color=new D(1,1,1,1)}_getColorIndicesForCoord(e,t,s,n){const r=e._groupImageData,i=s*(4*n)+4*t,o=[i,i+1,i+2,i+3],a=o[1],c=o[2],l=o[3],h=r[o[0]],u=r[a],d=r[c],p=r[l];return new D(h/255,u/255,d/255,p)}_setPointsColorOrUV(e,t,s,n,r,i,o,a){a=a??0,s&&e.updateFacetData();const c=2*e.getBoundingInfo().boundingSphere.radius;let l=e.getVerticesData(f.PositionKind);const h=e.getIndices(),u=e.getVerticesData(f.UVKind+(a?a+1:"")),d=e.getVerticesData(f.ColorKind),p=g.Zero();e.computeWorldMatrix();const _=e.getWorldMatrix();if(!_.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],_,p),l[3*e]=p.x,l[3*e+1]=p.y,l[3*e+2]=p.z}let x=0,m=0,v=0,y=0,T=0,S=0,w=0,C=0,E=0,P=0,R=0,A=0,z=0;const M=g.Zero(),I=g.Zero(),V=g.Zero(),F=g.Zero(),U=g.Zero();let k=0,B=0,L=0,H=0,W=0,Z=0;const X=b.Zero(),j=b.Zero(),Y=b.Zero(),K=b.Zero(),q=b.Zero();let Q=0,J=0,$=0,ee=0,te=0,se=0,ne=0,re=0,ie=0,oe=0,ae=0,ce=0;const le=G.Zero(),he=G.Zero(),ue=G.Zero(),de=G.Zero(),pe=G.Zero();let _e,fe,xe=0,me=0;o=o||0;let ve=new G(0,0,0,0),ye=g.Zero(),ge=g.Zero(),Te=g.Zero(),Se=0,we=g.Zero(),Ce=0,Ee=0;const Pe=new ze(g.Zero(),new g(1,0,0));let Re,Ae=g.Zero();for(let a=0;a<h.length/3;a++){let p,_,f,b,G,ze,be,Me;m=h[3*a],v=h[3*a+1],y=h[3*a+2],T=l[3*m],S=l[3*m+1],w=l[3*m+2],C=l[3*v],E=l[3*v+1],P=l[3*v+2],R=l[3*y],A=l[3*y+1],z=l[3*y+2],M.set(T,S,w),I.set(C,E,P),V.set(R,A,z),I.subtractToRef(M,F),V.subtractToRef(I,U),u&&(k=u[2*m],B=u[2*m+1],L=u[2*v],H=u[2*v+1],W=u[2*y],Z=u[2*y+1],X.set(k,B),j.set(L,H),Y.set(W,Z),j.subtractToRef(X,K),Y.subtractToRef(j,q)),d&&n&&(Q=d[4*m],J=d[4*m+1],$=d[4*m+2],ee=d[4*m+3],te=d[4*v],se=d[4*v+1],ne=d[4*v+2],re=d[4*v+3],ie=d[4*y],oe=d[4*y+1],ae=d[4*y+2],ce=d[4*y+3],le.set(Q,J,$,ee),he.set(te,se,ne,re),ue.set(ie,oe,ae,ce),he.subtractToRef(le,de),ue.subtractToRef(he,pe));const De=new N(0,0,0),Ie=new N(0,0,0);let Ve,Fe;for(let l=0;l<t._groupDensity[a];l++)x=this.particles.length,this._addParticle(x,t,this._groupCounter,a+l),Fe=this.particles[x],xe=Math.sqrt(O(0,1)),me=O(0,1),_e=M.add(F.scale(xe)).add(U.scale(xe*me)),s&&(ye=e.getFacetNormal(a).normalize().scale(-1),ge=F.clone().normalize(),Te=g.Cross(ye,ge),Se=O(0,2*Math.PI),we=ge.scale(Math.cos(Se)).add(Te.scale(Math.sin(Se))),Se=O(.1,Math.PI/2),Ae=we.scale(Math.cos(Se)).add(ye.scale(Math.sin(Se))),Pe.origin=_e.add(Ae.scale(1e-5)),Pe.direction=Ae,Pe.length=c,Re=Pe.intersectsMesh(e),Re.hit&&(Ee=Re.pickedPoint.subtract(_e).length(),Ce=O(0,1)*Ee,_e.addInPlace(Ae.scale(Ce)))),Fe.position=_e.clone(),this._positions.push(Fe.position.x,Fe.position.y,Fe.position.z),void 0!==n?u&&(fe=X.add(K.scale(xe)).add(q.scale(xe*me)),n?r&&null!==t._groupImageData?(p=t._groupImgWidth,_=t._groupImgHeight,Ve=this._getColorIndicesForCoord(t,Math.round(fe.x*p),Math.round(fe.y*_),p),Fe.color=Ve,this._colors.push(Ve.r,Ve.g,Ve.b,Ve.a)):d?(ve=le.add(de.scale(xe)).add(pe.scale(xe*me)),Fe.color=new D(ve.x,ve.y,ve.z,ve.w),this._colors.push(ve.x,ve.y,ve.z,ve.w)):(ve=le.set(Math.random(),Math.random(),Math.random(),1),Fe.color=new D(ve.x,ve.y,ve.z,ve.w),this._colors.push(ve.x,ve.y,ve.z,ve.w)):(Fe.uv=fe.clone(),this._uvs.push(Fe.uv.x,Fe.uv.y))):(i?(De.set(i.r,i.g,i.b),f=O(-o,o),b=O(-o,o),Me=De.toHSV(),G=Me.r,ze=Me.g+f,be=Me.b+b,ze<0&&(ze=0),ze>1&&(ze=1),be<0&&(be=0),be>1&&(be=1),N.HSVtoRGBToRef(G,ze,be,Ie),ve.set(Ie.r,Ie.g,Ie.b,1)):ve=le.set(Math.random(),Math.random(),Math.random(),1),Fe.color=new D(ve.x,ve.y,ve.z,ve.w),this._colors.push(ve.x,ve.y,ve.z,ve.w))}}_colorFromTexture(e,t,s){if(null===e.material)return C.Warn(e.name+"has no material."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const n=e.material.getActiveTextures();if(0===n.length)return C.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=>{W.WhenAllReady(n,(()=>{let i=t._textureNb;i<0&&(i=0),i>n.length-1&&(i=n.length-1);const o=()=>{t._groupImgWidth=n[i].getSize().width,t._groupImgHeight=n[i].getSize().height,this._setPointsColorOrUV(r,t,s,!0,!0,void 0,void 0,n[i].coordinatesIndex),r.dispose(),e()};t._groupImageData=null;const a=n[i].readPixels();a?a.then((e=>{t._groupImageData=e,o()})):o()}))})))}_calculateDensity(e,t,s){let n,r,i,o,a,c,l,h,u,d,p,_;const f=g.Zero(),x=g.Zero(),m=g.Zero(),v=g.Zero(),y=g.Zero(),T=g.Zero();let S;const w=[];let C=0;const E=s.length/3;for(let e=0;e<E;e++)n=s[3*e],r=s[3*e+1],i=s[3*e+2],o=t[3*n],a=t[3*n+1],c=t[3*n+2],l=t[3*r],h=t[3*r+1],u=t[3*r+2],d=t[3*i],p=t[3*i+1],_=t[3*i+2],f.set(o,a,c),x.set(l,h,u),m.set(d,p,_),x.subtractToRef(f,v),m.subtractToRef(x,y),g.CrossToRef(v,y,T),S=.5*T.length(),C+=S,w[e]=C;const P=new Array(E);let R=e;for(let e=E-1;e>0;e--){const t=w[e];if(0===t)P[e]=0;else{const s=(t-w[e-1])/t*R,n=Math.floor(s),r=s-n,i=n+Number(Math.random()<r);P[e]=i,R-=i}}return P[0]=R,P}addPoints(e,t=this._randomUnitVector){const s=new Ae(this._groupCounter,t);let n,r=this.nbParticles;for(let t=0;t<e;t++)n=this._addParticle(r,s,this._groupCounter,t),s&&s._positionFunction&&s._positionFunction(n,r,t),this._positions.push(n.position.x,n.position.y,n.position.z),n.color&&this._colors.push(n.color.r,n.color.g,n.color.b,n.color.a),n.uv&&this._uvs.push(n.uv.x,n.uv.y),r++;return this.nbParticles+=e,this._groupCounter++,this._groupCounter}addSurfacePoints(e,t,s,n,r){let i=s||0;(isNaN(i)||i<0||i>3)&&(i=0);const o=e.getVerticesData(f.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new Ae(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===i?c._textureNb=n||0:n=n||new D(1,1,1,1),i){case 2:this._colorFromTexture(e,c,!1);break;case 1:this._setPointsColorOrUV(e,c,!1,!1,!1);break;case 0:this._setPointsColorOrUV(e,c,!1);break;case 3:this._setPointsColorOrUV(e,c,!1,void 0,void 0,n,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}addVolumePoints(e,t,s,n,r){let i=s||0;(isNaN(i)||i<0||i>3)&&(i=0);const o=e.getVerticesData(f.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new Ae(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===i?c._textureNb=n||0:n=n||new D(1,1,1,1),i){case 2:this._colorFromTexture(e,c,!0);break;case 1:this._setPointsColorOrUV(e,c,!0,!1,!1);break;case 0:this._setPointsColorOrUV(e,c,!0);break;case 3:this._setPointsColorOrUV(e,c,!0,void 0,void 0,n,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}setParticles(e=0,t=this.nbParticles-1,s=!0){if(!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(e,t,s);const n=w.Matrix[0],r=this.mesh,i=this._colors32,o=this._positions32,a=this._uvs32,c=w.Vector3,l=c[5].copyFromFloats(1,0,0),h=c[6].copyFromFloats(0,1,0),u=c[7].copyFromFloats(0,0,1),d=c[8].setAll(Number.MAX_VALUE),p=c[9].setAll(-Number.MAX_VALUE);y.IdentityToRef(n);let _=0;if(this.mesh?.isFacetDataEnabled&&(this._computeBoundingBox=!0),t=t>=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0!=e||t!=this.nbParticles-1)){const e=this.mesh?.getBoundingInfo();e&&(d.copyFrom(e.minimum),p.copyFrom(e.maximum))}_=0;let x=0,m=0,v=0;for(let s=e;s<=t;s++){const e=this.particles[s];_=e.idx,x=3*_,m=4*_,v=2*_,this.updateParticle(e);const t=e._rotationMatrix,r=e.position,i=e._globalPosition;this._computeParticleRotation&&e.getRotationMatrix(n);if(null!==e.parentId){const s=this.particles[e.parentId],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],h=r.x*o[2]+r.y*o[5]+r.z*o[8];if(i.x=a.x+l,i.y=a.y+c,i.z=a.z+h,this._computeParticleRotation){const e=n.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(i.x=0,i.y=0,i.z=0,this._computeParticleRotation){const e=n.m;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10]}const a=c[11];e.translateFromPivot?a.setAll(0):a.copyFrom(e.pivot);const f=c[0];f.copyFrom(e.position);const y=f.x-e.pivot.x,g=f.y-e.pivot.y,T=f.z-e.pivot.z;let S=y*t[0]+g*t[3]+T*t[6],w=y*t[1]+g*t[4]+T*t[7],C=y*t[2]+g*t[5]+T*t[8];S+=a.x,w+=a.y,C+=a.z;const E=o[x]=i.x+l.x*S+h.x*w+u.x*C,P=o[x+1]=i.y+l.y*S+h.y*w+u.y*C,R=o[x+2]=i.z+l.z*S+h.z*w+u.z*C;if(this._computeBoundingBox&&(d.minimizeInPlaceFromFloats(E,P,R),p.maximizeInPlaceFromFloats(E,P,R)),this._computeParticleColor&&e.color){const t=e.color,s=this._colors32;s[m]=t.r,s[m+1]=t.g,s[m+2]=t.b,s[m+3]=t.a}if(this._computeParticleTexture&&e.uv){const t=e.uv,s=this._uvs32;s[v]=t.x,s[v+1]=t.y}}return r&&(s&&(this._computeParticleColor&&r.updateVerticesData(f.ColorKind,i,!1,!1),this._computeParticleTexture&&r.updateVerticesData(f.UVKind,a,!1,!1),r.updateVerticesData(f.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){}}!function(e){e[e.Splat=0]="Splat",e[e.PointCloud=1]="PointCloud",e[e.Mesh=2]="Mesh",e[e.Reject=3]="Reject"}(Ee||(Ee={}));class Be{constructor(e=Be._DefaultLoadingOptions){this.name=Z.name,this._assetContainer=null,this.extensions=Z.extensions,this._loadingOptions=e}createPlugin(e){return new Be(e[Z.name])}async importMeshAsync(e,t,s,n,r,i){return this._parse(e,t,s,n).then((e=>({meshes:e,particleSystems:[],skeletons:[],animationGroups:[],transformNodes:[],geometries:[],lights:[],spriteManagers:[]})))}static _BuildPointCloud(e,t){if(!t.byteLength)return!1;const s=new Uint8Array(t),n=new Float32Array(t),r=s.length/32;return e.addPoints(r,(function(e,t){const r=n[8*t+0],i=n[8*t+1],o=n[8*t+2];e.position=new g(r,i,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 D(a,c,l,1)})),!0}static _BuildMesh(e,t){const s=new v("PLYMesh",e),n=new Uint8Array(t.data),r=new Float32Array(t.data),i=n.length/32,o=[],a=new T;for(let e=0;e<i;e++){const t=r[8*e+0],s=r[8*e+1],n=r[8*e+2];o.push(t,s,n)}if(t.hasVertexColors){const e=new Float32Array(4*i);for(let t=0;t<i;t++){const s=n[32*t+24+0]/255,r=n[32*t+24+1]/255,i=n[32*t+24+2]/255;e[4*t+0]=s,e[4*t+1]=r,e[4*t+2]=i,e[4*t+3]=1}a.colors=e}return a.positions=o,a.indices=t.faces,a.applyToMesh(s),s}_parseSPZ(e,t){const s=new Uint8Array(e),n=new Uint32Array(e),r=n[2],i=s[12],o=s[13];if(s[15]||1347635022!=n[0]||2!=n[1])return new Promise((e=>{e({mode:3,data:a,hasVertexColors:!1})}));const a=new ArrayBuffer(32*r),c=1/(1<<o),l=new Int32Array(1),h=new Uint8Array(l.buffer),u=function(e,t){return h[0]=e[t+0],h[1]=e[t+1],h[2]=e[t+2],h[3]=128&e[t+2]?255:0,l[0]*c};let d=16;const p=new Float32Array(a),_=new Float32Array(a),f=new Uint8ClampedArray(a),x=new Uint8ClampedArray(a);for(let e=0;e<r;e++)p[8*e+0]=u(s,d+0),p[8*e+1]=-u(s,d+3),p[8*e+2]=u(s,d+6),d+=9;for(let e=0;e<r;e++)f[32*e+24+0]=s[d+r+3*e+0],f[32*e+24+1]=s[d+r+3*e+1],f[32*e+24+2]=s[d+r+3*e+2],f[32*e+24+3]=s[d+e];d+=4*r;for(let e=0;e<r;e++)_[8*e+3+0]=Math.exp(s[d+0]/16-10),_[8*e+3+1]=Math.exp(s[d+1]/16-10),_[8*e+3+2]=Math.exp(s[d+2]/16-10),d+=3;for(let e=0;e<r;e++){const t=s[d+0],n=s[d+1],r=s[d+2],i=t/127.5-1,o=n/127.5-1,a=r/127.5-1;x[32*e+28+1]=t,x[32*e+28+2]=n,x[32*e+28+3]=r,x[32*e+28+0]=127.5*(1-Math.sqrt(i*i+o*o+a*a))+127.5,d+=3}if(i){const e=3*((i+1)*(i+1)-1),n=Math.ceil(e/16);let o=d;const c=[],l=t.getEngine().getCaps().maxTextureSize,h=Math.ceil(r/l);for(let e=0;e<n;e++){const e=new Uint8Array(h*l*4*4);c.push(e)}for(let t=0;t<r;t++)for(let n=0;n<e;n++){const e=s[o++],r=Math.floor(n/16);c[r][n%16+16*t]=e}return new Promise((e=>{e({mode:0,data:a,hasVertexColors:!1,sh:c})}))}return new Promise((e=>{e({mode:0,data:a,hasVertexColors:!1})}))}_parse(e,t,s,n){const r=[],i=new ReadableStream({start(e){e.enqueue(new Uint8Array(s)),e.close()}}),o=new DecompressionStream("gzip"),a=i.pipeThrough(o);return new Promise((e=>{new Response(a).arrayBuffer().then((s=>{this._parseSPZ(s,t).then((e=>{const s=new Pe("GaussianSplatting",null,t,this._loadingOptions.keepInRam);s._parentContainer=this._assetContainer,r.push(s),s.updateData(e.data,e.sh)})),e(r)})).catch((()=>{Be._ConvertPLYToSplat(s).then((async e=>{switch(e.mode){case 0:{const s=new Pe("GaussianSplatting",null,t,this._loadingOptions.keepInRam);s._parentContainer=this._assetContainer,r.push(s),s.updateData(e.data)}break;case 1:{const s=new ke("PointCloud",1,t);Be._BuildPointCloud(s,e.data)?await s.buildMeshAsync().then((e=>{r.push(e)})):s.dispose()}break;case 2:if(!e.faces)throw new Error("PLY mesh doesn't contain face informations.");r.push(Be._BuildMesh(t,e));break;default:throw new Error("Unsupported Splat mode")}})),e(r)}))}))}loadAssetContainerAsync(e,t,s){const n=new Y(e);return this._assetContainer=n,this.importMeshAsync(null,e,t,s).then((e=>(e.meshes.forEach((e=>n.meshes.push(e))),this._assetContainer=null,n))).catch((e=>{throw this._assetContainer=null,e}))}loadAsync(e,t,s){return this.importMeshAsync(null,e,t,s).then((()=>{}))}static _ConvertPLYToSplat(e){const t=new Uint8Array(e),s=(new TextDecoder).decode(t.slice(0,10240)),n="end_header\n",r=s.indexOf(n);if(r<0||!s)return new Promise((t=>{t({mode:0,data:e})}));const i=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element face (\d+)\n/.exec(s);let a=0;o&&(a=parseInt(o[1]));const c=/element chunk (\d+)\n/.exec(s);let l=0;c&&(l=parseInt(c[1]));let h=0,u=0;const d={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let p;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(p||(p={}));let _=1;const f=[],x=s.slice(0,r).split("\n");for(const e of x)if(e.startsWith("property ")){const[,t,s]=e.split(" ");1==_?u+=d[t]:0==_&&(f.push({name:s,type:t,offset:h}),h+=d[t]),d[t]||C.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?_=1:"vertex"==t&&(_=0)}const m=h,v=u;return Pe.ConvertPLYToSplatAsync(e).then((t=>{const s=new DataView(e,r+11);let n=v*l+m*i;const o=[];if(a)for(let e=0;e<a;e++){const e=s.getUint8(n);if(3==e){n+=1;for(let t=0;t<e;t++){const e=s.getUint32(n+4*(2-t),!0);o.push(e)}n+=12}}if(l)return new Promise((e=>{e({mode:0,data:t,faces:o,hasVertexColors:!1})}));let c=0,h=0;const u=["x","y","z","scale_0","scale_1","scale_2","opacity","rot_0","rot_1","rot_2","rot_3"],d=["red","green","blue","f_dc_0","f_dc_1","f_dc_2"];for(let e=0;e<f.length;e++){const t=f[e];u.includes(t.name)&&c++,d.includes(t.name)&&h++}const p=c==u.length&&3==h,_=a?2:p?0:1;return new Promise((e=>{e({mode:_,data:t,faces:o,hasVertexColors:!!h})}))}))}}Be._DefaultLoadingOptions={keepInRam:!1},X(new Be);export{Be as SPLATFileLoader};
|
|
2
|
+
//# sourceMappingURL=splatFileLoader-Bg4G8Ae2.esm.min.js.map
|