@babylonjs/viewer 7.40.0 → 7.40.1-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-gxFyrTPG.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_ies-gxFyrTPG.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_ies-pE68tmBj.esm.js +84 -0
- package/dist/chunks/EXT_lights_ies-pE68tmBj.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-B8Oal0Ur.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-B8Oal0Ur.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-CmP_ZGlF.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-CmP_ZGlF.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DSFpOud_.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DSFpOud_.esm.min.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DksAVeyV.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DksAVeyV.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-CNUItnkN.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-CNUItnkN.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-CeM-AELC.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-CeM-AELC.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-BWOJV_Yf.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-BWOJV_Yf.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-CSTfqZHT.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-CSTfqZHT.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-4Pxv5jC9.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-4Pxv5jC9.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-C9og1YZL.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-C9og1YZL.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-BmFy6ZgN.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-BmFy6ZgN.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-BwYwFtj7.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-BwYwFtj7.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-BM2iOlKg.esm.js +352 -0
- package/dist/chunks/KHR_animation_pointer-BM2iOlKg.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-C7FvhqL3.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-C7FvhqL3.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-BocaEHGh.esm.js +617 -0
- package/dist/chunks/KHR_draco_mesh_compression-BocaEHGh.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-CjRCmIUz.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-CjRCmIUz.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-C_ndoQHo.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-C_ndoQHo.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-ClHXW_8S.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-ClHXW_8S.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-D0u7ZFj4.esm.js +581 -0
- package/dist/chunks/KHR_lights_punctual-D0u7ZFj4.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-Z509RdIo.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-Z509RdIo.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-Dz4vBqG3.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-Dz4vBqG3.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-VuLS4v3P.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-VuLS4v3P.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-DM7vCrC3.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-DM7vCrC3.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-Dt0nQ5Ky.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-Dt0nQ5Ky.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-1Pa4ScwD.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-1Pa4ScwD.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DIUHVeOQ.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DIUHVeOQ.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-CMpGZsUw.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-CMpGZsUw.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-CeSj8nUI.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-CeSj8nUI.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-CQQX31qK.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-CQQX31qK.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-DH4A4kIp.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-DH4A4kIp.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-BTU1gw-j.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-BTU1gw-j.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-DyzPdK6b.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-DyzPdK6b.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-8ZgbULX5.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-8ZgbULX5.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-D2HCEadq.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-D2HCEadq.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-C4K79VpA.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-C4K79VpA.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DtJVJ-gl.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DtJVJ-gl.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-CT4KjW_v.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-CT4KjW_v.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-DQt5abo-.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-DQt5abo-.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-CCvL1awH.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-CCvL1awH.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-CgLKBQCa.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-CgLKBQCa.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-B64oDwox.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-B64oDwox.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-C6yPYKde.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-C6yPYKde.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-BGPDq328.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-BGPDq328.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-Sz3qCEGr.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-Sz3qCEGr.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-Cqw7xft3.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-Cqw7xft3.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-D7rYTNoB.esm.js +262 -0
- package/dist/chunks/KHR_materials_variants-D7rYTNoB.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-BBsNt0LM.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-BBsNt0LM.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-DfWO7kG_.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-DfWO7kG_.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-BiDGkiGh.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-BiDGkiGh.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-fE1qitjF.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-fE1qitjF.esm.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-DaOK-Y48.esm.min.js +2 -0
- package/dist/chunks/KHR_node_hoverability-DaOK-Y48.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-glogCdHq.esm.js +39 -0
- package/dist/chunks/KHR_node_hoverability-glogCdHq.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-BCVXn2la.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-BCVXn2la.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-CCfVtnan.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-CCfVtnan.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-_cpZJuOo.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-_cpZJuOo.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-nhRrTq0b.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-nhRrTq0b.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-AgI_J0Ru.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-AgI_J0Ru.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-CgcA7bhJ.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-CgcA7bhJ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-C37VZwlU.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-C37VZwlU.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-Cm4z6qFH.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-Cm4z6qFH.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-4EFTMS8D.esm.js +2207 -0
- package/dist/chunks/MSFT_audio_emitter-4EFTMS8D.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-Czn1DAbD.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-Czn1DAbD.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_lod-Bn4FnO5A.esm.js +337 -0
- package/dist/chunks/MSFT_lod-Bn4FnO5A.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-DDB-SKXR.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-DDB-SKXR.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-APRwcxWb.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-APRwcxWb.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-DPvby_FZ.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-DPvby_FZ.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-D33sXFGi.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-D33sXFGi.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-OsUqZSue.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-OsUqZSue.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-BR3zskS8.esm.js +2482 -0
- package/dist/chunks/animationGroup-BR3zskS8.esm.js.map +1 -0
- package/dist/chunks/animationGroup-ChIp5GuO.esm.min.js +2 -0
- package/dist/chunks/animationGroup-ChIp5GuO.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-DLSDgjTx.esm.min.js +2 -0
- package/dist/chunks/assetContainer-DLSDgjTx.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-cm8rvay3.esm.js +1720 -0
- package/dist/chunks/assetContainer-cm8rvay3.esm.js.map +1 -0
- package/dist/chunks/audioEngine-Cx5dB73O.esm.js +305 -0
- package/dist/chunks/audioEngine-Cx5dB73O.esm.js.map +1 -0
- package/dist/chunks/audioEngine-hKZ2m0jY.esm.min.js +2 -0
- package/dist/chunks/audioEngine-hKZ2m0jY.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-BCUFE4CP.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-BCUFE4CP.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-ByPKjjzz.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-ByPKjjzz.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-BIqCbGFg.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-BIqCbGFg.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-CT8X4ynA.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-CT8X4ynA.esm.js.map +1 -0
- package/dist/chunks/dds-BDOPTCsA.esm.min.js +2 -0
- package/dist/chunks/dds-BDOPTCsA.esm.min.js.map +1 -0
- package/dist/chunks/dds-BYrGO6eI.esm.js +540 -0
- package/dist/chunks/dds-BYrGO6eI.esm.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-BbrffKmM.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-BbrffKmM.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-C36kkIBH.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-C36kkIBH.esm.js.map +1 -0
- package/dist/chunks/decalFragment-07cq9QvS.esm.min.js +2 -0
- package/dist/chunks/decalFragment-07cq9QvS.esm.min.js.map +1 -0
- package/dist/chunks/decalFragment-B16Nfnl3.esm.js +18 -0
- package/dist/chunks/decalFragment-B16Nfnl3.esm.js.map +1 -0
- package/dist/chunks/default.fragment-BkjbMxBE.esm.min.js +2 -0
- package/dist/chunks/default.fragment-BkjbMxBE.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-C-8jVS2k.esm.min.js +2 -0
- package/dist/chunks/default.fragment-C-8jVS2k.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-C3Pectqi.esm.js +515 -0
- package/dist/chunks/default.fragment-C3Pectqi.esm.js.map +1 -0
- package/dist/chunks/default.fragment-D3LhG5le.esm.js +446 -0
- package/dist/chunks/default.fragment-D3LhG5le.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CPx_2Z0S.esm.js +181 -0
- package/dist/chunks/default.vertex-CPx_2Z0S.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CVMUuXku.esm.js +202 -0
- package/dist/chunks/default.vertex-CVMUuXku.esm.js.map +1 -0
- package/dist/chunks/default.vertex-CbVQZVXB.esm.min.js +2 -0
- package/dist/chunks/default.vertex-CbVQZVXB.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-S3Wv9p0Q.esm.min.js +2 -0
- package/dist/chunks/default.vertex-S3Wv9p0Q.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-BdxOUPT0.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-BdxOUPT0.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-CUaZKOKG.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-CUaZKOKG.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DdcmVbYg.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-DdcmVbYg.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-rLhenj1H.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-rLhenj1H.esm.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
- package/dist/chunks/dumpTools-CPmY0U7D.esm.js +200 -0
- package/dist/chunks/dumpTools-CPmY0U7D.esm.js.map +1 -0
- package/dist/chunks/dumpTools-DVDwJ2sz.esm.min.js +2 -0
- package/dist/chunks/dumpTools-DVDwJ2sz.esm.min.js.map +1 -0
- package/dist/chunks/engine-BqSrdURz.esm.min.js +2 -0
- package/dist/chunks/engine-BqSrdURz.esm.min.js.map +1 -0
- package/dist/chunks/engine-D_GgT2Nf.esm.js +2216 -0
- package/dist/chunks/engine-D_GgT2Nf.esm.js.map +1 -0
- package/dist/chunks/engine.common-CN1Lug5p.esm.js +1162 -0
- package/dist/chunks/engine.common-CN1Lug5p.esm.js.map +1 -0
- package/dist/chunks/engine.common-DgiXKhLy.esm.min.js +2 -0
- package/dist/chunks/engine.common-DgiXKhLy.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-BORNR9vu.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-BORNR9vu.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-DHwsXTfw.esm.js +64 -0
- package/dist/chunks/envTextureLoader-DHwsXTfw.esm.js.map +1 -0
- package/dist/chunks/environmentTextureTools-B2vnsFq-.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-B2vnsFq-.esm.js.map +1 -0
- package/dist/chunks/environmentTextureTools-BYQHZH-c.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-BYQHZH-c.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-B8FQohBr.esm.js +1683 -0
- package/dist/chunks/exrTextureLoader-B8FQohBr.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-D8xP0GLQ.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-D8xP0GLQ.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-5YT33bDn.esm.js +102 -0
- package/dist/chunks/fogFragment-5YT33bDn.esm.js.map +1 -0
- package/dist/chunks/fogFragment-BOBZ2KwN.esm.min.js +2 -0
- package/dist/chunks/fogFragment-BOBZ2KwN.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-CLENZGuB.esm.js +101 -0
- package/dist/chunks/fogFragment-CLENZGuB.esm.js.map +1 -0
- package/dist/chunks/fogFragment-D9dudohA.esm.min.js +2 -0
- package/dist/chunks/fogFragment-D9dudohA.esm.min.js.map +1 -0
- package/dist/chunks/fresnelFunction-BkO99b6C.esm.js +12 -0
- package/dist/chunks/fresnelFunction-BkO99b6C.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-CqiLsMCu.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-CqiLsMCu.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-CkL-dxBD.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-CkL-dxBD.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-IEHRfiUn.esm.js +7586 -0
- package/dist/chunks/glTFLoader-IEHRfiUn.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-CV32Nmqb.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-CV32Nmqb.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-Cq2ziV9o.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-Cq2ziV9o.esm.min.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-B5QCEZvF.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-B5QCEZvF.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-BxLCgoIQ.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-BxLCgoIQ.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-Daxnf8NE.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-Daxnf8NE.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-UzG0C-sm.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-UzG0C-sm.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-BpVjKGyb.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-BpVjKGyb.esm.min.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-DgW8CxRF.esm.js +253 -0
- package/dist/chunks/hdrTextureLoader-DgW8CxRF.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-BFgvMG5S.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-BFgvMG5S.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-BatAhE6u.esm.js +108 -0
- package/dist/chunks/helperFunctions-BatAhE6u.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-qECwmiwu.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-qECwmiwu.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-vbA-oTJx.esm.js +80 -0
- package/dist/chunks/helperFunctions-vbA-oTJx.esm.js.map +1 -0
- package/dist/chunks/iesTextureLoader-Ccd5pvbh.esm.min.js +2 -0
- package/dist/chunks/iesTextureLoader-Ccd5pvbh.esm.min.js.map +1 -0
- package/dist/chunks/iesTextureLoader-nMYnOfhm.esm.js +189 -0
- package/dist/chunks/iesTextureLoader-nMYnOfhm.esm.js.map +1 -0
- package/dist/chunks/index-BHIM4QBr.esm.min.js +57 -0
- package/dist/chunks/index-BHIM4QBr.esm.min.js.map +1 -0
- package/dist/chunks/index-CtkZLm9J.esm.js +74717 -0
- package/dist/chunks/index-CtkZLm9J.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-CkkvHzY3.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-CkkvHzY3.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-CwGlHia2.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-CwGlHia2.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BiUSPlzz.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-BiUSPlzz.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-Bq2fzMbS.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-Bq2fzMbS.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-C8DJP16D.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-C8DJP16D.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-DJpvEdPG.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-DJpvEdPG.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-C00_obGd.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-C00_obGd.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-CYIGBMYd.esm.js +77 -0
- package/dist/chunks/logDepthVertex-CYIGBMYd.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-CxT8FVOf.esm.js +81 -0
- package/dist/chunks/logDepthVertex-CxT8FVOf.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-SyM_Fu5K.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-SyM_Fu5K.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-BaIG4IFB.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-BaIG4IFB.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CQzOmEIM.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-CQzOmEIM.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-D100Qvmm.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-D100Qvmm.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-OSD7irdC.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-OSD7irdC.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration--wzKOTOT.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration--wzKOTOT.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-DIi9ZPDc.esm.js +26 -0
- package/dist/chunks/meshUboDeclaration-DIi9ZPDc.esm.js.map +1 -0
- package/dist/chunks/objFileLoader-Cda8pwUd.esm.js +1338 -0
- package/dist/chunks/objFileLoader-Cda8pwUd.esm.js.map +1 -0
- package/dist/chunks/objFileLoader-kzI-pZ8o.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-kzI-pZ8o.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-4cP4dKVP.esm.min.js +2 -0
- package/dist/chunks/oitFragment-4cP4dKVP.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-Bz1w36ia.esm.js +1078 -0
- package/dist/chunks/oitFragment-Bz1w36ia.esm.js.map +1 -0
- package/dist/chunks/oitFragment-DUkW-kmb.esm.min.js +2 -0
- package/dist/chunks/oitFragment-DUkW-kmb.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-DiuTTpNa.esm.js +1240 -0
- package/dist/chunks/oitFragment-DiuTTpNa.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-B8l5NRgR.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-B8l5NRgR.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-BF4UEoT8.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-BF4UEoT8.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-CD3_26yo.esm.js +15 -0
- package/dist/chunks/pass.fragment-CD3_26yo.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-DfeELUEn.esm.js +15 -0
- package/dist/chunks/pass.fragment-DfeELUEn.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-BDylAp64.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-BDylAp64.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-C1qko419.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-C1qko419.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-EBVxSAEQ.esm.js +3232 -0
- package/dist/chunks/pbr.fragment-EBVxSAEQ.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-lt62m8b7.esm.js +3273 -0
- package/dist/chunks/pbr.fragment-lt62m8b7.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-CGRL_eY2.esm.js +339 -0
- package/dist/chunks/pbr.vertex-CGRL_eY2.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-CHv4zeYj.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-CHv4zeYj.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-Dk4h9ywZ.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-Dk4h9ywZ.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-DopP5mYu.esm.js +214 -0
- package/dist/chunks/pbr.vertex-DopP5mYu.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-Bt30-Flh.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-Bt30-Flh.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-pLUOpXIY.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-pLUOpXIY.esm.js.map +1 -0
- package/dist/chunks/rawTexture-78KJgWfq.esm.js +191 -0
- package/dist/chunks/rawTexture-78KJgWfq.esm.js.map +1 -0
- package/dist/chunks/rawTexture-CCCnj14W.esm.min.js +2 -0
- package/dist/chunks/rawTexture-CCCnj14W.esm.min.js.map +1 -0
- package/dist/chunks/ray-CfhmGTmj.esm.js +946 -0
- package/dist/chunks/ray-CfhmGTmj.esm.js.map +1 -0
- package/dist/chunks/ray-Du89cGmz.esm.min.js +2 -0
- package/dist/chunks/ray-Du89cGmz.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-BHAQKD_5.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-BHAQKD_5.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CV6q4aIi.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-CV6q4aIi.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DEu4F_6T.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-DEu4F_6T.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DiJfgZKv.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-DiJfgZKv.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-CR30N0Mr.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-CR30N0Mr.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-CUE3DGC8.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-CUE3DGC8.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-DdFs5QJM.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-DdFs5QJM.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-omm81hdD.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-omm81hdD.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-BnaOhITn.esm.js +3379 -0
- package/dist/chunks/splatFileLoader-BnaOhITn.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-CuMIDOsR.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-CuMIDOsR.esm.min.js.map +1 -0
- package/dist/chunks/spotLight-Ca0-j1Op.esm.js +701 -0
- package/dist/chunks/spotLight-Ca0-j1Op.esm.js.map +1 -0
- package/dist/chunks/spotLight-DXuSbTaJ.esm.min.js +2 -0
- package/dist/chunks/spotLight-DXuSbTaJ.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-DKyaZtcm.esm.js +1805 -0
- package/dist/chunks/standardMaterial-DKyaZtcm.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-h3ccobBt.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-h3ccobBt.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-CDv97liE.esm.js +238 -0
- package/dist/chunks/stlFileLoader-CDv97liE.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-e2ImyWaM.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-e2ImyWaM.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-DJaEph-Q.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-DJaEph-Q.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-slv-QvZW.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-slv-QvZW.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-Ue9ZAvRK.esm.js +3848 -0
- package/dist/chunks/thinEngine-Ue9ZAvRK.esm.js.map +1 -0
- package/dist/chunks/thinEngine-pihAbdON.esm.min.js +2 -0
- package/dist/chunks/thinEngine-pihAbdON.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-BgfKoejL.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-BgfKoejL.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-V41szD4h.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-V41szD4h.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-CZsK7mYP.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-CZsK7mYP.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DKVusFas.esm.js +522 -0
- package/dist/chunks/vertexColorMixing-DKVusFas.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DeZKI8QK.esm.js +412 -0
- package/dist/chunks/vertexColorMixing-DeZKI8QK.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-axGN1U7X.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-axGN1U7X.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-COis70hT.esm.js +11533 -0
- package/dist/chunks/webgpuEngine-COis70hT.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-Cx_GlShD.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-Cx_GlShD.esm.min.js.map +1 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
- package/lib/index.d.ts +559 -0
- package/lib/index.js +2083 -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 @@
|
|
|
1
|
+
{"version":3,"file":"MSFT_audio_emitter-4EFTMS8D.esm.js","sources":["../../../../../dev/core/dist/Animations/animationEvent.js","../../../../../dev/core/dist/Audio/sound.js","../../../../../dev/core/dist/Audio/weightedsound.js","../../../../../dev/core/dist/Audio/soundTrack.js","../../../../../dev/core/dist/Audio/audioSceneComponent.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/MSFT_audio_emitter.js"],"sourcesContent":["/**\n * Composed of a frame, and an action function\n */\nexport class AnimationEvent {\n /**\n * Initializes the animation event\n * @param frame The frame for which the event is triggered\n * @param action The event to perform when triggered\n * @param onlyOnce Specifies if the event should be triggered only once\n */\n constructor(\n /** The frame for which the event is triggered **/\n frame, \n /** The event to perform when triggered **/\n action, \n /** Specifies if the event should be triggered only once**/\n onlyOnce) {\n this.frame = frame;\n this.action = action;\n this.onlyOnce = onlyOnce;\n /**\n * Specifies if the animation event is done\n */\n this.isDone = false;\n }\n /** @internal */\n _clone() {\n return new AnimationEvent(this.frame, this.action, this.onlyOnce);\n }\n}\n//# sourceMappingURL=animationEvent.js.map","import { Tools } from \"../Misc/tools\";\nimport { Observable } from \"../Misc/observable\";\nimport { Vector3 } from \"../Maths/math.vector\";\nimport { Logger } from \"../Misc/logger\";\nimport { _WarnImport } from \"../Misc/devTools\";\nimport { EngineStore } from \"../Engines/engineStore\";\nimport { RegisterClass } from \"../Misc/typeStore\";\nimport { AbstractEngine } from \"core/Engines/abstractEngine\";\n/**\n * Defines a sound that can be played in the application.\n * The sound can either be an ambient track or a simple sound played in reaction to a user action.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic\n */\nexport class Sound {\n /**\n * Does the sound loop after it finishes playing once.\n */\n get loop() {\n return this._loop;\n }\n set loop(value) {\n if (value === this._loop) {\n return;\n }\n this._loop = value;\n this.updateOptions({ loop: value });\n }\n /**\n * Gets the current time for the sound.\n */\n get currentTime() {\n if (this._htmlAudioElement) {\n return this._htmlAudioElement.currentTime;\n }\n if (AbstractEngine.audioEngine?.audioContext && (this.isPlaying || this.isPaused)) {\n // The `_currentTime` member is only updated when the sound is paused. Add the time since the last start\n // to get the actual current time.\n const timeSinceLastStart = this.isPaused ? 0 : AbstractEngine.audioEngine.audioContext.currentTime - this._startTime;\n return this._currentTime + timeSinceLastStart;\n }\n return 0;\n }\n /**\n * Does this sound enables spatial sound.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n get spatialSound() {\n return this._spatialSound;\n }\n /**\n * Does this sound enables spatial sound.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n set spatialSound(newValue) {\n if (newValue == this._spatialSound) {\n return;\n }\n const wasPlaying = this.isPlaying;\n this.pause();\n if (newValue) {\n this._spatialSound = newValue;\n this._updateSpatialParameters();\n }\n else {\n this._disableSpatialSound();\n }\n if (wasPlaying) {\n this.play();\n }\n }\n /**\n * Create a sound and attach it to a scene\n * @param name Name of your sound\n * @param urlOrArrayBuffer Url to the sound to load async or ArrayBuffer, it also works with MediaStreams and AudioBuffers\n * @param scene defines the scene the sound belongs to\n * @param readyToPlayCallback Provide a callback function if you'd like to load your code once the sound is ready to be played\n * @param options Objects to provide with the current available options: autoplay, loop, volume, spatialSound, maxDistance, rolloffFactor, refDistance, distanceModel, panningModel, streaming\n */\n constructor(name, urlOrArrayBuffer, scene, readyToPlayCallback = null, options) {\n /**\n * Does the sound autoplay once loaded.\n */\n this.autoplay = false;\n this._loop = false;\n /**\n * Does the sound use a custom attenuation curve to simulate the falloff\n * happening when the source gets further away from the camera.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-your-own-custom-attenuation-function\n */\n this.useCustomAttenuation = false;\n /**\n * Is this sound currently played.\n */\n this.isPlaying = false;\n /**\n * Is this sound currently paused.\n */\n this.isPaused = false;\n /**\n * Define the reference distance the sound should be heard perfectly.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n this.refDistance = 1;\n /**\n * Define the roll off factor of spatial sounds.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n this.rolloffFactor = 1;\n /**\n * Define the max distance the sound should be heard (intensity just became 0 at this point).\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n this.maxDistance = 100;\n /**\n * Define the distance attenuation model the sound will follow.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n this.distanceModel = \"linear\";\n /**\n * Gets or sets an object used to store user defined information for the sound.\n */\n this.metadata = null;\n /**\n * Observable event when the current playing sound finishes.\n */\n this.onEndedObservable = new Observable();\n this._spatialSound = false;\n this._panningModel = \"equalpower\";\n this._playbackRate = 1;\n this._streaming = false;\n this._startTime = 0;\n this._currentTime = 0;\n this._position = Vector3.Zero();\n this._localDirection = new Vector3(1, 0, 0);\n this._volume = 1;\n this._isReadyToPlay = false;\n this._isDirectional = false;\n // Used if you'd like to create a directional sound.\n // If not set, the sound will be omnidirectional\n this._coneInnerAngle = 360;\n this._coneOuterAngle = 360;\n this._coneOuterGain = 0;\n this._isOutputConnected = false;\n this._urlType = \"Unknown\";\n this.name = name;\n scene = scene || EngineStore.LastCreatedScene;\n if (!scene) {\n return;\n }\n this._scene = scene;\n Sound._SceneComponentInitialization(scene);\n this._readyToPlayCallback = readyToPlayCallback;\n // Default custom attenuation function is a linear attenuation\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this._customAttenuationFunction = (currentVolume, currentDistance, maxDistance, refDistance, rolloffFactor) => {\n if (currentDistance < maxDistance) {\n return currentVolume * (1 - currentDistance / maxDistance);\n }\n else {\n return 0;\n }\n };\n if (options) {\n this.autoplay = options.autoplay || false;\n this._loop = options.loop || false;\n // if volume === 0, we need another way to check this option\n if (options.volume !== undefined) {\n this._volume = options.volume;\n }\n this._spatialSound = options.spatialSound ?? false;\n this.maxDistance = options.maxDistance ?? 100;\n this.useCustomAttenuation = options.useCustomAttenuation ?? false;\n this.rolloffFactor = options.rolloffFactor || 1;\n this.refDistance = options.refDistance || 1;\n this.distanceModel = options.distanceModel || \"linear\";\n this._playbackRate = options.playbackRate || 1;\n this._streaming = options.streaming ?? false;\n this._length = options.length;\n this._offset = options.offset;\n }\n if (AbstractEngine.audioEngine?.canUseWebAudio && AbstractEngine.audioEngine.audioContext) {\n this._soundGain = AbstractEngine.audioEngine.audioContext.createGain();\n this._soundGain.gain.value = this._volume;\n this._inputAudioNode = this._soundGain;\n this._outputAudioNode = this._soundGain;\n if (this._spatialSound) {\n this._createSpatialParameters();\n }\n this._scene.mainSoundTrack.addSound(this);\n let validParameter = true;\n // if no parameter is passed, you need to call setAudioBuffer yourself to prepare the sound\n if (urlOrArrayBuffer) {\n try {\n if (typeof urlOrArrayBuffer === \"string\") {\n this._urlType = \"String\";\n this._url = urlOrArrayBuffer;\n }\n else if (urlOrArrayBuffer instanceof ArrayBuffer) {\n this._urlType = \"ArrayBuffer\";\n }\n else if (urlOrArrayBuffer instanceof HTMLMediaElement) {\n this._urlType = \"MediaElement\";\n }\n else if (urlOrArrayBuffer instanceof MediaStream) {\n this._urlType = \"MediaStream\";\n }\n else if (urlOrArrayBuffer instanceof AudioBuffer) {\n this._urlType = \"AudioBuffer\";\n }\n else if (Array.isArray(urlOrArrayBuffer)) {\n this._urlType = \"Array\";\n }\n let urls = [];\n let codecSupportedFound = false;\n switch (this._urlType) {\n case \"MediaElement\":\n this._streaming = true;\n this._isReadyToPlay = true;\n this._streamingSource = AbstractEngine.audioEngine.audioContext.createMediaElementSource(urlOrArrayBuffer);\n if (this.autoplay) {\n this.play(0, this._offset, this._length);\n }\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n break;\n case \"MediaStream\":\n this._streaming = true;\n this._isReadyToPlay = true;\n this._streamingSource = AbstractEngine.audioEngine.audioContext.createMediaStreamSource(urlOrArrayBuffer);\n if (this.autoplay) {\n this.play(0, this._offset, this._length);\n }\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n break;\n case \"ArrayBuffer\":\n if (urlOrArrayBuffer.byteLength > 0) {\n codecSupportedFound = true;\n this._soundLoaded(urlOrArrayBuffer);\n }\n break;\n case \"AudioBuffer\":\n this._audioBufferLoaded(urlOrArrayBuffer);\n break;\n case \"String\":\n urls.push(urlOrArrayBuffer);\n // eslint-disable-next-line no-fallthrough\n case \"Array\":\n if (urls.length === 0) {\n urls = urlOrArrayBuffer;\n }\n // If we found a supported format, we load it immediately and stop the loop\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n codecSupportedFound =\n (options && options.skipCodecCheck) ||\n (url.indexOf(\".mp3\", url.length - 4) !== -1 && AbstractEngine.audioEngine.isMP3supported) ||\n (url.indexOf(\".ogg\", url.length - 4) !== -1 && AbstractEngine.audioEngine.isOGGsupported) ||\n url.indexOf(\".wav\", url.length - 4) !== -1 ||\n url.indexOf(\".m4a\", url.length - 4) !== -1 ||\n url.indexOf(\".mp4\", url.length - 4) !== -1 ||\n url.indexOf(\"blob:\") !== -1;\n if (codecSupportedFound) {\n // Loading sound\n if (!this._streaming) {\n this._scene._loadFile(url, (data) => {\n this._soundLoaded(data);\n }, undefined, true, true, (exception) => {\n if (exception) {\n Logger.Error(\"XHR \" + exception.status + \" error on: \" + url + \".\");\n }\n Logger.Error(\"Sound creation aborted.\");\n this._scene.mainSoundTrack.removeSound(this);\n });\n }\n // Streaming sound using HTML5 Audio tag\n else {\n this._htmlAudioElement = new Audio(url);\n this._htmlAudioElement.controls = false;\n this._htmlAudioElement.loop = this.loop;\n Tools.SetCorsBehavior(url, this._htmlAudioElement);\n this._htmlAudioElement.preload = \"auto\";\n this._htmlAudioElement.addEventListener(\"canplaythrough\", () => {\n this._isReadyToPlay = true;\n if (this.autoplay) {\n this.play(0, this._offset, this._length);\n }\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n }, { once: true });\n document.body.appendChild(this._htmlAudioElement);\n this._htmlAudioElement.load();\n }\n break;\n }\n }\n break;\n default:\n validParameter = false;\n break;\n }\n if (!validParameter) {\n Logger.Error(\"Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.\");\n }\n else {\n if (!codecSupportedFound) {\n this._isReadyToPlay = true;\n // Simulating a ready to play event to avoid breaking code path\n if (this._readyToPlayCallback) {\n setTimeout(() => {\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n }, 1000);\n }\n }\n }\n }\n catch (ex) {\n Logger.Error(\"Unexpected error. Sound creation aborted.\");\n this._scene.mainSoundTrack.removeSound(this);\n }\n }\n }\n else {\n // Adding an empty sound to avoid breaking audio calls for non Web Audio browsers\n this._scene.mainSoundTrack.addSound(this);\n if (AbstractEngine.audioEngine && !AbstractEngine.audioEngine.WarnedWebAudioUnsupported) {\n Logger.Error(\"Web Audio is not supported by your browser.\");\n AbstractEngine.audioEngine.WarnedWebAudioUnsupported = true;\n }\n // Simulating a ready to play event to avoid breaking code for non web audio browsers\n if (this._readyToPlayCallback) {\n setTimeout(() => {\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n }, 1000);\n }\n }\n }\n /**\n * Release the sound and its associated resources\n */\n dispose() {\n if (AbstractEngine.audioEngine?.canUseWebAudio) {\n if (this.isPlaying) {\n this.stop();\n }\n this._isReadyToPlay = false;\n if (this.soundTrackId === -1) {\n this._scene.mainSoundTrack.removeSound(this);\n }\n else if (this._scene.soundTracks) {\n this._scene.soundTracks[this.soundTrackId].removeSound(this);\n }\n if (this._soundGain) {\n this._soundGain.disconnect();\n this._soundGain = null;\n }\n if (this._soundPanner) {\n this._soundPanner.disconnect();\n this._soundPanner = null;\n }\n if (this._soundSource) {\n this._soundSource.disconnect();\n this._soundSource = null;\n }\n this._audioBuffer = null;\n if (this._htmlAudioElement) {\n this._htmlAudioElement.pause();\n this._htmlAudioElement.src = \"\";\n document.body.removeChild(this._htmlAudioElement);\n this._htmlAudioElement = null;\n }\n if (this._streamingSource) {\n this._streamingSource.disconnect();\n this._streamingSource = null;\n }\n if (this._connectedTransformNode && this._registerFunc) {\n this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc);\n this._connectedTransformNode = null;\n }\n this._clearTimeoutsAndObservers();\n }\n }\n /**\n * Gets if the sounds is ready to be played or not.\n * @returns true if ready, otherwise false\n */\n isReady() {\n return this._isReadyToPlay;\n }\n /**\n * Get the current class name.\n * @returns current class name\n */\n getClassName() {\n return \"Sound\";\n }\n _audioBufferLoaded(buffer) {\n if (!AbstractEngine.audioEngine?.audioContext) {\n return;\n }\n this._audioBuffer = buffer;\n this._isReadyToPlay = true;\n if (this.autoplay) {\n this.play(0, this._offset, this._length);\n }\n if (this._readyToPlayCallback) {\n this._readyToPlayCallback();\n }\n }\n _soundLoaded(audioData) {\n if (!AbstractEngine.audioEngine?.audioContext) {\n return;\n }\n AbstractEngine.audioEngine.audioContext.decodeAudioData(audioData, (buffer) => {\n this._audioBufferLoaded(buffer);\n }, (err) => {\n Logger.Error(\"Error while decoding audio data for: \" + this.name + \" / Error: \" + err);\n });\n }\n /**\n * Sets the data of the sound from an audiobuffer\n * @param audioBuffer The audioBuffer containing the data\n */\n setAudioBuffer(audioBuffer) {\n if (AbstractEngine.audioEngine?.canUseWebAudio) {\n this._audioBuffer = audioBuffer;\n this._isReadyToPlay = true;\n }\n }\n /**\n * Updates the current sounds options such as maxdistance, loop...\n * @param options A JSON object containing values named as the object properties\n */\n updateOptions(options) {\n if (options) {\n this.loop = options.loop ?? this.loop;\n this.maxDistance = options.maxDistance ?? this.maxDistance;\n this.useCustomAttenuation = options.useCustomAttenuation ?? this.useCustomAttenuation;\n this.rolloffFactor = options.rolloffFactor ?? this.rolloffFactor;\n this.refDistance = options.refDistance ?? this.refDistance;\n this.distanceModel = options.distanceModel ?? this.distanceModel;\n this._playbackRate = options.playbackRate ?? this._playbackRate;\n this._length = options.length ?? undefined;\n this.spatialSound = options.spatialSound ?? this._spatialSound;\n this._setOffset(options.offset ?? undefined);\n this.setVolume(options.volume ?? this._volume);\n this._updateSpatialParameters();\n if (this.isPlaying) {\n if (this._streaming && this._htmlAudioElement) {\n this._htmlAudioElement.playbackRate = this._playbackRate;\n if (this._htmlAudioElement.loop !== this.loop) {\n this._htmlAudioElement.loop = this.loop;\n }\n }\n else {\n if (this._soundSource) {\n this._soundSource.playbackRate.value = this._playbackRate;\n if (this._soundSource.loop !== this.loop) {\n this._soundSource.loop = this.loop;\n }\n if (this._offset !== undefined && this._soundSource.loopStart !== this._offset) {\n this._soundSource.loopStart = this._offset;\n }\n if (this._length !== undefined && this._length !== this._soundSource.loopEnd) {\n this._soundSource.loopEnd = (this._offset | 0) + this._length;\n }\n }\n }\n }\n }\n }\n _createSpatialParameters() {\n if (AbstractEngine.audioEngine?.canUseWebAudio && AbstractEngine.audioEngine.audioContext) {\n if (this._scene.headphone) {\n this._panningModel = \"HRTF\";\n }\n this._soundPanner = this._soundPanner ?? AbstractEngine.audioEngine.audioContext.createPanner();\n if (this._soundPanner && this._outputAudioNode) {\n this._updateSpatialParameters();\n this._soundPanner.connect(this._outputAudioNode);\n this._inputAudioNode = this._soundPanner;\n }\n }\n }\n _disableSpatialSound() {\n if (!this._spatialSound) {\n return;\n }\n this._inputAudioNode = this._soundGain;\n this._soundPanner?.disconnect();\n this._soundPanner = null;\n this._spatialSound = false;\n }\n _updateSpatialParameters() {\n if (!this._spatialSound) {\n return;\n }\n if (this._soundPanner) {\n if (this.useCustomAttenuation) {\n // Tricks to disable in a way embedded Web Audio attenuation\n this._soundPanner.distanceModel = \"linear\";\n this._soundPanner.maxDistance = Number.MAX_VALUE;\n this._soundPanner.refDistance = 1;\n this._soundPanner.rolloffFactor = 1;\n this._soundPanner.panningModel = this._panningModel;\n }\n else {\n this._soundPanner.distanceModel = this.distanceModel;\n this._soundPanner.maxDistance = this.maxDistance;\n this._soundPanner.refDistance = this.refDistance;\n this._soundPanner.rolloffFactor = this.rolloffFactor;\n this._soundPanner.panningModel = this._panningModel;\n }\n }\n else {\n this._createSpatialParameters();\n }\n }\n /**\n * Switch the panning model to HRTF:\n * Renders a stereo output of higher quality than equalpower — it uses a convolution with measured impulse responses from human subjects.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n switchPanningModelToHRTF() {\n this._panningModel = \"HRTF\";\n this._switchPanningModel();\n }\n /**\n * Switch the panning model to Equal Power:\n * Represents the equal-power panning algorithm, generally regarded as simple and efficient. equalpower is the default value.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n switchPanningModelToEqualPower() {\n this._panningModel = \"equalpower\";\n this._switchPanningModel();\n }\n _switchPanningModel() {\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._spatialSound && this._soundPanner) {\n this._soundPanner.panningModel = this._panningModel;\n }\n }\n /**\n * Connect this sound to a sound track audio node like gain...\n * @param soundTrackAudioNode the sound track audio node to connect to\n */\n connectToSoundTrackAudioNode(soundTrackAudioNode) {\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._outputAudioNode) {\n if (this._isOutputConnected) {\n this._outputAudioNode.disconnect();\n }\n this._outputAudioNode.connect(soundTrackAudioNode);\n this._isOutputConnected = true;\n }\n }\n /**\n * Transform this sound into a directional source\n * @param coneInnerAngle Size of the inner cone in degree\n * @param coneOuterAngle Size of the outer cone in degree\n * @param coneOuterGain Volume of the sound outside the outer cone (between 0.0 and 1.0)\n */\n setDirectionalCone(coneInnerAngle, coneOuterAngle, coneOuterGain) {\n if (coneOuterAngle < coneInnerAngle) {\n Logger.Error(\"setDirectionalCone(): outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneInnerAngle = coneInnerAngle;\n this._coneOuterAngle = coneOuterAngle;\n this._coneOuterGain = coneOuterGain;\n this._isDirectional = true;\n if (this.isPlaying && this.loop) {\n this.stop();\n this.play(0, this._offset, this._length);\n }\n }\n /**\n * Gets or sets the inner angle for the directional cone.\n */\n get directionalConeInnerAngle() {\n return this._coneInnerAngle;\n }\n /**\n * Gets or sets the inner angle for the directional cone.\n */\n set directionalConeInnerAngle(value) {\n if (value != this._coneInnerAngle) {\n if (this._coneOuterAngle < value) {\n Logger.Error(\"directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneInnerAngle = value;\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._spatialSound && this._soundPanner) {\n this._soundPanner.coneInnerAngle = this._coneInnerAngle;\n }\n }\n }\n /**\n * Gets or sets the outer angle for the directional cone.\n */\n get directionalConeOuterAngle() {\n return this._coneOuterAngle;\n }\n /**\n * Gets or sets the outer angle for the directional cone.\n */\n set directionalConeOuterAngle(value) {\n if (value != this._coneOuterAngle) {\n if (value < this._coneInnerAngle) {\n Logger.Error(\"directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneOuterAngle = value;\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._spatialSound && this._soundPanner) {\n this._soundPanner.coneOuterAngle = this._coneOuterAngle;\n }\n }\n }\n /**\n * Sets the position of the emitter if spatial sound is enabled\n * @param newPosition Defines the new position\n */\n setPosition(newPosition) {\n if (newPosition.equals(this._position)) {\n return;\n }\n this._position.copyFrom(newPosition);\n if (AbstractEngine.audioEngine?.canUseWebAudio &&\n this._spatialSound &&\n this._soundPanner &&\n !isNaN(this._position.x) &&\n !isNaN(this._position.y) &&\n !isNaN(this._position.z)) {\n this._soundPanner.positionX.value = this._position.x;\n this._soundPanner.positionY.value = this._position.y;\n this._soundPanner.positionZ.value = this._position.z;\n }\n }\n /**\n * Sets the local direction of the emitter if spatial sound is enabled\n * @param newLocalDirection Defines the new local direction\n */\n setLocalDirectionToMesh(newLocalDirection) {\n this._localDirection = newLocalDirection;\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._connectedTransformNode && this.isPlaying) {\n this._updateDirection();\n }\n }\n _updateDirection() {\n if (!this._connectedTransformNode || !this._soundPanner) {\n return;\n }\n const mat = this._connectedTransformNode.getWorldMatrix();\n const direction = Vector3.TransformNormal(this._localDirection, mat);\n direction.normalize();\n this._soundPanner.orientationX.value = direction.x;\n this._soundPanner.orientationY.value = direction.y;\n this._soundPanner.orientationZ.value = direction.z;\n }\n /** @internal */\n updateDistanceFromListener() {\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._connectedTransformNode && this.useCustomAttenuation && this._soundGain && this._scene.activeCamera) {\n const distance = this._scene.audioListenerPositionProvider\n ? this._connectedTransformNode.position.subtract(this._scene.audioListenerPositionProvider()).length()\n : this._connectedTransformNode.getDistanceToCamera(this._scene.activeCamera);\n this._soundGain.gain.value = this._customAttenuationFunction(this._volume, distance, this.maxDistance, this.refDistance, this.rolloffFactor);\n }\n }\n /**\n * Sets a new custom attenuation function for the sound.\n * @param callback Defines the function used for the attenuation\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-your-own-custom-attenuation-function\n */\n setAttenuationFunction(callback) {\n this._customAttenuationFunction = callback;\n }\n /**\n * Play the sound\n * @param time (optional) Start the sound after X seconds. Start immediately (0) by default.\n * @param offset (optional) Start the sound at a specific time in seconds\n * @param length (optional) Sound duration (in seconds)\n */\n play(time, offset, length) {\n if (this._isReadyToPlay && this._scene.audioEnabled && AbstractEngine.audioEngine?.audioContext) {\n try {\n this._clearTimeoutsAndObservers();\n let startTime = time ? AbstractEngine.audioEngine?.audioContext.currentTime + time : AbstractEngine.audioEngine?.audioContext.currentTime;\n if (!this._soundSource || !this._streamingSource) {\n if (this._spatialSound && this._soundPanner) {\n if (!isNaN(this._position.x) && !isNaN(this._position.y) && !isNaN(this._position.z)) {\n this._soundPanner.positionX.value = this._position.x;\n this._soundPanner.positionY.value = this._position.y;\n this._soundPanner.positionZ.value = this._position.z;\n }\n if (this._isDirectional) {\n this._soundPanner.coneInnerAngle = this._coneInnerAngle;\n this._soundPanner.coneOuterAngle = this._coneOuterAngle;\n this._soundPanner.coneOuterGain = this._coneOuterGain;\n if (this._connectedTransformNode) {\n this._updateDirection();\n }\n else {\n this._soundPanner.setOrientation(this._localDirection.x, this._localDirection.y, this._localDirection.z);\n }\n }\n }\n }\n if (this._streaming) {\n if (!this._streamingSource && this._htmlAudioElement) {\n this._streamingSource = AbstractEngine.audioEngine.audioContext.createMediaElementSource(this._htmlAudioElement);\n this._htmlAudioElement.onended = () => {\n this._onended();\n };\n this._htmlAudioElement.playbackRate = this._playbackRate;\n }\n if (this._streamingSource) {\n this._streamingSource.disconnect();\n if (this._inputAudioNode) {\n this._streamingSource.connect(this._inputAudioNode);\n }\n }\n if (this._htmlAudioElement) {\n // required to manage properly the new suspended default state of Chrome\n // When the option 'streaming: true' is used, we need first to wait for\n // the audio engine to be unlocked by a user gesture before trying to play\n // an HTML Audio element\n const tryToPlay = () => {\n if (AbstractEngine.audioEngine?.unlocked) {\n if (!this._htmlAudioElement) {\n return;\n }\n this._htmlAudioElement.currentTime = offset ?? 0;\n const playPromise = this._htmlAudioElement.play();\n // In browsers that don’t yet support this functionality,\n // playPromise won’t be defined.\n if (playPromise !== undefined) {\n playPromise.catch(() => {\n // Automatic playback failed.\n // Waiting for the audio engine to be unlocked by user click on unmute\n AbstractEngine.audioEngine?.lock();\n if (this.loop || this.autoplay) {\n this._audioUnlockedObserver = AbstractEngine.audioEngine?.onAudioUnlockedObservable.addOnce(() => {\n tryToPlay();\n });\n }\n });\n }\n }\n else {\n if (this.loop || this.autoplay) {\n this._audioUnlockedObserver = AbstractEngine.audioEngine?.onAudioUnlockedObservable.addOnce(() => {\n tryToPlay();\n });\n }\n }\n };\n tryToPlay();\n }\n }\n else {\n const tryToPlay = () => {\n if (AbstractEngine.audioEngine?.audioContext) {\n length = length || this._length;\n if (offset !== undefined) {\n this._setOffset(offset);\n }\n if (this._soundSource) {\n const oldSource = this._soundSource;\n oldSource.onended = () => {\n oldSource.disconnect();\n };\n }\n this._soundSource = AbstractEngine.audioEngine?.audioContext.createBufferSource();\n if (this._soundSource && this._inputAudioNode) {\n this._soundSource.buffer = this._audioBuffer;\n this._soundSource.connect(this._inputAudioNode);\n this._soundSource.loop = this.loop;\n if (offset !== undefined) {\n this._soundSource.loopStart = offset;\n }\n if (length !== undefined) {\n this._soundSource.loopEnd = (offset | 0) + length;\n }\n this._soundSource.playbackRate.value = this._playbackRate;\n this._soundSource.onended = () => {\n this._onended();\n };\n startTime = time ? AbstractEngine.audioEngine?.audioContext.currentTime + time : AbstractEngine.audioEngine.audioContext.currentTime;\n const actualOffset = ((this.isPaused ? this.currentTime : 0) + (this._offset ?? 0)) % this._soundSource.buffer.duration;\n this._soundSource.start(startTime, actualOffset, this.loop ? undefined : length);\n }\n }\n };\n if (AbstractEngine.audioEngine?.audioContext.state === \"suspended\") {\n // Wait a bit for FF as context seems late to be ready.\n this._tryToPlayTimeout = setTimeout(() => {\n if (AbstractEngine.audioEngine?.audioContext.state === \"suspended\") {\n // Automatic playback failed.\n // Waiting for the audio engine to be unlocked by user click on unmute\n AbstractEngine.audioEngine.lock();\n if (this.loop || this.autoplay) {\n this._audioUnlockedObserver = AbstractEngine.audioEngine.onAudioUnlockedObservable.addOnce(() => {\n tryToPlay();\n });\n }\n }\n else {\n tryToPlay();\n }\n }, 500);\n }\n else {\n tryToPlay();\n }\n }\n this._startTime = startTime;\n this.isPlaying = true;\n this.isPaused = false;\n }\n catch (ex) {\n Logger.Error(\"Error while trying to play audio: \" + this.name + \", \" + ex.message);\n }\n }\n }\n _onended() {\n this.isPlaying = false;\n this._startTime = 0;\n this._currentTime = 0;\n if (this.onended) {\n this.onended();\n }\n this.onEndedObservable.notifyObservers(this);\n }\n /**\n * Stop the sound\n * @param time (optional) Stop the sound after X seconds. Stop immediately (0) by default.\n */\n stop(time) {\n if (this.isPlaying) {\n this._clearTimeoutsAndObservers();\n if (this._streaming) {\n if (this._htmlAudioElement) {\n this._htmlAudioElement.pause();\n // Test needed for Firefox or it will generate an Invalid State Error\n if (this._htmlAudioElement.currentTime > 0) {\n this._htmlAudioElement.currentTime = 0;\n }\n }\n else {\n this._streamingSource?.disconnect();\n }\n this.isPlaying = false;\n }\n else if (AbstractEngine.audioEngine?.audioContext && this._soundSource) {\n const stopTime = time ? AbstractEngine.audioEngine.audioContext.currentTime + time : undefined;\n this._soundSource.onended = () => {\n this.isPlaying = false;\n this.isPaused = false;\n this._startTime = 0;\n this._currentTime = 0;\n if (this._soundSource) {\n this._soundSource.onended = () => void 0;\n }\n this._onended();\n };\n this._soundSource.stop(stopTime);\n }\n else {\n this.isPlaying = false;\n }\n }\n else if (this.isPaused) {\n this.isPaused = false;\n this._startTime = 0;\n this._currentTime = 0;\n }\n }\n /**\n * Put the sound in pause\n */\n pause() {\n if (this.isPlaying) {\n this._clearTimeoutsAndObservers();\n if (this._streaming) {\n if (this._htmlAudioElement) {\n this._htmlAudioElement.pause();\n }\n else {\n this._streamingSource?.disconnect();\n }\n this.isPlaying = false;\n this.isPaused = true;\n }\n else if (AbstractEngine.audioEngine?.audioContext && this._soundSource) {\n this._soundSource.onended = () => void 0;\n this._soundSource.stop();\n this.isPlaying = false;\n this.isPaused = true;\n this._currentTime += AbstractEngine.audioEngine.audioContext.currentTime - this._startTime;\n }\n }\n }\n /**\n * Sets a dedicated volume for this sounds\n * @param newVolume Define the new volume of the sound\n * @param time Define time for gradual change to new volume\n */\n setVolume(newVolume, time) {\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._soundGain) {\n if (time && AbstractEngine.audioEngine.audioContext) {\n this._soundGain.gain.cancelScheduledValues(AbstractEngine.audioEngine.audioContext.currentTime);\n this._soundGain.gain.setValueAtTime(this._soundGain.gain.value, AbstractEngine.audioEngine.audioContext.currentTime);\n this._soundGain.gain.linearRampToValueAtTime(newVolume, AbstractEngine.audioEngine.audioContext.currentTime + time);\n }\n else {\n this._soundGain.gain.value = newVolume;\n }\n }\n this._volume = newVolume;\n }\n /**\n * Set the sound play back rate\n * @param newPlaybackRate Define the playback rate the sound should be played at\n */\n setPlaybackRate(newPlaybackRate) {\n this._playbackRate = newPlaybackRate;\n if (this.isPlaying) {\n if (this._streaming && this._htmlAudioElement) {\n this._htmlAudioElement.playbackRate = this._playbackRate;\n }\n else if (this._soundSource) {\n this._soundSource.playbackRate.value = this._playbackRate;\n }\n }\n }\n /**\n * Gets the sound play back rate.\n * @returns the play back rate of the sound\n */\n getPlaybackRate() {\n return this._playbackRate;\n }\n /**\n * Gets the volume of the sound.\n * @returns the volume of the sound\n */\n getVolume() {\n return this._volume;\n }\n /**\n * Attach the sound to a dedicated mesh\n * @param transformNode The transform node to connect the sound with\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#attaching-a-sound-to-a-mesh\n */\n attachToMesh(transformNode) {\n if (this._connectedTransformNode && this._registerFunc) {\n this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc);\n this._registerFunc = null;\n }\n this._connectedTransformNode = transformNode;\n if (!this._spatialSound) {\n this._spatialSound = true;\n this._createSpatialParameters();\n if (this.isPlaying && this.loop) {\n this.stop();\n this.play(0, this._offset, this._length);\n }\n }\n this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode);\n this._registerFunc = (transformNode) => this._onRegisterAfterWorldMatrixUpdate(transformNode);\n this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc);\n }\n /**\n * Detach the sound from the previously attached mesh\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#attaching-a-sound-to-a-mesh\n */\n detachFromMesh() {\n if (this._connectedTransformNode && this._registerFunc) {\n this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc);\n this._registerFunc = null;\n this._connectedTransformNode = null;\n }\n }\n _onRegisterAfterWorldMatrixUpdate(node) {\n if (!node.getBoundingInfo) {\n this.setPosition(node.absolutePosition);\n }\n else {\n const mesh = node;\n const boundingInfo = mesh.getBoundingInfo();\n this.setPosition(boundingInfo.boundingSphere.centerWorld);\n }\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._isDirectional && this.isPlaying) {\n this._updateDirection();\n }\n }\n /**\n * Clone the current sound in the scene.\n * @returns the new sound clone\n */\n clone() {\n if (!this._streaming) {\n const setBufferAndRun = () => {\n if (this._isReadyToPlay) {\n clonedSound._audioBuffer = this.getAudioBuffer();\n clonedSound._isReadyToPlay = true;\n if (clonedSound.autoplay) {\n clonedSound.play(0, this._offset, this._length);\n }\n }\n else {\n setTimeout(setBufferAndRun, 300);\n }\n };\n const currentOptions = {\n autoplay: this.autoplay,\n loop: this.loop,\n volume: this._volume,\n spatialSound: this._spatialSound,\n maxDistance: this.maxDistance,\n useCustomAttenuation: this.useCustomAttenuation,\n rolloffFactor: this.rolloffFactor,\n refDistance: this.refDistance,\n distanceModel: this.distanceModel,\n };\n const clonedSound = new Sound(this.name + \"_cloned\", new ArrayBuffer(0), this._scene, null, currentOptions);\n if (this.useCustomAttenuation) {\n clonedSound.setAttenuationFunction(this._customAttenuationFunction);\n }\n clonedSound.setPosition(this._position);\n clonedSound.setPlaybackRate(this._playbackRate);\n setBufferAndRun();\n return clonedSound;\n }\n // Can't clone a streaming sound\n else {\n return null;\n }\n }\n /**\n * Gets the current underlying audio buffer containing the data\n * @returns the audio buffer\n */\n getAudioBuffer() {\n return this._audioBuffer;\n }\n /**\n * Gets the WebAudio AudioBufferSourceNode, lets you keep track of and stop instances of this Sound.\n * @returns the source node\n */\n getSoundSource() {\n return this._soundSource;\n }\n /**\n * Gets the WebAudio GainNode, gives you precise control over the gain of instances of this Sound.\n * @returns the gain node\n */\n getSoundGain() {\n return this._soundGain;\n }\n /**\n * Serializes the Sound in a JSON representation\n * @returns the JSON representation of the sound\n */\n serialize() {\n const serializationObject = {\n name: this.name,\n url: this._url,\n autoplay: this.autoplay,\n loop: this.loop,\n volume: this._volume,\n spatialSound: this._spatialSound,\n maxDistance: this.maxDistance,\n rolloffFactor: this.rolloffFactor,\n refDistance: this.refDistance,\n distanceModel: this.distanceModel,\n playbackRate: this._playbackRate,\n panningModel: this._panningModel,\n soundTrackId: this.soundTrackId,\n metadata: this.metadata,\n };\n if (this._spatialSound) {\n if (this._connectedTransformNode) {\n serializationObject.connectedMeshId = this._connectedTransformNode.id;\n }\n serializationObject.position = this._position.asArray();\n serializationObject.refDistance = this.refDistance;\n serializationObject.distanceModel = this.distanceModel;\n serializationObject.isDirectional = this._isDirectional;\n serializationObject.localDirectionToMesh = this._localDirection.asArray();\n serializationObject.coneInnerAngle = this._coneInnerAngle;\n serializationObject.coneOuterAngle = this._coneOuterAngle;\n serializationObject.coneOuterGain = this._coneOuterGain;\n }\n return serializationObject;\n }\n /**\n * Parse a JSON representation of a sound to instantiate in a given scene\n * @param parsedSound Define the JSON representation of the sound (usually coming from the serialize method)\n * @param scene Define the scene the new parsed sound should be created in\n * @param rootUrl Define the rooturl of the load in case we need to fetch relative dependencies\n * @param sourceSound Define a sound place holder if do not need to instantiate a new one\n * @returns the newly parsed sound\n */\n static Parse(parsedSound, scene, rootUrl, sourceSound) {\n const soundName = parsedSound.name;\n let soundUrl;\n if (parsedSound.url) {\n soundUrl = rootUrl + parsedSound.url;\n }\n else {\n soundUrl = rootUrl + soundName;\n }\n const options = {\n autoplay: parsedSound.autoplay,\n loop: parsedSound.loop,\n volume: parsedSound.volume,\n spatialSound: parsedSound.spatialSound,\n maxDistance: parsedSound.maxDistance,\n rolloffFactor: parsedSound.rolloffFactor,\n refDistance: parsedSound.refDistance,\n distanceModel: parsedSound.distanceModel,\n playbackRate: parsedSound.playbackRate,\n };\n let newSound;\n if (!sourceSound) {\n newSound = new Sound(soundName, soundUrl, scene, () => {\n scene.removePendingData(newSound);\n }, options);\n scene.addPendingData(newSound);\n }\n else {\n const setBufferAndRun = () => {\n if (sourceSound._isReadyToPlay) {\n newSound._audioBuffer = sourceSound.getAudioBuffer();\n newSound._isReadyToPlay = true;\n if (newSound.autoplay) {\n newSound.play(0, newSound._offset, newSound._length);\n }\n }\n else {\n setTimeout(setBufferAndRun, 300);\n }\n };\n newSound = new Sound(soundName, new ArrayBuffer(0), scene, null, options);\n setBufferAndRun();\n }\n if (parsedSound.position) {\n const soundPosition = Vector3.FromArray(parsedSound.position);\n newSound.setPosition(soundPosition);\n }\n if (parsedSound.isDirectional) {\n newSound.setDirectionalCone(parsedSound.coneInnerAngle || 360, parsedSound.coneOuterAngle || 360, parsedSound.coneOuterGain || 0);\n if (parsedSound.localDirectionToMesh) {\n const localDirectionToMesh = Vector3.FromArray(parsedSound.localDirectionToMesh);\n newSound.setLocalDirectionToMesh(localDirectionToMesh);\n }\n }\n if (parsedSound.connectedMeshId) {\n const connectedMesh = scene.getMeshById(parsedSound.connectedMeshId);\n if (connectedMesh) {\n newSound.attachToMesh(connectedMesh);\n }\n }\n if (parsedSound.metadata) {\n newSound.metadata = parsedSound.metadata;\n }\n return newSound;\n }\n _setOffset(value) {\n if (this._offset === value) {\n return;\n }\n if (this.isPaused) {\n this.stop();\n this.isPaused = false;\n }\n this._offset = value;\n }\n _clearTimeoutsAndObservers() {\n if (this._tryToPlayTimeout) {\n clearTimeout(this._tryToPlayTimeout);\n this._tryToPlayTimeout = null;\n }\n if (this._audioUnlockedObserver) {\n AbstractEngine.audioEngine?.onAudioUnlockedObservable.remove(this._audioUnlockedObserver);\n this._audioUnlockedObserver = null;\n }\n }\n}\n/**\n * @internal\n */\nSound._SceneComponentInitialization = (_) => {\n throw _WarnImport(\"AudioSceneComponent\");\n};\n// Register Class Name\nRegisterClass(\"BABYLON.Sound\", Sound);\n//# sourceMappingURL=sound.js.map","import { Logger } from \"../Misc/logger\";\n/**\n * Wraps one or more Sound objects and selects one with random weight for playback.\n */\nexport class WeightedSound {\n /**\n * Creates a new WeightedSound from the list of sounds given.\n * @param loop When true a Sound will be selected and played when the current playing Sound completes.\n * @param sounds Array of Sounds that will be selected from.\n * @param weights Array of number values for selection weights; length must equal sounds, values will be normalized to 1\n */\n constructor(loop, sounds, weights) {\n /** When true a Sound will be selected and played when the current playing Sound completes. */\n this.loop = false;\n this._coneInnerAngle = 360;\n this._coneOuterAngle = 360;\n this._volume = 1;\n /** A Sound is currently playing. */\n this.isPlaying = false;\n /** A Sound is currently paused. */\n this.isPaused = false;\n this._sounds = [];\n this._weights = [];\n if (sounds.length !== weights.length) {\n throw new Error(\"Sounds length does not equal weights length\");\n }\n this.loop = loop;\n this._weights = weights;\n // Normalize the weights\n let weightSum = 0;\n for (const weight of weights) {\n weightSum += weight;\n }\n const invWeightSum = weightSum > 0 ? 1 / weightSum : 0;\n for (let i = 0; i < this._weights.length; i++) {\n this._weights[i] *= invWeightSum;\n }\n this._sounds = sounds;\n for (const sound of this._sounds) {\n sound.onEndedObservable.add(() => {\n this._onended();\n });\n }\n }\n /**\n * The size of cone in degrees for a directional sound in which there will be no attenuation.\n */\n get directionalConeInnerAngle() {\n return this._coneInnerAngle;\n }\n /**\n * The size of cone in degrees for a directional sound in which there will be no attenuation.\n */\n set directionalConeInnerAngle(value) {\n if (value !== this._coneInnerAngle) {\n if (this._coneOuterAngle < value) {\n Logger.Error(\"directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneInnerAngle = value;\n for (const sound of this._sounds) {\n sound.directionalConeInnerAngle = value;\n }\n }\n }\n /**\n * Size of cone in degrees for a directional sound outside of which there will be no sound.\n * Listener angles between innerAngle and outerAngle will falloff linearly.\n */\n get directionalConeOuterAngle() {\n return this._coneOuterAngle;\n }\n /**\n * Size of cone in degrees for a directional sound outside of which there will be no sound.\n * Listener angles between innerAngle and outerAngle will falloff linearly.\n */\n set directionalConeOuterAngle(value) {\n if (value !== this._coneOuterAngle) {\n if (value < this._coneInnerAngle) {\n Logger.Error(\"directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.\");\n return;\n }\n this._coneOuterAngle = value;\n for (const sound of this._sounds) {\n sound.directionalConeOuterAngle = value;\n }\n }\n }\n /**\n * Playback volume.\n */\n get volume() {\n return this._volume;\n }\n /**\n * Playback volume.\n */\n set volume(value) {\n if (value !== this._volume) {\n for (const sound of this._sounds) {\n sound.setVolume(value);\n }\n }\n }\n _onended() {\n if (this._currentIndex !== undefined) {\n this._sounds[this._currentIndex].autoplay = false;\n }\n if (this.loop && this.isPlaying) {\n this.play();\n }\n else {\n this.isPlaying = false;\n }\n }\n /**\n * Suspend playback\n */\n pause() {\n if (this.isPlaying) {\n this.isPaused = true;\n if (this._currentIndex !== undefined) {\n this._sounds[this._currentIndex].pause();\n }\n }\n }\n /**\n * Stop playback\n */\n stop() {\n this.isPlaying = false;\n if (this._currentIndex !== undefined) {\n this._sounds[this._currentIndex].stop();\n }\n }\n /**\n * Start playback.\n * @param startOffset Position the clip head at a specific time in seconds.\n */\n play(startOffset) {\n if (!this.isPaused) {\n this.stop();\n const randomValue = Math.random();\n let total = 0;\n for (let i = 0; i < this._weights.length; i++) {\n total += this._weights[i];\n if (randomValue <= total) {\n this._currentIndex = i;\n break;\n }\n }\n }\n const sound = this._sounds[this._currentIndex ?? 0];\n if (sound.isReady()) {\n sound.play(0, this.isPaused ? undefined : startOffset);\n }\n else {\n sound.autoplay = true;\n }\n this.isPlaying = true;\n this.isPaused = false;\n }\n}\n//# sourceMappingURL=weightedsound.js.map","import { EngineStore } from \"../Engines/engineStore\";\nimport { AbstractEngine } from \"core/Engines/abstractEngine\";\n/**\n * It could be useful to isolate your music & sounds on several tracks to better manage volume on a grouped instance of sounds.\n * It will be also used in a future release to apply effects on a specific track.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#using-sound-tracks\n */\nexport class SoundTrack {\n /**\n * Creates a new sound track.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#using-sound-tracks\n * @param scene Define the scene the sound track belongs to\n * @param options\n */\n constructor(scene, options = {}) {\n /**\n * The unique identifier of the sound track in the scene.\n */\n this.id = -1;\n this._isInitialized = false;\n scene = scene || EngineStore.LastCreatedScene;\n if (!scene) {\n return;\n }\n this._scene = scene;\n this.soundCollection = [];\n this._options = options;\n if (!this._options.mainTrack && this._scene.soundTracks) {\n this._scene.soundTracks.push(this);\n this.id = this._scene.soundTracks.length - 1;\n }\n }\n _initializeSoundTrackAudioGraph() {\n if (AbstractEngine.audioEngine?.canUseWebAudio && AbstractEngine.audioEngine.audioContext) {\n this._outputAudioNode = AbstractEngine.audioEngine.audioContext.createGain();\n this._outputAudioNode.connect(AbstractEngine.audioEngine.masterGain);\n if (this._options) {\n if (this._options.volume) {\n this._outputAudioNode.gain.value = this._options.volume;\n }\n }\n this._isInitialized = true;\n }\n }\n /**\n * Release the sound track and its associated resources\n */\n dispose() {\n if (AbstractEngine.audioEngine && AbstractEngine.audioEngine.canUseWebAudio) {\n if (this._connectedAnalyser) {\n this._connectedAnalyser.stopDebugCanvas();\n }\n while (this.soundCollection.length) {\n this.soundCollection[0].dispose();\n }\n if (this._outputAudioNode) {\n this._outputAudioNode.disconnect();\n }\n this._outputAudioNode = null;\n }\n }\n /**\n * Adds a sound to this sound track\n * @param sound define the sound to add\n * @ignoreNaming\n */\n addSound(sound) {\n if (!this._isInitialized) {\n this._initializeSoundTrackAudioGraph();\n }\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._outputAudioNode) {\n sound.connectToSoundTrackAudioNode(this._outputAudioNode);\n }\n if (sound.soundTrackId !== undefined) {\n if (sound.soundTrackId === -1) {\n this._scene.mainSoundTrack.removeSound(sound);\n }\n else if (this._scene.soundTracks) {\n this._scene.soundTracks[sound.soundTrackId].removeSound(sound);\n }\n }\n this.soundCollection.push(sound);\n sound.soundTrackId = this.id;\n }\n /**\n * Removes a sound to this sound track\n * @param sound define the sound to remove\n * @ignoreNaming\n */\n removeSound(sound) {\n const index = this.soundCollection.indexOf(sound);\n if (index !== -1) {\n this.soundCollection.splice(index, 1);\n }\n }\n /**\n * Set a global volume for the full sound track.\n * @param newVolume Define the new volume of the sound track\n */\n setVolume(newVolume) {\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._outputAudioNode) {\n this._outputAudioNode.gain.value = newVolume;\n }\n }\n /**\n * Switch the panning model to HRTF:\n * Renders a stereo output of higher quality than equalpower — it uses a convolution with measured impulse responses from human subjects.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n switchPanningModelToHRTF() {\n if (AbstractEngine.audioEngine?.canUseWebAudio) {\n for (let i = 0; i < this.soundCollection.length; i++) {\n this.soundCollection[i].switchPanningModelToHRTF();\n }\n }\n }\n /**\n * Switch the panning model to Equal Power:\n * Represents the equal-power panning algorithm, generally regarded as simple and efficient. equalpower is the default value.\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#creating-a-spatial-3d-sound\n */\n switchPanningModelToEqualPower() {\n if (AbstractEngine.audioEngine?.canUseWebAudio) {\n for (let i = 0; i < this.soundCollection.length; i++) {\n this.soundCollection[i].switchPanningModelToEqualPower();\n }\n }\n }\n /**\n * Connect the sound track to an audio analyser allowing some amazing\n * synchronization between the sounds/music and your visualization (VuMeter for instance).\n * @see https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic#using-the-analyser\n * @param analyser The analyser to connect to the engine\n */\n connectToAnalyser(analyser) {\n if (this._connectedAnalyser) {\n this._connectedAnalyser.stopDebugCanvas();\n }\n this._connectedAnalyser = analyser;\n if (AbstractEngine.audioEngine?.canUseWebAudio && this._outputAudioNode) {\n this._outputAudioNode.disconnect();\n this._connectedAnalyser.connectAudioNodes(this._outputAudioNode, AbstractEngine.audioEngine.masterGain);\n }\n }\n}\n//# sourceMappingURL=soundTrack.js.map","import { Sound } from \"./sound\";\nimport { SoundTrack } from \"./soundTrack\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector\";\nimport { SceneComponentConstants } from \"../sceneComponent\";\nimport { Scene } from \"../scene\";\nimport \"./audioEngine\";\nimport { PrecisionDate } from \"../Misc/precisionDate\";\nimport { EngineStore } from \"../Engines/engineStore\";\nimport { AbstractEngine } from \"core/Engines/abstractEngine\";\nimport { AddParser } from \"core/Loading/Plugins/babylonFileParser.function\";\n// Adds the parser to the scene parsers.\nAddParser(SceneComponentConstants.NAME_AUDIO, (parsedData, scene, container, rootUrl) => {\n // TODO: add sound\n let loadedSounds = [];\n let loadedSound;\n container.sounds = container.sounds || [];\n if (parsedData.sounds !== undefined && parsedData.sounds !== null) {\n for (let index = 0, cache = parsedData.sounds.length; index < cache; index++) {\n const parsedSound = parsedData.sounds[index];\n if (AbstractEngine.audioEngine?.canUseWebAudio) {\n if (!parsedSound.url) {\n parsedSound.url = parsedSound.name;\n }\n if (!loadedSounds[parsedSound.url]) {\n loadedSound = Sound.Parse(parsedSound, scene, rootUrl);\n loadedSounds[parsedSound.url] = loadedSound;\n container.sounds.push(loadedSound);\n }\n else {\n container.sounds.push(Sound.Parse(parsedSound, scene, rootUrl, loadedSounds[parsedSound.url]));\n }\n }\n else {\n container.sounds.push(new Sound(parsedSound.name, null, scene));\n }\n }\n }\n loadedSounds = [];\n});\nObject.defineProperty(Scene.prototype, \"mainSoundTrack\", {\n get: function () {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n if (!this._mainSoundTrack) {\n this._mainSoundTrack = new SoundTrack(this, { mainTrack: true });\n }\n return this._mainSoundTrack;\n },\n enumerable: true,\n configurable: true,\n});\nScene.prototype.getSoundByName = function (name) {\n let index;\n for (index = 0; index < this.mainSoundTrack.soundCollection.length; index++) {\n if (this.mainSoundTrack.soundCollection[index].name === name) {\n return this.mainSoundTrack.soundCollection[index];\n }\n }\n if (this.soundTracks) {\n for (let sdIndex = 0; sdIndex < this.soundTracks.length; sdIndex++) {\n for (index = 0; index < this.soundTracks[sdIndex].soundCollection.length; index++) {\n if (this.soundTracks[sdIndex].soundCollection[index].name === name) {\n return this.soundTracks[sdIndex].soundCollection[index];\n }\n }\n }\n }\n return null;\n};\nObject.defineProperty(Scene.prototype, \"audioEnabled\", {\n get: function () {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n return compo.audioEnabled;\n },\n set: function (value) {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n if (value) {\n compo.enableAudio();\n }\n else {\n compo.disableAudio();\n }\n },\n enumerable: true,\n configurable: true,\n});\nObject.defineProperty(Scene.prototype, \"headphone\", {\n get: function () {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n return compo.headphone;\n },\n set: function (value) {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n if (value) {\n compo.switchAudioModeForHeadphones();\n }\n else {\n compo.switchAudioModeForNormalSpeakers();\n }\n },\n enumerable: true,\n configurable: true,\n});\nObject.defineProperty(Scene.prototype, \"audioListenerPositionProvider\", {\n get: function () {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n return compo.audioListenerPositionProvider;\n },\n set: function (value) {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n if (value && typeof value !== \"function\") {\n throw new Error(\"The value passed to [Scene.audioListenerPositionProvider] must be a function that returns a Vector3\");\n }\n else {\n compo.audioListenerPositionProvider = value;\n }\n },\n enumerable: true,\n configurable: true,\n});\nObject.defineProperty(Scene.prototype, \"audioListenerRotationProvider\", {\n get: function () {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n return compo.audioListenerRotationProvider;\n },\n set: function (value) {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n if (value && typeof value !== \"function\") {\n throw new Error(\"The value passed to [Scene.audioListenerRotationProvider] must be a function that returns a Vector3\");\n }\n else {\n compo.audioListenerRotationProvider = value;\n }\n },\n enumerable: true,\n configurable: true,\n});\nObject.defineProperty(Scene.prototype, \"audioPositioningRefreshRate\", {\n get: function () {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n return compo.audioPositioningRefreshRate;\n },\n set: function (value) {\n let compo = this._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(this);\n this._addComponent(compo);\n }\n compo.audioPositioningRefreshRate = value;\n },\n enumerable: true,\n configurable: true,\n});\n/**\n * Defines the sound scene component responsible to manage any sounds\n * in a given scene.\n */\nexport class AudioSceneComponent {\n /**\n * Gets whether audio is enabled or not.\n * Please use related enable/disable method to switch state.\n */\n get audioEnabled() {\n return this._audioEnabled;\n }\n /**\n * Gets whether audio is outputting to headphone or not.\n * Please use the according Switch methods to change output.\n */\n get headphone() {\n return this._headphone;\n }\n /**\n * Creates a new instance of the component for the given scene\n * @param scene Defines the scene to register the component in\n */\n constructor(scene) {\n /**\n * The component name helpful to identify the component in the list of scene components.\n */\n this.name = SceneComponentConstants.NAME_AUDIO;\n this._audioEnabled = true;\n this._headphone = false;\n /**\n * Gets or sets a refresh rate when using 3D audio positioning\n */\n this.audioPositioningRefreshRate = 500;\n /**\n * Gets or Sets a custom listener position for all sounds in the scene\n * By default, this is the position of the first active camera\n */\n this.audioListenerPositionProvider = null;\n /**\n * Gets or Sets a custom listener rotation for all sounds in the scene\n * By default, this is the rotation of the first active camera\n */\n this.audioListenerRotationProvider = null;\n this._cachedCameraDirection = new Vector3();\n this._cachedCameraPosition = new Vector3();\n this._lastCheck = 0;\n this._invertMatrixTemp = new Matrix();\n this._cameraDirectionTemp = new Vector3();\n scene = scene || EngineStore.LastCreatedScene;\n if (!scene) {\n return;\n }\n this.scene = scene;\n scene.soundTracks = [];\n scene.sounds = [];\n }\n /**\n * Registers the component in a given scene\n */\n register() {\n this.scene._afterRenderStage.registerStep(SceneComponentConstants.STEP_AFTERRENDER_AUDIO, this, this._afterRender);\n }\n /**\n * Rebuilds the elements related to this component in case of\n * context lost for instance.\n */\n rebuild() {\n // Nothing to do here. (Not rendering related)\n }\n /**\n * Serializes the component data to the specified json object\n * @param serializationObject The object to serialize to\n */\n serialize(serializationObject) {\n serializationObject.sounds = [];\n if (this.scene.soundTracks) {\n for (let index = 0; index < this.scene.soundTracks.length; index++) {\n const soundtrack = this.scene.soundTracks[index];\n for (let soundId = 0; soundId < soundtrack.soundCollection.length; soundId++) {\n serializationObject.sounds.push(soundtrack.soundCollection[soundId].serialize());\n }\n }\n }\n }\n /**\n * Adds all the elements from the container to the scene\n * @param container the container holding the elements\n */\n addFromContainer(container) {\n if (!container.sounds) {\n return;\n }\n container.sounds.forEach((sound) => {\n sound.play();\n sound.autoplay = true;\n this.scene.mainSoundTrack.addSound(sound);\n });\n }\n /**\n * Removes all the elements in the container from the scene\n * @param container contains the elements to remove\n * @param dispose if the removed element should be disposed (default: false)\n */\n removeFromContainer(container, dispose = false) {\n if (!container.sounds) {\n return;\n }\n container.sounds.forEach((sound) => {\n sound.stop();\n sound.autoplay = false;\n this.scene.mainSoundTrack.removeSound(sound);\n if (dispose) {\n sound.dispose();\n }\n });\n }\n /**\n * Disposes the component and the associated resources.\n */\n dispose() {\n const scene = this.scene;\n if (scene._mainSoundTrack) {\n scene.mainSoundTrack.dispose();\n }\n if (scene.soundTracks) {\n for (let scIndex = 0; scIndex < scene.soundTracks.length; scIndex++) {\n scene.soundTracks[scIndex].dispose();\n }\n }\n }\n /**\n * Disables audio in the associated scene.\n */\n disableAudio() {\n const scene = this.scene;\n this._audioEnabled = false;\n if (AbstractEngine.audioEngine && AbstractEngine.audioEngine.audioContext) {\n AbstractEngine.audioEngine.audioContext.suspend();\n }\n let i;\n for (i = 0; i < scene.mainSoundTrack.soundCollection.length; i++) {\n scene.mainSoundTrack.soundCollection[i].pause();\n }\n if (scene.soundTracks) {\n for (i = 0; i < scene.soundTracks.length; i++) {\n for (let j = 0; j < scene.soundTracks[i].soundCollection.length; j++) {\n scene.soundTracks[i].soundCollection[j].pause();\n }\n }\n }\n }\n /**\n * Enables audio in the associated scene.\n */\n enableAudio() {\n const scene = this.scene;\n this._audioEnabled = true;\n if (AbstractEngine.audioEngine && AbstractEngine.audioEngine.audioContext) {\n AbstractEngine.audioEngine.audioContext.resume();\n }\n let i;\n for (i = 0; i < scene.mainSoundTrack.soundCollection.length; i++) {\n if (scene.mainSoundTrack.soundCollection[i].isPaused) {\n scene.mainSoundTrack.soundCollection[i].play();\n }\n }\n if (scene.soundTracks) {\n for (i = 0; i < scene.soundTracks.length; i++) {\n for (let j = 0; j < scene.soundTracks[i].soundCollection.length; j++) {\n if (scene.soundTracks[i].soundCollection[j].isPaused) {\n scene.soundTracks[i].soundCollection[j].play();\n }\n }\n }\n }\n }\n /**\n * Switch audio to headphone output.\n */\n switchAudioModeForHeadphones() {\n const scene = this.scene;\n this._headphone = true;\n scene.mainSoundTrack.switchPanningModelToHRTF();\n if (scene.soundTracks) {\n for (let i = 0; i < scene.soundTracks.length; i++) {\n scene.soundTracks[i].switchPanningModelToHRTF();\n }\n }\n }\n /**\n * Switch audio to normal speakers.\n */\n switchAudioModeForNormalSpeakers() {\n const scene = this.scene;\n this._headphone = false;\n scene.mainSoundTrack.switchPanningModelToEqualPower();\n if (scene.soundTracks) {\n for (let i = 0; i < scene.soundTracks.length; i++) {\n scene.soundTracks[i].switchPanningModelToEqualPower();\n }\n }\n }\n _afterRender() {\n const now = PrecisionDate.Now;\n if (this._lastCheck && now - this._lastCheck < this.audioPositioningRefreshRate) {\n return;\n }\n this._lastCheck = now;\n const scene = this.scene;\n if (!this._audioEnabled || !scene._mainSoundTrack || !scene.soundTracks || (scene._mainSoundTrack.soundCollection.length === 0 && scene.soundTracks.length === 1)) {\n return;\n }\n const audioEngine = AbstractEngine.audioEngine;\n if (!audioEngine) {\n return;\n }\n if (audioEngine.audioContext) {\n let listeningCamera = scene.activeCamera;\n if (scene.activeCameras && scene.activeCameras.length > 0) {\n listeningCamera = scene.activeCameras[0];\n }\n // A custom listener position provider was set\n // Use the users provided position instead of camera's\n if (this.audioListenerPositionProvider) {\n const position = this.audioListenerPositionProvider();\n // Set the listener position\n audioEngine.audioContext.listener.setPosition(position.x || 0, position.y || 0, position.z || 0);\n // Check if there is a listening camera\n }\n else if (listeningCamera) {\n // Set the listener position to the listening camera global position\n if (!this._cachedCameraPosition.equals(listeningCamera.globalPosition)) {\n this._cachedCameraPosition.copyFrom(listeningCamera.globalPosition);\n audioEngine.audioContext.listener.setPosition(listeningCamera.globalPosition.x, listeningCamera.globalPosition.y, listeningCamera.globalPosition.z);\n }\n }\n // Otherwise set the listener position to 0, 0 ,0\n else {\n // Set the listener position\n audioEngine.audioContext.listener.setPosition(0, 0, 0);\n }\n // A custom listener rotation provider was set\n // Use the users provided rotation instead of camera's\n if (this.audioListenerRotationProvider) {\n const rotation = this.audioListenerRotationProvider();\n audioEngine.audioContext.listener.setOrientation(rotation.x || 0, rotation.y || 0, rotation.z || 0, 0, 1, 0);\n // Check if there is a listening camera\n }\n else if (listeningCamera) {\n // for VR cameras\n if (listeningCamera.rigCameras && listeningCamera.rigCameras.length > 0) {\n listeningCamera = listeningCamera.rigCameras[0];\n }\n listeningCamera.getViewMatrix().invertToRef(this._invertMatrixTemp);\n Vector3.TransformNormalToRef(AudioSceneComponent._CameraDirection, this._invertMatrixTemp, this._cameraDirectionTemp);\n this._cameraDirectionTemp.normalize();\n // To avoid some errors on GearVR\n if (!isNaN(this._cameraDirectionTemp.x) && !isNaN(this._cameraDirectionTemp.y) && !isNaN(this._cameraDirectionTemp.z)) {\n if (!this._cachedCameraDirection.equals(this._cameraDirectionTemp)) {\n this._cachedCameraDirection.copyFrom(this._cameraDirectionTemp);\n audioEngine.audioContext.listener.setOrientation(this._cameraDirectionTemp.x, this._cameraDirectionTemp.y, this._cameraDirectionTemp.z, 0, 1, 0);\n }\n }\n }\n // Otherwise set the listener rotation to 0, 0 ,0\n else {\n // Set the listener position\n audioEngine.audioContext.listener.setOrientation(0, 0, 0, 0, 1, 0);\n }\n let i;\n for (i = 0; i < scene.mainSoundTrack.soundCollection.length; i++) {\n const sound = scene.mainSoundTrack.soundCollection[i];\n if (sound.useCustomAttenuation) {\n sound.updateDistanceFromListener();\n }\n }\n if (scene.soundTracks) {\n for (i = 0; i < scene.soundTracks.length; i++) {\n for (let j = 0; j < scene.soundTracks[i].soundCollection.length; j++) {\n const sound = scene.soundTracks[i].soundCollection[j];\n if (sound.useCustomAttenuation) {\n sound.updateDistanceFromListener();\n }\n }\n }\n }\n }\n }\n}\nAudioSceneComponent._CameraDirection = new Vector3(0, 0, -1);\nSound._SceneComponentInitialization = (scene) => {\n let compo = scene._getComponent(SceneComponentConstants.NAME_AUDIO);\n if (!compo) {\n compo = new AudioSceneComponent(scene);\n scene._addComponent(compo);\n }\n};\n//# sourceMappingURL=audioSceneComponent.js.map","import { Vector3 } from \"core/Maths/math.vector\";\nimport { Tools } from \"core/Misc/tools\";\nimport { AnimationEvent } from \"core/Animations/animationEvent\";\nimport { Sound } from \"core/Audio/sound\";\nimport { WeightedSound } from \"core/Audio/weightedsound\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nimport \"core/Audio/audioSceneComponent\";\nconst NAME = \"MSFT_audio_emitter\";\n/**\n * [Specification](https://github.com/najadojo/glTF/blob/MSFT_audio_emitter/extensions/2.0/Vendor/MSFT_audio_emitter/README.md)\n * !!! Experimental Extension Subject to Changes !!!\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class MSFT_audio_emitter {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\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 this._clips = null;\n this._emitters = null;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._clips = extension.clips;\n this._emitters = extension.emitters;\n ArrayItem.Assign(this._clips);\n ArrayItem.Assign(this._emitters);\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadSceneAsync(context, scene));\n for (const emitterIndex of extension.emitters) {\n const emitter = ArrayItem.Get(`${extensionContext}/emitters`, this._emitters, emitterIndex);\n if (emitter.refDistance != undefined ||\n emitter.maxDistance != undefined ||\n emitter.rolloffFactor != undefined ||\n emitter.distanceModel != undefined ||\n emitter.innerAngle != undefined ||\n emitter.outerAngle != undefined) {\n throw new Error(`${extensionContext}: Direction or Distance properties are not allowed on emitters attached to a scene`);\n }\n promises.push(this._loadEmitterAsync(`${extensionContext}/emitters/${emitter.index}`, emitter));\n }\n return Promise.all(promises).then(() => { });\n });\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n const promises = new Array();\n return this._loader\n .loadNodeAsync(extensionContext, node, (babylonMesh) => {\n for (const emitterIndex of extension.emitters) {\n const emitter = ArrayItem.Get(`${extensionContext}/emitters`, this._emitters, emitterIndex);\n promises.push(this._loadEmitterAsync(`${extensionContext}/emitters/${emitter.index}`, emitter).then(() => {\n for (const sound of emitter._babylonSounds) {\n sound.attachToMesh(babylonMesh);\n if (emitter.innerAngle != undefined || emitter.outerAngle != undefined) {\n sound.setLocalDirectionToMesh(Vector3.Forward());\n sound.setDirectionalCone(2 * Tools.ToDegrees(emitter.innerAngle == undefined ? Math.PI : emitter.innerAngle), 2 * Tools.ToDegrees(emitter.outerAngle == undefined ? Math.PI : emitter.outerAngle), 0);\n }\n }\n }));\n }\n assign(babylonMesh);\n })\n .then((babylonMesh) => {\n return Promise.all(promises).then(() => {\n return babylonMesh;\n });\n });\n });\n }\n /**\n * @internal\n */\n loadAnimationAsync(context, animation) {\n return GLTFLoader.LoadExtensionAsync(context, animation, this.name, (extensionContext, extension) => {\n return this._loader.loadAnimationAsync(context, animation).then((babylonAnimationGroup) => {\n const promises = new Array();\n ArrayItem.Assign(extension.events);\n for (const event of extension.events) {\n promises.push(this._loadAnimationEventAsync(`${extensionContext}/events/${event.index}`, context, animation, event, babylonAnimationGroup));\n }\n return Promise.all(promises).then(() => {\n return babylonAnimationGroup;\n });\n });\n });\n }\n _loadClipAsync(context, clip) {\n if (clip._objectURL) {\n return clip._objectURL;\n }\n let promise;\n if (clip.uri) {\n promise = this._loader.loadUriAsync(context, clip, clip.uri);\n }\n else {\n const bufferView = ArrayItem.Get(`${context}/bufferView`, this._loader.gltf.bufferViews, clip.bufferView);\n promise = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView);\n }\n clip._objectURL = promise.then((data) => {\n return URL.createObjectURL(new Blob([data], { type: clip.mimeType }));\n });\n return clip._objectURL;\n }\n _loadEmitterAsync(context, emitter) {\n emitter._babylonSounds = emitter._babylonSounds || [];\n if (!emitter._babylonData) {\n const clipPromises = new Array();\n const name = emitter.name || `emitter${emitter.index}`;\n const options = {\n loop: false,\n autoplay: false,\n volume: emitter.volume == undefined ? 1 : emitter.volume,\n };\n for (let i = 0; i < emitter.clips.length; i++) {\n const clipContext = `/extensions/${this.name}/clips`;\n const clip = ArrayItem.Get(clipContext, this._clips, emitter.clips[i].clip);\n clipPromises.push(this._loadClipAsync(`${clipContext}/${emitter.clips[i].clip}`, clip).then((objectURL) => {\n const sound = (emitter._babylonSounds[i] = new Sound(name, objectURL, this._loader.babylonScene, null, options));\n sound.refDistance = emitter.refDistance || 1;\n sound.maxDistance = emitter.maxDistance || 256;\n sound.rolloffFactor = emitter.rolloffFactor || 1;\n sound.distanceModel = emitter.distanceModel || \"exponential\";\n }));\n }\n const promise = Promise.all(clipPromises).then(() => {\n const weights = emitter.clips.map((clip) => {\n return clip.weight || 1;\n });\n const weightedSound = new WeightedSound(emitter.loop || false, emitter._babylonSounds, weights);\n if (emitter.innerAngle) {\n weightedSound.directionalConeInnerAngle = 2 * Tools.ToDegrees(emitter.innerAngle);\n }\n if (emitter.outerAngle) {\n weightedSound.directionalConeOuterAngle = 2 * Tools.ToDegrees(emitter.outerAngle);\n }\n if (emitter.volume) {\n weightedSound.volume = emitter.volume;\n }\n emitter._babylonData.sound = weightedSound;\n });\n emitter._babylonData = {\n loaded: promise,\n };\n }\n return emitter._babylonData.loaded;\n }\n _getEventAction(context, sound, action, time, startOffset) {\n switch (action) {\n case \"play\" /* IMSFTAudioEmitter_AnimationEventAction.play */: {\n return (currentFrame) => {\n const frameOffset = (startOffset || 0) + (currentFrame - time);\n sound.play(frameOffset);\n };\n }\n case \"stop\" /* IMSFTAudioEmitter_AnimationEventAction.stop */: {\n return () => {\n sound.stop();\n };\n }\n case \"pause\" /* IMSFTAudioEmitter_AnimationEventAction.pause */: {\n return () => {\n sound.pause();\n };\n }\n default: {\n throw new Error(`${context}: Unsupported action ${action}`);\n }\n }\n }\n _loadAnimationEventAsync(context, animationContext, animation, event, babylonAnimationGroup) {\n if (babylonAnimationGroup.targetedAnimations.length == 0) {\n return Promise.resolve();\n }\n const babylonAnimation = babylonAnimationGroup.targetedAnimations[0];\n const emitterIndex = event.emitter;\n const emitter = ArrayItem.Get(`/extensions/${this.name}/emitters`, this._emitters, emitterIndex);\n return this._loadEmitterAsync(context, emitter).then(() => {\n const sound = emitter._babylonData.sound;\n if (sound) {\n const babylonAnimationEvent = new AnimationEvent(event.time, this._getEventAction(context, sound, event.action, event.time, event.startOffset));\n babylonAnimation.animation.addEvent(babylonAnimationEvent);\n // Make sure all started audio stops when this animation is terminated.\n babylonAnimationGroup.onAnimationGroupEndObservable.add(() => {\n sound.stop();\n });\n babylonAnimationGroup.onAnimationGroupPauseObservable.add(() => {\n sound.pause();\n });\n }\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new MSFT_audio_emitter(loader));\n//# sourceMappingURL=MSFT_audio_emitter.js.map"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AACO,MAAM,cAAc,CAAC;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA,IAAI,KAAK;AACT;AACA,IAAI,MAAM;AACV;AACA,IAAI,QAAQ,EAAE;AACd,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK;AAC1B,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM;AAC5B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAChC;AACA;AACA;AACA,QAAQ,IAAI,CAAC,MAAM,GAAG,KAAK;AAC3B;AACA;AACA,IAAI,MAAM,GAAG;AACb,QAAQ,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;AACzE;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACO,MAAM,KAAK,CAAC;AACnB;AACA;AACA;AACA,IAAI,IAAI,IAAI,GAAG;AACf,QAAQ,OAAO,IAAI,CAAC,KAAK;AACzB;AACA,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;AACpB,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,EAAE;AAClC,YAAY;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,kBAAkB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{bC as e,R as t,A as i,aU as n,v as o,E as s,L as a,T as r,ak as u,bD as d,a4 as l,o as h,aP as c,aQ as _}from"./index-BHIM4QBr.esm.min.js";import{A as m,G as p}from"./glTFLoader-CkL-dxBD.esm.min.js";import"./audioEngine-hKZ2m0jY.esm.min.js";import"./rawTexture-CCCnj14W.esm.min.js";import"./assetContainer-DLSDgjTx.esm.min.js";import"./glTFLoaderAnimation-Cq2ziV9o.esm.min.js";class g{constructor(e,t,i){this.frame=e,this.action=t,this.onlyOnce=i,this.isDone=!1}_clone(){return new g(this.frame,this.action,this.onlyOnce)}}class f{get loop(){return this._loop}set loop(e){e!==this._loop&&(this._loop=e,this.updateOptions({loop:e}))}get currentTime(){if(this._htmlAudioElement)return this._htmlAudioElement.currentTime;if(i.audioEngine?.audioContext&&(this.isPlaying||this.isPaused)){const e=this.isPaused?0:i.audioEngine.audioContext.currentTime-this._startTime;return this._currentTime+e}return 0}get spatialSound(){return this._spatialSound}set spatialSound(e){if(e==this._spatialSound)return;const t=this.isPlaying;this.pause(),e?(this._spatialSound=e,this._updateSpatialParameters()):this._disableSpatialSound(),t&&this.play()}constructor(e,t,u,d=null,l){if(this.autoplay=!1,this._loop=!1,this.useCustomAttenuation=!1,this.isPlaying=!1,this.isPaused=!1,this.refDistance=1,this.rolloffFactor=1,this.maxDistance=100,this.distanceModel="linear",this.metadata=null,this.onEndedObservable=new n,this._spatialSound=!1,this._panningModel="equalpower",this._playbackRate=1,this._streaming=!1,this._startTime=0,this._currentTime=0,this._position=o.Zero(),this._localDirection=new o(1,0,0),this._volume=1,this._isReadyToPlay=!1,this._isDirectional=!1,this._coneInnerAngle=360,this._coneOuterAngle=360,this._coneOuterGain=0,this._isOutputConnected=!1,this._urlType="Unknown",this.name=e,u=u||s.LastCreatedScene)if(this._scene=u,f._SceneComponentInitialization(u),this._readyToPlayCallback=d,this._customAttenuationFunction=(e,t,i,n,o)=>t<i?e*(1-t/i):0,l&&(this.autoplay=l.autoplay||!1,this._loop=l.loop||!1,void 0!==l.volume&&(this._volume=l.volume),this._spatialSound=l.spatialSound??!1,this.maxDistance=l.maxDistance??100,this.useCustomAttenuation=l.useCustomAttenuation??!1,this.rolloffFactor=l.rolloffFactor||1,this.refDistance=l.refDistance||1,this.distanceModel=l.distanceModel||"linear",this._playbackRate=l.playbackRate||1,this._streaming=l.streaming??!1,this._length=l.length,this._offset=l.offset),i.audioEngine?.canUseWebAudio&&i.audioEngine.audioContext){this._soundGain=i.audioEngine.audioContext.createGain(),this._soundGain.gain.value=this._volume,this._inputAudioNode=this._soundGain,this._outputAudioNode=this._soundGain,this._spatialSound&&this._createSpatialParameters(),this._scene.mainSoundTrack.addSound(this);let e=!0;if(t)try{"string"==typeof t?(this._urlType="String",this._url=t):t instanceof ArrayBuffer?this._urlType="ArrayBuffer":t instanceof HTMLMediaElement?this._urlType="MediaElement":t instanceof MediaStream?this._urlType="MediaStream":t instanceof AudioBuffer?this._urlType="AudioBuffer":Array.isArray(t)&&(this._urlType="Array");let n=[],o=!1;switch(this._urlType){case"MediaElement":this._streaming=!0,this._isReadyToPlay=!0,this._streamingSource=i.audioEngine.audioContext.createMediaElementSource(t),this.autoplay&&this.play(0,this._offset,this._length),this._readyToPlayCallback&&this._readyToPlayCallback();break;case"MediaStream":this._streaming=!0,this._isReadyToPlay=!0,this._streamingSource=i.audioEngine.audioContext.createMediaStreamSource(t),this.autoplay&&this.play(0,this._offset,this._length),this._readyToPlayCallback&&this._readyToPlayCallback();break;case"ArrayBuffer":t.byteLength>0&&(o=!0,this._soundLoaded(t));break;case"AudioBuffer":this._audioBufferLoaded(t);break;case"String":n.push(t);case"Array":0===n.length&&(n=t);for(let e=0;e<n.length;e++){const t=n[e];if(o=l&&l.skipCodecCheck||-1!==t.indexOf(".mp3",t.length-4)&&i.audioEngine.isMP3supported||-1!==t.indexOf(".ogg",t.length-4)&&i.audioEngine.isOGGsupported||-1!==t.indexOf(".wav",t.length-4)||-1!==t.indexOf(".m4a",t.length-4)||-1!==t.indexOf(".mp4",t.length-4)||-1!==t.indexOf("blob:"),o){this._streaming?(this._htmlAudioElement=new Audio(t),this._htmlAudioElement.controls=!1,this._htmlAudioElement.loop=this.loop,r.SetCorsBehavior(t,this._htmlAudioElement),this._htmlAudioElement.preload="auto",this._htmlAudioElement.addEventListener("canplaythrough",(()=>{this._isReadyToPlay=!0,this.autoplay&&this.play(0,this._offset,this._length),this._readyToPlayCallback&&this._readyToPlayCallback()}),{once:!0}),document.body.appendChild(this._htmlAudioElement),this._htmlAudioElement.load()):this._scene._loadFile(t,(e=>{this._soundLoaded(e)}),void 0,!0,!0,(e=>{e&&a.Error("XHR "+e.status+" error on: "+t+"."),a.Error("Sound creation aborted."),this._scene.mainSoundTrack.removeSound(this)}));break}}break;default:e=!1}e?o||(this._isReadyToPlay=!0,this._readyToPlayCallback&&setTimeout((()=>{this._readyToPlayCallback&&this._readyToPlayCallback()}),1e3)):a.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.")}catch(e){a.Error("Unexpected error. Sound creation aborted."),this._scene.mainSoundTrack.removeSound(this)}}else this._scene.mainSoundTrack.addSound(this),i.audioEngine&&!i.audioEngine.WarnedWebAudioUnsupported&&(a.Error("Web Audio is not supported by your browser."),i.audioEngine.WarnedWebAudioUnsupported=!0),this._readyToPlayCallback&&setTimeout((()=>{this._readyToPlayCallback&&this._readyToPlayCallback()}),1e3)}dispose(){i.audioEngine?.canUseWebAudio&&(this.isPlaying&&this.stop(),this._isReadyToPlay=!1,-1===this.soundTrackId?this._scene.mainSoundTrack.removeSound(this):this._scene.soundTracks&&this._scene.soundTracks[this.soundTrackId].removeSound(this),this._soundGain&&(this._soundGain.disconnect(),this._soundGain=null),this._soundPanner&&(this._soundPanner.disconnect(),this._soundPanner=null),this._soundSource&&(this._soundSource.disconnect(),this._soundSource=null),this._audioBuffer=null,this._htmlAudioElement&&(this._htmlAudioElement.pause(),this._htmlAudioElement.src="",document.body.removeChild(this._htmlAudioElement),this._htmlAudioElement=null),this._streamingSource&&(this._streamingSource.disconnect(),this._streamingSource=null),this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._connectedTransformNode=null),this._clearTimeoutsAndObservers())}isReady(){return this._isReadyToPlay}getClassName(){return"Sound"}_audioBufferLoaded(e){i.audioEngine?.audioContext&&(this._audioBuffer=e,this._isReadyToPlay=!0,this.autoplay&&this.play(0,this._offset,this._length),this._readyToPlayCallback&&this._readyToPlayCallback())}_soundLoaded(e){i.audioEngine?.audioContext&&i.audioEngine.audioContext.decodeAudioData(e,(e=>{this._audioBufferLoaded(e)}),(e=>{a.Error("Error while decoding audio data for: "+this.name+" / Error: "+e)}))}setAudioBuffer(e){i.audioEngine?.canUseWebAudio&&(this._audioBuffer=e,this._isReadyToPlay=!0)}updateOptions(e){e&&(this.loop=e.loop??this.loop,this.maxDistance=e.maxDistance??this.maxDistance,this.useCustomAttenuation=e.useCustomAttenuation??this.useCustomAttenuation,this.rolloffFactor=e.rolloffFactor??this.rolloffFactor,this.refDistance=e.refDistance??this.refDistance,this.distanceModel=e.distanceModel??this.distanceModel,this._playbackRate=e.playbackRate??this._playbackRate,this._length=e.length??void 0,this.spatialSound=e.spatialSound??this._spatialSound,this._setOffset(e.offset??void 0),this.setVolume(e.volume??this._volume),this._updateSpatialParameters(),this.isPlaying&&(this._streaming&&this._htmlAudioElement?(this._htmlAudioElement.playbackRate=this._playbackRate,this._htmlAudioElement.loop!==this.loop&&(this._htmlAudioElement.loop=this.loop)):this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate,this._soundSource.loop!==this.loop&&(this._soundSource.loop=this.loop),void 0!==this._offset&&this._soundSource.loopStart!==this._offset&&(this._soundSource.loopStart=this._offset),void 0!==this._length&&this._length!==this._soundSource.loopEnd&&(this._soundSource.loopEnd=(0|this._offset)+this._length))))}_createSpatialParameters(){i.audioEngine?.canUseWebAudio&&i.audioEngine.audioContext&&(this._scene.headphone&&(this._panningModel="HRTF"),this._soundPanner=this._soundPanner??i.audioEngine.audioContext.createPanner(),this._soundPanner&&this._outputAudioNode&&(this._updateSpatialParameters(),this._soundPanner.connect(this._outputAudioNode),this._inputAudioNode=this._soundPanner))}_disableSpatialSound(){this._spatialSound&&(this._inputAudioNode=this._soundGain,this._soundPanner?.disconnect(),this._soundPanner=null,this._spatialSound=!1)}_updateSpatialParameters(){this._spatialSound&&(this._soundPanner?this.useCustomAttenuation?(this._soundPanner.distanceModel="linear",this._soundPanner.maxDistance=Number.MAX_VALUE,this._soundPanner.refDistance=1,this._soundPanner.rolloffFactor=1,this._soundPanner.panningModel=this._panningModel):(this._soundPanner.distanceModel=this.distanceModel,this._soundPanner.maxDistance=this.maxDistance,this._soundPanner.refDistance=this.refDistance,this._soundPanner.rolloffFactor=this.rolloffFactor,this._soundPanner.panningModel=this._panningModel):this._createSpatialParameters())}switchPanningModelToHRTF(){this._panningModel="HRTF",this._switchPanningModel()}switchPanningModelToEqualPower(){this._panningModel="equalpower",this._switchPanningModel()}_switchPanningModel(){i.audioEngine?.canUseWebAudio&&this._spatialSound&&this._soundPanner&&(this._soundPanner.panningModel=this._panningModel)}connectToSoundTrackAudioNode(e){i.audioEngine?.canUseWebAudio&&this._outputAudioNode&&(this._isOutputConnected&&this._outputAudioNode.disconnect(),this._outputAudioNode.connect(e),this._isOutputConnected=!0)}setDirectionalCone(e,t,i){t<e?a.Error("setDirectionalCone(): outer angle of the cone must be superior or equal to the inner angle."):(this._coneInnerAngle=e,this._coneOuterAngle=t,this._coneOuterGain=i,this._isDirectional=!0,this.isPlaying&&this.loop&&(this.stop(),this.play(0,this._offset,this._length)))}get directionalConeInnerAngle(){return this._coneInnerAngle}set directionalConeInnerAngle(e){if(e!=this._coneInnerAngle){if(this._coneOuterAngle<e)return void a.Error("directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneInnerAngle=e,i.audioEngine?.canUseWebAudio&&this._spatialSound&&this._soundPanner&&(this._soundPanner.coneInnerAngle=this._coneInnerAngle)}}get directionalConeOuterAngle(){return this._coneOuterAngle}set directionalConeOuterAngle(e){if(e!=this._coneOuterAngle){if(e<this._coneInnerAngle)return void a.Error("directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneOuterAngle=e,i.audioEngine?.canUseWebAudio&&this._spatialSound&&this._soundPanner&&(this._soundPanner.coneOuterAngle=this._coneOuterAngle)}}setPosition(e){e.equals(this._position)||(this._position.copyFrom(e),i.audioEngine?.canUseWebAudio&&this._spatialSound&&this._soundPanner&&!isNaN(this._position.x)&&!isNaN(this._position.y)&&!isNaN(this._position.z)&&(this._soundPanner.positionX.value=this._position.x,this._soundPanner.positionY.value=this._position.y,this._soundPanner.positionZ.value=this._position.z))}setLocalDirectionToMesh(e){this._localDirection=e,i.audioEngine?.canUseWebAudio&&this._connectedTransformNode&&this.isPlaying&&this._updateDirection()}_updateDirection(){if(!this._connectedTransformNode||!this._soundPanner)return;const e=this._connectedTransformNode.getWorldMatrix(),t=o.TransformNormal(this._localDirection,e);t.normalize(),this._soundPanner.orientationX.value=t.x,this._soundPanner.orientationY.value=t.y,this._soundPanner.orientationZ.value=t.z}updateDistanceFromListener(){if(i.audioEngine?.canUseWebAudio&&this._connectedTransformNode&&this.useCustomAttenuation&&this._soundGain&&this._scene.activeCamera){const e=this._scene.audioListenerPositionProvider?this._connectedTransformNode.position.subtract(this._scene.audioListenerPositionProvider()).length():this._connectedTransformNode.getDistanceToCamera(this._scene.activeCamera);this._soundGain.gain.value=this._customAttenuationFunction(this._volume,e,this.maxDistance,this.refDistance,this.rolloffFactor)}}setAttenuationFunction(e){this._customAttenuationFunction=e}play(e,t,n){if(this._isReadyToPlay&&this._scene.audioEnabled&&i.audioEngine?.audioContext)try{this._clearTimeoutsAndObservers();let o=e?i.audioEngine?.audioContext.currentTime+e:i.audioEngine?.audioContext.currentTime;if(this._soundSource&&this._streamingSource||this._spatialSound&&this._soundPanner&&(isNaN(this._position.x)||isNaN(this._position.y)||isNaN(this._position.z)||(this._soundPanner.positionX.value=this._position.x,this._soundPanner.positionY.value=this._position.y,this._soundPanner.positionZ.value=this._position.z),this._isDirectional&&(this._soundPanner.coneInnerAngle=this._coneInnerAngle,this._soundPanner.coneOuterAngle=this._coneOuterAngle,this._soundPanner.coneOuterGain=this._coneOuterGain,this._connectedTransformNode?this._updateDirection():this._soundPanner.setOrientation(this._localDirection.x,this._localDirection.y,this._localDirection.z))),this._streaming){if(!this._streamingSource&&this._htmlAudioElement&&(this._streamingSource=i.audioEngine.audioContext.createMediaElementSource(this._htmlAudioElement),this._htmlAudioElement.onended=()=>{this._onended()},this._htmlAudioElement.playbackRate=this._playbackRate),this._streamingSource&&(this._streamingSource.disconnect(),this._inputAudioNode&&this._streamingSource.connect(this._inputAudioNode)),this._htmlAudioElement){const e=()=>{if(i.audioEngine?.unlocked){if(!this._htmlAudioElement)return;this._htmlAudioElement.currentTime=t??0;const n=this._htmlAudioElement.play();void 0!==n&&n.catch((()=>{i.audioEngine?.lock(),(this.loop||this.autoplay)&&(this._audioUnlockedObserver=i.audioEngine?.onAudioUnlockedObservable.addOnce((()=>{e()})))}))}else(this.loop||this.autoplay)&&(this._audioUnlockedObserver=i.audioEngine?.onAudioUnlockedObservable.addOnce((()=>{e()})))};e()}}else{const s=()=>{if(i.audioEngine?.audioContext){if(n=n||this._length,void 0!==t&&this._setOffset(t),this._soundSource){const e=this._soundSource;e.onended=()=>{e.disconnect()}}if(this._soundSource=i.audioEngine?.audioContext.createBufferSource(),this._soundSource&&this._inputAudioNode){this._soundSource.buffer=this._audioBuffer,this._soundSource.connect(this._inputAudioNode),this._soundSource.loop=this.loop,void 0!==t&&(this._soundSource.loopStart=t),void 0!==n&&(this._soundSource.loopEnd=(0|t)+n),this._soundSource.playbackRate.value=this._playbackRate,this._soundSource.onended=()=>{this._onended()},o=e?i.audioEngine?.audioContext.currentTime+e:i.audioEngine.audioContext.currentTime;const s=((this.isPaused?this.currentTime:0)+(this._offset??0))%this._soundSource.buffer.duration;this._soundSource.start(o,s,this.loop?void 0:n)}}};"suspended"===i.audioEngine?.audioContext.state?this._tryToPlayTimeout=setTimeout((()=>{"suspended"===i.audioEngine?.audioContext.state?(i.audioEngine.lock(),(this.loop||this.autoplay)&&(this._audioUnlockedObserver=i.audioEngine.onAudioUnlockedObservable.addOnce((()=>{s()})))):s()}),500):s()}this._startTime=o,this.isPlaying=!0,this.isPaused=!1}catch(e){a.Error("Error while trying to play audio: "+this.name+", "+e.message)}}_onended(){this.isPlaying=!1,this._startTime=0,this._currentTime=0,this.onended&&this.onended(),this.onEndedObservable.notifyObservers(this)}stop(e){if(this.isPlaying)if(this._clearTimeoutsAndObservers(),this._streaming)this._htmlAudioElement?(this._htmlAudioElement.pause(),this._htmlAudioElement.currentTime>0&&(this._htmlAudioElement.currentTime=0)):this._streamingSource?.disconnect(),this.isPlaying=!1;else if(i.audioEngine?.audioContext&&this._soundSource){const t=e?i.audioEngine.audioContext.currentTime+e:void 0;this._soundSource.onended=()=>{this.isPlaying=!1,this.isPaused=!1,this._startTime=0,this._currentTime=0,this._soundSource&&(this._soundSource.onended=()=>{}),this._onended()},this._soundSource.stop(t)}else this.isPlaying=!1;else this.isPaused&&(this.isPaused=!1,this._startTime=0,this._currentTime=0)}pause(){this.isPlaying&&(this._clearTimeoutsAndObservers(),this._streaming?(this._htmlAudioElement?this._htmlAudioElement.pause():this._streamingSource?.disconnect(),this.isPlaying=!1,this.isPaused=!0):i.audioEngine?.audioContext&&this._soundSource&&(this._soundSource.onended=()=>{},this._soundSource.stop(),this.isPlaying=!1,this.isPaused=!0,this._currentTime+=i.audioEngine.audioContext.currentTime-this._startTime))}setVolume(e,t){i.audioEngine?.canUseWebAudio&&this._soundGain&&(t&&i.audioEngine.audioContext?(this._soundGain.gain.cancelScheduledValues(i.audioEngine.audioContext.currentTime),this._soundGain.gain.setValueAtTime(this._soundGain.gain.value,i.audioEngine.audioContext.currentTime),this._soundGain.gain.linearRampToValueAtTime(e,i.audioEngine.audioContext.currentTime+t)):this._soundGain.gain.value=e),this._volume=e}setPlaybackRate(e){this._playbackRate=e,this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate))}getPlaybackRate(){return this._playbackRate}getVolume(){return this._volume}attachToMesh(e){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null),this._connectedTransformNode=e,this._spatialSound||(this._spatialSound=!0,this._createSpatialParameters(),this.isPlaying&&this.loop&&(this.stop(),this.play(0,this._offset,this._length))),this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode),this._registerFunc=e=>this._onRegisterAfterWorldMatrixUpdate(e),this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc)}detachFromMesh(){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null,this._connectedTransformNode=null)}_onRegisterAfterWorldMatrixUpdate(e){if(e.getBoundingInfo){const t=e.getBoundingInfo();this.setPosition(t.boundingSphere.centerWorld)}else this.setPosition(e.absolutePosition);i.audioEngine?.canUseWebAudio&&this._isDirectional&&this.isPlaying&&this._updateDirection()}clone(){if(this._streaming)return null;{const e=()=>{this._isReadyToPlay?(i._audioBuffer=this.getAudioBuffer(),i._isReadyToPlay=!0,i.autoplay&&i.play(0,this._offset,this._length)):setTimeout(e,300)},t={autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this._spatialSound,maxDistance:this.maxDistance,useCustomAttenuation:this.useCustomAttenuation,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel},i=new f(this.name+"_cloned",new ArrayBuffer(0),this._scene,null,t);return this.useCustomAttenuation&&i.setAttenuationFunction(this._customAttenuationFunction),i.setPosition(this._position),i.setPlaybackRate(this._playbackRate),e(),i}}getAudioBuffer(){return this._audioBuffer}getSoundSource(){return this._soundSource}getSoundGain(){return this._soundGain}serialize(){const e={name:this.name,url:this._url,autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this._spatialSound,maxDistance:this.maxDistance,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel,playbackRate:this._playbackRate,panningModel:this._panningModel,soundTrackId:this.soundTrackId,metadata:this.metadata};return this._spatialSound&&(this._connectedTransformNode&&(e.connectedMeshId=this._connectedTransformNode.id),e.position=this._position.asArray(),e.refDistance=this.refDistance,e.distanceModel=this.distanceModel,e.isDirectional=this._isDirectional,e.localDirectionToMesh=this._localDirection.asArray(),e.coneInnerAngle=this._coneInnerAngle,e.coneOuterAngle=this._coneOuterAngle,e.coneOuterGain=this._coneOuterGain),e}static Parse(e,t,i,n){const s=e.name;let a;a=e.url?i+e.url:i+s;const r={autoplay:e.autoplay,loop:e.loop,volume:e.volume,spatialSound:e.spatialSound,maxDistance:e.maxDistance,rolloffFactor:e.rolloffFactor,refDistance:e.refDistance,distanceModel:e.distanceModel,playbackRate:e.playbackRate};let u;if(n){const e=()=>{n._isReadyToPlay?(u._audioBuffer=n.getAudioBuffer(),u._isReadyToPlay=!0,u.autoplay&&u.play(0,u._offset,u._length)):setTimeout(e,300)};u=new f(s,new ArrayBuffer(0),t,null,r),e()}else u=new f(s,a,t,(()=>{t.removePendingData(u)}),r),t.addPendingData(u);if(e.position){const t=o.FromArray(e.position);u.setPosition(t)}if(e.isDirectional&&(u.setDirectionalCone(e.coneInnerAngle||360,e.coneOuterAngle||360,e.coneOuterGain||0),e.localDirectionToMesh)){const t=o.FromArray(e.localDirectionToMesh);u.setLocalDirectionToMesh(t)}if(e.connectedMeshId){const i=t.getMeshById(e.connectedMeshId);i&&u.attachToMesh(i)}return e.metadata&&(u.metadata=e.metadata),u}_setOffset(e){this._offset!==e&&(this.isPaused&&(this.stop(),this.isPaused=!1),this._offset=e)}_clearTimeoutsAndObservers(){this._tryToPlayTimeout&&(clearTimeout(this._tryToPlayTimeout),this._tryToPlayTimeout=null),this._audioUnlockedObserver&&(i.audioEngine?.onAudioUnlockedObservable.remove(this._audioUnlockedObserver),this._audioUnlockedObserver=null)}}f._SceneComponentInitialization=t=>{throw e("AudioSceneComponent")},t("BABYLON.Sound",f);class A{constructor(e,t,i){if(this.loop=!1,this._coneInnerAngle=360,this._coneOuterAngle=360,this._volume=1,this.isPlaying=!1,this.isPaused=!1,this._sounds=[],this._weights=[],t.length!==i.length)throw new Error("Sounds length does not equal weights length");this.loop=e,this._weights=i;let n=0;for(const e of i)n+=e;const o=n>0?1/n:0;for(let e=0;e<this._weights.length;e++)this._weights[e]*=o;this._sounds=t;for(const e of this._sounds)e.onEndedObservable.add((()=>{this._onended()}))}get directionalConeInnerAngle(){return this._coneInnerAngle}set directionalConeInnerAngle(e){if(e!==this._coneInnerAngle){if(this._coneOuterAngle<e)return void a.Error("directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneInnerAngle=e;for(const t of this._sounds)t.directionalConeInnerAngle=e}}get directionalConeOuterAngle(){return this._coneOuterAngle}set directionalConeOuterAngle(e){if(e!==this._coneOuterAngle){if(e<this._coneInnerAngle)return void a.Error("directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneOuterAngle=e;for(const t of this._sounds)t.directionalConeOuterAngle=e}}get volume(){return this._volume}set volume(e){if(e!==this._volume)for(const t of this._sounds)t.setVolume(e)}_onended(){void 0!==this._currentIndex&&(this._sounds[this._currentIndex].autoplay=!1),this.loop&&this.isPlaying?this.play():this.isPlaying=!1}pause(){this.isPlaying&&(this.isPaused=!0,void 0!==this._currentIndex&&this._sounds[this._currentIndex].pause())}stop(){this.isPlaying=!1,void 0!==this._currentIndex&&this._sounds[this._currentIndex].stop()}play(e){if(!this.isPaused){this.stop();const e=Math.random();let t=0;for(let i=0;i<this._weights.length;i++)if(t+=this._weights[i],e<=t){this._currentIndex=i;break}}const t=this._sounds[this._currentIndex??0];t.isReady()?t.play(0,this.isPaused?void 0:e):t.autoplay=!0,this.isPlaying=!0,this.isPaused=!1}}class y{constructor(e,t={}){this.id=-1,this._isInitialized=!1,(e=e||s.LastCreatedScene)&&(this._scene=e,this.soundCollection=[],this._options=t,!this._options.mainTrack&&this._scene.soundTracks&&(this._scene.soundTracks.push(this),this.id=this._scene.soundTracks.length-1))}_initializeSoundTrackAudioGraph(){i.audioEngine?.canUseWebAudio&&i.audioEngine.audioContext&&(this._outputAudioNode=i.audioEngine.audioContext.createGain(),this._outputAudioNode.connect(i.audioEngine.masterGain),this._options&&this._options.volume&&(this._outputAudioNode.gain.value=this._options.volume),this._isInitialized=!0)}dispose(){if(i.audioEngine&&i.audioEngine.canUseWebAudio){for(this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas();this.soundCollection.length;)this.soundCollection[0].dispose();this._outputAudioNode&&this._outputAudioNode.disconnect(),this._outputAudioNode=null}}addSound(e){this._isInitialized||this._initializeSoundTrackAudioGraph(),i.audioEngine?.canUseWebAudio&&this._outputAudioNode&&e.connectToSoundTrackAudioNode(this._outputAudioNode),void 0!==e.soundTrackId&&(-1===e.soundTrackId?this._scene.mainSoundTrack.removeSound(e):this._scene.soundTracks&&this._scene.soundTracks[e.soundTrackId].removeSound(e)),this.soundCollection.push(e),e.soundTrackId=this.id}removeSound(e){const t=this.soundCollection.indexOf(e);-1!==t&&this.soundCollection.splice(t,1)}setVolume(e){i.audioEngine?.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.gain.value=e)}switchPanningModelToHRTF(){if(i.audioEngine?.canUseWebAudio)for(let e=0;e<this.soundCollection.length;e++)this.soundCollection[e].switchPanningModelToHRTF()}switchPanningModelToEqualPower(){if(i.audioEngine?.canUseWebAudio)for(let e=0;e<this.soundCollection.length;e++)this.soundCollection[e].switchPanningModelToEqualPower()}connectToAnalyser(e){this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas(),this._connectedAnalyser=e,i.audioEngine?.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.disconnect(),this._connectedAnalyser.connectAudioNodes(this._outputAudioNode,i.audioEngine.masterGain))}}Object.defineProperty(u.prototype,"mainSoundTrack",{get:function(){let e=this._getComponent(d.NAME_AUDIO);return e||(e=new T(this),this._addComponent(e)),this._mainSoundTrack||(this._mainSoundTrack=new y(this,{mainTrack:!0})),this._mainSoundTrack},enumerable:!0,configurable:!0}),u.prototype.getSoundByName=function(e){let t;for(t=0;t<this.mainSoundTrack.soundCollection.length;t++)if(this.mainSoundTrack.soundCollection[t].name===e)return this.mainSoundTrack.soundCollection[t];if(this.soundTracks)for(let i=0;i<this.soundTracks.length;i++)for(t=0;t<this.soundTracks[i].soundCollection.length;t++)if(this.soundTracks[i].soundCollection[t].name===e)return this.soundTracks[i].soundCollection[t];return null},Object.defineProperty(u.prototype,"audioEnabled",{get:function(){let e=this._getComponent(d.NAME_AUDIO);return e||(e=new T(this),this._addComponent(e)),e.audioEnabled},set:function(e){let t=this._getComponent(d.NAME_AUDIO);t||(t=new T(this),this._addComponent(t)),e?t.enableAudio():t.disableAudio()},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"headphone",{get:function(){let e=this._getComponent(d.NAME_AUDIO);return e||(e=new T(this),this._addComponent(e)),e.headphone},set:function(e){let t=this._getComponent(d.NAME_AUDIO);t||(t=new T(this),this._addComponent(t)),e?t.switchAudioModeForHeadphones():t.switchAudioModeForNormalSpeakers()},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"audioListenerPositionProvider",{get:function(){let e=this._getComponent(d.NAME_AUDIO);return e||(e=new T(this),this._addComponent(e)),e.audioListenerPositionProvider},set:function(e){let t=this._getComponent(d.NAME_AUDIO);if(t||(t=new T(this),this._addComponent(t)),e&&"function"!=typeof e)throw new Error("The value passed to [Scene.audioListenerPositionProvider] must be a function that returns a Vector3");t.audioListenerPositionProvider=e},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"audioListenerRotationProvider",{get:function(){let e=this._getComponent(d.NAME_AUDIO);return e||(e=new T(this),this._addComponent(e)),e.audioListenerRotationProvider},set:function(e){let t=this._getComponent(d.NAME_AUDIO);if(t||(t=new T(this),this._addComponent(t)),e&&"function"!=typeof e)throw new Error("The value passed to [Scene.audioListenerRotationProvider] must be a function that returns a Vector3");t.audioListenerRotationProvider=e},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"audioPositioningRefreshRate",{get:function(){let e=this._getComponent(d.NAME_AUDIO);return e||(e=new T(this),this._addComponent(e)),e.audioPositioningRefreshRate},set:function(e){let t=this._getComponent(d.NAME_AUDIO);t||(t=new T(this),this._addComponent(t)),t.audioPositioningRefreshRate=e},enumerable:!0,configurable:!0});class T{get audioEnabled(){return this._audioEnabled}get headphone(){return this._headphone}constructor(e){this.name=d.NAME_AUDIO,this._audioEnabled=!0,this._headphone=!1,this.audioPositioningRefreshRate=500,this.audioListenerPositionProvider=null,this.audioListenerRotationProvider=null,this._cachedCameraDirection=new o,this._cachedCameraPosition=new o,this._lastCheck=0,this._invertMatrixTemp=new l,this._cameraDirectionTemp=new o,(e=e||s.LastCreatedScene)&&(this.scene=e,e.soundTracks=[],e.sounds=[])}register(){this.scene._afterRenderStage.registerStep(d.STEP_AFTERRENDER_AUDIO,this,this._afterRender)}rebuild(){}serialize(e){if(e.sounds=[],this.scene.soundTracks)for(let t=0;t<this.scene.soundTracks.length;t++){const i=this.scene.soundTracks[t];for(let t=0;t<i.soundCollection.length;t++)e.sounds.push(i.soundCollection[t].serialize())}}addFromContainer(e){e.sounds&&e.sounds.forEach((e=>{e.play(),e.autoplay=!0,this.scene.mainSoundTrack.addSound(e)}))}removeFromContainer(e,t=!1){e.sounds&&e.sounds.forEach((e=>{e.stop(),e.autoplay=!1,this.scene.mainSoundTrack.removeSound(e),t&&e.dispose()}))}dispose(){const e=this.scene;if(e._mainSoundTrack&&e.mainSoundTrack.dispose(),e.soundTracks)for(let t=0;t<e.soundTracks.length;t++)e.soundTracks[t].dispose()}disableAudio(){const e=this.scene;let t;for(this._audioEnabled=!1,i.audioEngine&&i.audioEngine.audioContext&&i.audioEngine.audioContext.suspend(),t=0;t<e.mainSoundTrack.soundCollection.length;t++)e.mainSoundTrack.soundCollection[t].pause();if(e.soundTracks)for(t=0;t<e.soundTracks.length;t++)for(let i=0;i<e.soundTracks[t].soundCollection.length;i++)e.soundTracks[t].soundCollection[i].pause()}enableAudio(){const e=this.scene;let t;for(this._audioEnabled=!0,i.audioEngine&&i.audioEngine.audioContext&&i.audioEngine.audioContext.resume(),t=0;t<e.mainSoundTrack.soundCollection.length;t++)e.mainSoundTrack.soundCollection[t].isPaused&&e.mainSoundTrack.soundCollection[t].play();if(e.soundTracks)for(t=0;t<e.soundTracks.length;t++)for(let i=0;i<e.soundTracks[t].soundCollection.length;i++)e.soundTracks[t].soundCollection[i].isPaused&&e.soundTracks[t].soundCollection[i].play()}switchAudioModeForHeadphones(){const e=this.scene;if(this._headphone=!0,e.mainSoundTrack.switchPanningModelToHRTF(),e.soundTracks)for(let t=0;t<e.soundTracks.length;t++)e.soundTracks[t].switchPanningModelToHRTF()}switchAudioModeForNormalSpeakers(){const e=this.scene;if(this._headphone=!1,e.mainSoundTrack.switchPanningModelToEqualPower(),e.soundTracks)for(let t=0;t<e.soundTracks.length;t++)e.soundTracks[t].switchPanningModelToEqualPower()}_afterRender(){const e=h.Now;if(this._lastCheck&&e-this._lastCheck<this.audioPositioningRefreshRate)return;this._lastCheck=e;const t=this.scene;if(!this._audioEnabled||!t._mainSoundTrack||!t.soundTracks||0===t._mainSoundTrack.soundCollection.length&&1===t.soundTracks.length)return;const n=i.audioEngine;if(n&&n.audioContext){let e,i=t.activeCamera;if(t.activeCameras&&t.activeCameras.length>0&&(i=t.activeCameras[0]),this.audioListenerPositionProvider){const e=this.audioListenerPositionProvider();n.audioContext.listener.setPosition(e.x||0,e.y||0,e.z||0)}else i?this._cachedCameraPosition.equals(i.globalPosition)||(this._cachedCameraPosition.copyFrom(i.globalPosition),n.audioContext.listener.setPosition(i.globalPosition.x,i.globalPosition.y,i.globalPosition.z)):n.audioContext.listener.setPosition(0,0,0);if(this.audioListenerRotationProvider){const e=this.audioListenerRotationProvider();n.audioContext.listener.setOrientation(e.x||0,e.y||0,e.z||0,0,1,0)}else i?(i.rigCameras&&i.rigCameras.length>0&&(i=i.rigCameras[0]),i.getViewMatrix().invertToRef(this._invertMatrixTemp),o.TransformNormalToRef(T._CameraDirection,this._invertMatrixTemp,this._cameraDirectionTemp),this._cameraDirectionTemp.normalize(),isNaN(this._cameraDirectionTemp.x)||isNaN(this._cameraDirectionTemp.y)||isNaN(this._cameraDirectionTemp.z)||this._cachedCameraDirection.equals(this._cameraDirectionTemp)||(this._cachedCameraDirection.copyFrom(this._cameraDirectionTemp),n.audioContext.listener.setOrientation(this._cameraDirectionTemp.x,this._cameraDirectionTemp.y,this._cameraDirectionTemp.z,0,1,0))):n.audioContext.listener.setOrientation(0,0,0,0,1,0);for(e=0;e<t.mainSoundTrack.soundCollection.length;e++){const i=t.mainSoundTrack.soundCollection[e];i.useCustomAttenuation&&i.updateDistanceFromListener()}if(t.soundTracks)for(e=0;e<t.soundTracks.length;e++)for(let i=0;i<t.soundTracks[e].soundCollection.length;i++){const n=t.soundTracks[e].soundCollection[i];n.useCustomAttenuation&&n.updateDistanceFromListener()}}}}T._CameraDirection=new o(0,0,-1),f._SceneComponentInitialization=e=>{let t=e._getComponent(d.NAME_AUDIO);t||(t=new T(e),e._addComponent(t))};const P="MSFT_audio_emitter";class b{constructor(e){this.name=P,this._loader=e,this.enabled=this._loader.isExtensionUsed(P)}dispose(){this._loader=null,this._clips=null,this._emitters=null}onLoading(){const e=this._loader.gltf.extensions;if(e&&e[this.name]){const t=e[this.name];this._clips=t.clips,this._emitters=t.emitters,m.Assign(this._clips),m.Assign(this._emitters)}}loadSceneAsync(e,t){return p.LoadExtensionAsync(e,t,this.name,((i,n)=>{const o=new Array;o.push(this._loader.loadSceneAsync(e,t));for(const e of n.emitters){const t=m.Get(`${i}/emitters`,this._emitters,e);if(null!=t.refDistance||null!=t.maxDistance||null!=t.rolloffFactor||null!=t.distanceModel||null!=t.innerAngle||null!=t.outerAngle)throw new Error(`${i}: Direction or Distance properties are not allowed on emitters attached to a scene`);o.push(this._loadEmitterAsync(`${i}/emitters/${t.index}`,t))}return Promise.all(o).then((()=>{}))}))}loadNodeAsync(e,t,i){return p.LoadExtensionAsync(e,t,this.name,((e,n)=>{const s=new Array;return this._loader.loadNodeAsync(e,t,(t=>{for(const i of n.emitters){const n=m.Get(`${e}/emitters`,this._emitters,i);s.push(this._loadEmitterAsync(`${e}/emitters/${n.index}`,n).then((()=>{for(const e of n._babylonSounds)e.attachToMesh(t),null==n.innerAngle&&null==n.outerAngle||(e.setLocalDirectionToMesh(o.Forward()),e.setDirectionalCone(2*r.ToDegrees(null==n.innerAngle?Math.PI:n.innerAngle),2*r.ToDegrees(null==n.outerAngle?Math.PI:n.outerAngle),0))})))}i(t)})).then((e=>Promise.all(s).then((()=>e))))}))}loadAnimationAsync(e,t){return p.LoadExtensionAsync(e,t,this.name,((i,n)=>this._loader.loadAnimationAsync(e,t).then((o=>{const s=new Array;m.Assign(n.events);for(const a of n.events)s.push(this._loadAnimationEventAsync(`${i}/events/${a.index}`,e,t,a,o));return Promise.all(s).then((()=>o))}))))}_loadClipAsync(e,t){if(t._objectURL)return t._objectURL;let i;if(t.uri)i=this._loader.loadUriAsync(e,t,t.uri);else{const n=m.Get(`${e}/bufferView`,this._loader.gltf.bufferViews,t.bufferView);i=this._loader.loadBufferViewAsync(`/bufferViews/${n.index}`,n)}return t._objectURL=i.then((e=>URL.createObjectURL(new Blob([e],{type:t.mimeType})))),t._objectURL}_loadEmitterAsync(e,t){if(t._babylonSounds=t._babylonSounds||[],!t._babylonData){const e=new Array,i=t.name||`emitter${t.index}`,n={loop:!1,autoplay:!1,volume:null==t.volume?1:t.volume};for(let o=0;o<t.clips.length;o++){const s=`/extensions/${this.name}/clips`,a=m.Get(s,this._clips,t.clips[o].clip);e.push(this._loadClipAsync(`${s}/${t.clips[o].clip}`,a).then((e=>{const s=t._babylonSounds[o]=new f(i,e,this._loader.babylonScene,null,n);s.refDistance=t.refDistance||1,s.maxDistance=t.maxDistance||256,s.rolloffFactor=t.rolloffFactor||1,s.distanceModel=t.distanceModel||"exponential"})))}const o=Promise.all(e).then((()=>{const e=t.clips.map((e=>e.weight||1)),i=new A(t.loop||!1,t._babylonSounds,e);t.innerAngle&&(i.directionalConeInnerAngle=2*r.ToDegrees(t.innerAngle)),t.outerAngle&&(i.directionalConeOuterAngle=2*r.ToDegrees(t.outerAngle)),t.volume&&(i.volume=t.volume),t._babylonData.sound=i}));t._babylonData={loaded:o}}return t._babylonData.loaded}_getEventAction(e,t,i,n,o){switch(i){case"play":return e=>{const i=(o||0)+(e-n);t.play(i)};case"stop":return()=>{t.stop()};case"pause":return()=>{t.pause()};default:throw new Error(`${e}: Unsupported action ${i}`)}}_loadAnimationEventAsync(e,t,i,n,o){if(0==o.targetedAnimations.length)return Promise.resolve();const s=o.targetedAnimations[0],a=n.emitter,r=m.Get(`/extensions/${this.name}/emitters`,this._emitters,a);return this._loadEmitterAsync(e,r).then((()=>{const t=r._babylonData.sound;if(t){const i=new g(n.time,this._getEventAction(e,t,n.action,n.time,n.startOffset));s.animation.addEvent(i),o.onAnimationGroupEndObservable.add((()=>{t.stop()})),o.onAnimationGroupPauseObservable.add((()=>{t.pause()}))}}))}}c(P),_(P,!0,(e=>new b(e)));export{b as MSFT_audio_emitter};
|
|
2
|
+
//# sourceMappingURL=MSFT_audio_emitter-Czn1DAbD.esm.min.js.map
|