@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_lights_punctual-DT1Tmy49.esm.js","sources":["../../../../../dev/core/dist/Lights/directionalLight.js","../../../../../dev/core/dist/Lights/pointLight.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_lights_punctual.js"],"sourcesContent":["import { __decorate } from \"tslib\";\nimport { serialize } from \"../Misc/decorators\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector\";\nimport { Node } from \"../node\";\nimport { Light } from \"./light\";\nimport { ShadowLight } from \"./shadowLight\";\nimport { RegisterClass } from \"../Misc/typeStore\";\nimport { Constants } from \"core/Engines/constants\";\nNode.AddNodeConstructor(\"Light_Type_1\", (name, scene) => {\n return () => new DirectionalLight(name, Vector3.Zero(), scene);\n});\n/**\n * A directional light is defined by a direction (what a surprise!).\n * The light is emitted from everywhere in the specified direction, and has an infinite range.\n * An example of a directional light is when a distance planet is lit by the apparently parallel lines of light from its sun. Light in a downward direction will light the top of an object.\n * Documentation: https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n */\nexport class DirectionalLight extends ShadowLight {\n /**\n * Fix frustum size for the shadow generation. This is disabled if the value is 0.\n */\n get shadowFrustumSize() {\n return this._shadowFrustumSize;\n }\n /**\n * Specifies a fix frustum size for the shadow generation.\n */\n set shadowFrustumSize(value) {\n this._shadowFrustumSize = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets the shadow projection scale against the optimal computed one.\n * 0.1 by default which means that the projection window is increase by 10% from the optimal size.\n * This does not impact in fixed frustum size (shadowFrustumSize being set)\n */\n get shadowOrthoScale() {\n return this._shadowOrthoScale;\n }\n /**\n * Sets the shadow projection scale against the optimal computed one.\n * 0.1 by default which means that the projection window is increase by 10% from the optimal size.\n * This does not impact in fixed frustum size (shadowFrustumSize being set)\n */\n set shadowOrthoScale(value) {\n this._shadowOrthoScale = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets or sets the orthoLeft property used to build the light frustum\n */\n get orthoLeft() {\n return this._orthoLeft;\n }\n set orthoLeft(left) {\n this._orthoLeft = left;\n }\n /**\n * Gets or sets the orthoRight property used to build the light frustum\n */\n get orthoRight() {\n return this._orthoRight;\n }\n set orthoRight(right) {\n this._orthoRight = right;\n }\n /**\n * Gets or sets the orthoTop property used to build the light frustum\n */\n get orthoTop() {\n return this._orthoTop;\n }\n set orthoTop(top) {\n this._orthoTop = top;\n }\n /**\n * Gets or sets the orthoBottom property used to build the light frustum\n */\n get orthoBottom() {\n return this._orthoBottom;\n }\n set orthoBottom(bottom) {\n this._orthoBottom = bottom;\n }\n /**\n * Creates a DirectionalLight object in the scene, oriented towards the passed direction (Vector3).\n * The directional light is emitted from everywhere in the given direction.\n * It can cast shadows.\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The friendly name of the light\n * @param direction The direction of the light\n * @param scene The scene the light belongs to\n */\n constructor(name, direction, scene) {\n super(name, scene);\n this._shadowFrustumSize = 0;\n this._shadowOrthoScale = 0.1;\n /**\n * Automatically compute the projection matrix to best fit (including all the casters)\n * on each frame.\n */\n this.autoUpdateExtends = true;\n /**\n * Automatically compute the shadowMinZ and shadowMaxZ for the projection matrix to best fit (including all the casters)\n * on each frame. autoUpdateExtends must be set to true for this to work\n */\n this.autoCalcShadowZBounds = false;\n // Cache\n this._orthoLeft = Number.MAX_VALUE;\n this._orthoRight = Number.MIN_VALUE;\n this._orthoTop = Number.MIN_VALUE;\n this._orthoBottom = Number.MAX_VALUE;\n this.position = direction.scale(-1.0);\n this.direction = direction;\n }\n /**\n * Returns the string \"DirectionalLight\".\n * @returns The class name\n */\n getClassName() {\n return \"DirectionalLight\";\n }\n /**\n * Returns the integer 1.\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return Light.LIGHTTYPEID_DIRECTIONALLIGHT;\n }\n /**\n * Sets the passed matrix \"matrix\" as projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n _setDefaultShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n if (this.shadowFrustumSize > 0) {\n this._setDefaultFixedFrustumShadowProjectionMatrix(matrix);\n }\n else {\n this._setDefaultAutoExtendShadowProjectionMatrix(matrix, viewMatrix, renderList);\n }\n }\n /**\n * Sets the passed matrix \"matrix\" as fixed frustum projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n */\n _setDefaultFixedFrustumShadowProjectionMatrix(matrix) {\n const activeCamera = this.getScene().activeCamera;\n if (!activeCamera) {\n return;\n }\n Matrix.OrthoLHToRef(this.shadowFrustumSize, this.shadowFrustumSize, this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ, this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ, matrix, this.getScene().getEngine().isNDCHalfZRange);\n }\n /**\n * Sets the passed matrix \"matrix\" as auto extend projection matrix for the shadows cast by the light according to the passed view matrix.\n * Returns the DirectionalLight Shadow projection matrix.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n _setDefaultAutoExtendShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n const activeCamera = this.getScene().activeCamera;\n // Check extends\n if (this.autoUpdateExtends || this._orthoLeft === Number.MAX_VALUE) {\n const tempVector3 = Vector3.Zero();\n this._orthoLeft = Number.MAX_VALUE;\n this._orthoRight = -Number.MAX_VALUE;\n this._orthoTop = -Number.MAX_VALUE;\n this._orthoBottom = Number.MAX_VALUE;\n let shadowMinZ = Number.MAX_VALUE;\n let shadowMaxZ = -Number.MAX_VALUE;\n for (let meshIndex = 0; meshIndex < renderList.length; meshIndex++) {\n const mesh = renderList[meshIndex];\n if (!mesh) {\n continue;\n }\n const boundingInfo = mesh.getBoundingInfo();\n const boundingBox = boundingInfo.boundingBox;\n for (let index = 0; index < boundingBox.vectorsWorld.length; index++) {\n Vector3.TransformCoordinatesToRef(boundingBox.vectorsWorld[index], viewMatrix, tempVector3);\n if (tempVector3.x < this._orthoLeft) {\n this._orthoLeft = tempVector3.x;\n }\n if (tempVector3.y < this._orthoBottom) {\n this._orthoBottom = tempVector3.y;\n }\n if (tempVector3.x > this._orthoRight) {\n this._orthoRight = tempVector3.x;\n }\n if (tempVector3.y > this._orthoTop) {\n this._orthoTop = tempVector3.y;\n }\n if (this.autoCalcShadowZBounds) {\n if (tempVector3.z < shadowMinZ) {\n shadowMinZ = tempVector3.z;\n }\n if (tempVector3.z > shadowMaxZ) {\n shadowMaxZ = tempVector3.z;\n }\n }\n }\n }\n if (this.autoCalcShadowZBounds) {\n this._shadowMinZ = shadowMinZ;\n this._shadowMaxZ = shadowMaxZ;\n }\n }\n const xOffset = this._orthoRight - this._orthoLeft;\n const yOffset = this._orthoTop - this._orthoBottom;\n const minZ = this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera?.minZ || Constants.ShadowMinZ;\n const maxZ = this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera?.maxZ || Constants.ShadowMaxZ;\n const useReverseDepthBuffer = this.getScene().getEngine().useReverseDepthBuffer;\n Matrix.OrthoOffCenterLHToRef(this._orthoLeft - xOffset * this.shadowOrthoScale, this._orthoRight + xOffset * this.shadowOrthoScale, this._orthoBottom - yOffset * this.shadowOrthoScale, this._orthoTop + yOffset * this.shadowOrthoScale, useReverseDepthBuffer ? maxZ : minZ, useReverseDepthBuffer ? minZ : maxZ, matrix, this.getScene().getEngine().isNDCHalfZRange);\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"vLightData\", 4);\n this._uniformBuffer.addUniform(\"vLightDiffuse\", 4);\n this._uniformBuffer.addUniform(\"vLightSpecular\", 4);\n this._uniformBuffer.addUniform(\"shadowsInfo\", 3);\n this._uniformBuffer.addUniform(\"depthValues\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Sets the passed Effect object with the DirectionalLight transformed position (or position if not parented) and the passed name.\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The directional light\n */\n transferToEffect(effect, lightIndex) {\n if (this.computeTransformedInformation()) {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.transformedDirection.x, this.transformedDirection.y, this.transformedDirection.z, 1, lightIndex);\n return this;\n }\n this._uniformBuffer.updateFloat4(\"vLightData\", this.direction.x, this.direction.y, this.direction.z, 1, lightIndex);\n return this;\n }\n transferToNodeMaterialEffect(effect, lightDataUniformName) {\n if (this.computeTransformedInformation()) {\n effect.setFloat3(lightDataUniformName, this.transformedDirection.x, this.transformedDirection.y, this.transformedDirection.z);\n return this;\n }\n effect.setFloat3(lightDataUniformName, this.direction.x, this.direction.y, this.direction.z);\n return this;\n }\n /**\n * Gets the minZ used for shadow according to both the scene and the light.\n *\n * Values are fixed on directional lights as it relies on an ortho projection hence the need to convert being\n * -1 and 1 to 0 and 1 doing (depth + min) / (min + max) -> (depth + 1) / (1 + 1) -> (depth * 0.5) + 0.5.\n * (when not using reverse depth buffer / NDC half Z range)\n * @param _activeCamera The camera we are returning the min for (not used)\n * @returns the depth min z\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getDepthMinZ(_activeCamera) {\n const engine = this._scene.getEngine();\n return !engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n }\n /**\n * Gets the maxZ used for shadow according to both the scene and the light.\n *\n * Values are fixed on directional lights as it relies on an ortho projection hence the need to convert being\n * -1 and 1 to 0 and 1 doing (depth + min) / (min + max) -> (depth + 1) / (1 + 1) -> (depth * 0.5) + 0.5.\n * (when not using reverse depth buffer / NDC half Z range)\n * @param _activeCamera The camera we are returning the max for\n * @returns the depth max z\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getDepthMaxZ(_activeCamera) {\n const engine = this._scene.getEngine();\n return engine.useReverseDepthBuffer && engine.isNDCHalfZRange ? 0 : 1;\n }\n /**\n * Prepares the list of defines specific to the light type.\n * @param defines the list of defines\n * @param lightIndex defines the index of the light for the effect\n */\n prepareLightSpecificDefines(defines, lightIndex) {\n defines[\"DIRLIGHT\" + lightIndex] = true;\n }\n}\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"shadowFrustumSize\", null);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"shadowOrthoScale\", null);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"autoUpdateExtends\", void 0);\n__decorate([\n serialize()\n], DirectionalLight.prototype, \"autoCalcShadowZBounds\", void 0);\n__decorate([\n serialize(\"orthoLeft\")\n], DirectionalLight.prototype, \"_orthoLeft\", void 0);\n__decorate([\n serialize(\"orthoRight\")\n], DirectionalLight.prototype, \"_orthoRight\", void 0);\n__decorate([\n serialize(\"orthoTop\")\n], DirectionalLight.prototype, \"_orthoTop\", void 0);\n__decorate([\n serialize(\"orthoBottom\")\n], DirectionalLight.prototype, \"_orthoBottom\", void 0);\n// Register Class Name\nRegisterClass(\"BABYLON.DirectionalLight\", DirectionalLight);\n//# sourceMappingURL=directionalLight.js.map","import { __decorate } from \"tslib\";\nimport { serialize } from \"../Misc/decorators\";\nimport { Matrix, Vector3 } from \"../Maths/math.vector\";\nimport { Node } from \"../node\";\nimport { Light } from \"./light\";\nimport { ShadowLight } from \"./shadowLight\";\nimport { RegisterClass } from \"../Misc/typeStore\";\nNode.AddNodeConstructor(\"Light_Type_0\", (name, scene) => {\n return () => new PointLight(name, Vector3.Zero(), scene);\n});\n/**\n * A point light is a light defined by an unique point in world space.\n * The light is emitted in every direction from this point.\n * A good example of a point light is a standard light bulb.\n * Documentation: https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n */\nexport class PointLight extends ShadowLight {\n /**\n * Getter: In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n * This specifies what angle the shadow will use to be created.\n *\n * It default to 90 degrees to work nicely with the cube texture generation for point lights shadow maps.\n */\n get shadowAngle() {\n return this._shadowAngle;\n }\n /**\n * Setter: In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n * This specifies what angle the shadow will use to be created.\n *\n * It default to 90 degrees to work nicely with the cube texture generation for point lights shadow maps.\n */\n set shadowAngle(value) {\n this._shadowAngle = value;\n this.forceProjectionMatrixCompute();\n }\n /**\n * Gets the direction if it has been set.\n * In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n */\n get direction() {\n return this._direction;\n }\n /**\n * In case of direction provided, the shadow will not use a cube texture but simulate a spot shadow as a fallback\n */\n set direction(value) {\n const previousNeedCube = this.needCube();\n this._direction = value;\n if (this.needCube() !== previousNeedCube && this._shadowGenerators) {\n const iterator = this._shadowGenerators.values();\n for (let key = iterator.next(); key.done !== true; key = iterator.next()) {\n const shadowGenerator = key.value;\n shadowGenerator.recreateShadowMap();\n }\n }\n }\n /**\n * Creates a PointLight object from the passed name and position (Vector3) and adds it in the scene.\n * A PointLight emits the light in every direction.\n * It can cast shadows.\n * If the scene camera is already defined and you want to set your PointLight at the camera position, just set it :\n * ```javascript\n * var pointLight = new PointLight(\"pl\", camera.position, scene);\n * ```\n * Documentation : https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction\n * @param name The light friendly name\n * @param position The position of the point light in the scene\n * @param scene The scene the lights belongs to\n */\n constructor(name, position, scene) {\n super(name, scene);\n this._shadowAngle = Math.PI / 2;\n this.position = position;\n }\n /**\n * Returns the string \"PointLight\"\n * @returns the class name\n */\n getClassName() {\n return \"PointLight\";\n }\n /**\n * Returns the integer 0.\n * @returns The light Type id as a constant defines in Light.LIGHTTYPEID_x\n */\n getTypeID() {\n return Light.LIGHTTYPEID_POINTLIGHT;\n }\n /**\n * Specifies whether or not the shadowmap should be a cube texture.\n * @returns true if the shadowmap needs to be a cube texture.\n */\n needCube() {\n return !this.direction;\n }\n /**\n * Returns a new Vector3 aligned with the PointLight cube system according to the passed cube face index (integer).\n * @param faceIndex The index of the face we are computed the direction to generate shadow\n * @returns The set direction in 2d mode otherwise the direction to the cubemap face if needCube() is true\n */\n getShadowDirection(faceIndex) {\n if (this.direction) {\n return super.getShadowDirection(faceIndex);\n }\n else {\n switch (faceIndex) {\n case 0:\n return new Vector3(1.0, 0.0, 0.0);\n case 1:\n return new Vector3(-1.0, 0.0, 0.0);\n case 2:\n return new Vector3(0.0, -1.0, 0.0);\n case 3:\n return new Vector3(0.0, 1.0, 0.0);\n case 4:\n return new Vector3(0.0, 0.0, 1.0);\n case 5:\n return new Vector3(0.0, 0.0, -1.0);\n }\n }\n return Vector3.Zero();\n }\n /**\n * Sets the passed matrix \"matrix\" as a left-handed perspective projection matrix with the following settings :\n * - fov = PI / 2\n * - aspect ratio : 1.0\n * - z-near and far equal to the active camera minZ and maxZ.\n * Returns the PointLight.\n * @param matrix\n * @param viewMatrix\n * @param renderList\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setDefaultShadowProjectionMatrix(matrix, viewMatrix, renderList) {\n const activeCamera = this.getScene().activeCamera;\n if (!activeCamera) {\n return;\n }\n const minZ = this.shadowMinZ !== undefined ? this.shadowMinZ : activeCamera.minZ;\n const maxZ = this.shadowMaxZ !== undefined ? this.shadowMaxZ : activeCamera.maxZ;\n const useReverseDepthBuffer = this.getScene().getEngine().useReverseDepthBuffer;\n Matrix.PerspectiveFovLHToRef(this.shadowAngle, 1.0, useReverseDepthBuffer ? maxZ : minZ, useReverseDepthBuffer ? minZ : maxZ, matrix, true, this._scene.getEngine().isNDCHalfZRange, undefined, useReverseDepthBuffer);\n }\n _buildUniformLayout() {\n this._uniformBuffer.addUniform(\"vLightData\", 4);\n this._uniformBuffer.addUniform(\"vLightDiffuse\", 4);\n this._uniformBuffer.addUniform(\"vLightSpecular\", 4);\n this._uniformBuffer.addUniform(\"vLightFalloff\", 4);\n this._uniformBuffer.addUniform(\"shadowsInfo\", 3);\n this._uniformBuffer.addUniform(\"depthValues\", 2);\n this._uniformBuffer.create();\n }\n /**\n * Sets the passed Effect \"effect\" with the PointLight transformed position (or position, if none) and passed name (string).\n * @param effect The effect to update\n * @param lightIndex The index of the light in the effect to update\n * @returns The point light\n */\n transferToEffect(effect, lightIndex) {\n if (this.computeTransformedInformation()) {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z, 0.0, lightIndex);\n }\n else {\n this._uniformBuffer.updateFloat4(\"vLightData\", this.position.x, this.position.y, this.position.z, 0, lightIndex);\n }\n this._uniformBuffer.updateFloat4(\"vLightFalloff\", this.range, this._inverseSquaredRange, 0, 0, lightIndex);\n return this;\n }\n transferToNodeMaterialEffect(effect, lightDataUniformName) {\n if (this.computeTransformedInformation()) {\n effect.setFloat3(lightDataUniformName, this.transformedPosition.x, this.transformedPosition.y, this.transformedPosition.z);\n }\n else {\n effect.setFloat3(lightDataUniformName, this.position.x, this.position.y, this.position.z);\n }\n return this;\n }\n /**\n * Prepares the list of defines specific to the light type.\n * @param defines the list of defines\n * @param lightIndex defines the index of the light for the effect\n */\n prepareLightSpecificDefines(defines, lightIndex) {\n defines[\"POINTLIGHT\" + lightIndex] = true;\n }\n}\n__decorate([\n serialize()\n], PointLight.prototype, \"shadowAngle\", null);\n// Register Class Name\nRegisterClass(\"BABYLON.PointLight\", PointLight);\n//# sourceMappingURL=pointLight.js.map","import { Vector3 } from \"core/Maths/math.vector\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { DirectionalLight } from \"core/Lights/directionalLight\";\nimport { PointLight } from \"core/Lights/pointLight\";\nimport { SpotLight } from \"core/Lights/spotLight\";\nimport { Light } from \"core/Lights/light\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_lights_punctual\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_lights {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n delete this._lights;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._lights = extension.lights;\n ArrayItem.Assign(this._lights);\n }\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n this._loader._allMaterialsDirtyRequired = true;\n return this._loader.loadNodeAsync(context, node, (babylonMesh) => {\n let babylonLight;\n const light = ArrayItem.Get(extensionContext, this._lights, extension.light);\n const name = light.name || babylonMesh.name;\n this._loader.babylonScene._blockEntityCollection = !!this._loader._assetContainer;\n switch (light.type) {\n case \"directional\" /* KHRLightsPunctual_LightType.DIRECTIONAL */: {\n const babylonDirectionalLight = new DirectionalLight(name, Vector3.Backward(), this._loader.babylonScene);\n babylonDirectionalLight.position.setAll(0);\n babylonLight = babylonDirectionalLight;\n break;\n }\n case \"point\" /* KHRLightsPunctual_LightType.POINT */: {\n babylonLight = new PointLight(name, Vector3.Zero(), this._loader.babylonScene);\n break;\n }\n case \"spot\" /* KHRLightsPunctual_LightType.SPOT */: {\n const babylonSpotLight = new SpotLight(name, Vector3.Zero(), Vector3.Backward(), 0, 1, this._loader.babylonScene);\n babylonSpotLight.angle = ((light.spot && light.spot.outerConeAngle) || Math.PI / 4) * 2;\n babylonSpotLight.innerAngle = ((light.spot && light.spot.innerConeAngle) || 0) * 2;\n babylonLight = babylonSpotLight;\n break;\n }\n default: {\n this._loader.babylonScene._blockEntityCollection = false;\n throw new Error(`${extensionContext}: Invalid light type (${light.type})`);\n }\n }\n babylonLight._parentContainer = this._loader._assetContainer;\n this._loader.babylonScene._blockEntityCollection = false;\n light._babylonLight = babylonLight;\n babylonLight.falloffType = Light.FALLOFF_GLTF;\n babylonLight.diffuse = light.color ? Color3.FromArray(light.color) : Color3.White();\n babylonLight.intensity = light.intensity == undefined ? 1 : light.intensity;\n babylonLight.range = light.range == undefined ? Number.MAX_VALUE : light.range;\n babylonLight.parent = babylonMesh;\n this._loader._babylonLights.push(babylonLight);\n GLTFLoader.AddPointerMetadata(babylonLight, extensionContext);\n assign(babylonMesh);\n });\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_lights(loader));\n//# sourceMappingURL=KHR_lights_punctual.js.map"],"names":[],"mappings":";;;;;;;AAQA,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK;AACzD,IAAI,OAAO,MAAM,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC;AAClE,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAgB,SAAS,WAAW,CAAC;AAClD;AACA;AACA;AACA,IAAI,IAAI,iBAAiB,GAAG;AAC5B,QAAQ,OAAO,IAAI,CAAC,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI,IAAI,iBAAiB,CAAC,KAAK,EAAE;AACjC,QAAQ,IAAI,CAAC,kBAAkB,GAAG,KAAK;AACvC,QAAQ,IAAI,CAAC,4BAA4B,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,gBAAgB,GAAG;AAC3B,QAAQ,OAAO,IAAI,CAAC,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,gBAAgB,CAAC,KAAK,EAAE;AAChC,QAAQ,IAAI,CAAC,iBAAiB,GAAG,KAAK;AACtC,QAAQ,IAAI,CAAC,4BAA4B,EAAE;AAC3C;AACA;AACA;AACA;AACA,IAAI,IAAI,SAAS,GAAG;AACpB,QAAQ,OAAO,IAAI,CAAC,UAAU;AAC9B;AACA,IAAI,IAAI,SAAS,CAAC,IAAI,EAAE;AACxB,QAAQ,IAAI,CAAC,UAAU,GAAG,IAAI;AAC9B;AACA;AACA;AACA;AACA,IAAI,IAAI,UAAU,GAAG;AACrB,QAAQ,OAAO,IAAI,CAAC,WAAW;AAC/B;AACA,IAAI,IAAI,UAAU,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M,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK;AAC9F,gBAAgB,YAAY,CAAC,MAAM,GAAG,WAAW;AACjD,gBAAgB,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC;AAC9D,gBAAgB,UAAU,CAAC,kBAAkB,CAAC,YAAY,EAAE,gBAAgB,CAAC;AAC7E,gBAAgB,MAAM,CAAC,WAAW,CAAC;AACnC,aAAa,CAAC;AACd,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b4 as e,aV as o,aW as r}from"./index-r5IGv8fd.esm.min.js";import{G as s}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";const t="KHR_materials_anisotropy";class n{constructor(e){this.name=t,this.order=195,this._loader=e,this.enabled=this._loader.isExtensionUsed(t)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,o,r){return s.LoadExtensionAsync(e,o,this.name,((s,t)=>{const n=new Array;return n.push(this._loader.loadMaterialPropertiesAsync(e,o,r)),n.push(this._loadIridescencePropertiesAsync(s,t,r)),Promise.all(n).then((()=>{}))}))}_loadIridescencePropertiesAsync(o,r,s){if(!(s instanceof e))throw new Error(`${o}: Material type not supported`);const t=new Array;return s.anisotropy.isEnabled=!0,s.anisotropy.intensity=r.anisotropyStrength??0,s.anisotropy.angle=r.anisotropyRotation??0,r.anisotropyTexture&&(r.anisotropyTexture.nonColorData=!0,t.push(this._loader.loadTextureInfoAsync(`${o}/anisotropyTexture`,r.anisotropyTexture,(e=>{e.name=`${s.name} (Anisotropy Intensity)`,s.anisotropy.texture=e})))),Promise.all(t).then((()=>{}))}}o(t),r(t,!0,(e=>new n(e)));export{n as KHR_materials_anisotropy};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_anisotropy-CkyM8JSq.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_anisotropy-CkyM8JSq.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_anisotropy.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_anisotropy\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_anisotropy {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 195;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.anisotropy.isEnabled = true;\n babylonMaterial.anisotropy.intensity = properties.anisotropyStrength ?? 0;\n babylonMaterial.anisotropy.angle = properties.anisotropyRotation ?? 0;\n if (properties.anisotropyTexture) {\n properties.anisotropyTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/anisotropyTexture`, properties.anisotropyTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Anisotropy Intensity)`;\n babylonMaterial.anisotropy.texture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_anisotropy(loader));\n//# sourceMappingURL=KHR_materials_anisotropy.js.map"],"names":["NAME","KHR_materials_anisotropy","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadIridescencePropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","anisotropy","isEnabled","intensity","anisotropyStrength","angle","anisotropyRotation","anisotropyTexture","nonColorData","loadTextureInfoAsync","texture","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,2BAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,gCAAgCL,EAAkBC,EAAWJ,IACzES,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,+BAAAH,CAAgCV,EAASc,EAAYZ,GACjD,KAAMA,aAA2Ba,GAC7B,MAAM,IAAIC,MAAM,GAAGhB,kCAEvB,MAAMO,EAAW,IAAIC,MAWrB,OAVAN,EAAgBe,WAAWC,WAAY,EACvChB,EAAgBe,WAAWE,UAAYL,EAAWM,oBAAsB,EACxElB,EAAgBe,WAAWI,MAAQP,EAAWQ,oBAAsB,EAChER,EAAWS,oBACXT,EAAWS,kBAAkBC,cAAe,EAC5CjB,EAASE,KAAKjB,KAAKG,QAAQ8B,qBAAqB,GAAGzB,sBAA6Bc,EAAWS,mBAAoBG,IAC3GA,EAAQjC,KAAO,GAAGS,EAAgBT,8BAClCS,EAAgBe,WAAWS,QAAUA,CAAO,MAG7Cf,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEAc,EAAwBvC,GACxBwC,EAAsBxC,GAAM,GAAOG,GAAW,IAAIF,EAAyBE"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { b4 as PBRMaterial, aV as unregisterGLTFExtension, aW as registerGLTFExtension } from './index-D46Rc8Qa.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-CKBe9bFc.esm.js';
|
|
3
|
+
import './rawTexture-Dh4jdTlv.esm.js';
|
|
4
|
+
import './assetContainer-Cx2Wvxkg.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-D57wBZJj.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "KHR_materials_anisotropy";
|
|
8
|
+
/**
|
|
9
|
+
* [Specification](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy)
|
|
10
|
+
*/
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
+
class KHR_materials_anisotropy {
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
constructor(loader) {
|
|
17
|
+
/**
|
|
18
|
+
* The name of this extension.
|
|
19
|
+
*/
|
|
20
|
+
this.name = NAME;
|
|
21
|
+
/**
|
|
22
|
+
* Defines a number that determines the order the extensions are applied.
|
|
23
|
+
*/
|
|
24
|
+
this.order = 195;
|
|
25
|
+
this._loader = loader;
|
|
26
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
dispose() {
|
|
30
|
+
this._loader = null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
36
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
37
|
+
const promises = new Array();
|
|
38
|
+
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
39
|
+
promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
40
|
+
return Promise.all(promises).then(() => { });
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
_loadIridescencePropertiesAsync(context, properties, babylonMaterial) {
|
|
44
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
45
|
+
throw new Error(`${context}: Material type not supported`);
|
|
46
|
+
}
|
|
47
|
+
const promises = new Array();
|
|
48
|
+
babylonMaterial.anisotropy.isEnabled = true;
|
|
49
|
+
babylonMaterial.anisotropy.intensity = properties.anisotropyStrength ?? 0;
|
|
50
|
+
babylonMaterial.anisotropy.angle = properties.anisotropyRotation ?? 0;
|
|
51
|
+
if (properties.anisotropyTexture) {
|
|
52
|
+
properties.anisotropyTexture.nonColorData = true;
|
|
53
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/anisotropyTexture`, properties.anisotropyTexture, (texture) => {
|
|
54
|
+
texture.name = `${babylonMaterial.name} (Anisotropy Intensity)`;
|
|
55
|
+
babylonMaterial.anisotropy.texture = texture;
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
return Promise.all(promises).then(() => { });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
unregisterGLTFExtension(NAME);
|
|
62
|
+
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_anisotropy(loader));
|
|
63
|
+
|
|
64
|
+
export { KHR_materials_anisotropy };
|
|
65
|
+
//# sourceMappingURL=KHR_materials_anisotropy-rMp1ahNa.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_anisotropy-rMp1ahNa.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_anisotropy.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_anisotropy\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_anisotropy {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 195;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.anisotropy.isEnabled = true;\n babylonMaterial.anisotropy.intensity = properties.anisotropyStrength ?? 0;\n babylonMaterial.anisotropy.angle = properties.anisotropyRotation ?? 0;\n if (properties.anisotropyTexture) {\n properties.anisotropyTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/anisotropyTexture`, properties.anisotropyTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Anisotropy Intensity)`;\n babylonMaterial.anisotropy.texture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_anisotropy(loader));\n//# sourceMappingURL=KHR_materials_anisotropy.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,0BAA0B;AACvC;AACA;AACA;AACA;AACO,MAAM,wBAAwB,CAAC;AACtC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE;AACpE,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,gBAAgB,EAAE,SAAS,KAAK;AAC5G,YAAY,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE;AACxC,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;AACvG,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,gBAAgB,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,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,wBAAwB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { b4 as PBRMaterial, aV as unregisterGLTFExtension, aW as registerGLTFExtension } from './index-D46Rc8Qa.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-CKBe9bFc.esm.js';
|
|
3
|
+
import './rawTexture-Dh4jdTlv.esm.js';
|
|
4
|
+
import './assetContainer-Cx2Wvxkg.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-D57wBZJj.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "KHR_materials_clearcoat";
|
|
8
|
+
/**
|
|
9
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md)
|
|
10
|
+
* [Playground Sample](https://www.babylonjs-playground.com/frame.html#7F7PN6#8)
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
|
+
class KHR_materials_clearcoat {
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
constructor(loader) {
|
|
18
|
+
/**
|
|
19
|
+
* The name of this extension.
|
|
20
|
+
*/
|
|
21
|
+
this.name = NAME;
|
|
22
|
+
/**
|
|
23
|
+
* Defines a number that determines the order the extensions are applied.
|
|
24
|
+
*/
|
|
25
|
+
this.order = 190;
|
|
26
|
+
this._loader = loader;
|
|
27
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
dispose() {
|
|
31
|
+
this._loader = null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
37
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
38
|
+
const promises = new Array();
|
|
39
|
+
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
40
|
+
promises.push(this._loadClearCoatPropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
41
|
+
return Promise.all(promises).then(() => { });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
_loadClearCoatPropertiesAsync(context, properties, babylonMaterial) {
|
|
45
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
46
|
+
throw new Error(`${context}: Material type not supported`);
|
|
47
|
+
}
|
|
48
|
+
const promises = new Array();
|
|
49
|
+
babylonMaterial.clearCoat.isEnabled = true;
|
|
50
|
+
babylonMaterial.clearCoat.useRoughnessFromMainTexture = false;
|
|
51
|
+
babylonMaterial.clearCoat.remapF0OnInterfaceChange = false;
|
|
52
|
+
if (properties.clearcoatFactor != undefined) {
|
|
53
|
+
babylonMaterial.clearCoat.intensity = properties.clearcoatFactor;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
babylonMaterial.clearCoat.intensity = 0;
|
|
57
|
+
}
|
|
58
|
+
if (properties.clearcoatTexture) {
|
|
59
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatTexture`, properties.clearcoatTexture, (texture) => {
|
|
60
|
+
texture.name = `${babylonMaterial.name} (ClearCoat)`;
|
|
61
|
+
babylonMaterial.clearCoat.texture = texture;
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
if (properties.clearcoatRoughnessFactor != undefined) {
|
|
65
|
+
babylonMaterial.clearCoat.roughness = properties.clearcoatRoughnessFactor;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
babylonMaterial.clearCoat.roughness = 0;
|
|
69
|
+
}
|
|
70
|
+
if (properties.clearcoatRoughnessTexture) {
|
|
71
|
+
properties.clearcoatRoughnessTexture.nonColorData = true;
|
|
72
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatRoughnessTexture`, properties.clearcoatRoughnessTexture, (texture) => {
|
|
73
|
+
texture.name = `${babylonMaterial.name} (ClearCoat Roughness)`;
|
|
74
|
+
babylonMaterial.clearCoat.textureRoughness = texture;
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
if (properties.clearcoatNormalTexture) {
|
|
78
|
+
properties.clearcoatNormalTexture.nonColorData = true;
|
|
79
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatNormalTexture`, properties.clearcoatNormalTexture, (texture) => {
|
|
80
|
+
texture.name = `${babylonMaterial.name} (ClearCoat Normal)`;
|
|
81
|
+
babylonMaterial.clearCoat.bumpTexture = texture;
|
|
82
|
+
}));
|
|
83
|
+
babylonMaterial.invertNormalMapX = !babylonMaterial.getScene().useRightHandedSystem;
|
|
84
|
+
babylonMaterial.invertNormalMapY = babylonMaterial.getScene().useRightHandedSystem;
|
|
85
|
+
if (properties.clearcoatNormalTexture.scale != undefined) {
|
|
86
|
+
babylonMaterial.clearCoat.bumpTexture.level = properties.clearcoatNormalTexture.scale;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return Promise.all(promises).then(() => { });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
unregisterGLTFExtension(NAME);
|
|
93
|
+
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_clearcoat(loader));
|
|
94
|
+
|
|
95
|
+
export { KHR_materials_clearcoat };
|
|
96
|
+
//# sourceMappingURL=KHR_materials_clearcoat-Dw7bP6zs.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_clearcoat-Dw7bP6zs.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_clearcoat.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_clearcoat\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#7F7PN6#8)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_clearcoat {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadClearCoatPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadClearCoatPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.clearCoat.isEnabled = true;\n babylonMaterial.clearCoat.useRoughnessFromMainTexture = false;\n babylonMaterial.clearCoat.remapF0OnInterfaceChange = false;\n if (properties.clearcoatFactor != undefined) {\n babylonMaterial.clearCoat.intensity = properties.clearcoatFactor;\n }\n else {\n babylonMaterial.clearCoat.intensity = 0;\n }\n if (properties.clearcoatTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatTexture`, properties.clearcoatTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat)`;\n babylonMaterial.clearCoat.texture = texture;\n }));\n }\n if (properties.clearcoatRoughnessFactor != undefined) {\n babylonMaterial.clearCoat.roughness = properties.clearcoatRoughnessFactor;\n }\n else {\n babylonMaterial.clearCoat.roughness = 0;\n }\n if (properties.clearcoatRoughnessTexture) {\n properties.clearcoatRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatRoughnessTexture`, properties.clearcoatRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Roughness)`;\n babylonMaterial.clearCoat.textureRoughness = texture;\n }));\n }\n if (properties.clearcoatNormalTexture) {\n properties.clearcoatNormalTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatNormalTexture`, properties.clearcoatNormalTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Normal)`;\n babylonMaterial.clearCoat.bumpTexture = texture;\n }));\n babylonMaterial.invertNormalMapX = !babylonMaterial.getScene().useRightHandedSystem;\n babylonMaterial.invertNormalMapY = babylonMaterial.getScene().useRightHandedSystem;\n if (properties.clearcoatNormalTexture.scale != undefined) {\n babylonMaterial.clearCoat.bumpTexture.level = properties.clearcoatNormalTexture.scale;\n }\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_clearcoat(loader));\n//# sourceMappingURL=KHR_materials_clearcoat.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,yBAAyB;AACtC;AACA;AACA;AACA;AACA;AACO,MAAM,uBAAuB,CAAC;AACrC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,2BA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EAAE,CAAC,OAAO,KAAK;AACjJ,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,mBAAmB,CAAC;AAC3E,gBAAgB,eAAe,CAAC,SAAS,CAAC,WAAW,GAAG,OAAO;AAC/D,aAAa,CAAC,CAAC;AACf,YAAY,eAAe,CAAC,gBAAgB,GAAG,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC,oBAAoB;AAC/F,YAAY,eAAe,CAAC,gBAAgB,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC,oBAAoB;AAC9F,YAAY,IAAI,UAAU,CAAC,sBAAsB,CAAC,KAAK,IAAI,SAAS,EAAE;AACtE,gBAAgB,eAAe,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,GAAG,UAAU,CAAC,sBAAsB,CAAC,KAAK;AACrG;AACA;AACA,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;AACpD;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b4 as e,aV as a,aW as r}from"./index-r5IGv8fd.esm.min.js";import{G as t}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";const o="KHR_materials_clearcoat";class s{constructor(e){this.name=o,this.order=190,this._loader=e,this.enabled=this._loader.isExtensionUsed(o)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,a,r){return t.LoadExtensionAsync(e,a,this.name,((t,o)=>{const s=new Array;return s.push(this._loader.loadMaterialPropertiesAsync(e,a,r)),s.push(this._loadClearCoatPropertiesAsync(t,o,r)),Promise.all(s).then((()=>{}))}))}_loadClearCoatPropertiesAsync(a,r,t){if(!(t instanceof e))throw new Error(`${a}: Material type not supported`);const o=new Array;return t.clearCoat.isEnabled=!0,t.clearCoat.useRoughnessFromMainTexture=!1,t.clearCoat.remapF0OnInterfaceChange=!1,null!=r.clearcoatFactor?t.clearCoat.intensity=r.clearcoatFactor:t.clearCoat.intensity=0,r.clearcoatTexture&&o.push(this._loader.loadTextureInfoAsync(`${a}/clearcoatTexture`,r.clearcoatTexture,(e=>{e.name=`${t.name} (ClearCoat)`,t.clearCoat.texture=e}))),null!=r.clearcoatRoughnessFactor?t.clearCoat.roughness=r.clearcoatRoughnessFactor:t.clearCoat.roughness=0,r.clearcoatRoughnessTexture&&(r.clearcoatRoughnessTexture.nonColorData=!0,o.push(this._loader.loadTextureInfoAsync(`${a}/clearcoatRoughnessTexture`,r.clearcoatRoughnessTexture,(e=>{e.name=`${t.name} (ClearCoat Roughness)`,t.clearCoat.textureRoughness=e})))),r.clearcoatNormalTexture&&(r.clearcoatNormalTexture.nonColorData=!0,o.push(this._loader.loadTextureInfoAsync(`${a}/clearcoatNormalTexture`,r.clearcoatNormalTexture,(e=>{e.name=`${t.name} (ClearCoat Normal)`,t.clearCoat.bumpTexture=e}))),t.invertNormalMapX=!t.getScene().useRightHandedSystem,t.invertNormalMapY=t.getScene().useRightHandedSystem,null!=r.clearcoatNormalTexture.scale&&(t.clearCoat.bumpTexture.level=r.clearcoatNormalTexture.scale)),Promise.all(o).then((()=>{}))}}a(o),r(o,!0,(e=>new s(e)));export{s as KHR_materials_clearcoat};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_clearcoat-c_8cDReS.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_clearcoat-c_8cDReS.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_clearcoat.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_clearcoat\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_clearcoat/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#7F7PN6#8)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_clearcoat {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 190;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadClearCoatPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadClearCoatPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.clearCoat.isEnabled = true;\n babylonMaterial.clearCoat.useRoughnessFromMainTexture = false;\n babylonMaterial.clearCoat.remapF0OnInterfaceChange = false;\n if (properties.clearcoatFactor != undefined) {\n babylonMaterial.clearCoat.intensity = properties.clearcoatFactor;\n }\n else {\n babylonMaterial.clearCoat.intensity = 0;\n }\n if (properties.clearcoatTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatTexture`, properties.clearcoatTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat)`;\n babylonMaterial.clearCoat.texture = texture;\n }));\n }\n if (properties.clearcoatRoughnessFactor != undefined) {\n babylonMaterial.clearCoat.roughness = properties.clearcoatRoughnessFactor;\n }\n else {\n babylonMaterial.clearCoat.roughness = 0;\n }\n if (properties.clearcoatRoughnessTexture) {\n properties.clearcoatRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatRoughnessTexture`, properties.clearcoatRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Roughness)`;\n babylonMaterial.clearCoat.textureRoughness = texture;\n }));\n }\n if (properties.clearcoatNormalTexture) {\n properties.clearcoatNormalTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/clearcoatNormalTexture`, properties.clearcoatNormalTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (ClearCoat Normal)`;\n babylonMaterial.clearCoat.bumpTexture = texture;\n }));\n babylonMaterial.invertNormalMapX = !babylonMaterial.getScene().useRightHandedSystem;\n babylonMaterial.invertNormalMapY = babylonMaterial.getScene().useRightHandedSystem;\n if (properties.clearcoatNormalTexture.scale != undefined) {\n babylonMaterial.clearCoat.bumpTexture.level = properties.clearcoatNormalTexture.scale;\n }\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_clearcoat(loader));\n//# sourceMappingURL=KHR_materials_clearcoat.js.map"],"names":["NAME","KHR_materials_clearcoat","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadClearCoatPropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","clearCoat","isEnabled","useRoughnessFromMainTexture","remapF0OnInterfaceChange","undefined","clearcoatFactor","intensity","clearcoatTexture","loadTextureInfoAsync","texture","clearcoatRoughnessFactor","roughness","clearcoatRoughnessTexture","nonColorData","textureRoughness","clearcoatNormalTexture","bumpTexture","invertNormalMapX","getScene","useRightHandedSystem","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,QAAQ8B,qBAAqB,GAAGzB,8BAAqCc,EAAWe,2BAA4BH,IAC3HA,EAAQjC,KAAO,GAAGS,EAAgBT,6BAClCS,EAAgBe,UAAUc,iBAAmBL,CAAO,MAGxDZ,EAAWkB,yBACXlB,EAAWkB,uBAAuBF,cAAe,EACjDvB,EAASE,KAAKjB,KAAKG,QAAQ8B,qBAAqB,GAAGzB,2BAAkCc,EAAWkB,wBAAyBN,IACrHA,EAAQjC,KAAO,GAAGS,EAAgBT,0BAClCS,EAAgBe,UAAUgB,YAAcP,CAAO,KAEnDxB,EAAgBgC,kBAAoBhC,EAAgBiC,WAAWC,qBAC/DlC,EAAgBmC,iBAAmBnC,EAAgBiC,WAAWC,qBACff,MAA3CP,EAAWkB,uBAAuBM,QAClCpC,EAAgBe,UAAUgB,YAAYM,MAAQzB,EAAWkB,uBAAuBM,QAGjF3B,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEA2B,EAAwBpD,GACxBqD,EAAsBrD,GAAM,GAAOG,GAAW,IAAIF,EAAwBE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b4 as s,v as e,aV as r,aW as n}from"./index-r5IGv8fd.esm.min.js";import{G as a}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";const i="KHR_materials_diffuse_transmission";class o{constructor(s){this.name=i,this.order=174,this._loader=s,this.enabled=this._loader.isExtensionUsed(i),this.enabled&&(s.parent.transparencyAsCoverage=!0)}dispose(){this._loader=null}loadMaterialPropertiesAsync(s,e,r){return a.LoadExtensionAsync(s,e,this.name,((n,a)=>{const i=new Array;return i.push(this._loader.loadMaterialPropertiesAsync(s,e,r)),i.push(this._loadTranslucentPropertiesAsync(n,e,r,a)),Promise.all(i).then((()=>{}))}))}_loadTranslucentPropertiesAsync(r,n,a,i){if(!(a instanceof s))throw new Error(`${r}: Material type not supported`);const o=a;if(o.subSurface.isTranslucencyEnabled=!0,o.subSurface.volumeIndexOfRefraction=1,o.subSurface.minimumThickness=0,o.subSurface.maximumThickness=0,o.subSurface.useAlbedoToTintTranslucency=!1,void 0===i.diffuseTransmissionFactor)return o.subSurface.translucencyIntensity=0,o.subSurface.isTranslucencyEnabled=!1,Promise.resolve();o.subSurface.translucencyIntensity=i.diffuseTransmissionFactor;const t=new Array;return o.subSurface.useGltfStyleTextures=!0,i.diffuseTransmissionTexture&&(i.diffuseTransmissionTexture.nonColorData=!0,t.push(this._loader.loadTextureInfoAsync(`${r}/diffuseTransmissionTexture`,i.diffuseTransmissionTexture).then((s=>{s.name=`${a.name} (Diffuse Transmission)`,o.subSurface.translucencyIntensityTexture=s})))),void 0!==i.diffuseTransmissionColorFactor?o.subSurface.translucencyColor=e.FromArray(i.diffuseTransmissionColorFactor):o.subSurface.translucencyColor=e.White(),i.diffuseTransmissionColorTexture&&t.push(this._loader.loadTextureInfoAsync(`${r}/diffuseTransmissionColorTexture`,i.diffuseTransmissionColorTexture).then((s=>{s.name=`${a.name} (Diffuse Transmission Color)`,o.subSurface.translucencyColorTexture=s}))),Promise.all(t).then((()=>{}))}}r(i),n(i,!0,(s=>new o(s)));export{o as KHR_materials_diffuse_transmission};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_diffuse_transmission-CXn0MUer.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_diffuse_transmission-CXn0MUer.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_diffuse_transmission\";\n/**\n * [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)\n * !!! Experimental Extension Subject to Changes !!!\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_diffuse_transmission {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n loader.parent.transparencyAsCoverage = true;\n }\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadTranslucentPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadTranslucentPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const pbrMaterial = babylonMaterial;\n // Enables \"translucency\" texture which represents diffusely-transmitted light.\n pbrMaterial.subSurface.isTranslucencyEnabled = true;\n // Since this extension models thin-surface transmission only, we must make the\n // internal IOR == 1.0 and set the thickness to 0.\n pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;\n pbrMaterial.subSurface.minimumThickness = 0.0;\n pbrMaterial.subSurface.maximumThickness = 0.0;\n // Tint color will be used for transmission.\n pbrMaterial.subSurface.useAlbedoToTintTranslucency = false;\n if (extension.diffuseTransmissionFactor !== undefined) {\n pbrMaterial.subSurface.translucencyIntensity = extension.diffuseTransmissionFactor;\n }\n else {\n pbrMaterial.subSurface.translucencyIntensity = 0.0;\n pbrMaterial.subSurface.isTranslucencyEnabled = false;\n return Promise.resolve();\n }\n const promises = new Array();\n pbrMaterial.subSurface.useGltfStyleTextures = true;\n if (extension.diffuseTransmissionTexture) {\n extension.diffuseTransmissionTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionTexture`, extension.diffuseTransmissionTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse Transmission)`;\n pbrMaterial.subSurface.translucencyIntensityTexture = texture;\n }));\n }\n if (extension.diffuseTransmissionColorFactor !== undefined) {\n pbrMaterial.subSurface.translucencyColor = Color3.FromArray(extension.diffuseTransmissionColorFactor);\n }\n else {\n pbrMaterial.subSurface.translucencyColor = Color3.White();\n }\n if (extension.diffuseTransmissionColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionColorTexture`, extension.diffuseTransmissionColorTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse Transmission Color)`;\n pbrMaterial.subSurface.translucencyColorTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_diffuse_transmission(loader));\n//# sourceMappingURL=KHR_materials_diffuse_transmission.js.map"],"names":["NAME","KHR_materials_diffuse_transmission","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","parent","transparencyAsCoverage","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadTranslucentPropertiesAsync","Promise","all","then","PBRMaterial","Error","pbrMaterial","subSurface","isTranslucencyEnabled","volumeIndexOfRefraction","minimumThickness","maximumThickness","useAlbedoToTintTranslucency","undefined","diffuseTransmissionFactor","translucencyIntensity","resolve","useGltfStyleTextures","diffuseTransmissionTexture","nonColorData","loadTextureInfoAsync","texture","translucencyIntensityTexture","diffuseTransmissionColorFactor","translucencyColor","Color3","FromArray","White","diffuseTransmissionColorTexture","translucencyColorTexture","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"qQAIA,MAAMA,EAAO,qCAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAA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BR,IAA7CjB,EAAU2B,+BACVjB,EAAYC,WAAWiB,kBAAoBC,EAAOC,UAAU9B,EAAU2B,gCAGtEjB,EAAYC,WAAWiB,kBAAoBC,EAAOE,QAElD/B,EAAUgC,iCACV/B,EAASE,KAAKnB,KAAKG,QAAQqC,qBAAqB,GAAG9B,oCAA2CM,EAAUgC,iCAAiCzB,MAAMkB,IAC3IA,EAAQxC,KAAO,GAAGW,EAAgBX,oCAClCyB,EAAYC,WAAWsB,yBAA2BR,CAAO,KAG1DpB,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEA2B,EAAwBtD,GACxBuD,EAAsBvD,GAAM,GAAOG,GAAW,IAAIF,EAAmCE"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { b4 as PBRMaterial, v as Color3, aV as unregisterGLTFExtension, aW as registerGLTFExtension } from './index-D46Rc8Qa.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-CKBe9bFc.esm.js';
|
|
3
|
+
import './rawTexture-Dh4jdTlv.esm.js';
|
|
4
|
+
import './assetContainer-Cx2Wvxkg.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-D57wBZJj.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "KHR_materials_diffuse_transmission";
|
|
8
|
+
/**
|
|
9
|
+
* [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)
|
|
10
|
+
* !!! Experimental Extension Subject to Changes !!!
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
|
+
class KHR_materials_diffuse_transmission {
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
constructor(loader) {
|
|
18
|
+
/**
|
|
19
|
+
* The name of this extension.
|
|
20
|
+
*/
|
|
21
|
+
this.name = NAME;
|
|
22
|
+
/**
|
|
23
|
+
* Defines a number that determines the order the extensions are applied.
|
|
24
|
+
*/
|
|
25
|
+
this.order = 174;
|
|
26
|
+
this._loader = loader;
|
|
27
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
28
|
+
if (this.enabled) {
|
|
29
|
+
loader.parent.transparencyAsCoverage = true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** @internal */
|
|
33
|
+
dispose() {
|
|
34
|
+
this._loader = null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
40
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
41
|
+
const promises = new Array();
|
|
42
|
+
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
43
|
+
promises.push(this._loadTranslucentPropertiesAsync(extensionContext, material, babylonMaterial, extension));
|
|
44
|
+
return Promise.all(promises).then(() => { });
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
_loadTranslucentPropertiesAsync(context, material, babylonMaterial, extension) {
|
|
48
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
49
|
+
throw new Error(`${context}: Material type not supported`);
|
|
50
|
+
}
|
|
51
|
+
const pbrMaterial = babylonMaterial;
|
|
52
|
+
// Enables "translucency" texture which represents diffusely-transmitted light.
|
|
53
|
+
pbrMaterial.subSurface.isTranslucencyEnabled = true;
|
|
54
|
+
// Since this extension models thin-surface transmission only, we must make the
|
|
55
|
+
// internal IOR == 1.0 and set the thickness to 0.
|
|
56
|
+
pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;
|
|
57
|
+
pbrMaterial.subSurface.minimumThickness = 0.0;
|
|
58
|
+
pbrMaterial.subSurface.maximumThickness = 0.0;
|
|
59
|
+
// Tint color will be used for transmission.
|
|
60
|
+
pbrMaterial.subSurface.useAlbedoToTintTranslucency = false;
|
|
61
|
+
if (extension.diffuseTransmissionFactor !== undefined) {
|
|
62
|
+
pbrMaterial.subSurface.translucencyIntensity = extension.diffuseTransmissionFactor;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
pbrMaterial.subSurface.translucencyIntensity = 0.0;
|
|
66
|
+
pbrMaterial.subSurface.isTranslucencyEnabled = false;
|
|
67
|
+
return Promise.resolve();
|
|
68
|
+
}
|
|
69
|
+
const promises = new Array();
|
|
70
|
+
pbrMaterial.subSurface.useGltfStyleTextures = true;
|
|
71
|
+
if (extension.diffuseTransmissionTexture) {
|
|
72
|
+
extension.diffuseTransmissionTexture.nonColorData = true;
|
|
73
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionTexture`, extension.diffuseTransmissionTexture).then((texture) => {
|
|
74
|
+
texture.name = `${babylonMaterial.name} (Diffuse Transmission)`;
|
|
75
|
+
pbrMaterial.subSurface.translucencyIntensityTexture = texture;
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
if (extension.diffuseTransmissionColorFactor !== undefined) {
|
|
79
|
+
pbrMaterial.subSurface.translucencyColor = Color3.FromArray(extension.diffuseTransmissionColorFactor);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
pbrMaterial.subSurface.translucencyColor = Color3.White();
|
|
83
|
+
}
|
|
84
|
+
if (extension.diffuseTransmissionColorTexture) {
|
|
85
|
+
promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionColorTexture`, extension.diffuseTransmissionColorTexture).then((texture) => {
|
|
86
|
+
texture.name = `${babylonMaterial.name} (Diffuse Transmission Color)`;
|
|
87
|
+
pbrMaterial.subSurface.translucencyColorTexture = texture;
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
return Promise.all(promises).then(() => { });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
unregisterGLTFExtension(NAME);
|
|
94
|
+
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_diffuse_transmission(loader));
|
|
95
|
+
|
|
96
|
+
export { KHR_materials_diffuse_transmission };
|
|
97
|
+
//# sourceMappingURL=KHR_materials_diffuse_transmission-CsMJW09v.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_diffuse_transmission-CsMJW09v.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_diffuse_transmission.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_diffuse_transmission\";\n/**\n * [Proposed Specification](https://github.com/KhronosGroup/glTF/pull/1825)\n * !!! Experimental Extension Subject to Changes !!!\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_diffuse_transmission {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n loader.parent.transparencyAsCoverage = true;\n }\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadTranslucentPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadTranslucentPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const pbrMaterial = babylonMaterial;\n // Enables \"translucency\" texture which represents diffusely-transmitted light.\n pbrMaterial.subSurface.isTranslucencyEnabled = true;\n // Since this extension models thin-surface transmission only, we must make the\n // internal IOR == 1.0 and set the thickness to 0.\n pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;\n pbrMaterial.subSurface.minimumThickness = 0.0;\n pbrMaterial.subSurface.maximumThickness = 0.0;\n // Tint color will be used for transmission.\n pbrMaterial.subSurface.useAlbedoToTintTranslucency = false;\n if (extension.diffuseTransmissionFactor !== undefined) {\n pbrMaterial.subSurface.translucencyIntensity = extension.diffuseTransmissionFactor;\n }\n else {\n pbrMaterial.subSurface.translucencyIntensity = 0.0;\n pbrMaterial.subSurface.isTranslucencyEnabled = false;\n return Promise.resolve();\n }\n const promises = new Array();\n pbrMaterial.subSurface.useGltfStyleTextures = true;\n if (extension.diffuseTransmissionTexture) {\n extension.diffuseTransmissionTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionTexture`, extension.diffuseTransmissionTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse Transmission)`;\n pbrMaterial.subSurface.translucencyIntensityTexture = texture;\n }));\n }\n if (extension.diffuseTransmissionColorFactor !== undefined) {\n pbrMaterial.subSurface.translucencyColor = Color3.FromArray(extension.diffuseTransmissionColorFactor);\n }\n else {\n pbrMaterial.subSurface.translucencyColor = Color3.White();\n }\n if (extension.diffuseTransmissionColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTransmissionColorTexture`, extension.diffuseTransmissionColorTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse Transmission Color)`;\n pbrMaterial.subSurface.translucencyColorTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_diffuse_transmission(loader));\n//# sourceMappingURL=KHR_materials_diffuse_transmission.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,oCAAoC;AACjD;AACA;AACA;AACA;AACA;AACO,MAAM,kCAAkC,CAAC;AAChD;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,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AO;AAC7E,aAAa,CAAC,CAAC;AACf;AACA,QAAQ,IAAI,SAAS,CAAC,8BAA8B,KAAK,SAAS,EAAE;AACpE,YAAY,WAAW,CAAC,UAAU,CAAC,iBAAiB,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,8BAA8B,CAAC;AACjH;AACA,aAAa;AACb,YAAY,WAAW,CAAC,UAAU,CAAC,iBAAiB,GAAG,MAAM,CAAC,KAAK,EAAE;AACrE;AACA,QAAQ,IAAI,SAAS,CAAC,+BAA+B,EAAE;AACvD,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,gCAAgC,CAAC,EAAE,SAAS,CAAC,+BAA+B,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK;AACvK,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,6BAA6B,CAAC;AACrF,gBAAgB,WAAW,CAAC,UAAU,CAAC,wBAAwB,GAAG,OAAO;AACzE,aAAa,CAAC,CAAC;AACf;AACA,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;AACpD;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,kCAAkC,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { b4 as PBRMaterial, aV as unregisterGLTFExtension, aW as registerGLTFExtension } from './index-D46Rc8Qa.esm.js';
|
|
2
|
+
import { G as GLTFLoader } from './glTFLoader-CKBe9bFc.esm.js';
|
|
3
|
+
import './rawTexture-Dh4jdTlv.esm.js';
|
|
4
|
+
import './assetContainer-Cx2Wvxkg.esm.js';
|
|
5
|
+
import './glTFLoaderAnimation-D57wBZJj.esm.js';
|
|
6
|
+
|
|
7
|
+
const NAME = "KHR_materials_dispersion";
|
|
8
|
+
/**
|
|
9
|
+
* [Specification](https://github.com/KhronosGroup/glTF/blob/87bd64a7f5e23c84b6aef2e6082069583ed0ddb4/extensions/2.0/Khronos/KHR_materials_dispersion/README.md)
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
|
+
class KHR_materials_dispersion {
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
constructor(loader) {
|
|
18
|
+
/**
|
|
19
|
+
* The name of this extension.
|
|
20
|
+
*/
|
|
21
|
+
this.name = NAME;
|
|
22
|
+
/**
|
|
23
|
+
* Defines a number that determines the order the extensions are applied.
|
|
24
|
+
*/
|
|
25
|
+
this.order = 174;
|
|
26
|
+
this._loader = loader;
|
|
27
|
+
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
dispose() {
|
|
31
|
+
this._loader = null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
37
|
+
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
38
|
+
const promises = new Array();
|
|
39
|
+
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
40
|
+
promises.push(this._loadDispersionPropertiesAsync(extensionContext, material, babylonMaterial, extension));
|
|
41
|
+
return Promise.all(promises).then(() => { });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
_loadDispersionPropertiesAsync(context, material, babylonMaterial, extension) {
|
|
45
|
+
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
46
|
+
throw new Error(`${context}: Material type not supported`);
|
|
47
|
+
}
|
|
48
|
+
// If transparency isn't enabled already, this extension shouldn't do anything.
|
|
49
|
+
// i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.
|
|
50
|
+
if (!babylonMaterial.subSurface.isRefractionEnabled || !extension.dispersion) {
|
|
51
|
+
return Promise.resolve();
|
|
52
|
+
}
|
|
53
|
+
babylonMaterial.subSurface.isDispersionEnabled = true;
|
|
54
|
+
babylonMaterial.subSurface.dispersion = extension.dispersion;
|
|
55
|
+
return Promise.resolve();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
unregisterGLTFExtension(NAME);
|
|
59
|
+
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_dispersion(loader));
|
|
60
|
+
|
|
61
|
+
export { KHR_materials_dispersion };
|
|
62
|
+
//# sourceMappingURL=KHR_materials_dispersion-BDCbGsPA.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_dispersion-BDCbGsPA.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_dispersion.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_dispersion\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/87bd64a7f5e23c84b6aef2e6082069583ed0ddb4/extensions/2.0/Khronos/KHR_materials_dispersion/README.md)\n * @experimental\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_dispersion {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadDispersionPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadDispersionPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n // If transparency isn't enabled already, this extension shouldn't do anything.\n // i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.\n if (!babylonMaterial.subSurface.isRefractionEnabled || !extension.dispersion) {\n return Promise.resolve();\n }\n babylonMaterial.subSurface.isDispersionEnabled = true;\n babylonMaterial.subSurface.dispersion = extension.dispersion;\n return Promise.resolve();\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_dispersion(loader));\n//# sourceMappingURL=KHR_materials_dispersion.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACO,MAAM,wBAAwB,CAAC;AACtC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE;AACpE,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI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G as i}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";const o="KHR_materials_dispersion";class n{constructor(s){this.name=o,this.order=174,this._loader=s,this.enabled=this._loader.isExtensionUsed(o)}dispose(){this._loader=null}loadMaterialPropertiesAsync(s,e,r){return i.LoadExtensionAsync(s,e,this.name,((i,o)=>{const n=new Array;return n.push(this._loader.loadMaterialPropertiesAsync(s,e,r)),n.push(this._loadDispersionPropertiesAsync(i,e,r,o)),Promise.all(n).then((()=>{}))}))}_loadDispersionPropertiesAsync(e,r,i,o){if(!(i instanceof s))throw new Error(`${e}: Material type not supported`);return i.subSurface.isRefractionEnabled&&o.dispersion?(i.subSurface.isDispersionEnabled=!0,i.subSurface.dispersion=o.dispersion,Promise.resolve()):Promise.resolve()}}e(o),r(o,!0,(s=>new n(s)));export{n as KHR_materials_dispersion};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_dispersion-D2yTJOjM.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_dispersion-D2yTJOjM.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_dispersion.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_dispersion\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/87bd64a7f5e23c84b6aef2e6082069583ed0ddb4/extensions/2.0/Khronos/KHR_materials_dispersion/README.md)\n * @experimental\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_dispersion {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 174;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadDispersionPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadDispersionPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n // If transparency isn't enabled already, this extension shouldn't do anything.\n // i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.\n if (!babylonMaterial.subSurface.isRefractionEnabled || !extension.dispersion) {\n return Promise.resolve();\n }\n babylonMaterial.subSurface.isDispersionEnabled = true;\n babylonMaterial.subSurface.dispersion = extension.dispersion;\n return Promise.resolve();\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_dispersion(loader));\n//# sourceMappingURL=KHR_materials_dispersion.js.map"],"names":["NAME","KHR_materials_dispersion","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadDispersionPropertiesAsync","Promise","all","then","PBRMaterial","Error","subSurface","isRefractionEnabled","dispersion","isDispersionEnabled","resolve","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,2BAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,+BAA+BL,EAAkBJ,EAAUC,EAAiBI,IACxFK,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,8BAAAH,CAA+BV,EAASC,EAAUC,EAAiBI,GAC/D,KAAMJ,aAA2BY,GAC7B,MAAM,IAAIC,MAAM,GAAGf,kCAIvB,OAAKE,EAAgBc,WAAWC,qBAAwBX,EAAUY,YAGlEhB,EAAgBc,WAAWG,qBAAsB,EACjDjB,EAAgBc,WAAWE,WAAaZ,EAAUY,WAC3CP,QAAQS,WAJJT,QAAQS,SAK3B,EAEAC,EAAwBjC,GACxBkC,EAAsBlC,GAAM,GAAOG,GAAW,IAAIF,EAAyBE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b4 as e,aV as s,aW as i}from"./index-r5IGv8fd.esm.min.js";import{G as t}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";const r="KHR_materials_emissive_strength";class o{constructor(e){this.name=r,this.order=170,this._loader=e,this.enabled=this._loader.isExtensionUsed(r)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,s,i){return t.LoadExtensionAsync(e,s,this.name,((t,r)=>this._loader.loadMaterialPropertiesAsync(e,s,i).then((()=>{this._loadEmissiveProperties(t,r,i)}))))}_loadEmissiveProperties(s,i,t){if(!(t instanceof e))throw new Error(`${s}: Material type not supported`);void 0!==i.emissiveStrength&&(t.emissiveIntensity=i.emissiveStrength)}}s(r),i(r,!0,(e=>new o(e)));export{o as KHR_materials_emissive_strength};
|
|
2
|
+
//# sourceMappingURL=KHR_materials_emissive_strength-Tz0C88U3.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KHR_materials_emissive_strength-Tz0C88U3.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_emissive_strength.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_emissive_strength\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_emissive_strength/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_emissive_strength {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 170;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n return this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial).then(() => {\n this._loadEmissiveProperties(extensionContext, extension, babylonMaterial);\n });\n });\n }\n _loadEmissiveProperties(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n if (properties.emissiveStrength !== undefined) {\n babylonMaterial.emissiveIntensity = properties.emissiveStrength;\n }\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_emissive_strength(loader));\n//# sourceMappingURL=KHR_materials_emissive_strength.js.map"],"names":["NAME","KHR_materials_emissive_strength","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","then","_loadEmissiveProperties","properties","PBRMaterial","Error","undefined","emissiveStrength","emissiveIntensity","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8PAGA,MAAMA,EAAO,kCAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,IAC3Ed,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,GAAiBK,MAAK,KACrFf,KAAKgB,wBAAwBH,EAAkBC,EAAWJ,EAAgB,KAG1F,CACI,uBAAAM,CAAwBR,EAASS,EAAYP,GACzC,KAAMA,aAA2BQ,GAC7B,MAAM,IAAIC,MAAM,GAAGX,uCAEaY,IAAhCH,EAAWI,mBACXX,EAAgBY,kBAAoBL,EAAWI,iBAE3D,EAEAE,EAAwB3B,GACxB4B,EAAsB5B,GAAM,GAAOG,GAAW,IAAIF,EAAgCE"}
|