@babylonjs/viewer 7.35.1 → 7.35.2-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-I6dGStsg.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-I6dGStsg.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-gqNsOFez.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-gqNsOFez.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DFS6xr5n.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DFS6xr5n.esm.min.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-lOryCKIX.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-lOryCKIX.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-BQZ0hBff.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-BQZ0hBff.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-Dv_WoTzw.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-Dv_WoTzw.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-BLib9ZsW.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-BLib9ZsW.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-BMUg03OA.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-BMUg03OA.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-DPJIMXIs.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-DPJIMXIs.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-DPzL7RO5.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-DPzL7RO5.esm.min.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-CL0k4Btm.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-CL0k4Btm.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-O8gteBcK.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-O8gteBcK.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-BFyC08_R.esm.js +343 -0
- package/dist/chunks/KHR_animation_pointer-BFyC08_R.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-BZvneRZ7.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-BZvneRZ7.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-CjzLflHM.esm.js +610 -0
- package/dist/chunks/KHR_draco_mesh_compression-CjzLflHM.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-sHuqiNW-.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-sHuqiNW-.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-CA1NQ9Fc.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-CA1NQ9Fc.esm.js.map +1 -0
- package/dist/chunks/KHR_interactivity-CVvexOkD.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-CVvexOkD.esm.min.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-CIEvgNk7.esm.js +1253 -0
- package/dist/chunks/KHR_lights_punctual-CIEvgNk7.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-CTm7ey2n.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-CTm7ey2n.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-B8l2iZjl.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-B8l2iZjl.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-vnjucfaw.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-vnjucfaw.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-BhZGttd-.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-BhZGttd-.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-BlhYeFYN.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-BlhYeFYN.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DJiKAnah.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DJiKAnah.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DmzdysxQ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DmzdysxQ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-B1e8i3BQ.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-B1e8i3BQ.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-B_uhZ_r0.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-B_uhZ_r0.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-Bdc1fhX3.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-Bdc1fhX3.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-CujgLUsQ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-CujgLUsQ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-DAITk5f0.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-DAITk5f0.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-DDjIIueh.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-DDjIIueh.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-Bs4XQdUc.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-Bs4XQdUc.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-CofsEJxf.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-CofsEJxf.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D2cm0Qti.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-D2cm0Qti.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Na22WakQ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Na22WakQ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-BCY5GSrv.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-BCY5GSrv.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-BEHiRviB.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-BEHiRviB.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-BFt2dwLj.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-BFt2dwLj.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-BGIPQ1rQ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-BGIPQ1rQ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-BgbdeIB3.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-BgbdeIB3.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-C-tRBJu4.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-C-tRBJu4.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-CcRsVA_x.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-CcRsVA_x.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-DNhfBz4E.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-DNhfBz4E.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-77adpgBk.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-77adpgBk.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-CSaSbOzl.esm.js +238 -0
- package/dist/chunks/KHR_materials_variants-CSaSbOzl.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-AOCoYNKI.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-AOCoYNKI.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-BWHhpmNH.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-BWHhpmNH.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-BB7EL2M1.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-BB7EL2M1.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-D2-xHrHe.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-D2-xHrHe.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-Di8sseTY.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-Di8sseTY.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-qzuskO3u.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-qzuskO3u.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-BUP7AAVF.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-BUP7AAVF.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-C60Bt2Ic.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-C60Bt2Ic.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-BUOLLEYP.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-BUOLLEYP.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-Dg-cPDyd.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-Dg-cPDyd.esm.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-CsFE0gfF.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-CsFE0gfF.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-DgCKwEEO.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-DgCKwEEO.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-VHBse1UH.esm.js +2207 -0
- package/dist/chunks/MSFT_audio_emitter-VHBse1UH.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-iFlly5g-.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-iFlly5g-.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_lod-Bwsctx65.esm.js +337 -0
- package/dist/chunks/MSFT_lod-Bwsctx65.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-CbiRs9Kc.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-CbiRs9Kc.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-Dl6WKmxG.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-Dl6WKmxG.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-MBaTkra4.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-MBaTkra4.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-DJvNL0IJ.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-DJvNL0IJ.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-Drf21tSs.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-Drf21tSs.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-CgbfLDgX.esm.min.js +2 -0
- package/dist/chunks/animationGroup-CgbfLDgX.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-eowyl97W.esm.js +2482 -0
- package/dist/chunks/animationGroup-eowyl97W.esm.js.map +1 -0
- package/dist/chunks/assetContainer-Bsqe9swA.esm.min.js +2 -0
- package/dist/chunks/assetContainer-Bsqe9swA.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-DO29qm5j.esm.js +1720 -0
- package/dist/chunks/assetContainer-DO29qm5j.esm.js.map +1 -0
- package/dist/chunks/audioEngine-ByiWmXaG.esm.js +305 -0
- package/dist/chunks/audioEngine-ByiWmXaG.esm.js.map +1 -0
- package/dist/chunks/audioEngine-Tyl5gl5Y.esm.min.js +2 -0
- package/dist/chunks/audioEngine-Tyl5gl5Y.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-BxUlezN-.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-BxUlezN-.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-Co7tF_AI.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-Co7tF_AI.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-C6h2HrT5.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-C6h2HrT5.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-CFdjlTQv.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-CFdjlTQv.esm.js.map +1 -0
- package/dist/chunks/dds--AOY6KMC.esm.js +540 -0
- package/dist/chunks/dds--AOY6KMC.esm.js.map +1 -0
- package/dist/chunks/dds-mtdSIG7y.esm.min.js +2 -0
- package/dist/chunks/dds-mtdSIG7y.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-CS64tfyO.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-CS64tfyO.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-Cm3kvldL.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-Cm3kvldL.esm.js.map +1 -0
- package/dist/chunks/decalFragment-B_EoELPt.esm.min.js +2 -0
- package/dist/chunks/decalFragment-B_EoELPt.esm.min.js.map +1 -0
- package/dist/chunks/decalFragment-CrQo80qe.esm.js +18 -0
- package/dist/chunks/decalFragment-CrQo80qe.esm.js.map +1 -0
- package/dist/chunks/default.fragment-B7BZK7Wn.esm.js +433 -0
- package/dist/chunks/default.fragment-B7BZK7Wn.esm.js.map +1 -0
- package/dist/chunks/default.fragment-CDe0T1Vr.esm.min.js +2 -0
- package/dist/chunks/default.fragment-CDe0T1Vr.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-DE-fL82A.esm.min.js +2 -0
- package/dist/chunks/default.fragment-DE-fL82A.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-OyO2ek5x.esm.js +497 -0
- package/dist/chunks/default.fragment-OyO2ek5x.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CNUfzDP1.esm.js +181 -0
- package/dist/chunks/default.vertex-CNUfzDP1.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CfR6AC0W.esm.js +201 -0
- package/dist/chunks/default.vertex-CfR6AC0W.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CxON4TPV.esm.min.js +2 -0
- package/dist/chunks/default.vertex-CxON4TPV.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-vn2_ZsRf.esm.min.js +2 -0
- package/dist/chunks/default.vertex-vn2_ZsRf.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DOEnRk8l.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-DOEnRk8l.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-D_cdCN09.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-D_cdCN09.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DulGgNIT.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-DulGgNIT.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DuvDKzIc.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-DuvDKzIc.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-CDmW-p2A.esm.js +200 -0
- package/dist/chunks/dumpTools-CDmW-p2A.esm.js.map +1 -0
- package/dist/chunks/dumpTools-hJHAozcu.esm.min.js +2 -0
- package/dist/chunks/dumpTools-hJHAozcu.esm.min.js.map +1 -0
- package/dist/chunks/engine-CfBkxMlv.esm.min.js +2 -0
- package/dist/chunks/engine-CfBkxMlv.esm.min.js.map +1 -0
- package/dist/chunks/engine-DaA20vkg.esm.js +2187 -0
- package/dist/chunks/engine-DaA20vkg.esm.js.map +1 -0
- package/dist/chunks/engine.common-B1nX1uOv.esm.min.js +2 -0
- package/dist/chunks/engine.common-B1nX1uOv.esm.min.js.map +1 -0
- package/dist/chunks/engine.common-Da03TQs0.esm.js +1103 -0
- package/dist/chunks/engine.common-Da03TQs0.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-BRXi1pZo.esm.js +64 -0
- package/dist/chunks/envTextureLoader-BRXi1pZo.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-CS1eu96I.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-CS1eu96I.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-BCSQExyv.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-BCSQExyv.esm.js.map +1 -0
- package/dist/chunks/environmentTextureTools-DaBia0zg.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-DaBia0zg.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-DOcIuOg9.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-DOcIuOg9.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-NVzNFU10.esm.js +1682 -0
- package/dist/chunks/exrTextureLoader-NVzNFU10.esm.js.map +1 -0
- package/dist/chunks/fogFragment-7C9DmW8b.esm.js +102 -0
- package/dist/chunks/fogFragment-7C9DmW8b.esm.js.map +1 -0
- package/dist/chunks/fogFragment-B9F5aJAx.esm.min.js +2 -0
- package/dist/chunks/fogFragment-B9F5aJAx.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-BnQp0Spj.esm.js +101 -0
- package/dist/chunks/fogFragment-BnQp0Spj.esm.js.map +1 -0
- package/dist/chunks/fogFragment-Rqu9S2gV.esm.min.js +2 -0
- package/dist/chunks/fogFragment-Rqu9S2gV.esm.min.js.map +1 -0
- package/dist/chunks/fresnelFunction--bGC1bW6.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction--bGC1bW6.esm.min.js.map +1 -0
- package/dist/chunks/fresnelFunction-YurpC61U.esm.js +12 -0
- package/dist/chunks/fresnelFunction-YurpC61U.esm.js.map +1 -0
- package/dist/chunks/glTFLoader--eb4oZZe.esm.min.js +2 -0
- package/dist/chunks/glTFLoader--eb4oZZe.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-DDABr3tc.esm.js +7595 -0
- package/dist/chunks/glTFLoader-DDABr3tc.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-C_jvKQZc.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-C_jvKQZc.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-Ce1T-HK4.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-Ce1T-HK4.esm.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-BVJDExzF.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-BVJDExzF.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-Cpf19SYh.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-Cpf19SYh.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-EwGi7mvH.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-EwGi7mvH.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-sCDYMnE7.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-sCDYMnE7.esm.min.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-CHt5g_Ro.esm.js +252 -0
- package/dist/chunks/hdrTextureLoader-CHt5g_Ro.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-CcljcQGM.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-CcljcQGM.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-BLQP90J_.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-BLQP90J_.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-BeWEDUrw.esm.js +108 -0
- package/dist/chunks/helperFunctions-BeWEDUrw.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-CkmR3WUA.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-CkmR3WUA.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-Vnio5Zy4.esm.js +80 -0
- package/dist/chunks/helperFunctions-Vnio5Zy4.esm.js.map +1 -0
- package/dist/chunks/index-CVMH5-nD.esm.js +74148 -0
- package/dist/chunks/index-CVMH5-nD.esm.js.map +1 -0
- package/dist/chunks/index-bkYfr-SD.esm.min.js +57 -0
- package/dist/chunks/index-bkYfr-SD.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-CmYn3AjU.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-CmYn3AjU.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-Ct4ygDpl.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-Ct4ygDpl.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-CCVJgklB.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-CCVJgklB.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-CmefuysH.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-CmefuysH.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-kbT8jgiS.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-kbT8jgiS.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-utQE6RQm.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-utQE6RQm.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-BwAXuZcJ.esm.js +77 -0
- package/dist/chunks/logDepthVertex-BwAXuZcJ.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-CIU5ihJc.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-CIU5ihJc.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-DBdj3JQF.esm.js +77 -0
- package/dist/chunks/logDepthVertex-DBdj3JQF.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-L5SVOP7a.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-L5SVOP7a.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-BjN3rZcV.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-BjN3rZcV.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CS8fR4k6.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-CS8fR4k6.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-F_ldv7kC.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-F_ldv7kC.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-JJ1eiwN7.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-JJ1eiwN7.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-Cqhjf76p.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-Cqhjf76p.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-TC3Qb9qA.esm.js +24 -0
- package/dist/chunks/meshUboDeclaration-TC3Qb9qA.esm.js.map +1 -0
- package/dist/chunks/objFileLoader-DUbUzdM7.esm.js +1338 -0
- package/dist/chunks/objFileLoader-DUbUzdM7.esm.js.map +1 -0
- package/dist/chunks/objFileLoader-cuX0R9Ll.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-cuX0R9Ll.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-BuvtdYuN.esm.min.js +2 -0
- package/dist/chunks/oitFragment-BuvtdYuN.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-CsHXm-hs.esm.min.js +2 -0
- package/dist/chunks/oitFragment-CsHXm-hs.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-Jsj4VCRm.esm.js +1051 -0
- package/dist/chunks/oitFragment-Jsj4VCRm.esm.js.map +1 -0
- package/dist/chunks/oitFragment-bE1j7vLE.esm.js +1210 -0
- package/dist/chunks/oitFragment-bE1j7vLE.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-7Tm4v4I5.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-7Tm4v4I5.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-Bim4VPEO.esm.js +15 -0
- package/dist/chunks/pass.fragment-Bim4VPEO.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-CYz9acmH.esm.js +15 -0
- package/dist/chunks/pass.fragment-CYz9acmH.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-CzPpw3iK.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-CzPpw3iK.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-C0EyEtjU.esm.js +3218 -0
- package/dist/chunks/pbr.fragment-C0EyEtjU.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-D7KGHlr3.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-D7KGHlr3.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-DRo704mz.esm.js +3164 -0
- package/dist/chunks/pbr.fragment-DRo704mz.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-Dw30RsZq.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-Dw30RsZq.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-BFjD6j1a.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-BFjD6j1a.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-BNL0Ih3S.esm.js +214 -0
- package/dist/chunks/pbr.vertex-BNL0Ih3S.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-DCYsZj4K.esm.js +338 -0
- package/dist/chunks/pbr.vertex-DCYsZj4K.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-DQWB7B3n.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-DQWB7B3n.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-BKTxzIr3.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-BKTxzIr3.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-BLM-tBsI.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-BLM-tBsI.esm.min.js.map +1 -0
- package/dist/chunks/rawTexture-B4sxPzau.esm.js +191 -0
- package/dist/chunks/rawTexture-B4sxPzau.esm.js.map +1 -0
- package/dist/chunks/rawTexture-C8eTjsTL.esm.min.js +2 -0
- package/dist/chunks/rawTexture-C8eTjsTL.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-B1JRUB2c.esm.js +17 -0
- package/dist/chunks/rgbdDecode.fragment-B1JRUB2c.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-BQDhe3Gm.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-BQDhe3Gm.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-Bqwzk3c0.esm.js +17 -0
- package/dist/chunks/rgbdDecode.fragment-Bqwzk3c0.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-De929itq.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-De929itq.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-B2mbOgZ1.esm.js +17 -0
- package/dist/chunks/rgbdEncode.fragment-B2mbOgZ1.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BR4bMAPw.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-BR4bMAPw.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-CnnkzvSU.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-CnnkzvSU.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-DdsDf_tZ.esm.js +17 -0
- package/dist/chunks/rgbdEncode.fragment-DdsDf_tZ.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-ByV2g6RW.esm.js +3947 -0
- package/dist/chunks/splatFileLoader-ByV2g6RW.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-DZtkydoO.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-DZtkydoO.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-DUti--Yk.esm.js +1805 -0
- package/dist/chunks/standardMaterial-DUti--Yk.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-DxPZ0yEO.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-DxPZ0yEO.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-BddM0ohC.esm.js +238 -0
- package/dist/chunks/stlFileLoader-BddM0ohC.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-Daj_Ow9k.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-Daj_Ow9k.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-DDmm8z9e.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-DDmm8z9e.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-NZ1m7gDb.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-NZ1m7gDb.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-CvGTeAY9.esm.js +3723 -0
- package/dist/chunks/thinEngine-CvGTeAY9.esm.js.map +1 -0
- package/dist/chunks/thinEngine-Czvj0W_2.esm.min.js +2 -0
- package/dist/chunks/thinEngine-Czvj0W_2.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-BGeYKYJu.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-BGeYKYJu.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-Byk1sPWi.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-Byk1sPWi.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-5MVqrbuQ.esm.js +412 -0
- package/dist/chunks/vertexColorMixing-5MVqrbuQ.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-BTHtPksv.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-BTHtPksv.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-C-JxO1th.esm.js +522 -0
- package/dist/chunks/vertexColorMixing-C-JxO1th.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DpW1_vsz.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-DpW1_vsz.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-Dz_96swZ.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-Dz_96swZ.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-iwYQqIrX.esm.js +11465 -0
- package/dist/chunks/webgpuEngine-iwYQqIrX.esm.js.map +1 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
- package/docs/ViewerDefault.jpg +0 -0
- package/docs/ViewerParts.jpg +0 -0
- package/docs/ViewerSlots.jpg +0 -0
- package/docs/ViewerStyled.jpg +0 -0
- package/lib/index.d.ts +534 -0
- package/lib/index.js +1939 -0
- package/lib/index.js.map +1 -0
- package/package.json +18 -27
- package/readme.md +145 -21
- package/configuration/configuration.d.ts +0 -107
- package/configuration/configuration.js +0 -16
- package/configuration/configuration.js.map +0 -1
- package/configuration/configurationCompatibility.d.ts +0 -8
- package/configuration/configurationCompatibility.js +0 -66
- package/configuration/configurationCompatibility.js.map +0 -1
- package/configuration/configurationContainer.d.ts +0 -10
- package/configuration/configurationContainer.js +0 -10
- package/configuration/configurationContainer.js.map +0 -1
- package/configuration/globals.d.ts +0 -6
- package/configuration/globals.js +0 -18
- package/configuration/globals.js.map +0 -1
- package/configuration/index.d.ts +0 -2
- package/configuration/index.js +0 -4
- package/configuration/index.js.map +0 -1
- package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
- package/configuration/interfaces/cameraConfiguration.js +0 -2
- package/configuration/interfaces/cameraConfiguration.js.map +0 -1
- package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
- package/configuration/interfaces/colorGradingConfiguration.js +0 -2
- package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
- package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
- package/configuration/interfaces/environmentMapConfiguration.js +0 -2
- package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
- package/configuration/interfaces/groundConfiguration.d.ts +0 -24
- package/configuration/interfaces/groundConfiguration.js +0 -2
- package/configuration/interfaces/groundConfiguration.js.map +0 -1
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
- package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
- package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
- package/configuration/interfaces/index.d.ts +0 -15
- package/configuration/interfaces/index.js +0 -16
- package/configuration/interfaces/index.js.map +0 -1
- package/configuration/interfaces/lightConfiguration.d.ts +0 -60
- package/configuration/interfaces/lightConfiguration.js +0 -2
- package/configuration/interfaces/lightConfiguration.js.map +0 -1
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
- package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
- package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
- package/configuration/interfaces/modelConfiguration.d.ts +0 -65
- package/configuration/interfaces/modelConfiguration.js +0 -2
- package/configuration/interfaces/modelConfiguration.js.map +0 -1
- package/configuration/interfaces/observersConfiguration.d.ts +0 -5
- package/configuration/interfaces/observersConfiguration.js +0 -2
- package/configuration/interfaces/observersConfiguration.js.map +0 -1
- package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
- package/configuration/interfaces/sceneConfiguration.js +0 -2
- package/configuration/interfaces/sceneConfiguration.js.map +0 -1
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
- package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
- package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
- package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
- package/configuration/interfaces/skyboxConfiguration.js +0 -2
- package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
- package/configuration/interfaces/templateConfiguration.d.ts +0 -67
- package/configuration/interfaces/templateConfiguration.js +0 -2
- package/configuration/interfaces/templateConfiguration.js.map +0 -1
- package/configuration/interfaces/vrConfiguration.d.ts +0 -16
- package/configuration/interfaces/vrConfiguration.js +0 -2
- package/configuration/interfaces/vrConfiguration.js.map +0 -1
- package/configuration/loader.d.ts +0 -4
- package/configuration/loader.js +0 -17
- package/configuration/loader.js.map +0 -1
- package/configuration/mappers.d.ts +0 -43
- package/configuration/mappers.js +0 -193
- package/configuration/mappers.js.map +0 -1
- package/configuration/renderOnlyLoader.d.ts +0 -33
- package/configuration/renderOnlyLoader.js +0 -162
- package/configuration/renderOnlyLoader.js.map +0 -1
- package/configuration/types/default.d.ts +0 -6
- package/configuration/types/default.js +0 -121
- package/configuration/types/default.js.map +0 -1
- package/configuration/types/environmentMap.d.ts +0 -5
- package/configuration/types/environmentMap.js +0 -14
- package/configuration/types/environmentMap.js.map +0 -1
- package/configuration/types/extended.d.ts +0 -6
- package/configuration/types/extended.js +0 -317
- package/configuration/types/extended.js.map +0 -1
- package/configuration/types/index.d.ts +0 -14
- package/configuration/types/index.js +0 -51
- package/configuration/types/index.js.map +0 -1
- package/configuration/types/minimal.d.ts +0 -6
- package/configuration/types/minimal.js +0 -43
- package/configuration/types/minimal.js.map +0 -1
- package/configuration/types/renderOnlyDefault.d.ts +0 -30
- package/configuration/types/renderOnlyDefault.js +0 -31
- package/configuration/types/renderOnlyDefault.js.map +0 -1
- package/configuration/types/shadowLight.d.ts +0 -9
- package/configuration/types/shadowLight.js +0 -64
- package/configuration/types/shadowLight.js.map +0 -1
- package/helper/index.d.ts +0 -29
- package/helper/index.js +0 -66
- package/helper/index.js.map +0 -1
- package/index.d.ts +0 -30
- package/index.js +0 -46
- package/index.js.map +0 -1
- package/initializer.d.ts +0 -11
- package/initializer.js +0 -35
- package/initializer.js.map +0 -1
- package/interfaces.d.ts +0 -5
- package/interfaces.js +0 -7
- package/interfaces.js.map +0 -1
- package/labs/environmentSerializer.d.ts +0 -126
- package/labs/environmentSerializer.js +0 -191
- package/labs/environmentSerializer.js.map +0 -1
- package/labs/texture.d.ts +0 -183
- package/labs/texture.js +0 -351
- package/labs/texture.js.map +0 -1
- package/labs/viewerLabs.d.ts +0 -51
- package/labs/viewerLabs.js +0 -134
- package/labs/viewerLabs.js.map +0 -1
- package/loader/modelLoader.d.ts +0 -56
- package/loader/modelLoader.js +0 -202
- package/loader/modelLoader.js.map +0 -1
- package/loader/plugins/applyMaterialConfig.d.ts +0 -12
- package/loader/plugins/applyMaterialConfig.js +0 -16
- package/loader/plugins/applyMaterialConfig.js.map +0 -1
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
- package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
- package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
- package/loader/plugins/index.d.ts +0 -19
- package/loader/plugins/index.js +0 -44
- package/loader/plugins/index.js.map +0 -1
- package/loader/plugins/loaderPlugin.d.ts +0 -24
- package/loader/plugins/loaderPlugin.js +0 -2
- package/loader/plugins/loaderPlugin.js.map +0 -1
- package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
- package/loader/plugins/msftLodLoaderPlugin.js +0 -21
- package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
- package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
- package/loader/plugins/telemetryLoaderPlugin.js +0 -36
- package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
- package/managers/observablesManager.d.ts +0 -66
- package/managers/observablesManager.js +0 -35
- package/managers/observablesManager.js.map +0 -1
- package/managers/sceneManager.d.ts +0 -245
- package/managers/sceneManager.js +0 -1375
- package/managers/sceneManager.js.map +0 -1
- package/managers/telemetryManager.d.ts +0 -78
- package/managers/telemetryManager.js +0 -117
- package/managers/telemetryManager.js.map +0 -1
- package/model/modelAnimation.d.ts +0 -215
- package/model/modelAnimation.js +0 -237
- package/model/modelAnimation.js.map +0 -1
- package/model/viewerModel.d.ts +0 -233
- package/model/viewerModel.js +0 -673
- package/model/viewerModel.js.map +0 -1
- package/optimizer/custom/extended.d.ts +0 -13
- package/optimizer/custom/extended.js +0 -101
- package/optimizer/custom/extended.js.map +0 -1
- package/optimizer/custom/index.d.ts +0 -9
- package/optimizer/custom/index.js +0 -26
- package/optimizer/custom/index.js.map +0 -1
- package/renderOnlyIndex.d.ts +0 -11
- package/renderOnlyIndex.js +0 -18
- package/renderOnlyIndex.js.map +0 -1
- package/templating/eventManager.d.ts +0 -35
- package/templating/eventManager.js +0 -66
- package/templating/eventManager.js.map +0 -1
- package/templating/plugins/hdButtonPlugin.d.ts +0 -9
- package/templating/plugins/hdButtonPlugin.js +0 -22
- package/templating/plugins/hdButtonPlugin.js.map +0 -1
- package/templating/plugins/printButton.d.ts +0 -9
- package/templating/plugins/printButton.js +0 -41
- package/templating/plugins/printButton.js.map +0 -1
- package/templating/templateManager.d.ts +0 -197
- package/templating/templateManager.js +0 -561
- package/templating/templateManager.js.map +0 -1
- package/templating/viewerTemplatePlugin.d.ts +0 -21
- package/templating/viewerTemplatePlugin.js +0 -69
- package/templating/viewerTemplatePlugin.js.map +0 -1
- package/viewer/defaultViewer.d.ts +0 -130
- package/viewer/defaultViewer.js +0 -672
- package/viewer/defaultViewer.js.map +0 -1
- package/viewer/renderOnlyViewer.d.ts +0 -9
- package/viewer/renderOnlyViewer.js +0 -46
- package/viewer/renderOnlyViewer.js.map +0 -1
- package/viewer/viewer.d.ts +0 -258
- package/viewer/viewer.js +0 -783
- package/viewer/viewer.js.map +0 -1
- package/viewer/viewerManager.d.ts +0 -58
- package/viewer/viewerManager.js +0 -91
- package/viewer/viewerManager.js.map +0 -1
- package/viewer/viewerWithTemplate.d.ts +0 -9
- package/viewer/viewerWithTemplate.js +0 -20
- package/viewer/viewerWithTemplate.js.map +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { aY as PBRMaterial, aN as unregisterGLTFExtension, aO as registerGLTFExtension } from './index-CVMH5-nD.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-DDABr3tc.esm.js';
|
|
3
|
+
import './rawTexture-B4sxPzau.esm.js';
|
|
4
|
+
import './assetContainer-DO29qm5j.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-Ce1T-HK4.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "KHR_materials_iridescence";
|
|
8
|
+
/**
|
|
9
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_iridescence/README.md)
|
|
10
|
+
*/
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
+
class KHR_materials_iridescence {
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
constructor(loader) {
|
|
17
|
+
/**
|
|
18
|
+
* The name of this extension.
|
|
19
|
+
*/
|
|
20
|
+
this.name = NAME;
|
|
21
|
+
/**
|
|
22
|
+
* Defines a number that determines the order the extensions are applied.
|
|
23
|
+
*/
|
|
24
|
+
this.order = 195;
|
|
25
|
+
this._loader = loader;
|
|
26
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
dispose() {
|
|
30
|
+
this._loader = null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
36
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
37
|
+
const promises = new Array();
|
|
38
|
+
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
39
|
+
promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
40
|
+
return Promise.all(promises).then(() => { });
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
_loadIridescencePropertiesAsync(context, properties, babylonMaterial) {
|
|
44
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
45
|
+
throw new Error(`${context}: Material type not supported`);
|
|
46
|
+
}
|
|
47
|
+
const promises = new Array();
|
|
48
|
+
babylonMaterial.iridescence.isEnabled = true;
|
|
49
|
+
babylonMaterial.iridescence.intensity = properties.iridescenceFactor ?? 0;
|
|
50
|
+
babylonMaterial.iridescence.indexOfRefraction = properties.iridescenceIor ?? properties.iridescenceIOR ?? 1.3;
|
|
51
|
+
babylonMaterial.iridescence.minimumThickness = properties.iridescenceThicknessMinimum ?? 100;
|
|
52
|
+
babylonMaterial.iridescence.maximumThickness = properties.iridescenceThicknessMaximum ?? 400;
|
|
53
|
+
if (properties.iridescenceTexture) {
|
|
54
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {
|
|
55
|
+
texture.name = `${babylonMaterial.name} (Iridescence)`;
|
|
56
|
+
babylonMaterial.iridescence.texture = texture;
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
if (properties.iridescenceThicknessTexture) {
|
|
60
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {
|
|
61
|
+
texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;
|
|
62
|
+
babylonMaterial.iridescence.thicknessTexture = texture;
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
return Promise.all(promises).then(() => { });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
unregisterGLTFExtension(NAME);
|
|
69
|
+
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_iridescence(loader));
|
|
70
|
+
|
|
71
|
+
export { KHR_materials_iridescence };
|
|
72
|
+
//# sourceMappingURL=KHR_materials_iridescence-Bs4XQdUc.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_iridescence-Bs4XQdUc.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_iridescence.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_iridescence\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_iridescence/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_iridescence {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 195;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.iridescence.isEnabled = true;\n babylonMaterial.iridescence.intensity = properties.iridescenceFactor ?? 0;\n babylonMaterial.iridescence.indexOfRefraction = properties.iridescenceIor ?? properties.iridescenceIOR ?? 1.3;\n babylonMaterial.iridescence.minimumThickness = properties.iridescenceThicknessMinimum ?? 100;\n babylonMaterial.iridescence.maximumThickness = properties.iridescenceThicknessMaximum ?? 400;\n if (properties.iridescenceTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Iridescence)`;\n babylonMaterial.iridescence.texture = texture;\n }));\n }\n if (properties.iridescenceThicknessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;\n babylonMaterial.iridescence.thicknessTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_iridescence(loader));\n//# sourceMappingURL=KHR_materials_iridescence.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,2BAA2B;AACxC;AACA;AACA;AACA;AACO,MAAM,yBAAyB,CAAC;AACvC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;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AI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{aY as e,aN as i,aO as s}from"./index-bkYfr-SD.esm.min.js";import{G as r}from"./glTFLoader--eb4oZZe.esm.min.js";import"./rawTexture-C8eTjsTL.esm.min.js";import"./assetContainer-Bsqe9swA.esm.min.js";import"./glTFLoaderAnimation-C_jvKQZc.esm.min.js";const n="KHR_materials_iridescence";class c{constructor(e){this.name=n,this.order=195,this._loader=e,this.enabled=this._loader.isExtensionUsed(n)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,i,s){return r.LoadExtensionAsync(e,i,this.name,((r,n)=>{const c=new Array;return c.push(this._loader.loadMaterialPropertiesAsync(e,i,s)),c.push(this._loadIridescencePropertiesAsync(r,n,s)),Promise.all(c).then((()=>{}))}))}_loadIridescencePropertiesAsync(i,s,r){if(!(r instanceof e))throw new Error(`${i}: Material type not supported`);const n=new Array;return r.iridescence.isEnabled=!0,r.iridescence.intensity=s.iridescenceFactor??0,r.iridescence.indexOfRefraction=s.iridescenceIor??s.iridescenceIOR??1.3,r.iridescence.minimumThickness=s.iridescenceThicknessMinimum??100,r.iridescence.maximumThickness=s.iridescenceThicknessMaximum??400,s.iridescenceTexture&&n.push(this._loader.loadTextureInfoAsync(`${i}/iridescenceTexture`,s.iridescenceTexture,(e=>{e.name=`${r.name} (Iridescence)`,r.iridescence.texture=e}))),s.iridescenceThicknessTexture&&n.push(this._loader.loadTextureInfoAsync(`${i}/iridescenceThicknessTexture`,s.iridescenceThicknessTexture,(e=>{e.name=`${r.name} (Iridescence Thickness)`,r.iridescence.thicknessTexture=e}))),Promise.all(n).then((()=>{}))}}i(n),s(n,!0,(e=>new c(e)));export{c as KHR_materials_iridescence};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_iridescence-CofsEJxf.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_iridescence-CofsEJxf.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_iridescence.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_iridescence\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_iridescence/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_iridescence {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 195;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.iridescence.isEnabled = true;\n babylonMaterial.iridescence.intensity = properties.iridescenceFactor ?? 0;\n babylonMaterial.iridescence.indexOfRefraction = properties.iridescenceIor ?? properties.iridescenceIOR ?? 1.3;\n babylonMaterial.iridescence.minimumThickness = properties.iridescenceThicknessMinimum ?? 100;\n babylonMaterial.iridescence.maximumThickness = properties.iridescenceThicknessMaximum ?? 400;\n if (properties.iridescenceTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Iridescence)`;\n babylonMaterial.iridescence.texture = texture;\n }));\n }\n if (properties.iridescenceThicknessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;\n babylonMaterial.iridescence.thicknessTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_iridescence(loader));\n//# sourceMappingURL=KHR_materials_iridescence.js.map"],"names":["NAME","KHR_materials_iridescence","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadIridescencePropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","iridescence","isEnabled","intensity","iridescenceFactor","indexOfRefraction","iridescenceIor","iridescenceIOR","minimumThickness","iridescenceThicknessMinimum","maximumThickness","iridescenceThicknessMaximum","iridescenceTexture","loadTextureInfoAsync","texture","iridescenceThicknessTexture","thicknessTexture","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,4BAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,gCAAgCL,EAAkBC,EAAWJ,IACzES,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,+BAAAH,CAAgCV,EAASc,EAAYZ,GACjD,KAAMA,aAA2Ba,GAC7B,MAAM,IAAIC,MAAM,GAAGhB,kCAEvB,MAAMO,EAAW,IAAIC,MAkBrB,OAjBAN,EAAgBe,YAAYC,WAAY,EACxChB,EAAgBe,YAAYE,UAAYL,EAAWM,mBAAqB,EACxElB,EAAgBe,YAAYI,kBAAoBP,EAAWQ,gBAAkBR,EAAWS,gBAAkB,IAC1GrB,EAAgBe,YAAYO,iBAAmBV,EAAWW,6BAA+B,IACzFvB,EAAgBe,YAAYS,iBAAmBZ,EAAWa,6BAA+B,IACrFb,EAAWc,oBACXrB,EAASE,KAAKjB,KAAKG,QAAQkC,qBAAqB,GAAG7B,uBAA8Bc,EAAWc,oBAAqBE,IAC7GA,EAAQrC,KAAO,GAAGS,EAAgBT,qBAClCS,EAAgBe,YAAYa,QAAUA,CAAO,KAGjDhB,EAAWiB,6BACXxB,EAASE,KAAKjB,KAAKG,QAAQkC,qBAAqB,GAAG7B,gCAAuCc,EAAWiB,6BAA8BD,IAC/HA,EAAQrC,KAAO,GAAGS,EAAgBT,+BAClCS,EAAgBe,YAAYe,iBAAmBF,CAAO,KAGvDnB,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEAoB,EAAwB7C,GACxB8C,EAAsB9C,GAAM,GAAOG,GAAW,IAAIF,EAA0BE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { aY as PBRMaterial, q as Color3, aN as unregisterGLTFExtension, aO as registerGLTFExtension } from './index-CVMH5-nD.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-DDABr3tc.esm.js';
|
|
3
|
+
import './rawTexture-B4sxPzau.esm.js';
|
|
4
|
+
import './assetContainer-DO29qm5j.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-Ce1T-HK4.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "KHR_materials_pbrSpecularGlossiness";
|
|
8
|
+
/**
|
|
9
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/README.md)
|
|
10
|
+
*/
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
+
class KHR_materials_pbrSpecularGlossiness {
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
constructor(loader) {
|
|
17
|
+
/**
|
|
18
|
+
* The name of this extension.
|
|
19
|
+
*/
|
|
20
|
+
this.name = NAME;
|
|
21
|
+
/**
|
|
22
|
+
* Defines a number that determines the order the extensions are applied.
|
|
23
|
+
*/
|
|
24
|
+
this.order = 200;
|
|
25
|
+
this._loader = loader;
|
|
26
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
dispose() {
|
|
30
|
+
this._loader = null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
36
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
37
|
+
const promises = new Array();
|
|
38
|
+
promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));
|
|
39
|
+
promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
40
|
+
this._loader.loadMaterialAlphaProperties(context, material, babylonMaterial);
|
|
41
|
+
return Promise.all(promises).then(() => { });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
_loadSpecularGlossinessPropertiesAsync(context, properties, babylonMaterial) {
|
|
45
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
46
|
+
throw new Error(`${context}: Material type not supported`);
|
|
47
|
+
}
|
|
48
|
+
const promises = new Array();
|
|
49
|
+
babylonMaterial.metallic = null;
|
|
50
|
+
babylonMaterial.roughness = null;
|
|
51
|
+
if (properties.diffuseFactor) {
|
|
52
|
+
babylonMaterial.albedoColor = Color3.FromArray(properties.diffuseFactor);
|
|
53
|
+
babylonMaterial.alpha = properties.diffuseFactor[3];
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
babylonMaterial.albedoColor = Color3.White();
|
|
57
|
+
}
|
|
58
|
+
babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : Color3.White();
|
|
59
|
+
babylonMaterial.microSurface = properties.glossinessFactor == undefined ? 1 : properties.glossinessFactor;
|
|
60
|
+
if (properties.diffuseTexture) {
|
|
61
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTexture`, properties.diffuseTexture, (texture) => {
|
|
62
|
+
texture.name = `${babylonMaterial.name} (Diffuse)`;
|
|
63
|
+
babylonMaterial.albedoTexture = texture;
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
if (properties.specularGlossinessTexture) {
|
|
67
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/specularGlossinessTexture`, properties.specularGlossinessTexture, (texture) => {
|
|
68
|
+
texture.name = `${babylonMaterial.name} (Specular Glossiness)`;
|
|
69
|
+
babylonMaterial.reflectivityTexture = texture;
|
|
70
|
+
babylonMaterial.reflectivityTexture.hasAlpha = true;
|
|
71
|
+
}));
|
|
72
|
+
babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true;
|
|
73
|
+
}
|
|
74
|
+
return Promise.all(promises).then(() => { });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
unregisterGLTFExtension(NAME);
|
|
78
|
+
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));
|
|
79
|
+
|
|
80
|
+
export { KHR_materials_pbrSpecularGlossiness };
|
|
81
|
+
//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness-D2cm0Qti.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_pbrSpecularGlossiness-D2cm0Qti.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js"],"sourcesContent":["import { Color3 } from \"core/Maths/math.color\";\nimport { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_pbrSpecularGlossiness\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_pbrSpecularGlossiness {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 200;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, extension, babylonMaterial));\n this._loader.loadMaterialAlphaProperties(context, material, babylonMaterial);\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularGlossinessPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.metallic = null;\n babylonMaterial.roughness = null;\n if (properties.diffuseFactor) {\n babylonMaterial.albedoColor = Color3.FromArray(properties.diffuseFactor);\n babylonMaterial.alpha = properties.diffuseFactor[3];\n }\n else {\n babylonMaterial.albedoColor = Color3.White();\n }\n babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : Color3.White();\n babylonMaterial.microSurface = properties.glossinessFactor == undefined ? 1 : properties.glossinessFactor;\n if (properties.diffuseTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTexture`, properties.diffuseTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse)`;\n babylonMaterial.albedoTexture = texture;\n }));\n }\n if (properties.specularGlossinessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularGlossinessTexture`, properties.specularGlossinessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Glossiness)`;\n babylonMaterial.reflectivityTexture = texture;\n babylonMaterial.reflectivityTexture.hasAlpha = true;\n }));\n babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true;\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));\n//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,qCAAqC;AAClD;AACA;AACA;AACA;AACO,MAAM,mCAAmC,CAAC;AACjD;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,2B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AAC;AACpD;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,mCAAmC,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{aY as e,q as s,aN as r,aO as a}from"./index-bkYfr-SD.esm.min.js";import{G as o}from"./glTFLoader--eb4oZZe.esm.min.js";import"./rawTexture-C8eTjsTL.esm.min.js";import"./assetContainer-Bsqe9swA.esm.min.js";import"./glTFLoaderAnimation-C_jvKQZc.esm.min.js";const t="KHR_materials_pbrSpecularGlossiness";class i{constructor(e){this.name=t,this.order=200,this._loader=e,this.enabled=this._loader.isExtensionUsed(t)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,s,r){return o.LoadExtensionAsync(e,s,this.name,((a,o)=>{const t=new Array;return t.push(this._loader.loadMaterialBasePropertiesAsync(e,s,r)),t.push(this._loadSpecularGlossinessPropertiesAsync(a,o,r)),this._loader.loadMaterialAlphaProperties(e,s,r),Promise.all(t).then((()=>{}))}))}_loadSpecularGlossinessPropertiesAsync(r,a,o){if(!(o instanceof e))throw new Error(`${r}: Material type not supported`);const t=new Array;return o.metallic=null,o.roughness=null,a.diffuseFactor?(o.albedoColor=s.FromArray(a.diffuseFactor),o.alpha=a.diffuseFactor[3]):o.albedoColor=s.White(),o.reflectivityColor=a.specularFactor?s.FromArray(a.specularFactor):s.White(),o.microSurface=null==a.glossinessFactor?1:a.glossinessFactor,a.diffuseTexture&&t.push(this._loader.loadTextureInfoAsync(`${r}/diffuseTexture`,a.diffuseTexture,(e=>{e.name=`${o.name} (Diffuse)`,o.albedoTexture=e}))),a.specularGlossinessTexture&&(t.push(this._loader.loadTextureInfoAsync(`${r}/specularGlossinessTexture`,a.specularGlossinessTexture,(e=>{e.name=`${o.name} (Specular Glossiness)`,o.reflectivityTexture=e,o.reflectivityTexture.hasAlpha=!0}))),o.useMicroSurfaceFromReflectivityMapAlpha=!0),Promise.all(t).then((()=>{}))}}r(t),a(t,!0,(e=>new i(e)));export{i as KHR_materials_pbrSpecularGlossiness};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness-Na22WakQ.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_pbrSpecularGlossiness-Na22WakQ.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js"],"sourcesContent":["import { Color3 } from \"core/Maths/math.color\";\nimport { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_pbrSpecularGlossiness\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_pbrSpecularGlossiness {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 200;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, extension, babylonMaterial));\n this._loader.loadMaterialAlphaProperties(context, material, babylonMaterial);\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularGlossinessPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.metallic = null;\n babylonMaterial.roughness = null;\n if (properties.diffuseFactor) {\n babylonMaterial.albedoColor = Color3.FromArray(properties.diffuseFactor);\n babylonMaterial.alpha = properties.diffuseFactor[3];\n }\n else {\n babylonMaterial.albedoColor = Color3.White();\n }\n babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : Color3.White();\n babylonMaterial.microSurface = properties.glossinessFactor == undefined ? 1 : properties.glossinessFactor;\n if (properties.diffuseTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTexture`, properties.diffuseTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse)`;\n babylonMaterial.albedoTexture = texture;\n }));\n }\n if (properties.specularGlossinessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularGlossinessTexture`, properties.specularGlossinessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Glossiness)`;\n babylonMaterial.reflectivityTexture = texture;\n babylonMaterial.reflectivityTexture.hasAlpha = true;\n }));\n babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true;\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));\n//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map"],"names":["NAME","KHR_materials_pbrSpecularGlossiness","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","loadMaterialBasePropertiesAsync","_loadSpecularGlossinessPropertiesAsync","loadMaterialAlphaProperties","Promise","all","then","properties","PBRMaterial","Error","metallic","roughness","diffuseFactor","albedoColor","Color3","FromArray","alpha","White","reflectivityColor","specularFactor","microSurface","undefined","glossinessFactor","diffuseTexture","loadTextureInfoAsync","texture","albedoTexture","specularGlossinessTexture","reflectivityTexture","hasAlpha","useMicroSurfaceFromReflectivityMapAlpha","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"qQAIA,MAAMA,EAAO,sCAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAIrB,OAHAD,EAASE,KAAKjB,KAAKG,QAAQe,gCAAgCV,EAASC,EAAUC,IAC9EK,EAASE,KAAKjB,KAAKmB,uCAAuCN,EAAkBC,EAAWJ,IACvFV,KAAKG,QAAQiB,4BAA4BZ,EAASC,EAAUC,GACrDW,QAAQC,IAAIP,GAAUQ,MAAK,QAAU,GAExD,CACI,sCAAAJ,CAAuCX,EAASgB,EAAYd,GACxD,KAAMA,aAA2Be,GAC7B,MAAM,IAAIC,MAAM,GAAGlB,kCAEvB,MAAMO,EAAW,IAAIC,MA0BrB,OAzBAN,EAAgBiB,SAAW,KAC3BjB,EAAgBkB,UAAY,KACxBJ,EAAWK,eACXnB,EAAgBoB,YAAcC,EAAOC,UAAUR,EAAWK,eAC1DnB,EAAgBuB,MAAQT,EAAWK,cAAc,IAGjDnB,EAAgBoB,YAAcC,EAAOG,QAEzCxB,EAAgByB,kBAAoBX,EAAWY,eAAiBL,EAAOC,UAAUR,EAAWY,gBAAkBL,EAAOG,QACrHxB,EAAgB2B,aAA8CC,MAA/Bd,EAAWe,iBAAgC,EAAIf,EAAWe,iBACrFf,EAAWgB,gBACXzB,EAASE,KAAKjB,KAAKG,QAAQsC,qBAAqB,GAAGjC,mBAA0BgB,EAAWgB,gBAAiBE,IACrGA,EAAQzC,KAAO,GAAGS,EAAgBT,iBAClCS,EAAgBiC,cAAgBD,CAAO,KAG3ClB,EAAWoB,4BACX7B,EAASE,KAAKjB,KAAKG,QAAQsC,qBAAqB,GAAGjC,8BAAqCgB,EAAWoB,2BAA4BF,IAC3HA,EAAQzC,KAAO,GAAGS,EAAgBT,6BAClCS,EAAgBmC,oBAAsBH,EACtChC,EAAgBmC,oBAAoBC,UAAW,CAAI,KAEvDpC,EAAgBqC,yCAA0C,GAEvD1B,QAAQC,IAAIP,GAAUQ,MAAK,QAC1C,EAEAyB,EAAwBpD,GACxBqD,EAAsBrD,GAAM,GAAOG,GAAW,IAAIF,EAAoCE"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { aY as PBRMaterial, q as Color3, aN as unregisterGLTFExtension, aO as registerGLTFExtension } from './index-CVMH5-nD.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-DDABr3tc.esm.js';
|
|
3
|
+
import './rawTexture-B4sxPzau.esm.js';
|
|
4
|
+
import './assetContainer-DO29qm5j.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-Ce1T-HK4.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "KHR_materials_sheen";
|
|
8
|
+
/**
|
|
9
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md)
|
|
10
|
+
* [Playground Sample](https://www.babylonjs-playground.com/frame.html#BNIZX6#4)
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
|
+
class KHR_materials_sheen {
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
constructor(loader) {
|
|
18
|
+
/**
|
|
19
|
+
* The name of this extension.
|
|
20
|
+
*/
|
|
21
|
+
this.name = NAME;
|
|
22
|
+
/**
|
|
23
|
+
* Defines a number that determines the order the extensions are applied.
|
|
24
|
+
*/
|
|
25
|
+
this.order = 190;
|
|
26
|
+
this._loader = loader;
|
|
27
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
dispose() {
|
|
31
|
+
this._loader = null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
37
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
38
|
+
const promises = new Array();
|
|
39
|
+
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
40
|
+
promises.push(this._loadSheenPropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
41
|
+
return Promise.all(promises).then(() => { });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
_loadSheenPropertiesAsync(context, properties, babylonMaterial) {
|
|
45
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
46
|
+
throw new Error(`${context}: Material type not supported`);
|
|
47
|
+
}
|
|
48
|
+
const promises = new Array();
|
|
49
|
+
babylonMaterial.sheen.isEnabled = true;
|
|
50
|
+
babylonMaterial.sheen.intensity = 1;
|
|
51
|
+
if (properties.sheenColorFactor != undefined) {
|
|
52
|
+
babylonMaterial.sheen.color = Color3.FromArray(properties.sheenColorFactor);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
babylonMaterial.sheen.color = Color3.Black();
|
|
56
|
+
}
|
|
57
|
+
if (properties.sheenColorTexture) {
|
|
58
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenColorTexture`, properties.sheenColorTexture, (texture) => {
|
|
59
|
+
texture.name = `${babylonMaterial.name} (Sheen Color)`;
|
|
60
|
+
babylonMaterial.sheen.texture = texture;
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
if (properties.sheenRoughnessFactor !== undefined) {
|
|
64
|
+
babylonMaterial.sheen.roughness = properties.sheenRoughnessFactor;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
babylonMaterial.sheen.roughness = 0;
|
|
68
|
+
}
|
|
69
|
+
if (properties.sheenRoughnessTexture) {
|
|
70
|
+
properties.sheenRoughnessTexture.nonColorData = true;
|
|
71
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenRoughnessTexture`, properties.sheenRoughnessTexture, (texture) => {
|
|
72
|
+
texture.name = `${babylonMaterial.name} (Sheen Roughness)`;
|
|
73
|
+
babylonMaterial.sheen.textureRoughness = texture;
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
babylonMaterial.sheen.albedoScaling = true;
|
|
77
|
+
babylonMaterial.sheen.useRoughnessFromMainTexture = false;
|
|
78
|
+
return Promise.all(promises).then(() => { });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
unregisterGLTFExtension(NAME);
|
|
82
|
+
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_sheen(loader));
|
|
83
|
+
|
|
84
|
+
export { KHR_materials_sheen };
|
|
85
|
+
//# sourceMappingURL=KHR_materials_sheen-BCY5GSrv.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_sheen-BCY5GSrv.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_sheen.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_sheen\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#BNIZX6#4)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_sheen {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSheenPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSheenPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.sheen.isEnabled = true;\n babylonMaterial.sheen.intensity = 1;\n if (properties.sheenColorFactor != undefined) {\n babylonMaterial.sheen.color = Color3.FromArray(properties.sheenColorFactor);\n }\n else {\n babylonMaterial.sheen.color = Color3.Black();\n }\n if (properties.sheenColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenColorTexture`, properties.sheenColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Color)`;\n babylonMaterial.sheen.texture = texture;\n }));\n }\n if (properties.sheenRoughnessFactor !== undefined) {\n babylonMaterial.sheen.roughness = properties.sheenRoughnessFactor;\n }\n else {\n babylonMaterial.sheen.roughness = 0;\n }\n if (properties.sheenRoughnessTexture) {\n properties.sheenRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenRoughnessTexture`, properties.sheenRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Roughness)`;\n babylonMaterial.sheen.textureRoughness = texture;\n }));\n }\n babylonMaterial.sheen.albedoScaling = true;\n babylonMaterial.sheen.useRoughnessFromMainTexture = false;\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_sheen(loader));\n//# sourceMappingURL=KHR_materials_sheen.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACO,MAAM,mBAAmB,CAAC;AACjC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE;AACpE,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,gBAAgB,EAAE,SAAS,KAAK;AAC5G,YAAY,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE;AACxC,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;AACvG,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,gBAAgB,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AACvG,YAAY,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;AACxD,SAAS,CAAC;AACV;AACA,IAAI,yBAAyB,CAAC,OAAO,EAAE,UAAU,E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AqB,CAAC,YAAY,GAAG,IAAI;AAChE,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,EAAE,UAAU,CAAC,qBAAqB,EAAE,CAAC,OAAO,KAAK;AAC/I,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,kBAAkB,CAAC;AAC1E,gBAAgB,eAAe,CAAC,KAAK,CAAC,gBAAgB,GAAG,OAAO;AAChE,aAAa,CAAC,CAAC;AACf;AACA,QAAQ,eAAe,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI;AAClD,QAAQ,eAAe,CAAC,KAAK,CAAC,2BAA2B,GAAG,KAAK;AACjE,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;AACpD;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{aY as e,q as s,aN as n,aO as o}from"./index-bkYfr-SD.esm.min.js";import{G as r}from"./glTFLoader--eb4oZZe.esm.min.js";import"./rawTexture-C8eTjsTL.esm.min.js";import"./assetContainer-Bsqe9swA.esm.min.js";import"./glTFLoaderAnimation-C_jvKQZc.esm.min.js";const t="KHR_materials_sheen";class a{constructor(e){this.name=t,this.order=190,this._loader=e,this.enabled=this._loader.isExtensionUsed(t)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,s,n){return r.LoadExtensionAsync(e,s,this.name,((o,r)=>{const t=new Array;return t.push(this._loader.loadMaterialPropertiesAsync(e,s,n)),t.push(this._loadSheenPropertiesAsync(o,r,n)),Promise.all(t).then((()=>{}))}))}_loadSheenPropertiesAsync(n,o,r){if(!(r instanceof e))throw new Error(`${n}: Material type not supported`);const t=new Array;return r.sheen.isEnabled=!0,r.sheen.intensity=1,null!=o.sheenColorFactor?r.sheen.color=s.FromArray(o.sheenColorFactor):r.sheen.color=s.Black(),o.sheenColorTexture&&t.push(this._loader.loadTextureInfoAsync(`${n}/sheenColorTexture`,o.sheenColorTexture,(e=>{e.name=`${r.name} (Sheen Color)`,r.sheen.texture=e}))),void 0!==o.sheenRoughnessFactor?r.sheen.roughness=o.sheenRoughnessFactor:r.sheen.roughness=0,o.sheenRoughnessTexture&&(o.sheenRoughnessTexture.nonColorData=!0,t.push(this._loader.loadTextureInfoAsync(`${n}/sheenRoughnessTexture`,o.sheenRoughnessTexture,(e=>{e.name=`${r.name} (Sheen Roughness)`,r.sheen.textureRoughness=e})))),r.sheen.albedoScaling=!0,r.sheen.useRoughnessFromMainTexture=!1,Promise.all(t).then((()=>{}))}}n(t),o(t,!0,(e=>new a(e)));export{a as KHR_materials_sheen};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_sheen-BEHiRviB.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_sheen-BEHiRviB.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_sheen.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_sheen\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#BNIZX6#4)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_sheen {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSheenPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSheenPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.sheen.isEnabled = true;\n babylonMaterial.sheen.intensity = 1;\n if (properties.sheenColorFactor != undefined) {\n babylonMaterial.sheen.color = Color3.FromArray(properties.sheenColorFactor);\n }\n else {\n babylonMaterial.sheen.color = Color3.Black();\n }\n if (properties.sheenColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenColorTexture`, properties.sheenColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Color)`;\n babylonMaterial.sheen.texture = texture;\n }));\n }\n if (properties.sheenRoughnessFactor !== undefined) {\n babylonMaterial.sheen.roughness = properties.sheenRoughnessFactor;\n }\n else {\n babylonMaterial.sheen.roughness = 0;\n }\n if (properties.sheenRoughnessTexture) {\n properties.sheenRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenRoughnessTexture`, properties.sheenRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Roughness)`;\n babylonMaterial.sheen.textureRoughness = texture;\n }));\n }\n babylonMaterial.sheen.albedoScaling = true;\n babylonMaterial.sheen.useRoughnessFromMainTexture = false;\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_sheen(loader));\n//# sourceMappingURL=KHR_materials_sheen.js.map"],"names":["NAME","KHR_materials_sheen","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadSheenPropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","sheen","isEnabled","intensity","undefined","sheenColorFactor","color","Color3","FromArray","Black","sheenColorTexture","loadTextureInfoAsync","texture","sheenRoughnessFactor","roughness","sheenRoughnessTexture","nonColorData","textureRoughness","albedoScaling","useRoughnessFromMainTexture","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"qQAIA,MAAMA,EAAO,sBAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,0BAA0BL,EAAkBC,EAAWJ,IACnES,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,yBAAAH,CAA0BV,EAASc,EAAYZ,GAC3C,KAAMA,aAA2Ba,GAC7B,MAAM,IAAIC,MAAM,GAAGhB,kCAEvB,MAAMO,EAAW,IAAIC,MA8BrB,OA7BAN,EAAgBe,MAAMC,WAAY,EAClChB,EAAgBe,MAAME,UAAY,EACCC,MAA/BN,EAAWO,iBACXnB,EAAgBe,MAAMK,MAAQC,EAAOC,UAAUV,EAAWO,kBAG1DnB,EAAgBe,MAAMK,MAAQC,EAAOE,QAErCX,EAAWY,mBACXnB,EAASE,KAAKjB,KAAKG,QAAQgC,qBAAqB,GAAG3B,sBAA6Bc,EAAWY,mBAAoBE,IAC3GA,EAAQnC,KAAO,GAAGS,EAAgBT,qBAClCS,EAAgBe,MAAMW,QAAUA,CAAO,UAGPR,IAApCN,EAAWe,qBACX3B,EAAgBe,MAAMa,UAAYhB,EAAWe,qBAG7C3B,EAAgBe,MAAMa,UAAY,EAElChB,EAAWiB,wBACXjB,EAAWiB,sBAAsBC,cAAe,EAChDzB,EAASE,KAAKjB,KAAKG,QAAQgC,qBAAqB,GAAG3B,0BAAiCc,EAAWiB,uBAAwBH,IACnHA,EAAQnC,KAAO,GAAGS,EAAgBT,yBAClCS,EAAgBe,MAAMgB,iBAAmBL,CAAO,MAGxD1B,EAAgBe,MAAMiB,eAAgB,EACtChC,EAAgBe,MAAMkB,6BAA8B,EAC7CxB,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEAuB,EAAwBhD,GACxBiD,EAAsBjD,GAAM,GAAOG,GAAW,IAAIF,EAAoBE"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { aY as PBRMaterial, q as Color3, aN as unregisterGLTFExtension, aO as registerGLTFExtension } from './index-CVMH5-nD.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-DDABr3tc.esm.js';
|
|
3
|
+
import './rawTexture-B4sxPzau.esm.js';
|
|
4
|
+
import './assetContainer-DO29qm5j.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-Ce1T-HK4.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "KHR_materials_specular";
|
|
8
|
+
/**
|
|
9
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)
|
|
10
|
+
*/
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
+
class KHR_materials_specular {
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
constructor(loader) {
|
|
17
|
+
/**
|
|
18
|
+
* The name of this extension.
|
|
19
|
+
*/
|
|
20
|
+
this.name = NAME;
|
|
21
|
+
/**
|
|
22
|
+
* Defines a number that determines the order the extensions are applied.
|
|
23
|
+
*/
|
|
24
|
+
this.order = 190;
|
|
25
|
+
this._loader = loader;
|
|
26
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
dispose() {
|
|
30
|
+
this._loader = null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
36
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
37
|
+
const promises = new Array();
|
|
38
|
+
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
39
|
+
promises.push(this._loadSpecularPropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
40
|
+
return Promise.all(promises).then(() => { });
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
_loadSpecularPropertiesAsync(context, properties, babylonMaterial) {
|
|
44
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
45
|
+
throw new Error(`${context}: Material type not supported`);
|
|
46
|
+
}
|
|
47
|
+
const promises = new Array();
|
|
48
|
+
if (properties.specularFactor !== undefined) {
|
|
49
|
+
babylonMaterial.metallicF0Factor = properties.specularFactor;
|
|
50
|
+
}
|
|
51
|
+
if (properties.specularColorFactor !== undefined) {
|
|
52
|
+
babylonMaterial.metallicReflectanceColor = Color3.FromArray(properties.specularColorFactor);
|
|
53
|
+
}
|
|
54
|
+
if (properties.specularTexture) {
|
|
55
|
+
properties.specularTexture.nonColorData = true;
|
|
56
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/specularTexture`, properties.specularTexture, (texture) => {
|
|
57
|
+
texture.name = `${babylonMaterial.name} (Specular)`;
|
|
58
|
+
babylonMaterial.metallicReflectanceTexture = texture;
|
|
59
|
+
babylonMaterial.useOnlyMetallicFromMetallicReflectanceTexture = true;
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
if (properties.specularColorTexture) {
|
|
63
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/specularColorTexture`, properties.specularColorTexture, (texture) => {
|
|
64
|
+
texture.name = `${babylonMaterial.name} (Specular Color)`;
|
|
65
|
+
babylonMaterial.reflectanceTexture = texture;
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
return Promise.all(promises).then(() => { });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
unregisterGLTFExtension(NAME);
|
|
72
|
+
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_specular(loader));
|
|
73
|
+
|
|
74
|
+
export { KHR_materials_specular };
|
|
75
|
+
//# sourceMappingURL=KHR_materials_specular-BFt2dwLj.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_specular-BFt2dwLj.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_specular.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_specular\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_specular {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSpecularPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n if (properties.specularFactor !== undefined) {\n babylonMaterial.metallicF0Factor = properties.specularFactor;\n }\n if (properties.specularColorFactor !== undefined) {\n babylonMaterial.metallicReflectanceColor = Color3.FromArray(properties.specularColorFactor);\n }\n if (properties.specularTexture) {\n properties.specularTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularTexture`, properties.specularTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular)`;\n babylonMaterial.metallicReflectanceTexture = texture;\n babylonMaterial.useOnlyMetallicFromMetallicReflectanceTexture = true;\n }));\n }\n if (properties.specularColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularColorTexture`, properties.specularColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Color)`;\n babylonMaterial.reflectanceTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_specular(loader));\n//# sourceMappingURL=KHR_materials_specular.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,wBAAwB;AACrC;AACA;AACA;AACA;AACO,MAAM,sBAAsB,CAAC;AACpC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AAC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C,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{aY as e,q as r,aN as a,aO as o}from"./index-bkYfr-SD.esm.min.js";import{G as s}from"./glTFLoader--eb4oZZe.esm.min.js";import"./rawTexture-C8eTjsTL.esm.min.js";import"./assetContainer-Bsqe9swA.esm.min.js";import"./glTFLoaderAnimation-C_jvKQZc.esm.min.js";const t="KHR_materials_specular";class l{constructor(e){this.name=t,this.order=190,this._loader=e,this.enabled=this._loader.isExtensionUsed(t)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,r,a){return s.LoadExtensionAsync(e,r,this.name,((o,s)=>{const t=new Array;return t.push(this._loader.loadMaterialPropertiesAsync(e,r,a)),t.push(this._loadSpecularPropertiesAsync(o,s,a)),Promise.all(t).then((()=>{}))}))}_loadSpecularPropertiesAsync(a,o,s){if(!(s instanceof e))throw new Error(`${a}: Material type not supported`);const t=new Array;return void 0!==o.specularFactor&&(s.metallicF0Factor=o.specularFactor),void 0!==o.specularColorFactor&&(s.metallicReflectanceColor=r.FromArray(o.specularColorFactor)),o.specularTexture&&(o.specularTexture.nonColorData=!0,t.push(this._loader.loadTextureInfoAsync(`${a}/specularTexture`,o.specularTexture,(e=>{e.name=`${s.name} (Specular)`,s.metallicReflectanceTexture=e,s.useOnlyMetallicFromMetallicReflectanceTexture=!0})))),o.specularColorTexture&&t.push(this._loader.loadTextureInfoAsync(`${a}/specularColorTexture`,o.specularColorTexture,(e=>{e.name=`${s.name} (Specular Color)`,s.reflectanceTexture=e}))),Promise.all(t).then((()=>{}))}}a(t),o(t,!0,(e=>new l(e)));export{l as KHR_materials_specular};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_specular-BGIPQ1rQ.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_specular-BGIPQ1rQ.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_specular.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_specular\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_specular {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSpecularPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n if (properties.specularFactor !== undefined) {\n babylonMaterial.metallicF0Factor = properties.specularFactor;\n }\n if (properties.specularColorFactor !== undefined) {\n babylonMaterial.metallicReflectanceColor = Color3.FromArray(properties.specularColorFactor);\n }\n if (properties.specularTexture) {\n properties.specularTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularTexture`, properties.specularTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular)`;\n babylonMaterial.metallicReflectanceTexture = texture;\n babylonMaterial.useOnlyMetallicFromMetallicReflectanceTexture = true;\n }));\n }\n if (properties.specularColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularColorTexture`, properties.specularColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Color)`;\n babylonMaterial.reflectanceTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_specular(loader));\n//# sourceMappingURL=KHR_materials_specular.js.map"],"names":["NAME","KHR_materials_specular","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadSpecularPropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","undefined","specularFactor","metallicF0Factor","specularColorFactor","metallicReflectanceColor","Color3","FromArray","specularTexture","nonColorData","loadTextureInfoAsync","texture","metallicReflectanceTexture","useOnlyMetallicFromMetallicReflectanceTexture","specularColorTexture","reflectanceTexture","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"qQAIA,MAAMA,EAAO,yBAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,6BAA6BL,EAAkBC,EAAWJ,IACtES,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,4BAAAH,CAA6BV,EAASc,EAAYZ,GAC9C,KAAMA,aAA2Ba,GAC7B,MAAM,IAAIC,MAAM,GAAGhB,kCAEvB,MAAMO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