@babylonjs/viewer 7.42.0 → 7.44.0
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-D-oSSifC.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_ies-D-oSSifC.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_ies-DJJLktlG.esm.js +84 -0
- package/dist/chunks/EXT_lights_ies-DJJLktlG.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-Bm1EdHWU.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-Bm1EdHWU.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-CPP95suP.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-CPP95suP.esm.min.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DuFNjp-b.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DuFNjp-b.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-RXBAS2yg.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-RXBAS2yg.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-B_tol2Sa.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-B_tol2Sa.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-Rai3-_W3.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-Rai3-_W3.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-D3PbSGsk.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-D3PbSGsk.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-DB96e8gK.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-DB96e8gK.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-BrAdNUVI.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-BrAdNUVI.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-BsSdw4hb.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-BsSdw4hb.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-CvpNkVJm.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-CvpNkVJm.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-CwSGAnId.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-CwSGAnId.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-B29-7REN.esm.js +352 -0
- package/dist/chunks/KHR_animation_pointer-B29-7REN.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-DXhkj5r0.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-DXhkj5r0.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-4y3oU3vs.esm.js +611 -0
- package/dist/chunks/KHR_draco_mesh_compression-4y3oU3vs.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-OUEmCF9O.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-OUEmCF9O.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-DmxwZO-B.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-DmxwZO-B.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-Nql0vbRS.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-Nql0vbRS.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-BuxTRJTD.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-BuxTRJTD.esm.min.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-DT1Tmy49.esm.js +581 -0
- package/dist/chunks/KHR_lights_punctual-DT1Tmy49.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-CkyM8JSq.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-CkyM8JSq.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-rMp1ahNa.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-rMp1ahNa.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-Dw7bP6zs.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-Dw7bP6zs.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-c_8cDReS.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-c_8cDReS.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-CXn0MUer.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-CXn0MUer.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-CsMJW09v.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-CsMJW09v.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-BDCbGsPA.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-BDCbGsPA.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-D2yTJOjM.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-D2yTJOjM.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-Tz0C88U3.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-Tz0C88U3.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-jQMxZKq5.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-jQMxZKq5.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-2zUX8jy7.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-2zUX8jy7.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-sCAKuvLs.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-sCAKuvLs.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-CTk6lY7i.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-CTk6lY7i.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-DxBAsUzR.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-DxBAsUzR.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BgkZXf0x.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BgkZXf0x.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Dq7WTMdT.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Dq7WTMdT.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-35UGLw0C.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-35UGLw0C.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-DQ6C57Dt.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-DQ6C57Dt.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-BPk7EQUD.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-BPk7EQUD.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-DrL3M38a.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-DrL3M38a.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-3olkVCcW.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-3olkVCcW.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-BpjfU0Rf.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-BpjfU0Rf.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-BK4Bp8qS.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-BK4Bp8qS.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-DqWkeMIs.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-DqWkeMIs.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-C8EH6z5q.esm.js +262 -0
- package/dist/chunks/KHR_materials_variants-C8EH6z5q.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-U_7nHGWs.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-U_7nHGWs.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-QCITeTgE.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-QCITeTgE.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-eXcEVVpW.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-eXcEVVpW.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-BjqgHT7P.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-BjqgHT7P.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-CEo8-_n9.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-CEo8-_n9.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-CLakAM7o.esm.min.js +2 -0
- package/dist/chunks/KHR_node_hoverability-CLakAM7o.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-XR4H2sEJ.esm.js +39 -0
- package/dist/chunks/KHR_node_hoverability-XR4H2sEJ.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-D5-Uq040.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-D5-Uq040.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-JpHMpDZy.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-JpHMpDZy.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-CK096eX9.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-CK096eX9.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-JvEhdHQJ.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-JvEhdHQJ.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-ASnRyeyf.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-ASnRyeyf.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-Ci769L7F.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-Ci769L7F.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-Cf0IphHD.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-Cf0IphHD.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-ZytUWg-l.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-ZytUWg-l.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-BjoYL7lC.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-BjoYL7lC.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-Di8nqSDi.esm.js +2200 -0
- package/dist/chunks/MSFT_audio_emitter-Di8nqSDi.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-BMUlo5OU.esm.js +337 -0
- package/dist/chunks/MSFT_lod-BMUlo5OU.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-OG5_k4mO.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-OG5_k4mO.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-CA9_SnEQ.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-CA9_SnEQ.esm.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-DA-GfwSb.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-DA-GfwSb.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-BpXptZ3D.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-BpXptZ3D.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-COm0y2eh.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-COm0y2eh.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-DeyI1KVN.esm.min.js +2 -0
- package/dist/chunks/animationGroup-DeyI1KVN.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-DrsZkXQW.esm.js +2482 -0
- package/dist/chunks/animationGroup-DrsZkXQW.esm.js.map +1 -0
- package/dist/chunks/assetContainer-Cx2Wvxkg.esm.js +1786 -0
- package/dist/chunks/assetContainer-Cx2Wvxkg.esm.js.map +1 -0
- package/dist/chunks/assetContainer-l3mez3br.esm.min.js +2 -0
- package/dist/chunks/assetContainer-l3mez3br.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-CwJYQylG.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-CwJYQylG.esm.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-D5PLG8Vz.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-D5PLG8Vz.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-BNH-2Zvb.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-BNH-2Zvb.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-JW5tEMV8.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-JW5tEMV8.esm.js.map +1 -0
- package/dist/chunks/dds-B1kYpKg4.esm.js +540 -0
- package/dist/chunks/dds-B1kYpKg4.esm.js.map +1 -0
- package/dist/chunks/dds-BIaKvdM8.esm.min.js +2 -0
- package/dist/chunks/dds-BIaKvdM8.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-DHdy4-WN.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-DHdy4-WN.esm.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-DQvH8BPG.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-DQvH8BPG.esm.min.js.map +1 -0
- package/dist/chunks/decalFragment-B07XA08h.esm.min.js +2 -0
- package/dist/chunks/decalFragment-B07XA08h.esm.min.js.map +1 -0
- package/dist/chunks/decalFragment-ClGzoop1.esm.js +18 -0
- package/dist/chunks/decalFragment-ClGzoop1.esm.js.map +1 -0
- package/dist/chunks/default.fragment-CAC3-eH5.esm.min.js +2 -0
- package/dist/chunks/default.fragment-CAC3-eH5.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-Cr0qnYU0.esm.js +446 -0
- package/dist/chunks/default.fragment-Cr0qnYU0.esm.js.map +1 -0
- package/dist/chunks/default.fragment-DJgifW8z.esm.min.js +2 -0
- package/dist/chunks/default.fragment-DJgifW8z.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-uFTw5k6Z.esm.js +515 -0
- package/dist/chunks/default.fragment-uFTw5k6Z.esm.js.map +1 -0
- package/dist/chunks/default.vertex-B_u-vpoR.esm.js +211 -0
- package/dist/chunks/default.vertex-B_u-vpoR.esm.js.map +1 -0
- package/dist/chunks/default.vertex-Bo-YeuPk.esm.min.js +2 -0
- package/dist/chunks/default.vertex-Bo-YeuPk.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-C6LMYeLT.esm.min.js +2 -0
- package/dist/chunks/default.vertex-C6LMYeLT.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-CzuD5tIE.esm.js +190 -0
- package/dist/chunks/default.vertex-CzuD5tIE.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-BSYuerQe.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-BSYuerQe.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-CQJaKPLM.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-CQJaKPLM.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DzRt1iTO.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-DzRt1iTO.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DzpAmCf1.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-DzpAmCf1.esm.js.map +1 -0
- package/dist/chunks/dumpTools-JfWNUHd1.esm.js +200 -0
- package/dist/chunks/dumpTools-JfWNUHd1.esm.js.map +1 -0
- package/dist/chunks/dumpTools-MGQM1tV4.esm.min.js +2 -0
- package/dist/chunks/dumpTools-MGQM1tV4.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-CoD9RkFy.esm.js +64 -0
- package/dist/chunks/envTextureLoader-CoD9RkFy.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-_huqF4Iu.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-_huqF4Iu.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-BFBrSyc_.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-BFBrSyc_.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-DMKf2lIW.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-DMKf2lIW.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-BkuwS0XF.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-BkuwS0XF.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-DxOSgB3m.esm.js +1683 -0
- package/dist/chunks/exrTextureLoader-DxOSgB3m.esm.js.map +1 -0
- package/dist/chunks/fogFragment-CdyzhyDy.esm.min.js +2 -0
- package/dist/chunks/fogFragment-CdyzhyDy.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-Ct0roave.esm.js +101 -0
- package/dist/chunks/fogFragment-Ct0roave.esm.js.map +1 -0
- package/dist/chunks/fogFragment-DjORBY8D.esm.min.js +2 -0
- package/dist/chunks/fogFragment-DjORBY8D.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-DwdRh83Z.esm.js +102 -0
- package/dist/chunks/fogFragment-DwdRh83Z.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-CuDZqiSs.esm.js +12 -0
- package/dist/chunks/fresnelFunction-CuDZqiSs.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-zYzL693r.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-zYzL693r.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-CKBe9bFc.esm.js +7735 -0
- package/dist/chunks/glTFLoader-CKBe9bFc.esm.js.map +1 -0
- package/dist/chunks/glTFLoader-HrDvovFY.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-HrDvovFY.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-D-y1xZvo.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-D-y1xZvo.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-D57wBZJj.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-D57wBZJj.esm.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +2 -0
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +1 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +67 -0
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-8p1AKl3B.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-8p1AKl3B.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-C3M4g6jE.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-C3M4g6jE.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-CoiTSsVa.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-CoiTSsVa.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-HT06ZoZl.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-HT06ZoZl.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-B0kksMif.esm.js +253 -0
- package/dist/chunks/hdrTextureLoader-B0kksMif.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-CnTSpduj.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-CnTSpduj.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-Bq5KkNmT.esm.js +83 -0
- package/dist/chunks/helperFunctions-Bq5KkNmT.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-DauLsm9X.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-DauLsm9X.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-Du6Zsfhy.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-Du6Zsfhy.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-oDSGYqJN.esm.js +110 -0
- package/dist/chunks/helperFunctions-oDSGYqJN.esm.js.map +1 -0
- package/dist/chunks/iesTextureLoader-DdRr77cj.esm.js +189 -0
- package/dist/chunks/iesTextureLoader-DdRr77cj.esm.js.map +1 -0
- package/dist/chunks/iesTextureLoader-DkEckxVj.esm.min.js +2 -0
- package/dist/chunks/iesTextureLoader-DkEckxVj.esm.min.js.map +1 -0
- package/dist/chunks/index-D46Rc8Qa.esm.js +82819 -0
- package/dist/chunks/index-D46Rc8Qa.esm.js.map +1 -0
- package/dist/chunks/index-r5IGv8fd.esm.min.js +57 -0
- package/dist/chunks/index-r5IGv8fd.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-CImJ68er.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-CImJ68er.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-CvQzBtnz.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-CvQzBtnz.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BNJ_qeEv.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-BNJ_qeEv.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-Co9yKHfe.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-Co9yKHfe.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-DP9tYyv7.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-DP9tYyv7.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-KzS73dPG.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-KzS73dPG.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-BBDSLJJg.esm.js +77 -0
- package/dist/chunks/logDepthVertex-BBDSLJJg.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-CHXEv8Hm.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-CHXEv8Hm.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-CkCG5UAD.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-CkCG5UAD.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-DKTOhgu8.esm.js +81 -0
- package/dist/chunks/logDepthVertex-DKTOhgu8.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-BxP2qnf1.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-BxP2qnf1.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-D-YFWEWb.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-D-YFWEWb.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-D5LXIN_s.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-D5LXIN_s.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-DBd0Ca2K.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-DBd0Ca2K.esm.js.map +1 -0
- package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +119 -0
- package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +1 -0
- package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +2 -0
- package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-D7vtpetW.esm.js +26 -0
- package/dist/chunks/meshUboDeclaration-D7vtpetW.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-tb8T5asG.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-tb8T5asG.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-B0XaXxyr.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-B0XaXxyr.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-B1MaGxQt.esm.js +1338 -0
- package/dist/chunks/objFileLoader-B1MaGxQt.esm.js.map +1 -0
- package/dist/chunks/oitFragment-BEKFrqPY.esm.js +1078 -0
- package/dist/chunks/oitFragment-BEKFrqPY.esm.js.map +1 -0
- package/dist/chunks/oitFragment-CJrbQh0i.esm.min.js +2 -0
- package/dist/chunks/oitFragment-CJrbQh0i.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-DCxGblwL.esm.js +1240 -0
- package/dist/chunks/oitFragment-DCxGblwL.esm.js.map +1 -0
- package/dist/chunks/oitFragment-sZA5tkE3.esm.min.js +2 -0
- package/dist/chunks/oitFragment-sZA5tkE3.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-BYDvFFL5.esm.js +15 -0
- package/dist/chunks/pass.fragment-BYDvFFL5.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-BgXOqRns.esm.js +15 -0
- package/dist/chunks/pass.fragment-BgXOqRns.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-DgadxzwS.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-DgadxzwS.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-Dqmp3CRB.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-Dqmp3CRB.esm.min.js.map +1 -0
- package/dist/chunks/passCube.fragment-07CNLnnq.esm.js +34 -0
- package/dist/chunks/passCube.fragment-07CNLnnq.esm.js.map +1 -0
- package/dist/chunks/passCube.fragment-4R2Z-LXR.esm.min.js +2 -0
- package/dist/chunks/passCube.fragment-4R2Z-LXR.esm.min.js.map +1 -0
- package/dist/chunks/passCube.fragment-Aq1scRJ9.esm.js +34 -0
- package/dist/chunks/passCube.fragment-Aq1scRJ9.esm.js.map +1 -0
- package/dist/chunks/passCube.fragment-DiybDNvK.esm.min.js +2 -0
- package/dist/chunks/passCube.fragment-DiybDNvK.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-CBb8vd51.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-CBb8vd51.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-DSUT21Rk.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-DSUT21Rk.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-DmP7eqg7.esm.js +3272 -0
- package/dist/chunks/pbr.fragment-DmP7eqg7.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-DzIZJg6m.esm.js +3225 -0
- package/dist/chunks/pbr.fragment-DzIZJg6m.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex--Lj5Uipt.esm.js +223 -0
- package/dist/chunks/pbr.vertex--Lj5Uipt.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-BScRF6wh.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-BScRF6wh.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-CZSsnbPf.esm.js +348 -0
- package/dist/chunks/pbr.vertex-CZSsnbPf.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-Nho2p99M.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-Nho2p99M.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-B_q6GHTK.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-B_q6GHTK.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-C-ocJcje.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-C-ocJcje.esm.min.js.map +1 -0
- package/dist/chunks/rawTexture-DeYN01jd.esm.min.js +2 -0
- package/dist/chunks/rawTexture-DeYN01jd.esm.min.js.map +1 -0
- package/dist/chunks/rawTexture-Dh4jdTlv.esm.js +191 -0
- package/dist/chunks/rawTexture-Dh4jdTlv.esm.js.map +1 -0
- package/dist/chunks/ray-DMN9ip7z.esm.min.js +2 -0
- package/dist/chunks/ray-DMN9ip7z.esm.min.js.map +1 -0
- package/dist/chunks/ray-QR2k6aJd.esm.js +946 -0
- package/dist/chunks/ray-QR2k6aJd.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-C3AkoFAQ.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-C3AkoFAQ.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-Cok6PVQr.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-Cok6PVQr.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CqcagT1x.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-CqcagT1x.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DRpqF3bE.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-DRpqF3bE.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BLe7imXf.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-BLe7imXf.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-Bi6E_oVW.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-Bi6E_oVW.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-C7hBKPem.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-C7hBKPem.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-C9DicUjD.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-C9DicUjD.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-BzfYte-_.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-BzfYte-_.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-K9RpjB6c.esm.js +3660 -0
- package/dist/chunks/splatFileLoader-K9RpjB6c.esm.js.map +1 -0
- package/dist/chunks/spotLight-CJlK-_c5.esm.min.js +2 -0
- package/dist/chunks/spotLight-CJlK-_c5.esm.min.js.map +1 -0
- package/dist/chunks/spotLight-DxPJdRVZ.esm.js +701 -0
- package/dist/chunks/spotLight-DxPJdRVZ.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-BRKRGk7c.esm.js +1811 -0
- package/dist/chunks/standardMaterial-BRKRGk7c.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-Bs9Jda3X.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-Bs9Jda3X.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-BSGzPo-z.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-BSGzPo-z.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-DtPzeNXZ.esm.js +238 -0
- package/dist/chunks/stlFileLoader-DtPzeNXZ.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-CFjxRPEE.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-CFjxRPEE.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-Ch1a2Rcd.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-Ch1a2Rcd.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-CgfQdxDM.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-CgfQdxDM.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-tQGPk8rE.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-tQGPk8rE.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-BcDvzwMA.esm.js +440 -0
- package/dist/chunks/vertexColorMixing-BcDvzwMA.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-CJeeWCpY.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-CJeeWCpY.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DQESmS2T.esm.js +550 -0
- package/dist/chunks/vertexColorMixing-DQESmS2T.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DlrEyRWJ.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-DlrEyRWJ.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-B8AMUx8i.esm.js +11539 -0
- package/dist/chunks/webgpuEngine-B8AMUx8i.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-CxY3O3Qz.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-CxY3O3Qz.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 +637 -0
- package/lib/index.js +2257 -0
- package/lib/index.js.map +1 -0
- package/package.json +38 -24
- 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":"KHR_draco_mesh_compression-4y3oU3vs.esm.js","sources":["../../../../../dev/core/dist/Meshes/Compression/dracoCompressionWorker.js","../../../../../dev/core/dist/Meshes/Compression/dracoCodec.js","../../../../../dev/core/dist/Meshes/Compression/dracoDecoder.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_draco_mesh_compression.js"],"sourcesContent":["/**\n * @internal\n */\nexport function EncodeMesh(module /** EncoderModule */, attributes, indices, options) {\n const encoderModule = module;\n let encoder = null;\n let meshBuilder = null;\n let mesh = null;\n let encodedNativeBuffer = null;\n const attributeIDs = {}; // Babylon kind -> Draco unique id\n // Double-check that at least a position attribute is provided\n const positionAttribute = attributes.find((a) => a.babylonAttribute === \"position\");\n if (!positionAttribute) {\n throw new Error(\"Position attribute is required for Draco encoding\");\n }\n // If no indices are provided, assume mesh is unindexed. Let's generate them, since Draco meshes require them.\n // TODO: This may be the POINT_CLOUD case, but need to investigate. Should work for now-- just less efficient.\n if (!indices) {\n // Assume position attribute is the largest attribute.\n const positionVerticesCount = positionAttribute.data.length / positionAttribute.size;\n indices = new (positionVerticesCount > 65535 ? Uint32Array : Uint16Array)(positionVerticesCount);\n for (let i = 0; i < positionVerticesCount; i++) {\n indices[i] = i;\n }\n }\n try {\n encoder = new encoderModule.Encoder();\n meshBuilder = new encoderModule.MeshBuilder();\n mesh = new encoderModule.Mesh();\n // Add the faces\n meshBuilder.AddFacesToMesh(mesh, indices.length / 3, indices);\n // Add the attributes\n for (const attribute of attributes) {\n const verticesCount = attribute.data.length / attribute.size;\n attributeIDs[attribute.babylonAttribute] = meshBuilder.AddFloatAttribute(mesh, encoderModule[attribute.dracoAttribute], verticesCount, attribute.size, attribute.data);\n if (options.quantizationBits && options.quantizationBits[attribute.dracoAttribute]) {\n encoder.SetAttributeQuantization(encoderModule[attribute.dracoAttribute], options.quantizationBits[attribute.dracoAttribute]);\n }\n }\n // Set the options\n if (options.method) {\n encoder.SetEncodingMethod(encoderModule[options.method]);\n }\n if (options.encodeSpeed !== undefined && options.decodeSpeed !== undefined) {\n encoder.SetSpeedOptions(options.encodeSpeed, options.decodeSpeed);\n }\n // Encode to native buffer\n encodedNativeBuffer = new encoderModule.DracoInt8Array();\n const encodedLength = encoder.EncodeMeshToDracoBuffer(mesh, encodedNativeBuffer);\n if (encodedLength <= 0) {\n throw new Error(\"Draco encoding failed.\");\n }\n // Copy the native buffer data to worker heap\n const encodedData = new Int8Array(encodedLength);\n for (let i = 0; i < encodedLength; i++) {\n encodedData[i] = encodedNativeBuffer.GetValue(i);\n }\n return { data: encodedData, attributeIDs: attributeIDs };\n }\n finally {\n if (mesh) {\n encoderModule.destroy(mesh);\n }\n if (meshBuilder) {\n encoderModule.destroy(meshBuilder);\n }\n if (encoder) {\n encoderModule.destroy(encoder);\n }\n if (encodedNativeBuffer) {\n encoderModule.destroy(encodedNativeBuffer);\n }\n }\n}\n/**\n * The worker function that gets converted to a blob url to pass into a worker.\n * To be used if a developer wants to create their own worker instance and inject it instead of using the default worker.\n */\nexport function EncoderWorkerFunction() {\n let encoderPromise;\n onmessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"init\": {\n // if URL is provided then load the script. Otherwise expect the script to be loaded already\n if (message.url) {\n importScripts(message.url);\n }\n const initEncoderObject = message.wasmBinary ? { wasmBinary: message.wasmBinary } : {};\n encoderPromise = DracoEncoderModule(initEncoderObject);\n postMessage({ id: \"initDone\" });\n break;\n }\n case \"encodeMesh\": {\n if (!encoderPromise) {\n throw new Error(\"Draco encoder module is not available\");\n }\n encoderPromise.then((encoder) => {\n const result = EncodeMesh(encoder, message.attributes, message.indices, message.options);\n postMessage({ id: \"encodeMeshDone\", encodedMeshData: result }, result ? [result.data.buffer] : undefined);\n });\n break;\n }\n }\n };\n}\n/**\n * @internal\n */\nexport function DecodeMesh(module /** DecoderModule */, data, attributeIDs, onIndicesData, onAttributeData) {\n const decoderModule = module;\n let decoder = null;\n let buffer = null;\n let geometry = null;\n try {\n decoder = new decoderModule.Decoder();\n buffer = new decoderModule.DecoderBuffer();\n buffer.Init(data, data.byteLength);\n let status;\n const type = decoder.GetEncodedGeometryType(buffer);\n switch (type) {\n case decoderModule.TRIANGULAR_MESH: {\n const mesh = new decoderModule.Mesh();\n status = decoder.DecodeBufferToMesh(buffer, mesh);\n if (!status.ok() || mesh.ptr === 0) {\n throw new Error(status.error_msg());\n }\n const numFaces = mesh.num_faces();\n const numIndices = numFaces * 3;\n const byteLength = numIndices * 4;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetTrianglesUInt32Array(mesh, byteLength, ptr);\n const indices = new Uint32Array(numIndices);\n indices.set(new Uint32Array(decoderModule.HEAPF32.buffer, ptr, numIndices));\n onIndicesData(indices);\n }\n finally {\n decoderModule._free(ptr);\n }\n geometry = mesh;\n break;\n }\n case decoderModule.POINT_CLOUD: {\n const pointCloud = new decoderModule.PointCloud();\n status = decoder.DecodeBufferToPointCloud(buffer, pointCloud);\n if (!status.ok() || !pointCloud.ptr) {\n throw new Error(status.error_msg());\n }\n geometry = pointCloud;\n break;\n }\n default: {\n throw new Error(`Invalid geometry type ${type}`);\n }\n }\n const numPoints = geometry.num_points();\n const processAttribute = (decoder, geometry, kind, attribute /** Attribute */) => {\n const dataType = attribute.data_type();\n const numComponents = attribute.num_components();\n const normalized = attribute.normalized();\n const byteStride = attribute.byte_stride();\n const byteOffset = attribute.byte_offset();\n const dataTypeInfo = {\n [decoderModule.DT_FLOAT32]: { typedArrayConstructor: Float32Array, heap: decoderModule.HEAPF32 },\n [decoderModule.DT_INT8]: { typedArrayConstructor: Int8Array, heap: decoderModule.HEAP8 },\n [decoderModule.DT_INT16]: { typedArrayConstructor: Int16Array, heap: decoderModule.HEAP16 },\n [decoderModule.DT_INT32]: { typedArrayConstructor: Int32Array, heap: decoderModule.HEAP32 },\n [decoderModule.DT_UINT8]: { typedArrayConstructor: Uint8Array, heap: decoderModule.HEAPU8 },\n [decoderModule.DT_UINT16]: { typedArrayConstructor: Uint16Array, heap: decoderModule.HEAPU16 },\n [decoderModule.DT_UINT32]: { typedArrayConstructor: Uint32Array, heap: decoderModule.HEAPU32 },\n };\n const info = dataTypeInfo[dataType];\n if (!info) {\n throw new Error(`Invalid data type ${dataType}`);\n }\n const numValues = numPoints * numComponents;\n const byteLength = numValues * info.typedArrayConstructor.BYTES_PER_ELEMENT;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetAttributeDataArrayForAllPoints(geometry, attribute, dataType, byteLength, ptr);\n // this cast seems to be needed because of an issue with typescript, as all constructors do have the ptr and numValues arguments.\n const data = new info.typedArrayConstructor(info.heap.buffer, ptr, numValues);\n onAttributeData(kind, data.slice(), numComponents, byteOffset, byteStride, normalized);\n }\n finally {\n decoderModule._free(ptr);\n }\n };\n if (attributeIDs) {\n for (const kind in attributeIDs) {\n const id = attributeIDs[kind];\n const attribute = decoder.GetAttributeByUniqueId(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n else {\n const dracoAttributeTypes = {\n position: decoderModule.POSITION,\n normal: decoderModule.NORMAL,\n color: decoderModule.COLOR,\n uv: decoderModule.TEX_COORD,\n };\n for (const kind in dracoAttributeTypes) {\n const id = decoder.GetAttributeId(geometry, dracoAttributeTypes[kind]);\n if (id !== -1) {\n const attribute = decoder.GetAttribute(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n }\n return numPoints;\n }\n finally {\n if (geometry) {\n decoderModule.destroy(geometry);\n }\n if (buffer) {\n decoderModule.destroy(buffer);\n }\n if (decoder) {\n decoderModule.destroy(decoder);\n }\n }\n}\n/**\n * The worker function that gets converted to a blob url to pass into a worker.\n * To be used if a developer wants to create their own worker instance and inject it instead of using the default worker.\n */\nexport function DecoderWorkerFunction() {\n let decoderPromise;\n onmessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"init\": {\n // if URL is provided then load the script. Otherwise expect the script to be loaded already\n if (message.url) {\n importScripts(message.url);\n }\n const initDecoderObject = message.wasmBinary ? { wasmBinary: message.wasmBinary } : {};\n decoderPromise = DracoDecoderModule(initDecoderObject);\n postMessage({ id: \"initDone\" });\n break;\n }\n case \"decodeMesh\": {\n if (!decoderPromise) {\n throw new Error(\"Draco decoder module is not available\");\n }\n decoderPromise.then((decoder) => {\n const numPoints = DecodeMesh(decoder, message.dataView, message.attributes, (indices) => {\n postMessage({ id: \"indices\", data: indices }, [indices.buffer]);\n }, (kind, data, size, offset, stride, normalized) => {\n postMessage({ id: \"attribute\", kind, data, size, byteOffset: offset, byteStride: stride, normalized }, [data.buffer]);\n });\n postMessage({ id: \"decodeMeshDone\", totalVertices: numPoints });\n });\n break;\n }\n }\n };\n}\n// For backwards compatibility\nexport { DecoderWorkerFunction as workerFunction };\n/**\n * Initializes a worker that was created for the draco agent pool\n * @param worker The worker to initialize\n * @param wasmBinary The wasm binary to load into the worker\n * @param moduleUrl The url to the draco decoder module (optional)\n * @returns A promise that resolves when the worker is initialized\n */\nexport function initializeWebWorker(worker, wasmBinary, moduleUrl) {\n return new Promise((resolve, reject) => {\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n };\n const onMessage = (event) => {\n if (event.data.id === \"initDone\") {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve(worker);\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n // Load with either JS-only or WASM version\n if (!wasmBinary) {\n worker.postMessage({\n id: \"init\",\n url: moduleUrl,\n });\n }\n else {\n // clone the array buffer to make it transferable\n const clone = wasmBinary.slice(0);\n worker.postMessage({\n id: \"init\",\n url: moduleUrl,\n wasmBinary: clone,\n }, [clone]);\n }\n // note: no transfer list as the ArrayBuffer is shared across main thread and pool workers\n });\n}\n//# sourceMappingURL=dracoCompressionWorker.js.map","import { Tools } from \"../../Misc/tools\";\nimport { AutoReleaseWorkerPool } from \"../../Misc/workerPool\";\nimport { initializeWebWorker } from \"./dracoCompressionWorker\";\n/**\n * @internal\n */\nexport function _GetDefaultNumWorkers() {\n if (typeof navigator !== \"object\" || !navigator.hardwareConcurrency) {\n return 1;\n }\n // Use 50% of the available logical processors but capped at 4.\n return Math.min(Math.floor(navigator.hardwareConcurrency * 0.5), 4);\n}\n/**\n * @internal\n */\nexport function _IsConfigurationAvailable(config) {\n return !!((config.wasmUrl && (config.wasmBinary || config.wasmBinaryUrl) && typeof WebAssembly === \"object\") || config.fallbackUrl);\n // TODO: Account for jsModule\n}\n/**\n * Base class for a Draco codec.\n * @internal\n */\nexport class DracoCodec {\n /**\n * Constructor\n * @param configuration The configuration for the DracoCodec instance.\n */\n constructor(configuration) {\n // check if the codec binary and worker pool was injected\n // Note - it is expected that the developer checked if WebWorker, WebAssembly and the URL object are available\n if (configuration.workerPool) {\n // Set the promise accordingly\n this._workerPoolPromise = Promise.resolve(configuration.workerPool);\n return;\n }\n // to avoid making big changes to the code here, if wasmBinary is provided use it in the wasmBinaryPromise\n const wasmBinaryProvided = configuration.wasmBinary;\n const numberOfWorkers = configuration.numWorkers ?? _GetDefaultNumWorkers();\n const useWorkers = numberOfWorkers && typeof Worker === \"function\" && typeof URL === \"function\";\n const urlNeeded = useWorkers || !configuration.jsModule;\n // code maintained here for back-compat with no changes\n const codecInfo = configuration.wasmUrl && configuration.wasmBinaryUrl && typeof WebAssembly === \"object\"\n ? {\n url: urlNeeded ? Tools.GetBabylonScriptURL(configuration.wasmUrl, true) : \"\",\n wasmBinaryPromise: wasmBinaryProvided\n ? Promise.resolve(wasmBinaryProvided)\n : Tools.LoadFileAsync(Tools.GetBabylonScriptURL(configuration.wasmBinaryUrl, true)),\n }\n : {\n url: urlNeeded ? Tools.GetBabylonScriptURL(configuration.fallbackUrl) : \"\",\n wasmBinaryPromise: Promise.resolve(undefined),\n };\n // If using workers, initialize a worker pool with either the wasm or url?\n if (useWorkers) {\n this._workerPoolPromise = codecInfo.wasmBinaryPromise.then((wasmBinary) => {\n const workerContent = this._getWorkerContent();\n const workerBlobUrl = URL.createObjectURL(new Blob([workerContent], { type: \"application/javascript\" }));\n return new AutoReleaseWorkerPool(numberOfWorkers, () => {\n const worker = new Worker(workerBlobUrl);\n return initializeWebWorker(worker, wasmBinary, codecInfo.url);\n });\n });\n }\n else {\n this._modulePromise = codecInfo.wasmBinaryPromise.then(async (wasmBinary) => {\n if (!this._isModuleAvailable()) {\n if (!configuration.jsModule) {\n if (!codecInfo.url) {\n throw new Error(\"Draco codec module is not available\");\n }\n await Tools.LoadBabylonScriptAsync(codecInfo.url);\n }\n }\n return this._createModuleAsync(wasmBinary, configuration.jsModule);\n });\n }\n }\n /**\n * Returns a promise that resolves when ready. Call this manually to ensure the draco codec is ready before use.\n * @returns a promise that resolves when ready\n */\n async whenReadyAsync() {\n if (this._workerPoolPromise) {\n await this._workerPoolPromise;\n return;\n }\n if (this._modulePromise) {\n await this._modulePromise;\n return;\n }\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n if (this._workerPoolPromise) {\n this._workerPoolPromise.then((workerPool) => {\n workerPool.dispose();\n });\n }\n delete this._workerPoolPromise;\n delete this._modulePromise;\n }\n}\n//# sourceMappingURL=dracoCodec.js.map","import { _IsConfigurationAvailable, DracoCodec } from \"./dracoCodec\";\nimport { Tools } from \"../../Misc/tools\";\nimport { Geometry } from \"../geometry\";\nimport { VertexBuffer } from \"../buffer\";\nimport { Logger } from \"../../Misc/logger\";\nimport { DecodeMesh, DecoderWorkerFunction } from \"./dracoCompressionWorker\";\n/**\n * @experimental This class is an experimental version of `DracoCompression` and is subject to change.\n *\n * Draco Decoder (https://google.github.io/draco/)\n *\n * This class wraps the Draco decoder module.\n *\n * By default, the configuration points to a copy of the Draco decoder files for glTF from the Babylon.js cdn https://cdn.babylonjs.com/draco_wasm_wrapper_gltf.js.\n *\n * To update the configuration, use the following code:\n * ```javascript\n * DracoDecoder.DefaultConfiguration = {\n * wasmUrl: \"<url to the WebAssembly library>\",\n * wasmBinaryUrl: \"<url to the WebAssembly binary>\",\n * fallbackUrl: \"<url to the fallback JavaScript library>\",\n * };\n * ```\n *\n * Draco has two versions, one for WebAssembly and one for JavaScript. The decoder configuration can be set to only support WebAssembly or only support the JavaScript version.\n * Decoding will automatically fallback to the JavaScript version if WebAssembly version is not configured or if WebAssembly is not supported by the browser.\n * Use `DracoDecoder.DefaultAvailable` to determine if the decoder configuration is available for the current context.\n *\n * To decode Draco compressed data, get the default DracoDecoder object and call decodeMeshToGeometryAsync:\n * ```javascript\n * var geometry = await DracoDecoder.Default.decodeMeshToGeometryAsync(data);\n * ```\n */\nexport class DracoDecoder extends DracoCodec {\n /**\n * Returns true if the decoder's `DefaultConfiguration` is available.\n */\n static get DefaultAvailable() {\n return _IsConfigurationAvailable(DracoDecoder.DefaultConfiguration);\n }\n /**\n * Default instance for the DracoDecoder.\n */\n static get Default() {\n DracoDecoder._Default ??= new DracoDecoder();\n return DracoDecoder._Default;\n }\n /**\n * Reset the default DracoDecoder object to null and disposing the removed default instance.\n * Note that if the workerPool is a member of the static DefaultConfiguration object it is recommended not to run dispose,\n * unless the static worker pool is no longer needed.\n * @param skipDispose set to true to not dispose the removed default instance\n */\n static ResetDefault(skipDispose) {\n if (DracoDecoder._Default) {\n if (!skipDispose) {\n DracoDecoder._Default.dispose();\n }\n DracoDecoder._Default = null;\n }\n }\n _isModuleAvailable() {\n return typeof DracoDecoderModule !== \"undefined\";\n }\n async _createModuleAsync(wasmBinary, jsModule /** DracoDecoderModule */) {\n const module = await (jsModule || DracoDecoderModule)({ wasmBinary });\n return { module };\n }\n _getWorkerContent() {\n return `${DecodeMesh}(${DecoderWorkerFunction})()`;\n }\n /**\n * Creates a new Draco decoder.\n * @param configuration Optional override of the configuration for the DracoDecoder. If not provided, defaults to {@link DracoDecoder.DefaultConfiguration}.\n */\n constructor(configuration = DracoDecoder.DefaultConfiguration) {\n super(configuration);\n }\n /**\n * Decode Draco compressed mesh data to mesh data.\n * @param data The ArrayBuffer or ArrayBufferView of the compressed Draco data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @param gltfNormalizedOverride A map of attributes from vertex buffer kinds to normalized flags to override the Draco normalization\n * @returns A promise that resolves with the decoded mesh data\n */\n decodeMeshToMeshDataAsync(data, attributes, gltfNormalizedOverride) {\n const dataView = data instanceof ArrayBuffer ? new Int8Array(data) : new Int8Array(data.buffer, data.byteOffset, data.byteLength);\n const applyGltfNormalizedOverride = (kind, normalized) => {\n if (gltfNormalizedOverride && gltfNormalizedOverride[kind] !== undefined) {\n if (normalized !== gltfNormalizedOverride[kind]) {\n Logger.Warn(`Normalized flag from Draco data (${normalized}) does not match normalized flag from glTF accessor (${gltfNormalizedOverride[kind]}). Using flag from glTF accessor.`);\n }\n return gltfNormalizedOverride[kind];\n }\n else {\n return normalized;\n }\n };\n if (this._workerPoolPromise) {\n return this._workerPoolPromise.then((workerPool) => {\n return new Promise((resolve, reject) => {\n workerPool.push((worker, onComplete) => {\n let resultIndices = null;\n const resultAttributes = [];\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n onComplete();\n };\n const onMessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"indices\": {\n resultIndices = message.data;\n break;\n }\n case \"attribute\": {\n resultAttributes.push({\n kind: message.kind,\n data: message.data,\n size: message.size,\n byteOffset: message.byteOffset,\n byteStride: message.byteStride,\n normalized: applyGltfNormalizedOverride(message.kind, message.normalized),\n });\n break;\n }\n case \"decodeMeshDone\": {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve({ indices: resultIndices, attributes: resultAttributes, totalVertices: message.totalVertices });\n onComplete();\n break;\n }\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n const dataViewCopy = dataView.slice();\n worker.postMessage({ id: \"decodeMesh\", dataView: dataViewCopy, attributes: attributes }, [dataViewCopy.buffer]);\n });\n });\n });\n }\n if (this._modulePromise) {\n return this._modulePromise.then((decoder) => {\n let resultIndices = null;\n const resultAttributes = [];\n const numPoints = DecodeMesh(decoder.module, dataView, attributes, (indices) => {\n resultIndices = indices;\n }, (kind, data, size, byteOffset, byteStride, normalized) => {\n resultAttributes.push({\n kind,\n data,\n size,\n byteOffset,\n byteStride,\n normalized,\n });\n });\n return { indices: resultIndices, attributes: resultAttributes, totalVertices: numPoints };\n });\n }\n throw new Error(\"Draco decoder module is not available\");\n }\n /**\n * Decode Draco compressed mesh data to Babylon geometry.\n * @param name The name to use when creating the geometry\n * @param scene The scene to use when creating the geometry\n * @param data The ArrayBuffer or ArrayBufferView of the Draco compressed data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @returns A promise that resolves with the decoded geometry\n */\n async decodeMeshToGeometryAsync(name, scene, data, attributes) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes);\n const geometry = new Geometry(name, scene);\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n }\n /** @internal */\n async _decodeMeshToGeometryForGltfAsync(name, scene, data, attributes, gltfNormalizedOverride, boundingInfo) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes, gltfNormalizedOverride);\n const geometry = new Geometry(name, scene);\n if (boundingInfo) {\n geometry._boundingInfo = boundingInfo;\n geometry.useBoundingInfoFromGeometry = true;\n }\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n }\n}\n/**\n * Default configuration for the DracoDecoder. Defaults to the following:\n * - numWorkers: 50% of the available logical processors, capped to 4. If no logical processors are available, defaults to 1.\n * - wasmUrl: `\"https://cdn.babylonjs.com/draco_wasm_wrapper_gltf.js\"`\n * - wasmBinaryUrl: `\"https://cdn.babylonjs.com/draco_decoder_gltf.wasm\"`\n * - fallbackUrl: `\"https://cdn.babylonjs.com/draco_decoder_gltf.js\"`\n */\nDracoDecoder.DefaultConfiguration = {\n wasmUrl: `${Tools._DefaultCdnUrl}/draco_wasm_wrapper_gltf.js`,\n wasmBinaryUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.wasm`,\n fallbackUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.js`,\n};\nDracoDecoder._Default = null;\n//# sourceMappingURL=dracoDecoder.js.map","import { DracoDecoder } from \"core/Meshes/Compression/dracoDecoder\";\nimport { VertexBuffer } from \"core/Buffers/buffer\";\nimport { GLTFLoader, ArrayItem, LoadBoundingInfoFromPositionAccessor } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_draco_mesh_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_draco_mesh_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines whether to use the normalized flag from the glTF accessor instead of the Draco data. Defaults to true.\n */\n this.useNormalizedFlagFromAccessor = true;\n this._loader = loader;\n this.enabled = DracoDecoder.DefaultAvailable && this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n delete this.dracoDecoder;\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadVertexDataAsync(context, primitive, babylonMesh) {\n return GLTFLoader.LoadExtensionAsync(context, primitive, this.name, (extensionContext, extension) => {\n if (primitive.mode != undefined) {\n if (primitive.mode !== 4 /* MeshPrimitiveMode.TRIANGLES */ && primitive.mode !== 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */) {\n throw new Error(`${context}: Unsupported mode ${primitive.mode}`);\n }\n }\n const attributes = {};\n const normalized = {};\n const loadAttribute = (name, kind) => {\n const uniqueId = extension.attributes[name];\n if (uniqueId == undefined) {\n return;\n }\n babylonMesh._delayInfo = babylonMesh._delayInfo || [];\n if (babylonMesh._delayInfo.indexOf(kind) === -1) {\n babylonMesh._delayInfo.push(kind);\n }\n attributes[kind] = uniqueId;\n if (this.useNormalizedFlagFromAccessor) {\n const accessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[name]);\n if (accessor) {\n normalized[kind] = accessor.normalized || false;\n }\n }\n };\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind);\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind);\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind);\n loadAttribute(\"TEXCOORD_0\", VertexBuffer.UVKind);\n loadAttribute(\"TEXCOORD_1\", VertexBuffer.UV2Kind);\n loadAttribute(\"TEXCOORD_2\", VertexBuffer.UV3Kind);\n loadAttribute(\"TEXCOORD_3\", VertexBuffer.UV4Kind);\n loadAttribute(\"TEXCOORD_4\", VertexBuffer.UV5Kind);\n loadAttribute(\"TEXCOORD_5\", VertexBuffer.UV6Kind);\n loadAttribute(\"JOINTS_0\", VertexBuffer.MatricesIndicesKind);\n loadAttribute(\"WEIGHTS_0\", VertexBuffer.MatricesWeightsKind);\n loadAttribute(\"COLOR_0\", VertexBuffer.ColorKind);\n const bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView);\n if (!bufferView._dracoBabylonGeometry) {\n bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then((data) => {\n const dracoDecoder = this.dracoDecoder || DracoDecoder.Default;\n const positionAccessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[\"POSITION\"]);\n const babylonBoundingInfo = !this._loader.parent.alwaysComputeBoundingBox && !babylonMesh.skeleton && positionAccessor ? LoadBoundingInfoFromPositionAccessor(positionAccessor) : null;\n return dracoDecoder\n ._decodeMeshToGeometryForGltfAsync(babylonMesh.name, this._loader.babylonScene, data, attributes, normalized, babylonBoundingInfo)\n .catch((error) => {\n throw new Error(`${context}: ${error.message}`);\n });\n });\n }\n return bufferView._dracoBabylonGeometry;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_draco_mesh_compression(loader));\n//# sourceMappingURL=KHR_draco_mesh_compression.js.map"],"names":[],"mappings":";;;;;;;AAAA;AACA;AACA;AAwGA;AACA;AACA;AACO,SAAS,UAAU,CAAC,MAAM,uBAAuB,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE;AAC5G,IAAI,MAAM,aAAa,GAAG,MAAM;AAChC,IAAI,IAAI,OAAO,GAAG,IAAI;AACtB,IAAI,IAAI,MAAM,GAAG,IAAI;AACrB,IAAI,IAAI,QAAQ,GAAG,IAAI;AACvB,IAAI,IAAI;AACR,QAAQ,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,EAAE;AAC7C,QAAQ,MAAM,GAAG,IAAI,aAAa,CAAC,aAAa,EAAE;AAClD,QAAQ,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC;AAC1C,QAAQ,IAAI,MAAM;AAClB,QAAQ,MAAM,IAAI,GAAG,OAAO,CAAC,sBAAsB,CAAC,MAAM,CAAC;AAC3D,QAAQ,QAAQ,IAAI;AACpB,YAAY,KAAK,aAAa,CAAC,eAAe,EAAE;AAChD,gBAAgB,MAAM,IAAI,GAAG,IAAI,aAAa,CAAC,IAAI,EAAE;AACrD,gBAAgB,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC;AACjE,gBAAgB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,EAAE;AACpD,oBAAoB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;AACvD;AACA,gBAAgB,MAAM,QAA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AoB,OAAO;AAC3B,yBAAyB,iCAAiC,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB;AACzJ,yBAAyB,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1C,wBAAwB,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACvE,qBAAqB,CAAC;AACtB,iBAAiB,CAAC;AAClB;AACA,YAAY,OAAO,UAAU,CAAC,qBAAqB;AACnD,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,0BAA0B,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{T as e,z as r,V as t,L as o,aV as s,aW as n}from"./index-r5IGv8fd.esm.min.js";import{A as a}from"./workerPool-BWHiDmEZ.esm.min.js";import{G as i,A as d,L as l}from"./glTFLoader-HrDvovFY.esm.min.js";import"./rawTexture-DeYN01jd.esm.min.js";import"./assetContainer-l3mez3br.esm.min.js";import"./glTFLoaderAnimation-D-y1xZvo.esm.min.js";function c(e,r,t,o,s){const n=e;let a=null,i=null,d=null;try{let e;a=new n.Decoder,i=new n.DecoderBuffer,i.Init(r,r.byteLength);const l=a.GetEncodedGeometryType(i);switch(l){case n.TRIANGULAR_MESH:{const r=new n.Mesh;if(e=a.DecodeBufferToMesh(i,r),!e.ok()||0===r.ptr)throw new Error(e.error_msg());const t=3*r.num_faces(),s=4*t,l=n._malloc(s);try{a.GetTrianglesUInt32Array(r,s,l);const e=new Uint32Array(t);e.set(new Uint32Array(n.HEAPF32.buffer,l,t)),o(e)}finally{n._free(l)}d=r;break}case n.POINT_CLOUD:{const r=new n.PointCloud;if(e=a.DecodeBufferToPointCloud(i,r),!e.ok()||!r.ptr)throw new Error(e.error_msg());d=r;break}default:throw new Error(`Invalid geometry type ${l}`)}const c=d.num_points(),u=(e,r,t,o)=>{const a=o.data_type(),i=o.num_components(),d=o.normalized(),l=o.byte_stride(),u=o.byte_offset(),m={[n.DT_FLOAT32]:{typedArrayConstructor:Float32Array,heap:n.HEAPF32},[n.DT_INT8]:{typedArrayConstructor:Int8Array,heap:n.HEAP8},[n.DT_INT16]:{typedArrayConstructor:Int16Array,heap:n.HEAP16},[n.DT_INT32]:{typedArrayConstructor:Int32Array,heap:n.HEAP32},[n.DT_UINT8]:{typedArrayConstructor:Uint8Array,heap:n.HEAPU8},[n.DT_UINT16]:{typedArrayConstructor:Uint16Array,heap:n.HEAPU16},[n.DT_UINT32]:{typedArrayConstructor:Uint32Array,heap:n.HEAPU32}}[a];if(!m)throw new Error(`Invalid data type ${a}`);const f=c*i,y=f*m.typedArrayConstructor.BYTES_PER_ELEMENT,h=n._malloc(y);try{e.GetAttributeDataArrayForAllPoints(r,o,a,y,h);const n=new m.typedArrayConstructor(m.heap.buffer,h,f);s(t,n.slice(),i,u,l,d)}finally{n._free(h)}};if(t)for(const e in t){const r=t[e],o=a.GetAttributeByUniqueId(d,r);u(a,d,e,o)}else{const e={position:n.POSITION,normal:n.NORMAL,color:n.COLOR,uv:n.TEX_COORD};for(const r in e){const t=a.GetAttributeId(d,e[r]);if(-1!==t){const e=a.GetAttribute(d,t);u(a,d,r,e)}}}return c}finally{d&&n.destroy(d),i&&n.destroy(i),a&&n.destroy(a)}}function u(){let e;onmessage=r=>{const t=r.data;switch(t.id){case"init":{t.url&&importScripts(t.url);const r=t.wasmBinary?{wasmBinary:t.wasmBinary}:{};e=DracoDecoderModule(r),postMessage({id:"initDone"});break}case"decodeMesh":if(!e)throw new Error("Draco decoder module is not available");e.then((e=>{const r=c(e,t.dataView,t.attributes,(e=>{postMessage({id:"indices",data:e},[e.buffer])}),((e,r,t,o,s,n)=>{postMessage({id:"attribute",kind:e,data:r,size:t,byteOffset:o,byteStride:s,normalized:n},[r.buffer])}));postMessage({id:"decodeMeshDone",totalVertices:r})}))}}}class m{constructor(r){if(r.workerPool)return void(this._workerPoolPromise=Promise.resolve(r.workerPool));const t=r.wasmBinary,o=r.numWorkers??("object"==typeof navigator&&navigator.hardwareConcurrency?Math.min(Math.floor(.5*navigator.hardwareConcurrency),4):1),s=o&&"function"==typeof Worker&&"function"==typeof URL,n=s||!r.jsModule,i=r.wasmUrl&&r.wasmBinaryUrl&&"object"==typeof WebAssembly?{url:n?e.GetBabylonScriptURL(r.wasmUrl,!0):"",wasmBinaryPromise:t?Promise.resolve(t):e.LoadFileAsync(e.GetBabylonScriptURL(r.wasmBinaryUrl,!0))}:{url:n?e.GetBabylonScriptURL(r.fallbackUrl):"",wasmBinaryPromise:Promise.resolve(void 0)};s?this._workerPoolPromise=i.wasmBinaryPromise.then((e=>{const r=this._getWorkerContent(),t=URL.createObjectURL(new Blob([r],{type:"application/javascript"}));return new a(o,(()=>function(e,r,t){return new Promise(((o,s)=>{const n=r=>{e.removeEventListener("error",n),e.removeEventListener("message",a),s(r)},a=r=>{"initDone"===r.data.id&&(e.removeEventListener("error",n),e.removeEventListener("message",a),o(e))};if(e.addEventListener("error",n),e.addEventListener("message",a),r){const o=r.slice(0);e.postMessage({id:"init",url:t,wasmBinary:o},[o])}else e.postMessage({id:"init",url:t})}))}(new Worker(t),e,i.url)))})):this._modulePromise=i.wasmBinaryPromise.then((async t=>{if(!this._isModuleAvailable()&&!r.jsModule){if(!i.url)throw new Error("Draco codec module is not available");await e.LoadBabylonScriptAsync(i.url)}return this._createModuleAsync(t,r.jsModule)}))}async whenReadyAsync(){this._workerPoolPromise?await this._workerPoolPromise:this._modulePromise&&await this._modulePromise}dispose(){this._workerPoolPromise&&this._workerPoolPromise.then((e=>{e.dispose()})),delete this._workerPoolPromise,delete this._modulePromise}}class f extends m{static get DefaultAvailable(){return!!((e=f.DefaultConfiguration).wasmUrl&&(e.wasmBinary||e.wasmBinaryUrl)&&"object"==typeof WebAssembly||e.fallbackUrl);var e}static get Default(){return f._Default??=new f,f._Default}static ResetDefault(e){f._Default&&(e||f._Default.dispose(),f._Default=null)}_isModuleAvailable(){return"undefined"!=typeof DracoDecoderModule}async _createModuleAsync(e,r){return{module:await(r||DracoDecoderModule)({wasmBinary:e})}}_getWorkerContent(){return`${c}(${u})()`}constructor(e=f.DefaultConfiguration){super(e)}decodeMeshToMeshDataAsync(e,r,t){const s=e instanceof ArrayBuffer?new Int8Array(e):new Int8Array(e.buffer,e.byteOffset,e.byteLength);if(this._workerPoolPromise)return this._workerPoolPromise.then((e=>new Promise(((n,a)=>{e.push(((e,i)=>{let d=null;const l=[],c=r=>{e.removeEventListener("error",c),e.removeEventListener("message",u),a(r),i()},u=r=>{const s=r.data;switch(s.id){case"indices":d=s.data;break;case"attribute":l.push({kind:s.kind,data:s.data,size:s.size,byteOffset:s.byteOffset,byteStride:s.byteStride,normalized:(a=s.kind,m=s.normalized,t&&void 0!==t[a]?(m!==t[a]&&o.Warn(`Normalized flag from Draco data (${m}) does not match normalized flag from glTF accessor (${t[a]}). Using flag from glTF accessor.`),t[a]):m)});break;case"decodeMeshDone":e.removeEventListener("error",c),e.removeEventListener("message",u),n({indices:d,attributes:l,totalVertices:s.totalVertices}),i()}var a,m};e.addEventListener("error",c),e.addEventListener("message",u);const m=s.slice();e.postMessage({id:"decodeMesh",dataView:m,attributes:r},[m.buffer])}))}))));if(this._modulePromise)return this._modulePromise.then((e=>{let t=null;const o=[],n=c(e.module,s,r,(e=>{t=e}),((e,r,t,s,n,a)=>{o.push({kind:e,data:r,size:t,byteOffset:s,byteStride:n,normalized:a})}));return{indices:t,attributes:o,totalVertices:n}}));throw new Error("Draco decoder module is not available")}async decodeMeshToGeometryAsync(e,o,s,n){const a=await this.decodeMeshToMeshDataAsync(s,n),i=new r(e,o);a.indices&&i.setIndices(a.indices);for(const e of a.attributes)i.setVerticesBuffer(new t(o.getEngine(),e.data,e.kind,!1,void 0,e.byteStride,void 0,e.byteOffset,e.size,void 0,e.normalized,!0),a.totalVertices);return i}async _decodeMeshToGeometryForGltfAsync(e,o,s,n,a,i){const d=await this.decodeMeshToMeshDataAsync(s,n,a),l=new r(e,o);i&&(l._boundingInfo=i,l.useBoundingInfoFromGeometry=!0),d.indices&&l.setIndices(d.indices);for(const e of d.attributes)l.setVerticesBuffer(new t(o.getEngine(),e.data,e.kind,!1,void 0,e.byteStride,void 0,e.byteOffset,e.size,void 0,e.normalized,!0),d.totalVertices);return l}}f.DefaultConfiguration={wasmUrl:`${e._DefaultCdnUrl}/draco_wasm_wrapper_gltf.js`,wasmBinaryUrl:`${e._DefaultCdnUrl}/draco_decoder_gltf.wasm`,fallbackUrl:`${e._DefaultCdnUrl}/draco_decoder_gltf.js`},f._Default=null;const y="KHR_draco_mesh_compression";class h{constructor(e){this.name=y,this.useNormalizedFlagFromAccessor=!0,this._loader=e,this.enabled=f.DefaultAvailable&&this._loader.isExtensionUsed(y)}dispose(){delete this.dracoDecoder,this._loader=null}_loadVertexDataAsync(e,r,o){return i.LoadExtensionAsync(e,r,this.name,((s,n)=>{if(null!=r.mode&&4!==r.mode&&5!==r.mode)throw new Error(`${e}: Unsupported mode ${r.mode}`);const a={},i={},c=(e,t)=>{const s=n.attributes[e];if(null!=s&&(o._delayInfo=o._delayInfo||[],-1===o._delayInfo.indexOf(t)&&o._delayInfo.push(t),a[t]=s,this.useNormalizedFlagFromAccessor)){const o=d.TryGet(this._loader.gltf.accessors,r.attributes[e]);o&&(i[t]=o.normalized||!1)}};c("POSITION",t.PositionKind),c("NORMAL",t.NormalKind),c("TANGENT",t.TangentKind),c("TEXCOORD_0",t.UVKind),c("TEXCOORD_1",t.UV2Kind),c("TEXCOORD_2",t.UV3Kind),c("TEXCOORD_3",t.UV4Kind),c("TEXCOORD_4",t.UV5Kind),c("TEXCOORD_5",t.UV6Kind),c("JOINTS_0",t.MatricesIndicesKind),c("WEIGHTS_0",t.MatricesWeightsKind),c("COLOR_0",t.ColorKind);const u=d.Get(s,this._loader.gltf.bufferViews,n.bufferView);return u._dracoBabylonGeometry||(u._dracoBabylonGeometry=this._loader.loadBufferViewAsync(`/bufferViews/${u.index}`,u).then((t=>{const s=this.dracoDecoder||f.Default,n=d.TryGet(this._loader.gltf.accessors,r.attributes.POSITION),c=this._loader.parent.alwaysComputeBoundingBox||o.skeleton||!n?null:l(n);return s._decodeMeshToGeometryForGltfAsync(o.name,this._loader.babylonScene,t,a,i,c).catch((r=>{throw new Error(`${e}: ${r.message}`)}))}))),u._dracoBabylonGeometry}))}}s(y),n(y,!0,(e=>new h(e)));export{h as KHR_draco_mesh_compression};
|
|
2
|
+
//# sourceMappingURL=KHR_draco_mesh_compression-OUEmCF9O.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_draco_mesh_compression-OUEmCF9O.esm.min.js","sources":["../../../../../dev/core/dist/Meshes/Compression/dracoCompressionWorker.js","../../../../../dev/core/dist/Meshes/Compression/dracoCodec.js","../../../../../dev/core/dist/Meshes/Compression/dracoDecoder.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_draco_mesh_compression.js"],"sourcesContent":["/**\n * @internal\n */\nexport function EncodeMesh(module /** EncoderModule */, attributes, indices, options) {\n const encoderModule = module;\n let encoder = null;\n let meshBuilder = null;\n let mesh = null;\n let encodedNativeBuffer = null;\n const attributeIDs = {}; // Babylon kind -> Draco unique id\n // Double-check that at least a position attribute is provided\n const positionAttribute = attributes.find((a) => a.babylonAttribute === \"position\");\n if (!positionAttribute) {\n throw new Error(\"Position attribute is required for Draco encoding\");\n }\n // If no indices are provided, assume mesh is unindexed. Let's generate them, since Draco meshes require them.\n // TODO: This may be the POINT_CLOUD case, but need to investigate. Should work for now-- just less efficient.\n if (!indices) {\n // Assume position attribute is the largest attribute.\n const positionVerticesCount = positionAttribute.data.length / positionAttribute.size;\n indices = new (positionVerticesCount > 65535 ? Uint32Array : Uint16Array)(positionVerticesCount);\n for (let i = 0; i < positionVerticesCount; i++) {\n indices[i] = i;\n }\n }\n try {\n encoder = new encoderModule.Encoder();\n meshBuilder = new encoderModule.MeshBuilder();\n mesh = new encoderModule.Mesh();\n // Add the faces\n meshBuilder.AddFacesToMesh(mesh, indices.length / 3, indices);\n // Add the attributes\n for (const attribute of attributes) {\n const verticesCount = attribute.data.length / attribute.size;\n attributeIDs[attribute.babylonAttribute] = meshBuilder.AddFloatAttribute(mesh, encoderModule[attribute.dracoAttribute], verticesCount, attribute.size, attribute.data);\n if (options.quantizationBits && options.quantizationBits[attribute.dracoAttribute]) {\n encoder.SetAttributeQuantization(encoderModule[attribute.dracoAttribute], options.quantizationBits[attribute.dracoAttribute]);\n }\n }\n // Set the options\n if (options.method) {\n encoder.SetEncodingMethod(encoderModule[options.method]);\n }\n if (options.encodeSpeed !== undefined && options.decodeSpeed !== undefined) {\n encoder.SetSpeedOptions(options.encodeSpeed, options.decodeSpeed);\n }\n // Encode to native buffer\n encodedNativeBuffer = new encoderModule.DracoInt8Array();\n const encodedLength = encoder.EncodeMeshToDracoBuffer(mesh, encodedNativeBuffer);\n if (encodedLength <= 0) {\n throw new Error(\"Draco encoding failed.\");\n }\n // Copy the native buffer data to worker heap\n const encodedData = new Int8Array(encodedLength);\n for (let i = 0; i < encodedLength; i++) {\n encodedData[i] = encodedNativeBuffer.GetValue(i);\n }\n return { data: encodedData, attributeIDs: attributeIDs };\n }\n finally {\n if (mesh) {\n encoderModule.destroy(mesh);\n }\n if (meshBuilder) {\n encoderModule.destroy(meshBuilder);\n }\n if (encoder) {\n encoderModule.destroy(encoder);\n }\n if (encodedNativeBuffer) {\n encoderModule.destroy(encodedNativeBuffer);\n }\n }\n}\n/**\n * The worker function that gets converted to a blob url to pass into a worker.\n * To be used if a developer wants to create their own worker instance and inject it instead of using the default worker.\n */\nexport function EncoderWorkerFunction() {\n let encoderPromise;\n onmessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"init\": {\n // if URL is provided then load the script. Otherwise expect the script to be loaded already\n if (message.url) {\n importScripts(message.url);\n }\n const initEncoderObject = message.wasmBinary ? { wasmBinary: message.wasmBinary } : {};\n encoderPromise = DracoEncoderModule(initEncoderObject);\n postMessage({ id: \"initDone\" });\n break;\n }\n case \"encodeMesh\": {\n if (!encoderPromise) {\n throw new Error(\"Draco encoder module is not available\");\n }\n encoderPromise.then((encoder) => {\n const result = EncodeMesh(encoder, message.attributes, message.indices, message.options);\n postMessage({ id: \"encodeMeshDone\", encodedMeshData: result }, result ? [result.data.buffer] : undefined);\n });\n break;\n }\n }\n };\n}\n/**\n * @internal\n */\nexport function DecodeMesh(module /** DecoderModule */, data, attributeIDs, onIndicesData, onAttributeData) {\n const decoderModule = module;\n let decoder = null;\n let buffer = null;\n let geometry = null;\n try {\n decoder = new decoderModule.Decoder();\n buffer = new decoderModule.DecoderBuffer();\n buffer.Init(data, data.byteLength);\n let status;\n const type = decoder.GetEncodedGeometryType(buffer);\n switch (type) {\n case decoderModule.TRIANGULAR_MESH: {\n const mesh = new decoderModule.Mesh();\n status = decoder.DecodeBufferToMesh(buffer, mesh);\n if (!status.ok() || mesh.ptr === 0) {\n throw new Error(status.error_msg());\n }\n const numFaces = mesh.num_faces();\n const numIndices = numFaces * 3;\n const byteLength = numIndices * 4;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetTrianglesUInt32Array(mesh, byteLength, ptr);\n const indices = new Uint32Array(numIndices);\n indices.set(new Uint32Array(decoderModule.HEAPF32.buffer, ptr, numIndices));\n onIndicesData(indices);\n }\n finally {\n decoderModule._free(ptr);\n }\n geometry = mesh;\n break;\n }\n case decoderModule.POINT_CLOUD: {\n const pointCloud = new decoderModule.PointCloud();\n status = decoder.DecodeBufferToPointCloud(buffer, pointCloud);\n if (!status.ok() || !pointCloud.ptr) {\n throw new Error(status.error_msg());\n }\n geometry = pointCloud;\n break;\n }\n default: {\n throw new Error(`Invalid geometry type ${type}`);\n }\n }\n const numPoints = geometry.num_points();\n const processAttribute = (decoder, geometry, kind, attribute /** Attribute */) => {\n const dataType = attribute.data_type();\n const numComponents = attribute.num_components();\n const normalized = attribute.normalized();\n const byteStride = attribute.byte_stride();\n const byteOffset = attribute.byte_offset();\n const dataTypeInfo = {\n [decoderModule.DT_FLOAT32]: { typedArrayConstructor: Float32Array, heap: decoderModule.HEAPF32 },\n [decoderModule.DT_INT8]: { typedArrayConstructor: Int8Array, heap: decoderModule.HEAP8 },\n [decoderModule.DT_INT16]: { typedArrayConstructor: Int16Array, heap: decoderModule.HEAP16 },\n [decoderModule.DT_INT32]: { typedArrayConstructor: Int32Array, heap: decoderModule.HEAP32 },\n [decoderModule.DT_UINT8]: { typedArrayConstructor: Uint8Array, heap: decoderModule.HEAPU8 },\n [decoderModule.DT_UINT16]: { typedArrayConstructor: Uint16Array, heap: decoderModule.HEAPU16 },\n [decoderModule.DT_UINT32]: { typedArrayConstructor: Uint32Array, heap: decoderModule.HEAPU32 },\n };\n const info = dataTypeInfo[dataType];\n if (!info) {\n throw new Error(`Invalid data type ${dataType}`);\n }\n const numValues = numPoints * numComponents;\n const byteLength = numValues * info.typedArrayConstructor.BYTES_PER_ELEMENT;\n const ptr = decoderModule._malloc(byteLength);\n try {\n decoder.GetAttributeDataArrayForAllPoints(geometry, attribute, dataType, byteLength, ptr);\n // this cast seems to be needed because of an issue with typescript, as all constructors do have the ptr and numValues arguments.\n const data = new info.typedArrayConstructor(info.heap.buffer, ptr, numValues);\n onAttributeData(kind, data.slice(), numComponents, byteOffset, byteStride, normalized);\n }\n finally {\n decoderModule._free(ptr);\n }\n };\n if (attributeIDs) {\n for (const kind in attributeIDs) {\n const id = attributeIDs[kind];\n const attribute = decoder.GetAttributeByUniqueId(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n else {\n const dracoAttributeTypes = {\n position: decoderModule.POSITION,\n normal: decoderModule.NORMAL,\n color: decoderModule.COLOR,\n uv: decoderModule.TEX_COORD,\n };\n for (const kind in dracoAttributeTypes) {\n const id = decoder.GetAttributeId(geometry, dracoAttributeTypes[kind]);\n if (id !== -1) {\n const attribute = decoder.GetAttribute(geometry, id);\n processAttribute(decoder, geometry, kind, attribute);\n }\n }\n }\n return numPoints;\n }\n finally {\n if (geometry) {\n decoderModule.destroy(geometry);\n }\n if (buffer) {\n decoderModule.destroy(buffer);\n }\n if (decoder) {\n decoderModule.destroy(decoder);\n }\n }\n}\n/**\n * The worker function that gets converted to a blob url to pass into a worker.\n * To be used if a developer wants to create their own worker instance and inject it instead of using the default worker.\n */\nexport function DecoderWorkerFunction() {\n let decoderPromise;\n onmessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"init\": {\n // if URL is provided then load the script. Otherwise expect the script to be loaded already\n if (message.url) {\n importScripts(message.url);\n }\n const initDecoderObject = message.wasmBinary ? { wasmBinary: message.wasmBinary } : {};\n decoderPromise = DracoDecoderModule(initDecoderObject);\n postMessage({ id: \"initDone\" });\n break;\n }\n case \"decodeMesh\": {\n if (!decoderPromise) {\n throw new Error(\"Draco decoder module is not available\");\n }\n decoderPromise.then((decoder) => {\n const numPoints = DecodeMesh(decoder, message.dataView, message.attributes, (indices) => {\n postMessage({ id: \"indices\", data: indices }, [indices.buffer]);\n }, (kind, data, size, offset, stride, normalized) => {\n postMessage({ id: \"attribute\", kind, data, size, byteOffset: offset, byteStride: stride, normalized }, [data.buffer]);\n });\n postMessage({ id: \"decodeMeshDone\", totalVertices: numPoints });\n });\n break;\n }\n }\n };\n}\n// For backwards compatibility\nexport { DecoderWorkerFunction as workerFunction };\n/**\n * Initializes a worker that was created for the draco agent pool\n * @param worker The worker to initialize\n * @param wasmBinary The wasm binary to load into the worker\n * @param moduleUrl The url to the draco decoder module (optional)\n * @returns A promise that resolves when the worker is initialized\n */\nexport function initializeWebWorker(worker, wasmBinary, moduleUrl) {\n return new Promise((resolve, reject) => {\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n };\n const onMessage = (event) => {\n if (event.data.id === \"initDone\") {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve(worker);\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n // Load with either JS-only or WASM version\n if (!wasmBinary) {\n worker.postMessage({\n id: \"init\",\n url: moduleUrl,\n });\n }\n else {\n // clone the array buffer to make it transferable\n const clone = wasmBinary.slice(0);\n worker.postMessage({\n id: \"init\",\n url: moduleUrl,\n wasmBinary: clone,\n }, [clone]);\n }\n // note: no transfer list as the ArrayBuffer is shared across main thread and pool workers\n });\n}\n//# sourceMappingURL=dracoCompressionWorker.js.map","import { Tools } from \"../../Misc/tools\";\nimport { AutoReleaseWorkerPool } from \"../../Misc/workerPool\";\nimport { initializeWebWorker } from \"./dracoCompressionWorker\";\n/**\n * @internal\n */\nexport function _GetDefaultNumWorkers() {\n if (typeof navigator !== \"object\" || !navigator.hardwareConcurrency) {\n return 1;\n }\n // Use 50% of the available logical processors but capped at 4.\n return Math.min(Math.floor(navigator.hardwareConcurrency * 0.5), 4);\n}\n/**\n * @internal\n */\nexport function _IsConfigurationAvailable(config) {\n return !!((config.wasmUrl && (config.wasmBinary || config.wasmBinaryUrl) && typeof WebAssembly === \"object\") || config.fallbackUrl);\n // TODO: Account for jsModule\n}\n/**\n * Base class for a Draco codec.\n * @internal\n */\nexport class DracoCodec {\n /**\n * Constructor\n * @param configuration The configuration for the DracoCodec instance.\n */\n constructor(configuration) {\n // check if the codec binary and worker pool was injected\n // Note - it is expected that the developer checked if WebWorker, WebAssembly and the URL object are available\n if (configuration.workerPool) {\n // Set the promise accordingly\n this._workerPoolPromise = Promise.resolve(configuration.workerPool);\n return;\n }\n // to avoid making big changes to the code here, if wasmBinary is provided use it in the wasmBinaryPromise\n const wasmBinaryProvided = configuration.wasmBinary;\n const numberOfWorkers = configuration.numWorkers ?? _GetDefaultNumWorkers();\n const useWorkers = numberOfWorkers && typeof Worker === \"function\" && typeof URL === \"function\";\n const urlNeeded = useWorkers || !configuration.jsModule;\n // code maintained here for back-compat with no changes\n const codecInfo = configuration.wasmUrl && configuration.wasmBinaryUrl && typeof WebAssembly === \"object\"\n ? {\n url: urlNeeded ? Tools.GetBabylonScriptURL(configuration.wasmUrl, true) : \"\",\n wasmBinaryPromise: wasmBinaryProvided\n ? Promise.resolve(wasmBinaryProvided)\n : Tools.LoadFileAsync(Tools.GetBabylonScriptURL(configuration.wasmBinaryUrl, true)),\n }\n : {\n url: urlNeeded ? Tools.GetBabylonScriptURL(configuration.fallbackUrl) : \"\",\n wasmBinaryPromise: Promise.resolve(undefined),\n };\n // If using workers, initialize a worker pool with either the wasm or url?\n if (useWorkers) {\n this._workerPoolPromise = codecInfo.wasmBinaryPromise.then((wasmBinary) => {\n const workerContent = this._getWorkerContent();\n const workerBlobUrl = URL.createObjectURL(new Blob([workerContent], { type: \"application/javascript\" }));\n return new AutoReleaseWorkerPool(numberOfWorkers, () => {\n const worker = new Worker(workerBlobUrl);\n return initializeWebWorker(worker, wasmBinary, codecInfo.url);\n });\n });\n }\n else {\n this._modulePromise = codecInfo.wasmBinaryPromise.then(async (wasmBinary) => {\n if (!this._isModuleAvailable()) {\n if (!configuration.jsModule) {\n if (!codecInfo.url) {\n throw new Error(\"Draco codec module is not available\");\n }\n await Tools.LoadBabylonScriptAsync(codecInfo.url);\n }\n }\n return this._createModuleAsync(wasmBinary, configuration.jsModule);\n });\n }\n }\n /**\n * Returns a promise that resolves when ready. Call this manually to ensure the draco codec is ready before use.\n * @returns a promise that resolves when ready\n */\n async whenReadyAsync() {\n if (this._workerPoolPromise) {\n await this._workerPoolPromise;\n return;\n }\n if (this._modulePromise) {\n await this._modulePromise;\n return;\n }\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n if (this._workerPoolPromise) {\n this._workerPoolPromise.then((workerPool) => {\n workerPool.dispose();\n });\n }\n delete this._workerPoolPromise;\n delete this._modulePromise;\n }\n}\n//# sourceMappingURL=dracoCodec.js.map","import { _IsConfigurationAvailable, DracoCodec } from \"./dracoCodec\";\nimport { Tools } from \"../../Misc/tools\";\nimport { Geometry } from \"../geometry\";\nimport { VertexBuffer } from \"../buffer\";\nimport { Logger } from \"../../Misc/logger\";\nimport { DecodeMesh, DecoderWorkerFunction } from \"./dracoCompressionWorker\";\n/**\n * @experimental This class is an experimental version of `DracoCompression` and is subject to change.\n *\n * Draco Decoder (https://google.github.io/draco/)\n *\n * This class wraps the Draco decoder module.\n *\n * By default, the configuration points to a copy of the Draco decoder files for glTF from the Babylon.js cdn https://cdn.babylonjs.com/draco_wasm_wrapper_gltf.js.\n *\n * To update the configuration, use the following code:\n * ```javascript\n * DracoDecoder.DefaultConfiguration = {\n * wasmUrl: \"<url to the WebAssembly library>\",\n * wasmBinaryUrl: \"<url to the WebAssembly binary>\",\n * fallbackUrl: \"<url to the fallback JavaScript library>\",\n * };\n * ```\n *\n * Draco has two versions, one for WebAssembly and one for JavaScript. The decoder configuration can be set to only support WebAssembly or only support the JavaScript version.\n * Decoding will automatically fallback to the JavaScript version if WebAssembly version is not configured or if WebAssembly is not supported by the browser.\n * Use `DracoDecoder.DefaultAvailable` to determine if the decoder configuration is available for the current context.\n *\n * To decode Draco compressed data, get the default DracoDecoder object and call decodeMeshToGeometryAsync:\n * ```javascript\n * var geometry = await DracoDecoder.Default.decodeMeshToGeometryAsync(data);\n * ```\n */\nexport class DracoDecoder extends DracoCodec {\n /**\n * Returns true if the decoder's `DefaultConfiguration` is available.\n */\n static get DefaultAvailable() {\n return _IsConfigurationAvailable(DracoDecoder.DefaultConfiguration);\n }\n /**\n * Default instance for the DracoDecoder.\n */\n static get Default() {\n DracoDecoder._Default ??= new DracoDecoder();\n return DracoDecoder._Default;\n }\n /**\n * Reset the default DracoDecoder object to null and disposing the removed default instance.\n * Note that if the workerPool is a member of the static DefaultConfiguration object it is recommended not to run dispose,\n * unless the static worker pool is no longer needed.\n * @param skipDispose set to true to not dispose the removed default instance\n */\n static ResetDefault(skipDispose) {\n if (DracoDecoder._Default) {\n if (!skipDispose) {\n DracoDecoder._Default.dispose();\n }\n DracoDecoder._Default = null;\n }\n }\n _isModuleAvailable() {\n return typeof DracoDecoderModule !== \"undefined\";\n }\n async _createModuleAsync(wasmBinary, jsModule /** DracoDecoderModule */) {\n const module = await (jsModule || DracoDecoderModule)({ wasmBinary });\n return { module };\n }\n _getWorkerContent() {\n return `${DecodeMesh}(${DecoderWorkerFunction})()`;\n }\n /**\n * Creates a new Draco decoder.\n * @param configuration Optional override of the configuration for the DracoDecoder. If not provided, defaults to {@link DracoDecoder.DefaultConfiguration}.\n */\n constructor(configuration = DracoDecoder.DefaultConfiguration) {\n super(configuration);\n }\n /**\n * Decode Draco compressed mesh data to mesh data.\n * @param data The ArrayBuffer or ArrayBufferView of the compressed Draco data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @param gltfNormalizedOverride A map of attributes from vertex buffer kinds to normalized flags to override the Draco normalization\n * @returns A promise that resolves with the decoded mesh data\n */\n decodeMeshToMeshDataAsync(data, attributes, gltfNormalizedOverride) {\n const dataView = data instanceof ArrayBuffer ? new Int8Array(data) : new Int8Array(data.buffer, data.byteOffset, data.byteLength);\n const applyGltfNormalizedOverride = (kind, normalized) => {\n if (gltfNormalizedOverride && gltfNormalizedOverride[kind] !== undefined) {\n if (normalized !== gltfNormalizedOverride[kind]) {\n Logger.Warn(`Normalized flag from Draco data (${normalized}) does not match normalized flag from glTF accessor (${gltfNormalizedOverride[kind]}). Using flag from glTF accessor.`);\n }\n return gltfNormalizedOverride[kind];\n }\n else {\n return normalized;\n }\n };\n if (this._workerPoolPromise) {\n return this._workerPoolPromise.then((workerPool) => {\n return new Promise((resolve, reject) => {\n workerPool.push((worker, onComplete) => {\n let resultIndices = null;\n const resultAttributes = [];\n const onError = (error) => {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n reject(error);\n onComplete();\n };\n const onMessage = (event) => {\n const message = event.data;\n switch (message.id) {\n case \"indices\": {\n resultIndices = message.data;\n break;\n }\n case \"attribute\": {\n resultAttributes.push({\n kind: message.kind,\n data: message.data,\n size: message.size,\n byteOffset: message.byteOffset,\n byteStride: message.byteStride,\n normalized: applyGltfNormalizedOverride(message.kind, message.normalized),\n });\n break;\n }\n case \"decodeMeshDone\": {\n worker.removeEventListener(\"error\", onError);\n worker.removeEventListener(\"message\", onMessage);\n resolve({ indices: resultIndices, attributes: resultAttributes, totalVertices: message.totalVertices });\n onComplete();\n break;\n }\n }\n };\n worker.addEventListener(\"error\", onError);\n worker.addEventListener(\"message\", onMessage);\n const dataViewCopy = dataView.slice();\n worker.postMessage({ id: \"decodeMesh\", dataView: dataViewCopy, attributes: attributes }, [dataViewCopy.buffer]);\n });\n });\n });\n }\n if (this._modulePromise) {\n return this._modulePromise.then((decoder) => {\n let resultIndices = null;\n const resultAttributes = [];\n const numPoints = DecodeMesh(decoder.module, dataView, attributes, (indices) => {\n resultIndices = indices;\n }, (kind, data, size, byteOffset, byteStride, normalized) => {\n resultAttributes.push({\n kind,\n data,\n size,\n byteOffset,\n byteStride,\n normalized,\n });\n });\n return { indices: resultIndices, attributes: resultAttributes, totalVertices: numPoints };\n });\n }\n throw new Error(\"Draco decoder module is not available\");\n }\n /**\n * Decode Draco compressed mesh data to Babylon geometry.\n * @param name The name to use when creating the geometry\n * @param scene The scene to use when creating the geometry\n * @param data The ArrayBuffer or ArrayBufferView of the Draco compressed data\n * @param attributes A map of attributes from vertex buffer kinds to Draco unique ids\n * @returns A promise that resolves with the decoded geometry\n */\n async decodeMeshToGeometryAsync(name, scene, data, attributes) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes);\n const geometry = new Geometry(name, scene);\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n }\n /** @internal */\n async _decodeMeshToGeometryForGltfAsync(name, scene, data, attributes, gltfNormalizedOverride, boundingInfo) {\n const meshData = await this.decodeMeshToMeshDataAsync(data, attributes, gltfNormalizedOverride);\n const geometry = new Geometry(name, scene);\n if (boundingInfo) {\n geometry._boundingInfo = boundingInfo;\n geometry.useBoundingInfoFromGeometry = true;\n }\n if (meshData.indices) {\n geometry.setIndices(meshData.indices);\n }\n for (const attribute of meshData.attributes) {\n geometry.setVerticesBuffer(new VertexBuffer(scene.getEngine(), attribute.data, attribute.kind, false, undefined, attribute.byteStride, undefined, attribute.byteOffset, attribute.size, undefined, attribute.normalized, true), meshData.totalVertices);\n }\n return geometry;\n }\n}\n/**\n * Default configuration for the DracoDecoder. Defaults to the following:\n * - numWorkers: 50% of the available logical processors, capped to 4. If no logical processors are available, defaults to 1.\n * - wasmUrl: `\"https://cdn.babylonjs.com/draco_wasm_wrapper_gltf.js\"`\n * - wasmBinaryUrl: `\"https://cdn.babylonjs.com/draco_decoder_gltf.wasm\"`\n * - fallbackUrl: `\"https://cdn.babylonjs.com/draco_decoder_gltf.js\"`\n */\nDracoDecoder.DefaultConfiguration = {\n wasmUrl: `${Tools._DefaultCdnUrl}/draco_wasm_wrapper_gltf.js`,\n wasmBinaryUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.wasm`,\n fallbackUrl: `${Tools._DefaultCdnUrl}/draco_decoder_gltf.js`,\n};\nDracoDecoder._Default = null;\n//# sourceMappingURL=dracoDecoder.js.map","import { DracoDecoder } from \"core/Meshes/Compression/dracoDecoder\";\nimport { VertexBuffer } from \"core/Buffers/buffer\";\nimport { GLTFLoader, ArrayItem, LoadBoundingInfoFromPositionAccessor } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_draco_mesh_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_draco_mesh_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines whether to use the normalized flag from the glTF accessor instead of the Draco data. Defaults to true.\n */\n this.useNormalizedFlagFromAccessor = true;\n this._loader = loader;\n this.enabled = DracoDecoder.DefaultAvailable && this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n delete this.dracoDecoder;\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadVertexDataAsync(context, primitive, babylonMesh) {\n return GLTFLoader.LoadExtensionAsync(context, primitive, this.name, (extensionContext, extension) => {\n if (primitive.mode != undefined) {\n if (primitive.mode !== 4 /* MeshPrimitiveMode.TRIANGLES */ && primitive.mode !== 5 /* MeshPrimitiveMode.TRIANGLE_STRIP */) {\n throw new Error(`${context}: Unsupported mode ${primitive.mode}`);\n }\n }\n const attributes = {};\n const normalized = {};\n const loadAttribute = (name, kind) => {\n const uniqueId = extension.attributes[name];\n if (uniqueId == undefined) {\n return;\n }\n babylonMesh._delayInfo = babylonMesh._delayInfo || [];\n if (babylonMesh._delayInfo.indexOf(kind) === -1) {\n babylonMesh._delayInfo.push(kind);\n }\n attributes[kind] = uniqueId;\n if (this.useNormalizedFlagFromAccessor) {\n const accessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[name]);\n if (accessor) {\n normalized[kind] = accessor.normalized || false;\n }\n }\n };\n loadAttribute(\"POSITION\", VertexBuffer.PositionKind);\n loadAttribute(\"NORMAL\", VertexBuffer.NormalKind);\n loadAttribute(\"TANGENT\", VertexBuffer.TangentKind);\n loadAttribute(\"TEXCOORD_0\", VertexBuffer.UVKind);\n loadAttribute(\"TEXCOORD_1\", VertexBuffer.UV2Kind);\n loadAttribute(\"TEXCOORD_2\", VertexBuffer.UV3Kind);\n loadAttribute(\"TEXCOORD_3\", VertexBuffer.UV4Kind);\n loadAttribute(\"TEXCOORD_4\", VertexBuffer.UV5Kind);\n loadAttribute(\"TEXCOORD_5\", VertexBuffer.UV6Kind);\n loadAttribute(\"JOINTS_0\", VertexBuffer.MatricesIndicesKind);\n loadAttribute(\"WEIGHTS_0\", VertexBuffer.MatricesWeightsKind);\n loadAttribute(\"COLOR_0\", VertexBuffer.ColorKind);\n const bufferView = ArrayItem.Get(extensionContext, this._loader.gltf.bufferViews, extension.bufferView);\n if (!bufferView._dracoBabylonGeometry) {\n bufferView._dracoBabylonGeometry = this._loader.loadBufferViewAsync(`/bufferViews/${bufferView.index}`, bufferView).then((data) => {\n const dracoDecoder = this.dracoDecoder || DracoDecoder.Default;\n const positionAccessor = ArrayItem.TryGet(this._loader.gltf.accessors, primitive.attributes[\"POSITION\"]);\n const babylonBoundingInfo = !this._loader.parent.alwaysComputeBoundingBox && !babylonMesh.skeleton && positionAccessor ? LoadBoundingInfoFromPositionAccessor(positionAccessor) : null;\n return dracoDecoder\n ._decodeMeshToGeometryForGltfAsync(babylonMesh.name, this._loader.babylonScene, data, attributes, normalized, babylonBoundingInfo)\n .catch((error) => {\n throw new Error(`${context}: ${error.message}`);\n });\n });\n }\n return bufferView._dracoBabylonGeometry;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_draco_mesh_compression(loader));\n//# sourceMappingURL=KHR_draco_mesh_compression.js.map"],"names":["DecodeMesh","module","data","attributeIDs","onIndicesData","onAttributeData","decoderModule","decoder","buffer","geometry","status","Decoder","DecoderBuffer","Init","byteLength","type","GetEncodedGeometryType","TRIANGULAR_MESH","mesh","Mesh","DecodeBufferToMesh","ok","ptr","Error","error_msg","numIndices","num_faces","_malloc","GetTrianglesUInt32Array","indices","Uint32Array","set","HEAPF32","_free","POINT_CLOUD","pointCloud","PointCloud","DecodeBufferToPointCloud","numPoints","num_points","processAttribute","kind","attribute","dataType","data_type","numComponents","num_components","normalized","byteStride","byte_stride","byteOffset","byte_offset","info","DT_FLOAT32","typedArrayConstructor","Float32Array","heap","DT_INT8","Int8Array","HEAP8","DT_INT16","Int16Array","HEAP16","DT_INT32","Int32Array","HEAP32","DT_UINT8","Uint8Array","HEAPU8","DT_UINT16","Uint16Array","HEAPU16","DT_UINT32","HEAPU32","numValues","BYTES_PER_ELEMENT","GetAttributeDataArrayForAllPoints","slice","id","GetAttributeByUniqueId","dracoAttributeTypes","position","POSITION","normal","NORMAL","color","COLOR","uv","TEX_COORD","GetAttributeId","GetAttribute","destroy","DecoderWorkerFunction","decoderPromise","onmessage","event","message","url","importScripts","initDecoderObject","wasmBinary","DracoDecoderModule","postMessage","then","dataView","attributes","size","offset","stride","totalVertices","DracoCodec","constructor","configuration","workerPool","this","_workerPoolPromise","Promise","resolve","wasmBinaryProvided","numberOfWorkers","numWorkers","navigator","hardwareConcurrency","Math","min","floor","useWorkers","Worker","URL","urlNeeded","jsModule","codecInfo","wasmUrl","wasmBinaryUrl","WebAssembly","Tools","GetBabylonScriptURL","wasmBinaryPromise","LoadFileAsync","fallbackUrl","undefined","workerContent","_getWorkerContent","workerBlobUrl","createObjectURL","Blob","AutoReleaseWorkerPool","worker","moduleUrl","reject","onError","error","removeEventListener","onMessage","addEventListener","clone","initializeWebWorker","_modulePromise","async","_isModuleAvailable","LoadBabylonScriptAsync","_createModuleAsync","whenReadyAsync","dispose","DracoDecoder","DefaultAvailable","config","DefaultConfiguration","Default","_Default","ResetDefault","skipDispose","super","decodeMeshToMeshDataAsync","gltfNormalizedOverride","ArrayBuffer","push","onComplete","resultIndices","resultAttributes","Logger","Warn","dataViewCopy","decodeMeshToGeometryAsync","name","scene","meshData","Geometry","setIndices","setVerticesBuffer","VertexBuffer","getEngine","_decodeMeshToGeometryForGltfAsync","boundingInfo","_boundingInfo","useBoundingInfoFromGeometry","_DefaultCdnUrl","NAME","KHR_draco_mesh_compression","loader","useNormalizedFlagFromAccessor","_loader","enabled","isExtensionUsed","dracoDecoder","_loadVertexDataAsync","context","primitive","babylonMesh","GLTFLoader","LoadExtensionAsync","extensionContext","extension","mode","loadAttribute","uniqueId","_delayInfo","indexOf","accessor","ArrayItem","TryGet","gltf","accessors","PositionKind","NormalKind","TangentKind","UVKind","UV2Kind","UV3Kind","UV4Kind","UV5Kind","UV6Kind","MatricesIndicesKind","MatricesWeightsKind","ColorKind","bufferView","Get","bufferViews","_dracoBabylonGeometry","loadBufferViewAsync","index","positionAccessor","babylonBoundingInfo","parent","alwaysComputeBoundingBox","skeleton","LoadBoundingInfoFromPositionAccessor","babylonScene","catch","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"qVA6GO,SAASA,EAAWC,EAA6BC,EAAMC,EAAcC,EAAeC,GACvF,MAAMC,EAAgBL,EACtB,IAAIM,EAAU,KACVC,EAAS,KACTC,EAAW,KACf,IAII,IAAIC,EAHJH,EAAU,IAAID,EAAcK,QAC5BH,EAAS,IAAIF,EAAcM,cAC3BJ,EAAOK,KAAKX,EAAMA,EAAKY,YAEvB,MAAMC,EAAOR,EAAQS,uBAAuBR,GAC5C,OAAQO,GACJ,KAAKT,EAAcW,gBAAiB,CAChC,MAAMC,EAAO,IAAIZ,EAAca,KAE/B,GADAT,EAASH,EAAQa,mBAAmBZ,EAAQU,IACvCR,EAAOW,MAAqB,IAAbH,EAAKI,IACrB,MAAM,IAAIC,MAAMb,EAAOc,aAE3B,MACMC,EAAwB,EADbP,EAAKQ,YAEhBZ,EAA0B,EAAbW,EACbH,EAAMhB,EAAcqB,QAAQb,GAClC,IACIP,EAAQqB,wBAAwBV,EAAMJ,EAAYQ,GAClD,MAAMO,EAAU,IAAIC,YAAYL,GAChCI,EAAQE,IAAI,IAAID,YAAYxB,EAAc0B,QAAQxB,OAAQc,EAAKG,IAC/DrB,EAAcyB,EAClC,CACwB,QACJvB,EAAc2B,MAAMX,EACxC,CACgBb,EAAWS,EACX,KAChB,CACY,KAAKZ,EAAc4B,YAAa,CAC5B,MAAMC,EAAa,IAAI7B,EAAc8B,WAErC,GADA1B,EAASH,E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jG,IACR,MAAM,IAAIhI,MAAM,GAAGuL,MAAYvD,EAAMvD,UAAU,GACjD,KAGH2I,EAAWG,qBAAqB,GAEnD,EAEAW,EAAwBpD,GACxBqD,EAAsBrD,GAAM,GAAOE,GAAW,IAAID,EAA2BC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{aZ as e,T as s,K as t,x as a,y as n,ah as o,a8 as r,v as i,ag as c,k as l,as as u,aw as h,a_ as m,h as p,a$ as d,L as C,aV as _,aW as N}from"./index-r5IGv8fd.esm.min.js";import{G as g}from"./gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js";var f;!function(e){e[e.Input=0]="Input",e[e.Output=1]="Output"}(f||(f={}));class v{constructor(s,t,a){this._ownerBlock=a,this._connectedPoint=[],this.uniqueId=e(),this.connectedPointIds=[],this.name=s,this._connectionType=t}get connectionType(){return this._connectionType}_isSingularConnection(){return!0}isConnected(){return this._connectedPoint.length>0}connectTo(e){if(this._connectionType===e._connectionType)throw new Error(`Cannot connect two points of type ${this.connectionType}`);if(this._isSingularConnection()&&this._connectedPoint.length>0||e._isSingularConnection()&&e._connectedPoint.length>0)throw new Error("Max number of connections for point reached");this._connectedPoint.push(e),e._connectedPoint.push(this)}serialize(e={}){e.uniqueId=this.uniqueId,e.name=this.name,e._connectionType=this._connectionType,e.connectedPointIds=[],e.className=this.getClassName();for(const s of this._connectedPoint)e.connectedPointIds.push(s.uniqueId)}getClassName(){return"FGConnection"}deserialize(e){this.uniqueId=e.uniqueId,this.name=e.name,this._connectionType=e._connectionType,this.connectedPointIds=e.connectedPointIds}static Parse(e={},t){const a=new(s.Instantiate(e.className))(e.name,e._connectionType,t);return a.deserialize(e),a}}class x{constructor(e){this.value=this._toInt(e)}_toInt(e){return 0|e}add(e){return new x(this.value+e.value)}subtract(e){return new x(this.value-e.value)}multiply(e){return new x(Math.imul(this.value,e.value))}divide(e){return new x(this.value/e.value)}getClassName(){return x.ClassName}equals(e){return this.value===e.value}static Parse(e){return new x(e.value)}}x.ClassName="FlowGraphInteger",t("FlowGraphInteger",x);class b{constructor(e,s){this.typeName=e,this.defaultValue=s}serialize(e){e.typeName=this.typeName,e.defaultValue=this.defaultValue}static Parse(e){return new b(e.typeName,e.defaultValue)}}const y=new b("any",void 0),w=new b("number",0),k=new b("boolean",!1),I=new b("Vector2",a.Zero()),B=new b("Vector3",n.Zero());new b("Vector4",o.Zero());const V=new b("Matrix",r.Identity());new b("Color3",i.Black()),new b("Quaternion",c.Identity());const O=new b("FlowGraphInteger",new x(0));class G extends v{constructor(e,s,t,a){super(e,s,t),this.richType=a}_isSingularConnection(){return 0===this.connectionType}setValue(e,s){s._setConnectionValue(this,e)}connectTo(e){super.connectTo(e)}_getValueOrDefault(e){return e._hasConnectionValue(this)?e._getConnectionValue(this):this.richType.defaultValue}getValue(e){return 1===this.connectionType?(e._notifyExecuteNode(this._ownerBlock),this._ownerBlock._updateOutputs(e),this._getValueOrDefault(e)):this.isConnected()?this._connectedPoint[0].getValue(e):this._getValueOrDefault(e)}getClassName(){return"FGDataConnection"}serialize(e={}){super.serialize(e),e.richType={},this.richType.serialize(e.richType)}static Parse(e,s){const t=v.Parse(e,s);return t.richType=b.Parse(e.richType),t}}function F(e){return"Mesh"===e||"AbstractMesh"===e||"GroundMesh"===e||"InstanceMesh"===e||"LinesMesh"===e||"GoldbergMesh"===e||"GreasedLineMesh"===e||"TrailMesh"===e}function E(e){return"Vector2"===e||"Vector3"===e||"Vector4"===e||"Quaternion"===e||"Color3"===e||"Color4"===e}function T(e,s,t){const a=s?.getClassName?.()??"";F(a)?t[e]={name:s.name,className:a}:E(a)?t[e]={value:s.asArray(),className:a}:t[e]=s}function P(e,s,t){const u=s[e];let h;const m=u?.className;return h=F(m)?t.getMeshByName(u.name):E(m)?function(e,s){if("Vector2"===e)return a.FromArray(s);if("Vector3"===e)return n.FromArray(s);if("Vector4"===e)return o.FromArray(s);if("Quaternion"===e)return c.FromArray(s);if("Color3"===e)return new i(s[0],s[1],s[2]);if("Color4"===e)return new l(s[0],s[1],s[2],s[3]);throw new Error(`Unknown vector class name ${e}`)}(m,u.value):"Matrix"===m?r.FromArray(u.value):m===x.ClassName?x.Parse(u):u&&void 0!==u.value?u.value:u,h}t("FGDataConnection",G);class M{constructor(s){this.config=s,this.uniqueId=e(),this.name=this.config?.name??this.getClassName(),this.dataInputs=[],this.dataOutputs=[]}_updateOutputs(e){}registerDataInput(e,s){const t=new G(e,0,this,s);return this.dataInputs.push(t),t}registerDataOutput(e,s){const t=new G(e,1,this,s);return this.dataOutputs.push(t),t}getDataInput(e){return this.dataInputs.find((s=>s.name===e))}getDataOutput(e){return this.dataOutputs.find((s=>s.name===e))}serialize(e={},s=T){e.uniqueId=this.uniqueId,e.config={},this.config&&(e.config.name=this.config.name),e.dataInputs=[],e.dataOutputs=[],e.className=this.getClassName();for(const s of this.dataInputs){const t={};s.serialize(t),e.dataInputs.push(t)}for(const s of this.dataOutputs){const t={};s.serialize(t),e.dataOutputs.push(t)}}getClassName(){return"FGBlock"}static Parse(e,t){const a=s.Instantiate(e.className),n={},o=t.valueParseFunction??P;if(e.config)for(const s in e.config)n[s]=o(s,e.config,t.scene);var r;("FGSetPropertyBlock"===(r=e.className)||"FGGetPropertyBlock"===r||"FGPlayAnimationBlock"===r||"FGMeshPickEventBlock"===r)&&(n.pathConverter=t.pathConverter);const i=new a(n);i.uniqueId=e.uniqueId;for(let s=0;s<e.dataInputs.length;s++){const t=i.getDataInput(e.dataInputs[s].name);if(!t)throw new Error("Could not find data input with name "+e.dataInputs[s].name+" in block "+e.className);t.deserialize(e.dataInputs[s])}for(let s=0;s<e.dataOutputs.length;s++){const t=i.getDataOutput(e.dataOutputs[s].name);if(!t)throw new Error("Could not find data output with name "+e.dataOutputs[s].name+" in block "+e.className);t.deserialize(e.dataOutputs[s])}return i.metadata=e.metadata,i.deserialize&&i.deserialize(e),i}}class S extends v{_isSingularConnection(){return 1===this.connectionType}_activateSignal(e){0===this.connectionType?(e._notifyExecuteNode(this._ownerBlock),this._ownerBlock._execute(e,this),e._increaseExecutionId()):this._connectedPoint[0]?._activateSignal(e)}}t("FlowGraphSignalConnection",S);class D extends M{constructor(e){super(e),this.signalInputs=[],this.signalOutputs=[],this.in=this._registerSignalInput("in")}_registerSignalInput(e){const s=new S(e,0,this);return this.signalInputs.push(s),s}_registerSignalOutput(e){const s=new S(e,1,this);return this.signalOutputs.push(s),s}getSignalInput(e){return this.signalInputs.find((s=>s.name===e))}getSignalOutput(e){return this.signalOutputs.find((s=>s.name===e))}serialize(e={}){super.serialize(e),e.signalInputs=[],e.signalOutputs=[];for(const s of this.signalInputs){const t={};s.serialize(t),e.signalInputs.push(t)}for(const s of this.signalOutputs){const t={};s.serialize(t),e.signalOutputs.push(t)}}deserialize(e){for(let s=0;s<e.signalInputs.length;s++){const t=this.getSignalInput(e.signalInputs[s].name);if(!t)throw new Error("Could not find signal input with name "+e.signalInputs[s].name+" in block "+e.className);t.deserialize(e.signalInputs[s])}for(let s=0;s<e.signalOutputs.length;s++){const t=this.getSignalOutput(e.signalOutputs[s].name);if(!t)throw new Error("Could not find signal output with name "+e.signalOutputs[s].name+" in block "+e.className);t.deserialize(e.signalOutputs[s])}}getClassName(){return"FGExecutionBlock"}}class q extends D{constructor(e){super(e),this.out=this._registerSignalOutput("out"),this.done=this._registerSignalOutput("done")}_startPendingTasks(e){this._preparePendingTasks(e),e._addPendingBlock(this)}}class z extends q{_execute(e){e._notifyExecuteNode(this),this.out._activateSignal(e)}}class R{constructor(s){this.uniqueId=e(),this._userVariables={},this._executionVariables={},this._connectionValues={},this._pendingBlocks=[],this._executionId=0,this.onNodeExecutedObservable=new m,this._configuration=s}hasVariable(e){return e in this._userVariables}setVariable(e,s){this._userVariables[e]=s}getVariable(e){return this._userVariables[e]}get userVariables(){return this._userVariables}_getUniqueIdPrefixedName(e,s){return`${e.uniqueId}_${s}`}_setExecutionVariable(e,s,t){this._executionVariables[this._getUniqueIdPrefixedName(e,s)]=t}_getExecutionVariable(e,s,t){return this._hasExecutionVariable(e,s)?this._executionVariables[this._getUniqueIdPrefixedName(e,s)]:t}_deleteExecutionVariable(e,s){delete this._executionVariables[this._getUniqueIdPrefixedName(e,s)]}_hasExecutionVariable(e,s){return this._getUniqueIdPrefixedName(e,s)in this._executionVariables}_hasConnectionValue(e){return e.uniqueId in this._connectionValues}_setConnectionValue(e,s){this._connectionValues[e.uniqueId]=s}_getConnectionValue(e){return this._connectionValues[e.uniqueId]}get configuration(){return this._configuration}_addPendingBlock(e){this._pendingBlocks.push(e)}_removePendingBlock(e){const s=this._pendingBlocks.indexOf(e);-1!==s&&this._pendingBlocks.splice(s,1)}_clearPendingBlocks(){for(const e of this._pendingBlocks)e._cancelPendingTasks(this);this._pendingBlocks.length=0}_notifyExecuteNode(e){this.onNodeExecutedObservable.notifyObservers(e)}_increaseExecutionId(){this._executionId++}get executionId(){return this._executionId}serialize(e={},s=T){e.uniqueId=this.uniqueId,e._userVariables={};for(const t in this._userVariables)s(t,this._userVariables[t],e._userVariables);e._connectionValues={};for(const t in this._connectionValues)s(t,this._connectionValues[t],e._connectionValues)}getClassName(){return"FGContext"}static Parse(e,s){const t=s.graph.createContext(),a=s.valueParseFunction??P;t.uniqueId=e.uniqueId;for(const s in e._userVariables){const n=a(s,e._userVariables,t._configuration.scene);t._userVariables[s]=n}for(const s in e._connectionValues){const n=a(s,e._connectionValues,t._configuration.scene);t._connectionValues[s]=n}return t}}function A(e,s){return!(!e.parent||e.parent!==s&&!A(e.parent,s))}u([h()],R.prototype,"uniqueId",void 0);class $ extends z{constructor(e){super(e),this.config=e}_getReferencedMesh(){const e=this.config.pathConverter.convert(this.config.path),s=e.info.getObject(e.object);if(!(s&&s instanceof p))throw new Error("Mesh pick event block requires a valid mesh");return s}_preparePendingTasks(e){let s=e._getExecutionVariable(this,"meshPickObserver");if(!s){const t=this._getReferencedMesh();e._setExecutionVariable(this,"mesh",t),s=t.getScene().onPointerObservable.add((s=>{s.type===d.POINTERPICK&&s.pickInfo?.pickedMesh&&(s.pickInfo?.pickedMesh===t||A(s.pickInfo?.pickedMesh,t))&&this._execute(e)}));const a=t.onDisposeObservable.add((()=>this._onDispose));e._setExecutionVariable(this,"meshPickObserver",s),e._setExecutionVariable(this,"meshDisposeObserver",a)}}_onDispose(e){this._cancelPendingTasks(e),e._removePendingBlock(this)}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"mesh"),t=e._getExecutionVariable(this,"meshPickObserver"),a=e._getExecutionVariable(this,"meshDisposeObserver");s.getScene().onPointerObservable.remove(t),s.onDisposeObservable.remove(a),e._deleteExecutionVariable(this,"mesh"),e._deleteExecutionVariable(this,"meshPickObserver"),e._deleteExecutionVariable(this,"meshDisposeObserver")}getClassName(){return $.ClassName}serialize(e){super.serialize(e),e.config.path=this.config.path}}var L,U;$.ClassName="FGMeshPickEventBlock",t($.ClassName,$),function(e){e[e.Stopped=0]="Stopped",e[e.Started=1]="Started"}(L||(L={}));class K{constructor(e){this._eventBlocks=[],this._executionContexts=[],this.state=0,this._scene=e.scene,this._coordinator=e.coordinator,this._sceneDisposeObserver=this._scene.onDisposeObservable.add((()=>this.dispose()))}createContext(){const e=new R({scene:this._scene,coordinator:this._coordinator});return this._executionContexts.push(e),e}getContext(e){return this._executionContexts[e]}addEventBlock(e){this._eventBlocks.push(e)}start(){if(1!==this.state){this.state=1,0===this._executionContexts.length&&this.createContext();for(const e of this._executionContexts){const s=this._getContextualOrder();for(const t of s)t._startPendingTasks(e)}}}_getContextualOrder(){const e=[];for(const s of this._eventBlocks)if(s.getClassName()===$.ClassName){const t=s._getReferencedMesh();let a=0;for(;a<e.length;a++){const s=e[a]._getReferencedMesh();if(t&&s&&A(t,s))break}e.splice(a,0,s)}else e.push(s);return e}dispose(){if(0!==this.state){this.state=0;for(const e of this._executionContexts)e._clearPendingBlocks();this._executionContexts.length=0,this._eventBlocks.length=0,this._scene.onDisposeObservable.remove(this._sceneDisposeObserver),this._sceneDisposeObserver=null}}visitAllBlocks(e){const s=[],t=new Set;for(const e of this._eventBlocks)s.push(e),t.add(e.uniqueId);for(;s.length>0;){const a=s.pop();e(a);for(const e of a.dataInputs)for(const a of e._connectedPoint)t.has(a._ownerBlock.uniqueId)||(s.push(a._ownerBlock),t.add(a._ownerBlock.uniqueId));if(a instanceof D)for(const e of a.signalOutputs)for(const a of e._connectedPoint)t.has(a._ownerBlock.uniqueId)||(s.push(a._ownerBlock),t.add(a._ownerBlock.uniqueId))}}serialize(e={},s){e.allBlocks=[],this.visitAllBlocks((s=>{const t={};s.serialize(t),e.allBlocks.push(t)})),e.executionContexts=[];for(const t of this._executionContexts){const a={};t.serialize(a,s),e.executionContexts.push(a)}}static GetDataOutConnectionByUniqueId(e,s){for(const t of e)for(const e of t.dataOutputs)if(e.uniqueId===s)return e;throw new Error("Could not find data out connection with unique id "+s)}static GetSignalInConnectionByUniqueId(e,s){for(const t of e)if(t instanceof D)for(const e of t.signalInputs)if(e.uniqueId===s)return e;throw new Error("Could not find signal in connection with unique id "+s)}static Parse(e,s){const t=s.coordinator.createGraph(),a=[],n=s.valueParseFunction??P;for(const o of e.allBlocks){const e=M.Parse(o,{scene:s.coordinator.config.scene,pathConverter:s.pathConverter,valueParseFunction:n});a.push(e),e instanceof z&&t.addEventBlock(e)}for(const e of a){for(const s of e.dataInputs)for(const e of s.connectedPointIds){const t=K.GetDataOutConnectionByUniqueId(a,e);s.connectTo(t)}if(e instanceof D)for(const s of e.signalOutputs)for(const e of s.connectedPointIds){const t=K.GetSignalInConnectionByUniqueId(a,e);s.connectTo(t)}}for(const s of e.executionContexts)R.Parse(s,{graph:t,valueParseFunction:n});return t}}class H{constructor(e){this.config=e,this._flowGraphs=[],this._customEventsMap=new Map,this.config.scene.onDisposeObservable.add((()=>{this.dispose()}));(H.SceneCoordinators.get(this.config.scene)??[]).push(this)}createGraph(){const e=new K({scene:this.config.scene,coordinator:this});return this._flowGraphs.push(e),e}removeGraph(e){const s=this._flowGraphs.indexOf(e);-1!==s&&(e.dispose(),this._flowGraphs.splice(s,1))}start(){this._flowGraphs.forEach((e=>e.start()))}dispose(){this._flowGraphs.forEach((e=>e.dispose())),this._flowGraphs.length=0;const e=H.SceneCoordinators.get(this.config.scene)??[],s=e.indexOf(this);-1!==s&&e.splice(s,1)}serialize(e,s){e._flowGraphs=[],this._flowGraphs.forEach((t=>{const a={};t.serialize(a,s),e._flowGraphs.push(a)}))}static Parse(e,s){const t=s.valueParseFunction??P,a=new H({scene:s.scene});return e._flowGraphs?.forEach((e=>{K.Parse(e,{coordinator:a,valueParseFunction:t,pathConverter:s.pathConverter})})),a}get flowGraphs(){return this._flowGraphs}getCustomEventObservable(e){let s=this._customEventsMap.get(e);return s||(s=new m,this._customEventsMap.set(e,s)),s}notifyCustomEvent(e,s){const t=this._customEventsMap.get(e);t&&t.notifyObservers(s)}}H.SceneCoordinators=new Map;class j extends z{_preparePendingTasks(e){if(!e._getExecutionVariable(this,"sceneReadyObserver")){const s=e.configuration.scene.onReadyObservable.add((()=>{this._execute(e)}));e._setExecutionVariable(this,"sceneReadyObserver",s)}}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"sceneReadyObserver");e.configuration.scene.onReadyObservable.remove(s),e._deleteExecutionVariable(this,"sceneReadyObserver")}getClassName(){return j.ClassName}}j.ClassName="FGSceneReadyEventBlock",t("FGSceneReadyEventBlock",j);class Z extends z{_preparePendingTasks(e){if(!e._getExecutionVariable(this,"sceneBeforeRender")){const s=e.configuration.scene.onBeforeRenderObservable.add((()=>{this._execute(e)}));e._setExecutionVariable(this,"sceneBeforeRender",s)}}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"sceneBeforeRender");e.configuration.scene.onBeforeRenderObservable.remove(s),e._deleteExecutionVariable(this,"sceneBeforeRender")}getClassName(){return Z.ClassName}}Z.ClassName="FGSceneTickEventBlock",t(Z.ClassName,Z);class W extends D{constructor(e){super(e),this.out=this._registerSignalOutput("out")}}class Q extends W{constructor(e){super(e),this.message=this.registerDataInput("message",y)}_execute(e){const s=this.message.getValue(e);C.Log(s),this.out._activateSignal(e)}getClassName(){return Q.ClassName}}Q.ClassName="FGConsoleLogBlock",t(Q.ClassName,Q),function(e){e[e.INIT=0]="INIT",e[e.STARTED=1]="STARTED",e[e.ENDED=2]="ENDED"}(U||(U={}));class X{constructor(e){this.onEachCountObservable=new m,this.onTimerAbortedObservable=new m,this.onTimerEndedObservable=new m,this.onStateChangedObservable=new m,this._observer=null,this._breakOnNextTick=!1,this._tick=e=>{const s=Date.now();this._timer=s-this._startTime;const t={startTime:this._startTime,currentTime:s,deltaTime:this._timer,completeRate:this._timer/this._timeToEnd,payload:e},a=this._breakOnNextTick||this._breakCondition(t);a||this._timer>=this._timeToEnd?this._stop(t,a):this.onEachCountObservable.notifyObservers(t)},this._setState(0),this._contextObservable=e.contextObservable,this._observableParameters=e.observableParameters??{},this._breakCondition=e.breakCondition??(()=>!1),this._timeToEnd=e.timeout,e.onEnded&&this.onTimerEndedObservable.add(e.onEnded),e.onTick&&this.onEachCountObservable.add(e.onTick),e.onAborted&&this.onTimerAbortedObservable.add(e.onAborted)}set breakCondition(e){this._breakCondition=e}clearObservables(){this.onEachCountObservable.clear(),this.onTimerAbortedObservable.clear(),this.onTimerEndedObservable.clear(),this.onStateChangedObservable.clear()}start(e=this._timeToEnd){if(1===this._state)throw new Error("Timer already started. Please stop it before starting again");this._timeToEnd=e,this._startTime=Date.now(),this._timer=0,this._observer=this._contextObservable.add(this._tick,this._observableParameters.mask,this._observableParameters.insertFirst,this._observableParameters.scope),this._setState(1)}stop(){1===this._state&&(this._breakOnNextTick=!0)}dispose(){this._observer&&this._contextObservable.remove(this._observer),this.clearObservables()}_setState(e){this._state=e,this.onStateChangedObservable.notifyObservers(this._state)}_stop(e,s=!1){this._contextObservable.remove(this._observer),this._setState(2),s?this.onTimerAbortedObservable.notifyObservers(e):this.onTimerEndedObservable.notifyObservers(e)}}class Y extends q{constructor(e){super(e),this.timeout=this.registerDataInput("timeout",w)}_preparePendingTasks(e){const s=this.timeout.getValue(e);if(void 0!==s&&s>=0){const t=e._getExecutionVariable(this,"runningTimers")||[],a=e.configuration.scene,n=new X({timeout:s,contextObservable:a.onBeforeRenderObservable,onEnded:()=>this._onEnded(n,e)});n.start(),t.push(n),e._setExecutionVariable(this,"runningTimers",t)}}_execute(e){this._startPendingTasks(e),this.out._activateSignal(e)}_onEnded(e,t){const a=t._getExecutionVariable(this,"runningTimers")||[],n=a.indexOf(e);-1!==n?a.splice(n,1):s.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"),t._removePendingBlock(this),this.done._activateSignal(t)}_cancelPendingTasks(e){const s=e._getExecutionVariable(this,"runningTimers")||[];for(const e of s)e.dispose();e._deleteExecutionVariable(this,"runningTimers")}getClassName(){return Y.ClassName}}Y.ClassName="FGTimerBlock",t("FGTimerBlock",Y);class J extends W{constructor(e){super(e),this.config=e;for(let e=0;e<this.config.eventData.length;e++){const s=this.config.eventData[e];this.registerDataInput(s,y)}}_execute(e){const s=this.config.eventId,t=this.dataInputs.map((s=>s.getValue(e)));e.configuration.coordinator.notifyCustomEvent(s,t),this.out._activateSignal(e)}getClassName(){return J.ClassName}}J.ClassName="FGSendCustomEventBlock",t("FGSendCustomEventBlock",J);class ee extends z{constructor(e){super(e),this.config=e;for(let e=0;e<this.config.eventData.length;e++){const s=this.config.eventData[e];this.registerDataOutput(s,y)}}_preparePendingTasks(e){const s=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);this._eventObserver=s.add((s=>{for(let t=0;t<s.length;t++)this.dataOutputs[t].setValue(s[t],e);this._execute(e)}))}_cancelPendingTasks(e){const t=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);t?t.remove(this._eventObserver):s.Warn(`FlowGraphReceiveCustomEventBlock: Missing observable for event ${this.config.eventId}`)}getClassName(){return ee.ClassName}serialize(e){super.serialize(e),e.eventId=this.config.eventId,e.eventData=this.config.eventData}}ee.ClassName="FGReceiveCustomEventBlock",t(ee.ClassName,ee);class se extends D{constructor(e){super(e),this.config=e,this.outFlows=[];for(let e=0;e<this.config.numberOutputFlows;e++)this.outFlows.push(this._registerSignalOutput(`${e}`))}_execute(e){for(let s=0;s<this.config.numberOutputFlows;s++)this.outFlows[s]._activateSignal(e)}getClassName(){return se.ClassName}}se.ClassName="FGSequenceBlock",t(se.ClassName,se);const te=new RegExp(/\{(\w+)\}/g);class ae{constructor(e,s){this.path=e,this.ownerBlock=s,this.templatedInputs=[];let t=te.exec(e);for(;t;){const[,a]=t;this.templatedInputs.push(s.registerDataInput(a,O)),t=te.exec(e)}}getAccessor(e,s){let t=this.path;for(const e of this.templatedInputs){const a=e.getValue(s).value;t=t.replace(`{${e.name}}`,a.toString())}return e.convert(t)}}class ne extends M{constructor(e){super(e),this.config=e,this.value=this.registerDataOutput("value",y),this.templateComponent=new ae(e.path,this)}_updateOutputs(e){const s=this.templateComponent.getAccessor(this.config.pathConverter,e),t=s.info.get(s.object);this.value.setValue(t,e)}getClassName(){return ne.ClassName}serialize(e={}){super.serialize(e),e.config.path=this.config.path}}ne.ClassName="FGGetPropertyBlock",t(ne.ClassName,ne);class oe extends W{constructor(e){super(e),this.config=e,this.a=this.registerDataInput("a",y),this.templateComponent=new ae(e.path,this)}_execute(e){const s=this.a.getValue(e),t=this.templateComponent.getAccessor(this.config.pathConverter,e);t.info.set(s,t.object),this.out._activateSignal(e)}serialize(e={}){super.serialize(e),e.config.path=this.config.path}getClassName(){return oe.ClassName}}oe.ClassName="FGSetPropertyBlock",t("FGSetPropertyBlock",oe);const re="cachedOperationValue",ie="cachedExecutionId";class ce extends M{constructor(e,s){super(s),this.value=this.registerDataOutput("value",e)}_updateOutputs(e){const s=e._getExecutionVariable(this,ie),t=e._getExecutionVariable(this,re);if(void 0!==t&&s===e.executionId)this.value.setValue(t,e);else{const s=this._doOperation(e);e._setExecutionVariable(this,re,s),e._setExecutionVariable(this,ie,e.executionId),this.value.setValue(s,e)}}}class le extends ce{constructor(e,s,t,a,n,o){super(t,o),this._operation=a,this._className=n,this.a=this.registerDataInput("a",e),this.b=this.registerDataInput("b",s)}_doOperation(e){return this._operation(this.a.getValue(e),this.b.getValue(e))}getClassName(){return this._className}}class ue extends ce{constructor(e,s,t,a){super(e,a),this._operation=s,this._className=t}_doOperation(e){return this._operation()}getClassName(){return this._className}}class he extends ce{constructor(e,s,t,a,n){super(s,n),this._operation=t,this._className=a,this.a=this.registerDataInput("a",e)}_doOperation(e){return this._operation(this.a.getValue(e))}getClassName(){return this._className}}class me extends ce{constructor(e,s,t,a,n,o,r){super(a,r),this._operation=n,this._className=o,this.a=this.registerDataInput("a",e),this.b=this.registerDataInput("b",s),this.c=this.registerDataInput("c",t)}_doOperation(e){return this._operation(this.a.getValue(e),this.b.getValue(e),this.c.getValue(e))}getClassName(){return this._className}}function pe(e){return e.getClassName?e.getClassName():""}function de(e,s){return"Vector2"===e&&"Vector2"===s||"Vector3"===e&&"Vector3"===s||"Vector4"===e&&"Vector4"===s}function Ce(e,s){return"Matrix"===e&&"Matrix"===s}function _e(e,s){return"FlowGraphInteger"===e&&"FlowGraphInteger"===s}class Ne extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicAdd(e,s)),Ne.ClassName,e)}_polymorphicAdd(e,s){const t=pe(e),a=pe(s);return de(t,a)||Ce(t,a)||_e(t,a)?e.add(s):e+s}}Ne.ClassName="FGAddBlock",t(Ne.ClassName,Ne);class ge extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicAdd(e,s)),ge.ClassName,e)}_polymorphicAdd(e,s){const t=pe(e),a=pe(s);return de(t,a)||_e(t,a)?e.subtract(s):Ce(t,a)?e.add(s.scale(-1)):e-s}}ge.ClassName="FGSubBlock",t(ge.ClassName,ge);class fe extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicMultiply(e,s)),fe.ClassName,e)}_polymorphicMultiply(e,s){const t=pe(e),a=pe(s);return de(t,a)||_e(t,a)?e.multiply(s):Ce(t,a)?r.FromValues(e.m[0]*s.m[0],e.m[4]*s.m[4],e.m[8]*s.m[8],e.m[12]*s.m[12],e.m[1]*s.m[1],e.m[5]*s.m[5],e.m[9]*s.m[9],e.m[13]*s.m[13],e.m[2]*s.m[2],e.m[6]*s.m[6],e.m[10]*s.m[10],e.m[14]*s.m[14],e.m[3]*s.m[3],e.m[7]*s.m[7],e.m[11]*s.m[11],e.m[15]*s.m[15]):e*s}}fe.ClassName="FGMultiplyBlock",t(fe.ClassName,fe);class ve extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicDivide(e,s)),ve.ClassName,e)}_polymorphicDivide(e,s){const t=pe(e),a=pe(s);return de(t,a)||_e(t,a)?e.divide(s):Ce(t,a)?r.FromValues(e.m[0]/s.m[0],e.m[4]/s.m[4],e.m[8]/s.m[8],e.m[12]/s.m[12],e.m[1]/s.m[1],e.m[5]/s.m[5],e.m[9]/s.m[9],e.m[13]/s.m[13],e.m[2]/s.m[2],e.m[6]/s.m[6],e.m[10]/s.m[10],e.m[14]/s.m[14],e.m[3]/s.m[3],e.m[7]/s.m[7],e.m[11]/s.m[11],e.m[15]/s.m[15]):e/s}}ve.ClassName="FGDivideBlock",t(ve.ClassName,ve);class xe extends ue{constructor(e){super(w,(()=>Math.random()),xe.ClassName,e)}}xe.ClassName="FGRandomBlock",t(xe.ClassName,xe);class be extends le{constructor(e){super(y,y,w,((e,s)=>this._polymorphicDot(e,s)),be.ClassName,e)}_polymorphicDot(e,s){switch(pe(e)){case"Vector2":return a.Dot(e,s);case"Vector3":return n.Dot(e,s);case"Vector4":return o.Dot(e,s);default:throw new Error(`Cannot get dot product of ${e} and ${s}`)}}}be.ClassName="FGDotBlock",t(be.ClassName,be);class ye extends ue{constructor(e){super(w,(()=>Math.E),ye.ClassName,e)}}ye.ClassName="FGEBlock",t(ye.ClassName,ye);class we extends ue{constructor(e){super(w,(()=>Math.PI),we.ClassName,e)}}we.ClassName="FGPIBlock",t(we.ClassName,we);class ke extends ue{constructor(e){super(w,(()=>Number.POSITIVE_INFINITY),ke.ClassName,e)}}ke.ClassName="FGInfBlock",t(ke.ClassName,ke);class Ie extends ue{constructor(e){super(w,(()=>Number.NaN),Ie.ClassName,e)}}function Be(e,s){switch(pe(e)){case"FlowGraphInteger":return new x(s(e.value));case"Vector2":return new a(s(e.x),s(e.y));case"Vector3":return new n(s(e.x),s(e.y),s(e.z));case"Vector4":return new o(s(e.x),s(e.y),s(e.z),s(e.w));case"Matrix":return r.FromValues(s(e.m[0]),s(e.m[4]),s(e.m[8]),s(e.m[12]),s(e.m[1]),s(e.m[5]),s(e.m[9]),s(e.m[13]),s(e.m[2]),s(e.m[6]),s(e.m[10]),s(e.m[14]),s(e.m[3]),s(e.m[7]),s(e.m[11]),s(e.m[15]));default:return s(e)}}Ie.ClassName="FGNaNBlock",t(Ie.ClassName,Ie);class Ve extends he{constructor(e){super(y,y,(e=>this._polymorphicAbs(e)),Ve.ClassName,e)}_polymorphicAbs(e){return Be(e,Math.abs)}}Ve.ClassName="FGAbsBlock",t(Ve.ClassName,Ve);class Oe extends he{constructor(e){super(y,y,(e=>this._polymorphicSign(e)),Oe.ClassName,e)}_polymorphicSign(e){return Be(e,Math.sign)}}Oe.ClassName="FGSignBlock",t(Oe.ClassName,Oe);class Ge extends he{constructor(e){super(y,y,(e=>this._polymorphicTrunc(e)),Ge.ClassName,e)}_polymorphicTrunc(e){return Be(e,Math.trunc)}}Ge.ClassName="FGTruncBlock",t(Ge.ClassName,Ge);class Fe extends he{constructor(e){super(y,y,(e=>this._polymorphicFloor(e)),Fe.ClassName,e)}_polymorphicFloor(e){return Be(e,Math.floor)}}Fe.ClassName="FGFloorBlock",t(Fe.ClassName,Fe);class Ee extends he{constructor(e){super(y,y,(e=>this._polymorphicCeiling(e)),Ee.ClassName,e)}_polymorphicCeiling(e){return Be(e,Math.ceil)}}Ee.ClassName="FGCeilBlock",t(Ee.ClassName,Ee);class Te extends he{constructor(e){super(y,y,(e=>this._polymorphicFract(e)),Te.ClassName,e)}_polymorphicFract(e){return Be(e,(e=>e-Math.floor(e)))}}Te.ClassName="FGFractBlock",t(Te.ClassName,Te);class Pe extends he{constructor(e){super(y,y,(e=>this._polymorphicNeg(e)),Pe.ClassName,e)}_polymorphicNeg(e){return Be(e,(e=>-e))}}function Me(e,s,t){switch(pe(e)){case"FlowGraphInteger":return new x(t(e.value,s.value));case"Vector2":return new a(t(e.x,s.x),t(e.y,s.y));case"Vector3":return new n(t(e.x,s.x),t(e.y,s.y),t(e.z,s.z));case"Vector4":return new o(t(e.x,s.x),t(e.y,s.y),t(e.z,s.z),t(e.w,s.w));case"Matrix":return r.FromValues(t(e.m[0],s.m[0]),t(e.m[4],s.m[4]),t(e.m[8],s.m[8]),t(e.m[12],s.m[12]),t(e.m[1],s.m[1]),t(e.m[5],s.m[5]),t(e.m[9],s.m[9]),t(e.m[13],s.m[13]),t(e.m[2],s.m[2]),t(e.m[6],s.m[6]),t(e.m[10],s.m[10]),t(e.m[14],s.m[14]),t(e.m[3],s.m[3]),t(e.m[7],s.m[7]),t(e.m[11],s.m[11]),t(e.m[15],s.m[15]));default:return t(e,s)}}Pe.ClassName="FGNegBlock",t(Pe.ClassName,Pe);class Se extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicRemainder(e,s)),Se.ClassName,e)}_polymorphicRemainder(e,s){return Me(e,s,((e,s)=>e%s))}}Se.ClassName="FGRemainderBlock",t(Se.ClassName,Se);class De extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicMin(e,s)),De.ClassName,e)}_polymorphicMin(e,s){return Me(e,s,Math.min)}}De.ClassName="FGMinBlock",t(De.ClassName,De);class qe extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicMax(e,s)),qe.ClassName,e)}_polymorphicMax(e,s){return Me(e,s,Math.max)}}function ze(e,s,t){return Math.min(Math.max(e,Math.min(s,t)),Math.max(s,t))}function Re(e,s,t,i){switch(pe(e)){case"FlowGraphInteger":return new x(i(e.value,s.value,t.value));case"Vector2":return new a(i(e.x,s.x,t.x),i(e.y,s.y,t.y));case"Vector3":return new n(i(e.x,s.x,t.x),i(e.y,s.y,t.y),i(e.z,s.z,t.z));case"Vector4":return new o(i(e.x,s.x,t.x),i(e.y,s.y,t.y),i(e.z,s.z,t.z),i(e.w,s.w,t.w));case"Matrix":return r.FromValues(i(e.m[0],s.m[0],t.m[0]),i(e.m[4],s.m[4],t.m[4]),i(e.m[8],s.m[8],t.m[8]),i(e.m[12],s.m[12],t.m[12]),i(e.m[1],s.m[1],t.m[1]),i(e.m[5],s.m[5],t.m[5]),i(e.m[9],s.m[9],t.m[9]),i(e.m[13],s.m[13],t.m[13]),i(e.m[2],s.m[2],t.m[2]),i(e.m[6],s.m[6],t.m[6]),i(e.m[10],s.m[10],t.m[10]),i(e.m[14],s.m[14],t.m[14]),i(e.m[3],s.m[3],t.m[3]),i(e.m[7],s.m[7],t.m[7]),i(e.m[11],s.m[11],t.m[11]),i(e.m[15],s.m[15],t.m[15]));default:return i(e,s,t)}}qe.ClassName="FGMaxBlock",t(qe.ClassName,qe);class Ae extends me{constructor(e){super(y,y,y,y,((e,s,t)=>this._polymorphicClamp(e,s,t)),Ae.ClassName,e)}_polymorphicClamp(e,s,t){return Re(e,s,t,ze)}}function $e(e){return Math.min(Math.max(e,0),1)}Ae.ClassName="FGClampBlock",t(Ae.ClassName,Ae);class Le extends he{constructor(e){super(y,y,(e=>this._polymorphicSaturate(e)),Le.ClassName,e)}_polymorphicSaturate(e){return Be(e,$e)}}Le.ClassName="FGSaturateBlock",t(Le.ClassName,Le);class Ue extends me{constructor(e){super(y,y,y,y,((e,s,t)=>this._polymorphicInterpolate(e,s,t)),Ue.ClassName,e)}_interpolate(e,s,t){return(1-t)*e+t*s}_polymorphicInterpolate(e,s,t){return Re(e,s,t,this._interpolate)}}Ue.ClassName="FGInterpolateBlock",t(Ue.ClassName,Ue);class Ke extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicEq(e,s)),Ke.ClassName,e)}_polymorphicEq(e,s){const t=pe(e),a=pe(s);return de(t,a)||Ce(t,a)||_e(t,a)?e.equals(s):e===s}}function He(e,s,t){const a=pe(e);if(a===pe(s)){if(""===a)return t(e,s);if("FlowGraphInteger"===a)return t(e.value,s.value);throw new Error(`Cannot compare ${e} and ${s}`)}throw new Error(`${e} and ${s} are of different types.`)}Ke.ClassName="FGEqBlock",t(Ke.ClassName,Ke);class je extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicLessThan(e,s)),je.ClassName,e)}_polymorphicLessThan(e,s){return He(e,s,((e,s)=>e<s))}}je.ClassName="FGLessThanBlock",t(je.ClassName,je);class Ze extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicLessThanOrEqual(e,s)),Ze.ClassName,e)}_polymorphicLessThanOrEqual(e,s){return He(e,s,((e,s)=>e<=s))}}Ze.ClassName="FGLessThanOrEqualBlock";class We extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicGreaterThan(e,s)),We.ClassName,e)}_polymorphicGreaterThan(e,s){return He(e,s,((e,s)=>e>s))}}We.ClassName="FGGreaterThanBlock",t(We.ClassName,We);class Qe extends le{constructor(e){super(y,y,k,((e,s)=>this._polymorphicGreaterThanOrEqual(e,s)),Qe.ClassName,e)}_polymorphicGreaterThanOrEqual(e,s){return He(e,s,((e,s)=>e>=s))}}Qe.ClassName="FGGreaterThanOrEqualBlock",t(Qe.ClassName,Qe);class Xe extends he{constructor(e){super(y,k,(e=>this._polymorphicIsNan(e)),Xe.ClassName,e)}_polymorphicIsNan(e){const s=pe(e);if(""===s)return isNaN(e);if("FlowGraphInteger"===s)return isNaN(e.value);throw new Error(`Cannot get NaN of ${e}`)}}Xe.ClassName="FGIsNanBlock",t(Xe.ClassName,Xe);class Ye extends he{constructor(e){super(y,k,(e=>this._polymorphicIsInf(e)),Ye.ClassName,e)}_polymorphicIsInf(e){const s=pe(e);if(""===s)return!isFinite(e);if("FlowGraphInteger"===s)return!isFinite(e.value);throw new Error(`Cannot get isInf of ${e}`)}}Ye.ClassName="FGIsInfBlock";class Je extends he{constructor(e){super(y,y,(e=>this._polymorphicDegToRad(e)),Je.ClassName,e)}_degToRad(e){return e*Math.PI/180}_polymorphicDegToRad(e){return Be(e,this._degToRad)}}Je.ClassName="FGDegToRadBlock",t(Je.ClassName,Je);class es extends he{constructor(e){super(y,y,(e=>this._polymorphicRadToDeg(e)),es.ClassName,e)}_radToDeg(e){return 180*e/Math.PI}_polymorphicRadToDeg(e){return Be(e,this._radToDeg)}}es.ClassName="FGRadToDegBlock",t(es.ClassName,es);class ss extends he{constructor(e){super(y,y,(e=>this._polymorphicSin(e)),ss.ClassName,e)}_polymorphicSin(e){return Be(e,Math.sin)}}ss.ClassName="FGSinBlock",t(ss.ClassName,ss);class ts extends he{constructor(e){super(y,y,(e=>this._polymorphicCos(e)),ts.ClassName,e)}_polymorphicCos(e){return Be(e,Math.cos)}}ts.ClassName="FGCosBlock",t(ts.ClassName,ts);class as extends he{constructor(e){super(y,y,(e=>this._polymorphicTan(e)),as.ClassName,e)}_polymorphicTan(e){return Be(e,Math.tan)}}as.ClassName="FGTanBlock",t(as.ClassName,as);class ns extends he{constructor(e){super(y,y,(e=>this._polymorphicAsin(e)),ns.ClassName,e)}_polymorphicAsin(e){return Be(e,Math.asin)}}ns.ClassName="FGAsinBlock",t(ns.ClassName,ns);class os extends he{constructor(e){super(y,y,(e=>this._polymorphicAcos(e)),os.ClassName,e)}_polymorphicAcos(e){return Be(e,Math.acos)}}os.ClassName="FGAcosBlock",t(os.ClassName,os);class rs extends he{constructor(e){super(y,y,(e=>this._polymorphicAtan(e)),rs.ClassName,e)}_polymorphicAtan(e){return Be(e,Math.atan)}}rs.ClassName="FGAtanBlock",t(rs.ClassName,rs);class is extends le{constructor(e){super(y,y,y,((e,s)=>this._polymorphicAtan2(e,s)),is.ClassName,e)}_polymorphicAtan2(e,s){return Me(e,s,Math.atan2)}}is.ClassName="FGAtan2Block",t(is.ClassName,is);class cs extends he{constructor(e){super(y,y,(e=>this._polymorphicSinh(e)),cs.ClassName,e)}_polymorphicSinh(e){return Be(e,Math.sinh)}}cs.ClassName="FGSinhBlock",t(cs.ClassName,cs);class ls extends he{constructor(e){super(y,y,(e=>this._polymorphicCosh(e)),ls.ClassName,e)}_polymorphicCosh(e){return Be(e,Math.cosh)}}ls.ClassName="FGCoshBlock",t(ls.ClassName,ls);class us extends he{constructor(e){super(y,y,(e=>this._polymorphicTanh(e)),us.ClassName,e)}_polymorphicTanh(e){return Be(e,Math.tanh)}}us.ClassName="FGTanhBlock",t(us.ClassName,us);class hs extends he{constructor(e){super(y,w,(e=>this._polymorphicAsinh(e)),hs.ClassName,e)}_polymorphicAsinh(e){return Be(e,Math.asinh)}}hs.ClassName="FGAsinhBlock",t(hs.ClassName,hs);class ms extends he{constructor(e){super(y,w,(e=>this._polymorphicAcosh(e)),ms.ClassName,e)}_polymorphicAcosh(e){return Be(e,Math.acosh)}}ms.ClassName="FGAcoshBlock",t(ms.ClassName,ms);class ps extends he{constructor(e){super(y,w,(e=>this._polymorphicAtanh(e)),ps.ClassName,e)}_polymorphicAtanh(e){return Be(e,Math.atanh)}}ps.ClassName="FGAtanhBlock",t(ps.ClassName,ps);class ds extends he{constructor(e){super(y,w,(e=>this._polymorphicExp(e)),ds.ClassName,e)}_polymorphicExp(e){return Be(e,Math.exp)}}ds.ClassName="FGExpBlock",t(ds.ClassName,ds);class Cs extends he{constructor(e){super(y,w,(e=>this._polymorphicLog(e)),Cs.ClassName,e)}_polymorphicLog(e){return Be(e,Math.log)}}Cs.ClassName="FGLogBlock",t(Cs.ClassName,Cs);class _s extends he{constructor(e){super(y,w,(e=>this._polymorphicLog2(e)),_s.ClassName,e)}_polymorphicLog2(e){return Be(e,Math.log2)}}_s.ClassName="FGLog2Block",t(_s.ClassName,_s);class Ns extends he{constructor(e){super(y,w,(e=>this._polymorphicLog10(e)),Ns.ClassName,e)}_polymorphicLog10(e){return Be(e,Math.log10)}}Ns.ClassName="FGLog10Block",t(Ns.ClassName,Ns);class gs extends he{constructor(e){super(y,w,(e=>this._polymorphicSqrt(e)),gs.ClassName,e)}_polymorphicSqrt(e){return Be(e,Math.sqrt)}}gs.ClassName="FGSqrtBlock",t(gs.ClassName,gs);class fs extends he{constructor(e){super(y,w,(e=>this._polymorphicCubeRoot(e)),fs.ClassName,e)}_polymorphicCubeRoot(e){return Be(e,Math.cbrt)}}fs.ClassName="FGCubeRootBlock",t(fs.ClassName,fs);class vs extends le{constructor(e){super(y,w,w,((e,s)=>this._polymorphicPow(e,s)),vs.ClassName,e)}_polymorphicPow(e,s){return Me(e,s,Math.pow)}}vs.ClassName="FGPowBlock",t(vs.ClassName,vs);class xs extends he{constructor(e){super(y,w,(e=>this._polymorphicLength(e)),xs.ClassName,e)}_polymorphicLength(e){switch(pe(e)){case"Vector2":case"Vector3":case"Vector4":return e.length();default:throw new Error(`Cannot compute length of value ${e}`)}}}xs.ClassName="FGLengthBlock",t(xs.ClassName,xs);class bs extends he{constructor(e){super(y,y,(e=>this._polymorphicNormalize(e)),bs.ClassName,e)}_polymorphicNormalize(e){switch(pe(e)){case"Vector2":case"Vector3":case"Vector4":return e.normalize();default:throw new Error(`Cannot normalize value ${e}`)}}}bs.ClassName="FGNormalizeBlock",t(bs.ClassName,bs);class ys extends le{constructor(e){super(B,B,B,((e,s)=>n.Cross(e,s)),ys.ClassName,e)}}ys.ClassName="FGCrossBlock",t(ys.ClassName,ys);class ws extends le{constructor(e){super(I,w,I,((e,s)=>a.Transform(e,r.RotationZ(s))),ws.ClassName,e)}}ws.ClassName="FGRotate2DBlock",t(ws.ClassName,ws);class ks extends me{constructor(e){super(B,B,w,B,((e,s,t)=>n.TransformCoordinates(e,r.RotationAxis(s,t))),ks.ClassName,e)}}ks.ClassName="FGRotate3DBlock",t(ks.ClassName,ks);class Is extends he{constructor(e){super(V,V,(e=>r.Transpose(e)),Is.ClassName,e)}}Is.ClassName="FGTransposeBlock",t(Is.ClassName,Is);class Bs extends he{constructor(e){super(V,w,(e=>e.determinant()),Bs.ClassName,e)}}Bs.ClassName="FGDeterminantBlock",t(Bs.ClassName,Bs);class Vs extends he{constructor(e){super(V,V,(e=>r.Invert(e)),Vs.ClassName,e)}}Vs.ClassName="FGInvertMatrixBlock",t(Vs.ClassName,Vs);class Os extends le{constructor(e){super(V,V,V,((e,s)=>s.multiply(e)),Os.ClassName,e)}}Os.ClassName="FGMatMulBlock",t(Os.ClassName,Os);class Gs extends he{constructor(e){super(O,O,(e=>new x(~e.value)),Gs.ClassName,e)}}Gs.ClassName="FGBitwiseNotBlock",t(Gs.ClassName,Gs);class Fs extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value&s.value)),Fs.ClassName,e)}}Fs.ClassName="FGBitwiseAndBlock",t(Fs.ClassName,Fs);class Es extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value|s.value)),Es.ClassName,e)}}Es.ClassName="FGBitwiseOrBlock",t(Es.ClassName,Es);class Ts extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value^s.value)),Ts.ClassName,e)}}Ts.ClassName="FGBitwiseXorBlock",t(Ts.ClassName,Ts);class Ps extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value<<s.value)),Ps.ClassName,e)}}Ps.ClassName="FGBitwiseLeftShiftBlock",t(Ps.ClassName,Ps);class Ms extends le{constructor(e){super(O,O,O,((e,s)=>new x(e.value>>s.value)),Ms.ClassName,e)}}Ms.ClassName="FGBitwiseRightShiftBlock",t(Ms.ClassName,Ms);class Ss extends he{constructor(e){super(O,O,(e=>new x(Math.clz32(e.value))),Ss.ClassName,e)}}Ss.ClassName="FGCountLeadingZerosBlock",t(Ss.ClassName,Ss);class Ds extends he{constructor(e){super(O,O,(e=>new x(e.value?31-Math.clz32(e.value&-e.value):32)),Ds.ClassName,e)}}Ds.ClassName="FGCountTrailingZerosBlock",t(Ds.ClassName,Ds);class qs extends he{constructor(e){super(O,O,(e=>new x(function(e){let s=0;for(;e;)s+=1&e,e>>=1;return s}(e.value))),qs.ClassName,e)}}qs.ClassName="FGCountOneBitsBlock",t(qs.ClassName,qs);class zs extends W{constructor(e={startIndex:new x(0)}){super(e),this.config=e,this.reset=this._registerSignalInput("reset"),this.n=this.registerDataInput("n",O),this.value=this.registerDataOutput("value",O)}_execute(e,s){if(s===this.reset)this.value.setValue(this.config.startIndex,e);else{const s=this.value.getValue(e);s.value<this.n.getValue(e).value&&(this.value.setValue(new x(s.value+1),e),this.out._activateSignal(e))}}getClassName(){return zs.ClassName}}zs.ClassName="FGDoNBlock",t(zs.ClassName,zs);class Rs extends M{constructor(e){super(e),this.config=e,this.output=this.registerDataOutput(e.variableName,y)}_updateOutputs(e){const s=this.config.variableName;e.hasVariable(s)&&this.output.setValue(e.getVariable(s),e)}getClassName(){return Rs.ClassName}serialize(e){super.serialize(e),e.config.variableName=this.config.variableName}}Rs.ClassName="FGGetVariableBlock",t(Rs.ClassName,Rs);class As extends W{constructor(e){super(e),this.config=e,this.input=this.registerDataInput(e.variableName,y)}_execute(e){const s=this.config.variableName,t=this.input.getValue(e);e.setVariable(s,t),this.out._activateSignal(e)}getClassName(){return As.ClassName}}As.ClassName="FGSetVariableBlock",t(As.ClassName,As);class $s extends W{constructor(e){super(e),this.config=e,this.condition=this.registerDataInput("condition",k),this.loopBody=this._registerSignalOutput("loopBody")}_execute(e,s){let t=this.condition.getValue(e);for(this.config?.isDo&&!t&&this.loopBody._activateSignal(e);t;)this.loopBody._activateSignal(e),t=this.condition.getValue(e);this.out._activateSignal(e)}getClassName(){return $s.ClassName}serialize(e){super.serialize(e),e.isDo=this.config?.isDo}}$s.ClassName="FGWhileLoopBlock",t($s.ClassName,$s);const Ls={"lifecycle/onStart":j.ClassName,"lifecycle/onTick":Z.ClassName,log:Q.ClassName,"flow/delay":Y.ClassName,"customEvent/send":J.ClassName,"customEvent/receive":ee.ClassName,"flow/sequence":se.ClassName,"world/get":ne.ClassName,"world/set":oe.ClassName,"flow/doN":zs.ClassName,"variable/get":Rs.ClassName,"variable/set":As.ClassName,"flow/whileLoop":$s.ClassName,"math/random":xe.ClassName,"math/e":ye.ClassName,"math/pi":we.ClassName,"math/inf":ke.ClassName,"math/nan":Ie.ClassName,"math/abs":Ve.ClassName,"math/sign":Oe.ClassName,"math/trunc":Ge.ClassName,"math/floor":Fe.ClassName,"math/ceil":Ee.ClassName,"math/fract":Te.ClassName,"math/neg":Pe.ClassName,"math/add":Ne.ClassName,"math/sub":ge.ClassName,"math/mul":fe.ClassName,"math/div":ve.ClassName,"math/rem":Se.ClassName,"math/min":De.ClassName,"math/max":qe.ClassName,"math/clamp":Ae.ClassName,"math/saturate":Le.ClassName,"math/mix":Ue.ClassName,"math/eq":Ke.ClassName,"math/lt":je.ClassName,"math/le":Ze.ClassName,"math/gt":We.ClassName,"math/ge":Qe.ClassName,"math/isnan":Xe.ClassName,"math/isinf":Ye.ClassName,"math/rad":Je.ClassName,"math/deg":es.ClassName,"math/sin":ss.ClassName,"math/cos":ts.ClassName,"math/tan":as.ClassName,"math/asin":ns.ClassName,"math/acos":os.ClassName,"math/atan":rs.ClassName,"math/atan2":is.ClassName,"math/sinh":cs.ClassName,"math/cosh":ls.ClassName,"math/tanh":us.ClassName,"math/asinh":hs.ClassName,"math/acosh":ms.ClassName,"math/atanh":ps.ClassName,"math/exp":ds.ClassName,"math/log":Cs.ClassName,"math/log2":_s.ClassName,"math/log10":Ns.ClassName,"math/sqrt":gs.ClassName,"math/cbrt":fs.ClassName,"math/pow":vs.ClassName,"math/length":xs.ClassName,"math/normalize":bs.ClassName,"math/dot":be.ClassName,"math/cross":ys.ClassName,"math/rotate2d":ws.ClassName,"math/rotate3d":ks.ClassName,"math/transpose":Is.ClassName,"math/determinant":Bs.ClassName,"math/inverse":Vs.ClassName,"math/matmul":Os.ClassName,"math/not":Gs.ClassName,"math/and":Fs.ClassName,"math/or":Es.ClassName,"math/xor":Ts.ClassName,"math/asr":Ms.ClassName,"math/lsl":Ps.ClassName,"math/clz":Ss.ClassName,"math/ctz":Ds.ClassName,"math/popcnt":qs.ClassName},Us={float2:"Vector2",float3:"Vector3",float4:"Vector4",float4x4:"Matrix",int:"FlowGraphInteger"};function Ks(e,s,t){if(void 0!==e.type){const a=s.types&&s.types[e.type];if(!a)throw new Error(`${t}: Unknown type: ${e.type}`);const n=a.signature;if(!n)throw new Error(`${t}: Type ${e.type} has no signature`);const o=Us[n];return{value:e.value,className:o}}return e.value}function Hs(e,s,t){const a=Ls[s.type];if(!a)throw new Error(`/extensions/KHR_interactivity/nodes/${e}: Unknown block type: ${s.type}`);const n=e.toString(),o=function(e,s,t){const a={},n=e.configuration??[];for(const e of n)if("customEvent"===e.id){const n=s.customEvents&&s.customEvents[e.value];if(!n)throw new Error(`/extensions/KHR_interactivity/nodes/${t}: Unknown custom event: ${e.value}`);a.eventId=n.id,a.eventData=n.values.map((e=>e.id))}else if("variable"===e.id){const n=s.variables&&s.variables[e.value];if(!n)throw new Error(`/extensions/KHR_interactivity/nodes/${t}: Unknown variable: ${e.value}`);a.variableName=n.id}else if("path"===e.id){const s=e.value;a.path=s}else a[e.id]=Ks(e,s,`/extensions/KHR_interactivity/nodes/${t}`);return a}(s,t,n);return{className:a,config:o,uniqueId:n,metadata:s.metadata,dataInputs:[],dataOutputs:[],signalInputs:[],signalOutputs:[]}}class js extends g{constructor(e){super(e,Zs)}}const Zs={nodes:{__array__:{__target__:!0,translation:{type:"Vector3",get:e=>e._babylonTransformNode.position,set:(e,s)=>{s._babylonTransformNode.position=e},getObject:e=>e._babylonTransformNode}}}},Ws="KHR_interactivity";class Qs{constructor(e){this._loader=e,this.name=Ws,this.enabled=this._loader.isExtensionUsed(Ws),this._pathConverter=new js(this._loader.gltf)}dispose(){this._loader=null,delete this._pathConverter}onReady(){if(!this._loader.babylonScene||!this._pathConverter)return;const s=this._loader.babylonScene,t=this._loader.gltf.extensions?.KHR_interactivity,a=function(s){const t={uniqueId:e(),_userVariables:{},_connectionValues:{}},a=[t],n=[];for(let e=0;e<s.nodes.length;e++){const t=Hs(e,s.nodes[e],s);n.push(t)}for(let a=0;a<s.nodes.length;a++){const o=s.nodes[a],r=n[a],i=o.flows??[];for(const s of i){const t=s.id,o={uniqueId:e(),name:t,_connectionType:1,connectedPointIds:[]};r.signalOutputs.push(o);const i=s.node,c=s.socket,l=n[i];if(!l)throw new Error(`/extensions/KHR_interactivity/nodes/${a}: Could not find node with id ${i} that connects its input with with node ${a}'s output ${t}`);let u=l.signalInputs.find((e=>e.name===c));u||(u={uniqueId:e(),name:c,_connectionType:0,connectedPointIds:[]},l.signalInputs.push(u)),u.connectedPointIds.push(o.uniqueId),o.connectedPointIds.push(u.uniqueId)}const c=o.values??[];for(const o of c){const i=o.id,c={uniqueId:e(),name:i,_connectionType:0,connectedPointIds:[]};if(r.dataInputs.push(c),void 0!==o.value){const e=Ks(o,s,`/extensions/KHR_interactivity/nodes/${a}`);t._connectionValues[c.uniqueId]=e}else{if(void 0===o.node||void 0===o.socket)throw new Error(`/extensions/KHR_interactivity/nodes/${a}: Invalid socket ${i} in node ${a}`);{const s=o.node,t=o.socket,r=n[s];if(!r)throw new Error(`/extensions/KHR_interactivity/nodes/${a}: Could not find node with id ${s} that connects its output with node${a}'s input ${i}`);let l=r.dataOutputs.find((e=>e.name===t));l||(l={uniqueId:e(),name:t,_connectionType:1,connectedPointIds:[]},r.dataOutputs.push(l)),c.connectedPointIds.push(l.uniqueId),l.connectedPointIds.push(c.uniqueId)}}}}const o=s.variables??[];for(let e=0;e<o.length;e++){const a=o[e],n=a.id;t._userVariables[n]=Ks(a,s,`/extensions/KHR_interactivity/variables/${e}`)}return{allBlocks:n,executionContexts:a}}(t),n=new H({scene:s});K.Parse(a,{coordinator:n,pathConverter:this._pathConverter}),n.start()}}_(Ws),N(Ws,!0,(e=>new Qs(e)));export{Qs as KHR_interactivity};
|
|
2
|
+
//# sourceMappingURL=KHR_interactivity-DmxwZO-B.esm.min.js.map
|