@babylonjs/viewer 7.29.0 → 7.30.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-B4Xt4AvY.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-B4Xt4AvY.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-BRvZpdd4.esm.js +172 -0
- package/dist/chunks/EXT_lights_image_based-BRvZpdd4.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-BqLQo4Vx.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-BqLQo4Vx.esm.min.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-ua5eHgOH.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-ua5eHgOH.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-CRDQWjAR.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-CRDQWjAR.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-W8L60mKL.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-W8L60mKL.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-D1fIwaNM.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-D1fIwaNM.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-p27vq5Yf.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-p27vq5Yf.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-BH7GGRed.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-BH7GGRed.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-CKV0mQmY.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-CKV0mQmY.esm.min.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-CJnenqsC.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-CJnenqsC.esm.min.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-CuWNhdYD.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-CuWNhdYD.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-B9MwkxxI.esm.js +343 -0
- package/dist/chunks/KHR_animation_pointer-B9MwkxxI.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-OKndtcZ4.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-OKndtcZ4.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-BfVEM6a3.esm.js +610 -0
- package/dist/chunks/KHR_draco_mesh_compression-BfVEM6a3.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-DVS_gHcG.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-DVS_gHcG.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-5quPuMwF.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-5quPuMwF.esm.js.map +1 -0
- package/dist/chunks/KHR_interactivity-XBa4dMpI.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-XBa4dMpI.esm.min.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-B7Rxkv7-.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-B7Rxkv7-.esm.min.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-CNwt0QLf.esm.js +1253 -0
- package/dist/chunks/KHR_lights_punctual-CNwt0QLf.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-BAFTyZiR.esm.js +64 -0
- package/dist/chunks/KHR_materials_anisotropy-BAFTyZiR.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-oViSetIs.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-oViSetIs.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-5qLT0AOT.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-5qLT0AOT.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-B1L15R_S.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-B1L15R_S.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-BS8lBPS0.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-BS8lBPS0.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-TevKWUOq.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-TevKWUOq.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-BQZSVfHy.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-BQZSVfHy.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-Cq9yaReu.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-Cq9yaReu.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-Ce346XXu.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-Ce346XXu.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-SHFGsIaq.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-SHFGsIaq.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-CTHicJIL.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-CTHicJIL.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-D5SP8TfG.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-D5SP8TfG.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-CTpiXRMt.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-CTpiXRMt.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-Lmm2mJIb.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-Lmm2mJIb.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BOA2n0lL.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BOA2n0lL.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B_cxOfAG.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B_cxOfAG.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-BeBV2f5V.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-BeBV2f5V.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-rEkwk_qf.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-rEkwk_qf.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-3QfzQZ4C.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-3QfzQZ4C.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-D60n51mC.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-D60n51mC.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-ChRPypfG.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-ChRPypfG.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-PcBf5srt.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-PcBf5srt.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-CeDIqHL0.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-CeDIqHL0.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-wEsp1t5U.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-wEsp1t5U.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-CkJeN1Gu.esm.js +238 -0
- package/dist/chunks/KHR_materials_variants-CkJeN1Gu.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-bRFFd4Z_.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-bRFFd4Z_.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-CWyybXGD.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-CWyybXGD.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-DeFCqj9d.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-DeFCqj9d.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-LWID2Hhs.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-LWID2Hhs.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-h74l2bXe.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-h74l2bXe.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-DuFmJTdG.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-DuFmJTdG.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-HVmBlv46.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-HVmBlv46.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-CrxnTEHA.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-CrxnTEHA.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-DQqJ1P3H.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-DQqJ1P3H.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-BlIyp160.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-BlIyp160.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-CdBV8pKC.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-CdBV8pKC.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-16nvoUyy.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-16nvoUyy.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-DWMijzpF.esm.js +2207 -0
- package/dist/chunks/MSFT_audio_emitter-DWMijzpF.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-BuMFATKv.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-BuMFATKv.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_lod-CylrxheB.esm.js +337 -0
- package/dist/chunks/MSFT_lod-CylrxheB.esm.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-A_gbARss.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-A_gbARss.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-DWRlrr0e.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-DWRlrr0e.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-D9OfsqP5.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-D9OfsqP5.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-DkKTM2sQ.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-DkKTM2sQ.esm.js.map +1 -0
- package/dist/chunks/animationGroup-BP53dhpk.esm.min.js +2 -0
- package/dist/chunks/animationGroup-BP53dhpk.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-ZEdzz7Rp.esm.js +2479 -0
- package/dist/chunks/animationGroup-ZEdzz7Rp.esm.js.map +1 -0
- package/dist/chunks/assetContainer-BrmmAQqf.esm.js +1720 -0
- package/dist/chunks/assetContainer-BrmmAQqf.esm.js.map +1 -0
- package/dist/chunks/assetContainer-EHiJBw6m.esm.min.js +2 -0
- package/dist/chunks/assetContainer-EHiJBw6m.esm.min.js.map +1 -0
- package/dist/chunks/audioEngine-Bl-V_xWs.esm.js +305 -0
- package/dist/chunks/audioEngine-Bl-V_xWs.esm.js.map +1 -0
- package/dist/chunks/audioEngine-C391rgB7.esm.min.js +2 -0
- package/dist/chunks/audioEngine-C391rgB7.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-CGiPluyk.esm.js +119 -0
- package/dist/chunks/bakedVertexAnimation-CGiPluyk.esm.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-Dge7hdZG.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-Dge7hdZG.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-Bc4P2Hq-.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-Bc4P2Hq-.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-C-qnWNed.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-C-qnWNed.esm.min.js.map +1 -0
- package/dist/chunks/dds-BG7k2xlh.esm.js +540 -0
- package/dist/chunks/dds-BG7k2xlh.esm.js.map +1 -0
- package/dist/chunks/dds-CuthKiJg.esm.min.js +2 -0
- package/dist/chunks/dds-CuthKiJg.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-9zLW4poX.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-9zLW4poX.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-DMd7ykRq.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-DMd7ykRq.esm.js.map +1 -0
- package/dist/chunks/decalFragment-D0g_uzVu.esm.js +18 -0
- package/dist/chunks/decalFragment-D0g_uzVu.esm.js.map +1 -0
- package/dist/chunks/decalFragment-Ddg15UlL.esm.min.js +2 -0
- package/dist/chunks/decalFragment-Ddg15UlL.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-9JSiYlCh.esm.min.js +2 -0
- package/dist/chunks/default.fragment-9JSiYlCh.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-BmwG-luV.esm.min.js +2 -0
- package/dist/chunks/default.fragment-BmwG-luV.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-DRQjxOwb.esm.js +449 -0
- package/dist/chunks/default.fragment-DRQjxOwb.esm.js.map +1 -0
- package/dist/chunks/default.fragment-Deigj0Q2.esm.js +515 -0
- package/dist/chunks/default.fragment-Deigj0Q2.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CH2XtSMw.esm.min.js +2 -0
- package/dist/chunks/default.vertex-CH2XtSMw.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-XL5Bzzg0.esm.min.js +2 -0
- package/dist/chunks/default.vertex-XL5Bzzg0.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-ho2YN-vx.esm.js +199 -0
- package/dist/chunks/default.vertex-ho2YN-vx.esm.js.map +1 -0
- package/dist/chunks/default.vertex-n2K0S1Zx.esm.js +180 -0
- package/dist/chunks/default.vertex-n2K0S1Zx.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-Bu1z_Z5I.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-Bu1z_Z5I.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DQJ-Joa1.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-DQJ-Joa1.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-SE8nYnOu.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-SE8nYnOu.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-eMXwSllo.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-eMXwSllo.esm.min.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
- package/dist/chunks/dumpTools-BA0AiO2-.esm.min.js +2 -0
- package/dist/chunks/dumpTools-BA0AiO2-.esm.min.js.map +1 -0
- package/dist/chunks/dumpTools-BeroMY8P.esm.js +401 -0
- package/dist/chunks/dumpTools-BeroMY8P.esm.js.map +1 -0
- package/dist/chunks/engine-BponnUEA.esm.js +2174 -0
- package/dist/chunks/engine-BponnUEA.esm.js.map +1 -0
- package/dist/chunks/engine-hvlYkRXH.esm.min.js +2 -0
- package/dist/chunks/engine-hvlYkRXH.esm.min.js.map +1 -0
- package/dist/chunks/engine.common-C-zFydIX.esm.min.js +2 -0
- package/dist/chunks/engine.common-C-zFydIX.esm.min.js.map +1 -0
- package/dist/chunks/engine.common-D9raApEJ.esm.js +1088 -0
- package/dist/chunks/engine.common-D9raApEJ.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-D1y2KvQy.esm.js +65 -0
- package/dist/chunks/envTextureLoader-D1y2KvQy.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-DJzPxg42.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-DJzPxg42.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-C4Fxqpe8.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-C4Fxqpe8.esm.js.map +1 -0
- package/dist/chunks/environmentTextureTools-DToTGSrH.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-DToTGSrH.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-DvL84Eax.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-DvL84Eax.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-q6eCg2vv.esm.js +1682 -0
- package/dist/chunks/exrTextureLoader-q6eCg2vv.esm.js.map +1 -0
- package/dist/chunks/fogFragment-B-SgDvU3.esm.min.js +2 -0
- package/dist/chunks/fogFragment-B-SgDvU3.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-n-fnZX94.esm.js +102 -0
- package/dist/chunks/fogFragment-n-fnZX94.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-B6PWvywn.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-B6PWvywn.esm.min.js.map +1 -0
- package/dist/chunks/fresnelFunction-D-whmVhn.esm.js +12 -0
- package/dist/chunks/fresnelFunction-D-whmVhn.esm.js.map +1 -0
- package/dist/chunks/glTFLoader-Dm9XfNeo.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-Dm9XfNeo.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-Xw19UZ20.esm.js +7562 -0
- package/dist/chunks/glTFLoader-Xw19UZ20.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-Bk4N1D9z.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-Bk4N1D9z.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-PL24R6Mg.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-PL24R6Mg.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-Bz6Qagd3.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-Bz6Qagd3.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-C1EkOgp3.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-C1EkOgp3.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-CDkb6KiL.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-CDkb6KiL.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-DVYeo2vE.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-DVYeo2vE.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-CuLmZKJK.esm.js +252 -0
- package/dist/chunks/hdrTextureLoader-CuLmZKJK.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-g5DTHiEG.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-g5DTHiEG.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-7JG-lsyn.esm.js +108 -0
- package/dist/chunks/helperFunctions-7JG-lsyn.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-BdzvbKSC.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-BdzvbKSC.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-C0y7EPxj.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-C0y7EPxj.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-Ddzd7G-L.esm.js +80 -0
- package/dist/chunks/helperFunctions-Ddzd7G-L.esm.js.map +1 -0
- package/dist/chunks/index-ClSS0i3r.esm.min.js +57 -0
- package/dist/chunks/index-ClSS0i3r.esm.min.js.map +1 -0
- package/dist/chunks/index-DzE-qoIA.esm.js +72021 -0
- package/dist/chunks/index-DzE-qoIA.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-C3ev8CyA.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-C3ev8CyA.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-lXvRBTya.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-lXvRBTya.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-9by0-jjx.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-9by0-jjx.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-B-8DXc3B.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-B-8DXc3B.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BeXo0BcS.esm.js +20 -0
- package/dist/chunks/logDepthDeclaration-BeXo0BcS.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BrAOAbMB.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-BrAOAbMB.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-B_oWUNEG.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-B_oWUNEG.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-CWz8hqId.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-CWz8hqId.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-CtgMxuTW.esm.js +77 -0
- package/dist/chunks/logDepthVertex-CtgMxuTW.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-DmlNzN_-.esm.js +488 -0
- package/dist/chunks/logDepthVertex-DmlNzN_-.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-3mZFgM2Y.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-3mZFgM2Y.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-BQImfxZc.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-BQImfxZc.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-D-QLXKpv.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-D-QLXKpv.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-DvRjgZbt.esm.js +24 -0
- package/dist/chunks/meshUboDeclaration-DvRjgZbt.esm.js.map +1 -0
- package/dist/chunks/objFileLoader-DClQXLHy.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-DClQXLHy.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-DjjND6jn.esm.js +1338 -0
- package/dist/chunks/objFileLoader-DjjND6jn.esm.js.map +1 -0
- package/dist/chunks/oitFragment-C9F7PGky.esm.js +1210 -0
- package/dist/chunks/oitFragment-C9F7PGky.esm.js.map +1 -0
- package/dist/chunks/oitFragment-CkqULQ2P.esm.js +1150 -0
- package/dist/chunks/oitFragment-CkqULQ2P.esm.js.map +1 -0
- package/dist/chunks/oitFragment-VzjooioR.esm.min.js +2 -0
- package/dist/chunks/oitFragment-VzjooioR.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-l1zYpRGk.esm.min.js +2 -0
- package/dist/chunks/oitFragment-l1zYpRGk.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-BIWANx5e.esm.js +15 -0
- package/dist/chunks/pass.fragment-BIWANx5e.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-DT7shxRk.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-DT7shxRk.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-DaW-t9oK.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-DaW-t9oK.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-f8kDdeJw.esm.js +15 -0
- package/dist/chunks/pass.fragment-f8kDdeJw.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-CoSdvQ8t.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-CoSdvQ8t.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-DD65SO1E.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-DD65SO1E.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-DWuVX98p.esm.js +3165 -0
- package/dist/chunks/pbr.fragment-DWuVX98p.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-PRP9y9HC.esm.js +3219 -0
- package/dist/chunks/pbr.fragment-PRP9y9HC.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-Ckrh7rKU.esm.js +210 -0
- package/dist/chunks/pbr.vertex-Ckrh7rKU.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-CsLrd0Yv.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-CsLrd0Yv.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-DpJSNiZg.esm.js +335 -0
- package/dist/chunks/pbr.vertex-DpJSNiZg.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-mhLIVycb.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-mhLIVycb.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-BbfEpvuD.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-BbfEpvuD.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-BhSMqTXY.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-BhSMqTXY.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-CuuqVRdu.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-CuuqVRdu.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-D3iGIN1h.esm.js +18 -0
- package/dist/chunks/postprocess.vertex-D3iGIN1h.esm.js.map +1 -0
- package/dist/chunks/rawTexture-zt95iEpe.esm.min.js +2 -0
- package/dist/chunks/rawTexture-zt95iEpe.esm.min.js.map +1 -0
- package/dist/chunks/rawTexture-zvoEayWf.esm.js +191 -0
- package/dist/chunks/rawTexture-zvoEayWf.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-Bj_jNFxi.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-Bj_jNFxi.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DchJ-wMV.esm.js +17 -0
- package/dist/chunks/rgbdDecode.fragment-DchJ-wMV.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-gnC9piGK.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-gnC9piGK.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-kNMM7IfV.esm.js +17 -0
- package/dist/chunks/rgbdDecode.fragment-kNMM7IfV.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BXMjseFJ.esm.js +17 -0
- package/dist/chunks/rgbdEncode.fragment-BXMjseFJ.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-Bc9j02e4.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-Bc9j02e4.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-DObDEzXe.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-DObDEzXe.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-DgDRT4Gd.esm.js +17 -0
- package/dist/chunks/rgbdEncode.fragment-DgDRT4Gd.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-BUtGja1v.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-BUtGja1v.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-D53T0YTp.esm.js +3534 -0
- package/dist/chunks/splatFileLoader-D53T0YTp.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-Dvhii-7v.esm.js +1809 -0
- package/dist/chunks/standardMaterial-Dvhii-7v.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-LF_eriLy.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-LF_eriLy.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-3SXw180V.esm.js +238 -0
- package/dist/chunks/stlFileLoader-3SXw180V.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-D1hHexdJ.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-D1hHexdJ.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-CN7-1ud6.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-CN7-1ud6.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-Dm6cp9Nf.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-Dm6cp9Nf.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-B8tKoyxK.esm.js +3721 -0
- package/dist/chunks/thinEngine-B8tKoyxK.esm.js.map +1 -0
- package/dist/chunks/thinEngine-BCXMjxvZ.esm.min.js +2 -0
- package/dist/chunks/thinEngine-BCXMjxvZ.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-CNjlSPEU.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-CNjlSPEU.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-C_RNveny.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-C_RNveny.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-G4bYfHKj.esm.js +528 -0
- package/dist/chunks/vertexColorMixing-G4bYfHKj.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-tDXsQPJJ.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-tDXsQPJJ.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-ChhJDb03.esm.js +11181 -0
- package/dist/chunks/webgpuEngine-ChhJDb03.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-DczCfHyB.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-DczCfHyB.esm.min.js.map +1 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
- package/docs/ViewerDefault.jpg +0 -0
- package/docs/ViewerParts.jpg +0 -0
- package/docs/ViewerSlots.jpg +0 -0
- package/docs/ViewerStyled.jpg +0 -0
- package/lib/index.d.ts +325 -0
- package/lib/index.js +1116 -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 -192
- 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 -350
- 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 -199
- 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 -21
- package/templating/plugins/hdButtonPlugin.js.map +0 -1
- package/templating/plugins/printButton.d.ts +0 -9
- package/templating/plugins/printButton.js +0 -40
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"postprocess.vertex-D3iGIN1h.esm.js","sources":["../../../../../dev/core/dist/Shaders/postprocess.vertex.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nconst name = \"postprocessVertexShader\";\nconst shader = `attribute vec2 position;uniform vec2 scale;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvUV=(position*madd+madd)*scale;gl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const postprocessVertexShader = { name, shader };\n//# sourceMappingURL=postprocess.vertex.js.map"],"names":[],"mappings":";;AAAA;AAEA,MAAM,IAAI,GAAG,yBAAyB,CAAC;AACvC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,CAAC;AACH;AACA,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC;AACY,MAAC,uBAAuB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{q as e,C as t}from"./index-ClSS0i3r.esm.min.js";class T extends e{constructor(T,E,r,R,_,i=!0,n=!1,A=t.TEXTURE_TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_UNSIGNED_INT,u,a){super(null,_,!i,n,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,u),this.format=R,this._engine&&(this._engine._caps.textureFloatLinearFiltering||s!==t.TEXTURETYPE_FLOAT||(A=t.TEXTURE_NEAREST_SAMPLINGMODE),this._engine._caps.textureHalfFloatLinearFiltering||s!==t.TEXTURETYPE_HALF_FLOAT||(A=t.TEXTURE_NEAREST_SAMPLINGMODE),this._texture=this._engine.createRawTexture(T,E,r,R,i,n,A,null,s,u??0,a??!1),this.wrapU=e.CLAMP_ADDRESSMODE,this.wrapV=e.CLAMP_ADDRESSMODE)}update(e){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type,this._texture._useSRGBBuffer)}clone(){if(!this._texture)return super.clone();const e=new T(null,this.getSize().width,this.getSize().height,this.format,this.getScene(),this._texture.generateMipMaps,this._invertY,this.samplingMode,this._texture.type,this._texture._creationFlags,this._useSRGBBuffer);return e._texture=this._texture,this._texture.incrementReferences(),e}static CreateLuminanceTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new T(e,E,r,t.TEXTUREFORMAT_LUMINANCE,R,_,i,n)}static CreateLuminanceAlphaTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new T(e,E,r,t.TEXTUREFORMAT_LUMINANCE_ALPHA,R,_,i,n)}static CreateAlphaTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new T(e,E,r,t.TEXTUREFORMAT_ALPHA,R,_,i,n)}static CreateRGBTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_INT,s=0,u=!1){return new T(e,E,r,t.TEXTUREFORMAT_RGB,R,_,i,n,A,s,u)}static CreateRGBATexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_INT,s=0,u=!1){return new T(e,E,r,t.TEXTUREFORMAT_RGBA,R,_,i,n,A,s,u)}static CreateRGBAStorageTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_INT,s=!1){return new T(e,E,r,t.TEXTUREFORMAT_RGBA,R,_,i,n,A,t.TEXTURE_CREATIONFLAG_STORAGE,s)}static CreateRTexture(E,r,R,_,i=!0,n=!1,A=e.TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_FLOAT){return new T(E,r,R,t.TEXTUREFORMAT_R,_,i,n,A,s)}static CreateRStorageTexture(E,r,R,_,i=!0,n=!1,A=e.TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_FLOAT){return new T(E,r,R,t.TEXTUREFORMAT_R,_,i,n,A,s,t.TEXTURE_CREATIONFLAG_STORAGE)}}export{T as R};
|
|
2
|
+
//# sourceMappingURL=rawTexture-zt95iEpe.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rawTexture-zt95iEpe.esm.min.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawTexture.js"],"sourcesContent":["import { Texture } from \"./texture\";\nimport { Constants } from \"../../Engines/constants\";\n/**\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n */\nexport class RawTexture extends Texture {\n /**\n * Instantiates a new RawTexture.\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n * @param data define the array of data to use to create the texture (null to create an empty texture)\n * @param width define the width of the texture\n * @param height define the height of the texture\n * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps define whether mip maps should be generated or not\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n */\n constructor(data, width, height, \n /**\n * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n */\n format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags, useSRGBBuffer) {\n super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);\n this.format = format;\n if (!this._engine) {\n return;\n }\n if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n /**\n * Updates the texture underlying data.\n * @param data Define the new data of the texture\n */\n update(data) {\n this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);\n }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n if (!this._texture) {\n return super.clone();\n }\n const rawTexture = new RawTexture(null, this.getSize().width, this.getSize().height, this.format, this.getScene(), this._texture.generateMipMaps, this._invertY, this.samplingMode, this._texture.type, this._texture._creationFlags, this._useSRGBBuffer);\n rawTexture._texture = this._texture;\n this._texture.incrementReferences();\n return rawTexture;\n }\n /**\n * Creates a luminance texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance texture\n */\n static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a luminance alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance alpha texture\n */\n static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates an alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the alpha texture\n */\n static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a RGB texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGB alpha texture\n */\n static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);\n }\n /**\n * Creates a R texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);\n }\n /**\n * Creates a R storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);\n }\n}\n//# sourceMappingURL=rawTexture.js.map"],"names":["RawTexture","Texture","constructor","data","width","height","format","sceneOrEngine","generateMipMaps","invertY","samplingMode","Constants","TEXTURE_TRILINEAR_SAMPLINGMODE","type","TEXTURETYPE_UNSIGNED_INT","creationFlags","useSRGBBuffer","super","undefined","this","_engine","_caps","textureFloatLinearFiltering","TEXTURETYPE_FLOAT","TEXTURE_NEAREST_SAMPLINGMODE","textureHalfFloatLinearFiltering","TEXTURETYPE_HALF_FLOAT","_texture","createRawTexture","wrapU","CLAMP_ADDRESSMODE","wrapV","update","_getEngine","updateRawTexture","_useSRGBBuffer","clone","rawTexture","getSize","getScene","_invertY","_creationFlags","incrementReferences","CreateLuminanceTexture","TEXTUREFORMAT_LUMINANCE","CreateLuminanceAlphaTexture","TEXTUREFORMAT_LUMINANCE_ALPHA","CreateAlphaTexture","TEXTUREFORMAT_ALPHA","CreateRGBTexture","TEXTUREFORMAT_RGB","CreateRGBATexture","TEXTUREFORMAT_RGBA","CreateRGBAStorageTexture","TEXTURE_CREATIONFLAG_STORAGE","CreateRTexture","TRILINEAR_SAMPLINGMODE","TEXTUREFORMAT_R","CreateRStorageTexture"],"mappings":"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"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { q as Texture, C as Constants } from './index-DzE-qoIA.esm.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Raw texture can help creating a texture directly from an array of data.
|
|
5
|
+
* This can be super useful if you either get the data from an uncompressed source or
|
|
6
|
+
* if you wish to create your texture pixel by pixel.
|
|
7
|
+
*/
|
|
8
|
+
class RawTexture extends Texture {
|
|
9
|
+
/**
|
|
10
|
+
* Instantiates a new RawTexture.
|
|
11
|
+
* Raw texture can help creating a texture directly from an array of data.
|
|
12
|
+
* This can be super useful if you either get the data from an uncompressed source or
|
|
13
|
+
* if you wish to create your texture pixel by pixel.
|
|
14
|
+
* @param data define the array of data to use to create the texture (null to create an empty texture)
|
|
15
|
+
* @param width define the width of the texture
|
|
16
|
+
* @param height define the height of the texture
|
|
17
|
+
* @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)
|
|
18
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
19
|
+
* @param generateMipMaps define whether mip maps should be generated or not
|
|
20
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
21
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
22
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
23
|
+
* @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
|
|
24
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
25
|
+
*/
|
|
26
|
+
constructor(data, width, height,
|
|
27
|
+
/**
|
|
28
|
+
* Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)
|
|
29
|
+
*/
|
|
30
|
+
format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags, useSRGBBuffer) {
|
|
31
|
+
super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);
|
|
32
|
+
this.format = format;
|
|
33
|
+
if (!this._engine) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {
|
|
37
|
+
samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
|
|
38
|
+
}
|
|
39
|
+
if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {
|
|
40
|
+
samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
|
|
41
|
+
}
|
|
42
|
+
this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);
|
|
43
|
+
this.wrapU = Texture.CLAMP_ADDRESSMODE;
|
|
44
|
+
this.wrapV = Texture.CLAMP_ADDRESSMODE;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Updates the texture underlying data.
|
|
48
|
+
* @param data Define the new data of the texture
|
|
49
|
+
*/
|
|
50
|
+
update(data) {
|
|
51
|
+
this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Clones the texture.
|
|
55
|
+
* @returns the cloned texture
|
|
56
|
+
*/
|
|
57
|
+
clone() {
|
|
58
|
+
if (!this._texture) {
|
|
59
|
+
return super.clone();
|
|
60
|
+
}
|
|
61
|
+
const rawTexture = new RawTexture(null, this.getSize().width, this.getSize().height, this.format, this.getScene(), this._texture.generateMipMaps, this._invertY, this.samplingMode, this._texture.type, this._texture._creationFlags, this._useSRGBBuffer);
|
|
62
|
+
rawTexture._texture = this._texture;
|
|
63
|
+
this._texture.incrementReferences();
|
|
64
|
+
return rawTexture;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Creates a luminance texture from some data.
|
|
68
|
+
* @param data Define the texture data
|
|
69
|
+
* @param width Define the width of the texture
|
|
70
|
+
* @param height Define the height of the texture
|
|
71
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
72
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
73
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
74
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
75
|
+
* @returns the luminance texture
|
|
76
|
+
*/
|
|
77
|
+
static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
|
|
78
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Creates a luminance alpha texture from some data.
|
|
82
|
+
* @param data Define the texture data
|
|
83
|
+
* @param width Define the width of the texture
|
|
84
|
+
* @param height Define the height of the texture
|
|
85
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
86
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
87
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
88
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
89
|
+
* @returns the luminance alpha texture
|
|
90
|
+
*/
|
|
91
|
+
static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
|
|
92
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Creates an alpha texture from some data.
|
|
96
|
+
* @param data Define the texture data
|
|
97
|
+
* @param width Define the width of the texture
|
|
98
|
+
* @param height Define the height of the texture
|
|
99
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
100
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
101
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
102
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
103
|
+
* @returns the alpha texture
|
|
104
|
+
*/
|
|
105
|
+
static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
|
|
106
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Creates a RGB texture from some data.
|
|
110
|
+
* @param data Define the texture data
|
|
111
|
+
* @param width Define the width of the texture
|
|
112
|
+
* @param height Define the height of the texture
|
|
113
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
114
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
115
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
116
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
117
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
118
|
+
* @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
|
|
119
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
120
|
+
* @returns the RGB alpha texture
|
|
121
|
+
*/
|
|
122
|
+
static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {
|
|
123
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Creates a RGBA texture from some data.
|
|
127
|
+
* @param data Define the texture data
|
|
128
|
+
* @param width Define the width of the texture
|
|
129
|
+
* @param height Define the height of the texture
|
|
130
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
131
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
132
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
133
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
134
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
135
|
+
* @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
|
|
136
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
137
|
+
* @returns the RGBA texture
|
|
138
|
+
*/
|
|
139
|
+
static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {
|
|
140
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Creates a RGBA storage texture from some data.
|
|
144
|
+
* @param data Define the texture data
|
|
145
|
+
* @param width Define the width of the texture
|
|
146
|
+
* @param height Define the height of the texture
|
|
147
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
148
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
149
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
150
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
151
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
152
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
153
|
+
* @returns the RGBA texture
|
|
154
|
+
*/
|
|
155
|
+
static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {
|
|
156
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Creates a R texture from some data.
|
|
160
|
+
* @param data Define the texture data
|
|
161
|
+
* @param width Define the width of the texture
|
|
162
|
+
* @param height Define the height of the texture
|
|
163
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
164
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
165
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
166
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
167
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
168
|
+
* @returns the R texture
|
|
169
|
+
*/
|
|
170
|
+
static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {
|
|
171
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Creates a R storage texture from some data.
|
|
175
|
+
* @param data Define the texture data
|
|
176
|
+
* @param width Define the width of the texture
|
|
177
|
+
* @param height Define the height of the texture
|
|
178
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
179
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
180
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
181
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
182
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
183
|
+
* @returns the R texture
|
|
184
|
+
*/
|
|
185
|
+
static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {
|
|
186
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export { RawTexture as R };
|
|
191
|
+
//# sourceMappingURL=rawTexture-zvoEayWf.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rawTexture-zvoEayWf.esm.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawTexture.js"],"sourcesContent":["import { Texture } from \"./texture\";\nimport { Constants } from \"../../Engines/constants\";\n/**\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n */\nexport class RawTexture extends Texture {\n /**\n * Instantiates a new RawTexture.\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n * @param data define the array of data to use to create the texture (null to create an empty texture)\n * @param width define the width of the texture\n * @param height define the height of the texture\n * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps define whether mip maps should be generated or not\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n */\n constructor(data, width, height, \n /**\n * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n */\n format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags, useSRGBBuffer) {\n super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);\n this.format = format;\n if (!this._engine) {\n return;\n }\n if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n /**\n * Updates the texture underlying data.\n * @param data Define the new data of the texture\n */\n update(data) {\n this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);\n }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n if (!this._texture) {\n return super.clone();\n }\n const rawTexture = new RawTexture(null, this.getSize().width, this.getSize().height, this.format, this.getScene(), this._texture.generateMipMaps, this._invertY, this.samplingMode, this._texture.type, this._texture._creationFlags, this._useSRGBBuffer);\n rawTexture._texture = this._texture;\n this._texture.incrementReferences();\n return rawTexture;\n }\n /**\n * Creates a luminance texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance texture\n */\n static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a luminance alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance alpha texture\n */\n static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates an alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the alpha texture\n */\n static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a RGB texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGB alpha texture\n */\n static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_INT, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);\n }\n /**\n * Creates a R texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);\n }\n /**\n * Creates a R storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);\n }\n}\n//# sourceMappingURL=rawTexture.js.map"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e}from"./index-ClSS0i3r.esm.min.js";import"./helperFunctions-BdzvbKSC.esm.min.js";const r="rgbdDecodePixelShader",n="varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}";e.ShadersStore[r]=n;const o={name:r,shader:n};export{o as rgbdDecodePixelShader};
|
|
2
|
+
//# sourceMappingURL=rgbdDecode.fragment-Bj_jNFxi.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbdDecode.fragment-Bj_jNFxi.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStore","rgbdDecodePixelShader"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,0MAMfC,EAAYC,aAAaH,GAAQC,EAErB,MAACG,EAAwB,CAAEJ,OAAMC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as ShaderStore } from './index-DzE-qoIA.esm.js';
|
|
2
|
+
import './helperFunctions-Ddzd7G-L.esm.js';
|
|
3
|
+
|
|
4
|
+
// Do not edit.
|
|
5
|
+
const name = "rgbdDecodePixelShader";
|
|
6
|
+
const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
|
|
7
|
+
#include<helperFunctions>
|
|
8
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
9
|
+
@fragment
|
|
10
|
+
fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;
|
|
11
|
+
// Sideeffect
|
|
12
|
+
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
13
|
+
/** @internal */
|
|
14
|
+
const rgbdDecodePixelShaderWGSL = { name, shader };
|
|
15
|
+
|
|
16
|
+
export { rgbdDecodePixelShaderWGSL };
|
|
17
|
+
//# sourceMappingURL=rgbdDecode.fragment-DchJ-wMV.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbdDecode.fragment-DchJ-wMV.esm.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,2JAA2J,CAAC,CAAC;AAC7J;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C;AACY,MAAC,yBAAyB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e}from"./index-ClSS0i3r.esm.min.js";import"./helperFunctions-C0y7EPxj.esm.min.js";const r="rgbdDecodePixelShader",t="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}";e.ShadersStoreWGSL[r]=t;const n={name:r,shader:t};export{n as rgbdDecodePixelShaderWGSL};
|
|
2
|
+
//# sourceMappingURL=rgbdDecode.fragment-gnC9piGK.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbdDecode.fragment-gnC9piGK.esm.min.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStoreWGSL","rgbdDecodePixelShaderWGSL"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,qUAMfC,EAAYC,iBAAiBH,GAAQC,EAEzB,MAACG,EAA4B,CAAEJ,OAAMC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as ShaderStore } from './index-DzE-qoIA.esm.js';
|
|
2
|
+
import './helperFunctions-7JG-lsyn.esm.js';
|
|
3
|
+
|
|
4
|
+
// Do not edit.
|
|
5
|
+
const name = "rgbdDecodePixelShader";
|
|
6
|
+
const shader = `varying vec2 vUV;uniform sampler2D textureSampler;
|
|
7
|
+
#include<helperFunctions>
|
|
8
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
9
|
+
void main(void)
|
|
10
|
+
{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;
|
|
11
|
+
// Sideeffect
|
|
12
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
13
|
+
/** @internal */
|
|
14
|
+
const rgbdDecodePixelShader = { name, shader };
|
|
15
|
+
|
|
16
|
+
export { rgbdDecodePixelShader };
|
|
17
|
+
//# sourceMappingURL=rgbdDecode.fragment-kNMM7IfV.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbdDecode.fragment-kNMM7IfV.esm.js","sources":["../../../../../dev/core/dist/Shaders/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,iEAAiE,CAAC,CAAC;AACnE;AACA,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC;AACY,MAAC,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as ShaderStore } from './index-DzE-qoIA.esm.js';
|
|
2
|
+
import './helperFunctions-Ddzd7G-L.esm.js';
|
|
3
|
+
|
|
4
|
+
// Do not edit.
|
|
5
|
+
const name = "rgbdEncodePixelShader";
|
|
6
|
+
const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
|
|
7
|
+
#include<helperFunctions>
|
|
8
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
9
|
+
@fragment
|
|
10
|
+
fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;
|
|
11
|
+
// Sideeffect
|
|
12
|
+
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
13
|
+
/** @internal */
|
|
14
|
+
const rgbdEncodePixelShaderWGSL = { name, shader };
|
|
15
|
+
|
|
16
|
+
export { rgbdEncodePixelShaderWGSL };
|
|
17
|
+
//# sourceMappingURL=rgbdEncode.fragment-BXMjseFJ.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbdEncode.fragment-BXMjseFJ.esm.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,kJAAkJ,CAAC,CAAC;AACpJ;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C;AACY,MAAC,yBAAyB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e}from"./index-ClSS0i3r.esm.min.js";import"./helperFunctions-C0y7EPxj.esm.min.js";const r="rgbdEncodePixelShader",t="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}";e.ShadersStoreWGSL[r]=t;const n={name:r,shader:t};export{n as rgbdEncodePixelShaderWGSL};
|
|
2
|
+
//# sourceMappingURL=rgbdEncode.fragment-Bc9j02e4.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbdEncode.fragment-Bc9j02e4.esm.min.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStoreWGSL","rgbdEncodePixelShaderWGSL"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,4TAMfC,EAAYC,iBAAiBH,GAAQC,EAEzB,MAACG,EAA4B,CAAEJ,OAAMC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e}from"./index-ClSS0i3r.esm.min.js";import"./helperFunctions-BdzvbKSC.esm.min.js";const r="rgbdEncodePixelShader",n="varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}";e.ShadersStore[r]=n;const o={name:r,shader:n};export{o as rgbdEncodePixelShader};
|
|
2
|
+
//# sourceMappingURL=rgbdEncode.fragment-DObDEzXe.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbdEncode.fragment-DObDEzXe.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStore","rgbdEncodePixelShader"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,kMAMfC,EAAYC,aAAaH,GAAQC,EAErB,MAACG,EAAwB,CAAEJ,OAAMC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { i as ShaderStore } from './index-DzE-qoIA.esm.js';
|
|
2
|
+
import './helperFunctions-7JG-lsyn.esm.js';
|
|
3
|
+
|
|
4
|
+
// Do not edit.
|
|
5
|
+
const name = "rgbdEncodePixelShader";
|
|
6
|
+
const shader = `varying vec2 vUV;uniform sampler2D textureSampler;
|
|
7
|
+
#include<helperFunctions>
|
|
8
|
+
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
9
|
+
void main(void)
|
|
10
|
+
{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;
|
|
11
|
+
// Sideeffect
|
|
12
|
+
ShaderStore.ShadersStore[name] = shader;
|
|
13
|
+
/** @internal */
|
|
14
|
+
const rgbdEncodePixelShader = { name, shader };
|
|
15
|
+
|
|
16
|
+
export { rgbdEncodePixelShader };
|
|
17
|
+
//# sourceMappingURL=rgbdEncode.fragment-DgDRT4Gd.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgbdEncode.fragment-DgDRT4Gd.esm.js","sources":["../../../../../dev/core/dist/Shaders/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,yDAAyD,CAAC,CAAC;AAC3D;AACA,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC;AACY,MAAC,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,R as t,x as i,y as s,z as r,H as o,J as n,K as a,N as c,Q as l,W as h,X as u,Y as d,Z as p,_ as m,V as _,M as f,$ as x,t as g,v as y,a0 as T,a1 as v,L as b,T as w,s as P,a2 as R,C as M,k as C,a3 as A,a4 as I,a5 as k,E as z,a6 as V,a7 as F,a8 as S,p as D,a9 as B,aa as U,B as E,ab as L,ac as W,ad as Z,w as N}from"./index-ClSS0i3r.esm.min.js";import"./fogFragment-B-SgDvU3.esm.min.js";import"./logDepthDeclaration-BrAOAbMB.esm.min.js";import"./logDepthVertex-B_oWUNEG.esm.min.js";import{R as O}from"./rawTexture-zt95iEpe.esm.min.js";import"./thinInstanceMesh-C_RNveny.esm.min.js";import{A as G}from"./assetContainer-EHiJBw6m.esm.min.js";import{S as j}from"./standardMaterial-LF_eriLy.esm.min.js";e.ShadersStore.gaussianSplattingPixelShader="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vec4 vColor;varying vec2 vPosition;void main () { \n#include<clipPlaneFragment>\nfloat A=-dot(vPosition,vPosition);if (A<-4.0) discard;float B=exp(A)*vColor.a;\n#include<logDepthFragment>\nvec3 color=vColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\ngl_FragColor=vec4(color,B);}\n";e.IncludesShadersStore.gaussianSplattingVertexDeclaration="uniform mat4 world;uniform mat4 view;uniform mat4 projection;\n";e.IncludesShadersStore.gaussianSplattingUboDeclaration="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n";e.ShadersStore.gaussianSplattingVertexShader="#include<__decl__gaussianSplattingVertex>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute vec2 position;attribute 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#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);}\nvoid main () {vec2 splatUV=getDataUV(splatIndex,dataTextureSize);vec3 center=texture2D(centersTexture,splatUV).xyz;vec4 color=texture2D(colorsTexture,splatUV);vec3 covA=texture2D(covariancesATexture,splatUV).xyz;vec3 covB=texture2D(covariancesBTexture,splatUV).xyz;vec4 worldPos=world*vec4(center,1.0);mat4 modelView=view*world;vec4 camspace=view*worldPos;vec4 pos2d=projection*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) {gl_Position=vec4(0.0,0.0,2.0,1.0);return;}\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) return;vec2 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);vColor=color;vPosition=position;vec2 vCenter=vec2(pos2d);gl_Position=vec4(\nvCenter \n+ (position.x*majorAxis\n+ position.y*minorAxis)*invViewport*pos2d.w,pos2d.zw);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";class H extends m{constructor(){super(),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.rebuild()}}class X extends i{constructor(e,t){super(e,t),this.backFaceCulling=!1}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(e,t){const i=!0,l=t._drawWrapper;if(l.effect&&this.isFrozen&&l._wasPreviouslyReady&&l._wasPreviouslyUsingInstances===i)return!0;t.materialDefines||(t.materialDefines=new H);const h=this.getScene(),u=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;const d=h.getEngine();if(s(e,h,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,u),r(h,d,this,u,i,null,!0),o(e,u,!1,!1),u.isDirty){u.markAsProcessed(),h.resetCachedMaterial();const e=[_.PositionKind,"splatIndex"];n(e,u);const i=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal"],s=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture"],r=["Scene","Mesh"];a({uniformsNames:i,uniformBuffersNames:r,samplers:s,defines:u}),c(i);const o=u.toString(),l=h.getEngine().createEffect("gaussianSplatting",{attributes:e,uniformsNames:i,uniformBuffersNames:r,samplers:s,defines:o,onCompiled:this.onCompiled,onError:this.onError},d);t.setEffect(l,u,this._materialContext)}return!(!t.effect||!t.effect.isReady())&&(u._renderId=h.getRenderId(),l._wasPreviouslyReady=!0,l._wasPreviouslyUsingInstances=i,!0)}bindForSubMesh(e,t,i){const s=this.getScene(),r=i.materialDefines;if(!r)return;const o=i.effect;if(!o)return;this._activeEffect=o,t.getMeshUniformBuffer().bindToEffect(o,"Mesh"),t.transferToEffect(e);if(this._mustRebind(s,o,i,t.visibility)){this.bindView(o),this.bindViewProjection(o);const e=s.getEngine(),i=this.getScene().activeCamera,r=e.getRenderWidth(),n=e.getRenderHeight(),a=i?.rigParent?.rigCameras.length||1;this._activeEffect.setFloat2("invViewport",1/(r/a),1/n);let c=1e3;if(i){const e=i.getProjectionMatrix().m[5];c=i.fovMode==l.FOVMODE_VERTICAL_FIXED?n*e/2:r*e/2}this._activeEffect.setFloat2("focal",c,c);const u=t;if(u.covariancesATexture){const e=u.covariancesATexture.getSize();o.setFloat2("dataTextureSize",e.width,e.height),o.setTexture("covariancesATexture",u.covariancesATexture),o.setTexture("covariancesBTexture",u.covariancesBTexture),o.setTexture("centersTexture",u.centersTexture),o.setTexture("colorsTexture",u.colorsTexture)}h(o,this,s)}else s.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0);u(s,t,o),this.useLogarithmicDepth&&d(r,o,s),this._afterBind(t,this._activeEffect,i)}clone(e){return p.Clone((()=>new X(e,this.getScene())),this)}serialize(){const e=super.serialize();return e.customType="BABYLON.GaussianSplattingMaterial",e}getClassName(){return"GaussianSplattingMaterial"}static Parse(e,t,i){return p.Parse((()=>new X(e.name,t)),e,t,i)}}t("BABYLON.GaussianSplattingMaterial",X);class K extends f{get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}constructor(e,t=null,i=null,s=!1){super(e,i),this._vertexCount=0,this._worker=null,this._frameIdLastUpdate=-1,this._modelViewMatrix=x.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._splatPositions=null,this._splatIndex=null,this._covariancesA=null,this._covariancesB=null,this._colors=null,this._keepInRam=!1,this._delayedTextureUpdate=null,this._oldDirection=new g;const r=new y;r.positions=[-2,-2,0,2,-2,0,2,2,0,-2,2,0],r.indices=[0,1,2,0,2,3],r.applyToMesh(this),this.subMeshes=[],new T(0,0,4,0,6,this),this.setEnabled(!1),this._keepInRam=s,t&&this.loadFileAsync(t),this.material=new X(this.name+"_material",this._scene)}getClassName(){return"GaussianSplattingMesh"}getTotalVertices(){return this._vertexCount}isReady(e=!1){return!!super.isReady(e,!0)&&(!!this._readyToDisplay||(this._postToWorker(!0),!1))}_postToWorker(e=!1){const t=this.getScene().getFrameId();if(t!==this._frameIdLastUpdate&&this._worker&&this._scene.activeCamera&&this._canPostToWorker){const i=this._scene.activeCamera.getViewMatrix();this.getWorldMatrix().multiplyToRef(i,this._modelViewMatrix),i.invertToRef(v.Matrix[0]),this.getWorldMatrix().multiplyToRef(v.Matrix[0],v.Matrix[1]),g.TransformNormalToRef(g.Forward(this._scene.useRightHandedSystem),v.Matrix[1],v.Vector3[2]),v.Vector3[2].normalize();const s=g.Dot(v.Vector3[2],this._oldDirection);(e||Math.abs(s-1)>=.01)&&(this._oldDirection.copyFrom(v.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,i){return this._postToWorker(),super.render(e,t,i)}static ConvertPLYToSplat(e){const t=new Uint8Array(e),i=(new TextDecoder).decode(t.slice(0,10240)),s="end_header\n",r=i.indexOf(s);if(r<0||!i)return e;const o=parseInt(/element vertex (\d+)\n/.exec(i)[1]);let n=0;const a={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1},c=[],l=i.slice(0,r).split("\n").filter((e=>e.startsWith("property ")));for(const e of l){const[,t,i]=e.split(" ");if(c.push({name:i,type:t,offset:n}),!a[t])return b.Error(`Unsupported property type: ${t}. Are you sure it's a valid Gaussian Splatting file?`),new ArrayBuffer(0);n+=a[t]}const h=.28209479177387814,u=new DataView(e,r+11),d=new ArrayBuffer(32*o),p=new R;for(let e=0;e<o;e++){const t=new Float32Array(d,32*e,3),i=new Float32Array(d,32*e+12,3),s=new Uint8ClampedArray(d,32*e+24,4),r=new Uint8ClampedArray(d,32*e+28,4);let o=255,a=0,l=0,m=0;for(let r=0;r<c.length;r++){const d=c[r];let p;switch(d.type){case"float":p=u.getFloat32(d.offset+e*n,!0);break;case"int":p=u.getInt32(d.offset+e*n,!0);break;default:throw new Error(`Unsupported property type: ${d.type}`)}switch(d.name){case"x":t[0]=p;break;case"y":t[1]=p;break;case"z":t[2]=p;break;case"scale_0":i[0]=Math.exp(p);break;case"scale_1":i[1]=Math.exp(p);break;case"scale_2":i[2]=Math.exp(p);break;case"red":s[0]=p;break;case"green":s[1]=p;break;case"blue":s[2]=p;break;case"f_dc_0":s[0]=255*(.5+h*p);break;case"f_dc_1":s[1]=255*(.5+h*p);break;case"f_dc_2":s[2]=255*(.5+h*p);break;case"f_dc_3":s[3]=255*(.5+h*p);break;case"opacity":s[3]=1/(1+Math.exp(-p))*255;break;case"rot_0":o=p;break;case"rot_1":a=p;break;case"rot_2":l=p;break;case"rot_3":m=p}}p.set(a,l,m,o),p.normalize(),r[0]=128*p.w+128,r[1]=128*p.x+128,r[2]=128*p.y+128,r[3]=128*p.z+128}return d}loadDataAsync(e){return Promise.resolve(this._loadData(e))}loadFileAsync(e){return w.LoadFileAsync(e,!0).then((e=>{this._loadData(K.ConvertPLYToSplat(e))}))}dispose(e){this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._worker?.terminate(),this._worker=null,super.dispose(e,!0)}_copyTextures(e){this._covariancesATexture=e.covariancesATexture?.clone(),this._covariancesBTexture=e.covariancesBTexture?.clone(),this._centersTexture=e.centersTexture?.clone(),this._colorsTexture=e.colorsTexture?.clone()}clone(e=""){const t=new K(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewMatrix=x.Identity(),t._splatPositions=this._splatPositions,t._readyToDisplay=!1,t._instanciateWorker();const i=this.getBoundingInfo();return t.getBoundingInfo().reConstruct(i.minimum,i.maximum,this.getWorldMatrix()),t.forcedInstanceCount=t._vertexCount,t.setEnabled(!0),t}updateData(e){if(!e.byteLength)return;this._covariancesATexture||(this._readyToDisplay=!1);const t=new Uint8Array(e),i=new Float32Array(t.buffer),s=t.length/32;s!=this._vertexCount&&this._updateSplatIndexBuffer(s),this._vertexCount=s;const r=this._getTextureSize(s),o=r.x*r.y;this._splatPositions=new Float32Array(3*o);const n=new Float32Array(3*o),a=new Float32Array(3*o),c=v.Matrix[0],l=v.Matrix[1],h=v.Quaternion[0],u=new g(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=new g(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let e=0;e<s;e++){const s=i[8*e+0],r=-i[8*e+1],o=i[8*e+2];this._splatPositions[3*e+0]=s,this._splatPositions[3*e+1]=r,this._splatPositions[3*e+2]=o,u.minimizeInPlaceFromFloats(s,r,o),d.maximizeInPlaceFromFloats(s,r,o),h.set((t[32*e+28+1]-128)/128,(t[32*e+28+2]-128)/128,(t[32*e+28+3]-128)/128,-(t[32*e+28+0]-128)/128),h.toRotationMatrix(c),x.ScalingToRef(2*i[8*e+3+0],2*i[8*e+3+1],2*i[8*e+3+2],l);const p=c.multiplyToRef(l,v.Matrix[0]).m;n[3*e+0]=p[0]*p[0]+p[1]*p[1]+p[2]*p[2],n[3*e+1]=p[0]*p[4]+p[1]*p[5]+p[2]*p[6],n[3*e+2]=p[0]*p[8]+p[1]*p[9]+p[2]*p[10],a[3*e+0]=p[4]*p[4]+p[5]*p[5]+p[6]*p[6],a[3*e+1]=p[4]*p[8]+p[5]*p[9]+p[6]*p[10],a[3*e+2]=p[8]*p[8]+p[9]*p[9]+p[10]*p[10]}this.getBoundingInfo().reConstruct(u,d,this.getWorldMatrix()),this.setEnabled(!0);const p=(e,t,i,s)=>new O(e,t,i,s,this._scene,!1,!1,M.TEXTURE_BILINEAR_SAMPLINGMODE,M.TEXTURETYPE_FLOAT),m=e=>{const t=e.length/3,i=new Float32Array(4*t);for(let s=0;s<t;++s)i[4*s+0]=e[3*s+0],i[4*s+1]=e[3*s+1],i[4*s+2]=e[3*s+2],i[4*s+3]=1;return i},_=new Float32Array(r.x*r.y*4);for(let e=0;e<this._vertexCount;++e)_[4*e+0]=t[32*e+24+0]/255,_[4*e+1]=t[32*e+24+1]/255,_[4*e+2]=t[32*e+24+2]/255,_[4*e+3]=t[32*e+24+3]/255;if(this._keepInRam&&(this._covariancesA=n,this._covariancesB=a,this._colors=_),this._covariancesATexture){this._delayedTextureUpdate={covA:m(n),covB:m(a),colors:_,centers:m(this._splatPositions)};const e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({positions:e,vertexCount:t},[e.buffer]),this._postToWorker(!0)}else this._covariancesATexture=p(m(n),r.x,r.y,M.TEXTUREFORMAT_RGBA),this._covariancesBTexture=p(m(a),r.x,r.y,M.TEXTUREFORMAT_RGBA),this._centersTexture=p(m(this._splatPositions),r.x,r.y,M.TEXTUREFORMAT_RGBA),this._colorsTexture=p(_,r.x,r.y,M.TEXTUREFORMAT_RGBA),this._instanciateWorker()}_loadData(e){e.byteLength&&this.updateData(e)}_updateSplatIndexBuffer(e){(!this._splatIndex||e>this._splatIndex.length)&&(this._splatIndex=new Float32Array(e),this.thinInstanceSetBuffer("splatIndex",this._splatIndex,1,!1)),this.forcedInstanceCount=e}_instanciateWorker(){if(!this._vertexCount)return;this._updateSplatIndexBuffer(this._vertexCount),this._worker?.terminate(),this._worker=new Worker(URL.createObjectURL(new Blob(["(",K._CreateWorker.toString(),")(self)"],{type:"application/javascript"}))),this._depthMix=new BigInt64Array(this._vertexCount);const e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({positions:e,vertexCount:t},[e.buffer]),this._worker.onmessage=e=>{this._depthMix=e.data.depthMix;const i=new Uint32Array(e.data.depthMix.buffer);if(this._splatIndex)for(let e=0;e<this._vertexCount;e++)this._splatIndex[e]=i[2*e];if(this._delayedTextureUpdate){const e=(e,t,i,s)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,0,i,s,0,0,!1)},i=this._getTextureSize(t);e(this._covariancesATexture,this._delayedTextureUpdate.covA,i.x,i.y),e(this._covariancesBTexture,this._delayedTextureUpdate.covB,i.x,i.y),e(this._centersTexture,this._delayedTextureUpdate.centers,i.x,i.y),e(this._colorsTexture,this._delayedTextureUpdate.colors,i.x,i.y),this._delayedTextureUpdate=null}this.thinInstanceBufferUpdated("splatIndex"),this._canPostToWorker=!0,this._readyToDisplay=!0}}_getTextureSize(e){const t=this._scene.getEngine(),i=t.getCaps().maxTextureSize;let s=1;if(1!==t.version||t.isWebGPU)s=Math.ceil(e/i);else for(;i*s<e;)s*=2;return s>i&&(b.Error("GaussianSplatting texture size: ("+i+", "+s+"), maxTextureSize: "+i),s=i),new P(i,s)}}K._CreateWorker=function(e){let t,i,s,r,o=0;e.onmessage=n=>{if(n.data.positions)t=n.data.positions,o=n.data.vertexCount;else{const a=n.data.view;if(!t||!a)throw new Error("positions or view is not defined!");i=n.data.depthMix,s=new Uint32Array(i.buffer),r=new Float32Array(i.buffer);for(let e=0;e<o;e++)s[2*e]=e;let c=-1;n.data.useRightHandedSystem&&(c=1);for(let e=0;e<o;e++)r[2*e+1]=1e4+(a[2]*t[3*e+0]+a[6]*t[3*e+1]+a[10]*t[3*e+2])*c;i.sort(),e.postMessage({depthMix:i},[i.buffer])}}};class Y{constructor(e,t,i,s,r){this.idx=0,this.color=new C(1,1,1,1),this.position=g.Zero(),this.rotation=g.Zero(),this.uv=new P(0,0),this.velocity=g.Zero(),this.pivot=g.Zero(),this.translateFromPivot=!1,this._pos=0,this._ind=0,this.groupId=0,this.idxInGroup=0,this._stillInvisible=!1,this._rotationMatrix=[1,0,0,0,1,0,0,0,1],this.parentId=null,this._globalPosition=g.Zero(),this.idx=e,this._group=t,this.groupId=i,this.idxInGroup=s,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 i=e.getBoundingInfo().boundingBox,s=i.maximumWorld.x,r=i.minimumWorld.x,o=i.maximumWorld.y,n=i.minimumWorld.y,a=i.maximumWorld.z,c=i.minimumWorld.z,l=this.position.x+this._pcs.mesh.position.x,h=this.position.y+this._pcs.mesh.position.y,u=this.position.z+this._pcs.mesh.position.z;return r<=l&&l<=s&&n<=h&&h<=o&&c<=u&&u<=a}getRotationMatrix(e){let t;if(this.rotationQuaternion)t=this.rotationQuaternion;else{t=v.Quaternion[0];const e=this.rotation;R.RotationYawPitchRollToRef(e.y,e.x,e.z,t)}t.toRotationMatrix(e)}}class q{get groupID(){return this.groupId}set groupID(e){this.groupId=e}constructor(e,t){this.groupId=e,this._positionFunction=t}}class Q{constructor(e,t,i=Number.MAX_VALUE,s=I){this.origin=e,this.direction=t,this.length=i,this.epsilon=s}clone(){return new Q(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(e,t,i=0){const s=Q._TmpVector3[0].copyFromFloats(e.x-i,e.y-i,e.z-i),r=Q._TmpVector3[1].copyFromFloats(t.x+i,t.y+i,t.z+i);let o,n,a,c,l=0,h=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<s.x||this.origin.x>r.x)return!1}else if(o=1/this.direction.x,n=(s.x-this.origin.x)*o,a=(r.x-this.origin.x)*o,a===-1/0&&(a=1/0),n>a&&(c=n,n=a,a=c),l=Math.max(n,l),h=Math.min(a,h),l>h)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<s.y||this.origin.y>r.y)return!1}else if(o=1/this.direction.y,n=(s.y-this.origin.y)*o,a=(r.y-this.origin.y)*o,a===-1/0&&(a=1/0),n>a&&(c=n,n=a,a=c),l=Math.max(n,l),h=Math.min(a,h),l>h)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<s.z||this.origin.z>r.z)return!1}else if(o=1/this.direction.z,n=(s.z-this.origin.z)*o,a=(r.z-this.origin.z)*o,a===-1/0&&(a=1/0),n>a&&(c=n,n=a,a=c),l=Math.max(n,l),h=Math.min(a,h),l>h)return!1;return!0}intersectsBox(e,t=0){return this.intersectsBoxMinMax(e.minimum,e.maximum,t)}intersectsSphere(e,t=0){const i=e.center.x-this.origin.x,s=e.center.y-this.origin.y,r=e.center.z-this.origin.z,o=i*i+s*s+r*r,n=e.radius+t,a=n*n;if(o<=a)return!0;const c=i*this.direction.x+s*this.direction.y+r*this.direction.z;if(c<0)return!1;return o-c*c<=a}intersectsTriangle(e,t,i){const s=Q._TmpVector3[0],r=Q._TmpVector3[1],o=Q._TmpVector3[2],n=Q._TmpVector3[3],a=Q._TmpVector3[4];t.subtractToRef(e,s),i.subtractToRef(e,r),g.CrossToRef(this.direction,r,o);const c=g.Dot(s,o);if(0===c)return null;const l=1/c;this.origin.subtractToRef(e,n);const h=g.Dot(n,o)*l;if(h<-this.epsilon||h>1+this.epsilon)return null;g.CrossToRef(n,s,a);const u=g.Dot(this.direction,a)*l;if(u<-this.epsilon||h+u>1+this.epsilon)return null;const d=g.Dot(r,a)*l;return d>this.length?null:new k(1-h-u,h,d)}intersectsPlane(e){let t;const i=g.Dot(e.normal,this.direction);if(Math.abs(i)<9.99999997475243e-7)return null;{const s=g.Dot(e.normal,this.origin);return t=(-e.d-s)/i,t<0?t<-9.99999997475243e-7?null:0:t}}intersectsAxis(e,t=0){switch(e){case"y":{const e=(this.origin.y-t)/this.direction.y;return e>0?null:new g(this.origin.x+this.direction.x*-e,t,this.origin.z+this.direction.z*-e)}case"x":{const e=(this.origin.x-t)/this.direction.x;return e>0?null:new g(t,this.origin.y+this.direction.y*-e,this.origin.z+this.direction.z*-e)}case"z":{const e=(this.origin.z-t)/this.direction.z;return e>0?null:new g(this.origin.x+this.direction.x*-e,this.origin.y+this.direction.y*-e,t)}default:return null}}intersectsMesh(e,t,i,s=!1,r,o=!1){const n=v.Matrix[0];return e.getWorldMatrix().invertToRef(n),this._tmpRay?Q.TransformToRef(this,n,this._tmpRay):this._tmpRay=Q.Transform(this,n),e.intersects(this._tmpRay,t,i,s,r,o)}intersectsMeshes(e,t,i){i?i.length=0:i=[];for(let s=0;s<e.length;s++){const r=this.intersectsMesh(e[s],t);r.hit&&i.push(r)}return i.sort(this._comparePickingInfo),i}_comparePickingInfo(e,t){return e.distance<t.distance?-1:e.distance>t.distance?1:0}intersectionSegment(e,t,i){const s=this.origin,r=v.Vector3[0],o=v.Vector3[1],n=v.Vector3[2],a=v.Vector3[3];t.subtractToRef(e,r),this.direction.scaleToRef(Q._Rayl,n),s.addToRef(n,o),e.subtractToRef(s,a);const c=g.Dot(r,r),l=g.Dot(r,n),h=g.Dot(n,n),u=g.Dot(r,a),d=g.Dot(n,a),p=c*h-l*l;let m,_,f=p,x=p;p<Q._Smallnum?(m=0,f=1,_=d,x=h):(m=l*d-h*u,_=c*d-l*u,m<0?(m=0,_=d,x=h):m>f&&(m=f,_=d+l,x=h)),_<0?(_=0,-u<0?m=0:-u>c?m=f:(m=-u,f=c)):_>x&&(_=x,-u+l<0?m=0:-u+l>c?m=f:(m=-u+l,f=c));const y=Math.abs(m)<Q._Smallnum?0:m/f,T=Math.abs(_)<Q._Smallnum?0:_/x,b=v.Vector3[4];n.scaleToRef(T,b);const w=v.Vector3[5];r.scaleToRef(y,w),w.addInPlace(a);const P=v.Vector3[6];w.subtractToRef(b,P);return T>0&&T<=this.length&&P.lengthSquared()<i*i?w.length():-1}update(e,t,i,s,r,o,n,a=!1){if(a){Q._RayDistant||(Q._RayDistant=Q.Zero()),Q._RayDistant.unprojectRayToRef(e,t,i,s,x.IdentityReadOnly,o,n);const a=v.Matrix[0];r.invertToRef(a),Q.TransformToRef(Q._RayDistant,a,this)}else this.unprojectRayToRef(e,t,i,s,r,o,n);return this}static Zero(){return new Q(g.Zero(),g.Zero())}static CreateNew(e,t,i,s,r,o,n){return Q.Zero().update(e,t,i,s,r,o,n)}static CreateNewFromTo(e,t,i=x.IdentityReadOnly){const s=new Q(new g(0,0,0),new g(0,0,0));return Q.CreateFromToToRef(e,t,s,i)}static CreateFromToToRef(e,t,i,s=x.IdentityReadOnly){i.origin.copyFrom(e);const r=t.subtractToRef(e,i.direction),o=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return i.length=o,i.direction.normalize(),Q.TransformToRef(i,s,i)}static Transform(e,t){const i=new Q(new g(0,0,0),new g(0,0,0));return Q.TransformToRef(e,t,i),i}static TransformToRef(e,t,i){g.TransformCoordinatesToRef(e.origin,t,i.origin),g.TransformNormalToRef(e.direction,t,i.direction),i.length=e.length,i.epsilon=e.epsilon;const s=i.direction,r=s.length();if(0!==r&&1!==r){const e=1/r;s.x*=e,s.y*=e,s.z*=e,i.length*=r}return i}unprojectRayToRef(e,t,i,s,r,o,n){const a=v.Matrix[0];r.multiplyToRef(o,a),a.multiplyToRef(n,a),a.invert();const c=z.LastCreatedEngine,l=v.Vector3[0];l.x=e/i*2-1,l.y=-(t/s*2-1),l.z=c?.useReverseDepthBuffer?1:c?.isNDCHalfZRange?0:-1;const h=v.Vector3[1].copyFromFloats(l.x,l.y,1-1e-8),u=v.Vector3[2],d=v.Vector3[3];g._UnprojectFromInvertedMatrixToRef(l,a,u),g._UnprojectFromInvertedMatrixToRef(h,a,d),this.origin.copyFrom(u),d.subtractToRef(u,this.direction),this.direction.normalize()}}function $(e,t,i,s,r,o=!1){const n=Q.Zero();return J(e,t,i,s,n,r,o),n}function J(e,t,i,s,r,o,n=!1,a=!1){const c=e.getEngine();if(!o&&!(o=e.activeCamera))return e;const l=o.viewport,h=c.getRenderHeight(),{x:u,y:d,width:p,height:m}=l.toGlobal(c.getRenderWidth(),h),_=1/c.getHardwareScalingLevel();return t=t*_-u,i=i*_-(h-d-m),r.update(t,i,p,m,s||x.IdentityReadOnly,n?x.IdentityReadOnly:o.getViewMatrix(),o.getProjectionMatrix(),a),e}function ee(e,t,i,s,r){if(!V)return e;const o=e.getEngine();if(!r&&!(r=e.activeCamera))throw new Error("Active camera not set");const n=r.viewport,a=o.getRenderHeight(),{x:c,y:l,width:h,height:u}=n.toGlobal(o.getRenderWidth(),a),d=x.Identity(),p=1/o.getHardwareScalingLevel();return t=t*p-c,i=i*p-(a-l-u),s.update(t,i,h,u,d,d,r.getProjectionMatrix()),e}function te(e,t,i,s,r,o,n,a){const c=t(s,i.enableDistantPicking),l=i.intersects(c,r,n,o,s,a);return l&&l.hit?!r&&null!=e&&l.distance>=e.distance?null:l:null}function ie(e,t,i,s,r,o){let n=null;const a=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),c=e.cameraToUseForPointers||e.activeCamera,l=te;for(let h=0;h<e.meshes.length;h++){const u=e.meshes[h];if(i){if(!i(u,-1))continue}else if(!u.isEnabled()||!u.isVisible||!u.isPickable)continue;const d=a&&u.isWorldMatrixCameraDependent(),p=u.computeWorldMatrix(d,c);if(u.hasThinInstances&&u.thinInstanceEnablePicking){const e=l(n,t,u,p,!0,!0,o);if(e){if(r)return e;const a=v.Matrix[1],c=u.thinInstanceGetWorldMatrices();for(let e=0;e<c.length;e++){if(i&&!i(u,e))continue;c[e].multiplyToRef(p,a);const h=l(n,t,u,a,s,r,o,!0);if(h&&(n=h,n.thinInstanceIndex=e,s))return n}}}else{const e=l(n,t,u,p,s,r,o);if(e&&(n=e,s))return n}}return n||new V}function se(e,t,i,s){if(!V)return null;const r=[],o=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),n=e.cameraToUseForPointers||e.activeCamera,a=te;for(let c=0;c<e.meshes.length;c++){const l=e.meshes[c];if(i){if(!i(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;const h=o&&l.isWorldMatrixCameraDependent(),u=l.computeWorldMatrix(h,n);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(a(null,t,l,u,!0,!0,s)){const e=v.Matrix[1],o=l.thinInstanceGetWorldMatrices();for(let n=0;n<o.length;n++){if(i&&!i(l,n))continue;o[n].multiplyToRef(u,e);const c=a(null,t,l,e,!1,!1,s,!0);c&&(c.thinInstanceIndex=n,r.push(c))}}}else{const e=a(null,t,l,u,!1,!1,s);e&&r.push(e)}}return r}function re(e,t,i=100,s,r){s||(s=e.getWorldMatrix()),t.length=i,r?t.origin.copyFrom(r):t.origin.copyFrom(e.position);const o=v.Vector3[2];o.set(0,0,e._scene.useRightHandedSystem?-1:1);const n=v.Vector3[3];return g.TransformNormalToRef(o,s,n),g.NormalizeToRef(n,t.direction),t}var oe,ne,ae;Q._TmpVector3=A(6,g.Zero),Q._RayDistant=Q.Zero(),Q._Smallnum=1e-8,Q._Rayl=1e9,oe=S,(ne=l)&&(ne.prototype.getForwardRay=function(e=100,t,i){return re(this,new Q(g.Zero(),g.Zero(),e),e,t,i)},ne.prototype.getForwardRayToRef=function(e,t=100,i,s){return re(this,e,t,i,s)}),oe&&(F._IsPickingAvailable=!0,oe.prototype.createPickingRay=function(e,t,i,s,r=!1){return $(this,e,t,i,s,r)}),S.prototype.createPickingRayToRef=function(e,t,i,s,r,o=!1,n=!1){return J(this,e,t,i,s,r,o,n)},S.prototype.createPickingRayInCameraSpace=function(e,t,i){return function(e,t,i,s){const r=Q.Zero();return ee(e,t,i,r,s),r}(this,e,t,i)},S.prototype.createPickingRayInCameraSpaceToRef=function(e,t,i,s){return ee(this,e,t,i,s)},S.prototype.pickWithBoundingInfo=function(e,t,i,s,r){return function(e,t,i,s,r,o){if(!V)return null;const n=ie(e,(s=>(e._tempPickingRay||(e._tempPickingRay=Q.Zero()),J(e,t,i,s,e._tempPickingRay,o||null),e._tempPickingRay)),s,r,!0);return n&&(n.ray=$(e,t,i,x.Identity(),o||null)),n}(this,e,t,i,s,r)},S.prototype.pick=function(e,t,i,s,r,o,n=!1){return function(e,t,i,s,r,o,n){const a=ie(e,((s,r)=>(e._tempPickingRay||(e._tempPickingRay=Q.Zero()),J(e,t,i,s,e._tempPickingRay,o||null,!1,r),e._tempPickingRay)),s,r,!1,n);return a&&(a.ray=$(e,t,i,x.Identity(),o||null)),a}(this,e,t,i,s,r,o,n)},S.prototype.pickWithRay=function(e,t,i,s){return function(e,t,i,s,r){const o=ie(e,(i=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=x.Identity()),i.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=Q.Zero()),Q.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),i,s,!1,r);return o&&(o.ray=t),o}(this,e,t,i,s)},S.prototype.multiPick=function(e,t,i,s,r){return function(e,t,i,s,r,o){return se(e,(s=>$(e,t,i,s,r||null)),s,o)}(this,e,t,i,s,r)},S.prototype.multiPickWithRay=function(e,t,i){return function(e,t,i,s){return se(e,(i=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=x.Identity()),i.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=Q.Zero()),Q.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),i,s)}(this,e,t,i)},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 ce{get positions(){return this._positions32}get colors(){return this._colors32}get uvs(){return this._uvs32}constructor(e,t,i,s){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=i||z.LastCreatedScene,s&&void 0!==s.updatable?this._updatable=s.updatable:this._updatable=!0}buildMeshAsync(e){return Promise.all(this._promises).then((()=>(this._isReady=!0,this._buildMesh(e))))}_buildMesh(e){0===this.nbParticles&&this.addPoints(1),this._positions32=new Float32Array(this._positions),this._uvs32=new Float32Array(this._uvs),this._colors32=new Float32Array(this._colors);const t=new y;t.set(this._positions32,_.PositionKind),this._uvs32.length>0&&t.set(this._uvs32,_.UVKind);let i=0;this._colors32.length>0&&(i=1,t.set(this._colors32,_.ColorKind));const s=new f(this.name,this._scene);t.applyToMesh(s,this._updatable),this.mesh=s,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);let r=e;return r||(r=new j("point cloud material",this._scene),r.emissiveColor=new D(i,i,i),r.disableLighting=!0,r.pointsCloud=!0,r.pointSize=this._size),s.material=r,new Promise((e=>e(s)))}_addParticle(e,t,i,s){const r=new Y(e,t,i,s,this);return this.particles.push(r),r}_randomUnitVector(e){e.position=new g(Math.random(),Math.random(),Math.random()),e.color=new C(1,1,1,1)}_getColorIndicesForCoord(e,t,i,s){const r=e._groupImageData,o=i*(4*s)+4*t,n=[o,o+1,o+2,o+3],a=n[1],c=n[2],l=n[3],h=r[n[0]],u=r[a],d=r[c],p=r[l];return new C(h/255,u/255,d/255,p)}_setPointsColorOrUV(e,t,i,s,r,o,n,a){a=a??0,i&&e.updateFacetData();const c=2*e.getBoundingInfo().boundingSphere.radius;let l=e.getVerticesData(_.PositionKind);const h=e.getIndices(),u=e.getVerticesData(_.UVKind+(a?a+1:"")),d=e.getVerticesData(_.ColorKind),p=g.Zero();e.computeWorldMatrix();const m=e.getWorldMatrix();if(!m.isIdentity()){l=l.slice(0);for(let e=0;e<l.length/3;e++)g.TransformCoordinatesFromFloatsToRef(l[3*e],l[3*e+1],l[3*e+2],m,p),l[3*e]=p.x,l[3*e+1]=p.y,l[3*e+2]=p.z}let f=0,x=0,y=0,T=0,v=0,b=0,w=0,R=0,M=0,A=0,I=0,k=0,z=0;const V=g.Zero(),F=g.Zero(),S=g.Zero(),E=g.Zero(),L=g.Zero();let W=0,Z=0,N=0,O=0,G=0,j=0;const H=P.Zero(),X=P.Zero(),K=P.Zero(),Y=P.Zero(),q=P.Zero();let $=0,J=0,ee=0,te=0,ie=0,se=0,re=0,oe=0,ne=0,ae=0,ce=0,le=0;const he=B.Zero(),ue=B.Zero(),de=B.Zero(),pe=B.Zero(),me=B.Zero();let _e,fe,xe=0,ge=0;n=n||0;let ye=new B(0,0,0,0),Te=g.Zero(),ve=g.Zero(),be=g.Zero(),we=0,Pe=g.Zero(),Re=0,Me=0;const Ce=new Q(g.Zero(),new g(1,0,0));let Ae,Ie=g.Zero();for(let a=0;a<h.length/3;a++){let p,m,_,P,B,Q,ke,ze;x=h[3*a],y=h[3*a+1],T=h[3*a+2],v=l[3*x],b=l[3*x+1],w=l[3*x+2],R=l[3*y],M=l[3*y+1],A=l[3*y+2],I=l[3*T],k=l[3*T+1],z=l[3*T+2],V.set(v,b,w),F.set(R,M,A),S.set(I,k,z),F.subtractToRef(V,E),S.subtractToRef(F,L),u&&(W=u[2*x],Z=u[2*x+1],N=u[2*y],O=u[2*y+1],G=u[2*T],j=u[2*T+1],H.set(W,Z),X.set(N,O),K.set(G,j),X.subtractToRef(H,Y),K.subtractToRef(X,q)),d&&s&&($=d[4*x],J=d[4*x+1],ee=d[4*x+2],te=d[4*x+3],ie=d[4*y],se=d[4*y+1],re=d[4*y+2],oe=d[4*y+3],ne=d[4*T],ae=d[4*T+1],ce=d[4*T+2],le=d[4*T+3],he.set($,J,ee,te),ue.set(ie,se,re,oe),de.set(ne,ae,ce,le),ue.subtractToRef(he,pe),de.subtractToRef(ue,me));const Ve=new D(0,0,0),Fe=new D(0,0,0);let Se,De;for(let l=0;l<t._groupDensity[a];l++)f=this.particles.length,this._addParticle(f,t,this._groupCounter,a+l),De=this.particles[f],xe=Math.sqrt(U(0,1)),ge=U(0,1),_e=V.add(E.scale(xe)).add(L.scale(xe*ge)),i&&(Te=e.getFacetNormal(a).normalize().scale(-1),ve=E.clone().normalize(),be=g.Cross(Te,ve),we=U(0,2*Math.PI),Pe=ve.scale(Math.cos(we)).add(be.scale(Math.sin(we))),we=U(.1,Math.PI/2),Ie=Pe.scale(Math.cos(we)).add(Te.scale(Math.sin(we))),Ce.origin=_e.add(Ie.scale(1e-5)),Ce.direction=Ie,Ce.length=c,Ae=Ce.intersectsMesh(e),Ae.hit&&(Me=Ae.pickedPoint.subtract(_e).length(),Re=U(0,1)*Me,_e.addInPlace(Ie.scale(Re)))),De.position=_e.clone(),this._positions.push(De.position.x,De.position.y,De.position.z),void 0!==s?u&&(fe=H.add(Y.scale(xe)).add(q.scale(xe*ge)),s?r&&null!==t._groupImageData?(p=t._groupImgWidth,m=t._groupImgHeight,Se=this._getColorIndicesForCoord(t,Math.round(fe.x*p),Math.round(fe.y*m),p),De.color=Se,this._colors.push(Se.r,Se.g,Se.b,Se.a)):d?(ye=he.add(pe.scale(xe)).add(me.scale(xe*ge)),De.color=new C(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w)):(ye=he.set(Math.random(),Math.random(),Math.random(),1),De.color=new C(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w)):(De.uv=fe.clone(),this._uvs.push(De.uv.x,De.uv.y))):(o?(Ve.set(o.r,o.g,o.b),_=U(-n,n),P=U(-n,n),ze=Ve.toHSV(),B=ze.r,Q=ze.g+_,ke=ze.b+P,Q<0&&(Q=0),Q>1&&(Q=1),ke<0&&(ke=0),ke>1&&(ke=1),D.HSVtoRGBToRef(B,Q,ke,Fe),ye.set(Fe.r,Fe.g,Fe.b,1)):ye=he.set(Math.random(),Math.random(),Math.random(),1),De.color=new C(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w))}}_colorFromTexture(e,t,i){if(null===e.material)return b.Warn(e.name+"has no material."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,i,!0,!1);const s=e.material.getActiveTextures();if(0===s.length)return b.Warn(e.name+"has no usable texture."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,i,!0,!1);const r=e.clone();r.setEnabled(!1),this._promises.push(new Promise((e=>{E.WhenAllReady(s,(()=>{let o=t._textureNb;o<0&&(o=0),o>s.length-1&&(o=s.length-1);const n=()=>{t._groupImgWidth=s[o].getSize().width,t._groupImgHeight=s[o].getSize().height,this._setPointsColorOrUV(r,t,i,!0,!0,void 0,void 0,s[o].coordinatesIndex),r.dispose(),e()};t._groupImageData=null;const a=s[o].readPixels();a?a.then((e=>{t._groupImageData=e,n()})):n()}))})))}_calculateDensity(e,t,i){let s,r,o,n,a,c,l,h,u,d,p,m;const _=g.Zero(),f=g.Zero(),x=g.Zero(),y=g.Zero(),T=g.Zero(),v=g.Zero();let b;const w=[];let P=0;const R=i.length/3;for(let e=0;e<R;e++)s=i[3*e],r=i[3*e+1],o=i[3*e+2],n=t[3*s],a=t[3*s+1],c=t[3*s+2],l=t[3*r],h=t[3*r+1],u=t[3*r+2],d=t[3*o],p=t[3*o+1],m=t[3*o+2],_.set(n,a,c),f.set(l,h,u),x.set(d,p,m),f.subtractToRef(_,y),x.subtractToRef(f,T),g.CrossToRef(y,T,v),b=.5*v.length(),P+=b,w[e]=P;const M=new Array(R);let C=e;for(let e=R-1;e>0;e--){const t=w[e];if(0===t)M[e]=0;else{const i=(t-w[e-1])/t*C,s=Math.floor(i),r=i-s,o=s+Number(Math.random()<r);M[e]=o,C-=o}}return M[0]=C,M}addPoints(e,t=this._randomUnitVector){const i=new q(this._groupCounter,t);let s,r=this.nbParticles;for(let t=0;t<e;t++)s=this._addParticle(r,i,this._groupCounter,t),i&&i._positionFunction&&i._positionFunction(s,r,t),this._positions.push(s.position.x,s.position.y,s.position.z),s.color&&this._colors.push(s.color.r,s.color.g,s.color.b,s.color.a),s.uv&&this._uvs.push(s.uv.x,s.uv.y),r++;return this.nbParticles+=e,this._groupCounter++,this._groupCounter}addSurfacePoints(e,t,i,s,r){let o=i||0;(isNaN(o)||o<0||o>3)&&(o=0);const n=e.getVerticesData(_.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new q(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,n,a),2===o?c._textureNb=s||0:s=s||new C(1,1,1,1),o){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,s,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}addVolumePoints(e,t,i,s,r){let o=i||0;(isNaN(o)||o<0||o>3)&&(o=0);const n=e.getVerticesData(_.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new q(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,n,a),2===o?c._textureNb=s||0:s=s||new C(1,1,1,1),o){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,s,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}setParticles(e=0,t=this.nbParticles-1,i=!0){if(!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(e,t,i);const s=v.Matrix[0],r=this.mesh,o=this._colors32,n=this._positions32,a=this._uvs32,c=v.Vector3,l=c[5].copyFromFloats(1,0,0),h=c[6].copyFromFloats(0,1,0),u=c[7].copyFromFloats(0,0,1),d=c[8].setAll(Number.MAX_VALUE),p=c[9].setAll(-Number.MAX_VALUE);x.IdentityToRef(s);let m=0;if(this.mesh?.isFacetDataEnabled&&(this._computeBoundingBox=!0),t=t>=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0!=e||t!=this.nbParticles-1)){const e=this.mesh?.getBoundingInfo();e&&(d.copyFrom(e.minimum),p.copyFrom(e.maximum))}m=0;let f=0,g=0,y=0;for(let i=e;i<=t;i++){const e=this.particles[i];m=e.idx,f=3*m,g=4*m,y=2*m,this.updateParticle(e);const t=e._rotationMatrix,r=e.position,o=e._globalPosition;this._computeParticleRotation&&e.getRotationMatrix(s);if(null!==e.parentId){const i=this.particles[e.parentId],n=i._rotationMatrix,a=i._globalPosition,c=r.x*n[1]+r.y*n[4]+r.z*n[7],l=r.x*n[0]+r.y*n[3]+r.z*n[6],h=r.x*n[2]+r.y*n[5]+r.z*n[8];if(o.x=a.x+l,o.y=a.y+c,o.z=a.z+h,this._computeParticleRotation){const e=s.m;t[0]=e[0]*n[0]+e[1]*n[3]+e[2]*n[6],t[1]=e[0]*n[1]+e[1]*n[4]+e[2]*n[7],t[2]=e[0]*n[2]+e[1]*n[5]+e[2]*n[8],t[3]=e[4]*n[0]+e[5]*n[3]+e[6]*n[6],t[4]=e[4]*n[1]+e[5]*n[4]+e[6]*n[7],t[5]=e[4]*n[2]+e[5]*n[5]+e[6]*n[8],t[6]=e[8]*n[0]+e[9]*n[3]+e[10]*n[6],t[7]=e[8]*n[1]+e[9]*n[4]+e[10]*n[7],t[8]=e[8]*n[2]+e[9]*n[5]+e[10]*n[8]}}else if(o.x=0,o.y=0,o.z=0,this._computeParticleRotation){const e=s.m;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10]}const a=c[11];e.translateFromPivot?a.setAll(0):a.copyFrom(e.pivot);const _=c[0];_.copyFrom(e.position);const x=_.x-e.pivot.x,T=_.y-e.pivot.y,v=_.z-e.pivot.z;let b=x*t[0]+T*t[3]+v*t[6],w=x*t[1]+T*t[4]+v*t[7],P=x*t[2]+T*t[5]+v*t[8];b+=a.x,w+=a.y,P+=a.z;const R=n[f]=o.x+l.x*b+h.x*w+u.x*P,M=n[f+1]=o.y+l.y*b+h.y*w+u.y*P,C=n[f+2]=o.z+l.z*b+h.z*w+u.z*P;if(this._computeBoundingBox&&(d.minimizeInPlaceFromFloats(R,M,C),p.maximizeInPlaceFromFloats(R,M,C)),this._computeParticleColor&&e.color){const t=e.color,i=this._colors32;i[g]=t.r,i[g+1]=t.g,i[g+2]=t.b,i[g+3]=t.a}if(this._computeParticleTexture&&e.uv){const t=e.uv,i=this._uvs32;i[y]=t.x,i[y+1]=t.y}}return r&&(i&&(this._computeParticleColor&&r.updateVerticesData(_.ColorKind,o,!1,!1),this._computeParticleTexture&&r.updateVerticesData(_.UVKind,a,!1,!1),r.updateVerticesData(_.PositionKind,n,!1,!1)),this._computeBoundingBox&&(r.hasBoundingInfo?r.getBoundingInfo().reConstruct(d,p,r._worldMatrix):r.buildBoundingInfo(d,p,r._worldMatrix))),this.afterUpdateParticles(e,t,i),this}dispose(){this.mesh?.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._uvs32=null,this._colors32=null}refreshVisibleSize(){return this._isVisibilityBoxLocked||this.mesh?.refreshBoundingInfo(),this}setVisibilityBox(e){if(!this.mesh)return;const t=e/2;this.mesh.buildBoundingInfo(new g(-t,-t,-t),new g(t,t,t))}get isAlwaysVisible(){return this._alwaysVisible}set isAlwaysVisible(e){this.mesh&&(this._alwaysVisible=e,this.mesh.alwaysSelectAsActiveMesh=e)}set computeParticleRotation(e){this._computeParticleRotation=e}set computeParticleColor(e){this._computeParticleColor=e}set computeParticleTexture(e){this._computeParticleTexture=e}get computeParticleColor(){return this._computeParticleColor}get computeParticleTexture(){return this._computeParticleTexture}set computeBoundingBox(e){this._computeBoundingBox=e}get computeBoundingBox(){return this._computeBoundingBox}initParticles(){}recycleParticle(e){return e}updateParticle(e){return e}beforeUpdateParticles(e,t,i){}afterUpdateParticles(e,t,i){}}const le=W,he={...L,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:le};var ue,de;!function(e){e[e.Splat=0]="Splat",e[e.PointCloud=1]="PointCloud",e[e.Mesh=2]="Mesh"}(ue||(ue={})),function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(de||(de={}));class pe{constructor(e=pe._DefaultLoadingOptions){this.name=Z.name,this._assetContainer=null,this.extensions=Z.extensions,this._loadingOptions=e}createPlugin(e){return new pe(e[Z.name])}async importMeshAsync(e,t,i,s,r,o){return this._parse(e,t,i,s).then((e=>({meshes:e,particleSystems:[],skeletons:[],animationGroups:[],transformNodes:[],geometries:[],lights:[],spriteManagers:[]})))}static _BuildPointCloud(e,t){if(!t.byteLength)return!1;const i=new Uint8Array(t),s=new Float32Array(t),r=i.length/32;return e.addPoints(r,(function(e,t){const r=s[8*t+0],o=s[8*t+1],n=s[8*t+2];e.position=new g(r,o,n);const a=i[32*t+24+0]/255,c=i[32*t+24+1]/255,l=i[32*t+24+2]/255;e.color=new C(a,c,l,1)})),!0}static _BuildMesh(e,t){const i=new f("PLYMesh",e),s=new Uint8Array(t.data),r=new Float32Array(t.data),o=s.length/32,n=[],a=new y;for(let e=0;e<o;e++){const t=r[8*e+0],i=r[8*e+1],s=r[8*e+2];n.push(t,i,s)}if(t.hasVertexColors){const e=new Float32Array(4*o);for(let t=0;t<o;t++){const i=s[32*t+24+0]/255,r=s[32*t+24+1]/255,o=s[32*t+24+2]/255;e[4*t+0]=i,e[4*t+1]=r,e[4*t+2]=o,e[4*t+3]=1}a.colors=e}return a.positions=n,a.indices=t.faces,a.applyToMesh(i),i}_parse(e,t,i,s){const r=[],o=pe._ConvertPLYToSplat(i);switch(o.mode){case 0:{const e=new K("GaussianSplatting",null,t,this._loadingOptions.keepInRam);e._parentContainer=this._assetContainer,r.push(e),e.loadDataAsync(o.data)}break;case 1:{const e=new ce("PointCloud",1,t);if(pe._BuildPointCloud(e,o.data))return Promise.all([e.buildMeshAsync()]).then((e=>(r.push(e[0]),r)));e.dispose()}break;case 2:if(!o.faces)throw new Error("PLY mesh doesn't contain face informations.");r.push(pe._BuildMesh(t,o));break;default:throw new Error("Unsupported Splat mode")}return Promise.resolve(r)}loadAssetContainerAsync(e,t,i){const s=new G(e);return this._assetContainer=s,this.importMeshAsync(null,e,t,i).then((e=>(e.meshes.forEach((e=>s.meshes.push(e))),this._assetContainer=null,s))).catch((e=>{throw this._assetContainer=null,e}))}loadAsync(e,t,i){return this.importMeshAsync(null,e,t,i).then((()=>{}))}static _ConvertPLYToSplat(e){const t=new Uint8Array(e),i=(new TextDecoder).decode(t.slice(0,10240)),s="end_header\n",r=i.indexOf(s);if(r<0||!i)return{mode:0,data:e};const o=parseInt(/element vertex (\d+)\n/.exec(i)[1]),n=/element face (\d+)\n/.exec(i),a=/element chunk (\d+)\n/.exec(i);let c=0,l=0;n&&(c=parseInt(n[1])),a&&(l=parseInt(a[1]));let h=0,u=0;const d={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let p=1;const m=[],_=[],f=i.slice(0,r).split("\n");for(const e of f)if(e.startsWith("property ")){const[,t,i]=e.split(" ");1==p?(_.push({name:i,type:t,offset:u}),u+=d[t]):0==p&&(m.push({name:i,type:t,offset:h}),h+=d[t]),d[t]||b.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?p=1:"vertex"==t&&(p=0)}const x=h,y=u,T=.28209479177387814;let w=0;const P=new DataView(e,r+11),M=new ArrayBuffer(32*o),C=new R,A=v.Vector3[0],I=(e,t)=>{const i=(1<<t)-1;return(e&i)/i},k=(e,t)=>{t.x=I(e>>>21,11),t.y=I(e>>>11,10),t.z=I(e,11)},z=(e,t)=>{t[0]=255*I(e>>>24,8),t[1]=255*I(e>>>16,8),t[2]=255*I(e>>>8,8),t[3]=255*I(e,8)},V=(e,t)=>{const i=1/(.5*Math.sqrt(2)),s=(I(e>>>20,10)-.5)*i,r=(I(e>>>10,10)-.5)*i,o=(I(e,10)-.5)*i,n=Math.sqrt(1-(s*s+r*r+o*o));switch(e>>>30){case 0:t.set(n,s,r,o);break;case 1:t.set(s,n,r,o);break;case 2:t.set(s,r,n,o);break;case 3:t.set(s,r,o,n)}},F=new Array(l);for(let e=0;e<l;e++){const t={min:new g,max:new g,minScale:new g,maxScale:new g};F[e]=t;for(let e=0;e<_.length;e++){const i=_[e];let s;if("float"===i.type)switch(s=P.getFloat32(i.offset+w,!0),i.name){case"min_x":t.min.x=s;break;case"min_y":t.min.y=s;break;case"min_z":t.min.z=s;break;case"max_x":t.max.x=s;break;case"max_y":t.max.y=s;break;case"max_z":t.max.z=s;break;case"min_scale_x":t.minScale.x=s;break;case"min_scale_y":t.minScale.y=s;break;case"min_scale_z":t.minScale.z=s;break;case"max_scale_x":t.maxScale.x=s;break;case"max_scale_y":t.maxScale.y=s;break;case"max_scale_z":t.maxScale.z=s}}w+=y}for(let e=0;e<o;e++){const t=new Float32Array(M,32*e,3),i=new Float32Array(M,32*e+12,3),s=new Uint8ClampedArray(M,32*e+24,4),r=new Uint8ClampedArray(M,32*e+28,4),o=e>>8;let n=255,a=0,c=0,l=0;for(let e=0;e<m.length;e++){const r=m[e];let h;switch(r.type){case"float":h=P.getFloat32(w+r.offset,!0);break;case"int":h=P.getInt32(w+r.offset,!0);break;case"uint":h=P.getUint32(w+r.offset,!0);break;case"double":h=P.getFloat64(w+r.offset,!0);break;case"uchar":h=P.getUint8(w+r.offset);break;default:continue}switch(r.name){case"packed_position":{const e=F[o];k(h,A),t[0]=he.Lerp(e.min.x,e.max.x,A.x),t[1]=-he.Lerp(e.min.y,e.max.y,A.y),t[2]=he.Lerp(e.min.z,e.max.z,A.z)}break;case"packed_rotation":V(h,C),n=C.w,a=C.z,c=C.y,l=C.x;break;case"packed_scale":{const e=F[o];k(h,A),i[0]=Math.exp(he.Lerp(e.minScale.x,e.maxScale.x,A.x)),i[1]=Math.exp(he.Lerp(e.minScale.y,e.maxScale.y,A.y)),i[2]=Math.exp(he.Lerp(e.minScale.z,e.maxScale.z,A.z))}break;case"packed_color":z(h,s);break;case"x":t[0]=h;break;case"y":t[1]=h;break;case"z":t[2]=h;break;case"scale_0":i[0]=Math.exp(h);break;case"scale_1":i[1]=Math.exp(h);break;case"scale_2":i[2]=Math.exp(h);break;case"diffuse_red":case"red":s[0]=h;break;case"diffuse_green":case"green":s[1]=h;break;case"diffuse_blue":case"blue":s[2]=h;break;case"f_dc_0":s[0]=255*(.5+T*h);break;case"f_dc_1":s[1]=255*(.5+T*h);break;case"f_dc_2":s[2]=255*(.5+T*h);break;case"f_dc_3":s[3]=255*(.5+T*h);break;case"opacity":s[3]=1/(1+Math.exp(-h))*255;break;case"rot_0":n=h;break;case"rot_1":a=h;break;case"rot_2":c=h;break;case"rot_3":l=h}}C.set(a,c,l,n),C.normalize(),r[0]=128*C.w+128,r[1]=128*C.x+128,r[2]=128*C.y+128,r[3]=128*C.z+128,w+=x}const S=[];if(c)for(let e=0;e<c;e++){const e=P.getUint8(w);if(3==e){w+=1;for(let t=0;t<e;t++){const e=P.getUint32(w+4*(2-t),!0);S.push(e)}w+=12}}if(l)return{mode:0,data:M,faces:S,hasVertexColors:!1};let D=0,B=0;const U=["x","y","z","scale_0","scale_1","scale_2","opacity","rot_0","rot_1","rot_2","rot_3"],E=["red","green","blue","f_dc_0","f_dc_1","f_dc_2"];for(let e=0;e<m.length;e++){const t=m[e];U.includes(t.name)&&D++,E.includes(t.name)&&B++}const L=D==U.length&&3==B;return{mode:c?2:L?0:1,data:M,faces:S,hasVertexColors:!!B}}}pe._DefaultLoadingOptions={keepInRam:!1},N(new pe);export{pe as SPLATFileLoader};
|
|
2
|
+
//# sourceMappingURL=splatFileLoader-BUtGja1v.esm.min.js.map
|