@babylonjs/viewer 7.35.2 → 7.36.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-C-0rlXT1.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-C-0rlXT1.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-Dj8Ni3d2.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-Dj8Ni3d2.esm.min.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-B1CyJu24.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-B1CyJu24.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-C8G_7QGm.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-C8G_7QGm.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-BWmdyggL.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-BWmdyggL.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-JpCGOf0s.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-JpCGOf0s.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-BnIzEc8i.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-BnIzEc8i.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-DPh64CjM.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-DPh64CjM.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-CFO4xL5G.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-CFO4xL5G.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-HqfTVHCZ.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-HqfTVHCZ.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-D97FCDjt.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-D97FCDjt.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-DdDksSpx.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-DdDksSpx.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-BnDSBRgr.esm.js +343 -0
- package/dist/chunks/KHR_animation_pointer-BnDSBRgr.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-CMxD_86V.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-CMxD_86V.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-BMkcU19_.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-BMkcU19_.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-UAhzd3VK.esm.js +617 -0
- package/dist/chunks/KHR_draco_mesh_compression-UAhzd3VK.esm.js.map +1 -0
- package/dist/chunks/KHR_interactivity-BpeQ8Qyu.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-BpeQ8Qyu.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-DXk_MDm7.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-DXk_MDm7.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-BPa3ZY-J.esm.js +1253 -0
- package/dist/chunks/KHR_lights_punctual-BPa3ZY-J.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-D-OD_BpZ.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-D-OD_BpZ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-BgE9FbOB.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-BgE9FbOB.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-DIPUTTRC.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-DIPUTTRC.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-BGx2Shdx.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-BGx2Shdx.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-Bn5CfrnP.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-Bn5CfrnP.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DPNdPWGd.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DPNdPWGd.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-izEv0SNd.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-izEv0SNd.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-Bq7K1HEQ.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-Bq7K1HEQ.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-DBWPH2hJ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-DBWPH2hJ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-6UcflbjA.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-6UcflbjA.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-CjYGiLcM.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-CjYGiLcM.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-BAHeVsuR.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-BAHeVsuR.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-CIju_urb.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-CIju_urb.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-9pWJBDfo.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-9pWJBDfo.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-BsLlyCTa.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-BsLlyCTa.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D8cATbuT.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D8cATbuT.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-OsmoCB7F.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-OsmoCB7F.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-BO1HQtbx.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-BO1HQtbx.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-Dg8CsPJs.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-Dg8CsPJs.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-CTzLPv_Y.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-CTzLPv_Y.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-yqxYY23C.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-yqxYY23C.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-Cw-bawr9.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-Cw-bawr9.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-Drj_fyXz.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-Drj_fyXz.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-CTHSnSN1.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-CTHSnSN1.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-DW3Q3hX2.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-DW3Q3hX2.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-9HpnP8WG.esm.js +238 -0
- package/dist/chunks/KHR_materials_variants-9HpnP8WG.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-DrT2UCZI.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-DrT2UCZI.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-BTAz8V1X.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-BTAz8V1X.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-RWsAj4F0.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-RWsAj4F0.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-D9jnG818.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-D9jnG818.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-aISRxDNK.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-aISRxDNK.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-BkNPNj5W.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-BkNPNj5W.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-DC-3D7A5.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-DC-3D7A5.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-B89JJbVs.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-B89JJbVs.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-D7ujO9Rh.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-D7ujO9Rh.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-ClHuzCMo.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-ClHuzCMo.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-wJ7lDLeD.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-wJ7lDLeD.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-BD6LnsUs.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-BD6LnsUs.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-CGzvQSvZ.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-CGzvQSvZ.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-BwAwNx3E.esm.js +2207 -0
- package/dist/chunks/MSFT_audio_emitter-BwAwNx3E.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-CgEIerLr.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-CgEIerLr.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_lod-D3GfTrFY.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-D3GfTrFY.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_lod-IQnE7Mms.esm.js +337 -0
- package/dist/chunks/MSFT_lod-IQnE7Mms.esm.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-DTVxMcRf.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-DTVxMcRf.esm.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-MdQ3Mfp_.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-MdQ3Mfp_.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-Bi_jHmjQ.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-Bi_jHmjQ.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-CeKsISP1.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-CeKsISP1.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-BEk4nnn0.esm.js +2482 -0
- package/dist/chunks/animationGroup-BEk4nnn0.esm.js.map +1 -0
- package/dist/chunks/animationGroup-DVkE7Jrp.esm.min.js +2 -0
- package/dist/chunks/animationGroup-DVkE7Jrp.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-811yrzpt.esm.min.js +2 -0
- package/dist/chunks/assetContainer-811yrzpt.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-Ch1I3rtz.esm.js +1720 -0
- package/dist/chunks/assetContainer-Ch1I3rtz.esm.js.map +1 -0
- package/dist/chunks/audioEngine-D7yvul_r.esm.js +305 -0
- package/dist/chunks/audioEngine-D7yvul_r.esm.js.map +1 -0
- package/dist/chunks/audioEngine-k_PWuCZZ.esm.min.js +2 -0
- package/dist/chunks/audioEngine-k_PWuCZZ.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-BmbcHNy2.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-BmbcHNy2.esm.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-BxxWsZd7.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-BxxWsZd7.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-CDOgoy6w.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-CDOgoy6w.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-D-3r2N4B.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-D-3r2N4B.esm.js.map +1 -0
- package/dist/chunks/dds-CuDk7jqp.esm.js +540 -0
- package/dist/chunks/dds-CuDk7jqp.esm.js.map +1 -0
- package/dist/chunks/dds-DotY7dzZ.esm.min.js +2 -0
- package/dist/chunks/dds-DotY7dzZ.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-CEvKdiZN.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-CEvKdiZN.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-DUU2aCSx.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-DUU2aCSx.esm.js.map +1 -0
- package/dist/chunks/decalFragment-DorRSt43.esm.min.js +2 -0
- package/dist/chunks/decalFragment-DorRSt43.esm.min.js.map +1 -0
- package/dist/chunks/decalFragment-usYEbFd1.esm.js +18 -0
- package/dist/chunks/decalFragment-usYEbFd1.esm.js.map +1 -0
- package/dist/chunks/default.fragment-B65JKmK4.esm.js +433 -0
- package/dist/chunks/default.fragment-B65JKmK4.esm.js.map +1 -0
- package/dist/chunks/default.fragment-DMzaV-1D.esm.min.js +2 -0
- package/dist/chunks/default.fragment-DMzaV-1D.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-DX272W_1.esm.js +497 -0
- package/dist/chunks/default.fragment-DX272W_1.esm.js.map +1 -0
- package/dist/chunks/default.fragment-cFVjQ581.esm.min.js +2 -0
- package/dist/chunks/default.fragment-cFVjQ581.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-ChbO_NCo.esm.js +201 -0
- package/dist/chunks/default.vertex-ChbO_NCo.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CkX_3SHr.esm.min.js +2 -0
- package/dist/chunks/default.vertex-CkX_3SHr.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-F26iVD0U.esm.js +181 -0
- package/dist/chunks/default.vertex-F26iVD0U.esm.js.map +1 -0
- package/dist/chunks/default.vertex-Fvu87y_k.esm.min.js +2 -0
- package/dist/chunks/default.vertex-Fvu87y_k.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-BwkC1FU3.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-BwkC1FU3.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DF-55m45.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-DF-55m45.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-O2A-FLl7.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-O2A-FLl7.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-zED0FOi4.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-zED0FOi4.esm.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-BwNX1ze6.esm.js +200 -0
- package/dist/chunks/dumpTools-BwNX1ze6.esm.js.map +1 -0
- package/dist/chunks/dumpTools-C8tIU8Vg.esm.min.js +2 -0
- package/dist/chunks/dumpTools-C8tIU8Vg.esm.min.js.map +1 -0
- package/dist/chunks/engine-B5sg74E3.esm.min.js +2 -0
- package/dist/chunks/engine-B5sg74E3.esm.min.js.map +1 -0
- package/dist/chunks/engine-CP65EHPg.esm.js +2204 -0
- package/dist/chunks/engine-CP65EHPg.esm.js.map +1 -0
- package/dist/chunks/engine.common-BBoGnUNC.esm.js +1162 -0
- package/dist/chunks/engine.common-BBoGnUNC.esm.js.map +1 -0
- package/dist/chunks/engine.common-BkbsTiHo.esm.min.js +2 -0
- package/dist/chunks/engine.common-BkbsTiHo.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-B70arAfI.esm.js +64 -0
- package/dist/chunks/envTextureLoader-B70arAfI.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-DHhqK6FO.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-DHhqK6FO.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-CGf47VK6.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-CGf47VK6.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-DdP3pU1V.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-DdP3pU1V.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-DHHr9kIC.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-DHHr9kIC.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-DUNRHpVI.esm.js +1682 -0
- package/dist/chunks/exrTextureLoader-DUNRHpVI.esm.js.map +1 -0
- package/dist/chunks/fogFragment-4XIiPNqC.esm.js +102 -0
- package/dist/chunks/fogFragment-4XIiPNqC.esm.js.map +1 -0
- package/dist/chunks/fogFragment-BH3nRhkR.esm.min.js +2 -0
- package/dist/chunks/fogFragment-BH3nRhkR.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-C86N7vRk.esm.min.js +2 -0
- package/dist/chunks/fogFragment-C86N7vRk.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-yxsCDlJx.esm.js +101 -0
- package/dist/chunks/fogFragment-yxsCDlJx.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-Bmm-eSsR.esm.js +12 -0
- package/dist/chunks/fresnelFunction-Bmm-eSsR.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-C6cm-reF.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-C6cm-reF.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-8YeGkftV.esm.js +7606 -0
- package/dist/chunks/glTFLoader-8YeGkftV.esm.js.map +1 -0
- package/dist/chunks/glTFLoader-DwAY5NAM.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-DwAY5NAM.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-BQZg3uE2.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-BQZg3uE2.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-CRdyA_ho.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-CRdyA_ho.esm.min.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-BDWc7ugP.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-BDWc7ugP.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-D1m1tCiL.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-D1m1tCiL.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-DY83TD5F.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-DY83TD5F.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-RB1caKsW.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-RB1caKsW.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-BA2YCEkF.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-BA2YCEkF.esm.min.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-BGoJncnK.esm.js +252 -0
- package/dist/chunks/hdrTextureLoader-BGoJncnK.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-B66YuDfO.esm.js +80 -0
- package/dist/chunks/helperFunctions-B66YuDfO.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-Bkbn03Eq.esm.js +108 -0
- package/dist/chunks/helperFunctions-Bkbn03Eq.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-DpJHAvub.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-DpJHAvub.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-Q_6RS1S2.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-Q_6RS1S2.esm.min.js.map +1 -0
- package/dist/chunks/index-B0XiE1FO.esm.js +74245 -0
- package/dist/chunks/index-B0XiE1FO.esm.js.map +1 -0
- package/dist/chunks/index-CMQ6hCSC.esm.min.js +57 -0
- package/dist/chunks/index-CMQ6hCSC.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-BUiE1iIn.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-BUiE1iIn.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-C2AIdCgA.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-C2AIdCgA.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-B5YDWGct.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-B5YDWGct.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-D6gM7_OR.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-D6gM7_OR.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-D7JeZYJs.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-D7JeZYJs.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-DcJYXBc-.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-DcJYXBc-.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-B--nEH5h.esm.js +77 -0
- package/dist/chunks/logDepthVertex-B--nEH5h.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-Bo9jtAiU.esm.js +77 -0
- package/dist/chunks/logDepthVertex-Bo9jtAiU.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-BuwnrjGN.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-BuwnrjGN.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-C7D6zwqe.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-C7D6zwqe.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-Bu2PCs0u.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-Bu2PCs0u.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CQtdE5nF.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-CQtdE5nF.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CkZTmKth.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-CkZTmKth.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-DjByoT5m.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-DjByoT5m.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-CNRdvK6C.esm.js +24 -0
- package/dist/chunks/meshUboDeclaration-CNRdvK6C.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-CfdypbbP.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-CfdypbbP.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-CTIziUgW.esm.js +1338 -0
- package/dist/chunks/objFileLoader-CTIziUgW.esm.js.map +1 -0
- package/dist/chunks/objFileLoader-Dti6yw2W.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-Dti6yw2W.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-B31nZLKF.esm.min.js +2 -0
- package/dist/chunks/oitFragment-B31nZLKF.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-BaR7MXfg.esm.js +1210 -0
- package/dist/chunks/oitFragment-BaR7MXfg.esm.js.map +1 -0
- package/dist/chunks/oitFragment-DTo1Zewh.esm.min.js +2 -0
- package/dist/chunks/oitFragment-DTo1Zewh.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-Dlmtl4rw.esm.js +1051 -0
- package/dist/chunks/oitFragment-Dlmtl4rw.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-CEtxUJdg.esm.js +15 -0
- package/dist/chunks/pass.fragment-CEtxUJdg.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-C_F6Emgn.esm.js +15 -0
- package/dist/chunks/pass.fragment-C_F6Emgn.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-D6J2ZaiP.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-D6J2ZaiP.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-Dq1Ebjt-.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-Dq1Ebjt-.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-7pZbGH4j.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-7pZbGH4j.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-Bjyf9L5u.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-Bjyf9L5u.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-D96q_d7U.esm.js +3218 -0
- package/dist/chunks/pbr.fragment-D96q_d7U.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-DwiLmRps.esm.js +3165 -0
- package/dist/chunks/pbr.fragment-DwiLmRps.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-CaKC7ZQw.esm.js +214 -0
- package/dist/chunks/pbr.vertex-CaKC7ZQw.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-D6L1V4oA.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-D6L1V4oA.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-NQJFxwsz.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-NQJFxwsz.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-zl-bgV9W.esm.js +338 -0
- package/dist/chunks/pbr.vertex-zl-bgV9W.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-BGTUGDnQ.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-BGTUGDnQ.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-C-zpaK3h.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-C-zpaK3h.esm.js.map +1 -0
- package/dist/chunks/rawTexture-BbbDtwVR.esm.min.js +2 -0
- package/dist/chunks/rawTexture-BbbDtwVR.esm.min.js.map +1 -0
- package/dist/chunks/rawTexture-C5rmF9gb.esm.js +191 -0
- package/dist/chunks/rawTexture-C5rmF9gb.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CakmvodV.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-CakmvodV.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CvYKqu39.esm.js +17 -0
- package/dist/chunks/rgbdDecode.fragment-CvYKqu39.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DFkxPpRA.esm.js +17 -0
- package/dist/chunks/rgbdDecode.fragment-DFkxPpRA.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-YdIHAz7H.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-YdIHAz7H.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-C0fTyPK2.esm.js +17 -0
- package/dist/chunks/rgbdEncode.fragment-C0fTyPK2.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-CH0DT_u7.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-CH0DT_u7.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-DFMrcC9e.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-DFMrcC9e.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-xiVfo40O.esm.js +17 -0
- package/dist/chunks/rgbdEncode.fragment-xiVfo40O.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-BxCBgUIf.esm.js +3947 -0
- package/dist/chunks/splatFileLoader-BxCBgUIf.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-zwiLbtie.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-zwiLbtie.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-CzgWV2aN.esm.js +1805 -0
- package/dist/chunks/standardMaterial-CzgWV2aN.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-DjwIHmDD.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-DjwIHmDD.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-BZ9DHTQ6.esm.js +238 -0
- package/dist/chunks/stlFileLoader-BZ9DHTQ6.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-Dc-CVC8a.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-Dc-CVC8a.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-DYjWiRyu.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-DYjWiRyu.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-x7GxoHtb.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-x7GxoHtb.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-5Pa6QbP6.esm.min.js +2 -0
- package/dist/chunks/thinEngine-5Pa6QbP6.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-B0O1HeNw.esm.js +3812 -0
- package/dist/chunks/thinEngine-B0O1HeNw.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-BU_q_IZy.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-BU_q_IZy.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-GmIu2FgY.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-GmIu2FgY.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-BI7UZNV0.esm.js +522 -0
- package/dist/chunks/vertexColorMixing-BI7UZNV0.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-CDHo-Mfr.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-CDHo-Mfr.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-D0neNeA0.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-D0neNeA0.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DwnB7bJ5.esm.js +412 -0
- package/dist/chunks/vertexColorMixing-DwnB7bJ5.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-Bp2hPOvC.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-Bp2hPOvC.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-D3OXJ2yl.esm.js +11502 -0
- package/dist/chunks/webgpuEngine-D3OXJ2yl.esm.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 +534 -0
- package/lib/index.js +1939 -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 i,K as r,N as n,Q as o,W as a,X as c,Y as l,Z as u,_ as h,$ as d,a0 as p,a1 as _,V as m,a2 as f,a3 as x,M as g,a4 as v,v as y,x as T,a5 as w,a6 as P,L as A,a7 as C,T as b,a8 as S,C as M,a9 as R,u as I,aa as D,m as E,ab as V,ac as z,ad as F,ae as k,E as B,af as U,ag as L,ah as N,s as O,ai as W,aj as Z,B as G,ak as X,y as j}from"./index-CMQ6hCSC.esm.min.js";import"./fogFragment-BH3nRhkR.esm.min.js";import"./logDepthDeclaration-D6gM7_OR.esm.min.js";import"./logDepthVertex-BuwnrjGN.esm.min.js";import"./fogFragment-C86N7vRk.esm.min.js";import"./logDepthDeclaration-DcJYXBc-.esm.min.js";import"./meshUboDeclaration-CfdypbbP.esm.min.js";import"./logDepthVertex-C7D6zwqe.esm.min.js";import{R as Y}from"./rawTexture-BbbDtwVR.esm.min.js";import"./thinInstanceMesh-BU_q_IZy.esm.min.js";import{A as H}from"./assetContainer-811yrzpt.esm.min.js";import{S as K}from"./standardMaterial-DjwIHmDD.esm.min.js";e.IncludesShadersStore.gaussianSplattingFragmentDeclaration="vec4 gaussianColor(vec4 inColor)\n{float A=-dot(vPosition,vPosition);if (A<-4.0) discard;float B=exp(A)*inColor.a;\n#include<logDepthFragment>\nvec3 color=inColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\nreturn vec4(color,B);}\n";const q="gaussianSplattingPixelShader",Q="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplattingFragmentDeclaration>\nvoid main () { \n#include<clipPlaneFragment>\ngl_FragColor=gaussianColor(vColor);}\n";e.ShadersStore[q]=Q;const J={name:q,shader:Q};var $=Object.freeze({__proto__:null,gaussianSplattingPixelShader:J});e.IncludesShadersStore.gaussianSplattingVertexDeclaration="attribute vec2 position;uniform mat4 view;uniform mat4 projection;uniform mat4 world;";e.IncludesShadersStore.gaussianSplattingUboDeclaration="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nattribute vec2 position;";e.IncludesShadersStore.gaussianSplatting="#if !defined(WEBGL2) && !defined(WEBGPU) && !defined(NATIVE)\nmat3 transpose(mat3 matrix) {return mat3(matrix[0][0],matrix[1][0],matrix[2][0],\nmatrix[0][1],matrix[1][1],matrix[2][1],\nmatrix[0][2],matrix[1][2],matrix[2][2]);}\n#endif\nvec2 getDataUV(float index,vec2 textureSize) {float y=floor(index/textureSize.x);float x=index-y*textureSize.x;return vec2((x+0.5)/textureSize.x,(y+0.5)/textureSize.y);}\nstruct Splat {vec4 center;vec4 color;vec4 covA;vec4 covB;};Splat readSplat(float splatIndex)\n{Splat splat;vec2 splatUV=getDataUV(splatIndex,dataTextureSize);splat.center=texture2D(centersTexture,splatUV);splat.color=texture2D(colorsTexture,splatUV);splat.covA=texture2D(covariancesATexture,splatUV)*splat.center.w;splat.covB=texture2D(covariancesBTexture,splatUV)*splat.center.w;return splat;}\nvec4 gaussianSplatting(vec2 meshPos,vec3 worldPos,vec2 scale,vec3 covA,vec3 covB,mat4 worldMatrix,mat4 viewMatrix,mat4 projectionMatrix)\n{mat4 modelView=viewMatrix*worldMatrix;vec4 camspace=viewMatrix*vec4(worldPos,1.);vec4 pos2d=projectionMatrix*camspace;float bounds=1.2*pos2d.w;if (pos2d.z<-pos2d.w || pos2d.x<-bounds || pos2d.x>bounds\n|| pos2d.y<-bounds || pos2d.y>bounds) {return vec4(0.0,0.0,2.0,1.0);}\nmat3 Vrk=mat3(\ncovA.x,covA.y,covA.z,\ncovA.y,covB.x,covB.y,\ncovA.z,covB.y,covB.z\n);mat3 J=mat3(\nfocal.x/camspace.z,0.,-(focal.x*camspace.x)/(camspace.z*camspace.z),\n0.,focal.y/camspace.z,-(focal.y*camspace.y)/(camspace.z*camspace.z),\n0.,0.,0.\n);mat3 invy=mat3(1,0,0,0,-1,0,0,0,1);mat3 T=invy*transpose(mat3(modelView))*J;mat3 cov2d=transpose(T)*Vrk*T;float mid=(cov2d[0][0]+cov2d[1][1])/2.0;float radius=length(vec2((cov2d[0][0]-cov2d[1][1])/2.0,cov2d[0][1]));float lambda1=mid+radius,lambda2=mid-radius;if (lambda2<0.0)\n{return vec4(0.0,0.0,2.0,1.0);}\nvec2 diagonalVector=normalize(vec2(cov2d[0][1],lambda1-cov2d[0][0]));vec2 majorAxis=min(sqrt(2.0*lambda1),1024.0)*diagonalVector;vec2 minorAxis=min(sqrt(2.0*lambda2),1024.0)*vec2(diagonalVector.y,-diagonalVector.x);vec2 vCenter=vec2(pos2d);return vec4(\nvCenter \n+ ((meshPos.x*majorAxis\n+ meshPos.y*minorAxis)*invViewport*pos2d.w)*scale,pos2d.zw);}";const ee="gaussianSplattingVertexShader",te="#include<__decl__gaussianSplattingVertex>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute float splatIndex;uniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;varying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplatting>\nvoid main () {Splat splat=readSplat(splatIndex);vec3 covA=splat.covA.xyz;vec3 covB=vec3(splat.covA.w,splat.covB.xy);vec4 worldPos=world*vec4(splat.center.xyz,1.0);vColor=splat.color;vPosition=position;gl_Position=gaussianSplatting(position,worldPos.xyz,vec2(1.,1.),covA,covB,world,view,projection);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";e.ShadersStore[ee]=te;const se={name:ee,shader:te};var ie=Object.freeze({__proto__:null,gaussianSplattingVertexShader:se});e.IncludesShadersStoreWGSL.gaussianSplattingFragmentDeclaration="fn gaussianColor(inColor: vec4f,inPosition: vec2f)->vec4f\n{var A : f32=-dot(inPosition,inPosition);if (A>-4.0)\n{var B: f32=exp(A)*inColor.a;\n#include<logDepthFragment>\nvar color: vec3f=inColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\nreturn vec4f(color,B);} else {return vec4f(0.0);}}\n";const re="gaussianSplattingPixelShader",ne="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vColor: vec4f;varying vPosition: vec2f;\n#include<gaussianSplattingFragmentDeclaration>\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {\n#include<clipPlaneFragment>\nfragmentOutputs.color=gaussianColor(input.vColor,input.vPosition);}\n";e.ShadersStoreWGSL[re]=ne;const oe={name:re,shader:ne};var ae=Object.freeze({__proto__:null,gaussianSplattingPixelShaderWGSL:oe});e.IncludesShadersStoreWGSL.gaussianSplatting="fn getDataUV(index: f32,dataTextureSize: vec2f)->vec2<f32> {let y: f32=floor(index/dataTextureSize.x);let x: f32=index-y*dataTextureSize.x;return vec2f((x+0.5),(y+0.5));}\nstruct Splat {center: vec4f,\ncolor: vec4f,\ncovA: vec4f,\ncovB: vec4f,};fn readSplat(splatIndex: f32,dataTextureSize: vec2f)->Splat {var splat: Splat;let splatUV=getDataUV(splatIndex,dataTextureSize);let splatUVi32=vec2<i32>(i32(splatUV.x),i32(splatUV.y));splat.center=textureLoad(centersTexture,splatUVi32,0);splat.color=textureLoad(colorsTexture,splatUVi32,0);splat.covA=textureLoad(covariancesATexture,splatUVi32,0)*splat.center.w;splat.covB=textureLoad(covariancesBTexture,splatUVi32,0)*splat.center.w;return splat;}\nfn gaussianSplatting(\nmeshPos: vec2<f32>,\nworldPos: vec3<f32>,\nscale: vec2<f32>,\ncovA: vec3<f32>,\ncovB: vec3<f32>,\nworldMatrix: mat4x4<f32>,\nviewMatrix: mat4x4<f32>,\nprojectionMatrix: mat4x4<f32>,\nfocal: vec2f,\ninvViewport: vec2f\n)->vec4f {let modelView=viewMatrix*worldMatrix;let camspace=viewMatrix*vec4f(worldPos,1.0);let pos2d=projectionMatrix*camspace;let bounds=1.2*pos2d.w;if (pos2d.z<0. || pos2d.x<-bounds || pos2d.x>bounds || pos2d.y<-bounds || pos2d.y>bounds) {return vec4f(0.0,0.0,2.0,1.0);}\nlet Vrk=mat3x3<f32>(\ncovA.x,covA.y,covA.z,\ncovA.y,covB.x,covB.y,\ncovA.z,covB.y,covB.z\n);let J=mat3x3<f32>(\nfocal.x/camspace.z,0.0,-(focal.x*camspace.x)/(camspace.z*camspace.z),\n0.0,focal.y/camspace.z,-(focal.y*camspace.y)/(camspace.z*camspace.z),\n0.0,0.0,0.0\n);let invy=mat3x3<f32>(\n1.0,0.0,0.0,\n0.0,-1.0,0.0,\n0.0,0.0,1.0\n);let T=invy*transpose(mat3x3<f32>(\nmodelView[0].xyz,\nmodelView[1].xyz,\nmodelView[2].xyz))*J;let cov2d=transpose(T)*Vrk*T;let mid=(cov2d[0][0]+cov2d[1][1])/2.0;let radius=length(vec2<f32>((cov2d[0][0]-cov2d[1][1])/2.0,cov2d[0][1]));let lambda1=mid+radius;let lambda2=mid-radius;if (lambda2<0.0) {return vec4f(0.0,0.0,2.0,1.0);}\nlet diagonalVector=normalize(vec2<f32>(cov2d[0][1],lambda1-cov2d[0][0]));let majorAxis=min(sqrt(2.0*lambda1),1024.0)*diagonalVector;let minorAxis=min(sqrt(2.0*lambda2),1024.0)*vec2<f32>(diagonalVector.y,-diagonalVector.x);let vCenter=vec2<f32>(pos2d.x,pos2d.y);return vec4f(\nvCenter+((meshPos.x*majorAxis+meshPos.y*minorAxis)*invViewport*pos2d.w)*scale,\npos2d.z,\npos2d.w\n);}\n";const ce="gaussianSplattingVertexShader",le="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute splatIndex: f32;attribute position: vec2f;uniform invViewport: vec2f;uniform dataTextureSize: vec2f;uniform focal: vec2f;var covariancesATexture: texture_2d<f32>;var covariancesBTexture: texture_2d<f32>;var centersTexture: texture_2d<f32>;var colorsTexture: texture_2d<f32>;varying vColor: vec4f;varying vPosition: vec2f;\n#include<gaussianSplatting>\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {var splat: Splat=readSplat(input.splatIndex,uniforms.dataTextureSize);var covA: vec3f=splat.covA.xyz;var covB: vec3f=vec3f(splat.covA.w,splat.covB.xy);let worldPos: vec4f=mesh.world*vec4f(splat.center.xyz,1.0);vertexOutputs.vColor=splat.color;vertexOutputs.vPosition=input.position;vertexOutputs.position=gaussianSplatting(input.position,worldPos.xyz,vec2f(1.0,1.0),covA,covB,mesh.world,scene.view,scene.projection,uniforms.focal,uniforms.invViewport);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";e.ShadersStoreWGSL[ce]=le;const ue={name:ce,shader:le};var he=Object.freeze({__proto__:null,gaussianSplattingVertexShaderWGSL:ue});class de extends _{constructor(){super(),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.rebuild()}}class pe extends s{constructor(e,t){super(e,t),this.backFaceCulling=!1}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(e,t){const s=!0,l=t._drawWrapper;if(l.effect&&this.isFrozen&&l._wasPreviouslyReady&&l._wasPreviouslyUsingInstances===s)return!0;t.materialDefines||(t.materialDefines=new de);const u=this.getScene(),h=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;const d=u.getEngine();if(i(e,u,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,h),r(u,d,this,h,s,null,!0),n(e,h,!1,!1),h.isDirty){h.markAsProcessed(),u.resetCachedMaterial();const e=[m.PositionKind,"splatIndex"];o(e,h);const s=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal"],i=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture"],r=["Scene","Mesh"];a({uniformsNames:s,uniformBuffersNames:r,samplers:i,defines:h}),c(s);const n=h.toString(),l=u.getEngine().createEffect("gaussianSplatting",{attributes:e,uniformsNames:s,uniformBuffersNames:r,samplers:i,defines:n,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{},shaderLanguage:this._shaderLanguage,extraInitializationsAsync:async()=>{1===this._shaderLanguage?await Promise.all([Promise.resolve().then((function(){return ae})),Promise.resolve().then((function(){return he}))]):await Promise.all([Promise.resolve().then((function(){return $})),Promise.resolve().then((function(){return ie}))])}},d);t.setEffect(l,h,this._materialContext)}return!(!t.effect||!t.effect.isReady())&&(h._renderId=u.getRenderId(),l._wasPreviouslyReady=!0,l._wasPreviouslyUsingInstances=s,!0)}static BindEffect(e,t,s){const i=s.getEngine(),r=s.activeCamera,n=i.getRenderWidth(),o=i.getRenderHeight(),a=r?.rigParent?.rigCameras.length||1;t.setFloat2("invViewport",1/(n/a),1/o);let c=1e3;if(r){const e=r.getProjectionMatrix().m[5];c=r.fovMode==l.FOVMODE_VERTICAL_FIXED?o*e/2:n*e/2}t.setFloat2("focal",c,c);const u=e;if(u.covariancesATexture){const e=u.covariancesATexture.getSize();t.setFloat2("dataTextureSize",e.width,e.height),t.setTexture("covariancesATexture",u.covariancesATexture),t.setTexture("covariancesBTexture",u.covariancesBTexture),t.setTexture("centersTexture",u.centersTexture),t.setTexture("colorsTexture",u.colorsTexture)}}bindForSubMesh(e,t,s){const i=this.getScene(),r=s.materialDefines;if(!r)return;const n=s.effect;if(!n)return;this._activeEffect=n,t.getMeshUniformBuffer().bindToEffect(n,"Mesh"),t.transferToEffect(e);this._mustRebind(i,n,s,t.visibility)?(this.bindView(n),this.bindViewProjection(n),pe.BindEffect(t,this._activeEffect,i),u(n,this,i)):i.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0),h(i,t,n),this.useLogarithmicDepth&&d(r,n,i),this._afterBind(t,this._activeEffect,s)}clone(e){return p.Clone((()=>new pe(e,this.getScene())),this)}serialize(){const e=super.serialize();return e.customType="BABYLON.GaussianSplattingMaterial",e}getClassName(){return"GaussianSplattingMaterial"}static Parse(e,t,s){return p.Parse((()=>new pe(e.name,t)),e,t,s)}}t("BABYLON.GaussianSplattingMaterial",pe);const _e=x,me={...f,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:_e},fe=(e,t)=>{const s=(1<<t)-1;return(e&s)/s},xe=(e,t)=>{t.x=fe(e>>>21,11),t.y=fe(e>>>11,10),t.z=fe(e,11)},ge=(e,t)=>{t[0]=255*fe(e>>>24,8),t[1]=255*fe(e>>>16,8),t[2]=255*fe(e>>>8,8),t[3]=255*fe(e,8)},ve=(e,t)=>{const s=1/(.5*Math.sqrt(2)),i=(fe(e>>>20,10)-.5)*s,r=(fe(e>>>10,10)-.5)*s,n=(fe(e,10)-.5)*s,o=Math.sqrt(1-(i*i+r*r+n*n));switch(e>>>30){case 0:t.set(o,i,r,n);break;case 1:t.set(i,o,r,n);break;case 2:t.set(i,r,o,n);break;case 3:t.set(i,r,n,o)}};var ye,Te,we,Pe,Ae,Ce;!function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e[e.DOUBLE=3]="DOUBLE",e[e.UCHAR=4]="UCHAR",e[e.UNDEFINED=5]="UNDEFINED"}(ye||(ye={})),function(e){e[e.MIN_X=0]="MIN_X",e[e.MIN_Y=1]="MIN_Y",e[e.MIN_Z=2]="MIN_Z",e[e.MAX_X=3]="MAX_X",e[e.MAX_Y=4]="MAX_Y",e[e.MAX_Z=5]="MAX_Z",e[e.MIN_SCALE_X=6]="MIN_SCALE_X",e[e.MIN_SCALE_Y=7]="MIN_SCALE_Y",e[e.MIN_SCALE_Z=8]="MIN_SCALE_Z",e[e.MAX_SCALE_X=9]="MAX_SCALE_X",e[e.MAX_SCALE_Y=10]="MAX_SCALE_Y",e[e.MAX_SCALE_Z=11]="MAX_SCALE_Z",e[e.PACKED_POSITION=12]="PACKED_POSITION",e[e.PACKED_ROTATION=13]="PACKED_ROTATION",e[e.PACKED_SCALE=14]="PACKED_SCALE",e[e.PACKED_COLOR=15]="PACKED_COLOR",e[e.X=16]="X",e[e.Y=17]="Y",e[e.Z=18]="Z",e[e.SCALE_0=19]="SCALE_0",e[e.SCALE_1=20]="SCALE_1",e[e.SCALE_2=21]="SCALE_2",e[e.DIFFUSE_RED=22]="DIFFUSE_RED",e[e.DIFFUSE_GREEN=23]="DIFFUSE_GREEN",e[e.DIFFUSE_BLUE=24]="DIFFUSE_BLUE",e[e.OPACITY=25]="OPACITY",e[e.F_DC_0=26]="F_DC_0",e[e.F_DC_1=27]="F_DC_1",e[e.F_DC_2=28]="F_DC_2",e[e.F_DC_3=29]="F_DC_3",e[e.ROT_0=30]="ROT_0",e[e.ROT_1=31]="ROT_1",e[e.ROT_2=32]="ROT_2",e[e.ROT_3=33]="ROT_3",e[e.UNDEFINED=34]="UNDEFINED"}(Te||(Te={}));class be extends g{get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}set material(e){this._material=e,this._material.backFaceCulling=!0,this._material.cullBackFaces=!1,e.resetDrawCache()}get material(){return this._material}constructor(e,t=null,s=null,i=!1){super(e,s),this._vertexCount=0,this._worker=null,this._frameIdLastUpdate=-1,this._modelViewMatrix=v.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._splatPositions=null,this._splatIndex=null,this._covariancesA=null,this._covariancesB=null,this._colors=null,this._keepInRam=!1,this._delayedTextureUpdate=null,this._oldDirection=new y,this._useRGBACovariants=!1,this._material=null,this._tmpCovariances=[0,0,0,0,0,0],this._sortIsDirty=!1;const r=new T;r.positions=[-3,-2,0,3,-2,0,0,4,0],r.indices=[0,1,2],r.applyToMesh(this),this.subMeshes=[],new w(0,0,3,0,3,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,this._keepInRam=i,t&&this.loadFileAsync(t),this._material=new pe(this.name+"_material",this._scene)}getClassName(){return"GaussianSplattingMesh"}getTotalVertices(){return this._vertexCount}isReady(e=!1){return!!super.isReady(e,!0)&&(!!this._readyToDisplay||(this._postToWorker(!0),!1))}_postToWorker(e=!1){const t=this.getScene().getFrameId();if((e||t!==this._frameIdLastUpdate)&&this._worker&&this._scene.activeCamera&&this._canPostToWorker){const s=this._scene.activeCamera.getViewMatrix();this.getWorldMatrix().multiplyToRef(s,this._modelViewMatrix),s.invertToRef(P.Matrix[0]),this.getWorldMatrix().multiplyToRef(P.Matrix[0],P.Matrix[1]),y.TransformNormalToRef(y.Forward(this._scene.useRightHandedSystem),P.Matrix[1],P.Vector3[2]),P.Vector3[2].normalize();const i=y.Dot(P.Vector3[2],this._oldDirection);(e||Math.abs(i-1)>=.01)&&(this._oldDirection.copyFrom(P.Vector3[2]),this._frameIdLastUpdate=t,this._canPostToWorker=!1,this._worker.postMessage({view:this._modelViewMatrix.m,depthMix:this._depthMix,useRightHandedSystem:this._scene.useRightHandedSystem},[this._depthMix.buffer]))}}render(e,t,s){return this._postToWorker(),super.render(e,t,s)}static _TypeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4}return 5}static _ValueNameToEnum(e){switch(e){case"min_x":return 0;case"min_y":return 1;case"min_z":return 2;case"max_x":return 3;case"max_y":return 4;case"max_z":return 5;case"min_scale_x":return 6;case"min_scale_y":return 7;case"min_scale_z":return 8;case"max_scale_x":return 9;case"max_scale_y":return 10;case"max_scale_z":return 11;case"packed_position":return 12;case"packed_rotation":return 13;case"packed_scale":return 14;case"packed_color":return 15;case"x":return 16;case"y":return 17;case"z":return 18;case"scale_0":return 19;case"scale_1":return 20;case"scale_2":return 21;case"diffuse_red":case"red":return 22;case"diffuse_green":case"green":return 23;case"diffuse_blue":case"blue":return 24;case"f_dc_0":return 26;case"f_dc_1":return 27;case"f_dc_2":return 28;case"f_dc_3":return 29;case"opacity":return 25;case"rot_0":return 30;case"rot_1":return 31;case"rot_2":return 32;case"rot_3":return 33}return 34}static ParseHeader(e){const t=new Uint8Array(e),s=(new TextDecoder).decode(t.slice(0,10240)),i="end_header\n",r=s.indexOf(i);if(r<0||!s)return null;const n=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element chunk (\d+)\n/.exec(s);let a=0;o&&(a=parseInt(o[1]));let c=0,l=0;const u={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let h;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(h||(h={}));let d=1;const p=[],_=[],m=s.slice(0,r).split("\n");for(const e of m)if(e.startsWith("property ")){const[,t,s]=e.split(" "),i=be._ValueNameToEnum(s),r=be._TypeNameToEnum(t);1==d?(_.push({value:i,type:r,offset:l}),l+=u[t]):0==d&&(p.push({value:i,type:r,offset:c}),c+=u[t]),u[t]||A.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?d=1:"vertex"==t&&(d=0)}return{vertexCount:n,chunkCount:a,rowVertexLength:c,rowChunkLength:l,vertexProperties:p,chunkProperties:_,dataView:new DataView(e,r+11),buffer:new ArrayBuffer(be._RowOutputLength*n)}}static _GetCompressedChunks(e,t){if(!e.chunkCount)return null;const s=e.dataView,i=new Array(e.chunkCount);for(let r=0;r<e.chunkCount;r++){const n={min:new y,max:new y,minScale:new y,maxScale:new y};i[r]=n;for(let i=0;i<e.chunkProperties.length;i++){const r=e.chunkProperties[i];let o;if(0===r.type)switch(o=s.getFloat32(r.offset+t.value,!0),r.value){case 0:n.min.x=o;break;case 1:n.min.y=o;break;case 2:n.min.z=o;break;case 3:n.max.x=o;break;case 4:n.max.y=o;break;case 5:n.max.z=o;break;case 6:n.minScale.x=o;break;case 7:n.minScale.y=o;break;case 8:n.minScale.z=o;break;case 9:n.maxScale.x=o;break;case 10:n.maxScale.y=o;break;case 11:n.maxScale.z=o}}t.value+=e.rowChunkLength}return i}static _GetSplat(e,t,s,i){const r=P.Quaternion[0],n=P.Vector3[0],o=be._RowOutputLength,a=e.buffer,c=e.dataView,l=new Float32Array(a,t*o,3),u=new Float32Array(a,t*o+12,3),h=new Uint8ClampedArray(a,t*o+24,4),d=new Uint8ClampedArray(a,t*o+28,4),p=t>>8;let _=255,m=0,f=0,x=0;for(let t=0;t<e.vertexProperties.length;t++){const o=e.vertexProperties[t];let a;switch(o.type){case 0:a=c.getFloat32(i.value+o.offset,!0);break;case 1:a=c.getInt32(i.value+o.offset,!0);break;case 2:a=c.getUint32(i.value+o.offset,!0);break;case 3:a=c.getFloat64(i.value+o.offset,!0);break;case 4:a=c.getUint8(i.value+o.offset);break;default:continue}switch(o.value){case 12:{const e=s[p];xe(a,n),l[0]=me.Lerp(e.min.x,e.max.x,n.x),l[1]=-me.Lerp(e.min.y,e.max.y,n.y),l[2]=me.Lerp(e.min.z,e.max.z,n.z)}break;case 13:ve(a,r),_=r.w,m=r.z,f=r.y,x=r.x;break;case 14:{const e=s[p];xe(a,n),u[0]=Math.exp(me.Lerp(e.minScale.x,e.maxScale.x,n.x)),u[1]=Math.exp(me.Lerp(e.minScale.y,e.maxScale.y,n.y)),u[2]=Math.exp(me.Lerp(e.minScale.z,e.maxScale.z,n.z))}break;case 15:ge(a,h);break;case 16:l[0]=a;break;case 17:l[1]=a;break;case 18:l[2]=a;break;case 19:u[0]=Math.exp(a);break;case 20:u[1]=Math.exp(a);break;case 21:u[2]=Math.exp(a);break;case 22:h[0]=a;break;case 23:h[1]=a;break;case 24:h[2]=a;break;case 26:h[0]=255*(.5+be._SH_C0*a);break;case 27:h[1]=255*(.5+be._SH_C0*a);break;case 28:h[2]=255*(.5+be._SH_C0*a);break;case 29:h[3]=255*(.5+be._SH_C0*a);break;case 25:h[3]=1/(1+Math.exp(-a))*255;break;case 30:_=a;break;case 31:m=a;break;case 32:f=a;break;case 33:x=a}}r.set(m,f,x,_),r.normalize(),d[0]=128*r.w+128,d[1]=128*r.x+128,d[2]=128*r.y+128,d[3]=128*r.z+128,i.value+=e.rowVertexLength}static*ConvertPLYToSplat(e,t=!1){const s=be.ParseHeader(e);if(!s)return e;const i={value:0},r=be._GetCompressedChunks(s,i);for(let e=0;e<s.vertexCount;e++)be._GetSplat(s,e,r,i),e%be._PlyConversionBatchSize==0&&t&&(yield);return s.buffer}static async ConvertPLYToSplatAsync(e){return C(be.ConvertPLYToSplat(e,!0),D())}loadDataAsync(e){return this.updateDataAsync(e)}loadFileAsync(e){return b.LoadFileAsync(e,!0).then((async e=>{be.ConvertPLYToSplatAsync(e).then((e=>{this.updateDataAsync(e)}))}))}dispose(e){this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._worker?.terminate(),this._worker=null,super.dispose(e,!0)}_copyTextures(e){this._covariancesATexture=e.covariancesATexture?.clone(),this._covariancesBTexture=e.covariancesBTexture?.clone(),this._centersTexture=e.centersTexture?.clone(),this._colorsTexture=e.colorsTexture?.clone()}clone(e=""){const t=new be(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewMatrix=v.Identity(),t._splatPositions=this._splatPositions,t._readyToDisplay=!1,t._instanciateWorker();const s=this.getBoundingInfo();return t.getBoundingInfo().reConstruct(s.minimum,s.maximum,this.getWorldMatrix()),t.forcedInstanceCount=t._vertexCount,t.setEnabled(!0),t}_makeSplat(e,t,s,i,r,n,o,a,c){const l=P.Matrix[0],u=P.Matrix[1],h=P.Quaternion[0],d=this._useRGBACovariants?4:2,p=s[8*e+0],_=-s[8*e+1],m=s[8*e+2];this._splatPositions[4*e+0]=p,this._splatPositions[4*e+1]=_,this._splatPositions[4*e+2]=m,a.minimizeInPlaceFromFloats(p,_,m),c.maximizeInPlaceFromFloats(p,_,m),h.set((i[32*e+28+1]-128)/128,(i[32*e+28+2]-128)/128,(i[32*e+28+3]-128)/128,-(i[32*e+28+0]-128)/128),h.toRotationMatrix(l),v.ScalingToRef(2*s[8*e+3+0],2*s[8*e+3+1],2*s[8*e+3+2],u);const f=l.multiplyToRef(u,P.Matrix[0]).m,x=this._tmpCovariances;x[0]=f[0]*f[0]+f[1]*f[1]+f[2]*f[2],x[1]=f[0]*f[4]+f[1]*f[5]+f[2]*f[6],x[2]=f[0]*f[8]+f[1]*f[9]+f[2]*f[10],x[3]=f[4]*f[4]+f[5]*f[5]+f[6]*f[6],x[4]=f[4]*f[8]+f[5]*f[9]+f[6]*f[10],x[5]=f[8]*f[8]+f[9]*f[9]+f[10]*f[10];let g=-1e4;for(let e=0;e<6;e++)g=Math.max(g,Math.abs(x[e]));this._splatPositions[4*e+3]=g;const y=g;r[4*t+0]=S(x[0]/y),r[4*t+1]=S(x[1]/y),r[4*t+2]=S(x[2]/y),r[4*t+3]=S(x[3]/y),n[t*d+0]=S(x[4]/y),n[t*d+1]=S(x[5]/y),o[4*t+0]=i[32*e+24+0],o[4*t+1]=i[32*e+24+1],o[4*t+2]=i[32*e+24+2],o[4*t+3]=i[32*e+24+3]}_updateTextures(e,t,s){const i=this._getTextureSize(this._vertexCount),r=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,M.TEXTURE_BILINEAR_SAMPLINGMODE,M.TEXTURETYPE_FLOAT),n=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,M.TEXTURE_BILINEAR_SAMPLINGMODE,M.TEXTURETYPE_UNSIGNED_BYTE),o=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,M.TEXTURE_BILINEAR_SAMPLINGMODE,M.TEXTURETYPE_HALF_FLOAT);if(this._keepInRam&&(this._covariancesA=e,this._covariancesB=t,this._colors=s),this._covariancesATexture){this._delayedTextureUpdate={covA:e,covB:t,colors:s,centers:this._splatPositions};const i=Float32Array.from(this._splatPositions),r=this._vertexCount;this._worker.postMessage({positions:i,vertexCount:r},[i.buffer]),this._postToWorker(!0)}else this._covariancesATexture=o(e,i.x,i.y,M.TEXTUREFORMAT_RGBA),this._covariancesBTexture=o(t,i.x,i.y,this._useRGBACovariants?M.TEXTUREFORMAT_RGBA:M.TEXTUREFORMAT_RG),this._centersTexture=r(this._splatPositions,i.x,i.y,M.TEXTUREFORMAT_RGBA),this._colorsTexture=n(s,i.x,i.y,M.TEXTUREFORMAT_RGBA),this._instanciateWorker()}*_updateData(e,t){this._covariancesATexture||(this._readyToDisplay=!1);const s=new Uint8Array(e),i=new Float32Array(s.buffer),r=s.length/be._RowOutputLength;r!=this._vertexCount&&this._updateSplatIndexBuffer(r),this._vertexCount=r;const n=this._getTextureSize(r),o=n.x*n.y,a=be.ProgressiveUpdateAmount??n.y,c=n.x*a;this._splatPositions=new Float32Array(4*o);const l=new Uint16Array(4*o),u=new Uint16Array((this._useRGBACovariants?4:2)*o),h=new Uint8Array(4*o),d=new y(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),p=new y(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(be.ProgressiveUpdateAmount){this._updateTextures(l,u,h),this.setEnabled(!0);const e=Math.ceil(n.y/a);for(let r=0;r<e;r++){const e=r*a,o=e*n.x;for(let e=0;e<c;e++)this._makeSplat(o+e,o+e,i,s,l,u,h,d,p);this._updateSubTextures(this._splatPositions,l,u,h,e,Math.min(a,n.y-e)),this.getBoundingInfo().reConstruct(d,p,this.getWorldMatrix()),t&&(yield)}const r=Float32Array.from(this._splatPositions),o=this._vertexCount;this._worker.postMessage({positions:r,vertexCount:o},[r.buffer]),this._sortIsDirty=!0}else{for(let e=0;e<r;e++)this._makeSplat(e,e,i,s,l,u,h,d,p),t&&e%be._SplatBatchSize==0&&(yield);this._updateTextures(l,u,h),this.getBoundingInfo().reConstruct(d,p,this.getWorldMatrix()),this.setEnabled(!0)}this._postToWorker(!0)}async updateDataAsync(e){return C(this._updateData(e,!0),D())}updateData(e){R(this._updateData(e,!1))}_updateSplatIndexBuffer(e){(!this._splatIndex||e>this._splatIndex.length)&&(this._splatIndex=new Float32Array(e),this.thinInstanceSetBuffer("splatIndex",this._splatIndex,1,!1)),this.forcedInstanceCount=e}_updateSubTextures(e,t,s,i,r,n){const o=(e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)},a=this._getTextureSize(this._vertexCount),c=this._useRGBACovariants?4:2,l=r*a.x,u=n*a.x,h=new Uint16Array(t.buffer,4*l*Uint16Array.BYTES_PER_ELEMENT,4*u),d=new Uint16Array(s.buffer,l*c*Uint16Array.BYTES_PER_ELEMENT,u*c),p=new Uint8Array(i.buffer,4*l,4*u),_=new Float32Array(e.buffer,4*l*Float32Array.BYTES_PER_ELEMENT,4*u);o(this._covariancesATexture,h,a.x,r,n),o(this._covariancesBTexture,d,a.x,r,n),((e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)})(this._centersTexture,_,a.x,r,n),((e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)})(this._colorsTexture,p,a.x,r,n)}_instanciateWorker(){if(!this._vertexCount)return;this._updateSplatIndexBuffer(this._vertexCount),this._worker?.terminate(),this._worker=new Worker(URL.createObjectURL(new Blob(["(",be._CreateWorker.toString(),")(self)"],{type:"application/javascript"}))),this._depthMix=new BigInt64Array(this._vertexCount);const e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({positions:e,vertexCount:t},[e.buffer]),this._worker.onmessage=e=>{this._depthMix=e.data.depthMix;const s=new Uint32Array(e.data.depthMix.buffer);if(this._splatIndex)for(let e=0;e<this._vertexCount;e++)this._splatIndex[e]=s[2*e];if(this._delayedTextureUpdate){const e=this._getTextureSize(t);this._updateSubTextures(this._delayedTextureUpdate.centers,this._delayedTextureUpdate.covA,this._delayedTextureUpdate.covB,this._delayedTextureUpdate.colors,0,e.y),this._delayedTextureUpdate=null}this.thinInstanceBufferUpdated("splatIndex"),this._canPostToWorker=!0,this._readyToDisplay=!0,this._sortIsDirty&&(this._postToWorker(!0),this._sortIsDirty=!1)}}_getTextureSize(e){const t=this._scene.getEngine(),s=t.getCaps().maxTextureSize;let i=1;if(1!==t.version||t.isWebGPU)i=Math.ceil(e/s);else for(;s*i<e;)i*=2;return i>s&&(A.Error("GaussianSplatting texture size: ("+s+", "+i+"), maxTextureSize: "+s),i=s),new I(s,i)}}be._RowOutputLength=32,be._SH_C0=.28209479177387814,be._SplatBatchSize=327680,be._PlyConversionBatchSize=32768,be.ProgressiveUpdateAmount=0,be._CreateWorker=function(e){let t,s,i,r,n=0;e.onmessage=o=>{if(o.data.positions)t=o.data.positions,n=o.data.vertexCount;else{const a=o.data.view;if(!t||!a)throw new Error("positions or view is not defined!");s=o.data.depthMix,i=new Uint32Array(s.buffer),r=new Float32Array(s.buffer);for(let e=0;e<n;e++)i[2*e]=e;let c=-1;o.data.useRightHandedSystem&&(c=1);for(let e=0;e<n;e++)r[2*e+1]=1e4+(a[2]*t[4*e+0]+a[6]*t[4*e+1]+a[10]*t[4*e+2])*c;s.sort(),e.postMessage({depthMix:s},[s.buffer])}}};class Se{constructor(e,t,s,i,r){this.idx=0,this.color=new E(1,1,1,1),this.position=y.Zero(),this.rotation=y.Zero(),this.uv=new I(0,0),this.velocity=y.Zero(),this.pivot=y.Zero(),this.translateFromPivot=!1,this._pos=0,this._ind=0,this.groupId=0,this.idxInGroup=0,this._stillInvisible=!1,this._rotationMatrix=[1,0,0,0,1,0,0,0,1],this.parentId=null,this._globalPosition=y.Zero(),this.idx=e,this._group=t,this.groupId=s,this.idxInGroup=i,this._pcs=r}get size(){return this.size}set size(e){this.size=e}get quaternion(){return this.rotationQuaternion}set quaternion(e){this.rotationQuaternion=e}intersectsMesh(e,t){if(!e.hasBoundingInfo)return!1;if(!this._pcs.mesh)throw new Error("Point Cloud System doesnt contain the Mesh");if(t)return e.getBoundingInfo().boundingSphere.intersectsPoint(this.position.add(this._pcs.mesh.position));const s=e.getBoundingInfo().boundingBox,i=s.maximumWorld.x,r=s.minimumWorld.x,n=s.maximumWorld.y,o=s.minimumWorld.y,a=s.maximumWorld.z,c=s.minimumWorld.z,l=this.position.x+this._pcs.mesh.position.x,u=this.position.y+this._pcs.mesh.position.y,h=this.position.z+this._pcs.mesh.position.z;return r<=l&&l<=i&&o<=u&&u<=n&&c<=h&&h<=a}getRotationMatrix(e){let t;if(this.rotationQuaternion)t=this.rotationQuaternion;else{t=P.Quaternion[0];const e=this.rotation;V.RotationYawPitchRollToRef(e.y,e.x,e.z,t)}t.toRotationMatrix(e)}}class Me{get groupID(){return this.groupId}set groupID(e){this.groupId=e}constructor(e,t){this.groupId=e,this._positionFunction=t}}class Re{constructor(e,t,s=Number.MAX_VALUE,i=F){this.origin=e,this.direction=t,this.length=s,this.epsilon=i}clone(){return new Re(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(e,t,s=0){const i=Re._TmpVector3[0].copyFromFloats(e.x-s,e.y-s,e.z-s),r=Re._TmpVector3[1].copyFromFloats(t.x+s,t.y+s,t.z+s);let n,o,a,c,l=0,u=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<i.x||this.origin.x>r.x)return!1}else if(n=1/this.direction.x,o=(i.x-this.origin.x)*n,a=(r.x-this.origin.x)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<i.y||this.origin.y>r.y)return!1}else if(n=1/this.direction.y,o=(i.y-this.origin.y)*n,a=(r.y-this.origin.y)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<i.z||this.origin.z>r.z)return!1}else if(n=1/this.direction.z,o=(i.z-this.origin.z)*n,a=(r.z-this.origin.z)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;return!0}intersectsBox(e,t=0){return this.intersectsBoxMinMax(e.minimum,e.maximum,t)}intersectsSphere(e,t=0){const s=e.center.x-this.origin.x,i=e.center.y-this.origin.y,r=e.center.z-this.origin.z,n=s*s+i*i+r*r,o=e.radius+t,a=o*o;if(n<=a)return!0;const c=s*this.direction.x+i*this.direction.y+r*this.direction.z;if(c<0)return!1;return n-c*c<=a}intersectsTriangle(e,t,s){const i=Re._TmpVector3[0],r=Re._TmpVector3[1],n=Re._TmpVector3[2],o=Re._TmpVector3[3],a=Re._TmpVector3[4];t.subtractToRef(e,i),s.subtractToRef(e,r),y.CrossToRef(this.direction,r,n);const c=y.Dot(i,n);if(0===c)return null;const l=1/c;this.origin.subtractToRef(e,o);const u=y.Dot(o,n)*l;if(u<-this.epsilon||u>1+this.epsilon)return null;y.CrossToRef(o,i,a);const h=y.Dot(this.direction,a)*l;if(h<-this.epsilon||u+h>1+this.epsilon)return null;const d=y.Dot(r,a)*l;return d>this.length?null:new k(1-u-h,u,d)}intersectsPlane(e){let t;const s=y.Dot(e.normal,this.direction);if(Math.abs(s)<9.99999997475243e-7)return null;{const i=y.Dot(e.normal,this.origin);return t=(-e.d-i)/s,t<0?t<-9.99999997475243e-7?null:0:t}}intersectsAxis(e,t=0){switch(e){case"y":{const e=(this.origin.y-t)/this.direction.y;return e>0?null:new y(this.origin.x+this.direction.x*-e,t,this.origin.z+this.direction.z*-e)}case"x":{const e=(this.origin.x-t)/this.direction.x;return e>0?null:new y(t,this.origin.y+this.direction.y*-e,this.origin.z+this.direction.z*-e)}case"z":{const e=(this.origin.z-t)/this.direction.z;return e>0?null:new y(this.origin.x+this.direction.x*-e,this.origin.y+this.direction.y*-e,t)}default:return null}}intersectsMesh(e,t,s,i=!1,r,n=!1){const o=P.Matrix[0];return e.getWorldMatrix().invertToRef(o),this._tmpRay?Re.TransformToRef(this,o,this._tmpRay):this._tmpRay=Re.Transform(this,o),e.intersects(this._tmpRay,t,s,i,r,n)}intersectsMeshes(e,t,s){s?s.length=0:s=[];for(let i=0;i<e.length;i++){const r=this.intersectsMesh(e[i],t);r.hit&&s.push(r)}return s.sort(this._comparePickingInfo),s}_comparePickingInfo(e,t){return e.distance<t.distance?-1:e.distance>t.distance?1:0}intersectionSegment(e,t,s){const i=this.origin,r=P.Vector3[0],n=P.Vector3[1],o=P.Vector3[2],a=P.Vector3[3];t.subtractToRef(e,r),this.direction.scaleToRef(Re._Rayl,o),i.addToRef(o,n),e.subtractToRef(i,a);const c=y.Dot(r,r),l=y.Dot(r,o),u=y.Dot(o,o),h=y.Dot(r,a),d=y.Dot(o,a),p=c*u-l*l;let _,m,f=p,x=p;p<Re._Smallnum?(_=0,f=1,m=d,x=u):(_=l*d-u*h,m=c*d-l*h,_<0?(_=0,m=d,x=u):_>f&&(_=f,m=d+l,x=u)),m<0?(m=0,-h<0?_=0:-h>c?_=f:(_=-h,f=c)):m>x&&(m=x,-h+l<0?_=0:-h+l>c?_=f:(_=-h+l,f=c));const g=Math.abs(_)<Re._Smallnum?0:_/f,v=Math.abs(m)<Re._Smallnum?0:m/x,T=P.Vector3[4];o.scaleToRef(v,T);const w=P.Vector3[5];r.scaleToRef(g,w),w.addInPlace(a);const A=P.Vector3[6];w.subtractToRef(T,A);return v>0&&v<=this.length&&A.lengthSquared()<s*s?w.length():-1}update(e,t,s,i,r,n,o,a=!1){if(a){Re._RayDistant||(Re._RayDistant=Re.Zero()),Re._RayDistant.unprojectRayToRef(e,t,s,i,v.IdentityReadOnly,n,o);const a=P.Matrix[0];r.invertToRef(a),Re.TransformToRef(Re._RayDistant,a,this)}else this.unprojectRayToRef(e,t,s,i,r,n,o);return this}static Zero(){return new Re(y.Zero(),y.Zero())}static CreateNew(e,t,s,i,r,n,o){return Re.Zero().update(e,t,s,i,r,n,o)}static CreateNewFromTo(e,t,s=v.IdentityReadOnly){const i=new Re(new y(0,0,0),new y(0,0,0));return Re.CreateFromToToRef(e,t,i,s)}static CreateFromToToRef(e,t,s,i=v.IdentityReadOnly){s.origin.copyFrom(e);const r=t.subtractToRef(e,s.direction),n=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return s.length=n,s.direction.normalize(),Re.TransformToRef(s,i,s)}static Transform(e,t){const s=new Re(new y(0,0,0),new y(0,0,0));return Re.TransformToRef(e,t,s),s}static TransformToRef(e,t,s){y.TransformCoordinatesToRef(e.origin,t,s.origin),y.TransformNormalToRef(e.direction,t,s.direction),s.length=e.length,s.epsilon=e.epsilon;const i=s.direction,r=i.length();if(0!==r&&1!==r){const e=1/r;i.x*=e,i.y*=e,i.z*=e,s.length*=r}return s}unprojectRayToRef(e,t,s,i,r,n,o){const a=P.Matrix[0];r.multiplyToRef(n,a),a.multiplyToRef(o,a),a.invert();const c=B.LastCreatedEngine,l=P.Vector3[0];l.x=e/s*2-1,l.y=-(t/i*2-1),l.z=c?.useReverseDepthBuffer?1:c?.isNDCHalfZRange?0:-1;const u=P.Vector3[1].copyFromFloats(l.x,l.y,1-1e-8),h=P.Vector3[2],d=P.Vector3[3];y._UnprojectFromInvertedMatrixToRef(l,a,h),y._UnprojectFromInvertedMatrixToRef(u,a,d),this.origin.copyFrom(h),d.subtractToRef(h,this.direction),this.direction.normalize()}}function Ie(e,t,s,i,r,n=!1){const o=Re.Zero();return De(e,t,s,i,o,r,n),o}function De(e,t,s,i,r,n,o=!1,a=!1){const c=e.getEngine();if(!n&&!(n=e.activeCamera))return e;const l=n.viewport,u=c.getRenderHeight(),{x:h,y:d,width:p,height:_}=l.toGlobal(c.getRenderWidth(),u),m=1/c.getHardwareScalingLevel();return t=t*m-h,s=s*m-(u-d-_),r.update(t,s,p,_,i||v.IdentityReadOnly,o?v.IdentityReadOnly:n.getViewMatrix(),n.getProjectionMatrix(),a),e}function Ee(e,t,s,i,r){if(!U)return e;const n=e.getEngine();if(!r&&!(r=e.activeCamera))throw new Error("Active camera not set");const o=r.viewport,a=n.getRenderHeight(),{x:c,y:l,width:u,height:h}=o.toGlobal(n.getRenderWidth(),a),d=v.Identity(),p=1/n.getHardwareScalingLevel();return t=t*p-c,s=s*p-(a-l-h),i.update(t,s,u,h,d,d,r.getProjectionMatrix()),e}function Ve(e,t,s,i,r,n,o,a){const c=t(i,s.enableDistantPicking),l=s.intersects(c,r,o,n,i,a);return l&&l.hit?!r&&null!=e&&l.distance>=e.distance?null:l:null}function ze(e,t,s,i,r,n){let o=null;const a=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),c=e.cameraToUseForPointers||e.activeCamera,l=Ve;for(let u=0;u<e.meshes.length;u++){const h=e.meshes[u];if(s){if(!s(h,-1))continue}else if(!h.isEnabled()||!h.isVisible||!h.isPickable)continue;const d=a&&h.isWorldMatrixCameraDependent(),p=h.computeWorldMatrix(d,c);if(h.hasThinInstances&&h.thinInstanceEnablePicking){const e=l(o,t,h,p,!0,!0,n);if(e){if(r)return e;const a=P.Matrix[1],c=h.thinInstanceGetWorldMatrices();for(let e=0;e<c.length;e++){if(s&&!s(h,e))continue;c[e].multiplyToRef(p,a);const u=l(o,t,h,a,i,r,n,!0);if(u&&(o=u,o.thinInstanceIndex=e,i))return o}}}else{const e=l(o,t,h,p,i,r,n);if(e&&(o=e,i))return o}}return o||new U}function Fe(e,t,s,i){if(!U)return null;const r=[],n=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),o=e.cameraToUseForPointers||e.activeCamera,a=Ve;for(let c=0;c<e.meshes.length;c++){const l=e.meshes[c];if(s){if(!s(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;const u=n&&l.isWorldMatrixCameraDependent(),h=l.computeWorldMatrix(u,o);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(a(null,t,l,h,!0,!0,i)){const e=P.Matrix[1],n=l.thinInstanceGetWorldMatrices();for(let o=0;o<n.length;o++){if(s&&!s(l,o))continue;n[o].multiplyToRef(h,e);const c=a(null,t,l,e,!1,!1,i,!0);c&&(c.thinInstanceIndex=o,r.push(c))}}}else{const e=a(null,t,l,h,!1,!1,i);e&&r.push(e)}}return r}function ke(e,t,s=100,i,r){i||(i=e.getWorldMatrix()),t.length=s,r?t.origin.copyFrom(r):t.origin.copyFrom(e.position);const n=P.Vector3[2];n.set(0,0,e._scene.useRightHandedSystem?-1:1);const o=P.Vector3[3];return y.TransformNormalToRef(n,i,o),y.NormalizeToRef(o,t.direction),t}Re._TmpVector3=z(6,y.Zero),Re._RayDistant=Re.Zero(),Re._Smallnum=1e-8,Re._Rayl=1e9,we=N,(Pe=l)&&(Pe.prototype.getForwardRay=function(e=100,t,s){return ke(this,new Re(y.Zero(),y.Zero(),e),e,t,s)},Pe.prototype.getForwardRayToRef=function(e,t=100,s,i){return ke(this,e,t,s,i)}),we&&(L._IsPickingAvailable=!0,we.prototype.createPickingRay=function(e,t,s,i,r=!1){return Ie(this,e,t,s,i,r)}),N.prototype.createPickingRayToRef=function(e,t,s,i,r,n=!1,o=!1){return De(this,e,t,s,i,r,n,o)},N.prototype.createPickingRayInCameraSpace=function(e,t,s){return function(e,t,s,i){const r=Re.Zero();return Ee(e,t,s,r,i),r}(this,e,t,s)},N.prototype.createPickingRayInCameraSpaceToRef=function(e,t,s,i){return Ee(this,e,t,s,i)},N.prototype.pickWithBoundingInfo=function(e,t,s,i,r){return function(e,t,s,i,r,n){if(!U)return null;const o=ze(e,(i=>(e._tempPickingRay||(e._tempPickingRay=Re.Zero()),De(e,t,s,i,e._tempPickingRay,n||null),e._tempPickingRay)),i,r,!0);return o&&(o.ray=Ie(e,t,s,v.Identity(),n||null)),o}(this,e,t,s,i,r)},N.prototype.pick=function(e,t,s,i,r,n,o=!1){return function(e,t,s,i,r,n,o){const a=ze(e,((i,r)=>(e._tempPickingRay||(e._tempPickingRay=Re.Zero()),De(e,t,s,i,e._tempPickingRay,n||null,!1,r),e._tempPickingRay)),i,r,!1,o);return a&&(a.ray=Ie(e,t,s,v.Identity(),n||null)),a}(this,e,t,s,i,r,n,o)},N.prototype.pickWithRay=function(e,t,s,i){return function(e,t,s,i,r){const n=ze(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=v.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=Re.Zero()),Re.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,i,!1,r);return n&&(n.ray=t),n}(this,e,t,s,i)},N.prototype.multiPick=function(e,t,s,i,r){return function(e,t,s,i,r,n){return Fe(e,(i=>Ie(e,t,s,i,r||null)),i,n)}(this,e,t,s,i,r)},N.prototype.multiPickWithRay=function(e,t,s){return function(e,t,s,i){return Fe(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=v.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=Re.Zero()),Re.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,i)}(this,e,t,s)},function(e){e[e.Color=2]="Color",e[e.UV=1]="UV",e[e.Random=0]="Random",e[e.Stated=3]="Stated"}(Ae||(Ae={}));class Be{get positions(){return this._positions32}get colors(){return this._colors32}get uvs(){return this._uvs32}constructor(e,t,s,i){this.particles=new Array,this.nbParticles=0,this.counter=0,this.vars={},this._promises=[],this._positions=new Array,this._indices=new Array,this._normals=new Array,this._colors=new Array,this._uvs=new Array,this._updatable=!0,this._isVisibilityBoxLocked=!1,this._alwaysVisible=!1,this._groups=new Array,this._groupCounter=0,this._computeParticleColor=!0,this._computeParticleTexture=!0,this._computeParticleRotation=!0,this._computeBoundingBox=!1,this._isReady=!1,this.name=e,this._size=t,this._scene=s||B.LastCreatedScene,i&&void 0!==i.updatable?this._updatable=i.updatable:this._updatable=!0}buildMeshAsync(e){return Promise.all(this._promises).then((()=>(this._isReady=!0,this._buildMesh(e))))}_buildMesh(e){0===this.nbParticles&&this.addPoints(1),this._positions32=new Float32Array(this._positions),this._uvs32=new Float32Array(this._uvs),this._colors32=new Float32Array(this._colors);const t=new T;t.set(this._positions32,m.PositionKind),this._uvs32.length>0&&t.set(this._uvs32,m.UVKind);let s=0;this._colors32.length>0&&(s=1,t.set(this._colors32,m.ColorKind));const i=new g(this.name,this._scene);t.applyToMesh(i,this._updatable),this.mesh=i,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);let r=e;return r||(r=new K("point cloud material",this._scene),r.emissiveColor=new O(s,s,s),r.disableLighting=!0,r.pointsCloud=!0,r.pointSize=this._size),i.material=r,new Promise((e=>e(i)))}_addParticle(e,t,s,i){const r=new Se(e,t,s,i,this);return this.particles.push(r),r}_randomUnitVector(e){e.position=new y(Math.random(),Math.random(),Math.random()),e.color=new E(1,1,1,1)}_getColorIndicesForCoord(e,t,s,i){const r=e._groupImageData,n=s*(4*i)+4*t,o=[n,n+1,n+2,n+3],a=o[1],c=o[2],l=o[3],u=r[o[0]],h=r[a],d=r[c],p=r[l];return new E(u/255,h/255,d/255,p)}_setPointsColorOrUV(e,t,s,i,r,n,o,a){a=a??0,s&&e.updateFacetData();const c=2*e.getBoundingInfo().boundingSphere.radius;let l=e.getVerticesData(m.PositionKind);const u=e.getIndices(),h=e.getVerticesData(m.UVKind+(a?a+1:"")),d=e.getVerticesData(m.ColorKind),p=y.Zero();e.computeWorldMatrix();const _=e.getWorldMatrix();if(!_.isIdentity()){l=l.slice(0);for(let e=0;e<l.length/3;e++)y.TransformCoordinatesFromFloatsToRef(l[3*e],l[3*e+1],l[3*e+2],_,p),l[3*e]=p.x,l[3*e+1]=p.y,l[3*e+2]=p.z}let f=0,x=0,g=0,v=0,T=0,w=0,P=0,A=0,C=0,b=0,S=0,M=0,R=0;const D=y.Zero(),V=y.Zero(),z=y.Zero(),F=y.Zero(),k=y.Zero();let B=0,U=0,L=0,N=0,G=0,X=0;const j=I.Zero(),Y=I.Zero(),H=I.Zero(),K=I.Zero(),q=I.Zero();let Q=0,J=0,$=0,ee=0,te=0,se=0,ie=0,re=0,ne=0,oe=0,ae=0,ce=0;const le=W.Zero(),ue=W.Zero(),he=W.Zero(),de=W.Zero(),pe=W.Zero();let _e,me,fe=0,xe=0;o=o||0;let ge=new W(0,0,0,0),ve=y.Zero(),ye=y.Zero(),Te=y.Zero(),we=0,Pe=y.Zero(),Ae=0,Ce=0;const be=new Re(y.Zero(),new y(1,0,0));let Se,Me=y.Zero();for(let a=0;a<u.length/3;a++){let p,_,m,I,W,Re,Ie,De;x=u[3*a],g=u[3*a+1],v=u[3*a+2],T=l[3*x],w=l[3*x+1],P=l[3*x+2],A=l[3*g],C=l[3*g+1],b=l[3*g+2],S=l[3*v],M=l[3*v+1],R=l[3*v+2],D.set(T,w,P),V.set(A,C,b),z.set(S,M,R),V.subtractToRef(D,F),z.subtractToRef(V,k),h&&(B=h[2*x],U=h[2*x+1],L=h[2*g],N=h[2*g+1],G=h[2*v],X=h[2*v+1],j.set(B,U),Y.set(L,N),H.set(G,X),Y.subtractToRef(j,K),H.subtractToRef(Y,q)),d&&i&&(Q=d[4*x],J=d[4*x+1],$=d[4*x+2],ee=d[4*x+3],te=d[4*g],se=d[4*g+1],ie=d[4*g+2],re=d[4*g+3],ne=d[4*v],oe=d[4*v+1],ae=d[4*v+2],ce=d[4*v+3],le.set(Q,J,$,ee),ue.set(te,se,ie,re),he.set(ne,oe,ae,ce),ue.subtractToRef(le,de),he.subtractToRef(ue,pe));const Ee=new O(0,0,0),Ve=new O(0,0,0);let ze,Fe;for(let l=0;l<t._groupDensity[a];l++)f=this.particles.length,this._addParticle(f,t,this._groupCounter,a+l),Fe=this.particles[f],fe=Math.sqrt(Z(0,1)),xe=Z(0,1),_e=D.add(F.scale(fe)).add(k.scale(fe*xe)),s&&(ve=e.getFacetNormal(a).normalize().scale(-1),ye=F.clone().normalize(),Te=y.Cross(ve,ye),we=Z(0,2*Math.PI),Pe=ye.scale(Math.cos(we)).add(Te.scale(Math.sin(we))),we=Z(.1,Math.PI/2),Me=Pe.scale(Math.cos(we)).add(ve.scale(Math.sin(we))),be.origin=_e.add(Me.scale(1e-5)),be.direction=Me,be.length=c,Se=be.intersectsMesh(e),Se.hit&&(Ce=Se.pickedPoint.subtract(_e).length(),Ae=Z(0,1)*Ce,_e.addInPlace(Me.scale(Ae)))),Fe.position=_e.clone(),this._positions.push(Fe.position.x,Fe.position.y,Fe.position.z),void 0!==i?h&&(me=j.add(K.scale(fe)).add(q.scale(fe*xe)),i?r&&null!==t._groupImageData?(p=t._groupImgWidth,_=t._groupImgHeight,ze=this._getColorIndicesForCoord(t,Math.round(me.x*p),Math.round(me.y*_),p),Fe.color=ze,this._colors.push(ze.r,ze.g,ze.b,ze.a)):d?(ge=le.add(de.scale(fe)).add(pe.scale(fe*xe)),Fe.color=new E(ge.x,ge.y,ge.z,ge.w),this._colors.push(ge.x,ge.y,ge.z,ge.w)):(ge=le.set(Math.random(),Math.random(),Math.random(),1),Fe.color=new E(ge.x,ge.y,ge.z,ge.w),this._colors.push(ge.x,ge.y,ge.z,ge.w)):(Fe.uv=me.clone(),this._uvs.push(Fe.uv.x,Fe.uv.y))):(n?(Ee.set(n.r,n.g,n.b),m=Z(-o,o),I=Z(-o,o),De=Ee.toHSV(),W=De.r,Re=De.g+m,Ie=De.b+I,Re<0&&(Re=0),Re>1&&(Re=1),Ie<0&&(Ie=0),Ie>1&&(Ie=1),O.HSVtoRGBToRef(W,Re,Ie,Ve),ge.set(Ve.r,Ve.g,Ve.b,1)):ge=le.set(Math.random(),Math.random(),Math.random(),1),Fe.color=new E(ge.x,ge.y,ge.z,ge.w),this._colors.push(ge.x,ge.y,ge.z,ge.w))}}_colorFromTexture(e,t,s){if(null===e.material)return A.Warn(e.name+"has no material."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const i=e.material.getActiveTextures();if(0===i.length)return A.Warn(e.name+"has no usable texture."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const r=e.clone();r.setEnabled(!1),this._promises.push(new Promise((e=>{G.WhenAllReady(i,(()=>{let n=t._textureNb;n<0&&(n=0),n>i.length-1&&(n=i.length-1);const o=()=>{t._groupImgWidth=i[n].getSize().width,t._groupImgHeight=i[n].getSize().height,this._setPointsColorOrUV(r,t,s,!0,!0,void 0,void 0,i[n].coordinatesIndex),r.dispose(),e()};t._groupImageData=null;const a=i[n].readPixels();a?a.then((e=>{t._groupImageData=e,o()})):o()}))})))}_calculateDensity(e,t,s){let i,r,n,o,a,c,l,u,h,d,p,_;const m=y.Zero(),f=y.Zero(),x=y.Zero(),g=y.Zero(),v=y.Zero(),T=y.Zero();let w;const P=[];let A=0;const C=s.length/3;for(let e=0;e<C;e++)i=s[3*e],r=s[3*e+1],n=s[3*e+2],o=t[3*i],a=t[3*i+1],c=t[3*i+2],l=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*n],p=t[3*n+1],_=t[3*n+2],m.set(o,a,c),f.set(l,u,h),x.set(d,p,_),f.subtractToRef(m,g),x.subtractToRef(f,v),y.CrossToRef(g,v,T),w=.5*T.length(),A+=w,P[e]=A;const b=new Array(C);let S=e;for(let e=C-1;e>0;e--){const t=P[e];if(0===t)b[e]=0;else{const s=(t-P[e-1])/t*S,i=Math.floor(s),r=s-i,n=i+Number(Math.random()<r);b[e]=n,S-=n}}return b[0]=S,b}addPoints(e,t=this._randomUnitVector){const s=new Me(this._groupCounter,t);let i,r=this.nbParticles;for(let t=0;t<e;t++)i=this._addParticle(r,s,this._groupCounter,t),s&&s._positionFunction&&s._positionFunction(i,r,t),this._positions.push(i.position.x,i.position.y,i.position.z),i.color&&this._colors.push(i.color.r,i.color.g,i.color.b,i.color.a),i.uv&&this._uvs.push(i.uv.x,i.uv.y),r++;return this.nbParticles+=e,this._groupCounter++,this._groupCounter}addSurfacePoints(e,t,s,i,r){let n=s||0;(isNaN(n)||n<0||n>3)&&(n=0);const o=e.getVerticesData(m.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new Me(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===n?c._textureNb=i||0:i=i||new E(1,1,1,1),n){case 2:this._colorFromTexture(e,c,!1);break;case 1:this._setPointsColorOrUV(e,c,!1,!1,!1);break;case 0:this._setPointsColorOrUV(e,c,!1);break;case 3:this._setPointsColorOrUV(e,c,!1,void 0,void 0,i,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}addVolumePoints(e,t,s,i,r){let n=s||0;(isNaN(n)||n<0||n>3)&&(n=0);const o=e.getVerticesData(m.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new Me(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===n?c._textureNb=i||0:i=i||new E(1,1,1,1),n){case 2:this._colorFromTexture(e,c,!0);break;case 1:this._setPointsColorOrUV(e,c,!0,!1,!1);break;case 0:this._setPointsColorOrUV(e,c,!0);break;case 3:this._setPointsColorOrUV(e,c,!0,void 0,void 0,i,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}setParticles(e=0,t=this.nbParticles-1,s=!0){if(!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(e,t,s);const i=P.Matrix[0],r=this.mesh,n=this._colors32,o=this._positions32,a=this._uvs32,c=P.Vector3,l=c[5].copyFromFloats(1,0,0),u=c[6].copyFromFloats(0,1,0),h=c[7].copyFromFloats(0,0,1),d=c[8].setAll(Number.MAX_VALUE),p=c[9].setAll(-Number.MAX_VALUE);v.IdentityToRef(i);let _=0;if(this.mesh?.isFacetDataEnabled&&(this._computeBoundingBox=!0),t=t>=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0!=e||t!=this.nbParticles-1)){const e=this.mesh?.getBoundingInfo();e&&(d.copyFrom(e.minimum),p.copyFrom(e.maximum))}_=0;let f=0,x=0,g=0;for(let s=e;s<=t;s++){const e=this.particles[s];_=e.idx,f=3*_,x=4*_,g=2*_,this.updateParticle(e);const t=e._rotationMatrix,r=e.position,n=e._globalPosition;this._computeParticleRotation&&e.getRotationMatrix(i);if(null!==e.parentId){const s=this.particles[e.parentId],o=s._rotationMatrix,a=s._globalPosition,c=r.x*o[1]+r.y*o[4]+r.z*o[7],l=r.x*o[0]+r.y*o[3]+r.z*o[6],u=r.x*o[2]+r.y*o[5]+r.z*o[8];if(n.x=a.x+l,n.y=a.y+c,n.z=a.z+u,this._computeParticleRotation){const e=i.m;t[0]=e[0]*o[0]+e[1]*o[3]+e[2]*o[6],t[1]=e[0]*o[1]+e[1]*o[4]+e[2]*o[7],t[2]=e[0]*o[2]+e[1]*o[5]+e[2]*o[8],t[3]=e[4]*o[0]+e[5]*o[3]+e[6]*o[6],t[4]=e[4]*o[1]+e[5]*o[4]+e[6]*o[7],t[5]=e[4]*o[2]+e[5]*o[5]+e[6]*o[8],t[6]=e[8]*o[0]+e[9]*o[3]+e[10]*o[6],t[7]=e[8]*o[1]+e[9]*o[4]+e[10]*o[7],t[8]=e[8]*o[2]+e[9]*o[5]+e[10]*o[8]}}else if(n.x=0,n.y=0,n.z=0,this._computeParticleRotation){const e=i.m;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10]}const a=c[11];e.translateFromPivot?a.setAll(0):a.copyFrom(e.pivot);const m=c[0];m.copyFrom(e.position);const v=m.x-e.pivot.x,y=m.y-e.pivot.y,T=m.z-e.pivot.z;let w=v*t[0]+y*t[3]+T*t[6],P=v*t[1]+y*t[4]+T*t[7],A=v*t[2]+y*t[5]+T*t[8];w+=a.x,P+=a.y,A+=a.z;const C=o[f]=n.x+l.x*w+u.x*P+h.x*A,b=o[f+1]=n.y+l.y*w+u.y*P+h.y*A,S=o[f+2]=n.z+l.z*w+u.z*P+h.z*A;if(this._computeBoundingBox&&(d.minimizeInPlaceFromFloats(C,b,S),p.maximizeInPlaceFromFloats(C,b,S)),this._computeParticleColor&&e.color){const t=e.color,s=this._colors32;s[x]=t.r,s[x+1]=t.g,s[x+2]=t.b,s[x+3]=t.a}if(this._computeParticleTexture&&e.uv){const t=e.uv,s=this._uvs32;s[g]=t.x,s[g+1]=t.y}}return r&&(s&&(this._computeParticleColor&&r.updateVerticesData(m.ColorKind,n,!1,!1),this._computeParticleTexture&&r.updateVerticesData(m.UVKind,a,!1,!1),r.updateVerticesData(m.PositionKind,o,!1,!1)),this._computeBoundingBox&&(r.hasBoundingInfo?r.getBoundingInfo().reConstruct(d,p,r._worldMatrix):r.buildBoundingInfo(d,p,r._worldMatrix))),this.afterUpdateParticles(e,t,s),this}dispose(){this.mesh?.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._uvs32=null,this._colors32=null}refreshVisibleSize(){return this._isVisibilityBoxLocked||this.mesh?.refreshBoundingInfo(),this}setVisibilityBox(e){if(!this.mesh)return;const t=e/2;this.mesh.buildBoundingInfo(new y(-t,-t,-t),new y(t,t,t))}get isAlwaysVisible(){return this._alwaysVisible}set isAlwaysVisible(e){this.mesh&&(this._alwaysVisible=e,this.mesh.alwaysSelectAsActiveMesh=e)}set computeParticleRotation(e){this._computeParticleRotation=e}set computeParticleColor(e){this._computeParticleColor=e}set computeParticleTexture(e){this._computeParticleTexture=e}get computeParticleColor(){return this._computeParticleColor}get computeParticleTexture(){return this._computeParticleTexture}set computeBoundingBox(e){this._computeBoundingBox=e}get computeBoundingBox(){return this._computeBoundingBox}initParticles(){}recycleParticle(e){return e}updateParticle(e){return e}beforeUpdateParticles(e,t,s){}afterUpdateParticles(e,t,s){}}!function(e){e[e.Splat=0]="Splat",e[e.PointCloud=1]="PointCloud",e[e.Mesh=2]="Mesh"}(Ce||(Ce={}));class Ue{constructor(e=Ue._DefaultLoadingOptions){this.name=X.name,this._assetContainer=null,this.extensions=X.extensions,this._loadingOptions=e}createPlugin(e){return new Ue(e[X.name])}async importMeshAsync(e,t,s,i,r,n){return this._parse(e,t,s,i).then((e=>({meshes:e,particleSystems:[],skeletons:[],animationGroups:[],transformNodes:[],geometries:[],lights:[],spriteManagers:[]})))}static _BuildPointCloud(e,t){if(!t.byteLength)return!1;const s=new Uint8Array(t),i=new Float32Array(t),r=s.length/32;return e.addPoints(r,(function(e,t){const r=i[8*t+0],n=i[8*t+1],o=i[8*t+2];e.position=new y(r,n,o);const a=s[32*t+24+0]/255,c=s[32*t+24+1]/255,l=s[32*t+24+2]/255;e.color=new E(a,c,l,1)})),!0}static _BuildMesh(e,t){const s=new g("PLYMesh",e),i=new Uint8Array(t.data),r=new Float32Array(t.data),n=i.length/32,o=[],a=new T;for(let e=0;e<n;e++){const t=r[8*e+0],s=r[8*e+1],i=r[8*e+2];o.push(t,s,i)}if(t.hasVertexColors){const e=new Float32Array(4*n);for(let t=0;t<n;t++){const s=i[32*t+24+0]/255,r=i[32*t+24+1]/255,n=i[32*t+24+2]/255;e[4*t+0]=s,e[4*t+1]=r,e[4*t+2]=n,e[4*t+3]=1}a.colors=e}return a.positions=o,a.indices=t.faces,a.applyToMesh(s),s}_parse(e,t,s,i){return Ue._ConvertPLYToSplat(s).then((async e=>{const s=[];switch(e.mode){case 0:{const i=new be("GaussianSplatting",null,t,this._loadingOptions.keepInRam);i._parentContainer=this._assetContainer,s.push(i),await i.updateDataAsync(e.data)}break;case 1:{const i=new Be("PointCloud",1,t);if(Ue._BuildPointCloud(i,e.data))return Promise.all([i.buildMeshAsync()]).then((e=>(s.push(e[0]),s)));i.dispose()}break;case 2:if(!e.faces)throw new Error("PLY mesh doesn't contain face informations.");s.push(Ue._BuildMesh(t,e));break;default:throw new Error("Unsupported Splat mode")}return new Promise((e=>{e(s)}))}))}loadAssetContainerAsync(e,t,s){const i=new H(e);return this._assetContainer=i,this.importMeshAsync(null,e,t,s).then((e=>(e.meshes.forEach((e=>i.meshes.push(e))),this._assetContainer=null,i))).catch((e=>{throw this._assetContainer=null,e}))}loadAsync(e,t,s){return this.importMeshAsync(null,e,t,s).then((()=>{}))}static _ConvertPLYToSplat(e){const t=new Uint8Array(e),s=(new TextDecoder).decode(t.slice(0,10240)),i="end_header\n",r=s.indexOf(i);if(r<0||!s)return new Promise((t=>{t({mode:0,data:e})}));const n=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element face (\d+)\n/.exec(s);let a=0;o&&(a=parseInt(o[1]));const c=/element chunk (\d+)\n/.exec(s);let l=0;c&&(l=parseInt(c[1]));let u=0,h=0;const d={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let p;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(p||(p={}));let _=1;const m=[],f=s.slice(0,r).split("\n");for(const e of f)if(e.startsWith("property ")){const[,t,s]=e.split(" ");1==_?h+=d[t]:0==_&&(m.push({name:s,type:t,offset:u}),u+=d[t]),d[t]||A.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?_=1:"vertex"==t&&(_=0)}const x=u,g=h;return be.ConvertPLYToSplatAsync(e).then((t=>{const s=new DataView(e,r+11);let i=g*l+x*n;const o=[];if(a)for(let e=0;e<a;e++){const e=s.getUint8(i);if(3==e){i+=1;for(let t=0;t<e;t++){const e=s.getUint32(i+4*(2-t),!0);o.push(e)}i+=12}}if(l)return new Promise((e=>{e({mode:0,data:t,faces:o,hasVertexColors:!1})}));let c=0,u=0;const h=["x","y","z","scale_0","scale_1","scale_2","opacity","rot_0","rot_1","rot_2","rot_3"],d=["red","green","blue","f_dc_0","f_dc_1","f_dc_2"];for(let e=0;e<m.length;e++){const t=m[e];h.includes(t.name)&&c++,d.includes(t.name)&&u++}const p=c==h.length&&3==u,_=a?2:p?0:1;return new Promise((e=>{e({mode:_,data:t,faces:o,hasVertexColors:!!u})}))}))}}Ue._DefaultLoadingOptions={keepInRam:!1},j(new Ue);export{Ue as SPLATFileLoader};
|
|
2
|
+
//# sourceMappingURL=splatFileLoader-zwiLbtie.esm.min.js.map
|