@babylonjs/viewer 7.41.1 → 7.42.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-BHDD74jk.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_ies-BHDD74jk.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_ies-CJfRNbJm.esm.js +84 -0
- package/dist/chunks/EXT_lights_ies-CJfRNbJm.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-B460Sv95.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-B460Sv95.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-CQ6UCahL.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-CQ6UCahL.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-D77OfiDS.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-D77OfiDS.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-GMG29Y9J.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-GMG29Y9J.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-CniiOX0a.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-CniiOX0a.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-DCcKdizI.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-DCcKdizI.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-By7mk6aS.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-By7mk6aS.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-DnaKno7b.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-DnaKno7b.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-Bm29ukIo.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-Bm29ukIo.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-DtSWYlAE.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-DtSWYlAE.esm.min.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-BUO8J2zR.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-BUO8J2zR.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-mi3fn9sR.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-mi3fn9sR.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-COeThtQe.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-COeThtQe.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-DXqgkZGB.esm.js +352 -0
- package/dist/chunks/KHR_animation_pointer-DXqgkZGB.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-Bh9XGNFd.esm.js +610 -0
- package/dist/chunks/KHR_draco_mesh_compression-Bh9XGNFd.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-DyU2KIa2.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-DyU2KIa2.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-QP9zFX3U.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-QP9zFX3U.esm.js.map +1 -0
- package/dist/chunks/KHR_interactivity-_r7e7vwA.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-_r7e7vwA.esm.min.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-DWGx9KlE.esm.js +581 -0
- package/dist/chunks/KHR_lights_punctual-DWGx9KlE.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-cz3ulMW0.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-cz3ulMW0.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-BSvZxEnx.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-BSvZxEnx.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-CtKPvN_z.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-CtKPvN_z.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-BephgEiM.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-BephgEiM.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-C3QB9HNC.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-C3QB9HNC.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-CZvfLdyF.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-CZvfLdyF.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DuM5GD2L.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DuM5GD2L.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-0FtkqUmS.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-0FtkqUmS.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-C7mAat5y.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-C7mAat5y.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-Bz2y9OnA.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-Bz2y9OnA.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-b7ZNj1HF.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-b7ZNj1HF.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-C5-JiuLs.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-C5-JiuLs.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-D1jjzmsp.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-D1jjzmsp.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-CChET9-W.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-CChET9-W.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-hATfgETI.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-hATfgETI.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B-HlmeqI.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B-HlmeqI.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_IaUmSJE.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-_IaUmSJE.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-D2QD8uSC.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-D2QD8uSC.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-cqxpRyXD.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-cqxpRyXD.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-DnHIH9RX.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-DnHIH9RX.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-vwRXhXVF.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-vwRXhXVF.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-D81TRCgt.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-D81TRCgt.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-nPX6lno-.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-nPX6lno-.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-CLSTXPsk.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-CLSTXPsk.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-pmQPq5qR.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-pmQPq5qR.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-C_XVH51a.esm.js +262 -0
- package/dist/chunks/KHR_materials_variants-C_XVH51a.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-Czo1ZM8r.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-Czo1ZM8r.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-BJVGGE1g.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-BJVGGE1g.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-C4EKOzF-.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-C4EKOzF-.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-CZIcA8DN.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-CZIcA8DN.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-DG9WNux6.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-DG9WNux6.esm.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-C1YMkQ95.esm.js +39 -0
- package/dist/chunks/KHR_node_hoverability-C1YMkQ95.esm.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-HxHiCdR9.esm.min.js +2 -0
- package/dist/chunks/KHR_node_hoverability-HxHiCdR9.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-C5tc6GOc.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-C5tc6GOc.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-CSqn8wRd.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-CSqn8wRd.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-DA2FE-qb.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-DA2FE-qb.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-KtQL54P-.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-KtQL54P-.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-Cb6Q41F3.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-Cb6Q41F3.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-GdBAq_uW.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-GdBAq_uW.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-CD_mkZDv.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-CD_mkZDv.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-f1rcQfsd.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-f1rcQfsd.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-BU83EIcP.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-BU83EIcP.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-ClwdeJaR.esm.js +2201 -0
- package/dist/chunks/MSFT_audio_emitter-ClwdeJaR.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-D3MQWFc3.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-D3MQWFc3.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_lod-DkM5iXcm.esm.js +337 -0
- package/dist/chunks/MSFT_lod-DkM5iXcm.esm.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-CG9JY5Ic.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-CG9JY5Ic.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-Cyjdx_Y_.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-Cyjdx_Y_.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-Bm3_fRmt.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-Bm3_fRmt.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-uFdNij-4.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-uFdNij-4.esm.js.map +1 -0
- package/dist/chunks/animationGroup-CravGs2P.esm.min.js +2 -0
- package/dist/chunks/animationGroup-CravGs2P.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-DqmFa1Nk.esm.js +2482 -0
- package/dist/chunks/animationGroup-DqmFa1Nk.esm.js.map +1 -0
- package/dist/chunks/assetContainer-0Qu2XIWb.esm.js +1720 -0
- package/dist/chunks/assetContainer-0Qu2XIWb.esm.js.map +1 -0
- package/dist/chunks/assetContainer-CMuD-n3X.esm.min.js +2 -0
- package/dist/chunks/assetContainer-CMuD-n3X.esm.min.js.map +1 -0
- package/dist/chunks/audioEngine--EMyAh-L.esm.js +305 -0
- package/dist/chunks/audioEngine--EMyAh-L.esm.js.map +1 -0
- package/dist/chunks/audioEngine-3doZGQV6.esm.min.js +2 -0
- package/dist/chunks/audioEngine-3doZGQV6.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-DgMI1D24.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-DgMI1D24.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-gQlUctpB.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-gQlUctpB.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-B0PY0ILM.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-B0PY0ILM.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-ES0mOtqQ.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-ES0mOtqQ.esm.min.js.map +1 -0
- package/dist/chunks/dds-DEZD6DKL.esm.min.js +2 -0
- package/dist/chunks/dds-DEZD6DKL.esm.min.js.map +1 -0
- package/dist/chunks/dds-HwVEMga8.esm.js +540 -0
- package/dist/chunks/dds-HwVEMga8.esm.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-3PDKukdG.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-3PDKukdG.esm.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-C62DqYdE.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-C62DqYdE.esm.min.js.map +1 -0
- package/dist/chunks/decalFragment-B9KsZn_u.esm.min.js +2 -0
- package/dist/chunks/decalFragment-B9KsZn_u.esm.min.js.map +1 -0
- package/dist/chunks/decalFragment-CNA1EQK9.esm.js +18 -0
- package/dist/chunks/decalFragment-CNA1EQK9.esm.js.map +1 -0
- package/dist/chunks/default.fragment-BsajFq2Q.esm.js +446 -0
- package/dist/chunks/default.fragment-BsajFq2Q.esm.js.map +1 -0
- package/dist/chunks/default.fragment-C7O2NjXo.esm.min.js +2 -0
- package/dist/chunks/default.fragment-C7O2NjXo.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-CNef5Xlg.esm.min.js +2 -0
- package/dist/chunks/default.fragment-CNef5Xlg.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-DAO0SBl-.esm.js +515 -0
- package/dist/chunks/default.fragment-DAO0SBl-.esm.js.map +1 -0
- package/dist/chunks/default.vertex-Ban5pFUb.esm.js +211 -0
- package/dist/chunks/default.vertex-Ban5pFUb.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CPjp6YBQ.esm.min.js +2 -0
- package/dist/chunks/default.vertex-CPjp6YBQ.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-CemfGK4Y.esm.min.js +2 -0
- package/dist/chunks/default.vertex-CemfGK4Y.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-QE4cV7Y2.esm.js +190 -0
- package/dist/chunks/default.vertex-QE4cV7Y2.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-B5nIsoCQ.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-B5nIsoCQ.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-B8tY8ajW.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-B8tY8ajW.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-D7yr1BRw.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-D7yr1BRw.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-Db_EQWlv.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-Db_EQWlv.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-C13JzZr_.esm.min.js +2 -0
- package/dist/chunks/dumpTools-C13JzZr_.esm.min.js.map +1 -0
- package/dist/chunks/dumpTools-D6BRv6Ws.esm.js +200 -0
- package/dist/chunks/dumpTools-D6BRv6Ws.esm.js.map +1 -0
- package/dist/chunks/engine-29lBc-mw.esm.min.js +2 -0
- package/dist/chunks/engine-29lBc-mw.esm.min.js.map +1 -0
- package/dist/chunks/engine-Bk6S663t.esm.js +2213 -0
- package/dist/chunks/engine-Bk6S663t.esm.js.map +1 -0
- package/dist/chunks/engine.common-D_DOB0rT.esm.js +1162 -0
- package/dist/chunks/engine.common-D_DOB0rT.esm.js.map +1 -0
- package/dist/chunks/engine.common-OpqDqcE2.esm.min.js +2 -0
- package/dist/chunks/engine.common-OpqDqcE2.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-DS13pG9w.esm.js +64 -0
- package/dist/chunks/envTextureLoader-DS13pG9w.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-Dt6q0XDu.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-Dt6q0XDu.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-DKN-Hd8c.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-DKN-Hd8c.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-DWkvV21A.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-DWkvV21A.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-6o4jfUaF.esm.js +1683 -0
- package/dist/chunks/exrTextureLoader-6o4jfUaF.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-CXV9O3pZ.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-CXV9O3pZ.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-BdOtsPe3.esm.js +102 -0
- package/dist/chunks/fogFragment-BdOtsPe3.esm.js.map +1 -0
- package/dist/chunks/fogFragment-Cv3Bqrrg.esm.js +101 -0
- package/dist/chunks/fogFragment-Cv3Bqrrg.esm.js.map +1 -0
- package/dist/chunks/fogFragment-D91rqvp0.esm.min.js +2 -0
- package/dist/chunks/fogFragment-D91rqvp0.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-qdYpZbGA.esm.min.js +2 -0
- package/dist/chunks/fogFragment-qdYpZbGA.esm.min.js.map +1 -0
- package/dist/chunks/fresnelFunction-DBMK4K-2.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-DBMK4K-2.esm.min.js.map +1 -0
- package/dist/chunks/fresnelFunction-o5ZOc6C0.esm.js +12 -0
- package/dist/chunks/fresnelFunction-o5ZOc6C0.esm.js.map +1 -0
- package/dist/chunks/glTFLoader-Dj_JCgqJ.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-Dj_JCgqJ.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-DnWHbX53.esm.js +7693 -0
- package/dist/chunks/glTFLoader-DnWHbX53.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-A_WVS-lt.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-A_WVS-lt.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-C3gHlipY.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-C3gHlipY.esm.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-91QStv6v.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-91QStv6v.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-DBJQNoSA.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-DBJQNoSA.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-DXdlMMN6.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-DXdlMMN6.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-VtAD6DeX.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-VtAD6DeX.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-CYtpPSzs.esm.js +253 -0
- package/dist/chunks/hdrTextureLoader-CYtpPSzs.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-CzZ1hV7q.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-CzZ1hV7q.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-Bn3a_gzG.esm.js +110 -0
- package/dist/chunks/helperFunctions-Bn3a_gzG.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-CA_QOVSE.esm.js +83 -0
- package/dist/chunks/helperFunctions-CA_QOVSE.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-mebe29sq.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-mebe29sq.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-wIdfkMdZ.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-wIdfkMdZ.esm.min.js.map +1 -0
- package/dist/chunks/iesTextureLoader-D8_bkaCP.esm.min.js +2 -0
- package/dist/chunks/iesTextureLoader-D8_bkaCP.esm.min.js.map +1 -0
- package/dist/chunks/iesTextureLoader-K1MQUalq.esm.js +189 -0
- package/dist/chunks/iesTextureLoader-K1MQUalq.esm.js.map +1 -0
- package/dist/chunks/index-Bo5F_mGk.esm.min.js +57 -0
- package/dist/chunks/index-Bo5F_mGk.esm.min.js.map +1 -0
- package/dist/chunks/index-Dlf001gP.esm.js +74889 -0
- package/dist/chunks/index-Dlf001gP.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-B6UHYOxL.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-B6UHYOxL.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-s_dbtiwN.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-s_dbtiwN.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration--xmemf5p.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration--xmemf5p.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-Babs-3_m.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-Babs-3_m.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BvoznvSG.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-BvoznvSG.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-_EPT9ybx.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-_EPT9ybx.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-0vve_qKh.esm.js +77 -0
- package/dist/chunks/logDepthVertex-0vve_qKh.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-BkGmO8_s.esm.js +81 -0
- package/dist/chunks/logDepthVertex-BkGmO8_s.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-CVcNpHQe.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-CVcNpHQe.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-DL8eWalk.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-DL8eWalk.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-9DUO7sPf.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-9DUO7sPf.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-DXZGPs7O.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-DXZGPs7O.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-DaFtbg5X.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-DaFtbg5X.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-lKBcMFcP.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-lKBcMFcP.esm.min.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-BN0BlYEZ.esm.js +26 -0
- package/dist/chunks/meshUboDeclaration-BN0BlYEZ.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-BcQ1P_co.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-BcQ1P_co.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-Lx7JtYFA.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-Lx7JtYFA.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-_nxEPYB4.esm.js +1338 -0
- package/dist/chunks/objFileLoader-_nxEPYB4.esm.js.map +1 -0
- package/dist/chunks/oitFragment-BPgREULe.esm.js +1240 -0
- package/dist/chunks/oitFragment-BPgREULe.esm.js.map +1 -0
- package/dist/chunks/oitFragment-CKNxTV0T.esm.min.js +2 -0
- package/dist/chunks/oitFragment-CKNxTV0T.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-CT3oWGRL.esm.js +1078 -0
- package/dist/chunks/oitFragment-CT3oWGRL.esm.js.map +1 -0
- package/dist/chunks/oitFragment-CXrV_64a.esm.min.js +2 -0
- package/dist/chunks/oitFragment-CXrV_64a.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-BugqjVKo.esm.js +15 -0
- package/dist/chunks/pass.fragment-BugqjVKo.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-X-KK3tOa.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-X-KK3tOa.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-pJ1J3AeO.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-pJ1J3AeO.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-tk9KCmM-.esm.js +15 -0
- package/dist/chunks/pass.fragment-tk9KCmM-.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-C4BFWzEP.esm.js +3269 -0
- package/dist/chunks/pbr.fragment-C4BFWzEP.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-CTE0zFNb.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-CTE0zFNb.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-DZRIiJzv.esm.js +3222 -0
- package/dist/chunks/pbr.fragment-DZRIiJzv.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-Dk1kkP87.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-Dk1kkP87.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-Ba8BDEep.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-Ba8BDEep.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-DM2WONhK.esm.js +223 -0
- package/dist/chunks/pbr.vertex-DM2WONhK.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-DVghYyb7.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-DVghYyb7.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-DiVjR6Bs.esm.js +348 -0
- package/dist/chunks/pbr.vertex-DiVjR6Bs.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-CtVD6qfW.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-CtVD6qfW.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-DntzOpKV.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-DntzOpKV.esm.js.map +1 -0
- package/dist/chunks/rawTexture-BAt5J3G4.esm.min.js +2 -0
- package/dist/chunks/rawTexture-BAt5J3G4.esm.min.js.map +1 -0
- package/dist/chunks/rawTexture-D0O_yrdQ.esm.js +191 -0
- package/dist/chunks/rawTexture-D0O_yrdQ.esm.js.map +1 -0
- package/dist/chunks/ray-Bbt37I0I.esm.js +946 -0
- package/dist/chunks/ray-Bbt37I0I.esm.js.map +1 -0
- package/dist/chunks/ray-OQ0d0a-k.esm.min.js +2 -0
- package/dist/chunks/ray-OQ0d0a-k.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-4HjKGwMm.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-4HjKGwMm.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CKVGwRZO.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-CKVGwRZO.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-Cn6YVnkB.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-Cn6YVnkB.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DwcDy8Eo.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-DwcDy8Eo.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BUluDIqG.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-BUluDIqG.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-CEiZq0Qt.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-CEiZq0Qt.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-CY0yYtEl.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-CY0yYtEl.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-DS4_h_Qc.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-DS4_h_Qc.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-C9ykR2nU.esm.js +3387 -0
- package/dist/chunks/splatFileLoader-C9ykR2nU.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-fz6lXWf1.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-fz6lXWf1.esm.min.js.map +1 -0
- package/dist/chunks/spotLight-BJUVKiS1.esm.min.js +2 -0
- package/dist/chunks/spotLight-BJUVKiS1.esm.min.js.map +1 -0
- package/dist/chunks/spotLight-DPadbSE2.esm.js +701 -0
- package/dist/chunks/spotLight-DPadbSE2.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-BFBsF3pv.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-BFBsF3pv.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-eJkfs5dX.esm.js +1807 -0
- package/dist/chunks/standardMaterial-eJkfs5dX.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-D-4wZdg7.esm.js +238 -0
- package/dist/chunks/stlFileLoader-D-4wZdg7.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-DFdDdaYW.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-DFdDdaYW.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-84Uwk9uE.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-84Uwk9uE.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-DDAxGDFK.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-DDAxGDFK.esm.js.map +1 -0
- package/dist/chunks/thinEngine-CiBi1yBe.esm.min.js +2 -0
- package/dist/chunks/thinEngine-CiBi1yBe.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-iDkoF96X.esm.js +3848 -0
- package/dist/chunks/thinEngine-iDkoF96X.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-DGBYkFXN.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-DGBYkFXN.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-MROq1d7v.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-MROq1d7v.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-0VXbzCuF.esm.js +428 -0
- package/dist/chunks/vertexColorMixing-0VXbzCuF.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-B3GD6hE2.esm.js +538 -0
- package/dist/chunks/vertexColorMixing-B3GD6hE2.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-ClVYo-h9.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-ClVYo-h9.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-j0Dix_Wy.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-j0Dix_Wy.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-BLhhEybd.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-BLhhEybd.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-Cs5fkngY.esm.js +11533 -0
- package/dist/chunks/webgpuEngine-Cs5fkngY.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,337 @@
|
|
|
1
|
+
import { aV as Observable, bv as Deferred, aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Dlf001gP.esm.js';
|
|
2
|
+
import { G as GLTFLoader, A as ArrayItem } from './glTFLoader-DnWHbX53.esm.js';
|
|
3
|
+
import './rawTexture-D0O_yrdQ.esm.js';
|
|
4
|
+
import './assetContainer-0Qu2XIWb.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-C3gHlipY.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "MSFT_lod";
|
|
8
|
+
/**
|
|
9
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/MSFT_lod/README.md)
|
|
10
|
+
*/
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
+
class MSFT_lod {
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
constructor(loader) {
|
|
17
|
+
/**
|
|
18
|
+
* The name of this extension.
|
|
19
|
+
*/
|
|
20
|
+
this.name = NAME;
|
|
21
|
+
/**
|
|
22
|
+
* Defines a number that determines the order the extensions are applied.
|
|
23
|
+
*/
|
|
24
|
+
this.order = 100;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum number of LODs to load, starting from the lowest LOD.
|
|
27
|
+
*/
|
|
28
|
+
this.maxLODsToLoad = 10;
|
|
29
|
+
/**
|
|
30
|
+
* Observable raised when all node LODs of one level are loaded.
|
|
31
|
+
* The event data is the index of the loaded LOD starting from zero.
|
|
32
|
+
* Dispose the loader to cancel the loading of the next level of LODs.
|
|
33
|
+
*/
|
|
34
|
+
this.onNodeLODsLoadedObservable = new Observable();
|
|
35
|
+
/**
|
|
36
|
+
* Observable raised when all material LODs of one level are loaded.
|
|
37
|
+
* The event data is the index of the loaded LOD starting from zero.
|
|
38
|
+
* Dispose the loader to cancel the loading of the next level of LODs.
|
|
39
|
+
*/
|
|
40
|
+
this.onMaterialLODsLoadedObservable = new Observable();
|
|
41
|
+
this._bufferLODs = new Array();
|
|
42
|
+
this._nodeIndexLOD = null;
|
|
43
|
+
this._nodeSignalLODs = new Array();
|
|
44
|
+
this._nodePromiseLODs = new Array();
|
|
45
|
+
this._nodeBufferLODs = new Array();
|
|
46
|
+
this._materialIndexLOD = null;
|
|
47
|
+
this._materialSignalLODs = new Array();
|
|
48
|
+
this._materialPromiseLODs = new Array();
|
|
49
|
+
this._materialBufferLODs = new Array();
|
|
50
|
+
this._loader = loader;
|
|
51
|
+
// Options takes precedence. The maxLODsToLoad extension property is retained for back compat.
|
|
52
|
+
// For new extensions, they should only use options.
|
|
53
|
+
this.maxLODsToLoad = this._loader.parent.extensionOptions[NAME]?.maxLODsToLoad ?? this.maxLODsToLoad;
|
|
54
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
55
|
+
}
|
|
56
|
+
/** @internal */
|
|
57
|
+
dispose() {
|
|
58
|
+
this._loader = null;
|
|
59
|
+
this._nodeIndexLOD = null;
|
|
60
|
+
this._nodeSignalLODs.length = 0;
|
|
61
|
+
this._nodePromiseLODs.length = 0;
|
|
62
|
+
this._nodeBufferLODs.length = 0;
|
|
63
|
+
this._materialIndexLOD = null;
|
|
64
|
+
this._materialSignalLODs.length = 0;
|
|
65
|
+
this._materialPromiseLODs.length = 0;
|
|
66
|
+
this._materialBufferLODs.length = 0;
|
|
67
|
+
this.onMaterialLODsLoadedObservable.clear();
|
|
68
|
+
this.onNodeLODsLoadedObservable.clear();
|
|
69
|
+
}
|
|
70
|
+
/** @internal */
|
|
71
|
+
onReady() {
|
|
72
|
+
for (let indexLOD = 0; indexLOD < this._nodePromiseLODs.length; indexLOD++) {
|
|
73
|
+
const promise = Promise.all(this._nodePromiseLODs[indexLOD]).then(() => {
|
|
74
|
+
if (indexLOD !== 0) {
|
|
75
|
+
this._loader.endPerformanceCounter(`Node LOD ${indexLOD}`);
|
|
76
|
+
this._loader.log(`Loaded node LOD ${indexLOD}`);
|
|
77
|
+
}
|
|
78
|
+
this.onNodeLODsLoadedObservable.notifyObservers(indexLOD);
|
|
79
|
+
if (indexLOD !== this._nodePromiseLODs.length - 1) {
|
|
80
|
+
this._loader.startPerformanceCounter(`Node LOD ${indexLOD + 1}`);
|
|
81
|
+
this._loadBufferLOD(this._nodeBufferLODs, indexLOD + 1);
|
|
82
|
+
if (this._nodeSignalLODs[indexLOD]) {
|
|
83
|
+
this._nodeSignalLODs[indexLOD].resolve();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
this._loader._completePromises.push(promise);
|
|
88
|
+
}
|
|
89
|
+
for (let indexLOD = 0; indexLOD < this._materialPromiseLODs.length; indexLOD++) {
|
|
90
|
+
const promise = Promise.all(this._materialPromiseLODs[indexLOD]).then(() => {
|
|
91
|
+
if (indexLOD !== 0) {
|
|
92
|
+
this._loader.endPerformanceCounter(`Material LOD ${indexLOD}`);
|
|
93
|
+
this._loader.log(`Loaded material LOD ${indexLOD}`);
|
|
94
|
+
}
|
|
95
|
+
this.onMaterialLODsLoadedObservable.notifyObservers(indexLOD);
|
|
96
|
+
if (indexLOD !== this._materialPromiseLODs.length - 1) {
|
|
97
|
+
this._loader.startPerformanceCounter(`Material LOD ${indexLOD + 1}`);
|
|
98
|
+
this._loadBufferLOD(this._materialBufferLODs, indexLOD + 1);
|
|
99
|
+
if (this._materialSignalLODs[indexLOD]) {
|
|
100
|
+
this._materialSignalLODs[indexLOD].resolve();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
this._loader._completePromises.push(promise);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
loadSceneAsync(context, scene) {
|
|
111
|
+
const promise = this._loader.loadSceneAsync(context, scene);
|
|
112
|
+
this._loadBufferLOD(this._bufferLODs, 0);
|
|
113
|
+
return promise;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
loadNodeAsync(context, node, assign) {
|
|
119
|
+
return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {
|
|
120
|
+
let firstPromise;
|
|
121
|
+
const nodeLODs = this._getLODs(extensionContext, node, this._loader.gltf.nodes, extension.ids);
|
|
122
|
+
this._loader.logOpen(`${extensionContext}`);
|
|
123
|
+
for (let indexLOD = 0; indexLOD < nodeLODs.length; indexLOD++) {
|
|
124
|
+
const nodeLOD = nodeLODs[indexLOD];
|
|
125
|
+
if (indexLOD !== 0) {
|
|
126
|
+
this._nodeIndexLOD = indexLOD;
|
|
127
|
+
this._nodeSignalLODs[indexLOD] = this._nodeSignalLODs[indexLOD] || new Deferred();
|
|
128
|
+
}
|
|
129
|
+
const assignWrap = (babylonTransformNode) => {
|
|
130
|
+
assign(babylonTransformNode);
|
|
131
|
+
babylonTransformNode.setEnabled(false);
|
|
132
|
+
};
|
|
133
|
+
const promise = this._loader.loadNodeAsync(`/nodes/${nodeLOD.index}`, nodeLOD, assignWrap).then((babylonMesh) => {
|
|
134
|
+
if (indexLOD !== 0) {
|
|
135
|
+
// TODO: should not rely on _babylonTransformNode
|
|
136
|
+
const previousNodeLOD = nodeLODs[indexLOD - 1];
|
|
137
|
+
if (previousNodeLOD._babylonTransformNode) {
|
|
138
|
+
this._disposeTransformNode(previousNodeLOD._babylonTransformNode);
|
|
139
|
+
delete previousNodeLOD._babylonTransformNode;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
babylonMesh.setEnabled(true);
|
|
143
|
+
return babylonMesh;
|
|
144
|
+
});
|
|
145
|
+
this._nodePromiseLODs[indexLOD] = this._nodePromiseLODs[indexLOD] || [];
|
|
146
|
+
if (indexLOD === 0) {
|
|
147
|
+
firstPromise = promise;
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
this._nodeIndexLOD = null;
|
|
151
|
+
this._nodePromiseLODs[indexLOD].push(promise);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
this._loader.logClose();
|
|
155
|
+
return firstPromise;
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* @internal
|
|
160
|
+
*/
|
|
161
|
+
_loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign) {
|
|
162
|
+
// Don't load material LODs if already loading a node LOD.
|
|
163
|
+
if (this._nodeIndexLOD) {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
167
|
+
let firstPromise;
|
|
168
|
+
const materialLODs = this._getLODs(extensionContext, material, this._loader.gltf.materials, extension.ids);
|
|
169
|
+
this._loader.logOpen(`${extensionContext}`);
|
|
170
|
+
for (let indexLOD = 0; indexLOD < materialLODs.length; indexLOD++) {
|
|
171
|
+
const materialLOD = materialLODs[indexLOD];
|
|
172
|
+
if (indexLOD !== 0) {
|
|
173
|
+
this._materialIndexLOD = indexLOD;
|
|
174
|
+
}
|
|
175
|
+
const promise = this._loader
|
|
176
|
+
._loadMaterialAsync(`/materials/${materialLOD.index}`, materialLOD, babylonMesh, babylonDrawMode, (babylonMaterial) => {
|
|
177
|
+
if (indexLOD === 0) {
|
|
178
|
+
assign(babylonMaterial);
|
|
179
|
+
}
|
|
180
|
+
})
|
|
181
|
+
.then((babylonMaterial) => {
|
|
182
|
+
if (indexLOD !== 0) {
|
|
183
|
+
assign(babylonMaterial);
|
|
184
|
+
// TODO: should not rely on _data
|
|
185
|
+
const previousDataLOD = materialLODs[indexLOD - 1]._data;
|
|
186
|
+
if (previousDataLOD[babylonDrawMode]) {
|
|
187
|
+
this._disposeMaterials([previousDataLOD[babylonDrawMode].babylonMaterial]);
|
|
188
|
+
delete previousDataLOD[babylonDrawMode];
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return babylonMaterial;
|
|
192
|
+
});
|
|
193
|
+
this._materialPromiseLODs[indexLOD] = this._materialPromiseLODs[indexLOD] || [];
|
|
194
|
+
if (indexLOD === 0) {
|
|
195
|
+
firstPromise = promise;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
this._materialIndexLOD = null;
|
|
199
|
+
this._materialPromiseLODs[indexLOD].push(promise);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
this._loader.logClose();
|
|
203
|
+
return firstPromise;
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
_loadUriAsync(context, property, uri) {
|
|
210
|
+
// Defer the loading of uris if loading a node or material LOD.
|
|
211
|
+
if (this._nodeIndexLOD !== null) {
|
|
212
|
+
this._loader.log(`deferred`);
|
|
213
|
+
const previousIndexLOD = this._nodeIndexLOD - 1;
|
|
214
|
+
this._nodeSignalLODs[previousIndexLOD] = this._nodeSignalLODs[previousIndexLOD] || new Deferred();
|
|
215
|
+
return this._nodeSignalLODs[this._nodeIndexLOD - 1].promise.then(() => {
|
|
216
|
+
return this._loader.loadUriAsync(context, property, uri);
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
else if (this._materialIndexLOD !== null) {
|
|
220
|
+
this._loader.log(`deferred`);
|
|
221
|
+
const previousIndexLOD = this._materialIndexLOD - 1;
|
|
222
|
+
this._materialSignalLODs[previousIndexLOD] = this._materialSignalLODs[previousIndexLOD] || new Deferred();
|
|
223
|
+
return this._materialSignalLODs[previousIndexLOD].promise.then(() => {
|
|
224
|
+
return this._loader.loadUriAsync(context, property, uri);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* @internal
|
|
231
|
+
*/
|
|
232
|
+
loadBufferAsync(context, buffer, byteOffset, byteLength) {
|
|
233
|
+
if (this._loader.parent.useRangeRequests && !buffer.uri) {
|
|
234
|
+
if (!this._loader.bin) {
|
|
235
|
+
throw new Error(`${context}: Uri is missing or the binary glTF is missing its binary chunk`);
|
|
236
|
+
}
|
|
237
|
+
const loadAsync = (bufferLODs, indexLOD) => {
|
|
238
|
+
const start = byteOffset;
|
|
239
|
+
const end = start + byteLength - 1;
|
|
240
|
+
let bufferLOD = bufferLODs[indexLOD];
|
|
241
|
+
if (bufferLOD) {
|
|
242
|
+
bufferLOD.start = Math.min(bufferLOD.start, start);
|
|
243
|
+
bufferLOD.end = Math.max(bufferLOD.end, end);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
bufferLOD = { start: start, end: end, loaded: new Deferred() };
|
|
247
|
+
bufferLODs[indexLOD] = bufferLOD;
|
|
248
|
+
}
|
|
249
|
+
return bufferLOD.loaded.promise.then((data) => {
|
|
250
|
+
return new Uint8Array(data.buffer, data.byteOffset + byteOffset - bufferLOD.start, byteLength);
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
this._loader.log(`deferred`);
|
|
254
|
+
if (this._nodeIndexLOD !== null) {
|
|
255
|
+
return loadAsync(this._nodeBufferLODs, this._nodeIndexLOD);
|
|
256
|
+
}
|
|
257
|
+
else if (this._materialIndexLOD !== null) {
|
|
258
|
+
return loadAsync(this._materialBufferLODs, this._materialIndexLOD);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
return loadAsync(this._bufferLODs, 0);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
_loadBufferLOD(bufferLODs, indexLOD) {
|
|
267
|
+
const bufferLOD = bufferLODs[indexLOD];
|
|
268
|
+
if (bufferLOD) {
|
|
269
|
+
this._loader.log(`Loading buffer range [${bufferLOD.start}-${bufferLOD.end}]`);
|
|
270
|
+
this._loader.bin.readAsync(bufferLOD.start, bufferLOD.end - bufferLOD.start + 1).then((data) => {
|
|
271
|
+
bufferLOD.loaded.resolve(data);
|
|
272
|
+
}, (error) => {
|
|
273
|
+
bufferLOD.loaded.reject(error);
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* @returns an array of LOD properties from lowest to highest.
|
|
279
|
+
* @param context
|
|
280
|
+
* @param property
|
|
281
|
+
* @param array
|
|
282
|
+
* @param ids
|
|
283
|
+
*/
|
|
284
|
+
_getLODs(context, property, array, ids) {
|
|
285
|
+
if (this.maxLODsToLoad <= 0) {
|
|
286
|
+
throw new Error("maxLODsToLoad must be greater than zero");
|
|
287
|
+
}
|
|
288
|
+
const properties = [];
|
|
289
|
+
for (let i = ids.length - 1; i >= 0; i--) {
|
|
290
|
+
properties.push(ArrayItem.Get(`${context}/ids/${ids[i]}`, array, ids[i]));
|
|
291
|
+
if (properties.length === this.maxLODsToLoad) {
|
|
292
|
+
return properties;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
properties.push(property);
|
|
296
|
+
return properties;
|
|
297
|
+
}
|
|
298
|
+
_disposeTransformNode(babylonTransformNode) {
|
|
299
|
+
const babylonMaterials = [];
|
|
300
|
+
const babylonMaterial = babylonTransformNode.material;
|
|
301
|
+
if (babylonMaterial) {
|
|
302
|
+
babylonMaterials.push(babylonMaterial);
|
|
303
|
+
}
|
|
304
|
+
for (const babylonMesh of babylonTransformNode.getChildMeshes()) {
|
|
305
|
+
if (babylonMesh.material) {
|
|
306
|
+
babylonMaterials.push(babylonMesh.material);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
babylonTransformNode.dispose();
|
|
310
|
+
const babylonMaterialsToDispose = babylonMaterials.filter((babylonMaterial) => this._loader.babylonScene.meshes.every((mesh) => mesh.material != babylonMaterial));
|
|
311
|
+
this._disposeMaterials(babylonMaterialsToDispose);
|
|
312
|
+
}
|
|
313
|
+
_disposeMaterials(babylonMaterials) {
|
|
314
|
+
const babylonTextures = {};
|
|
315
|
+
for (const babylonMaterial of babylonMaterials) {
|
|
316
|
+
for (const babylonTexture of babylonMaterial.getActiveTextures()) {
|
|
317
|
+
babylonTextures[babylonTexture.uniqueId] = babylonTexture;
|
|
318
|
+
}
|
|
319
|
+
babylonMaterial.dispose();
|
|
320
|
+
}
|
|
321
|
+
for (const uniqueId in babylonTextures) {
|
|
322
|
+
for (const babylonMaterial of this._loader.babylonScene.materials) {
|
|
323
|
+
if (babylonMaterial.hasTexture(babylonTextures[uniqueId])) {
|
|
324
|
+
delete babylonTextures[uniqueId];
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
for (const uniqueId in babylonTextures) {
|
|
329
|
+
babylonTextures[uniqueId].dispose();
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
unregisterGLTFExtension(NAME);
|
|
334
|
+
registerGLTFExtension(NAME, true, (loader) => new MSFT_lod(loader));
|
|
335
|
+
|
|
336
|
+
export { MSFT_lod };
|
|
337
|
+
//# sourceMappingURL=MSFT_lod-DkM5iXcm.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MSFT_lod-DkM5iXcm.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/MSFT_lod.js"],"sourcesContent":["import { Observable } from \"core/Misc/observable\";\nimport { Deferred } from \"core/Misc/deferred\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"MSFT_lod\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/MSFT_lod/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_lod {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 100;\n /**\n * Maximum number of LODs to load, starting from the lowest LOD.\n */\n this.maxLODsToLoad = 10;\n /**\n * Observable raised when all node LODs of one level are loaded.\n * The event data is the index of the loaded LOD starting from zero.\n * Dispose the loader to cancel the loading of the next level of LODs.\n */\n this.onNodeLODsLoadedObservable = new Observable();\n /**\n * Observable raised when all material LODs of one level are loaded.\n * The event data is the index of the loaded LOD starting from zero.\n * Dispose the loader to cancel the loading of the next level of LODs.\n */\n this.onMaterialLODsLoadedObservable = new Observable();\n this._bufferLODs = new Array();\n this._nodeIndexLOD = null;\n this._nodeSignalLODs = new Array();\n this._nodePromiseLODs = new Array();\n this._nodeBufferLODs = new Array();\n this._materialIndexLOD = null;\n this._materialSignalLODs = new Array();\n this._materialPromiseLODs = new Array();\n this._materialBufferLODs = new Array();\n this._loader = loader;\n // Options takes precedence. The maxLODsToLoad extension property is retained for back compat.\n // For new extensions, they should only use options.\n this.maxLODsToLoad = this._loader.parent.extensionOptions[NAME]?.maxLODsToLoad ?? this.maxLODsToLoad;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n this._nodeIndexLOD = null;\n this._nodeSignalLODs.length = 0;\n this._nodePromiseLODs.length = 0;\n this._nodeBufferLODs.length = 0;\n this._materialIndexLOD = null;\n this._materialSignalLODs.length = 0;\n this._materialPromiseLODs.length = 0;\n this._materialBufferLODs.length = 0;\n this.onMaterialLODsLoadedObservable.clear();\n this.onNodeLODsLoadedObservable.clear();\n }\n /** @internal */\n onReady() {\n for (let indexLOD = 0; indexLOD < this._nodePromiseLODs.length; indexLOD++) {\n const promise = Promise.all(this._nodePromiseLODs[indexLOD]).then(() => {\n if (indexLOD !== 0) {\n this._loader.endPerformanceCounter(`Node LOD ${indexLOD}`);\n this._loader.log(`Loaded node LOD ${indexLOD}`);\n }\n this.onNodeLODsLoadedObservable.notifyObservers(indexLOD);\n if (indexLOD !== this._nodePromiseLODs.length - 1) {\n this._loader.startPerformanceCounter(`Node LOD ${indexLOD + 1}`);\n this._loadBufferLOD(this._nodeBufferLODs, indexLOD + 1);\n if (this._nodeSignalLODs[indexLOD]) {\n this._nodeSignalLODs[indexLOD].resolve();\n }\n }\n });\n this._loader._completePromises.push(promise);\n }\n for (let indexLOD = 0; indexLOD < this._materialPromiseLODs.length; indexLOD++) {\n const promise = Promise.all(this._materialPromiseLODs[indexLOD]).then(() => {\n if (indexLOD !== 0) {\n this._loader.endPerformanceCounter(`Material LOD ${indexLOD}`);\n this._loader.log(`Loaded material LOD ${indexLOD}`);\n }\n this.onMaterialLODsLoadedObservable.notifyObservers(indexLOD);\n if (indexLOD !== this._materialPromiseLODs.length - 1) {\n this._loader.startPerformanceCounter(`Material LOD ${indexLOD + 1}`);\n this._loadBufferLOD(this._materialBufferLODs, indexLOD + 1);\n if (this._materialSignalLODs[indexLOD]) {\n this._materialSignalLODs[indexLOD].resolve();\n }\n }\n });\n this._loader._completePromises.push(promise);\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n const promise = this._loader.loadSceneAsync(context, scene);\n this._loadBufferLOD(this._bufferLODs, 0);\n return promise;\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n let firstPromise;\n const nodeLODs = this._getLODs(extensionContext, node, this._loader.gltf.nodes, extension.ids);\n this._loader.logOpen(`${extensionContext}`);\n for (let indexLOD = 0; indexLOD < nodeLODs.length; indexLOD++) {\n const nodeLOD = nodeLODs[indexLOD];\n if (indexLOD !== 0) {\n this._nodeIndexLOD = indexLOD;\n this._nodeSignalLODs[indexLOD] = this._nodeSignalLODs[indexLOD] || new Deferred();\n }\n const assignWrap = (babylonTransformNode) => {\n assign(babylonTransformNode);\n babylonTransformNode.setEnabled(false);\n };\n const promise = this._loader.loadNodeAsync(`/nodes/${nodeLOD.index}`, nodeLOD, assignWrap).then((babylonMesh) => {\n if (indexLOD !== 0) {\n // TODO: should not rely on _babylonTransformNode\n const previousNodeLOD = nodeLODs[indexLOD - 1];\n if (previousNodeLOD._babylonTransformNode) {\n this._disposeTransformNode(previousNodeLOD._babylonTransformNode);\n delete previousNodeLOD._babylonTransformNode;\n }\n }\n babylonMesh.setEnabled(true);\n return babylonMesh;\n });\n this._nodePromiseLODs[indexLOD] = this._nodePromiseLODs[indexLOD] || [];\n if (indexLOD === 0) {\n firstPromise = promise;\n }\n else {\n this._nodeIndexLOD = null;\n this._nodePromiseLODs[indexLOD].push(promise);\n }\n }\n this._loader.logClose();\n return firstPromise;\n });\n }\n /**\n * @internal\n */\n _loadMaterialAsync(context, material, babylonMesh, babylonDrawMode, assign) {\n // Don't load material LODs if already loading a node LOD.\n if (this._nodeIndexLOD) {\n return null;\n }\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n let firstPromise;\n const materialLODs = this._getLODs(extensionContext, material, this._loader.gltf.materials, extension.ids);\n this._loader.logOpen(`${extensionContext}`);\n for (let indexLOD = 0; indexLOD < materialLODs.length; indexLOD++) {\n const materialLOD = materialLODs[indexLOD];\n if (indexLOD !== 0) {\n this._materialIndexLOD = indexLOD;\n }\n const promise = this._loader\n ._loadMaterialAsync(`/materials/${materialLOD.index}`, materialLOD, babylonMesh, babylonDrawMode, (babylonMaterial) => {\n if (indexLOD === 0) {\n assign(babylonMaterial);\n }\n })\n .then((babylonMaterial) => {\n if (indexLOD !== 0) {\n assign(babylonMaterial);\n // TODO: should not rely on _data\n const previousDataLOD = materialLODs[indexLOD - 1]._data;\n if (previousDataLOD[babylonDrawMode]) {\n this._disposeMaterials([previousDataLOD[babylonDrawMode].babylonMaterial]);\n delete previousDataLOD[babylonDrawMode];\n }\n }\n return babylonMaterial;\n });\n this._materialPromiseLODs[indexLOD] = this._materialPromiseLODs[indexLOD] || [];\n if (indexLOD === 0) {\n firstPromise = promise;\n }\n else {\n this._materialIndexLOD = null;\n this._materialPromiseLODs[indexLOD].push(promise);\n }\n }\n this._loader.logClose();\n return firstPromise;\n });\n }\n /**\n * @internal\n */\n _loadUriAsync(context, property, uri) {\n // Defer the loading of uris if loading a node or material LOD.\n if (this._nodeIndexLOD !== null) {\n this._loader.log(`deferred`);\n const previousIndexLOD = this._nodeIndexLOD - 1;\n this._nodeSignalLODs[previousIndexLOD] = this._nodeSignalLODs[previousIndexLOD] || new Deferred();\n return this._nodeSignalLODs[this._nodeIndexLOD - 1].promise.then(() => {\n return this._loader.loadUriAsync(context, property, uri);\n });\n }\n else if (this._materialIndexLOD !== null) {\n this._loader.log(`deferred`);\n const previousIndexLOD = this._materialIndexLOD - 1;\n this._materialSignalLODs[previousIndexLOD] = this._materialSignalLODs[previousIndexLOD] || new Deferred();\n return this._materialSignalLODs[previousIndexLOD].promise.then(() => {\n return this._loader.loadUriAsync(context, property, uri);\n });\n }\n return null;\n }\n /**\n * @internal\n */\n loadBufferAsync(context, buffer, byteOffset, byteLength) {\n if (this._loader.parent.useRangeRequests && !buffer.uri) {\n if (!this._loader.bin) {\n throw new Error(`${context}: Uri is missing or the binary glTF is missing its binary chunk`);\n }\n const loadAsync = (bufferLODs, indexLOD) => {\n const start = byteOffset;\n const end = start + byteLength - 1;\n let bufferLOD = bufferLODs[indexLOD];\n if (bufferLOD) {\n bufferLOD.start = Math.min(bufferLOD.start, start);\n bufferLOD.end = Math.max(bufferLOD.end, end);\n }\n else {\n bufferLOD = { start: start, end: end, loaded: new Deferred() };\n bufferLODs[indexLOD] = bufferLOD;\n }\n return bufferLOD.loaded.promise.then((data) => {\n return new Uint8Array(data.buffer, data.byteOffset + byteOffset - bufferLOD.start, byteLength);\n });\n };\n this._loader.log(`deferred`);\n if (this._nodeIndexLOD !== null) {\n return loadAsync(this._nodeBufferLODs, this._nodeIndexLOD);\n }\n else if (this._materialIndexLOD !== null) {\n return loadAsync(this._materialBufferLODs, this._materialIndexLOD);\n }\n else {\n return loadAsync(this._bufferLODs, 0);\n }\n }\n return null;\n }\n _loadBufferLOD(bufferLODs, indexLOD) {\n const bufferLOD = bufferLODs[indexLOD];\n if (bufferLOD) {\n this._loader.log(`Loading buffer range [${bufferLOD.start}-${bufferLOD.end}]`);\n this._loader.bin.readAsync(bufferLOD.start, bufferLOD.end - bufferLOD.start + 1).then((data) => {\n bufferLOD.loaded.resolve(data);\n }, (error) => {\n bufferLOD.loaded.reject(error);\n });\n }\n }\n /**\n * @returns an array of LOD properties from lowest to highest.\n * @param context\n * @param property\n * @param array\n * @param ids\n */\n _getLODs(context, property, array, ids) {\n if (this.maxLODsToLoad <= 0) {\n throw new Error(\"maxLODsToLoad must be greater than zero\");\n }\n const properties = [];\n for (let i = ids.length - 1; i >= 0; i--) {\n properties.push(ArrayItem.Get(`${context}/ids/${ids[i]}`, array, ids[i]));\n if (properties.length === this.maxLODsToLoad) {\n return properties;\n }\n }\n properties.push(property);\n return properties;\n }\n _disposeTransformNode(babylonTransformNode) {\n const babylonMaterials = [];\n const babylonMaterial = babylonTransformNode.material;\n if (babylonMaterial) {\n babylonMaterials.push(babylonMaterial);\n }\n for (const babylonMesh of babylonTransformNode.getChildMeshes()) {\n if (babylonMesh.material) {\n babylonMaterials.push(babylonMesh.material);\n }\n }\n babylonTransformNode.dispose();\n const babylonMaterialsToDispose = babylonMaterials.filter((babylonMaterial) => this._loader.babylonScene.meshes.every((mesh) => mesh.material != babylonMaterial));\n this._disposeMaterials(babylonMaterialsToDispose);\n }\n _disposeMaterials(babylonMaterials) {\n const babylonTextures = {};\n for (const babylonMaterial of babylonMaterials) {\n for (const babylonTexture of babylonMaterial.getActiveTextures()) {\n babylonTextures[babylonTexture.uniqueId] = babylonTexture;\n }\n babylonMaterial.dispose();\n }\n for (const uniqueId in babylonTextures) {\n for (const babylonMaterial of this._loader.babylonScene.materials) {\n if (babylonMaterial.hasTexture(babylonTextures[uniqueId])) {\n delete babylonTextures[uniqueId];\n }\n }\n }\n for (const uniqueId in babylonTextures) {\n babylonTextures[uniqueId].dispose();\n }\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new MSFT_lod(loader));\n//# sourceMappingURL=MSFT_lod.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,UAAU;AACvB;AACA;AACA;AACA;AACO,MAAM,QAAQ,CAAC;AACtB;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,aAAa,GAAG,EAAE;AAC/B;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,0BAA0B,GAAG,IAAI,UAAU,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,8BAA8B,GAAG,IAAI,UAAU,EAAE;AAC9D,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,EAAE;AACtC,QAAQ,IAAI,CAAC,aAAa,GAAG,IAAI;AACjC,QAAQ,IAAI,CAAC,eAAe,GAAG,IAAI,KAAK,EAAE;AAC1C,QAAQ,IAAI,CAAC,gBAAgB,GAAG,IAAI,KAAK,EAAE;AAC3C,QAAQ,IAAI,CAAC,eAAe,GAAG,IAAI,KAAK,EAAE;AAC1C,QAAQ,IAAI,CAAC,iBAAiB,GAAG,IAAI;AACrC,QAAQ,IAAI,CAAC,mBAAmB,GAAG,IAAI,KAAK,EAAE;AAC9C,QAAQ,IAAI,CAAC,oBAAoB,GAAG,IAAI,KAAK,EAAE;AAC/C,QAAQ,IAAI,C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-lt.esm.min.js";const i="MSFT_minecraftMesh";class a{constructor(e){this.name=i,this._loader=e,this.enabled=this._loader.isExtensionUsed(i)}dispose(){this._loader=null}loadMaterialPropertiesAsync(r,s,i){return t.LoadExtraAsync(r,s,this.name,((t,a)=>{if(a){if(!(i instanceof e))throw new Error(`${t}: Material type not supported`);const a=this._loader.loadMaterialPropertiesAsync(r,s,i);return i.needAlphaBlending()&&(i.forceDepthWrite=!0,i.separateCullingPass=!0),i.backFaceCulling=i.forceDepthWrite,i.twoSidedLighting=!0,a}return null}))}}r(i),s(i,!0,(e=>new a(e)));export{a as MSFT_minecraftMesh};
|
|
2
|
+
//# sourceMappingURL=MSFT_minecraftMesh-CG9JY5Ic.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MSFT_minecraftMesh-CG9JY5Ic.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/MSFT_minecraftMesh.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"MSFT_minecraftMesh\";\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_minecraftMesh {\n /** @internal */\n constructor(loader) {\n /** @internal */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /** @internal */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtraAsync(context, material, this.name, (extraContext, extra) => {\n if (extra) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${extraContext}: Material type not supported`);\n }\n const promise = this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial);\n if (babylonMaterial.needAlphaBlending()) {\n babylonMaterial.forceDepthWrite = true;\n babylonMaterial.separateCullingPass = true;\n }\n babylonMaterial.backFaceCulling = babylonMaterial.forceDepthWrite;\n babylonMaterial.twoSidedLighting = true;\n return promise;\n }\n return null;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new MSFT_minecraftMesh(loader));\n//# sourceMappingURL=MSFT_minecraftMesh.js.map"],"names":["NAME","MSFT_minecraftMesh","constructor","loader","this","name","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtraAsync","extraContext","extra","PBRMaterial","Error","promise","needAlphaBlending","forceDepthWrite","separateCullingPass","backFaceCulling","twoSidedLighting","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,qBAGN,MAAMC,EAET,WAAAC,CAAYC,GAERC,KAAKC,KAAOL,EACZI,KAAKE,QAAUH,EACfC,KAAKG,QAAUH,KAAKE,QAAQE,gBAAgBR,EACpD,CAEI,OAAAS,GACIL,KAAKE,QAAU,IACvB,CAEI,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,eAAeJ,EAASC,EAAUR,KAAKC,MAAM,CAACW,EAAcC,KAC1E,GAAIA,EAAO,CACP,KAAMJ,aAA2BK,GAC7B,MAAM,IAAIC,MAAM,GAAGH,kCAEvB,MAAMI,EAAUhB,KAAKE,QAAQI,4BAA4BC,EAASC,EAAUC,GAO5E,OANIA,EAAgBQ,sBAChBR,EAAgBS,iBAAkB,EAClCT,EAAgBU,qBAAsB,GAE1CV,EAAgBW,gBAAkBX,EAAgBS,gBAClDT,EAAgBY,kBAAmB,EAC5BL,CACvB,CACY,OAAO,IAAI,GAEvB,EAEAM,EAAwB1B,GACxB2B,EAAsB3B,GAAM,GAAOG,GAAW,IAAIF,EAAmBE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { a$ as PBRMaterial, aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Dlf001gP.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-DnWHbX53.esm.js';
|
|
3
|
+
import './rawTexture-D0O_yrdQ.esm.js';
|
|
4
|
+
import './assetContainer-0Qu2XIWb.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-C3gHlipY.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "MSFT_minecraftMesh";
|
|
8
|
+
/** @internal */
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10
|
+
class MSFT_minecraftMesh {
|
|
11
|
+
/** @internal */
|
|
12
|
+
constructor(loader) {
|
|
13
|
+
/** @internal */
|
|
14
|
+
this.name = NAME;
|
|
15
|
+
this._loader = loader;
|
|
16
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
dispose() {
|
|
20
|
+
this._loader = null;
|
|
21
|
+
}
|
|
22
|
+
/** @internal */
|
|
23
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
24
|
+
return GLTFLoader.LoadExtraAsync(context, material, this.name, (extraContext, extra) => {
|
|
25
|
+
if (extra) {
|
|
26
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
27
|
+
throw new Error(`${extraContext}: Material type not supported`);
|
|
28
|
+
}
|
|
29
|
+
const promise = this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial);
|
|
30
|
+
if (babylonMaterial.needAlphaBlending()) {
|
|
31
|
+
babylonMaterial.forceDepthWrite = true;
|
|
32
|
+
babylonMaterial.separateCullingPass = true;
|
|
33
|
+
}
|
|
34
|
+
babylonMaterial.backFaceCulling = babylonMaterial.forceDepthWrite;
|
|
35
|
+
babylonMaterial.twoSidedLighting = true;
|
|
36
|
+
return promise;
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
unregisterGLTFExtension(NAME);
|
|
43
|
+
registerGLTFExtension(NAME, true, (loader) => new MSFT_minecraftMesh(loader));
|
|
44
|
+
|
|
45
|
+
export { MSFT_minecraftMesh };
|
|
46
|
+
//# sourceMappingURL=MSFT_minecraftMesh-Cyjdx_Y_.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MSFT_minecraftMesh-Cyjdx_Y_.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/MSFT_minecraftMesh.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"MSFT_minecraftMesh\";\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_minecraftMesh {\n /** @internal */\n constructor(loader) {\n /** @internal */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /** @internal */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtraAsync(context, material, this.name, (extraContext, extra) => {\n if (extra) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${extraContext}: Material type not supported`);\n }\n const promise = this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial);\n if (babylonMaterial.needAlphaBlending()) {\n babylonMaterial.forceDepthWrite = true;\n babylonMaterial.separateCullingPass = true;\n }\n babylonMaterial.backFaceCulling = babylonMaterial.forceDepthWrite;\n babylonMaterial.twoSidedLighting = true;\n return promise;\n }\n return null;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new MSFT_minecraftMesh(loader));\n//# sourceMappingURL=MSFT_minecraftMesh.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,oBAAoB;AACjC;AACA;AACO,MAAM,kBAAkB,CAAC;AAChC;AACA,IAAI,WAAW,C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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a$ as e,aQ as r,aR as o}from"./index-Bo5F_mGk.esm.min.js";import{G as t}from"./glTFLoader-Dj_JCgqJ.esm.min.js";import"./rawTexture-BAt5J3G4.esm.min.js";import"./assetContainer-CMuD-n3X.esm.min.js";import"./glTFLoaderAnimation-A_WVS-lt.esm.min.js";const s="MSFT_sRGBFactors";class i{constructor(e){this.name=s,this._loader=e,this.enabled=this._loader.isExtensionUsed(s)}dispose(){this._loader=null}loadMaterialPropertiesAsync(r,o,s){return t.LoadExtraAsync(r,o,this.name,((t,i)=>{if(i){if(!(s instanceof e))throw new Error(`${t}: Material type not supported`);const i=this._loader.loadMaterialPropertiesAsync(r,o,s),a=s.getScene().getEngine().useExactSrgbConversions;return s.albedoTexture||s.albedoColor.toLinearSpaceToRef(s.albedoColor,a),s.reflectivityTexture||s.reflectivityColor.toLinearSpaceToRef(s.reflectivityColor,a),i}return null}))}}r(s),o(s,!0,(e=>new i(e)));export{i as MSFT_sRGBFactors};
|
|
2
|
+
//# sourceMappingURL=MSFT_sRGBFactors-Bm3_fRmt.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MSFT_sRGBFactors-Bm3_fRmt.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/MSFT_sRGBFactors.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"MSFT_sRGBFactors\";\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_sRGBFactors {\n /** @internal */\n constructor(loader) {\n /** @internal */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /** @internal */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtraAsync(context, material, this.name, (extraContext, extra) => {\n if (extra) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${extraContext}: Material type not supported`);\n }\n const promise = this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial);\n const useExactSrgbConversions = babylonMaterial.getScene().getEngine().useExactSrgbConversions;\n if (!babylonMaterial.albedoTexture) {\n babylonMaterial.albedoColor.toLinearSpaceToRef(babylonMaterial.albedoColor, useExactSrgbConversions);\n }\n if (!babylonMaterial.reflectivityTexture) {\n babylonMaterial.reflectivityColor.toLinearSpaceToRef(babylonMaterial.reflectivityColor, useExactSrgbConversions);\n }\n return promise;\n }\n return null;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new MSFT_sRGBFactors(loader));\n//# sourceMappingURL=MSFT_sRGBFactors.js.map"],"names":["NAME","MSFT_sRGBFactors","constructor","loader","this","name","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtraAsync","extraContext","extra","PBRMaterial","Error","promise","useExactSrgbConversions","getScene","getEngine","albedoTexture","albedoColor","toLinearSpaceToRef","reflectivityTexture","reflectivityColor","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,mBAGN,MAAMC,EAET,WAAAC,CAAYC,GAERC,KAAKC,KAAOL,EACZI,KAAKE,QAAUH,EACfC,KAAKG,QAAUH,KAAKE,QAAQE,gBAAgBR,EACpD,CAEI,OAAAS,GACIL,KAAKE,QAAU,IACvB,CAEI,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,eAAeJ,EAASC,EAAUR,KAAKC,MAAM,CAACW,EAAcC,KAC1E,GAAIA,EAAO,CACP,KAAMJ,aAA2BK,GAC7B,MAAM,IAAIC,MAAM,GAAGH,kCAEvB,MAAMI,EAAUhB,KAAKE,QAAQI,4BAA4BC,EAASC,EAAUC,GACtEQ,EAA0BR,EAAgBS,WAAWC,YAAYF,wBAOvE,OANKR,EAAgBW,eACjBX,EAAgBY,YAAYC,mBAAmBb,EAAgBY,YAAaJ,GAE3ER,EAAgBc,qBACjBd,EAAgBe,kBAAkBF,mBAAmBb,EAAgBe,kBAAmBP,GAErFD,CACvB,CACY,OAAO,IAAI,GAEvB,EAEAS,EAAwB7B,GACxB8B,EAAsB9B,GAAM,GAAOG,GAAW,IAAIF,EAAiBE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { a$ as PBRMaterial, aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Dlf001gP.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-DnWHbX53.esm.js';
|
|
3
|
+
import './rawTexture-D0O_yrdQ.esm.js';
|
|
4
|
+
import './assetContainer-0Qu2XIWb.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-C3gHlipY.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "MSFT_sRGBFactors";
|
|
8
|
+
/** @internal */
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
10
|
+
class MSFT_sRGBFactors {
|
|
11
|
+
/** @internal */
|
|
12
|
+
constructor(loader) {
|
|
13
|
+
/** @internal */
|
|
14
|
+
this.name = NAME;
|
|
15
|
+
this._loader = loader;
|
|
16
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
dispose() {
|
|
20
|
+
this._loader = null;
|
|
21
|
+
}
|
|
22
|
+
/** @internal */
|
|
23
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
24
|
+
return GLTFLoader.LoadExtraAsync(context, material, this.name, (extraContext, extra) => {
|
|
25
|
+
if (extra) {
|
|
26
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
27
|
+
throw new Error(`${extraContext}: Material type not supported`);
|
|
28
|
+
}
|
|
29
|
+
const promise = this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial);
|
|
30
|
+
const useExactSrgbConversions = babylonMaterial.getScene().getEngine().useExactSrgbConversions;
|
|
31
|
+
if (!babylonMaterial.albedoTexture) {
|
|
32
|
+
babylonMaterial.albedoColor.toLinearSpaceToRef(babylonMaterial.albedoColor, useExactSrgbConversions);
|
|
33
|
+
}
|
|
34
|
+
if (!babylonMaterial.reflectivityTexture) {
|
|
35
|
+
babylonMaterial.reflectivityColor.toLinearSpaceToRef(babylonMaterial.reflectivityColor, useExactSrgbConversions);
|
|
36
|
+
}
|
|
37
|
+
return promise;
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
unregisterGLTFExtension(NAME);
|
|
44
|
+
registerGLTFExtension(NAME, true, (loader) => new MSFT_sRGBFactors(loader));
|
|
45
|
+
|
|
46
|
+
export { MSFT_sRGBFactors };
|
|
47
|
+
//# sourceMappingURL=MSFT_sRGBFactors-uFdNij-4.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MSFT_sRGBFactors-uFdNij-4.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/MSFT_sRGBFactors.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"MSFT_sRGBFactors\";\n/** @internal */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_sRGBFactors {\n /** @internal */\n constructor(loader) {\n /** @internal */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /** @internal */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtraAsync(context, material, this.name, (extraContext, extra) => {\n if (extra) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${extraContext}: Material type not supported`);\n }\n const promise = this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial);\n const useExactSrgbConversions = babylonMaterial.getScene().getEngine().useExactSrgbConversions;\n if (!babylonMaterial.albedoTexture) {\n babylonMaterial.albedoColor.toLinearSpaceToRef(babylonMaterial.albedoColor, useExactSrgbConversions);\n }\n if (!babylonMaterial.reflectivityTexture) {\n babylonMaterial.reflectivityColor.toLinearSpaceToRef(babylonMaterial.reflectivityColor, useExactSrgbConversions);\n }\n return promise;\n }\n return null;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new MSFT_sRGBFactors(loader));\n//# sourceMappingURL=MSFT_sRGBFactors.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,kBAAkB;AAC/B;AACA;AACO,MAAM,gBAAgB,CAAC;AAC9B;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA,IAAI,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE;AACpE,QAAQ,OAAO,UAAU,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,YAAY,EAAE,KAAK,KAAK;AAChG,YAAY,IAAI,KAAK,EAAE;AACvB,gBAAgB,IAAI,EAAE,eAAe,YAAY,WAAW,CAAC,EAAE;AAC/D,oBAAoB,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,6BAA6B,CAAC,CAAC;AACnF;AACA,gBAAgB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC;AAC5G,gBAAgB,MAAM,uBAAuB,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,uBAAuB;AAC9G,gBAAgB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE;AACpD,oBAAoB,eAAe,CAAC,WAAW,CAAC,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,uBAAuB,CAAC;AACxH;AACA,gBAAgB,IAAI,CAAC,eAAe,CAAC,mBAAmB,EAAE;AAC1D,oBAAoB,eAAe,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;AACpI;AACA,gBAAgB,OAAO,OAAO;AAC9B;AACA,YAAY,OAAO,IAAI;AACvB,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{aT as t,a5 as e,bH as i,bI as n,bJ as a,bK as s,bL as o,bM as r,o as l,aV as h,ac as m,a7 as _,v as g,al as d,E as c,bN as u}from"./index-Bo5F_mGk.esm.min.js";import{B as p}from"./glTFLoader-Dj_JCgqJ.esm.min.js";import"./rawTexture-BAt5J3G4.esm.min.js";import"./assetContainer-CMuD-n3X.esm.min.js";import"./glTFLoaderAnimation-A_WVS-lt.esm.min.js";class A{get currentFrame(){return this._currentFrame}get weight(){return this._weight}get currentValue(){return this._currentValue}get targetPath(){return this._targetPath}get target(){return this._currentActiveTarget}get isAdditive(){return this._host&&this._host.isAdditive}constructor(i,n,a,s){if(this._events=new Array,this._currentFrame=0,this._originalValue=new Array,this._originalBlendValue=null,this._offsetsCache={},this._highLimitsCache={},this._stopped=!1,this._blendingFactor=0,this._currentValue=null,this._currentActiveTarget=null,this._directTarget=null,this._targetPath="",this._weight=1,this._absoluteFrameOffset=0,this._previousElapsedTime=0,this._yoyoDirection=1,this._previousAbsoluteFrame=0,this._targetIsArray=!1,this._animation=n,this._target=i,this._scene=a,this._host=s,this._activeTargets=[],n._runtimeAnimations.push(this),this._animationState={key:0,repeatCount:0,loopMode:this._getCorrectLoopMode()},this._animation.dataType===t.ANIMATIONTYPE_MATRIX&&(this._animationState.workValue=e.Zero()),this._keys=this._animation.getKeys(),this._minFrame=this._keys[0].frame,this._maxFrame=this._keys[this._keys.length-1].frame,this._minValue=this._keys[0].value,this._maxValue=this._keys[this._keys.length-1].value,0!==this._minFrame){const t={frame:0,value:this._minValue};this._keys.splice(0,0,t)}if(this._target instanceof Array){let t=0;for(const e of this._target)this._preparePath(e,t),this._getOriginalValues(t),t++;this._targetIsArray=!0}else this._preparePath(this._target),this._getOriginalValues(),this._targetIsArray=!1,this._directTarget=this._activeTargets[0];const o=n.getEvents();o&&o.length>0&&o.forEach((t=>{this._events.push(t._clone())})),this._enableBlending=i&&i.animationPropertiesOverride?i.animationPropertiesOverride.enableBlending:this._animation.enableBlending}_preparePath(t,e=0){const i=this._animation.targetPropertyPath;if(i.length>1){let n=t;for(let t=0;t<i.length-1;t++){const e=i[t];if(n=n[e],void 0===n)throw new Error(`Invalid property (${e}) in property path (${i.join(".")})`)}this._targetPath=i[i.length-1],this._activeTargets[e]=n}else this._targetPath=i[0],this._activeTargets[e]=t;if(void 0===this._activeTargets[e][this._targetPath])throw new Error(`Invalid property (${this._targetPath}) in property path (${i.join(".")})`)}get animation(){return this._animation}reset(t=!1){if(t)if(this._target instanceof Array){let t=0;for(const e of this._target)void 0!==this._originalValue[t]&&this._setValue(e,this._activeTargets[t],this._originalValue[t],-1,t),t++}else void 0!==this._originalValue[0]&&this._setValue(this._target,this._directTarget,this._originalValue[0],-1,0);this._offsetsCache={},this._highLimitsCache={},this._currentFrame=0,this._blendingFactor=0;for(let t=0;t<this._events.length;t++)this._events[t].isDone=!1}isStopped(){return this._stopped}dispose(){const t=this._animation.runtimeAnimations.indexOf(this);t>-1&&this._animation.runtimeAnimations.splice(t,1)}setValue(t,e){if(this._targetIsArray)for(let i=0;i<this._target.length;i++){const n=this._target[i];this._setValue(n,this._activeTargets[i],t,e,i)}else this._setValue(this._target,this._directTarget,t,e,0)}_getOriginalValues(t=0){let e;const i=this._activeTargets[t];e=i.getLocalMatrix&&"_matrix"===this._targetPath?i.getLocalMatrix():i[this._targetPath],e&&e.clone?this._originalValue[t]=e.clone():this._originalValue[t]=e}_registerTargetForLateAnimationBinding(t,e){const i=t.target;this._scene._registeredForLateAnimationBindings.pushNoDuplicate(i),i._lateAnimationHolders||(i._lateAnimationHolders={}),i._lateAnimationHolders[t.targetPath]||(i._lateAnimationHolders[t.targetPath]={totalWeight:0,totalAdditiveWeight:0,animations:[],additiveAnimations:[],originalValue:e}),t.isAdditive?(i._lateAnimationHolders[t.targetPath].additiveAnimations.push(t),i._lateAnimationHolders[t.targetPath].totalAdditiveWeight+=t.weight):(i._lateAnimationHolders[t.targetPath].animations.push(t),i._lateAnimationHolders[t.targetPath].totalWeight+=t.weight)}_setValue(i,n,a,s,o){if(this._currentActiveTarget=n,this._weight=s,this._enableBlending&&this._blendingFactor<=1){if(!this._originalBlendValue){const t=n[this._targetPath];t.clone?this._originalBlendValue=t.clone():this._originalBlendValue=t}this._originalBlendValue.m?t.AllowMatrixDecomposeForInterpolation?this._currentValue?e.DecomposeLerpToRef(this._originalBlendValue,a,this._blendingFactor,this._currentValue):this._currentValue=e.DecomposeLerp(this._originalBlendValue,a,this._blendingFactor):this._currentValue?e.LerpToRef(this._originalBlendValue,a,this._blendingFactor,this._currentValue):this._currentValue=e.Lerp(this._originalBlendValue,a,this._blendingFactor):this._currentValue=t._UniversalLerp(this._originalBlendValue,a,this._blendingFactor);const s=i&&i.animationPropertiesOverride?i.animationPropertiesOverride.blendingSpeed:this._animation.blendingSpeed;this._blendingFactor+=s}else this._currentValue?this._currentValue.copyFrom?this._currentValue.copyFrom(a):this._currentValue=a:this._currentValue=a?.clone?a.clone():a;-1!==s?this._registerTargetForLateAnimationBinding(this,this._originalValue[o]):this._animationState.loopMode===t.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT?this._currentValue.addToRef?this._currentValue.addToRef(this._originalValue[o],n[this._targetPath]):n[this._targetPath]=this._originalValue[o]+this._currentValue:n[this._targetPath]=this._currentValue,i.markAsDirty&&i.markAsDirty(this._animation.targetProperty)}_getCorrectLoopMode(){return this._target&&this._target.animationPropertiesOverride?this._target.animationPropertiesOverride.loopMode:this._animation.loopMode}goToFrame(t,e=-1){const i=this._animation.getKeys();t<i[0].frame?t=i[0].frame:t>i[i.length-1].frame&&(t=i[i.length-1].frame);const n=this._events;if(n.length)for(let e=0;e<n.length;e++)n[e].onlyOnce||(n[e].isDone=n[e].frame<t);this._currentFrame=t;const a=this._animation._interpolate(t,this._animationState);this.setValue(a,e)}_prepareForSpeedRatioChange(t){const e=this._previousElapsedTime*(this._animation.framePerSecond*t)/1e3;this._absoluteFrameOffset=this._previousAbsoluteFrame-e}animate(e,l,h,m,_,g=-1){const d=this._animation,c=d.targetPropertyPath;if(!c||c.length<1)return this._stopped=!0,!1;let u=!0;(l<this._minFrame||l>this._maxFrame)&&(l=this._minFrame),(h<this._minFrame||h>this._maxFrame)&&(h=this._maxFrame);const p=h-l;let A,f=e*(d.framePerSecond*_)/1e3+this._absoluteFrameOffset,b=0,v=!1;const y=m&&this._animationState.loopMode===t.ANIMATIONLOOPMODE_YOYO;if(y){const t=(f-l)/p,e=Math.sin(t*Math.PI);f=Math.abs(e)*p+l;const i=e>=0?1:-1;this._yoyoDirection!==i&&(v=!0),this._yoyoDirection=i}if(this._previousElapsedTime=e,this._previousAbsoluteFrame=f,!m&&h>=l&&(f>=p&&_>0||f<=0&&_<0))u=!1,b=d._getKeyValue(this._maxValue);else if(!m&&l>=h&&(f<=p&&_<0||f>=0&&_>0))u=!1,b=d._getKeyValue(this._minValue);else if(this._animationState.loopMode!==t.ANIMATIONLOOPMODE_CYCLE){const e=h.toString()+l.toString();if(!this._offsetsCache[e]){this._animationState.repeatCount=0,this._animationState.loopMode=t.ANIMATIONLOOPMODE_CYCLE;const i=d._interpolate(l,this._animationState),n=d._interpolate(h,this._animationState);switch(this._animationState.loopMode=this._getCorrectLoopMode(),d.dataType){case t.ANIMATIONTYPE_FLOAT:this._offsetsCache[e]=n-i;break;case t.ANIMATIONTYPE_QUATERNION:case t.ANIMATIONTYPE_VECTOR3:case t.ANIMATIONTYPE_VECTOR2:case t.ANIMATIONTYPE_SIZE:case t.ANIMATIONTYPE_COLOR3:this._offsetsCache[e]=n.subtract(i)}this._highLimitsCache[e]=n}b=this._highLimitsCache[e],A=this._offsetsCache[e]}if(void 0===A)switch(d.dataType){case t.ANIMATIONTYPE_FLOAT:A=0;break;case t.ANIMATIONTYPE_QUATERNION:A=r;break;case t.ANIMATIONTYPE_VECTOR3:A=o;break;case t.ANIMATIONTYPE_VECTOR2:A=s;break;case t.ANIMATIONTYPE_SIZE:A=a;break;case t.ANIMATIONTYPE_COLOR3:A=n;break;case t.ANIMATIONTYPE_COLOR4:A=i}let T;if(this._host&&this._host.syncRoot){const t=this._host.syncRoot;T=l+p*((t.masterFrame-t.fromFrame)/(t.toFrame-t.fromFrame))}else T=f>0&&l>h||f<0&&l<h?u&&0!==p?h+f%p:l:u&&0!==p?l+f%p:h;const O=this._events;if(!y&&(_>0&&this.currentFrame>T||_<0&&this.currentFrame<T)||y&&v){this._onLoop();for(let t=0;t<O.length;t++)O[t].onlyOnce||(O[t].isDone=!1);this._animationState.key=_>0?0:d.getKeys().length-1}this._currentFrame=T,this._animationState.repeatCount=0===p?0:f/p|0,this._animationState.highLimitValue=b,this._animationState.offsetValue=A;const V=d._interpolate(T,this._animationState);if(this.setValue(V,g),O.length)for(let t=0;t<O.length;t++)if(p>=0&&T>=O[t].frame&&O[t].frame>=l||p<0&&T<=O[t].frame&&O[t].frame<=l){const e=O[t];e.isDone||(e.onlyOnce&&(O.splice(t,1),t--),e.isDone=!0,e.action(T))}return u||(this._stopped=!0),u}}class f{get syncRoot(){return this._syncRoot}get masterFrame(){return 0===this._runtimeAnimations.length?0:this._runtimeAnimations[0].currentFrame}get weight(){return this._weight}set weight(t){this._weight=-1!==t?Math.min(Math.max(t,0),1):-1}get speedRatio(){return this._speedRatio}set speedRatio(t){for(let e=0;e<this._runtimeAnimations.length;e++){this._runtimeAnimations[e]._prepareForSpeedRatioChange(t)}this._speedRatio=t,null!==this._goToFrame&&this.goToFrame(this._goToFrame)}get elapsedTime(){return null===this._localDelayOffset?0:this._scene._animationTime-this._localDelayOffset}constructor(t,e,i=0,n=100,a=!1,s=1,o,r,l,m=!1,_=0){this.target=e,this.fromFrame=i,this.toFrame=n,this.loopAnimation=a,this.onAnimationEnd=o,this.onAnimationLoop=l,this.isAdditive=m,this.playOrder=_,this._localDelayOffset=null,this._pausedDelay=null,this._manualJumpDelay=null,this._runtimeAnimations=new Array,this._paused=!1,this._speedRatio=1,this._weight=-1,this._syncRoot=null,this._frameToSyncFromJump=null,this._goToFrame=null,this.disposeOnEnd=!0,this.animationStarted=!1,this.onAnimationEndObservable=new h,this.onAnimationLoopObservable=new h,this._scene=t,r&&this.appendAnimations(e,r),this._speedRatio=s,t._activeAnimatables.push(this)}syncWith(t){if(this._syncRoot=t,t){const t=this._scene._activeAnimatables.indexOf(this);t>-1&&(this._scene._activeAnimatables.splice(t,1),this._scene._activeAnimatables.push(this))}return this}getAnimations(){return this._runtimeAnimations}appendAnimations(t,e){for(let i=0;i<e.length;i++){const n=e[i],a=new A(t,n,this._scene,this);a._onLoop=()=>{this.onAnimationLoopObservable.notifyObservers(this),this.onAnimationLoop&&this.onAnimationLoop()},this._runtimeAnimations.push(a)}}getAnimationByTargetProperty(t){const e=this._runtimeAnimations;for(let i=0;i<e.length;i++)if(e[i].animation.targetProperty===t)return e[i].animation;return null}getRuntimeAnimationByTargetProperty(t){const e=this._runtimeAnimations;for(let i=0;i<e.length;i++)if(e[i].animation.targetProperty===t)return e[i];return null}reset(){const t=this._runtimeAnimations;for(let e=0;e<t.length;e++)t[e].reset(!0);this._localDelayOffset=null,this._pausedDelay=null}enableBlending(t){const e=this._runtimeAnimations;for(let i=0;i<e.length;i++)e[i].animation.enableBlending=!0,e[i].animation.blendingSpeed=t}disableBlending(){const t=this._runtimeAnimations;for(let e=0;e<t.length;e++)t[e].animation.enableBlending=!1}goToFrame(t,e=!1){const i=this._runtimeAnimations;if(i[0]){const e=i[0].animation.framePerSecond;this._frameToSyncFromJump=this._frameToSyncFromJump??i[0].currentFrame;const n=0===this.speedRatio?0:(t-this._frameToSyncFromJump)/e*1e3/this.speedRatio;this._manualJumpDelay=-n}for(let n=0;n<i.length;n++)i[n].goToFrame(t,e?this._weight:-1);this._goToFrame=t}get paused(){return this._paused}pause(){this._paused||(this._paused=!0)}restart(){this._paused=!1}_raiseOnAnimationEnd(){this.onAnimationEnd&&this.onAnimationEnd(),this.onAnimationEndObservable.notifyObservers(this)}stop(t,e,i=!1,n=!1){if(t||e){const a=this._scene._activeAnimatables.indexOf(this);if(a>-1){const s=this._runtimeAnimations;for(let i=s.length-1;i>=0;i--){const n=s[i];t&&n.animation.name!=t||(e&&!e(n.target)||(n.dispose(),s.splice(i,1)))}0==s.length&&(i||this._scene._activeAnimatables.splice(a,1),n||this._raiseOnAnimationEnd())}}else{const t=this._scene._activeAnimatables.indexOf(this);if(t>-1){i||this._scene._activeAnimatables.splice(t,1);const e=this._runtimeAnimations;for(let t=0;t<e.length;t++)e[t].dispose();this._runtimeAnimations.length=0,n||this._raiseOnAnimationEnd()}}}waitAsync(){return new Promise((t=>{this.onAnimationEndObservable.add((()=>{t(this)}),void 0,void 0,this,!0)}))}_animate(t){if(this._paused)return this.animationStarted=!1,null===this._pausedDelay&&(this._pausedDelay=t),!0;if(null===this._localDelayOffset?(this._localDelayOffset=t,this._pausedDelay=null):null!==this._pausedDelay&&(this._localDelayOffset+=t-this._pausedDelay,this._pausedDelay=null),null!==this._manualJumpDelay&&(this._localDelayOffset+=this._manualJumpDelay,this._manualJumpDelay=null,this._frameToSyncFromJump=null),this._goToFrame=null,0===this._weight)return!0;let e=!1;const i=this._runtimeAnimations;let n;for(n=0;n<i.length;n++){const a=i[n].animate(t-this._localDelayOffset,this.fromFrame,this.toFrame,this.loopAnimation,this._speedRatio,this._weight);e=e||a}if(this.animationStarted=e,!e){if(this.disposeOnEnd)for(n=this._scene._activeAnimatables.indexOf(this),this._scene._activeAnimatables.splice(n,1),n=0;n<i.length;n++)i[n].dispose();this._raiseOnAnimationEnd(),this.disposeOnEnd&&(this.onAnimationEnd=null,this.onAnimationLoop=null,this.onAnimationLoopObservable.clear(),this.onAnimationEndObservable.clear())}return e}}function b(t){if(0===t.totalWeight&&0===t.totalAdditiveWeight)return t.originalValue;let i=1;const n=_.Vector3[0],a=_.Vector3[1],s=_.Quaternion[0];let o=0;const r=t.animations[0],l=t.originalValue;let h=1,d=!1;if(t.totalWeight<1)h=1-t.totalWeight,l.decompose(a,s,n);else{if(o=1,i=t.totalWeight,h=r.weight/i,1==h){if(!t.totalAdditiveWeight)return r.currentValue;d=!0}r.currentValue.decompose(a,s,n)}if(!d){a.scaleInPlace(h),n.scaleInPlace(h),s.scaleInPlace(h);for(let e=o;e<t.animations.length;e++){const o=t.animations[e];if(0===o.weight)continue;h=o.weight/i;const r=_.Vector3[2],l=_.Vector3[3],g=_.Quaternion[1];o.currentValue.decompose(l,g,r),l.scaleAndAddToRef(h,a),g.scaleAndAddToRef(m.Dot(s,g)>0?h:-h,s),r.scaleAndAddToRef(h,n)}s.normalize()}for(let e=0;e<t.additiveAnimations.length;e++){const i=t.additiveAnimations[e];if(0===i.weight)continue;const o=_.Vector3[2],r=_.Vector3[3],l=_.Quaternion[1];i.currentValue.decompose(r,l,o),r.multiplyToRef(a,r),g.LerpToRef(a,r,i.weight,a),s.multiplyToRef(l,l),m.SlerpToRef(s,l,i.weight,s),o.scaleAndAddToRef(i.weight,n)}const c=r?r._animationState.workValue:_.Matrix[0].clone();return e.ComposeToRef(a,s,n,c),c}function v(t,e){if(0===t.totalWeight&&0===t.totalAdditiveWeight)return e;const i=t.animations[0],n=t.originalValue;let a=e;if(0===t.totalWeight&&t.totalAdditiveWeight>0)a.copyFrom(n);else if(1===t.animations.length){if(m.SlerpToRef(n,i.currentValue,Math.min(1,t.totalWeight),a),0===t.totalAdditiveWeight)return a}else if(t.animations.length>1){let i,s,o=1;if(t.totalWeight<1){const e=1-t.totalWeight;i=[],s=[],i.push(n),s.push(e)}else{if(2===t.animations.length&&(m.SlerpToRef(t.animations[0].currentValue,t.animations[1].currentValue,t.animations[1].weight/t.totalWeight,e),0===t.totalAdditiveWeight))return e;i=[],s=[],o=t.totalWeight}for(let e=0;e<t.animations.length;e++){const n=t.animations[e];i.push(n.currentValue),s.push(n.weight/o)}let r=0;for(let t=0;t<i.length;)t?(r+=s[t],m.SlerpToRef(a,i[t],s[t]/r,a),t++):(m.SlerpToRef(i[t],i[t+1],s[t+1]/(s[t]+s[t+1]),e),a=e,r=s[t]+s[t+1],t+=2)}for(let e=0;e<t.additiveAnimations.length;e++){const i=t.additiveAnimations[e];0!==i.weight&&(a.multiplyToRef(i.currentValue,_.Quaternion[0]),m.SlerpToRef(a,_.Quaternion[0],i.weight,a))}return a}var y,T;y=d,(T=p)&&(T.prototype.copyAnimationRange=function(e,i,n,a=!1,s=null){0===this.animations.length&&(this.animations.push(new t(this.name,"_matrix",e.animations[0].framePerSecond,t.ANIMATIONTYPE_MATRIX,0)),this.animations[0].setKeys([]));const o=e.animations[0].getRange(i);if(!o)return!1;const r=o.from,l=o.to,h=e.animations[0].getKeys(),m=e.length,_=e.getParent(),g=this.getParent(),d=a&&_&&m&&this.length&&m!==this.length,c=d&&g&&_?g.length/_.length:1,u=a&&!g&&s&&(1!==s.x||1!==s.y||1!==s.z),p=this.animations[0].getKeys();let A,f,b;for(let t=0,e=h.length;t<e;t++)A=h[t],A.frame>=r&&A.frame<=l&&(a?(b=A.value.clone(),d?(f=b.getTranslation(),b.setTranslation(f.scaleInPlace(c))):u&&s?(f=b.getTranslation(),b.setTranslation(f.multiplyInPlace(s))):b=A.value):b=A.value,p.push({frame:A.frame+n,value:b}));return this.animations[0].createRange(i,r+n,l+n),!0}),y&&(y.prototype._animate=function(e){if(!this.animationsEnabled)return;const i=l.Now;if(!this._animationTimeLast){if(this._pendingData.length>0)return;this._animationTimeLast=i}this.deltaTime=void 0!==e?e:this.useConstantAnimationDeltaTime?16:(i-this._animationTimeLast)*this.animationTimeScale,this._animationTimeLast=i;const n=this._activeAnimatables;if(0===n.length)return;this._animationTime+=this.deltaTime;const a=this._animationTime;for(let t=0;t<n.length;t++){const e=n[t];!e._animate(a)&&e.disposeOnEnd&&t--}!function(e){if(e._registeredForLateAnimationBindings.length){for(let i=0;i<e._registeredForLateAnimationBindings.length;i++){const n=e._registeredForLateAnimationBindings.data[i];for(const e in n._lateAnimationHolders){const i=n._lateAnimationHolders[e],a=i.animations[0],s=i.originalValue;if(null==s)continue;const o=t.AllowMatrixDecomposeForInterpolation&&s.m;let r=n[e];if(o)r=b(i);else if(void 0!==s.w)r=v(i,r||m.Identity());else{let e=0,n=1;const o=a&&a._animationState.loopMode===t.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT;if(i.totalWeight<1)r=o?s.clone?s.clone():s:a&&s.scale?s.scale(1-i.totalWeight):a?s*(1-i.totalWeight):s.clone?s.clone():s;else if(a){n=i.totalWeight;const t=a.weight/n;r=1!==t?a.currentValue.scale?a.currentValue.scale(t):a.currentValue*t:a.currentValue,o&&(r.addToRef?r.addToRef(s,r):r+=s),e=1}for(let t=e;t<i.animations.length;t++){const e=i.animations[t],a=e.weight/n;a&&(e.currentValue.scaleAndAddToRef?e.currentValue.scaleAndAddToRef(a,r):r+=e.currentValue*a)}for(let t=0;t<i.additiveAnimations.length;t++){const e=i.additiveAnimations[t],n=e.weight;n&&(e.currentValue.scaleAndAddToRef?e.currentValue.scaleAndAddToRef(n,r):r+=e.currentValue*n)}}n[e]=r}n._lateAnimationHolders={}}e._registeredForLateAnimationBindings.reset()}}(this)},y.prototype.sortActiveAnimatables=function(){this._activeAnimatables.sort(((t,e)=>t.playOrder-e.playOrder))},y.prototype.beginWeightedAnimation=function(t,e,i,n=1,a,s=1,o,r,l,h,m=!1){const _=this.beginAnimation(t,e,i,a,s,o,r,!1,l,h,m);return _.weight=n,_},y.prototype.beginAnimation=function(t,e,i,n,a=1,s,o,r=!0,l,h,m=!1){if(a<0){const t=e;e=i,i=t,a=-a}e>i&&(a=-a),r&&this.stopAnimation(t,void 0,l),o||(o=new f(this,t,e,i,n,a,s,void 0,h,m));const _=!l||l(t);if(t.animations&&_&&o.appendAnimations(t,t.animations),t.getAnimatables){const m=t.getAnimatables();for(let t=0;t<m.length;t++)this.beginAnimation(m[t],e,i,n,a,s,o,r,l,h)}return o.reset(),o},y.prototype.beginHierarchyAnimation=function(t,e,i,n,a,s=1,o,r,l=!0,h,m,_=!1){const g=t.getDescendants(e),d=[];d.push(this.beginAnimation(t,i,n,a,s,o,r,l,h,void 0,_));for(const t of g)d.push(this.beginAnimation(t,i,n,a,s,o,r,l,h,void 0,_));return d},y.prototype.beginDirectAnimation=function(t,e,i,n,a,s=1,o,r,l=!1){if(s<0){const t=i;i=n,n=t,s=-s}return i>n&&(s=-s),new f(this,t,i,n,a,s,o,e,r,l)},y.prototype.beginDirectHierarchyAnimation=function(t,e,i,n,a,s,o,r,l,h=!1){const m=t.getDescendants(e),_=[];_.push(this.beginDirectAnimation(t,i,n,a,s,o,r,l,h));for(const t of m)_.push(this.beginDirectAnimation(t,i,n,a,s,o,r,l,h));return _},y.prototype.getAnimatableByTarget=function(t){for(let e=0;e<this._activeAnimatables.length;e++)if(this._activeAnimatables[e].target===t)return this._activeAnimatables[e];return null},y.prototype.getAllAnimatablesByTarget=function(t){const e=[];for(let i=0;i<this._activeAnimatables.length;i++)this._activeAnimatables[i].target===t&&e.push(this._activeAnimatables[i]);return e},y.prototype.stopAnimation=function(t,e,i){const n=this.getAllAnimatablesByTarget(t);for(const t of n)t.stop(e,i)},y.prototype.stopAllAnimations=function(){if(this._activeAnimatables){for(let t=0;t<this._activeAnimatables.length;t++)this._activeAnimatables[t].stop(void 0,void 0,!0);this._activeAnimatables.length=0}for(const t of this.animationGroups)t.stop()});class O{getClassName(){return"TargetedAnimation"}serialize(){const t={};return t.animation=this.animation.serialize(),t.targetId=this.target.id,t}}class V{get mask(){return this._mask}set mask(t){this._mask!==t&&(this._mask=t,this.syncWithMask(!0))}syncWithMask(t=!1){if(this.mask||t){this._numActiveAnimatables=0;for(let t=0;t<this._animatables.length;++t){const e=this._animatables[t];!this.mask||this.mask.disabled||this.mask.retainsTarget(e.target.name)?(this._numActiveAnimatables++,e.paused&&e.restart()):e.paused||e.pause()}}else this._numActiveAnimatables=this._targetedAnimations.length}removeUnmaskedAnimations(){if(this.mask&&!this.mask.disabled){for(let t=0;t<this._animatables.length;++t){const e=this._animatables[t];this.mask.retainsTarget(e.target.name)||(e.stop(),this._animatables.splice(t,1),--t)}for(let t=0;t<this._targetedAnimations.length;t++){const e=this._targetedAnimations[t];this.mask.retainsTarget(e.target.name)||(this._targetedAnimations.splice(t,1),--t)}}}get from(){return this._from}set from(t){if(this._from!==t){this._from=t;for(let t=0;t<this._animatables.length;t++){this._animatables[t].fromFrame=this._from}}}get to(){return this._to}set to(t){if(this._to!==t){this._to=t;for(let t=0;t<this._animatables.length;t++){this._animatables[t].toFrame=this._to}}}get isStarted(){return this._isStarted}get isPlaying(){return this._isStarted&&!this._isPaused}get speedRatio(){return this._speedRatio}set speedRatio(t){if(this._speedRatio!==t){this._speedRatio=t;for(let t=0;t<this._animatables.length;t++){this._animatables[t].speedRatio=this._speedRatio}}}get loopAnimation(){return this._loopAnimation}set loopAnimation(t){if(this._loopAnimation!==t){this._loopAnimation=t;for(let t=0;t<this._animatables.length;t++){this._animatables[t].loopAnimation=this._loopAnimation}}}get isAdditive(){return this._isAdditive}set isAdditive(t){if(this._isAdditive!==t){this._isAdditive=t;for(let t=0;t<this._animatables.length;t++){this._animatables[t].isAdditive=this._isAdditive}}}get weight(){return this._weight}set weight(t){this._weight!==t&&(this._weight=t,this.setWeightForAllAnimatables(this._weight))}get targetedAnimations(){return this._targetedAnimations}get animatables(){return this._animatables}get children(){return this._targetedAnimations}get playOrder(){return this._playOrder}set playOrder(t){if(this._playOrder!==t&&(this._playOrder=t,this._animatables.length>0)){for(let t=0;t<this._animatables.length;t++)this._animatables[t].playOrder=this._playOrder;this._scene.sortActiveAnimatables()}}get enableBlending(){return this._enableBlending}set enableBlending(t){if(this._enableBlending!==t&&(this._enableBlending=t,null!==t))for(let e=0;e<this._targetedAnimations.length;++e)this._targetedAnimations[e].animation.enableBlending=t}get blendingSpeed(){return this._blendingSpeed}set blendingSpeed(t){if(this._blendingSpeed!==t&&(this._blendingSpeed=t,null!==t))for(let e=0;e<this._targetedAnimations.length;++e)this._targetedAnimations[e].animation.blendingSpeed=t}getLength(t,e){t=t??this._from;return((e=e??this._to)-t)/(this.targetedAnimations[0].animation.framePerSecond*this._speedRatio)}static MergeAnimationGroups(t,e=!0,i=!1,n){if(0===t.length)return null;n=n??t[0].weight;let a=Number.MAX_VALUE,s=-Number.MAX_VALUE;if(i)for(const e of t)e.from<a&&(a=e.from),e.to>s&&(s=e.to);const o=new V(t[0].name+"_merged",t[0]._scene,n);for(const n of t){i&&n.normalize(a,s);for(const t of n.targetedAnimations)o.addTargetedAnimation(t.animation,t.target);e&&n.dispose()}return o}constructor(t,e=null,i=-1,n=0){this.name=t,this._targetedAnimations=new Array,this._animatables=new Array,this._from=Number.MAX_VALUE,this._to=-Number.MAX_VALUE,this._speedRatio=1,this._loopAnimation=!1,this._isAdditive=!1,this._weight=-1,this._playOrder=0,this._enableBlending=null,this._blendingSpeed=null,this._numActiveAnimatables=0,this._shouldStart=!0,this._parentContainer=null,this.onAnimationEndObservable=new h,this.onAnimationLoopObservable=new h,this.onAnimationGroupLoopObservable=new h,this.onAnimationGroupEndObservable=new h,this.onAnimationGroupPauseObservable=new h,this.onAnimationGroupPlayObservable=new h,this.metadata=null,this._mask=null,this._animationLoopFlags=[],this._scene=e||c.LastCreatedScene,this._weight=i,this._playOrder=n,this.uniqueId=this._scene.getUniqueId(),this._scene.addAnimationGroup(this)}addTargetedAnimation(t,e){const i=new O;i.animation=t,i.target=e;const n=t.getKeys();return this._from>n[0].frame&&(this._from=n[0].frame),this._to<n[n.length-1].frame&&(this._to=n[n.length-1].frame),null!==this._enableBlending&&(t.enableBlending=this._enableBlending),null!==this._blendingSpeed&&(t.blendingSpeed=this._blendingSpeed),this._targetedAnimations.push(i),this._shouldStart=!0,i}removeTargetedAnimation(t){for(let e=this._targetedAnimations.length-1;e>-1;e--){this._targetedAnimations[e].animation===t&&this._targetedAnimations.splice(e,1)}}normalize(t=null,e=null){null==t&&(t=this._from),null==e&&(e=this._to);for(let i=0;i<this._targetedAnimations.length;i++){const n=this._targetedAnimations[i].animation.getKeys(),a=n[0],s=n[n.length-1];if(a.frame>t){const e={frame:t,value:a.value,inTangent:a.inTangent,outTangent:a.outTangent,interpolation:a.interpolation};n.splice(0,0,e)}if(s.frame<e){const t={frame:e,value:s.value,inTangent:s.inTangent,outTangent:s.outTangent,interpolation:s.interpolation};n.push(t)}}return this._from=t,this._to=e,this}_processLoop(t,e,i){t.onAnimationLoop=()=>{this.onAnimationLoopObservable.notifyObservers(e),this._animationLoopFlags[i]||(this._animationLoopFlags[i]=!0,this._animationLoopCount++,this._animationLoopCount===this._numActiveAnimatables&&(this.onAnimationGroupLoopObservable.notifyObservers(this),this._animationLoopCount=0,this._animationLoopFlags.length=0))}}start(t=!1,e=1,i,n,a){if(this._isStarted||0===this._targetedAnimations.length)return this;this._loopAnimation=t,this._shouldStart=!1,this._animationLoopCount=0,this._animationLoopFlags.length=0;for(let s=0;s<this._targetedAnimations.length;s++){const o=this._targetedAnimations[s],r=this._scene.beginDirectAnimation(o.target,[o.animation],void 0!==i?i:this._from,void 0!==n?n:this._to,t,e,void 0,void 0,void 0!==a?a:this._isAdditive);r.weight=this._weight,r.playOrder=this._playOrder,r.onAnimationEnd=()=>{this.onAnimationEndObservable.notifyObservers(o),this._checkAnimationGroupEnded(r)},this._processLoop(r,o,s),this._animatables.push(r)}return this.syncWithMask(),this._scene.sortActiveAnimatables(),this._speedRatio=e,this._isStarted=!0,this._isPaused=!1,this.onAnimationGroupPlayObservable.notifyObservers(this),this}pause(){if(!this._isStarted)return this;this._isPaused=!0;for(let t=0;t<this._animatables.length;t++){this._animatables[t].pause()}return this.onAnimationGroupPauseObservable.notifyObservers(this),this}play(t){return this.isStarted&&this._animatables.length&&!this._shouldStart?(void 0!==t&&(this.loopAnimation=t),this.restart()):(this.stop(),this.start(t,this._speedRatio)),this}reset(){if(!this._isStarted)return this.play(),this.goToFrame(0),this.stop(!0),this;for(let t=0;t<this._animatables.length;t++){this._animatables[t].reset()}return this}restart(){if(!this._isStarted)return this;for(let t=0;t<this._animatables.length;t++){this._animatables[t].restart()}return this.syncWithMask(),this._isPaused=!1,this.onAnimationGroupPlayObservable.notifyObservers(this),this}stop(t=!1){if(!this._isStarted)return this;const e=this._animatables.slice();for(let i=0;i<e.length;i++)e[i].stop(void 0,void 0,!0,t);let i=0;for(let e=0;e<this._scene._activeAnimatables.length;e++){const n=this._scene._activeAnimatables[e];n._runtimeAnimations.length>0?this._scene._activeAnimatables[i++]=n:t&&this._checkAnimationGroupEnded(n,t)}return this._scene._activeAnimatables.length=i,this._isStarted=!1,this}setWeightForAllAnimatables(t){for(let e=0;e<this._animatables.length;e++){this._animatables[e].weight=t}return this}syncAllAnimationsWith(t){for(let e=0;e<this._animatables.length;e++){this._animatables[e].syncWith(t)}return this}goToFrame(t,e=!1){if(!this._isStarted)return this;for(let i=0;i<this._animatables.length;i++){this._animatables[i].goToFrame(t,e)}return this}getCurrentFrame(){return this.animatables[0]?.masterFrame||0}dispose(){this.isStarted&&this.stop(),this._targetedAnimations.length=0,this._animatables.length=0;const t=this._scene.animationGroups.indexOf(this);if(t>-1&&this._scene.animationGroups.splice(t,1),this._parentContainer){const t=this._parentContainer.animationGroups.indexOf(this);t>-1&&this._parentContainer.animationGroups.splice(t,1),this._parentContainer=null}this.onAnimationEndObservable.clear(),this.onAnimationGroupEndObservable.clear(),this.onAnimationGroupPauseObservable.clear(),this.onAnimationGroupPlayObservable.clear(),this.onAnimationLoopObservable.clear(),this.onAnimationGroupLoopObservable.clear()}_checkAnimationGroupEnded(t,e=!1){const i=this._animatables.indexOf(t);i>-1&&this._animatables.splice(i,1),this._animatables.length===this._targetedAnimations.length-this._numActiveAnimatables&&(this._isStarted=!1,e||this.onAnimationGroupEndObservable.notifyObservers(this),this._animatables.length=0)}clone(t,e,i=!1){const n=new V(t||this.name,this._scene,this._weight,this._playOrder);n._from=this.from,n._to=this.to,n._speedRatio=this.speedRatio,n._loopAnimation=this.loopAnimation,n._isAdditive=this.isAdditive,n._enableBlending=this.enableBlending,n._blendingSpeed=this.blendingSpeed,n.metadata=this.metadata,n.mask=this.mask;for(const t of this._targetedAnimations)n.addTargetedAnimation(i?t.animation.clone():t.animation,e?e(t.target):t.target);return n}serialize(){const t={};t.name=this.name,t.from=this.from,t.to=this.to,t.speedRatio=this.speedRatio,t.loopAnimation=this.loopAnimation,t.isAdditive=this.isAdditive,t.weight=this.weight,t.playOrder=this.playOrder,t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,t.targetedAnimations=[];for(let e=0;e<this.targetedAnimations.length;e++){const i=this.targetedAnimations[e];t.targetedAnimations[e]=i.serialize()}return u&&u.HasTags(this)&&(t.tags=u.GetTags(this)),this.metadata&&(t.metadata=this.metadata),t}static Parse(e,i){const n=new V(e.name,i,e.weight,e.playOrder);for(let a=0;a<e.targetedAnimations.length;a++){const s=e.targetedAnimations[a],o=t.Parse(s.animation),r=s.targetId;if("influence"===s.animation.property){const t=i.getMorphTargetById(r);t&&n.addTargetedAnimation(o,t)}else{const t=i.getNodeById(r);null!=t&&n.addTargetedAnimation(o,t)}}return u&&u.AddTagsTo(n,e.tags),null!==e.from&&null!==e.to&&n.normalize(e.from,e.to),void 0!==e.speedRatio&&(n._speedRatio=e.speedRatio),void 0!==e.loopAnimation&&(n._loopAnimation=e.loopAnimation),void 0!==e.isAdditive&&(n._isAdditive=e.isAdditive),void 0!==e.weight&&(n._weight=e.weight),void 0!==e.playOrder&&(n._playOrder=e.playOrder),void 0!==e.enableBlending&&(n._enableBlending=e.enableBlending),void 0!==e.blendingSpeed&&(n._blendingSpeed=e.blendingSpeed),void 0!==e.metadata&&(n.metadata=e.metadata),n}static MakeAnimationAdditive(e,i,n,a=!1,s){let o;o="object"==typeof i?i:{referenceFrame:i,range:n,cloneOriginalAnimationGroup:a,clonedAnimationName:s};let r=e;o.cloneOriginalAnimationGroup&&(r=e.clone(o.clonedAnimationGroupName||r.name));const l=r.targetedAnimations;for(let e=0;e<l.length;e++){const i=l[e];i.animation=t.MakeAnimationAdditive(i.animation,o)}if(r.isAdditive=!0,o.clipKeys){let t=Number.MAX_VALUE,e=-Number.MAX_VALUE;const i=r.targetedAnimations;for(let n=0;n<i.length;n++){const a=i[n].animation.getKeys();t>a[0].frame&&(t=a[0].frame),e<a[a.length-1].frame&&(e=a[a.length-1].frame)}r._from=t,r._to=e}return r}static ClipKeys(t,e,i,n,a){const s=t.clone(n||t.name);return V.ClipKeysInPlace(s,e,i,a)}static ClipKeysInPlace(t,e,i,n){return V.ClipInPlace(t,e,i,n,!1)}static ClipFrames(t,e,i,n,a){const s=t.clone(n||t.name);return V.ClipFramesInPlace(s,e,i,a)}static ClipFramesInPlace(t,e,i,n){return V.ClipInPlace(t,e,i,n,!0)}static ClipInPlace(t,e,i,n,a=!1){let s=Number.MAX_VALUE,o=-Number.MAX_VALUE;const r=t.targetedAnimations;for(let t=0;t<r.length;t++){const l=r[t],h=n?l.animation:l.animation.clone();a&&(h.createKeyForFrame(e),h.createKeyForFrame(i));const m=h.getKeys(),_=[];let g=Number.MAX_VALUE;for(let t=0;t<m.length;t++){const n=m[t];if(!a&&t>=e&&t<=i||a&&n.frame>=e&&n.frame<=i){const t={frame:n.frame,value:n.value.clone?n.value.clone():n.value,inTangent:n.inTangent,outTangent:n.outTangent,interpolation:n.interpolation,lockedTangent:n.lockedTangent};g===Number.MAX_VALUE&&(g=t.frame),t.frame-=g,_.push(t)}}0!==_.length?(s>_[0].frame&&(s=_[0].frame),o<_[_.length-1].frame&&(o=_[_.length-1].frame),h.setKeys(_,!0),l.animation=h):(r.splice(t,1),t--)}return t._from=s,t._to=o,t}getClassName(){return"AnimationGroup"}toString(t){let e="Name: "+this.name;return e+=", type: "+this.getClassName(),t&&(e+=", from: "+this._from,e+=", to: "+this._to,e+=", isStarted: "+this._isStarted,e+=", speedRatio: "+this._speedRatio,e+=", targetedAnimations length: "+this._targetedAnimations.length,e+=", animatables length: "+this._animatables),e}}export{V as AnimationGroup,O as TargetedAnimation};
|
|
2
|
+
//# sourceMappingURL=animationGroup-CravGs2P.esm.min.js.map
|