@babylonjs/viewer 7.40.4 → 7.41.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/photoStudio.env +0 -0
- package/dist/babylon-viewer.esm.js +2 -0
- package/dist/babylon-viewer.esm.js.map +1 -0
- package/dist/babylon-viewer.esm.min.js +2 -0
- package/dist/babylon-viewer.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_ies-CFzvmxxg.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_ies-CFzvmxxg.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_ies-cyFdY7yl.esm.js +84 -0
- package/dist/chunks/EXT_lights_ies-cyFdY7yl.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-BNmSqx40.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-BNmSqx40.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-CC48JVU0.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-CC48JVU0.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-B2qj3kQu.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-B2qj3kQu.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-lanrAAoi.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-lanrAAoi.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-DjvHx7gJ.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-DjvHx7gJ.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-oH6HzGir.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-oH6HzGir.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-BYWETW7-.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-BYWETW7-.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-CKXEq29h.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-CKXEq29h.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-Dl4GPoEU.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-Dl4GPoEU.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-fAiSgaNl.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-fAiSgaNl.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-BUQ3X3M6.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-BUQ3X3M6.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-C_M9nxb4.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-C_M9nxb4.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-BdFZyLUq.esm.js +352 -0
- package/dist/chunks/KHR_animation_pointer-BdFZyLUq.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-CBqZcURZ.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-CBqZcURZ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-DU2Rk2nj.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-DU2Rk2nj.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-hVF9XuFz.esm.js +610 -0
- package/dist/chunks/KHR_draco_mesh_compression-hVF9XuFz.esm.js.map +1 -0
- package/dist/chunks/KHR_interactivity-COE1p684.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-COE1p684.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-Cv1s_pea.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-Cv1s_pea.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-CHf5kbKi.esm.js +581 -0
- package/dist/chunks/KHR_lights_punctual-CHf5kbKi.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-DIEAP5SG.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-DIEAP5SG.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-CU-xxV6y.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-CU-xxV6y.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-Cq6CU4qW.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-Cq6CU4qW.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-BSjcmIju.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-BSjcmIju.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-CVNNhJRE.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-CVNNhJRE.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-BDuGIkOh.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-BDuGIkOh.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-BZ-9rJUf.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-BZ-9rJUf.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-BxiGElVU.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-BxiGElVU.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-UI4zH1V_.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-UI4zH1V_.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-BT-Nu60T.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-BT-Nu60T.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-CwkVNmN7.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-CwkVNmN7.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-BGUUe5AW.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-BGUUe5AW.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-BbBQF-yw.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-BbBQF-yw.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-IFN2ewvr.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-IFN2ewvr.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-nLZDN7sc.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-nLZDN7sc.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CyNVQC-W.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CyNVQC-W.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-zxcydJdp.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-zxcydJdp.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-BWL9yo8Z.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-BWL9yo8Z.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-DSThWwq2.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-DSThWwq2.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-B96NRFEV.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-B96NRFEV.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-D2JwOdxw.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-D2JwOdxw.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-BvqtJXfD.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-BvqtJXfD.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-ljXN4y_0.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-ljXN4y_0.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-CjGTXU3z.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-CjGTXU3z.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-ww00IloC.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-ww00IloC.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-D0pVU1lm.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-D0pVU1lm.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-D3IDOJfB.esm.js +262 -0
- package/dist/chunks/KHR_materials_variants-D3IDOJfB.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-BfZR8rbr.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-BfZR8rbr.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-CLkC_Bvi.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-CLkC_Bvi.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-BJv1P2Wt.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-BJv1P2Wt.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-D69X_5bR.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-D69X_5bR.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-CG6s7hhs.esm.min.js +2 -0
- package/dist/chunks/KHR_node_hoverability-CG6s7hhs.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-xgvyZ_r-.esm.js +39 -0
- package/dist/chunks/KHR_node_hoverability-xgvyZ_r-.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-DUozjXRR.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-DUozjXRR.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-aAs5Kkey.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-aAs5Kkey.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-Bjw0jG1d.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-Bjw0jG1d.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-FWm46QOj.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-FWm46QOj.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-BZYr2brj.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-BZYr2brj.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-DdsN6SA_.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-DdsN6SA_.esm.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-DhFD64vh.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-DhFD64vh.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-sTn6N13E.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-sTn6N13E.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-5lrNj8-c.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-5lrNj8-c.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-B7RJSCaF.esm.js +2201 -0
- package/dist/chunks/MSFT_audio_emitter-B7RJSCaF.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-BJBjM7Gp.esm.js +337 -0
- package/dist/chunks/MSFT_lod-BJBjM7Gp.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-DpEZMnoU.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-DpEZMnoU.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-CXHPdyar.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-CXHPdyar.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-DRC2tMvY.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-DRC2tMvY.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-Db1asZRk.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-Db1asZRk.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-RhAtY3q7.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-RhAtY3q7.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-CjaFhT87.esm.min.js +2 -0
- package/dist/chunks/animationGroup-CjaFhT87.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-Ctc6BUYh.esm.js +2482 -0
- package/dist/chunks/animationGroup-Ctc6BUYh.esm.js.map +1 -0
- package/dist/chunks/assetContainer-DDEska5G.esm.min.js +2 -0
- package/dist/chunks/assetContainer-DDEska5G.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-QD3gUzyx.esm.js +1720 -0
- package/dist/chunks/assetContainer-QD3gUzyx.esm.js.map +1 -0
- package/dist/chunks/audioEngine-C6R2Ow6e.esm.js +305 -0
- package/dist/chunks/audioEngine-C6R2Ow6e.esm.js.map +1 -0
- package/dist/chunks/audioEngine-FKYFzzDb.esm.min.js +2 -0
- package/dist/chunks/audioEngine-FKYFzzDb.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-DKR6lpIg.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-DKR6lpIg.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-Hxn22qoJ.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-Hxn22qoJ.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-BcNAHqjw.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-BcNAHqjw.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-Dr2d0ez5.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-Dr2d0ez5.esm.js.map +1 -0
- package/dist/chunks/dds-CFrq_XFM.esm.js +540 -0
- package/dist/chunks/dds-CFrq_XFM.esm.js.map +1 -0
- package/dist/chunks/dds-D1NTXLIL.esm.min.js +2 -0
- package/dist/chunks/dds-D1NTXLIL.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-DbvffCUa.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-DbvffCUa.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-wyjUdBoO.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-wyjUdBoO.esm.js.map +1 -0
- package/dist/chunks/decalFragment-CGto5zyq.esm.js +18 -0
- package/dist/chunks/decalFragment-CGto5zyq.esm.js.map +1 -0
- package/dist/chunks/decalFragment-CU64C8uG.esm.min.js +2 -0
- package/dist/chunks/decalFragment-CU64C8uG.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-B2bhCC4E.esm.js +446 -0
- package/dist/chunks/default.fragment-B2bhCC4E.esm.js.map +1 -0
- package/dist/chunks/default.fragment-Boq79lom.esm.min.js +2 -0
- package/dist/chunks/default.fragment-Boq79lom.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-CluFtXFp.esm.min.js +2 -0
- package/dist/chunks/default.fragment-CluFtXFp.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-Dshl5Uqc.esm.js +515 -0
- package/dist/chunks/default.fragment-Dshl5Uqc.esm.js.map +1 -0
- package/dist/chunks/default.vertex-BAAgCiYo.esm.min.js +2 -0
- package/dist/chunks/default.vertex-BAAgCiYo.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-BhOIicZW.esm.min.js +2 -0
- package/dist/chunks/default.vertex-BhOIicZW.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-DL7IogGB.esm.js +211 -0
- package/dist/chunks/default.vertex-DL7IogGB.esm.js.map +1 -0
- package/dist/chunks/default.vertex-DOXcZEQ0.esm.js +190 -0
- package/dist/chunks/default.vertex-DOXcZEQ0.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-1qBz6EuF.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-1qBz6EuF.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-B9LzMzlw.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-B9LzMzlw.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-CXdodf7i.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-CXdodf7i.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-CZlCaxgu.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-CZlCaxgu.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-C3vcqEdz.esm.js +200 -0
- package/dist/chunks/dumpTools-C3vcqEdz.esm.js.map +1 -0
- package/dist/chunks/dumpTools-C8ZzlWEh.esm.min.js +2 -0
- package/dist/chunks/dumpTools-C8ZzlWEh.esm.min.js.map +1 -0
- package/dist/chunks/engine-_wVL12I1.esm.js +2213 -0
- package/dist/chunks/engine-_wVL12I1.esm.js.map +1 -0
- package/dist/chunks/engine-nCWszV_w.esm.min.js +2 -0
- package/dist/chunks/engine-nCWszV_w.esm.min.js.map +1 -0
- package/dist/chunks/engine.common-BuPfo1Wj.esm.min.js +2 -0
- package/dist/chunks/engine.common-BuPfo1Wj.esm.min.js.map +1 -0
- package/dist/chunks/engine.common-CT5iq3ZT.esm.js +1162 -0
- package/dist/chunks/engine.common-CT5iq3ZT.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-D7L0fVXR.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-D7L0fVXR.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-PtuRNDrr.esm.js +64 -0
- package/dist/chunks/envTextureLoader-PtuRNDrr.esm.js.map +1 -0
- package/dist/chunks/environmentTextureTools-BjmCbfSf.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-BjmCbfSf.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-DYbFmR95.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-DYbFmR95.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-BIPK0bPG.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-BIPK0bPG.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-CEhv_7O9.esm.js +1683 -0
- package/dist/chunks/exrTextureLoader-CEhv_7O9.esm.js.map +1 -0
- package/dist/chunks/fogFragment-B7_evZbY.esm.js +102 -0
- package/dist/chunks/fogFragment-B7_evZbY.esm.js.map +1 -0
- package/dist/chunks/fogFragment-CoZPb7oI.esm.min.js +2 -0
- package/dist/chunks/fogFragment-CoZPb7oI.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-DSO97-dc.esm.min.js +2 -0
- package/dist/chunks/fogFragment-DSO97-dc.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-wY2jQ7fb.esm.js +101 -0
- package/dist/chunks/fogFragment-wY2jQ7fb.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-BSEp5SCT.esm.js +12 -0
- package/dist/chunks/fresnelFunction-BSEp5SCT.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-Cg-NNSrz.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-Cg-NNSrz.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-3ZUBWawQ.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-3ZUBWawQ.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-DVoAJl_A.esm.js +7658 -0
- package/dist/chunks/glTFLoader-DVoAJl_A.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-By7yP8sQ.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-By7yP8sQ.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-C9g-SHaJ.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-C9g-SHaJ.esm.min.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-B8pgRSdd.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-B8pgRSdd.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-BcfkM4gb.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-BcfkM4gb.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-DF1x585z.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-DF1x585z.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-a48Ki58F.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-a48Ki58F.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-BWnO8u1r.esm.js +253 -0
- package/dist/chunks/hdrTextureLoader-BWnO8u1r.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-Bii9QpYI.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-Bii9QpYI.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-BinFB44e.esm.js +110 -0
- package/dist/chunks/helperFunctions-BinFB44e.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-CZAyJNTJ.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-CZAyJNTJ.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-DjoUVhI2.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-DjoUVhI2.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-Ds3-3-tu.esm.js +83 -0
- package/dist/chunks/helperFunctions-Ds3-3-tu.esm.js.map +1 -0
- package/dist/chunks/iesTextureLoader-CsnjIN7M.esm.js +189 -0
- package/dist/chunks/iesTextureLoader-CsnjIN7M.esm.js.map +1 -0
- package/dist/chunks/iesTextureLoader-DkmTomCD.esm.min.js +2 -0
- package/dist/chunks/iesTextureLoader-DkmTomCD.esm.min.js.map +1 -0
- package/dist/chunks/index-Cw2FZpYY.esm.js +74870 -0
- package/dist/chunks/index-Cw2FZpYY.esm.js.map +1 -0
- package/dist/chunks/index-DRbhrB0j.esm.min.js +57 -0
- package/dist/chunks/index-DRbhrB0j.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-B4pmAFQl.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-B4pmAFQl.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-B8Rlj2T0.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-B8Rlj2T0.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-CGz2sG_K.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-CGz2sG_K.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-CfVFs2QC.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-CfVFs2QC.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-CzVshpad.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-CzVshpad.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-xOwnAKtd.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-xOwnAKtd.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-BRgUZAsw.esm.js +81 -0
- package/dist/chunks/logDepthVertex-BRgUZAsw.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-CWfPfN9-.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-CWfPfN9-.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-HDlt7vTP.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-HDlt7vTP.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-l0uEG89p.esm.js +77 -0
- package/dist/chunks/logDepthVertex-l0uEG89p.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-B72zV2P9.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-B72zV2P9.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-BDogjZrz.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-BDogjZrz.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-DO5HJKyl.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-DO5HJKyl.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-DqzNajlu.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-DqzNajlu.esm.js.map +1 -0
- package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +119 -0
- package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +1 -0
- package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +2 -0
- package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-BCO87lfZ.esm.js +26 -0
- package/dist/chunks/meshUboDeclaration-BCO87lfZ.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-o4Xf2fwW.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-o4Xf2fwW.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-BfPYM2Sh.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-BfPYM2Sh.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-D1emf4Qh.esm.js +1338 -0
- package/dist/chunks/objFileLoader-D1emf4Qh.esm.js.map +1 -0
- package/dist/chunks/oitFragment-B92YpEfj.esm.min.js +2 -0
- package/dist/chunks/oitFragment-B92YpEfj.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-BoFKkDNv.esm.js +1078 -0
- package/dist/chunks/oitFragment-BoFKkDNv.esm.js.map +1 -0
- package/dist/chunks/oitFragment-Cfx3g0iX.esm.js +1240 -0
- package/dist/chunks/oitFragment-Cfx3g0iX.esm.js.map +1 -0
- package/dist/chunks/oitFragment-CiA7gld-.esm.min.js +2 -0
- package/dist/chunks/oitFragment-CiA7gld-.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-BLbIViJ7.esm.js +15 -0
- package/dist/chunks/pass.fragment-BLbIViJ7.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-BqMk9ouF.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-BqMk9ouF.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-BuVDFNSR.esm.js +15 -0
- package/dist/chunks/pass.fragment-BuVDFNSR.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-cM5FBHLm.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-cM5FBHLm.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-5L_F7nGn.esm.js +3222 -0
- package/dist/chunks/pbr.fragment-5L_F7nGn.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-BJNPHSa-.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-BJNPHSa-.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-CTLrOzV2.esm.js +3269 -0
- package/dist/chunks/pbr.fragment-CTLrOzV2.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-D9MJFOr2.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-D9MJFOr2.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-BJyjq_fb.esm.js +223 -0
- package/dist/chunks/pbr.vertex-BJyjq_fb.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-Bm8Ng4Sx.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-Bm8Ng4Sx.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-CAKPUhfb.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-CAKPUhfb.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-DJd_-MvE.esm.js +348 -0
- package/dist/chunks/pbr.vertex-DJd_-MvE.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-BjRX5eGi.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-BjRX5eGi.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-CFaKNIU-.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-CFaKNIU-.esm.js.map +1 -0
- package/dist/chunks/rawTexture-ByD8l28R.esm.min.js +2 -0
- package/dist/chunks/rawTexture-ByD8l28R.esm.min.js.map +1 -0
- package/dist/chunks/rawTexture-DGz22uaX.esm.js +191 -0
- package/dist/chunks/rawTexture-DGz22uaX.esm.js.map +1 -0
- package/dist/chunks/ray-ByafiITx.esm.js +946 -0
- package/dist/chunks/ray-ByafiITx.esm.js.map +1 -0
- package/dist/chunks/ray-ChSTYrPm.esm.min.js +2 -0
- package/dist/chunks/ray-ChSTYrPm.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CJ7PpH1N.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-CJ7PpH1N.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DJ9crbPP.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-DJ9crbPP.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DLpb3z18.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-DLpb3z18.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-ygeOUzIi.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-ygeOUzIi.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BTG_wbck.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-BTG_wbck.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-C2s4AQaM.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-C2s4AQaM.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-C6LKySQH.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-C6LKySQH.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-CKB2lpgL.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-CKB2lpgL.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-BtSUlfZs.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-BtSUlfZs.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-Wn5sDtLq.esm.js +3379 -0
- package/dist/chunks/splatFileLoader-Wn5sDtLq.esm.js.map +1 -0
- package/dist/chunks/spotLight-CmDQEB8V.esm.js +701 -0
- package/dist/chunks/spotLight-CmDQEB8V.esm.js.map +1 -0
- package/dist/chunks/spotLight-hg94aMJD.esm.min.js +2 -0
- package/dist/chunks/spotLight-hg94aMJD.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-BhIiLn1_.esm.js +1806 -0
- package/dist/chunks/standardMaterial-BhIiLn1_.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-DQii8fRL.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-DQii8fRL.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-D83u9BOr.esm.js +238 -0
- package/dist/chunks/stlFileLoader-D83u9BOr.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-DkXWqjZo.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-DkXWqjZo.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-C9xl6cvE.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-C9xl6cvE.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-DfzjGulW.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-DfzjGulW.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-Cu21aOSC.esm.min.js +2 -0
- package/dist/chunks/thinEngine-Cu21aOSC.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-IzS60pqU.esm.js +3853 -0
- package/dist/chunks/thinEngine-IzS60pqU.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-BN8Ev-h8.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-BN8Ev-h8.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-Bm9vmKU4.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-Bm9vmKU4.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-Cazf4vEl.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-Cazf4vEl.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DGvq3Fju.esm.js +421 -0
- package/dist/chunks/vertexColorMixing-DGvq3Fju.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-D_6ZvivZ.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-D_6ZvivZ.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DuYHnuUm.esm.js +531 -0
- package/dist/chunks/vertexColorMixing-DuYHnuUm.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-DHaXinU4.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-DHaXinU4.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-Dxev7pbz.esm.js +11538 -0
- package/dist/chunks/webgpuEngine-Dxev7pbz.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/lib/index.d.ts +591 -0
- package/lib/index.js +2165 -0
- package/lib/index.js.map +1 -0
- package/package.json +19 -28
- package/readme.md +28 -28
- 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,382 @@
|
|
|
1
|
+
import { L as Logger, T as Tools, c as ILog2, C as Constants, by as PostProcess, I as InternalTexture, B as BaseTexture, S as SphericalPolynomial, v as Vector3 } from './index-Cw2FZpYY.esm.js';
|
|
2
|
+
import './dumpTools-C3vcqEdz.esm.js';
|
|
3
|
+
|
|
4
|
+
const DefaultEnvironmentTextureImageType = "image/png";
|
|
5
|
+
const CurrentVersion = 2;
|
|
6
|
+
/**
|
|
7
|
+
* Magic number identifying the env file.
|
|
8
|
+
*/
|
|
9
|
+
const MagicBytes = [0x86, 0x16, 0x87, 0x96, 0xf6, 0xd6, 0x96, 0x36];
|
|
10
|
+
/**
|
|
11
|
+
* Gets the environment info from an env file.
|
|
12
|
+
* @param data The array buffer containing the .env bytes.
|
|
13
|
+
* @returns the environment file info (the json header) if successfully parsed, normalized to the latest supported version.
|
|
14
|
+
*/
|
|
15
|
+
function GetEnvInfo(data) {
|
|
16
|
+
const dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
17
|
+
let pos = 0;
|
|
18
|
+
for (let i = 0; i < MagicBytes.length; i++) {
|
|
19
|
+
if (dataView.getUint8(pos++) !== MagicBytes[i]) {
|
|
20
|
+
Logger.Error("Not a babylon environment map");
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// Read json manifest - collect characters up to null terminator
|
|
25
|
+
let manifestString = "";
|
|
26
|
+
let charCode = 0x00;
|
|
27
|
+
while ((charCode = dataView.getUint8(pos++))) {
|
|
28
|
+
manifestString += String.fromCharCode(charCode);
|
|
29
|
+
}
|
|
30
|
+
let manifest = JSON.parse(manifestString);
|
|
31
|
+
manifest = normalizeEnvInfo(manifest);
|
|
32
|
+
if (manifest.specular) {
|
|
33
|
+
// Extend the header with the position of the payload.
|
|
34
|
+
manifest.specular.specularDataPosition = pos;
|
|
35
|
+
// Fallback to 0.8 exactly if lodGenerationScale is not defined for backward compatibility.
|
|
36
|
+
manifest.specular.lodGenerationScale = manifest.specular.lodGenerationScale || 0.8;
|
|
37
|
+
}
|
|
38
|
+
return manifest;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Normalizes any supported version of the environment file info to the latest version
|
|
42
|
+
* @param info environment file info on any supported version
|
|
43
|
+
* @returns environment file info in the latest supported version
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
function normalizeEnvInfo(info) {
|
|
47
|
+
if (info.version > CurrentVersion) {
|
|
48
|
+
throw new Error(`Unsupported babylon environment map version "${info.version}". Latest supported version is "${CurrentVersion}".`);
|
|
49
|
+
}
|
|
50
|
+
if (info.version === 2) {
|
|
51
|
+
return info;
|
|
52
|
+
}
|
|
53
|
+
// Migrate a v1 info to v2
|
|
54
|
+
info = { ...info, version: 2, imageType: DefaultEnvironmentTextureImageType };
|
|
55
|
+
return info;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates the ArrayBufferViews used for initializing environment texture image data.
|
|
59
|
+
* @param data the image data
|
|
60
|
+
* @param info parameters that determine what views will be created for accessing the underlying buffer
|
|
61
|
+
* @returns the views described by info providing access to the underlying buffer
|
|
62
|
+
*/
|
|
63
|
+
function CreateImageDataArrayBufferViews(data, info) {
|
|
64
|
+
info = normalizeEnvInfo(info);
|
|
65
|
+
const specularInfo = info.specular;
|
|
66
|
+
// Double checks the enclosed info
|
|
67
|
+
let mipmapsCount = Math.log2(info.width);
|
|
68
|
+
mipmapsCount = Math.round(mipmapsCount) + 1;
|
|
69
|
+
if (specularInfo.mipmaps.length !== 6 * mipmapsCount) {
|
|
70
|
+
throw new Error(`Unsupported specular mipmaps number "${specularInfo.mipmaps.length}"`);
|
|
71
|
+
}
|
|
72
|
+
const imageData = new Array(mipmapsCount);
|
|
73
|
+
for (let i = 0; i < mipmapsCount; i++) {
|
|
74
|
+
imageData[i] = new Array(6);
|
|
75
|
+
for (let face = 0; face < 6; face++) {
|
|
76
|
+
const imageInfo = specularInfo.mipmaps[i * 6 + face];
|
|
77
|
+
imageData[i][face] = new Uint8Array(data.buffer, data.byteOffset + specularInfo.specularDataPosition + imageInfo.position, imageInfo.length);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return imageData;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Uploads the texture info contained in the env file to the GPU.
|
|
84
|
+
* @param texture defines the internal texture to upload to
|
|
85
|
+
* @param data defines the data to load
|
|
86
|
+
* @param info defines the texture info retrieved through the GetEnvInfo method
|
|
87
|
+
* @returns a promise
|
|
88
|
+
*/
|
|
89
|
+
function UploadEnvLevelsAsync(texture, data, info) {
|
|
90
|
+
info = normalizeEnvInfo(info);
|
|
91
|
+
const specularInfo = info.specular;
|
|
92
|
+
if (!specularInfo) {
|
|
93
|
+
// Nothing else parsed so far
|
|
94
|
+
return Promise.resolve();
|
|
95
|
+
}
|
|
96
|
+
texture._lodGenerationScale = specularInfo.lodGenerationScale;
|
|
97
|
+
const imageData = CreateImageDataArrayBufferViews(data, info);
|
|
98
|
+
return UploadLevelsAsync(texture, imageData, info.imageType);
|
|
99
|
+
}
|
|
100
|
+
function _OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture) {
|
|
101
|
+
return new Promise((resolve, reject) => {
|
|
102
|
+
if (expandTexture) {
|
|
103
|
+
const tempTexture = engine.createTexture(null, true, true, null, Constants.TEXTURE_NEAREST_SAMPLINGMODE, null, (message) => {
|
|
104
|
+
reject(message);
|
|
105
|
+
}, image);
|
|
106
|
+
rgbdPostProcess?.onEffectCreatedObservable.addOnce((effect) => {
|
|
107
|
+
effect.executeWhenCompiled(() => {
|
|
108
|
+
// Uncompress the data to a RTT
|
|
109
|
+
rgbdPostProcess.externalTextureSamplerBinding = true;
|
|
110
|
+
rgbdPostProcess.onApply = (effect) => {
|
|
111
|
+
effect._bindTexture("textureSampler", tempTexture);
|
|
112
|
+
effect.setFloat2("scale", 1, engine._features.needsInvertingBitmap && image instanceof ImageBitmap ? -1 : 1);
|
|
113
|
+
};
|
|
114
|
+
if (!engine.scenes.length) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
engine.scenes[0].postProcessManager.directRender([rgbdPostProcess], cubeRtt, true, face, i);
|
|
118
|
+
// Cleanup
|
|
119
|
+
engine.restoreDefaultFramebuffer();
|
|
120
|
+
tempTexture.dispose();
|
|
121
|
+
URL.revokeObjectURL(url);
|
|
122
|
+
resolve();
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
engine._uploadImageToTexture(texture, image, face, i);
|
|
128
|
+
// Upload the face to the non lod texture support
|
|
129
|
+
if (generateNonLODTextures) {
|
|
130
|
+
const lodTexture = lodTextures[i];
|
|
131
|
+
if (lodTexture) {
|
|
132
|
+
engine._uploadImageToTexture(lodTexture._texture, image, face, 0);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
resolve();
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Uploads the levels of image data to the GPU.
|
|
141
|
+
* @param texture defines the internal texture to upload to
|
|
142
|
+
* @param imageData defines the array buffer views of image data [mipmap][face]
|
|
143
|
+
* @param imageType the mime type of the image data
|
|
144
|
+
* @returns a promise
|
|
145
|
+
*/
|
|
146
|
+
async function UploadLevelsAsync(texture, imageData, imageType = DefaultEnvironmentTextureImageType) {
|
|
147
|
+
if (!Tools.IsExponentOfTwo(texture.width)) {
|
|
148
|
+
throw new Error("Texture size must be a power of two");
|
|
149
|
+
}
|
|
150
|
+
const mipmapsCount = ILog2(texture.width) + 1;
|
|
151
|
+
// Gets everything ready.
|
|
152
|
+
const engine = texture.getEngine();
|
|
153
|
+
let expandTexture = false;
|
|
154
|
+
let generateNonLODTextures = false;
|
|
155
|
+
let rgbdPostProcess = null;
|
|
156
|
+
let cubeRtt = null;
|
|
157
|
+
let lodTextures = null;
|
|
158
|
+
const caps = engine.getCaps();
|
|
159
|
+
texture.format = Constants.TEXTUREFORMAT_RGBA;
|
|
160
|
+
texture.type = Constants.TEXTURETYPE_UNSIGNED_INT;
|
|
161
|
+
texture.generateMipMaps = true;
|
|
162
|
+
texture._cachedAnisotropicFilteringLevel = null;
|
|
163
|
+
engine.updateTextureSamplingMode(Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, texture);
|
|
164
|
+
// Add extra process if texture lod is not supported
|
|
165
|
+
if (!caps.textureLOD) {
|
|
166
|
+
expandTexture = false;
|
|
167
|
+
generateNonLODTextures = true;
|
|
168
|
+
lodTextures = {};
|
|
169
|
+
}
|
|
170
|
+
// in webgl 1 there are no ways to either render or copy lod level information for float textures.
|
|
171
|
+
else if (!engine._features.supportRenderAndCopyToLodForFloatTextures) {
|
|
172
|
+
expandTexture = false;
|
|
173
|
+
}
|
|
174
|
+
// If half float available we can uncompress the texture
|
|
175
|
+
else if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {
|
|
176
|
+
expandTexture = true;
|
|
177
|
+
texture.type = Constants.TEXTURETYPE_HALF_FLOAT;
|
|
178
|
+
}
|
|
179
|
+
// If full float available we can uncompress the texture
|
|
180
|
+
else if (caps.textureFloatRender && caps.textureFloatLinearFiltering) {
|
|
181
|
+
expandTexture = true;
|
|
182
|
+
texture.type = Constants.TEXTURETYPE_FLOAT;
|
|
183
|
+
}
|
|
184
|
+
// Expand the texture if possible
|
|
185
|
+
let shaderLanguage = 0 /* ShaderLanguage.GLSL */;
|
|
186
|
+
if (expandTexture) {
|
|
187
|
+
if (engine.isWebGPU) {
|
|
188
|
+
shaderLanguage = 1 /* ShaderLanguage.WGSL */;
|
|
189
|
+
await import('./rgbdDecode.fragment-CJ7PpH1N.esm.js');
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
await import('./rgbdDecode.fragment-DJ9crbPP.esm.js');
|
|
193
|
+
}
|
|
194
|
+
// Simply run through the decode PP
|
|
195
|
+
rgbdPostProcess = new PostProcess("rgbdDecode", "rgbdDecode", null, null, 1, null, Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, engine, false, undefined, texture.type, undefined, null, false, undefined, shaderLanguage);
|
|
196
|
+
texture._isRGBD = false;
|
|
197
|
+
texture.invertY = false;
|
|
198
|
+
cubeRtt = engine.createRenderTargetCubeTexture(texture.width, {
|
|
199
|
+
generateDepthBuffer: false,
|
|
200
|
+
generateMipMaps: true,
|
|
201
|
+
generateStencilBuffer: false,
|
|
202
|
+
samplingMode: Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,
|
|
203
|
+
type: texture.type,
|
|
204
|
+
format: Constants.TEXTUREFORMAT_RGBA,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
texture._isRGBD = true;
|
|
209
|
+
texture.invertY = true;
|
|
210
|
+
// In case of missing support, applies the same patch than DDS files.
|
|
211
|
+
if (generateNonLODTextures) {
|
|
212
|
+
const mipSlices = 3;
|
|
213
|
+
const scale = texture._lodGenerationScale;
|
|
214
|
+
const offset = texture._lodGenerationOffset;
|
|
215
|
+
for (let i = 0; i < mipSlices; i++) {
|
|
216
|
+
//compute LOD from even spacing in smoothness (matching shader calculation)
|
|
217
|
+
const smoothness = i / (mipSlices - 1);
|
|
218
|
+
const roughness = 1 - smoothness;
|
|
219
|
+
const minLODIndex = offset; // roughness = 0
|
|
220
|
+
const maxLODIndex = (mipmapsCount - 1) * scale + offset; // roughness = 1 (mipmaps start from 0)
|
|
221
|
+
const lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;
|
|
222
|
+
const mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));
|
|
223
|
+
const glTextureFromLod = new InternalTexture(engine, 2 /* InternalTextureSource.Temp */);
|
|
224
|
+
glTextureFromLod.isCube = true;
|
|
225
|
+
glTextureFromLod.invertY = true;
|
|
226
|
+
glTextureFromLod.generateMipMaps = false;
|
|
227
|
+
engine.updateTextureSamplingMode(Constants.TEXTURE_LINEAR_LINEAR, glTextureFromLod);
|
|
228
|
+
// Wrap in a base texture for easy binding.
|
|
229
|
+
const lodTexture = new BaseTexture(null);
|
|
230
|
+
lodTexture._isCube = true;
|
|
231
|
+
lodTexture._texture = glTextureFromLod;
|
|
232
|
+
lodTextures[mipmapIndex] = lodTexture;
|
|
233
|
+
switch (i) {
|
|
234
|
+
case 0:
|
|
235
|
+
texture._lodTextureLow = lodTexture;
|
|
236
|
+
break;
|
|
237
|
+
case 1:
|
|
238
|
+
texture._lodTextureMid = lodTexture;
|
|
239
|
+
break;
|
|
240
|
+
case 2:
|
|
241
|
+
texture._lodTextureHigh = lodTexture;
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
const promises = [];
|
|
248
|
+
// All mipmaps up to provided number of images
|
|
249
|
+
for (let i = 0; i < imageData.length; i++) {
|
|
250
|
+
// All faces
|
|
251
|
+
for (let face = 0; face < 6; face++) {
|
|
252
|
+
// Constructs an image element from image data
|
|
253
|
+
const bytes = imageData[i][face];
|
|
254
|
+
const blob = new Blob([bytes], { type: imageType });
|
|
255
|
+
const url = URL.createObjectURL(blob);
|
|
256
|
+
let promise;
|
|
257
|
+
if (engine._features.forceBitmapOverHTMLImageElement) {
|
|
258
|
+
promise = engine.createImageBitmap(blob, { premultiplyAlpha: "none" }).then((img) => {
|
|
259
|
+
return _OnImageReadyAsync(img, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
const image = new Image();
|
|
264
|
+
image.src = url;
|
|
265
|
+
// Enqueue promise to upload to the texture.
|
|
266
|
+
promise = new Promise((resolve, reject) => {
|
|
267
|
+
image.onload = () => {
|
|
268
|
+
_OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture)
|
|
269
|
+
.then(() => resolve())
|
|
270
|
+
.catch((reason) => {
|
|
271
|
+
reject(reason);
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
image.onerror = (error) => {
|
|
275
|
+
reject(error);
|
|
276
|
+
};
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
promises.push(promise);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
// Fill remaining mipmaps with black textures.
|
|
283
|
+
if (imageData.length < mipmapsCount) {
|
|
284
|
+
let data;
|
|
285
|
+
const size = Math.pow(2, mipmapsCount - 1 - imageData.length);
|
|
286
|
+
const dataLength = size * size * 4;
|
|
287
|
+
switch (texture.type) {
|
|
288
|
+
case Constants.TEXTURETYPE_UNSIGNED_INT: {
|
|
289
|
+
data = new Uint8Array(dataLength);
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
case Constants.TEXTURETYPE_HALF_FLOAT: {
|
|
293
|
+
data = new Uint16Array(dataLength);
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
case Constants.TEXTURETYPE_FLOAT: {
|
|
297
|
+
data = new Float32Array(dataLength);
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
for (let i = imageData.length; i < mipmapsCount; i++) {
|
|
302
|
+
for (let face = 0; face < 6; face++) {
|
|
303
|
+
engine._uploadArrayBufferViewToTexture(texture, data, face, i);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
// Once all done, finishes the cleanup and return
|
|
308
|
+
return Promise.all(promises).then(() => {
|
|
309
|
+
// Release temp RTT.
|
|
310
|
+
if (cubeRtt) {
|
|
311
|
+
engine._releaseTexture(texture);
|
|
312
|
+
cubeRtt._swapAndDie(texture);
|
|
313
|
+
}
|
|
314
|
+
// Release temp Post Process.
|
|
315
|
+
if (rgbdPostProcess) {
|
|
316
|
+
rgbdPostProcess.dispose();
|
|
317
|
+
}
|
|
318
|
+
// Flag internal texture as ready in case they are in use.
|
|
319
|
+
if (generateNonLODTextures) {
|
|
320
|
+
if (texture._lodTextureHigh && texture._lodTextureHigh._texture) {
|
|
321
|
+
texture._lodTextureHigh._texture.isReady = true;
|
|
322
|
+
}
|
|
323
|
+
if (texture._lodTextureMid && texture._lodTextureMid._texture) {
|
|
324
|
+
texture._lodTextureMid._texture.isReady = true;
|
|
325
|
+
}
|
|
326
|
+
if (texture._lodTextureLow && texture._lodTextureLow._texture) {
|
|
327
|
+
texture._lodTextureLow._texture.isReady = true;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Uploads spherical polynomials information to the texture.
|
|
334
|
+
* @param texture defines the texture we are trying to upload the information to
|
|
335
|
+
* @param info defines the environment texture info retrieved through the GetEnvInfo method
|
|
336
|
+
*/
|
|
337
|
+
function UploadEnvSpherical(texture, info) {
|
|
338
|
+
info = normalizeEnvInfo(info);
|
|
339
|
+
const irradianceInfo = info.irradiance;
|
|
340
|
+
if (!irradianceInfo) {
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
const sp = new SphericalPolynomial();
|
|
344
|
+
Vector3.FromArrayToRef(irradianceInfo.x, 0, sp.x);
|
|
345
|
+
Vector3.FromArrayToRef(irradianceInfo.y, 0, sp.y);
|
|
346
|
+
Vector3.FromArrayToRef(irradianceInfo.z, 0, sp.z);
|
|
347
|
+
Vector3.FromArrayToRef(irradianceInfo.xx, 0, sp.xx);
|
|
348
|
+
Vector3.FromArrayToRef(irradianceInfo.yy, 0, sp.yy);
|
|
349
|
+
Vector3.FromArrayToRef(irradianceInfo.zz, 0, sp.zz);
|
|
350
|
+
Vector3.FromArrayToRef(irradianceInfo.yz, 0, sp.yz);
|
|
351
|
+
Vector3.FromArrayToRef(irradianceInfo.zx, 0, sp.zx);
|
|
352
|
+
Vector3.FromArrayToRef(irradianceInfo.xy, 0, sp.xy);
|
|
353
|
+
texture._sphericalPolynomial = sp;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
358
|
+
function _UpdateRGBDAsync(internalTexture, data, sphericalPolynomial, lodScale, lodOffset) {
|
|
359
|
+
const proxy = internalTexture
|
|
360
|
+
.getEngine()
|
|
361
|
+
.createRawCubeTexture(null, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);
|
|
362
|
+
const proxyPromise = UploadLevelsAsync(proxy, data).then(() => internalTexture);
|
|
363
|
+
internalTexture.onRebuildCallback = (_internalTexture) => {
|
|
364
|
+
return {
|
|
365
|
+
proxy: proxyPromise,
|
|
366
|
+
isReady: true,
|
|
367
|
+
isAsync: true,
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
internalTexture._source = 13 /* InternalTextureSource.CubeRawRGBD */;
|
|
371
|
+
internalTexture._bufferViewArrayArray = data;
|
|
372
|
+
internalTexture._lodGenerationScale = lodScale;
|
|
373
|
+
internalTexture._lodGenerationOffset = lodOffset;
|
|
374
|
+
internalTexture._sphericalPolynomial = sphericalPolynomial;
|
|
375
|
+
return UploadLevelsAsync(internalTexture, data).then(() => {
|
|
376
|
+
internalTexture.isReady = true;
|
|
377
|
+
return internalTexture;
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
export { GetEnvInfo as G, UploadEnvSpherical as U, _UpdateRGBDAsync as _, UploadEnvLevelsAsync as a };
|
|
382
|
+
//# sourceMappingURL=environmentTextureTools-DYbFmR95.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environmentTextureTools-DYbFmR95.esm.js","sources":["../../../../../dev/core/dist/Misc/environmentTextureTools.js"],"sourcesContent":["import { Tools } from \"./tools\";\nimport { Vector3 } from \"../Maths/math.vector\";\nimport { ILog2 } from \"../Maths/math.scalar.functions\";\nimport { SphericalPolynomial } from \"../Maths/sphericalPolynomial\";\nimport { InternalTexture } from \"../Materials/Textures/internalTexture\";\nimport { BaseTexture } from \"../Materials/Textures/baseTexture\";\nimport { Constants } from \"../Engines/constants\";\nimport { Scene } from \"../scene\";\nimport { PostProcess } from \"../PostProcesses/postProcess\";\nimport { Logger } from \"../Misc/logger\";\nimport { RGBDTextureTools } from \"./rgbdTextureTools\";\nimport \"../Materials/Textures/baseTexture.polynomial\";\nimport { DumpDataAsync } from \"../Misc/dumpTools\";\nconst DefaultEnvironmentTextureImageType = \"image/png\";\nconst CurrentVersion = 2;\n/**\n * Magic number identifying the env file.\n */\nconst MagicBytes = [0x86, 0x16, 0x87, 0x96, 0xf6, 0xd6, 0x96, 0x36];\n/**\n * Gets the environment info from an env file.\n * @param data The array buffer containing the .env bytes.\n * @returns the environment file info (the json header) if successfully parsed, normalized to the latest supported version.\n */\nexport function GetEnvInfo(data) {\n const dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);\n let pos = 0;\n for (let i = 0; i < MagicBytes.length; i++) {\n if (dataView.getUint8(pos++) !== MagicBytes[i]) {\n Logger.Error(\"Not a babylon environment map\");\n return null;\n }\n }\n // Read json manifest - collect characters up to null terminator\n let manifestString = \"\";\n let charCode = 0x00;\n while ((charCode = dataView.getUint8(pos++))) {\n manifestString += String.fromCharCode(charCode);\n }\n let manifest = JSON.parse(manifestString);\n manifest = normalizeEnvInfo(manifest);\n if (manifest.specular) {\n // Extend the header with the position of the payload.\n manifest.specular.specularDataPosition = pos;\n // Fallback to 0.8 exactly if lodGenerationScale is not defined for backward compatibility.\n manifest.specular.lodGenerationScale = manifest.specular.lodGenerationScale || 0.8;\n }\n return manifest;\n}\n/**\n * Normalizes any supported version of the environment file info to the latest version\n * @param info environment file info on any supported version\n * @returns environment file info in the latest supported version\n * @private\n */\nexport function normalizeEnvInfo(info) {\n if (info.version > CurrentVersion) {\n throw new Error(`Unsupported babylon environment map version \"${info.version}\". Latest supported version is \"${CurrentVersion}\".`);\n }\n if (info.version === 2) {\n return info;\n }\n // Migrate a v1 info to v2\n info = { ...info, version: 2, imageType: DefaultEnvironmentTextureImageType };\n return info;\n}\n/**\n * Creates an environment texture from a loaded cube texture.\n * @param texture defines the cube texture to convert in env file\n * @param options options for the conversion process\n * @param options.imageType the mime type for the encoded images, with support for \"image/png\" (default) and \"image/webp\"\n * @param options.imageQuality the image quality of encoded WebP images.\n * @returns a promise containing the environment data if successful.\n */\nexport async function CreateEnvTextureAsync(texture, options = {}) {\n const internalTexture = texture.getInternalTexture();\n if (!internalTexture) {\n return Promise.reject(\"The cube texture is invalid.\");\n }\n const imageType = options.imageType ?? DefaultEnvironmentTextureImageType;\n const engine = internalTexture.getEngine();\n if (texture.textureType !== Constants.TEXTURETYPE_HALF_FLOAT &&\n texture.textureType !== Constants.TEXTURETYPE_FLOAT &&\n texture.textureType !== Constants.TEXTURETYPE_UNSIGNED_BYTE &&\n texture.textureType !== Constants.TEXTURETYPE_UNSIGNED_BYTE &&\n texture.textureType !== Constants.TEXTURETYPE_UNSIGNED_INTEGER &&\n texture.textureType !== -1) {\n return Promise.reject(\"The cube texture should allow HDR (Full Float or Half Float).\");\n }\n let textureType = Constants.TEXTURETYPE_FLOAT;\n if (!engine.getCaps().textureFloatRender) {\n textureType = Constants.TEXTURETYPE_HALF_FLOAT;\n if (!engine.getCaps().textureHalfFloatRender) {\n return Promise.reject(\"Env texture can only be created when the browser supports half float or full float rendering.\");\n }\n }\n // sphericalPolynomial is lazy loaded so simply accessing it should trigger the computation.\n texture.sphericalPolynomial;\n // Lets keep track of the polynomial promise so we can wait for it to be ready before generating the pixels.\n const sphericalPolynomialPromise = texture.getInternalTexture()?._sphericalPolynomialPromise;\n const cubeWidth = internalTexture.width;\n const hostingScene = new Scene(engine);\n const specularTextures = {};\n // As we are going to readPixels the faces of the cube, make sure the drawing/update commands for the cube texture are fully sent to the GPU in case it is drawn for the first time in this very frame!\n engine.flushFramebuffer();\n // Read and collect all mipmaps data from the cube.\n const mipmapsCount = ILog2(internalTexture.width);\n for (let i = 0; i <= mipmapsCount; i++) {\n const faceWidth = Math.pow(2, mipmapsCount - i);\n // All faces of the cube.\n for (let face = 0; face < 6; face++) {\n let faceData = await texture.readPixels(face, i, undefined, false);\n if (faceData && faceData.byteLength === faceData.length) {\n const faceDataFloat = new Float32Array(faceData.byteLength * 4);\n for (let i = 0; i < faceData.byteLength; i++) {\n faceDataFloat[i] = faceData[i] / 255;\n // Gamma to linear\n faceDataFloat[i] = Math.pow(faceDataFloat[i], 2.2);\n }\n faceData = faceDataFloat;\n }\n else if (faceData && texture.gammaSpace) {\n const floatData = faceData;\n for (let i = 0; i < floatData.length; i++) {\n // Gamma to linear\n floatData[i] = Math.pow(floatData[i], 2.2);\n }\n }\n const tempTexture = engine.createRawTexture(faceData, faceWidth, faceWidth, Constants.TEXTUREFORMAT_RGBA, false, true, Constants.TEXTURE_NEAREST_SAMPLINGMODE, null, textureType);\n await RGBDTextureTools.EncodeTextureToRGBD(tempTexture, hostingScene, textureType);\n const rgbdEncodedData = await engine._readTexturePixels(tempTexture, faceWidth, faceWidth);\n const imageEncodedData = await DumpDataAsync(faceWidth, faceWidth, rgbdEncodedData, imageType, undefined, false, true, options.imageQuality);\n specularTextures[i * 6 + face] = imageEncodedData;\n tempTexture.dispose();\n }\n }\n // We can delete the hosting scene keeping track of all the creation objects\n hostingScene.dispose();\n // Ensure completion of the polynomial creation promise.\n if (sphericalPolynomialPromise) {\n await sphericalPolynomialPromise;\n }\n // Creates the json header for the env texture\n const info = {\n version: CurrentVersion,\n width: cubeWidth,\n imageType,\n irradiance: _CreateEnvTextureIrradiance(texture),\n specular: {\n mipmaps: [],\n lodGenerationScale: texture.lodGenerationScale,\n },\n };\n // Sets the specular image data information\n let position = 0;\n for (let i = 0; i <= mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n const byteLength = specularTextures[i * 6 + face].byteLength;\n info.specular.mipmaps.push({\n length: byteLength,\n position: position,\n });\n position += byteLength;\n }\n }\n // Encode the JSON as an array buffer\n const infoString = JSON.stringify(info);\n const infoBuffer = new ArrayBuffer(infoString.length + 1);\n const infoView = new Uint8Array(infoBuffer); // Limited to ascii subset matching unicode.\n for (let i = 0, strLen = infoString.length; i < strLen; i++) {\n infoView[i] = infoString.charCodeAt(i);\n }\n // Ends up with a null terminator for easier parsing\n infoView[infoString.length] = 0x00;\n // Computes the final required size and creates the storage\n const totalSize = MagicBytes.length + position + infoBuffer.byteLength;\n const finalBuffer = new ArrayBuffer(totalSize);\n const finalBufferView = new Uint8Array(finalBuffer);\n const dataView = new DataView(finalBuffer);\n // Copy the magic bytes identifying the file in\n let pos = 0;\n for (let i = 0; i < MagicBytes.length; i++) {\n dataView.setUint8(pos++, MagicBytes[i]);\n }\n // Add the json info\n finalBufferView.set(new Uint8Array(infoBuffer), pos);\n pos += infoBuffer.byteLength;\n // Finally inserts the texture data\n for (let i = 0; i <= mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n const dataBuffer = specularTextures[i * 6 + face];\n finalBufferView.set(new Uint8Array(dataBuffer), pos);\n pos += dataBuffer.byteLength;\n }\n }\n // Voila\n return finalBuffer;\n}\n/**\n * Creates a JSON representation of the spherical data.\n * @param texture defines the texture containing the polynomials\n * @returns the JSON representation of the spherical info\n */\nfunction _CreateEnvTextureIrradiance(texture) {\n const polynmials = texture.sphericalPolynomial;\n if (polynmials == null) {\n return null;\n }\n return {\n x: [polynmials.x.x, polynmials.x.y, polynmials.x.z],\n y: [polynmials.y.x, polynmials.y.y, polynmials.y.z],\n z: [polynmials.z.x, polynmials.z.y, polynmials.z.z],\n xx: [polynmials.xx.x, polynmials.xx.y, polynmials.xx.z],\n yy: [polynmials.yy.x, polynmials.yy.y, polynmials.yy.z],\n zz: [polynmials.zz.x, polynmials.zz.y, polynmials.zz.z],\n yz: [polynmials.yz.x, polynmials.yz.y, polynmials.yz.z],\n zx: [polynmials.zx.x, polynmials.zx.y, polynmials.zx.z],\n xy: [polynmials.xy.x, polynmials.xy.y, polynmials.xy.z],\n };\n}\n/**\n * Creates the ArrayBufferViews used for initializing environment texture image data.\n * @param data the image data\n * @param info parameters that determine what views will be created for accessing the underlying buffer\n * @returns the views described by info providing access to the underlying buffer\n */\nexport function CreateImageDataArrayBufferViews(data, info) {\n info = normalizeEnvInfo(info);\n const specularInfo = info.specular;\n // Double checks the enclosed info\n let mipmapsCount = Math.log2(info.width);\n mipmapsCount = Math.round(mipmapsCount) + 1;\n if (specularInfo.mipmaps.length !== 6 * mipmapsCount) {\n throw new Error(`Unsupported specular mipmaps number \"${specularInfo.mipmaps.length}\"`);\n }\n const imageData = new Array(mipmapsCount);\n for (let i = 0; i < mipmapsCount; i++) {\n imageData[i] = new Array(6);\n for (let face = 0; face < 6; face++) {\n const imageInfo = specularInfo.mipmaps[i * 6 + face];\n imageData[i][face] = new Uint8Array(data.buffer, data.byteOffset + specularInfo.specularDataPosition + imageInfo.position, imageInfo.length);\n }\n }\n return imageData;\n}\n/**\n * Uploads the texture info contained in the env file to the GPU.\n * @param texture defines the internal texture to upload to\n * @param data defines the data to load\n * @param info defines the texture info retrieved through the GetEnvInfo method\n * @returns a promise\n */\nexport function UploadEnvLevelsAsync(texture, data, info) {\n info = normalizeEnvInfo(info);\n const specularInfo = info.specular;\n if (!specularInfo) {\n // Nothing else parsed so far\n return Promise.resolve();\n }\n texture._lodGenerationScale = specularInfo.lodGenerationScale;\n const imageData = CreateImageDataArrayBufferViews(data, info);\n return UploadLevelsAsync(texture, imageData, info.imageType);\n}\nfunction _OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture) {\n return new Promise((resolve, reject) => {\n if (expandTexture) {\n const tempTexture = engine.createTexture(null, true, true, null, Constants.TEXTURE_NEAREST_SAMPLINGMODE, null, (message) => {\n reject(message);\n }, image);\n rgbdPostProcess?.onEffectCreatedObservable.addOnce((effect) => {\n effect.executeWhenCompiled(() => {\n // Uncompress the data to a RTT\n rgbdPostProcess.externalTextureSamplerBinding = true;\n rgbdPostProcess.onApply = (effect) => {\n effect._bindTexture(\"textureSampler\", tempTexture);\n effect.setFloat2(\"scale\", 1, engine._features.needsInvertingBitmap && image instanceof ImageBitmap ? -1 : 1);\n };\n if (!engine.scenes.length) {\n return;\n }\n engine.scenes[0].postProcessManager.directRender([rgbdPostProcess], cubeRtt, true, face, i);\n // Cleanup\n engine.restoreDefaultFramebuffer();\n tempTexture.dispose();\n URL.revokeObjectURL(url);\n resolve();\n });\n });\n }\n else {\n engine._uploadImageToTexture(texture, image, face, i);\n // Upload the face to the non lod texture support\n if (generateNonLODTextures) {\n const lodTexture = lodTextures[i];\n if (lodTexture) {\n engine._uploadImageToTexture(lodTexture._texture, image, face, 0);\n }\n }\n resolve();\n }\n });\n}\n/**\n * Uploads the levels of image data to the GPU.\n * @param texture defines the internal texture to upload to\n * @param imageData defines the array buffer views of image data [mipmap][face]\n * @param imageType the mime type of the image data\n * @returns a promise\n */\nexport async function UploadLevelsAsync(texture, imageData, imageType = DefaultEnvironmentTextureImageType) {\n if (!Tools.IsExponentOfTwo(texture.width)) {\n throw new Error(\"Texture size must be a power of two\");\n }\n const mipmapsCount = ILog2(texture.width) + 1;\n // Gets everything ready.\n const engine = texture.getEngine();\n let expandTexture = false;\n let generateNonLODTextures = false;\n let rgbdPostProcess = null;\n let cubeRtt = null;\n let lodTextures = null;\n const caps = engine.getCaps();\n texture.format = Constants.TEXTUREFORMAT_RGBA;\n texture.type = Constants.TEXTURETYPE_UNSIGNED_INT;\n texture.generateMipMaps = true;\n texture._cachedAnisotropicFilteringLevel = null;\n engine.updateTextureSamplingMode(Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, texture);\n // Add extra process if texture lod is not supported\n if (!caps.textureLOD) {\n expandTexture = false;\n generateNonLODTextures = true;\n lodTextures = {};\n }\n // in webgl 1 there are no ways to either render or copy lod level information for float textures.\n else if (!engine._features.supportRenderAndCopyToLodForFloatTextures) {\n expandTexture = false;\n }\n // If half float available we can uncompress the texture\n else if (caps.textureHalfFloatRender && caps.textureHalfFloatLinearFiltering) {\n expandTexture = true;\n texture.type = Constants.TEXTURETYPE_HALF_FLOAT;\n }\n // If full float available we can uncompress the texture\n else if (caps.textureFloatRender && caps.textureFloatLinearFiltering) {\n expandTexture = true;\n texture.type = Constants.TEXTURETYPE_FLOAT;\n }\n // Expand the texture if possible\n let shaderLanguage = 0 /* ShaderLanguage.GLSL */;\n if (expandTexture) {\n if (engine.isWebGPU) {\n shaderLanguage = 1 /* ShaderLanguage.WGSL */;\n await import(\"../ShadersWGSL/rgbdDecode.fragment\");\n }\n else {\n await import(\"../Shaders/rgbdDecode.fragment\");\n }\n // Simply run through the decode PP\n rgbdPostProcess = new PostProcess(\"rgbdDecode\", \"rgbdDecode\", null, null, 1, null, Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, engine, false, undefined, texture.type, undefined, null, false, undefined, shaderLanguage);\n texture._isRGBD = false;\n texture.invertY = false;\n cubeRtt = engine.createRenderTargetCubeTexture(texture.width, {\n generateDepthBuffer: false,\n generateMipMaps: true,\n generateStencilBuffer: false,\n samplingMode: Constants.TEXTURE_TRILINEAR_SAMPLINGMODE,\n type: texture.type,\n format: Constants.TEXTUREFORMAT_RGBA,\n });\n }\n else {\n texture._isRGBD = true;\n texture.invertY = true;\n // In case of missing support, applies the same patch than DDS files.\n if (generateNonLODTextures) {\n const mipSlices = 3;\n const scale = texture._lodGenerationScale;\n const offset = texture._lodGenerationOffset;\n for (let i = 0; i < mipSlices; i++) {\n //compute LOD from even spacing in smoothness (matching shader calculation)\n const smoothness = i / (mipSlices - 1);\n const roughness = 1 - smoothness;\n const minLODIndex = offset; // roughness = 0\n const maxLODIndex = (mipmapsCount - 1) * scale + offset; // roughness = 1 (mipmaps start from 0)\n const lodIndex = minLODIndex + (maxLODIndex - minLODIndex) * roughness;\n const mipmapIndex = Math.round(Math.min(Math.max(lodIndex, 0), maxLODIndex));\n const glTextureFromLod = new InternalTexture(engine, 2 /* InternalTextureSource.Temp */);\n glTextureFromLod.isCube = true;\n glTextureFromLod.invertY = true;\n glTextureFromLod.generateMipMaps = false;\n engine.updateTextureSamplingMode(Constants.TEXTURE_LINEAR_LINEAR, glTextureFromLod);\n // Wrap in a base texture for easy binding.\n const lodTexture = new BaseTexture(null);\n lodTexture._isCube = true;\n lodTexture._texture = glTextureFromLod;\n lodTextures[mipmapIndex] = lodTexture;\n switch (i) {\n case 0:\n texture._lodTextureLow = lodTexture;\n break;\n case 1:\n texture._lodTextureMid = lodTexture;\n break;\n case 2:\n texture._lodTextureHigh = lodTexture;\n break;\n }\n }\n }\n }\n const promises = [];\n // All mipmaps up to provided number of images\n for (let i = 0; i < imageData.length; i++) {\n // All faces\n for (let face = 0; face < 6; face++) {\n // Constructs an image element from image data\n const bytes = imageData[i][face];\n const blob = new Blob([bytes], { type: imageType });\n const url = URL.createObjectURL(blob);\n let promise;\n if (engine._features.forceBitmapOverHTMLImageElement) {\n promise = engine.createImageBitmap(blob, { premultiplyAlpha: \"none\" }).then((img) => {\n return _OnImageReadyAsync(img, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture);\n });\n }\n else {\n const image = new Image();\n image.src = url;\n // Enqueue promise to upload to the texture.\n promise = new Promise((resolve, reject) => {\n image.onload = () => {\n _OnImageReadyAsync(image, engine, expandTexture, rgbdPostProcess, url, face, i, generateNonLODTextures, lodTextures, cubeRtt, texture)\n .then(() => resolve())\n .catch((reason) => {\n reject(reason);\n });\n };\n image.onerror = (error) => {\n reject(error);\n };\n });\n }\n promises.push(promise);\n }\n }\n // Fill remaining mipmaps with black textures.\n if (imageData.length < mipmapsCount) {\n let data;\n const size = Math.pow(2, mipmapsCount - 1 - imageData.length);\n const dataLength = size * size * 4;\n switch (texture.type) {\n case Constants.TEXTURETYPE_UNSIGNED_INT: {\n data = new Uint8Array(dataLength);\n break;\n }\n case Constants.TEXTURETYPE_HALF_FLOAT: {\n data = new Uint16Array(dataLength);\n break;\n }\n case Constants.TEXTURETYPE_FLOAT: {\n data = new Float32Array(dataLength);\n break;\n }\n }\n for (let i = imageData.length; i < mipmapsCount; i++) {\n for (let face = 0; face < 6; face++) {\n engine._uploadArrayBufferViewToTexture(texture, data, face, i);\n }\n }\n }\n // Once all done, finishes the cleanup and return\n return Promise.all(promises).then(() => {\n // Release temp RTT.\n if (cubeRtt) {\n engine._releaseTexture(texture);\n cubeRtt._swapAndDie(texture);\n }\n // Release temp Post Process.\n if (rgbdPostProcess) {\n rgbdPostProcess.dispose();\n }\n // Flag internal texture as ready in case they are in use.\n if (generateNonLODTextures) {\n if (texture._lodTextureHigh && texture._lodTextureHigh._texture) {\n texture._lodTextureHigh._texture.isReady = true;\n }\n if (texture._lodTextureMid && texture._lodTextureMid._texture) {\n texture._lodTextureMid._texture.isReady = true;\n }\n if (texture._lodTextureLow && texture._lodTextureLow._texture) {\n texture._lodTextureLow._texture.isReady = true;\n }\n }\n });\n}\n/**\n * Uploads spherical polynomials information to the texture.\n * @param texture defines the texture we are trying to upload the information to\n * @param info defines the environment texture info retrieved through the GetEnvInfo method\n */\nexport function UploadEnvSpherical(texture, info) {\n info = normalizeEnvInfo(info);\n const irradianceInfo = info.irradiance;\n if (!irradianceInfo) {\n return;\n }\n const sp = new SphericalPolynomial();\n Vector3.FromArrayToRef(irradianceInfo.x, 0, sp.x);\n Vector3.FromArrayToRef(irradianceInfo.y, 0, sp.y);\n Vector3.FromArrayToRef(irradianceInfo.z, 0, sp.z);\n Vector3.FromArrayToRef(irradianceInfo.xx, 0, sp.xx);\n Vector3.FromArrayToRef(irradianceInfo.yy, 0, sp.yy);\n Vector3.FromArrayToRef(irradianceInfo.zz, 0, sp.zz);\n Vector3.FromArrayToRef(irradianceInfo.yz, 0, sp.yz);\n Vector3.FromArrayToRef(irradianceInfo.zx, 0, sp.zx);\n Vector3.FromArrayToRef(irradianceInfo.xy, 0, sp.xy);\n texture._sphericalPolynomial = sp;\n}\n/**\n * @internal\n */\nexport function _UpdateRGBDAsync(internalTexture, data, sphericalPolynomial, lodScale, lodOffset) {\n const proxy = internalTexture\n .getEngine()\n .createRawCubeTexture(null, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);\n const proxyPromise = UploadLevelsAsync(proxy, data).then(() => internalTexture);\n internalTexture.onRebuildCallback = (_internalTexture) => {\n return {\n proxy: proxyPromise,\n isReady: true,\n isAsync: true,\n };\n };\n internalTexture._source = 13 /* InternalTextureSource.CubeRawRGBD */;\n internalTexture._bufferViewArrayArray = data;\n internalTexture._lodGenerationScale = lodScale;\n internalTexture._lodGenerationOffset = lodOffset;\n internalTexture._sphericalPolynomial = sphericalPolynomial;\n return UploadLevelsAsync(internalTexture, data).then(() => {\n internalTexture.isReady = true;\n return internalTexture;\n });\n}\n/**\n * Sets of helpers addressing the serialization and deserialization of environment texture\n * stored in a BabylonJS env file.\n * Those files are usually stored as .env files.\n */\nexport const EnvironmentTextureTools = {\n /**\n * Gets the environment info from an env file.\n * @param data The array buffer containing the .env bytes.\n * @returns the environment file info (the json header) if successfully parsed, normalized to the latest supported version.\n */\n GetEnvInfo,\n /**\n * Creates an environment texture from a loaded cube texture.\n * @param texture defines the cube texture to convert in env file\n * @param options options for the conversion process\n * @param options.imageType the mime type for the encoded images, with support for \"image/png\" (default) and \"image/webp\"\n * @param options.imageQuality the image quality of encoded WebP images.\n * @returns a promise containing the environment data if successful.\n */\n CreateEnvTextureAsync,\n /**\n * Creates the ArrayBufferViews used for initializing environment texture image data.\n * @param data the image data\n * @param info parameters that determine what views will be created for accessing the underlying buffer\n * @returns the views described by info providing access to the underlying buffer\n */\n CreateImageDataArrayBufferViews,\n /**\n * Uploads the texture info contained in the env file to the GPU.\n * @param texture defines the internal texture to upload to\n * @param data defines the data to load\n * @param info defines the texture info retrieved through the GetEnvInfo method\n * @returns a promise\n */\n UploadEnvLevelsAsync,\n /**\n * Uploads the levels of image data to the GPU.\n * @param texture defines the internal texture to upload to\n * @param imageData defines the array buffer views of image data [mipmap][face]\n * @param imageType the mime type of the image data\n * @returns a promise\n */\n UploadLevelsAsync,\n /**\n * Uploads spherical polynomials information to the texture.\n * @param texture defines the texture we are trying to upload the information to\n * @param info defines the environment texture info retrieved through the GetEnvInfo method\n */\n UploadEnvSpherical,\n};\n//# sourceMappingURL=environmentTextureTools.js.map"],"names":[],"mappings":";;;AAaA,MAAM,kCAAkC,GAAG,WAAW;AACtD,MAAM,cAAc,GAAG,CAAC;AACxB;AACA;AACA;AACA,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AACnE;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAC,IAAI,EAAE;AACjC,IAAI,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;AAChF,IAAI,IAAI,GAAG,GAAG,CAAC;AACf,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAChD,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE;AACxD,YAAY,MAA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S,SAAS;AAClB,SAAS,oBAAoB,CAAC,IAAI,EAAE,eAAe,CAAC,KAAK,EAAE,eAAe,CAAC,MAAM,EAAE,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,eAAe,EAAE,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAC;AAC9N,IAAI,MAAM,YAAY,GAAG,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,eAAe,CAAC;AACnF,IAAI,eAAe,CAAC,iBAAiB,GAAG,CAAC,gBAAgB,KAAK;AAC9D,QAAQ,OAAO;AACf,YAAY,KAAK,EAAE,YAAY;AAC/B,YAAY,OAAO,EAAE,IAAI;AACzB,YAAY,OAAO,EAAE,IAAI;AACzB,SAAS;AACT,KAAK;AACL,IAAI,eAAe,CAAC,OAAO,GAAG,EAAE;AAChC,IAAI,eAAe,CAAC,qBAAqB,GAAG,IAAI;AAChD,IAAI,eAAe,CAAC,mBAAmB,GAAG,QAAQ;AAClD,IAAI,eAAe,CAAC,oBAAoB,GAAG,SAAS;AACpD,IAAI,eAAe,CAAC,oBAAoB,GAAG,mBAAmB;AAC9D,IAAI,OAAO,iBAAiB,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM;AAC/D,QAAQ,eAAe,CAAC,OAAO,GAAG,IAAI;AACtC,QAAQ,OAAO,eAAe;AAC9B,KAAK,CAAC;AACN;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{bz as e,L as n,C as t,T as r}from"./index-DRbhrB0j.esm.min.js";const o=65536,a=14,i=65537,l=16384;var s,c;!function(e){e[e.NO_COMPRESSION=0]="NO_COMPRESSION",e[e.RLE_COMPRESSION=1]="RLE_COMPRESSION",e[e.ZIPS_COMPRESSION=2]="ZIPS_COMPRESSION",e[e.ZIP_COMPRESSION=3]="ZIP_COMPRESSION",e[e.PIZ_COMPRESSION=4]="PIZ_COMPRESSION",e[e.PXR24_COMPRESSION=5]="PXR24_COMPRESSION"}(s||(s={})),function(e){e[e.INCREASING_Y=0]="INCREASING_Y",e[e.DECREASING_Y=1]="DECREASING_Y"}(c||(c={}));const u=function(){const e=new ArrayBuffer(4),n=new Float32Array(e),t=new Uint32Array(e),r=new Uint32Array(512),o=new Uint32Array(512);for(let e=0;e<256;++e){const n=e-127;n<-27?(r[e]=0,r[256|e]=32768,o[e]=24,o[256|e]=24):n<-14?(r[e]=1024>>-n-14,r[256|e]=1024>>-n-14|32768,o[e]=-n-1,o[256|e]=-n-1):n<=15?(r[e]=n+15<<10,r[256|e]=n+15<<10|32768,o[e]=13,o[256|e]=13):n<128?(r[e]=31744,r[256|e]=64512,o[e]=24,o[256|e]=24):(r[e]=31744,r[256|e]=64512,o[e]=13,o[256|e]=13)}const a=new Uint32Array(2048),i=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let n=e<<13,t=0;for(;!(8388608&n);)n<<=1,t-=8388608;n&=-8388609,t+=947912704,a[e]=n|t}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)i[e]=e<<23;i[31]=1199570944,i[32]=2147483648;for(let e=33;e<63;++e)i[e]=2147483648+(e-32<<23);i[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return{floatView:n,uint32View:t,baseTable:r,shiftTable:o,mantissaTable:a,exponentTable:i,offsetTable:l}}();function f(e,n){const t=new Uint8Array(e);let r=0;for(;0!=t[n.value+r];)r+=1;const o=(new TextDecoder).decode(t.slice(n.value,n.value+r));return n.value=n.value+r+1,o}function w(e,n){const t=e.getInt32(n.value,!0);return n.value+=4,t}function h(e,n){const t=e.getUint32(n.value,!0);return n.value+=4,t}function p(e,n){const t=e.getUint8(n.value);return n.value+=1,t}function y(e,n){const t=e.getUint16(n.value,!0);return n.value+=2,t}function d(e,n){const t=e[n.value];return n.value+=1,t}function b(e,n){let t;return t="getBigInt64"in DataView.prototype?Number(e.getBigInt64(n.value,!0)):e.getUint32(n.value+4,!0)+Number(e.getUint32(n.value,!0)<<32),n.value+=8,t}function v(e,n){const t=e.getFloat32(n.value,!0);return n.value+=4,t}function E(e,n){return function(e){const n=(31744&e)>>10,t=1023&e;return(e>>15?-1:1)*(n?31===n?t?NaN:1/0:Math.pow(2,n-15)*(1+t/1024):t/1024*6103515625e-14)}(y(e,n))}function S(n,t){return function(n){if(Math.abs(n)>65504)throw new Error("Value out of range.Consider using float instead of half-float.");n=e(n,-65504,65504),u.floatView[0]=n;const t=u.uint32View[0],r=t>>23&511;return u.baseTable[r]+((8388607&t)>>u.shiftTable[r])}(v(n,t))}function A(e,n,t,r){switch(t){case"string":case"stringvector":case"iccProfile":return function(e,n,t){const r=(new TextDecoder).decode(new Uint8Array(e).slice(n.value,n.value+t));return n.value=n.value+t,r}(e.buffer,n,r);case"chlist":return function(e,n,t){const r=n.value,o=[];for(;n.value<r+t-1;){const t=f(e.buffer,n),r=w(e,n),a=p(e,n);n.value+=3;const i=w(e,n),l=w(e,n);o.push({name:t,pixelType:r,pLinear:a,xSampling:i,ySampling:l})}return n.value+=1,o}(e,n,r);case"chromaticities":return function(e,n){return{redX:v(e,n),redY:v(e,n),greenX:v(e,n),greenY:v(e,n),blueX:v(e,n),blueY:v(e,n),whiteX:v(e,n),whiteY:v(e,n)}}(e,n);case"compression":return function(e,n){return p(e,n)}(e,n);case"box2i":return function(e,n){return{xMin:w(e,n),yMin:w(e,n),xMax:w(e,n),yMax:w(e,n)}}(e,n);case"lineOrder":return function(e,n){const t=p(e,n);return c[t]}(e,n);case"float":return v(e,n);case"v2f":return function(e,n){return[v(e,n),v(e,n)]}(e,n);case"v3f":return function(e,n){return[v(e,n),v(e,n),v(e,n)]}(e,n);case"int":return w(e,n);case"rational":return function(e,n){return[w(e,n),h(e,n)]}(e,n);case"timecode":return function(e,n){return[h(e,n),h(e,n)]}(e,n);case"preview":return n.value+=r,"skipped";default:return void(n.value+=r)}}function g(e){for(let n=1;n<e.length;n++){const t=e[n-1]+e[n]-128;e[n]=t}}function O(e,n){let t=0,r=Math.floor((e.length+1)/2),o=0;const a=e.length-1;for(;!(o>a||(n[o++]=e[t++],o>a));)n[o++]=e[r++]}function U(e,n,t,r,o){for(;t<e;)n=n<<8|d(r,o),t+=8;return{l:n>>(t-=e)&(1<<e)-1,c:n,lc:t}}function I(e,n,t,r){return{c:e=e<<8|d(t,r),lc:n+=8}}function T(e,n,t,r,o,a,i,l,s){if(e==n){if(r<8){const e=I(t,r,o,a);t=e.c,r=e.lc}let e=t>>(r-=8);if(e=new Uint8Array([e])[0],l.value+e>s)return null;const n=i[l.value-1];for(;e-- >0;)i[l.value++]=n}else{if(!(l.value<s))return null;i[l.value++]=e}return{c:t,lc:r}}const R=new Array(59);function C(e,n,t,r,o,a){const l=n;let s=0,c=0;for(;r<=o;r++){if(l.value-n.value>t)return;let i=U(6,s,c,e,l);const u=i.l;if(s=i.c,c=i.lc,a[r]=u,63==u){if(l.value-n.value>t)throw new Error("Error in HufUnpackEncTable");i=U(8,s,c,e,l);let u=i.l+6;if(s=i.c,c=i.lc,r+u>o+1)throw new Error("Error in HufUnpackEncTable");for(;u--;)a[r++]=0;r--}else if(u>=59){let e=u-59+2;if(r+e>o+1)throw new Error("Error in HufUnpackEncTable");for(;e--;)a[r++]=0;r--}}!function(e){for(let e=0;e<=58;++e)R[e]=0;for(let n=0;n<i;++n)R[e[n]]+=1;let n=0;for(let e=58;e>0;--e){const t=n+R[e]>>1;R[e]=n,n=t}for(let n=0;n<i;++n){const t=e[n];t>0&&(e[n]=t|R[t]++<<6)}}(a)}function m(e){return 63&e}function M(e){return e>>6}function P(e,n,t,r,o,s){const c=t.value,u=h(n,t),f=h(n,t);t.value+=4;const w=h(n,t);if(t.value+=4,u<0||u>=i||f<0||f>=i)throw new Error("Wrong HUF_ENCSIZE");const p=new Array(i),y=new Array(l);!function(e){for(let n=0;n<l;n++)e[n]={},e[n].len=0,e[n].lit=0,e[n].p=null}(y);if(C(e,t,r-(t.value-c),u,f,p),w>8*(r-(t.value-c)))throw new Error("Wrong hufUncompress");!function(e,n,t,r){for(;n<=t;n++){const t=M(e[n]),o=m(e[n]);if(t>>o)throw new Error("Invalid table entry");if(o>a){const e=r[t>>o-a];if(e.len)throw new Error("Invalid table entry");if(e.lit++,e.p){const n=e.p;e.p=new Array(e.lit);for(let t=0;t<e.lit-1;++t)e.p[t]=n[t]}else e.p=new Array(1);e.p[e.lit-1]=n}else if(o){let e=0;for(let i=1<<a-o;i>0;i--){const i=r[(t<<a-o)+e];if(i.len||i.p)throw new Error("Invalid table entry");i.len=o,i.lit=n,e++}}}}(p,u,f,y),function(e,n,t,r,o,i,l,s,c){let u=0,f=0;const w=l,h=Math.trunc(r.value+(o+7)/8);for(;r.value<h;){let o=I(u,f,t,r);for(u=o.c,f=o.lc;f>=a;){const l=n[u>>f-a&16383];if(l.len){f-=l.len;const e=T(l.lit,i,u,f,t,r,s,c,w);e&&(u=e.c,f=e.lc)}else{if(!l.p)throw new Error("hufDecode issues");let n;for(n=0;n<l.lit;n++){const a=m(e[l.p[n]]);for(;f<a&&r.value<h;)o=I(u,f,t,r),u=o.c,f=o.lc;if(f>=a&&M(e[l.p[n]])==(u>>f-a&(1<<a)-1)){f-=a;const e=T(l.p[n],i,u,f,t,r,s,c,w);e&&(u=e.c,f=e.lc);break}}if(n==l.lit)throw new Error("HufDecode issues")}}}const p=8-o&7;for(u>>=p,f-=p;f>0;){const e=n[u<<a-f&16383];if(!e.len)throw new Error("HufDecode issues");{f-=e.len;const n=T(e.lit,i,u,f,t,r,s,c,w);n&&(u=n.c,f=n.lc)}}}(p,y,e,t,w,f,s,o,{value:0})}function N(e){return 65535&e}function x(e){const n=N(e);return n>32767?n-65536:n}function _(e,n){const t=x(e),r=x(n),o=t+(1&r)+(r>>1);return{a:o,b:o-r}}function z(e,n){const t=N(e),r=N(n),o=t-(r>>1)&65535;return{a:r+o-32768&65535,b:o}}function k(e,n,t,r,o,a,i){const l=i<16384,s=t>o?o:t;let c,u,f=1;for(;f<=s;)f<<=1;for(f>>=1,c=f,f>>=1;f>=1;){u=0;const i=u+a*(o-c),s=a*f,w=a*c,h=r*f,p=r*c;let y,d,b,v;for(;u<=i;u+=w){let o=u;const a=u+r*(t-c);for(;o<=a;o+=p){const t=o+h,r=o+s,a=r+h;if(l){let i=_(e[o+n],e[r+n]);y=i.a,b=i.b,i=_(e[t+n],e[a+n]),d=i.a,v=i.b,i=_(y,d),e[o+n]=i.a,e[t+n]=i.b,i=_(b,v),e[r+n]=i.a,e[a+n]=i.b}else{let i=z(e[o+n],e[r+n]);y=i.a,b=i.b,i=z(e[t+n],e[a+n]),d=i.a,v=i.b,i=z(y,d),e[o+n]=i.a,e[t+n]=i.b,i=z(b,v),e[r+n]=i.a,e[a+n]=i.b}}if(t&f){const t=o+s;let r;r=l?_(e[o+n],e[t+n]):z(e[o+n],e[t+n]),y=r.a,e[t+n]=r.b,e[o+n]=y}}if(o&f){let o=u;const a=u+r*(t-c);for(;o<=a;o+=p){const t=o+h;let r;r=l?_(e[o+n],e[t+n]):z(e[o+n],e[t+n]),y=r.a,e[t+n]=r.b,e[o+n]=y}}c=f,f>>=1}return u}function F(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function L(e){const n=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),t=new Uint8Array(function(e){let n=e.byteLength;const t=new Array;let r=0;const o=new DataView(e);for(;n>0;){const e=o.getInt8(r++);if(e<0){const a=-e;n-=a+1;for(let e=0;e<a;e++)t.push(o.getUint8(r++))}else{const a=e;n-=2;const i=o.getUint8(r++);for(let e=0;e<a+1;e++)t.push(i)}}return t}(n)),r=new Uint8Array(t.length);return g(t),O(t,r),new DataView(r.buffer)}function D(e){const n=e.array.slice(e.offset.value,e.offset.value+e.size),t=fflate.unzlibSync(n),r=new Uint8Array(t.length);return g(t),O(t,r),new DataView(r.buffer)}function B(e){const n=e.array.slice(e.offset.value,e.offset.value+e.size),t=fflate.unzlibSync(n),r=e.lines*e.channels*e.width,o=1==e.type?new Uint16Array(r):new Uint32Array(r);let a=0,i=0;const l=new Array(4);for(let n=0;n<e.lines;n++)for(let n=0;n<e.channels;n++){let n=0;switch(e.type){case 1:l[0]=a,l[1]=l[0]+e.width,a=l[1]+e.width;for(let r=0;r<e.width;++r){n+=t[l[0]++]<<8|t[l[1]++],o[i]=n,i++}break;case 2:l[0]=a,l[1]=l[0]+e.width,l[2]=l[1]+e.width,a=l[2]+e.width;for(let r=0;r<e.width;++r){n+=t[l[0]++]<<24|t[l[1]++]<<16|t[l[2]++]<<8,o[i]=n,i++}}}return new DataView(o.buffer)}function W(e){const n=e.viewer,t={value:e.offset.value},r=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),a=new Uint8Array(8192);let i=0;const l=new Array(e.channels);for(let n=0;n<e.channels;n++)l[n]={},l[n].start=i,l[n].end=l[n].start,l[n].nx=e.width,l[n].ny=e.lines,l[n].size=e.type,i+=l[n].nx*l[n].ny*l[n].size;const s=y(n,t),c=y(n,t);if(c>=8192)throw new Error("Wrong PIZ_COMPRESSION BITMAP_SIZE");if(s<=c)for(let e=0;e<c-s+1;e++)a[e+s]=p(n,t);const u=new Uint16Array(o),f=function(e,n){let t=0;for(let r=0;r<o;++r)(0==r||e[r>>3]&1<<(7&r))&&(n[t++]=r);const r=t-1;for(;t<o;)n[t++]=0;return r}(a,u),w=h(n,t);P(e.array,n,t,w,r,i);for(let n=0;n<e.channels;++n){const e=l[n];for(let t=0;t<l[n].size;++t)k(r,e.start+t,e.nx,e.size,e.ny,e.nx*e.size,f)}!function(e,n,t){for(let r=0;r<t;++r)n[r]=e[n[r]]}(u,r,i);let d=0;const b=new Uint8Array(r.buffer.byteLength);for(let n=0;n<e.lines;n++)for(let n=0;n<e.channels;n++){const e=l[n],t=e.nx*e.size,o=new Uint8Array(r.buffer,2*e.end,2*t);b.set(o,d),d+=2*t,e.end+=t}return new DataView(b.buffer)}var Y;!function(e){e[e.Float=0]="Float",e[e.HalfFloat=1]="HalfFloat"}(Y||(Y={}));class X{}X.DefaultOutputType=Y.HalfFloat,X.FFLATEUrl="https://unpkg.com/fflate@0.8.2";class H{constructor(){this.supportCascades=!1}loadCubeData(e,n,t,r,o){throw".exr not supported in Cube."}async loadData(e,o,a){const i=new DataView(e.buffer),l={value:0},c=function(e,t){if(20000630!=e.getUint32(0,!0))throw new Error("Incorrect OpenEXR format");const r=e.getUint8(4),o=e.getUint8(5),a={singleTile:!!(2&o),longName:!!(4&o),deepFormat:!!(8&o),multiPart:!!(16&o)};t.value=8;const i={};let l=!0;for(;l;){const r=f(e.buffer,t);if(r){const o=f(e.buffer,t),a=A(e,t,o,h(e,t));void 0===a?n.Warn(`Unknown header attribute type ${o}'.`):i[r]=a}else l=!1}if(-5&o)throw new Error("Unsupported file format");return{version:r,spec:a,...i}}(i,l),u=await async function(e,n,o,a){const i={size:0,viewer:n,array:new Uint8Array(n.buffer),offset:o,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,channelLineOffsets:{},scanOrder:()=>0,bytesPerLine:0,outLineWidth:0,lines:0,scanlineBlockSize:0,inputSize:null,type:0,uncompress:null,getter:()=>0,format:t.TEXTUREFORMAT_RGBA,outputChannels:0,decodeChannels:{},blockCount:null,byteArray:null,linearSpace:!1,textureType:0};switch(e.compression){case s.NO_COMPRESSION:i.lines=1,i.uncompress=F;break;case s.RLE_COMPRESSION:i.lines=1,i.uncompress=L;break;case s.ZIPS_COMPRESSION:i.lines=1,i.uncompress=D,await r.LoadScriptAsync(X.FFLATEUrl);break;case s.ZIP_COMPRESSION:i.lines=16,i.uncompress=D,await r.LoadScriptAsync(X.FFLATEUrl);break;case s.PIZ_COMPRESSION:i.lines=32,i.uncompress=W;break;case s.PXR24_COMPRESSION:i.lines=16,i.uncompress=B,await r.LoadScriptAsync(X.FFLATEUrl);break;default:throw new Error(s[e.compression]+" is unsupported")}i.scanlineBlockSize=i.lines;const l={};for(const n of e.channels)switch(n.name){case"Y":case"R":case"G":case"B":case"A":l[n.name]=!0,i.type=n.pixelType}let c=!1;if(l.R&&l.G&&l.B)c=!l.A,i.outputChannels=4,i.decodeChannels={R:0,G:1,B:2,A:3};else{if(!l.Y)throw new Error("EXRLoader.parse: file contains unsupported data channels.");i.outputChannels=1,i.decodeChannels={Y:0}}if(1===i.type)switch(a){case Y.Float:i.getter=E,i.inputSize=2;break;case Y.HalfFloat:i.getter=y,i.inputSize=2}else{if(2!==i.type)throw new Error("Unsupported pixelType "+i.type+" for "+e.compression);switch(a){case Y.Float:i.getter=v,i.inputSize=4;break;case Y.HalfFloat:i.getter=S,i.inputSize=4}}i.blockCount=i.height/i.scanlineBlockSize;for(let e=0;e<i.blockCount;e++)b(n,o);const u=i.width*i.height*i.outputChannels;switch(a){case Y.Float:i.byteArray=new Float32Array(u),i.textureType=t.TEXTURETYPE_FLOAT,c&&i.byteArray.fill(1,0,u);break;case Y.HalfFloat:i.byteArray=new Uint16Array(u),i.textureType=t.TEXTURETYPE_HALF_FLOAT,c&&i.byteArray.fill(15360,0,u);break;default:throw new Error("Unsupported type: "+a)}let f=0;for(const n of e.channels)void 0!==i.decodeChannels[n.name]&&(i.channelLineOffsets[n.name]=f*i.width),f+=2*n.pixelType;return i.bytesPerLine=i.width*f,i.outLineWidth=i.width*i.outputChannels,"INCREASING_Y"===e.lineOrder?i.scanOrder=e=>e:i.scanOrder=e=>i.height-1-e,4==i.outputChannels?(i.format=t.TEXTUREFORMAT_RGBA,i.linearSpace=!0):(i.format=t.TEXTUREFORMAT_R,i.linearSpace=!1),i}(c,i,l,X.DefaultOutputType);!function(e,n,t,r){const o={value:0};for(let a=0;a<e.height/e.scanlineBlockSize;a++){const i=w(t,r)-n.dataWindow.yMin;e.size=h(t,r),e.lines=i+e.scanlineBlockSize>e.height?e.height-i:e.scanlineBlockSize;const l=e.size<e.lines*e.bytesPerLine&&e.uncompress?e.uncompress(e):F(e);r.value+=e.size;for(let t=0;t<e.scanlineBlockSize;t++){const r=a*e.scanlineBlockSize,i=t+e.scanOrder(r);if(i>=e.height)continue;const s=t*e.bytesPerLine,c=(e.height-1-i)*e.outLineWidth;for(let t=0;t<e.channels;t++){const r=n.channels[t].name,a=e.channelLineOffsets[r],i=e.decodeChannels[r];if(void 0!==i){o.value=s+a;for(let n=0;n<e.width;n++){const t=c+n*e.outputChannels+i;e.byteArray&&(e.byteArray[t]=e.getter(l,o))}}}}}}(u,c,i,l);a(c.dataWindow.xMax-c.dataWindow.xMin+1,c.dataWindow.yMax-c.dataWindow.yMin+1,o.generateMipMaps,!1,(()=>{const e=o.getEngine();o.format=c.format,o.type=u.textureType,o.invertY=!1,o._gammaSpace=!c.linearSpace,u.byteArray&&e._uploadDataToTextureDirectly(o,u.byteArray,0,0,void 0,!0)}))}}export{H as _ExrTextureLoader};
|
|
2
|
+
//# sourceMappingURL=exrTextureLoader-BIPK0bPG.esm.min.js.map
|