@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":"stlFileLoader-DtPzeNXZ.esm.js","sources":["../../../../../dev/loaders/dist/STL/stlFileLoader.js"],"sourcesContent":["import { Tools } from \"core/Misc/tools\";\nimport { VertexBuffer } from \"core/Buffers/buffer\";\nimport { Mesh } from \"core/Meshes/mesh\";\nimport { registerSceneLoaderPlugin } from \"core/Loading/sceneLoader\";\nimport { AssetContainer } from \"core/assetContainer\";\nimport { STLFileLoaderMetadata } from \"./stlFileLoader.metadata\";\nimport \"core/Materials/standardMaterial\";\n/**\n * STL file type loader.\n * This is a babylon scene loader plugin.\n */\nexport class STLFileLoader {\n constructor() {\n /** @internal */\n this.solidPattern = /solid (\\S*)([\\S\\s]*?)endsolid[ ]*(\\S*)/g;\n /** @internal */\n this.facetsPattern = /facet([\\s\\S]*?)endfacet/g;\n /** @internal */\n this.normalPattern = /normal[\\s]+([-+]?[0-9]+\\.?[0-9]*([eE][-+]?[0-9]+)?)+[\\s]+([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)+[\\s]+([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)+/g;\n /** @internal */\n this.vertexPattern = /vertex[\\s]+([-+]?[0-9]+\\.?[0-9]*([eE][-+]?[0-9]+)?)+[\\s]+([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)+[\\s]+([-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?)+/g;\n /**\n * Defines the name of the plugin.\n */\n this.name = STLFileLoaderMetadata.name;\n /**\n * Defines the extensions the stl loader is able to load.\n * force data to come in as an ArrayBuffer\n * we'll convert to string if it looks like it's an ASCII .stl\n */\n this.extensions = STLFileLoaderMetadata.extensions;\n }\n /**\n * Import meshes into a scene.\n * @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported\n * @param scene The scene to import into\n * @param data The data to import\n * @param rootUrl The root url for scene and resources\n * @param meshes The meshes array to import into\n * @returns True if successful or false otherwise\n */\n importMesh(meshesNames, scene, data, rootUrl, meshes) {\n let matches;\n if (typeof data !== \"string\") {\n if (this._isBinary(data)) {\n // binary .stl\n const babylonMesh = new Mesh(\"stlmesh\", scene);\n this._parseBinary(babylonMesh, data);\n if (meshes) {\n meshes.push(babylonMesh);\n }\n return true;\n }\n // ASCII .stl\n // convert to string\n data = new TextDecoder().decode(new Uint8Array(data));\n }\n //if arrived here, data is a string, containing the STLA data.\n while ((matches = this.solidPattern.exec(data))) {\n let meshName = matches[1];\n const meshNameFromEnd = matches[3];\n if (meshNameFromEnd && meshName != meshNameFromEnd) {\n Tools.Error(\"Error in STL, solid name != endsolid name\");\n return false;\n }\n // check meshesNames\n if (meshesNames && meshName) {\n if (meshesNames instanceof Array) {\n if (!meshesNames.indexOf(meshName)) {\n continue;\n }\n }\n else {\n if (meshName !== meshesNames) {\n continue;\n }\n }\n }\n // stl mesh name can be empty as well\n meshName = meshName || \"stlmesh\";\n const babylonMesh = new Mesh(meshName, scene);\n this._parseASCII(babylonMesh, matches[2]);\n if (meshes) {\n meshes.push(babylonMesh);\n }\n }\n return true;\n }\n /**\n * Load into a scene.\n * @param scene The scene to load into\n * @param data The data to import\n * @param rootUrl The root url for scene and resources\n * @returns true if successful or false otherwise\n */\n load(scene, data, rootUrl) {\n const result = this.importMesh(null, scene, data, rootUrl, null);\n return result;\n }\n /**\n * Load into an asset container.\n * @param scene The scene to load into\n * @param data The data to import\n * @param rootUrl The root url for scene and resources\n * @returns The loaded asset container\n */\n loadAssetContainer(scene, data, rootUrl) {\n const container = new AssetContainer(scene);\n scene._blockEntityCollection = true;\n this.importMesh(null, scene, data, rootUrl, container.meshes);\n scene._blockEntityCollection = false;\n return container;\n }\n _isBinary(data) {\n // check if file size is correct for binary stl\n const reader = new DataView(data);\n // A Binary STL header is 80 bytes, if the data size is not great than\n // that then it's not a binary STL.\n if (reader.byteLength <= 80) {\n return false;\n }\n const faceSize = (32 / 8) * 3 + (32 / 8) * 3 * 3 + 16 / 8;\n const nFaces = reader.getUint32(80, true);\n if (80 + 32 / 8 + nFaces * faceSize === reader.byteLength) {\n return true;\n }\n // US-ASCII begin with 's', 'o', 'l', 'i', 'd'\n const ascii = [115, 111, 108, 105, 100];\n for (let off = 0; off < 5; off++) {\n if (reader.getUint8(off) !== ascii[off]) {\n return true;\n }\n }\n return false;\n }\n _parseBinary(mesh, data) {\n const reader = new DataView(data);\n const faces = reader.getUint32(80, true);\n const dataOffset = 84;\n const faceLength = 12 * 4 + 2;\n let offset = 0;\n const positions = new Float32Array(faces * 3 * 3);\n const normals = new Float32Array(faces * 3 * 3);\n const indices = new Uint32Array(faces * 3);\n let indicesCount = 0;\n for (let face = 0; face < faces; face++) {\n const start = dataOffset + face * faceLength;\n const normalX = reader.getFloat32(start, true);\n const normalY = reader.getFloat32(start + 4, true);\n const normalZ = reader.getFloat32(start + 8, true);\n for (let i = 1; i <= 3; i++) {\n const vertexstart = start + i * 12;\n // ordering is intentional to match ascii import\n positions[offset] = reader.getFloat32(vertexstart, true);\n normals[offset] = normalX;\n if (!STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES) {\n positions[offset + 2] = reader.getFloat32(vertexstart + 4, true);\n positions[offset + 1] = reader.getFloat32(vertexstart + 8, true);\n normals[offset + 2] = normalY;\n normals[offset + 1] = normalZ;\n }\n else {\n positions[offset + 1] = reader.getFloat32(vertexstart + 4, true);\n positions[offset + 2] = reader.getFloat32(vertexstart + 8, true);\n normals[offset + 1] = normalY;\n normals[offset + 2] = normalZ;\n }\n offset += 3;\n }\n if (STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES) {\n indices[indicesCount] = indicesCount;\n indices[indicesCount + 1] = indicesCount + 2;\n indices[indicesCount + 2] = indicesCount + 1;\n indicesCount += 3;\n }\n else {\n indices[indicesCount] = indicesCount++;\n indices[indicesCount] = indicesCount++;\n indices[indicesCount] = indicesCount++;\n }\n }\n mesh.setVerticesData(VertexBuffer.PositionKind, positions);\n mesh.setVerticesData(VertexBuffer.NormalKind, normals);\n mesh.setIndices(indices);\n mesh.computeWorldMatrix(true);\n }\n _parseASCII(mesh, solidData) {\n const positions = [];\n const normals = [];\n const indices = [];\n let indicesCount = 0;\n //load facets, ignoring loop as the standard doesn't define it can contain more than vertices\n let matches;\n while ((matches = this.facetsPattern.exec(solidData))) {\n const facet = matches[1];\n //one normal per face\n const normalMatches = this.normalPattern.exec(facet);\n this.normalPattern.lastIndex = 0;\n if (!normalMatches) {\n continue;\n }\n const normal = [Number(normalMatches[1]), Number(normalMatches[5]), Number(normalMatches[3])];\n let vertexMatch;\n while ((vertexMatch = this.vertexPattern.exec(facet))) {\n if (!STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES) {\n positions.push(Number(vertexMatch[1]), Number(vertexMatch[5]), Number(vertexMatch[3]));\n normals.push(normal[0], normal[1], normal[2]);\n }\n else {\n positions.push(Number(vertexMatch[1]), Number(vertexMatch[3]), Number(vertexMatch[5]));\n // Flipping the second and third component because inverted\n // when normal was declared.\n normals.push(normal[0], normal[2], normal[1]);\n }\n }\n if (STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES) {\n indices.push(indicesCount, indicesCount + 2, indicesCount + 1);\n indicesCount += 3;\n }\n else {\n indices.push(indicesCount++, indicesCount++, indicesCount++);\n }\n this.vertexPattern.lastIndex = 0;\n }\n this.facetsPattern.lastIndex = 0;\n mesh.setVerticesData(VertexBuffer.PositionKind, positions);\n mesh.setVerticesData(VertexBuffer.NormalKind, normals);\n mesh.setIndices(indices);\n mesh.computeWorldMatrix(true);\n }\n}\n/**\n * Defines if Y and Z axes are swapped or not when loading an STL file.\n * The default is false to maintain backward compatibility. When set to\n * true, coordinates from the STL file are used without change.\n */\nSTLFileLoader.DO_NOT_ALTER_FILE_COORDINATES = false;\nregisterSceneLoaderPlugin(new STLFileLoader());\n//# sourceMappingURL=stlFileLoader.js.map"],"names":[],"mappings":";;;;AAOA;AACA;AACA;AACA;AACO,MAAM,aAAa,CAAC;AAC3B,IAAI,WAAW,GAAG;AAClB;AACA,QAAQ,IAAI,CAAC,YAAY,GAAG,yCAAyC;AACrE;AACA,QAAQ,IAAI,CAAC,aAAa,GAAG,0BAA0B;AACvD;AACA,QAAQ,IAAI,CAAC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0,0 +1,349 @@
|
|
|
1
|
+
import { L as Logger } from './index-D46Rc8Qa.esm.js';
|
|
2
|
+
|
|
3
|
+
//private static _TYPE_NO_DATA = 0;
|
|
4
|
+
const _TYPE_INDEXED = 1;
|
|
5
|
+
const _TYPE_RGB = 2;
|
|
6
|
+
const _TYPE_GREY = 3;
|
|
7
|
+
const _TYPE_RLE_INDEXED = 9;
|
|
8
|
+
const _TYPE_RLE_RGB = 10;
|
|
9
|
+
const _TYPE_RLE_GREY = 11;
|
|
10
|
+
const _ORIGIN_MASK = 0x30;
|
|
11
|
+
const _ORIGIN_SHIFT = 0x04;
|
|
12
|
+
const _ORIGIN_BL = 0x00;
|
|
13
|
+
const _ORIGIN_BR = 0x01;
|
|
14
|
+
const _ORIGIN_UL = 0x02;
|
|
15
|
+
const _ORIGIN_UR = 0x03;
|
|
16
|
+
/**
|
|
17
|
+
* Gets the header of a TGA file
|
|
18
|
+
* @param data defines the TGA data
|
|
19
|
+
* @returns the header
|
|
20
|
+
*/
|
|
21
|
+
function GetTGAHeader(data) {
|
|
22
|
+
let offset = 0;
|
|
23
|
+
const header = {
|
|
24
|
+
id_length: data[offset++],
|
|
25
|
+
colormap_type: data[offset++],
|
|
26
|
+
image_type: data[offset++],
|
|
27
|
+
colormap_index: data[offset++] | (data[offset++] << 8),
|
|
28
|
+
colormap_length: data[offset++] | (data[offset++] << 8),
|
|
29
|
+
colormap_size: data[offset++],
|
|
30
|
+
origin: [data[offset++] | (data[offset++] << 8), data[offset++] | (data[offset++] << 8)],
|
|
31
|
+
width: data[offset++] | (data[offset++] << 8),
|
|
32
|
+
height: data[offset++] | (data[offset++] << 8),
|
|
33
|
+
pixel_size: data[offset++],
|
|
34
|
+
flags: data[offset++],
|
|
35
|
+
};
|
|
36
|
+
return header;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Uploads TGA content to a Babylon Texture
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
function UploadContent(texture, data) {
|
|
43
|
+
// Not enough data to contain header ?
|
|
44
|
+
if (data.length < 19) {
|
|
45
|
+
Logger.Error("Unable to load TGA file - Not enough data to contain header");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// Read Header
|
|
49
|
+
let offset = 18;
|
|
50
|
+
const header = GetTGAHeader(data);
|
|
51
|
+
// Assume it's a valid Targa file.
|
|
52
|
+
if (header.id_length + offset > data.length) {
|
|
53
|
+
Logger.Error("Unable to load TGA file - Not enough data");
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
// Skip not needed data
|
|
57
|
+
offset += header.id_length;
|
|
58
|
+
let use_rle = false;
|
|
59
|
+
let use_pal = false;
|
|
60
|
+
let use_grey = false;
|
|
61
|
+
// Get some informations.
|
|
62
|
+
switch (header.image_type) {
|
|
63
|
+
case _TYPE_RLE_INDEXED:
|
|
64
|
+
use_rle = true;
|
|
65
|
+
// eslint-disable-next-line no-fallthrough
|
|
66
|
+
case _TYPE_INDEXED:
|
|
67
|
+
use_pal = true;
|
|
68
|
+
break;
|
|
69
|
+
case _TYPE_RLE_RGB:
|
|
70
|
+
use_rle = true;
|
|
71
|
+
// eslint-disable-next-line no-fallthrough
|
|
72
|
+
case _TYPE_RGB:
|
|
73
|
+
// use_rgb = true;
|
|
74
|
+
break;
|
|
75
|
+
case _TYPE_RLE_GREY:
|
|
76
|
+
use_rle = true;
|
|
77
|
+
// eslint-disable-next-line no-fallthrough
|
|
78
|
+
case _TYPE_GREY:
|
|
79
|
+
use_grey = true;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
let pixel_data;
|
|
83
|
+
// var numAlphaBits = header.flags & 0xf;
|
|
84
|
+
const pixel_size = header.pixel_size >> 3;
|
|
85
|
+
const pixel_total = header.width * header.height * pixel_size;
|
|
86
|
+
// Read palettes
|
|
87
|
+
let palettes;
|
|
88
|
+
if (use_pal) {
|
|
89
|
+
palettes = data.subarray(offset, (offset += header.colormap_length * (header.colormap_size >> 3)));
|
|
90
|
+
}
|
|
91
|
+
// Read LRE
|
|
92
|
+
if (use_rle) {
|
|
93
|
+
pixel_data = new Uint8Array(pixel_total);
|
|
94
|
+
let c, count, i;
|
|
95
|
+
let localOffset = 0;
|
|
96
|
+
const pixels = new Uint8Array(pixel_size);
|
|
97
|
+
while (offset < pixel_total && localOffset < pixel_total) {
|
|
98
|
+
c = data[offset++];
|
|
99
|
+
count = (c & 0x7f) + 1;
|
|
100
|
+
// RLE pixels
|
|
101
|
+
if (c & 0x80) {
|
|
102
|
+
// Bind pixel tmp array
|
|
103
|
+
for (i = 0; i < pixel_size; ++i) {
|
|
104
|
+
pixels[i] = data[offset++];
|
|
105
|
+
}
|
|
106
|
+
// Copy pixel array
|
|
107
|
+
for (i = 0; i < count; ++i) {
|
|
108
|
+
pixel_data.set(pixels, localOffset + i * pixel_size);
|
|
109
|
+
}
|
|
110
|
+
localOffset += pixel_size * count;
|
|
111
|
+
}
|
|
112
|
+
// Raw pixels
|
|
113
|
+
else {
|
|
114
|
+
count *= pixel_size;
|
|
115
|
+
for (i = 0; i < count; ++i) {
|
|
116
|
+
pixel_data[localOffset + i] = data[offset++];
|
|
117
|
+
}
|
|
118
|
+
localOffset += count;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// RAW Pixels
|
|
123
|
+
else {
|
|
124
|
+
pixel_data = data.subarray(offset, (offset += use_pal ? header.width * header.height : pixel_total));
|
|
125
|
+
}
|
|
126
|
+
// Load to texture
|
|
127
|
+
let x_start, y_start, x_step, y_step, y_end, x_end;
|
|
128
|
+
switch ((header.flags & _ORIGIN_MASK) >> _ORIGIN_SHIFT) {
|
|
129
|
+
default:
|
|
130
|
+
case _ORIGIN_UL:
|
|
131
|
+
x_start = 0;
|
|
132
|
+
x_step = 1;
|
|
133
|
+
x_end = header.width;
|
|
134
|
+
y_start = 0;
|
|
135
|
+
y_step = 1;
|
|
136
|
+
y_end = header.height;
|
|
137
|
+
break;
|
|
138
|
+
case _ORIGIN_BL:
|
|
139
|
+
x_start = 0;
|
|
140
|
+
x_step = 1;
|
|
141
|
+
x_end = header.width;
|
|
142
|
+
y_start = header.height - 1;
|
|
143
|
+
y_step = -1;
|
|
144
|
+
y_end = -1;
|
|
145
|
+
break;
|
|
146
|
+
case _ORIGIN_UR:
|
|
147
|
+
x_start = header.width - 1;
|
|
148
|
+
x_step = -1;
|
|
149
|
+
x_end = -1;
|
|
150
|
+
y_start = 0;
|
|
151
|
+
y_step = 1;
|
|
152
|
+
y_end = header.height;
|
|
153
|
+
break;
|
|
154
|
+
case _ORIGIN_BR:
|
|
155
|
+
x_start = header.width - 1;
|
|
156
|
+
x_step = -1;
|
|
157
|
+
x_end = -1;
|
|
158
|
+
y_start = header.height - 1;
|
|
159
|
+
y_step = -1;
|
|
160
|
+
y_end = -1;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
// Load the specify method
|
|
164
|
+
const func = "_getImageData" + (use_grey ? "Grey" : "") + header.pixel_size + "bits";
|
|
165
|
+
const imageData = TGATools[func](header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end);
|
|
166
|
+
const engine = texture.getEngine();
|
|
167
|
+
engine._uploadDataToTextureDirectly(texture, imageData);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
*/
|
|
172
|
+
function _getImageData8bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {
|
|
173
|
+
const image = pixel_data, colormap = palettes;
|
|
174
|
+
const width = header.width, height = header.height;
|
|
175
|
+
let color, i = 0, x, y;
|
|
176
|
+
const imageData = new Uint8Array(width * height * 4);
|
|
177
|
+
for (y = y_start; y !== y_end; y += y_step) {
|
|
178
|
+
for (x = x_start; x !== x_end; x += x_step, i++) {
|
|
179
|
+
color = image[i];
|
|
180
|
+
imageData[(x + width * y) * 4 + 3] = 255;
|
|
181
|
+
imageData[(x + width * y) * 4 + 2] = colormap[color * 3 + 0];
|
|
182
|
+
imageData[(x + width * y) * 4 + 1] = colormap[color * 3 + 1];
|
|
183
|
+
imageData[(x + width * y) * 4 + 0] = colormap[color * 3 + 2];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return imageData;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
191
|
+
function _getImageData16bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {
|
|
192
|
+
const image = pixel_data;
|
|
193
|
+
const width = header.width, height = header.height;
|
|
194
|
+
let color, i = 0, x, y;
|
|
195
|
+
const imageData = new Uint8Array(width * height * 4);
|
|
196
|
+
for (y = y_start; y !== y_end; y += y_step) {
|
|
197
|
+
for (x = x_start; x !== x_end; x += x_step, i += 2) {
|
|
198
|
+
color = image[i + 0] + (image[i + 1] << 8); // Inversed ?
|
|
199
|
+
const r = ((((color & 0x7c00) >> 10) * 255) / 0x1f) | 0;
|
|
200
|
+
const g = ((((color & 0x03e0) >> 5) * 255) / 0x1f) | 0;
|
|
201
|
+
const b = (((color & 0x001f) * 255) / 0x1f) | 0;
|
|
202
|
+
imageData[(x + width * y) * 4 + 0] = r;
|
|
203
|
+
imageData[(x + width * y) * 4 + 1] = g;
|
|
204
|
+
imageData[(x + width * y) * 4 + 2] = b;
|
|
205
|
+
imageData[(x + width * y) * 4 + 3] = color & 0x8000 ? 0 : 255;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return imageData;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* @internal
|
|
212
|
+
*/
|
|
213
|
+
function _getImageData24bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {
|
|
214
|
+
const image = pixel_data;
|
|
215
|
+
const width = header.width, height = header.height;
|
|
216
|
+
let i = 0, x, y;
|
|
217
|
+
const imageData = new Uint8Array(width * height * 4);
|
|
218
|
+
for (y = y_start; y !== y_end; y += y_step) {
|
|
219
|
+
for (x = x_start; x !== x_end; x += x_step, i += 3) {
|
|
220
|
+
imageData[(x + width * y) * 4 + 3] = 255;
|
|
221
|
+
imageData[(x + width * y) * 4 + 2] = image[i + 0];
|
|
222
|
+
imageData[(x + width * y) * 4 + 1] = image[i + 1];
|
|
223
|
+
imageData[(x + width * y) * 4 + 0] = image[i + 2];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return imageData;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* @internal
|
|
230
|
+
*/
|
|
231
|
+
function _getImageData32bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {
|
|
232
|
+
const image = pixel_data;
|
|
233
|
+
const width = header.width, height = header.height;
|
|
234
|
+
let i = 0, x, y;
|
|
235
|
+
const imageData = new Uint8Array(width * height * 4);
|
|
236
|
+
for (y = y_start; y !== y_end; y += y_step) {
|
|
237
|
+
for (x = x_start; x !== x_end; x += x_step, i += 4) {
|
|
238
|
+
imageData[(x + width * y) * 4 + 2] = image[i + 0];
|
|
239
|
+
imageData[(x + width * y) * 4 + 1] = image[i + 1];
|
|
240
|
+
imageData[(x + width * y) * 4 + 0] = image[i + 2];
|
|
241
|
+
imageData[(x + width * y) * 4 + 3] = image[i + 3];
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return imageData;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* @internal
|
|
248
|
+
*/
|
|
249
|
+
function _getImageDataGrey8bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {
|
|
250
|
+
const image = pixel_data;
|
|
251
|
+
const width = header.width, height = header.height;
|
|
252
|
+
let color, i = 0, x, y;
|
|
253
|
+
const imageData = new Uint8Array(width * height * 4);
|
|
254
|
+
for (y = y_start; y !== y_end; y += y_step) {
|
|
255
|
+
for (x = x_start; x !== x_end; x += x_step, i++) {
|
|
256
|
+
color = image[i];
|
|
257
|
+
imageData[(x + width * y) * 4 + 0] = color;
|
|
258
|
+
imageData[(x + width * y) * 4 + 1] = color;
|
|
259
|
+
imageData[(x + width * y) * 4 + 2] = color;
|
|
260
|
+
imageData[(x + width * y) * 4 + 3] = 255;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return imageData;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* @internal
|
|
267
|
+
*/
|
|
268
|
+
function _getImageDataGrey16bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {
|
|
269
|
+
const image = pixel_data;
|
|
270
|
+
const width = header.width, height = header.height;
|
|
271
|
+
let i = 0, x, y;
|
|
272
|
+
const imageData = new Uint8Array(width * height * 4);
|
|
273
|
+
for (y = y_start; y !== y_end; y += y_step) {
|
|
274
|
+
for (x = x_start; x !== x_end; x += x_step, i += 2) {
|
|
275
|
+
imageData[(x + width * y) * 4 + 0] = image[i + 0];
|
|
276
|
+
imageData[(x + width * y) * 4 + 1] = image[i + 0];
|
|
277
|
+
imageData[(x + width * y) * 4 + 2] = image[i + 0];
|
|
278
|
+
imageData[(x + width * y) * 4 + 3] = image[i + 1];
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return imageData;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Based on jsTGALoader - Javascript loader for TGA file
|
|
285
|
+
* By Vincent Thibault
|
|
286
|
+
* @see http://blog.robrowser.com/javascript-tga-loader.html
|
|
287
|
+
*/
|
|
288
|
+
const TGATools = {
|
|
289
|
+
/**
|
|
290
|
+
* Gets the header of a TGA file
|
|
291
|
+
* @param data defines the TGA data
|
|
292
|
+
* @returns the header
|
|
293
|
+
*/
|
|
294
|
+
GetTGAHeader,
|
|
295
|
+
/**
|
|
296
|
+
* Uploads TGA content to a Babylon Texture
|
|
297
|
+
* @internal
|
|
298
|
+
*/
|
|
299
|
+
UploadContent,
|
|
300
|
+
/** @internal */
|
|
301
|
+
_getImageData8bits,
|
|
302
|
+
/** @internal */
|
|
303
|
+
_getImageData16bits,
|
|
304
|
+
/** @internal */
|
|
305
|
+
_getImageData24bits,
|
|
306
|
+
/** @internal */
|
|
307
|
+
_getImageData32bits,
|
|
308
|
+
/** @internal */
|
|
309
|
+
_getImageDataGrey8bits,
|
|
310
|
+
/** @internal */
|
|
311
|
+
_getImageDataGrey16bits,
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Implementation of the TGA Texture Loader.
|
|
316
|
+
* @internal
|
|
317
|
+
*/
|
|
318
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
319
|
+
class _TGATextureLoader {
|
|
320
|
+
constructor() {
|
|
321
|
+
/**
|
|
322
|
+
* Defines whether the loader supports cascade loading the different faces.
|
|
323
|
+
*/
|
|
324
|
+
this.supportCascades = false;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Uploads the cube texture data to the WebGL texture. It has already been bound.
|
|
328
|
+
*/
|
|
329
|
+
loadCubeData() {
|
|
330
|
+
// eslint-disable-next-line no-throw-literal
|
|
331
|
+
throw ".env not supported in Cube.";
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.
|
|
335
|
+
* @param data contains the texture data
|
|
336
|
+
* @param texture defines the BabylonJS internal texture
|
|
337
|
+
* @param callback defines the method to call once ready to upload
|
|
338
|
+
*/
|
|
339
|
+
loadData(data, texture, callback) {
|
|
340
|
+
const bytes = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
|
|
341
|
+
const header = GetTGAHeader(bytes);
|
|
342
|
+
callback(header.width, header.height, texture.generateMipMaps, false, () => {
|
|
343
|
+
UploadContent(texture, bytes);
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export { _TGATextureLoader };
|
|
349
|
+
//# sourceMappingURL=tgaTextureLoader-CFjxRPEE.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tgaTextureLoader-CFjxRPEE.esm.js","sources":["../../../../../dev/core/dist/Misc/tga.js","../../../../../dev/core/dist/Materials/Textures/Loaders/tgaTextureLoader.js"],"sourcesContent":["import { Logger } from \"../Misc/logger\";\n//private static _TYPE_NO_DATA = 0;\nconst _TYPE_INDEXED = 1;\nconst _TYPE_RGB = 2;\nconst _TYPE_GREY = 3;\nconst _TYPE_RLE_INDEXED = 9;\nconst _TYPE_RLE_RGB = 10;\nconst _TYPE_RLE_GREY = 11;\nconst _ORIGIN_MASK = 0x30;\nconst _ORIGIN_SHIFT = 0x04;\nconst _ORIGIN_BL = 0x00;\nconst _ORIGIN_BR = 0x01;\nconst _ORIGIN_UL = 0x02;\nconst _ORIGIN_UR = 0x03;\n/**\n * Gets the header of a TGA file\n * @param data defines the TGA data\n * @returns the header\n */\nexport function GetTGAHeader(data) {\n let offset = 0;\n const header = {\n id_length: data[offset++],\n colormap_type: data[offset++],\n image_type: data[offset++],\n colormap_index: data[offset++] | (data[offset++] << 8),\n colormap_length: data[offset++] | (data[offset++] << 8),\n colormap_size: data[offset++],\n origin: [data[offset++] | (data[offset++] << 8), data[offset++] | (data[offset++] << 8)],\n width: data[offset++] | (data[offset++] << 8),\n height: data[offset++] | (data[offset++] << 8),\n pixel_size: data[offset++],\n flags: data[offset++],\n };\n return header;\n}\n/**\n * Uploads TGA content to a Babylon Texture\n * @internal\n */\nexport function UploadContent(texture, data) {\n // Not enough data to contain header ?\n if (data.length < 19) {\n Logger.Error(\"Unable to load TGA file - Not enough data to contain header\");\n return;\n }\n // Read Header\n let offset = 18;\n const header = GetTGAHeader(data);\n // Assume it's a valid Targa file.\n if (header.id_length + offset > data.length) {\n Logger.Error(\"Unable to load TGA file - Not enough data\");\n return;\n }\n // Skip not needed data\n offset += header.id_length;\n let use_rle = false;\n let use_pal = false;\n let use_grey = false;\n // Get some informations.\n switch (header.image_type) {\n case _TYPE_RLE_INDEXED:\n use_rle = true;\n // eslint-disable-next-line no-fallthrough\n case _TYPE_INDEXED:\n use_pal = true;\n break;\n case _TYPE_RLE_RGB:\n use_rle = true;\n // eslint-disable-next-line no-fallthrough\n case _TYPE_RGB:\n // use_rgb = true;\n break;\n case _TYPE_RLE_GREY:\n use_rle = true;\n // eslint-disable-next-line no-fallthrough\n case _TYPE_GREY:\n use_grey = true;\n break;\n }\n let pixel_data;\n // var numAlphaBits = header.flags & 0xf;\n const pixel_size = header.pixel_size >> 3;\n const pixel_total = header.width * header.height * pixel_size;\n // Read palettes\n let palettes;\n if (use_pal) {\n palettes = data.subarray(offset, (offset += header.colormap_length * (header.colormap_size >> 3)));\n }\n // Read LRE\n if (use_rle) {\n pixel_data = new Uint8Array(pixel_total);\n let c, count, i;\n let localOffset = 0;\n const pixels = new Uint8Array(pixel_size);\n while (offset < pixel_total && localOffset < pixel_total) {\n c = data[offset++];\n count = (c & 0x7f) + 1;\n // RLE pixels\n if (c & 0x80) {\n // Bind pixel tmp array\n for (i = 0; i < pixel_size; ++i) {\n pixels[i] = data[offset++];\n }\n // Copy pixel array\n for (i = 0; i < count; ++i) {\n pixel_data.set(pixels, localOffset + i * pixel_size);\n }\n localOffset += pixel_size * count;\n }\n // Raw pixels\n else {\n count *= pixel_size;\n for (i = 0; i < count; ++i) {\n pixel_data[localOffset + i] = data[offset++];\n }\n localOffset += count;\n }\n }\n }\n // RAW Pixels\n else {\n pixel_data = data.subarray(offset, (offset += use_pal ? header.width * header.height : pixel_total));\n }\n // Load to texture\n let x_start, y_start, x_step, y_step, y_end, x_end;\n switch ((header.flags & _ORIGIN_MASK) >> _ORIGIN_SHIFT) {\n default:\n case _ORIGIN_UL:\n x_start = 0;\n x_step = 1;\n x_end = header.width;\n y_start = 0;\n y_step = 1;\n y_end = header.height;\n break;\n case _ORIGIN_BL:\n x_start = 0;\n x_step = 1;\n x_end = header.width;\n y_start = header.height - 1;\n y_step = -1;\n y_end = -1;\n break;\n case _ORIGIN_UR:\n x_start = header.width - 1;\n x_step = -1;\n x_end = -1;\n y_start = 0;\n y_step = 1;\n y_end = header.height;\n break;\n case _ORIGIN_BR:\n x_start = header.width - 1;\n x_step = -1;\n x_end = -1;\n y_start = header.height - 1;\n y_step = -1;\n y_end = -1;\n break;\n }\n // Load the specify method\n const func = \"_getImageData\" + (use_grey ? \"Grey\" : \"\") + header.pixel_size + \"bits\";\n const imageData = TGATools[func](header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end);\n const engine = texture.getEngine();\n engine._uploadDataToTextureDirectly(texture, imageData);\n}\n/**\n * @internal\n */\nfunction _getImageData8bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data, colormap = palettes;\n const width = header.width, height = header.height;\n let color, i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i++) {\n color = image[i];\n imageData[(x + width * y) * 4 + 3] = 255;\n imageData[(x + width * y) * 4 + 2] = colormap[color * 3 + 0];\n imageData[(x + width * y) * 4 + 1] = colormap[color * 3 + 1];\n imageData[(x + width * y) * 4 + 0] = colormap[color * 3 + 2];\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageData16bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let color, i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i += 2) {\n color = image[i + 0] + (image[i + 1] << 8); // Inversed ?\n const r = ((((color & 0x7c00) >> 10) * 255) / 0x1f) | 0;\n const g = ((((color & 0x03e0) >> 5) * 255) / 0x1f) | 0;\n const b = (((color & 0x001f) * 255) / 0x1f) | 0;\n imageData[(x + width * y) * 4 + 0] = r;\n imageData[(x + width * y) * 4 + 1] = g;\n imageData[(x + width * y) * 4 + 2] = b;\n imageData[(x + width * y) * 4 + 3] = color & 0x8000 ? 0 : 255;\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageData24bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i += 3) {\n imageData[(x + width * y) * 4 + 3] = 255;\n imageData[(x + width * y) * 4 + 2] = image[i + 0];\n imageData[(x + width * y) * 4 + 1] = image[i + 1];\n imageData[(x + width * y) * 4 + 0] = image[i + 2];\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageData32bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i += 4) {\n imageData[(x + width * y) * 4 + 2] = image[i + 0];\n imageData[(x + width * y) * 4 + 1] = image[i + 1];\n imageData[(x + width * y) * 4 + 0] = image[i + 2];\n imageData[(x + width * y) * 4 + 3] = image[i + 3];\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageDataGrey8bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let color, i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i++) {\n color = image[i];\n imageData[(x + width * y) * 4 + 0] = color;\n imageData[(x + width * y) * 4 + 1] = color;\n imageData[(x + width * y) * 4 + 2] = color;\n imageData[(x + width * y) * 4 + 3] = 255;\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageDataGrey16bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i += 2) {\n imageData[(x + width * y) * 4 + 0] = image[i + 0];\n imageData[(x + width * y) * 4 + 1] = image[i + 0];\n imageData[(x + width * y) * 4 + 2] = image[i + 0];\n imageData[(x + width * y) * 4 + 3] = image[i + 1];\n }\n }\n return imageData;\n}\n/**\n * Based on jsTGALoader - Javascript loader for TGA file\n * By Vincent Thibault\n * @see http://blog.robrowser.com/javascript-tga-loader.html\n */\nexport const TGATools = {\n /**\n * Gets the header of a TGA file\n * @param data defines the TGA data\n * @returns the header\n */\n GetTGAHeader,\n /**\n * Uploads TGA content to a Babylon Texture\n * @internal\n */\n UploadContent,\n /** @internal */\n _getImageData8bits,\n /** @internal */\n _getImageData16bits,\n /** @internal */\n _getImageData24bits,\n /** @internal */\n _getImageData32bits,\n /** @internal */\n _getImageDataGrey8bits,\n /** @internal */\n _getImageDataGrey16bits,\n};\n//# sourceMappingURL=tga.js.map","import { GetTGAHeader, UploadContent } from \"../../../Misc/tga\";\n/**\n * Implementation of the TGA Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _TGATextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = false;\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n */\n loadCubeData() {\n // eslint-disable-next-line no-throw-literal\n throw \".env not supported in Cube.\";\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param callback defines the method to call once ready to upload\n */\n loadData(data, texture, callback) {\n const bytes = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n const header = GetTGAHeader(bytes);\n callback(header.width, header.height, texture.generateMipMaps, false, () => {\n UploadContent(texture, bytes);\n });\n }\n}\n//# sourceMappingURL=tgaTextureLoader.js.map"],"names":[],"mappings":";;AACA;AAC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ACA;AACA;AACA;AACA,IAAI,aAAa;AACjB;AACA,IAAI,kBAAkB;AACtB;AACA,IAAI,mBAAmB;AACvB;AACA,IAAI,mBAAmB;AACvB;AACA,IAAI,mBAAmB;AACvB;AACA,IAAI,sBAAsB;AAC1B;AACA,IAAI,uBAAuB;AAC3B,CAAC;;ACrTD;AACA;AACA;AACA;AACA;AACO,MAAM,iBAAiB,CAAC;AAC/B,IAAI,WAAW,GAAG;AAClB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,eAAe,GAAG,KAAK;AACpC;AACA;AACA;AACA;AACA,IAAI,YAAY,GAAG;AACnB;AACA,QAAQ,MAAM,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE;AACtC,QAAQ,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;AACnF,QAAQ,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC;AAC1C,QAAQ,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,MAAM;AACpF,YAAY,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC;AACzC,SAAS,CAAC;AACV;AACA;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{L as t}from"./index-r5IGv8fd.esm.min.js";function e(t){let e=0;return{id_length:t[e++],colormap_type:t[e++],image_type:t[e++],colormap_index:t[e++]|t[e++]<<8,colormap_length:t[e++]|t[e++]<<8,colormap_size:t[e++],origin:[t[e++]|t[e++]<<8,t[e++]|t[e++]<<8],width:t[e++]|t[e++]<<8,height:t[e++]|t[e++]<<8,pixel_size:t[e++],flags:t[e++]}}function r(r,a){if(a.length<19)return void t.Error("Unable to load TGA file - Not enough data to contain header");let i=18;const o=e(a);if(o.id_length+i>a.length)return void t.Error("Unable to load TGA file - Not enough data");i+=o.id_length;let s,h=!1,c=!1,g=!1;switch(o.image_type){case 9:h=!0;case 1:c=!0;break;case 10:h=!0;case 2:break;case 11:h=!0;case 3:g=!0}const l=o.pixel_size>>3,f=o.width*o.height*l;let d,u,w,p,_,b,y;if(c&&(d=a.subarray(i,i+=o.colormap_length*(o.colormap_size>>3))),h){let t,e,r;s=new Uint8Array(f);let n=0;const o=new Uint8Array(l);for(;i<f&&n<f;)if(t=a[i++],e=1+(127&t),128&t){for(r=0;r<l;++r)o[r]=a[i++];for(r=0;r<e;++r)s.set(o,n+r*l);n+=l*e}else{for(e*=l,r=0;r<e;++r)s[n+r]=a[i++];n+=e}}else s=a.subarray(i,i+=c?o.width*o.height:f);switch((48&o.flags)>>4){default:case 2:u=0,p=1,y=o.width,w=0,_=1,b=o.height;break;case 0:u=0,p=1,y=o.width,w=o.height-1,_=-1,b=-1;break;case 3:u=o.width-1,p=-1,y=-1,w=0,_=1,b=o.height;break;case 1:u=o.width-1,p=-1,y=-1,w=o.height-1,_=-1,b=-1}const m="_getImageData"+(g?"Grey":"")+o.pixel_size+"bits",A=n[m](o,d,s,w,_,b,u,p,y);r.getEngine()._uploadDataToTextureDirectly(r,A)}const n={GetTGAHeader:e,UploadContent:r,_getImageData8bits:function(t,e,r,n,a,i,o,s,h){const c=r,g=e,l=t.width,f=t.height;let d,u,w,p=0;const _=new Uint8Array(l*f*4);for(w=n;w!==i;w+=a)for(u=o;u!==h;u+=s,p++)d=c[p],_[4*(u+l*w)+3]=255,_[4*(u+l*w)+2]=g[3*d+0],_[4*(u+l*w)+1]=g[3*d+1],_[4*(u+l*w)+0]=g[3*d+2];return _},_getImageData16bits:function(t,e,r,n,a,i,o,s,h){const c=r,g=t.width,l=t.height;let f,d,u,w=0;const p=new Uint8Array(g*l*4);for(u=n;u!==i;u+=a)for(d=o;d!==h;d+=s,w+=2){f=c[w+0]+(c[w+1]<<8);const t=255*((31744&f)>>10)/31|0,e=255*((992&f)>>5)/31|0,r=255*(31&f)/31|0;p[4*(d+g*u)+0]=t,p[4*(d+g*u)+1]=e,p[4*(d+g*u)+2]=r,p[4*(d+g*u)+3]=32768&f?0:255}return p},_getImageData24bits:function(t,e,r,n,a,i,o,s,h){const c=r,g=t.width,l=t.height;let f,d,u=0;const w=new Uint8Array(g*l*4);for(d=n;d!==i;d+=a)for(f=o;f!==h;f+=s,u+=3)w[4*(f+g*d)+3]=255,w[4*(f+g*d)+2]=c[u+0],w[4*(f+g*d)+1]=c[u+1],w[4*(f+g*d)+0]=c[u+2];return w},_getImageData32bits:function(t,e,r,n,a,i,o,s,h){const c=r,g=t.width,l=t.height;let f,d,u=0;const w=new Uint8Array(g*l*4);for(d=n;d!==i;d+=a)for(f=o;f!==h;f+=s,u+=4)w[4*(f+g*d)+2]=c[u+0],w[4*(f+g*d)+1]=c[u+1],w[4*(f+g*d)+0]=c[u+2],w[4*(f+g*d)+3]=c[u+3];return w},_getImageDataGrey8bits:function(t,e,r,n,a,i,o,s,h){const c=r,g=t.width,l=t.height;let f,d,u,w=0;const p=new Uint8Array(g*l*4);for(u=n;u!==i;u+=a)for(d=o;d!==h;d+=s,w++)f=c[w],p[4*(d+g*u)+0]=f,p[4*(d+g*u)+1]=f,p[4*(d+g*u)+2]=f,p[4*(d+g*u)+3]=255;return p},_getImageDataGrey16bits:function(t,e,r,n,a,i,o,s,h){const c=r,g=t.width,l=t.height;let f,d,u=0;const w=new Uint8Array(g*l*4);for(d=n;d!==i;d+=a)for(f=o;f!==h;f+=s,u+=2)w[4*(f+g*d)+0]=c[u+0],w[4*(f+g*d)+1]=c[u+0],w[4*(f+g*d)+2]=c[u+0],w[4*(f+g*d)+3]=c[u+1];return w}};class a{constructor(){this.supportCascades=!1}loadCubeData(){throw".env not supported in Cube."}loadData(t,n,a){const i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=e(i);a(o.width,o.height,n.generateMipMaps,!1,(()=>{r(n,i)}))}}export{a as _TGATextureLoader};
|
|
2
|
+
//# sourceMappingURL=tgaTextureLoader-Ch1a2Rcd.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tgaTextureLoader-Ch1a2Rcd.esm.min.js","sources":["../../../../../dev/core/dist/Misc/tga.js","../../../../../dev/core/dist/Materials/Textures/Loaders/tgaTextureLoader.js"],"sourcesContent":["import { Logger } from \"../Misc/logger\";\n//private static _TYPE_NO_DATA = 0;\nconst _TYPE_INDEXED = 1;\nconst _TYPE_RGB = 2;\nconst _TYPE_GREY = 3;\nconst _TYPE_RLE_INDEXED = 9;\nconst _TYPE_RLE_RGB = 10;\nconst _TYPE_RLE_GREY = 11;\nconst _ORIGIN_MASK = 0x30;\nconst _ORIGIN_SHIFT = 0x04;\nconst _ORIGIN_BL = 0x00;\nconst _ORIGIN_BR = 0x01;\nconst _ORIGIN_UL = 0x02;\nconst _ORIGIN_UR = 0x03;\n/**\n * Gets the header of a TGA file\n * @param data defines the TGA data\n * @returns the header\n */\nexport function GetTGAHeader(data) {\n let offset = 0;\n const header = {\n id_length: data[offset++],\n colormap_type: data[offset++],\n image_type: data[offset++],\n colormap_index: data[offset++] | (data[offset++] << 8),\n colormap_length: data[offset++] | (data[offset++] << 8),\n colormap_size: data[offset++],\n origin: [data[offset++] | (data[offset++] << 8), data[offset++] | (data[offset++] << 8)],\n width: data[offset++] | (data[offset++] << 8),\n height: data[offset++] | (data[offset++] << 8),\n pixel_size: data[offset++],\n flags: data[offset++],\n };\n return header;\n}\n/**\n * Uploads TGA content to a Babylon Texture\n * @internal\n */\nexport function UploadContent(texture, data) {\n // Not enough data to contain header ?\n if (data.length < 19) {\n Logger.Error(\"Unable to load TGA file - Not enough data to contain header\");\n return;\n }\n // Read Header\n let offset = 18;\n const header = GetTGAHeader(data);\n // Assume it's a valid Targa file.\n if (header.id_length + offset > data.length) {\n Logger.Error(\"Unable to load TGA file - Not enough data\");\n return;\n }\n // Skip not needed data\n offset += header.id_length;\n let use_rle = false;\n let use_pal = false;\n let use_grey = false;\n // Get some informations.\n switch (header.image_type) {\n case _TYPE_RLE_INDEXED:\n use_rle = true;\n // eslint-disable-next-line no-fallthrough\n case _TYPE_INDEXED:\n use_pal = true;\n break;\n case _TYPE_RLE_RGB:\n use_rle = true;\n // eslint-disable-next-line no-fallthrough\n case _TYPE_RGB:\n // use_rgb = true;\n break;\n case _TYPE_RLE_GREY:\n use_rle = true;\n // eslint-disable-next-line no-fallthrough\n case _TYPE_GREY:\n use_grey = true;\n break;\n }\n let pixel_data;\n // var numAlphaBits = header.flags & 0xf;\n const pixel_size = header.pixel_size >> 3;\n const pixel_total = header.width * header.height * pixel_size;\n // Read palettes\n let palettes;\n if (use_pal) {\n palettes = data.subarray(offset, (offset += header.colormap_length * (header.colormap_size >> 3)));\n }\n // Read LRE\n if (use_rle) {\n pixel_data = new Uint8Array(pixel_total);\n let c, count, i;\n let localOffset = 0;\n const pixels = new Uint8Array(pixel_size);\n while (offset < pixel_total && localOffset < pixel_total) {\n c = data[offset++];\n count = (c & 0x7f) + 1;\n // RLE pixels\n if (c & 0x80) {\n // Bind pixel tmp array\n for (i = 0; i < pixel_size; ++i) {\n pixels[i] = data[offset++];\n }\n // Copy pixel array\n for (i = 0; i < count; ++i) {\n pixel_data.set(pixels, localOffset + i * pixel_size);\n }\n localOffset += pixel_size * count;\n }\n // Raw pixels\n else {\n count *= pixel_size;\n for (i = 0; i < count; ++i) {\n pixel_data[localOffset + i] = data[offset++];\n }\n localOffset += count;\n }\n }\n }\n // RAW Pixels\n else {\n pixel_data = data.subarray(offset, (offset += use_pal ? header.width * header.height : pixel_total));\n }\n // Load to texture\n let x_start, y_start, x_step, y_step, y_end, x_end;\n switch ((header.flags & _ORIGIN_MASK) >> _ORIGIN_SHIFT) {\n default:\n case _ORIGIN_UL:\n x_start = 0;\n x_step = 1;\n x_end = header.width;\n y_start = 0;\n y_step = 1;\n y_end = header.height;\n break;\n case _ORIGIN_BL:\n x_start = 0;\n x_step = 1;\n x_end = header.width;\n y_start = header.height - 1;\n y_step = -1;\n y_end = -1;\n break;\n case _ORIGIN_UR:\n x_start = header.width - 1;\n x_step = -1;\n x_end = -1;\n y_start = 0;\n y_step = 1;\n y_end = header.height;\n break;\n case _ORIGIN_BR:\n x_start = header.width - 1;\n x_step = -1;\n x_end = -1;\n y_start = header.height - 1;\n y_step = -1;\n y_end = -1;\n break;\n }\n // Load the specify method\n const func = \"_getImageData\" + (use_grey ? \"Grey\" : \"\") + header.pixel_size + \"bits\";\n const imageData = TGATools[func](header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end);\n const engine = texture.getEngine();\n engine._uploadDataToTextureDirectly(texture, imageData);\n}\n/**\n * @internal\n */\nfunction _getImageData8bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data, colormap = palettes;\n const width = header.width, height = header.height;\n let color, i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i++) {\n color = image[i];\n imageData[(x + width * y) * 4 + 3] = 255;\n imageData[(x + width * y) * 4 + 2] = colormap[color * 3 + 0];\n imageData[(x + width * y) * 4 + 1] = colormap[color * 3 + 1];\n imageData[(x + width * y) * 4 + 0] = colormap[color * 3 + 2];\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageData16bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let color, i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i += 2) {\n color = image[i + 0] + (image[i + 1] << 8); // Inversed ?\n const r = ((((color & 0x7c00) >> 10) * 255) / 0x1f) | 0;\n const g = ((((color & 0x03e0) >> 5) * 255) / 0x1f) | 0;\n const b = (((color & 0x001f) * 255) / 0x1f) | 0;\n imageData[(x + width * y) * 4 + 0] = r;\n imageData[(x + width * y) * 4 + 1] = g;\n imageData[(x + width * y) * 4 + 2] = b;\n imageData[(x + width * y) * 4 + 3] = color & 0x8000 ? 0 : 255;\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageData24bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i += 3) {\n imageData[(x + width * y) * 4 + 3] = 255;\n imageData[(x + width * y) * 4 + 2] = image[i + 0];\n imageData[(x + width * y) * 4 + 1] = image[i + 1];\n imageData[(x + width * y) * 4 + 0] = image[i + 2];\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageData32bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i += 4) {\n imageData[(x + width * y) * 4 + 2] = image[i + 0];\n imageData[(x + width * y) * 4 + 1] = image[i + 1];\n imageData[(x + width * y) * 4 + 0] = image[i + 2];\n imageData[(x + width * y) * 4 + 3] = image[i + 3];\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageDataGrey8bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let color, i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i++) {\n color = image[i];\n imageData[(x + width * y) * 4 + 0] = color;\n imageData[(x + width * y) * 4 + 1] = color;\n imageData[(x + width * y) * 4 + 2] = color;\n imageData[(x + width * y) * 4 + 3] = 255;\n }\n }\n return imageData;\n}\n/**\n * @internal\n */\nfunction _getImageDataGrey16bits(header, palettes, pixel_data, y_start, y_step, y_end, x_start, x_step, x_end) {\n const image = pixel_data;\n const width = header.width, height = header.height;\n let i = 0, x, y;\n const imageData = new Uint8Array(width * height * 4);\n for (y = y_start; y !== y_end; y += y_step) {\n for (x = x_start; x !== x_end; x += x_step, i += 2) {\n imageData[(x + width * y) * 4 + 0] = image[i + 0];\n imageData[(x + width * y) * 4 + 1] = image[i + 0];\n imageData[(x + width * y) * 4 + 2] = image[i + 0];\n imageData[(x + width * y) * 4 + 3] = image[i + 1];\n }\n }\n return imageData;\n}\n/**\n * Based on jsTGALoader - Javascript loader for TGA file\n * By Vincent Thibault\n * @see http://blog.robrowser.com/javascript-tga-loader.html\n */\nexport const TGATools = {\n /**\n * Gets the header of a TGA file\n * @param data defines the TGA data\n * @returns the header\n */\n GetTGAHeader,\n /**\n * Uploads TGA content to a Babylon Texture\n * @internal\n */\n UploadContent,\n /** @internal */\n _getImageData8bits,\n /** @internal */\n _getImageData16bits,\n /** @internal */\n _getImageData24bits,\n /** @internal */\n _getImageData32bits,\n /** @internal */\n _getImageDataGrey8bits,\n /** @internal */\n _getImageDataGrey16bits,\n};\n//# sourceMappingURL=tga.js.map","import { GetTGAHeader, UploadContent } from \"../../../Misc/tga\";\n/**\n * Implementation of the TGA Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _TGATextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = false;\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n */\n loadCubeData() {\n // eslint-disable-next-line no-throw-literal\n throw \".env not supported in Cube.\";\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param callback defines the method to call once ready to upload\n */\n loadData(data, texture, callback) {\n const bytes = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n const header = GetTGAHeader(bytes);\n callback(header.width, header.height, texture.generateMipMaps, false, () => {\n UploadContent(texture, bytes);\n });\n }\n}\n//# sourceMappingURL=tgaTextureLoader.js.map"],"names":["GetTGAHeader","data","offset","id_length","colormap_type","image_type","colormap_index","colormap_length","colormap_size","origin","width","height","pixel_size","flags","UploadContent","texture","length","Logger","Error","header","pixel_data","use_rle","use_pal","use_grey","pixel_total","palettes","x_start","y_start","x_step","y_step","y_end","x_end","subarray","c","count","i","Uint8Array","localOffset","pixels","set","func","imageData","TGATools","getEngine","_uploadDataToTextureDirectly","_getImageData8bits","image","colormap","color","x","y","_getImageData16bits","r","g","b","_getImageData24bits","_getImageData32bits","_getImageDataGrey8bits","_getImageDataGrey16bits","_TGATextureLoader","constructor","this","supportCascades","loadCubeData","loadData","callback","bytes","buffer","byteOffset","byteLength","generateMipMaps"],"mappings":"gDAmBO,SAASA,EAAaC,GACzB,IAAIC,EAAS,EAcb,MAbe,CACXC,UAAWF,EAAKC,KAChBE,cAAeH,EAAKC,KACpBG,WAAYJ,EAAKC,KACjBI,eAAgBL,EAAKC,KAAaD,EAAKC,MAAa,EACpDK,gBAAiBN,EAAKC,KAAaD,EAAKC,MAAa,EACrDM,cAAeP,EAAKC,KACpBO,OAAQ,CAACR,EAAKC,KAAaD,EAAKC,MAAa,EAAID,EAAKC,KAAaD,EAAKC,MAAa,GACrFQ,MAAOT,EAAKC,KAAaD,EAAKC,MAAa,EAC3CS,OAAQV,EAAKC,KAAaD,EAAKC,MAAa,EAC5CU,WAAYX,EAAKC,KACjBW,MAAOZ,EAAKC,KAGpB,CAKO,SAASY,EAAcC,EAASd,GAEnC,GAAIA,EAAKe,OAAS,GAEd,YADAC,EAAOC,MAAM,+DAIjB,IAAIhB,EAAS,GACb,MAAMiB,EAASnB,EAAaC,GAE5B,GAAIkB,EAAOhB,UAAYD,EAASD,EAAKe,OAEjC,YADAC,EAAOC,MAAM,6CAIjBhB,GAAUiB,EAAO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YAC1DlD,EAASnB,EAAakE,GAC5BD,EAAS9C,EAAOT,MAAOS,EAAOR,OAAQI,EAAQuD,iBAAiB,GAAO,KAClExD,EAAcC,EAASmD,EAAM,GAEzC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{M as t,L as e,a8 as n,V as a,B as s,aX as i,aa as r,y as o}from"./index-r5IGv8fd.esm.min.js";t.prototype.thinInstanceAdd=function(t,n=!0){if(!this.getScene().getEngine().getCaps().instancedArrays)return e.Error("Thin Instances are not supported on this device as Instanced Array extension not supported"),-1;this._thinInstanceUpdateBufferSize("matrix",Array.isArray(t)?t.length:1);const a=this._thinInstanceDataStorage.instancesCount;if(Array.isArray(t))for(let e=0;e<t.length;++e)this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,t[e],e===t.length-1&&n);else this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,t,n);return a},t.prototype.thinInstanceAddSelf=function(t=!0){return this.thinInstanceAdd(n.IdentityReadOnly,t)},t.prototype.thinInstanceRegisterAttribute=function(t,e){t===a.ColorKind&&(t=a.ColorInstanceKind),this.removeVerticesData(t),this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.strides[t]=e,this._userThinInstanceBuffersStorage.sizes[t]=e*Math.max(32,this._thinInstanceDataStorage.instancesCount),this._userThinInstanceBuffersStorage.data[t]=new Float32Array(this._userThinInstanceBuffersStorage.sizes[t]),this._userThinInstanceBuffersStorage.vertexBuffers[t]=new a(this.getEngine(),this._userThinInstanceBuffersStorage.data[t],t,!0,!1,e,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t])},t.prototype.thinInstanceSetMatrixAt=function(t,e,n=!0){if(!this._thinInstanceDataStorage.matrixData||t>=this._thinInstanceDataStorage.instancesCount)return!1;const a=this._thinInstanceDataStorage.matrixData;return e.copyToArray(a,16*t),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[t]=e),n&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},t.prototype.thinInstanceSetAttributeAt=function(t,e,n,s=!0){return t===a.ColorKind&&(t=a.ColorInstanceKind),!(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.data[t]||e>=this._thinInstanceDataStorage.instancesCount)&&(this._thinInstanceUpdateBufferSize(t,0),this._userThinInstanceBuffersStorage.data[t].set(n,e*this._userThinInstanceBuffersStorage.strides[t]),s&&this.thinInstanceBufferUpdated(t),!0)},Object.defineProperty(t.prototype,"thinInstanceCount",{get:function(){return this._thinInstanceDataStorage.instancesCount},set:function(t){const e=this._thinInstanceDataStorage.matrixData??this.source?._thinInstanceDataStorage.matrixData;t<=(e?e.length/16:0)&&(this._thinInstanceDataStorage.instancesCount=t)},enumerable:!0,configurable:!0}),t.prototype._thinInstanceCreateMatrixBuffer=function(t,e,n=!0){const a=new s(this.getEngine(),e,!n,16,!1,!0);for(let e=0;e<4;e++)this.setVerticesBuffer(a.createVertexBuffer(t+e,4*e,4));return a},t.prototype.thinInstanceSetBuffer=function(t,e,n=0,s=!0){n=n||16,"matrix"===t?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=e?e.length:32*n,this._thinInstanceDataStorage.matrixData=e,this._thinInstanceDataStorage.worldMatrices=null,null!==e?(this._thinInstanceDataStorage.instancesCount=e.length/n,this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",e,s),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)):(this._thinInstanceDataStorage.instancesCount=0,this.doNotSyncBoundingInfo||this.refreshBoundingInfo())):"previousMatrix"===t?(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null,this._thinInstanceDataStorage.previousMatrixData=e,null!==e&&(this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",e,s))):(t===a.ColorKind&&(t=a.ColorInstanceKind),null===e?this._userThinInstanceBuffersStorage?.data[t]&&(this.removeVerticesData(t),delete this._userThinInstanceBuffersStorage.data[t],delete this._userThinInstanceBuffersStorage.strides[t],delete this._userThinInstanceBuffersStorage.sizes[t],delete this._userThinInstanceBuffersStorage.vertexBuffers[t]):(this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.data[t]=e,this._userThinInstanceBuffersStorage.strides[t]=n,this._userThinInstanceBuffersStorage.sizes[t]=e.length,this._userThinInstanceBuffersStorage.vertexBuffers[t]=new a(this.getEngine(),e,t,!s,!1,n,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t])))},t.prototype.thinInstanceBufferUpdated=function(t){"matrix"===t?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.matrixBuffer&&!this._thinInstanceDataStorage.matrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._thinInstanceDataStorage.matrixData,0,this._thinInstanceDataStorage.instancesCount)):"previousMatrix"===t?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.previousMatrixBuffer&&!this._thinInstanceDataStorage.previousMatrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._thinInstanceDataStorage.previousMatrixBuffer?.updateDirectly(this._thinInstanceDataStorage.previousMatrixData,0,this._thinInstanceDataStorage.instancesCount)):(t===a.ColorKind&&(t=a.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[t]&&(this.thinInstanceAllowAutomaticStaticBufferRecreation&&!this._userThinInstanceBuffersStorage.vertexBuffers[t].isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._userThinInstanceBuffersStorage.vertexBuffers[t].updateDirectly(this._userThinInstanceBuffersStorage.data[t],0)))},t.prototype.thinInstancePartialBufferUpdate=function(t,e,n){"matrix"===t?this._thinInstanceDataStorage.matrixBuffer&&this._thinInstanceDataStorage.matrixBuffer.updateDirectly(e,n):(t===a.ColorKind&&(t=a.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[t]&&this._userThinInstanceBuffersStorage.vertexBuffers[t].updateDirectly(e,n))},t.prototype.thinInstanceGetWorldMatrices=function(){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return[];const t=this._thinInstanceDataStorage.matrixData;if(!this._thinInstanceDataStorage.worldMatrices){this._thinInstanceDataStorage.worldMatrices=[];for(let e=0;e<this._thinInstanceDataStorage.instancesCount;++e)this._thinInstanceDataStorage.worldMatrices[e]=n.FromArray(t,16*e)}return this._thinInstanceDataStorage.worldMatrices},t.prototype.thinInstanceRefreshBoundingInfo=function(t=!1,e=!1,a=!1){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return;const s=this._thinInstanceDataStorage.boundingVectors;if(t||!this.rawBoundingInfo){s.length=0,this.refreshBoundingInfo(e,a);const t=this.getBoundingInfo();this.rawBoundingInfo=new i(t.minimum,t.maximum)}const h=this.getBoundingInfo(),f=this._thinInstanceDataStorage.matrixData;if(0===s.length)for(let t=0;t<h.boundingBox.vectors.length;++t)s.push(h.boundingBox.vectors[t].clone());r.Vector3[0].setAll(Number.POSITIVE_INFINITY),r.Vector3[1].setAll(Number.NEGATIVE_INFINITY);for(let t=0;t<this._thinInstanceDataStorage.instancesCount;++t){n.FromArrayToRef(f,16*t,r.Matrix[0]);for(let t=0;t<s.length;++t)o.TransformCoordinatesToRef(s[t],r.Matrix[0],r.Vector3[2]),r.Vector3[0].minimizeInPlace(r.Vector3[2]),r.Vector3[1].maximizeInPlace(r.Vector3[2])}h.reConstruct(r.Vector3[0],r.Vector3[1]),this._updateBoundingInfo()},t.prototype._thinInstanceRecreateBuffer=function(t,e=!0){"matrix"===t?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",this._thinInstanceDataStorage.matrixData,e)):"previousMatrix"===t?this._scene.needsPreviousWorldMatrices&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",this._thinInstanceDataStorage.previousMatrixData??this._thinInstanceDataStorage.matrixData,e)):(t===a.ColorKind&&(t=a.ColorInstanceKind),this._userThinInstanceBuffersStorage.vertexBuffers[t]?.dispose(),this._userThinInstanceBuffersStorage.vertexBuffers[t]=new a(this.getEngine(),this._userThinInstanceBuffersStorage.data[t],t,!e,!1,this._userThinInstanceBuffersStorage.strides[t],!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))},t.prototype._thinInstanceUpdateBufferSize=function(t,e=1){t===a.ColorKind&&(t=a.ColorInstanceKind);const n="matrix"===t;if(!(n||this._userThinInstanceBuffersStorage&&this._userThinInstanceBuffersStorage.strides[t]))return;const s=n?16:this._userThinInstanceBuffersStorage.strides[t],i=n?this._thinInstanceDataStorage.matrixBufferSize:this._userThinInstanceBuffersStorage.sizes[t];let r=n?this._thinInstanceDataStorage.matrixData:this._userThinInstanceBuffersStorage.data[t];const o=(this._thinInstanceDataStorage.instancesCount+e)*s;let h=i;for(;h<o;)h*=2;if(!r||i!=h){if(r){const t=new Float32Array(h);t.set(r,0),r=t}else r=new Float32Array(h);n?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",r,!1),this._thinInstanceDataStorage.matrixData=r,this._thinInstanceDataStorage.matrixBufferSize=h,this._scene.needsPreviousWorldMatrices&&!this._thinInstanceDataStorage.previousMatrixData&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",r,!1))):(this._userThinInstanceBuffersStorage.vertexBuffers[t]?.dispose(),this._userThinInstanceBuffersStorage.data[t]=r,this._userThinInstanceBuffersStorage.sizes[t]=h,this._userThinInstanceBuffersStorage.vertexBuffers[t]=new a(this.getEngine(),r,t,!0,!1,s,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))}},t.prototype._thinInstanceInitializeUserStorage=function(){this._userThinInstanceBuffersStorage||(this._userThinInstanceBuffersStorage={data:{},sizes:{},vertexBuffers:{},strides:{}})},t.prototype._disposeThinInstanceSpecificData=function(){this._thinInstanceDataStorage?.matrixBuffer&&(this._thinInstanceDataStorage.matrixBuffer.dispose(),this._thinInstanceDataStorage.matrixBuffer=null)};
|
|
2
|
+
//# sourceMappingURL=thinInstanceMesh-CgfQdxDM.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinInstanceMesh-CgfQdxDM.esm.min.js","sources":["../../../../../dev/core/dist/Meshes/thinInstanceMesh.js"],"sourcesContent":["import { Mesh } from \"../Meshes/mesh\";\nimport { VertexBuffer, Buffer } from \"../Buffers/buffer\";\nimport { Matrix, Vector3, TmpVectors } from \"../Maths/math.vector\";\nimport { Logger } from \"../Misc/logger\";\nimport { BoundingInfo } from \"core/Culling/boundingInfo\";\nMesh.prototype.thinInstanceAdd = function (matrix, refresh = true) {\n if (!this.getScene().getEngine().getCaps().instancedArrays) {\n Logger.Error(\"Thin Instances are not supported on this device as Instanced Array extension not supported\");\n return -1;\n }\n this._thinInstanceUpdateBufferSize(\"matrix\", Array.isArray(matrix) ? matrix.length : 1);\n const index = this._thinInstanceDataStorage.instancesCount;\n if (Array.isArray(matrix)) {\n for (let i = 0; i < matrix.length; ++i) {\n this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++, matrix[i], i === matrix.length - 1 && refresh);\n }\n }\n else {\n this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++, matrix, refresh);\n }\n return index;\n};\nMesh.prototype.thinInstanceAddSelf = function (refresh = true) {\n return this.thinInstanceAdd(Matrix.IdentityReadOnly, refresh);\n};\nMesh.prototype.thinInstanceRegisterAttribute = function (kind, stride) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n this.removeVerticesData(kind);\n this._thinInstanceInitializeUserStorage();\n this._userThinInstanceBuffersStorage.strides[kind] = stride;\n this._userThinInstanceBuffersStorage.sizes[kind] = stride * Math.max(32, this._thinInstanceDataStorage.instancesCount); // Initial size\n this._userThinInstanceBuffersStorage.data[kind] = new Float32Array(this._userThinInstanceBuffersStorage.sizes[kind]);\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userThinInstanceBuffersStorage.data[kind], kind, true, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n};\nMesh.prototype.thinInstanceSetMatrixAt = function (index, matrix, refresh = true) {\n if (!this._thinInstanceDataStorage.matrixData || index >= this._thinInstanceDataStorage.instancesCount) {\n return false;\n }\n const matrixData = this._thinInstanceDataStorage.matrixData;\n matrix.copyToArray(matrixData, index * 16);\n if (this._thinInstanceDataStorage.worldMatrices) {\n this._thinInstanceDataStorage.worldMatrices[index] = matrix;\n }\n if (refresh) {\n this.thinInstanceBufferUpdated(\"matrix\");\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n }\n return true;\n};\nMesh.prototype.thinInstanceSetAttributeAt = function (kind, index, value, refresh = true) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (!this._userThinInstanceBuffersStorage || !this._userThinInstanceBuffersStorage.data[kind] || index >= this._thinInstanceDataStorage.instancesCount) {\n return false;\n }\n this._thinInstanceUpdateBufferSize(kind, 0); // make sur the buffer for the kind attribute is big enough\n this._userThinInstanceBuffersStorage.data[kind].set(value, index * this._userThinInstanceBuffersStorage.strides[kind]);\n if (refresh) {\n this.thinInstanceBufferUpdated(kind);\n }\n return true;\n};\nObject.defineProperty(Mesh.prototype, \"thinInstanceCount\", {\n get: function () {\n return this._thinInstanceDataStorage.instancesCount;\n },\n set: function (value) {\n const matrixData = this._thinInstanceDataStorage.matrixData ?? this.source?._thinInstanceDataStorage.matrixData;\n const numMaxInstances = matrixData ? matrixData.length / 16 : 0;\n if (value <= numMaxInstances) {\n this._thinInstanceDataStorage.instancesCount = value;\n }\n },\n enumerable: true,\n configurable: true,\n});\nMesh.prototype._thinInstanceCreateMatrixBuffer = function (kind, buffer, staticBuffer = true) {\n const matrixBuffer = new Buffer(this.getEngine(), buffer, !staticBuffer, 16, false, true);\n for (let i = 0; i < 4; i++) {\n this.setVerticesBuffer(matrixBuffer.createVertexBuffer(kind + i, i * 4, 4));\n }\n return matrixBuffer;\n};\nMesh.prototype.thinInstanceSetBuffer = function (kind, buffer, stride = 0, staticBuffer = true) {\n stride = stride || 16;\n if (kind === \"matrix\") {\n this._thinInstanceDataStorage.matrixBuffer?.dispose();\n this._thinInstanceDataStorage.matrixBuffer = null;\n this._thinInstanceDataStorage.matrixBufferSize = buffer ? buffer.length : 32 * stride;\n this._thinInstanceDataStorage.matrixData = buffer;\n this._thinInstanceDataStorage.worldMatrices = null;\n if (buffer !== null) {\n this._thinInstanceDataStorage.instancesCount = buffer.length / stride;\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", buffer, staticBuffer);\n if (!this.doNotSyncBoundingInfo) {\n this.thinInstanceRefreshBoundingInfo(false);\n }\n }\n else {\n this._thinInstanceDataStorage.instancesCount = 0;\n if (!this.doNotSyncBoundingInfo) {\n // mesh has no more thin instances, so need to recompute the bounding box because it's the regular mesh that will now be displayed\n this.refreshBoundingInfo();\n }\n }\n }\n else if (kind === \"previousMatrix\") {\n this._thinInstanceDataStorage.previousMatrixBuffer?.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = null;\n this._thinInstanceDataStorage.previousMatrixData = buffer;\n if (buffer !== null) {\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", buffer, staticBuffer);\n }\n }\n else {\n // color for instanced mesh is ColorInstanceKind and not ColorKind because of native that needs to do the differenciation\n // hot switching kind here to preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (buffer === null) {\n if (this._userThinInstanceBuffersStorage?.data[kind]) {\n this.removeVerticesData(kind);\n delete this._userThinInstanceBuffersStorage.data[kind];\n delete this._userThinInstanceBuffersStorage.strides[kind];\n delete this._userThinInstanceBuffersStorage.sizes[kind];\n delete this._userThinInstanceBuffersStorage.vertexBuffers[kind];\n }\n }\n else {\n this._thinInstanceInitializeUserStorage();\n this._userThinInstanceBuffersStorage.data[kind] = buffer;\n this._userThinInstanceBuffersStorage.strides[kind] = stride;\n this._userThinInstanceBuffersStorage.sizes[kind] = buffer.length;\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), buffer, kind, !staticBuffer, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n }\n};\nMesh.prototype.thinInstanceBufferUpdated = function (kind) {\n if (kind === \"matrix\") {\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation && this._thinInstanceDataStorage.matrixBuffer && !this._thinInstanceDataStorage.matrixBuffer.isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._thinInstanceDataStorage.matrixData, 0, this._thinInstanceDataStorage.instancesCount);\n }\n else if (kind === \"previousMatrix\") {\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation &&\n this._thinInstanceDataStorage.previousMatrixBuffer &&\n !this._thinInstanceDataStorage.previousMatrixBuffer.isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n this._thinInstanceDataStorage.previousMatrixBuffer?.updateDirectly(this._thinInstanceDataStorage.previousMatrixData, 0, this._thinInstanceDataStorage.instancesCount);\n }\n else {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (this._userThinInstanceBuffersStorage?.vertexBuffers[kind]) {\n if (this.thinInstanceAllowAutomaticStaticBufferRecreation && !this._userThinInstanceBuffersStorage.vertexBuffers[kind].isUpdatable()) {\n this._thinInstanceRecreateBuffer(kind);\n }\n this._userThinInstanceBuffersStorage.vertexBuffers[kind].updateDirectly(this._userThinInstanceBuffersStorage.data[kind], 0);\n }\n }\n};\nMesh.prototype.thinInstancePartialBufferUpdate = function (kind, data, offset) {\n if (kind === \"matrix\") {\n if (this._thinInstanceDataStorage.matrixBuffer) {\n this._thinInstanceDataStorage.matrixBuffer.updateDirectly(data, offset);\n }\n }\n else {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n if (this._userThinInstanceBuffersStorage?.vertexBuffers[kind]) {\n this._userThinInstanceBuffersStorage.vertexBuffers[kind].updateDirectly(data, offset);\n }\n }\n};\nMesh.prototype.thinInstanceGetWorldMatrices = function () {\n if (!this._thinInstanceDataStorage.matrixData || !this._thinInstanceDataStorage.matrixBuffer) {\n return [];\n }\n const matrixData = this._thinInstanceDataStorage.matrixData;\n if (!this._thinInstanceDataStorage.worldMatrices) {\n this._thinInstanceDataStorage.worldMatrices = [];\n for (let i = 0; i < this._thinInstanceDataStorage.instancesCount; ++i) {\n this._thinInstanceDataStorage.worldMatrices[i] = Matrix.FromArray(matrixData, i * 16);\n }\n }\n return this._thinInstanceDataStorage.worldMatrices;\n};\nMesh.prototype.thinInstanceRefreshBoundingInfo = function (forceRefreshParentInfo = false, applySkeleton = false, applyMorph = false) {\n if (!this._thinInstanceDataStorage.matrixData || !this._thinInstanceDataStorage.matrixBuffer) {\n return;\n }\n const vectors = this._thinInstanceDataStorage.boundingVectors;\n if (forceRefreshParentInfo || !this.rawBoundingInfo) {\n vectors.length = 0;\n this.refreshBoundingInfo(applySkeleton, applyMorph);\n const boundingInfo = this.getBoundingInfo();\n this.rawBoundingInfo = new BoundingInfo(boundingInfo.minimum, boundingInfo.maximum);\n }\n const boundingInfo = this.getBoundingInfo();\n const matrixData = this._thinInstanceDataStorage.matrixData;\n if (vectors.length === 0) {\n for (let v = 0; v < boundingInfo.boundingBox.vectors.length; ++v) {\n vectors.push(boundingInfo.boundingBox.vectors[v].clone());\n }\n }\n TmpVectors.Vector3[0].setAll(Number.POSITIVE_INFINITY); // min\n TmpVectors.Vector3[1].setAll(Number.NEGATIVE_INFINITY); // max\n for (let i = 0; i < this._thinInstanceDataStorage.instancesCount; ++i) {\n Matrix.FromArrayToRef(matrixData, i * 16, TmpVectors.Matrix[0]);\n for (let v = 0; v < vectors.length; ++v) {\n Vector3.TransformCoordinatesToRef(vectors[v], TmpVectors.Matrix[0], TmpVectors.Vector3[2]);\n TmpVectors.Vector3[0].minimizeInPlace(TmpVectors.Vector3[2]);\n TmpVectors.Vector3[1].maximizeInPlace(TmpVectors.Vector3[2]);\n }\n }\n boundingInfo.reConstruct(TmpVectors.Vector3[0], TmpVectors.Vector3[1]);\n this._updateBoundingInfo();\n};\nMesh.prototype._thinInstanceRecreateBuffer = function (kind, staticBuffer = true) {\n if (kind === \"matrix\") {\n this._thinInstanceDataStorage.matrixBuffer?.dispose();\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", this._thinInstanceDataStorage.matrixData, staticBuffer);\n }\n else if (kind === \"previousMatrix\") {\n if (this._scene.needsPreviousWorldMatrices) {\n this._thinInstanceDataStorage.previousMatrixBuffer?.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", this._thinInstanceDataStorage.previousMatrixData ?? this._thinInstanceDataStorage.matrixData, staticBuffer);\n }\n }\n else {\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n this._userThinInstanceBuffersStorage.vertexBuffers[kind]?.dispose();\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), this._userThinInstanceBuffersStorage.data[kind], kind, !staticBuffer, false, this._userThinInstanceBuffersStorage.strides[kind], true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n};\nMesh.prototype._thinInstanceUpdateBufferSize = function (kind, numInstances = 1) {\n // preserve backward compatibility\n if (kind === VertexBuffer.ColorKind) {\n kind = VertexBuffer.ColorInstanceKind;\n }\n const kindIsMatrix = kind === \"matrix\";\n if (!kindIsMatrix && (!this._userThinInstanceBuffersStorage || !this._userThinInstanceBuffersStorage.strides[kind])) {\n return;\n }\n const stride = kindIsMatrix ? 16 : this._userThinInstanceBuffersStorage.strides[kind];\n const currentSize = kindIsMatrix ? this._thinInstanceDataStorage.matrixBufferSize : this._userThinInstanceBuffersStorage.sizes[kind];\n let data = kindIsMatrix ? this._thinInstanceDataStorage.matrixData : this._userThinInstanceBuffersStorage.data[kind];\n const bufferSize = (this._thinInstanceDataStorage.instancesCount + numInstances) * stride;\n let newSize = currentSize;\n while (newSize < bufferSize) {\n newSize *= 2;\n }\n if (!data || currentSize != newSize) {\n if (!data) {\n data = new Float32Array(newSize);\n }\n else {\n const newData = new Float32Array(newSize);\n newData.set(data, 0);\n data = newData;\n }\n if (kindIsMatrix) {\n this._thinInstanceDataStorage.matrixBuffer?.dispose();\n this._thinInstanceDataStorage.matrixBuffer = this._thinInstanceCreateMatrixBuffer(\"world\", data, false);\n this._thinInstanceDataStorage.matrixData = data;\n this._thinInstanceDataStorage.matrixBufferSize = newSize;\n if (this._scene.needsPreviousWorldMatrices && !this._thinInstanceDataStorage.previousMatrixData) {\n this._thinInstanceDataStorage.previousMatrixBuffer?.dispose();\n this._thinInstanceDataStorage.previousMatrixBuffer = this._thinInstanceCreateMatrixBuffer(\"previousWorld\", data, false);\n }\n }\n else {\n this._userThinInstanceBuffersStorage.vertexBuffers[kind]?.dispose();\n this._userThinInstanceBuffersStorage.data[kind] = data;\n this._userThinInstanceBuffersStorage.sizes[kind] = newSize;\n this._userThinInstanceBuffersStorage.vertexBuffers[kind] = new VertexBuffer(this.getEngine(), data, kind, true, false, stride, true);\n this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[kind]);\n }\n }\n};\nMesh.prototype._thinInstanceInitializeUserStorage = function () {\n if (!this._userThinInstanceBuffersStorage) {\n this._userThinInstanceBuffersStorage = {\n data: {},\n sizes: {},\n vertexBuffers: {},\n strides: {},\n };\n }\n};\nMesh.prototype._disposeThinInstanceSpecificData = function () {\n if (this._thinInstanceDataStorage?.matrixBuffer) {\n this._thinInstanceDataStorage.matrixBuffer.dispose();\n this._thinInstanceDataStorage.matrixBuffer = null;\n }\n};\n//# sourceMappingURL=thinInstanceMesh.js.map"],"names":["Mesh","prototype","thinInstanceAdd","matrix","refresh","this","getScene","getEngine","getCaps","instancedArrays","Logger","Error","_thinInstanceUpdateBufferSize","Array","isArray","length","index","_thinInstanceDataStorage","instancesCount","i","thinInstanceSetMatrixAt","thinInstanceAddSelf","Matrix","IdentityReadOnly","thinInstanceRegisterAttribute","kind","stride","VertexBuffer","ColorKind","ColorInstanceKind","removeVerticesData","_thinInstanceInitializeUserStorage","_userThinInstanceBuffersStorage","strides","sizes","Math","max","data","Float32Array","vertexBuffers","setVerticesBuffer","matrixData","copyToArray","worldMatrices","thinInstanceBufferUpdated","doNotSyncBoundingInfo","thinInstanceRefreshBoundingInfo","thinInstanceSetAttributeAt","value","set","Object","defineProperty","get","source","enumerable","configurable","_thinInstanceCreateMatrixBuffer","buffer","staticBuffer","matrixBuffer","Buffer","createVertexBuffer","thinInstanceSetBuffer","dispose","matrixBufferSize","refreshBoundingInfo","previousMatrixBuffer","previousMatrixData","thinInstanceAllowAutomaticStaticBufferRecreation","isUpdatable","_thinInstanceRecreateBuffer","updateDirectly","thinInstancePartialBufferUpdate","offset","thinInstanceGetWorldMatrices","FromArray","forceRefreshParentInfo","applySkeleton","applyMorph","vectors","boundingVectors","rawBoundingInfo","boundingInfo","getBoundingInfo","BoundingInfo","minimum","maximum","v","boundingBox","push","clone","TmpVectors","Vector3","setAll","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","FromArrayToRef","TransformCoordinatesToRef","minimizeInPlace","maximizeInPlace","reConstruct","_updateBoundingInfo","_scene","needsPreviousWorldMatrices","numInstances","kindIsMatrix","currentSize","bufferSize","newSize","newData","_disposeThinInstanceSpecificData"],"mappings":"oGAKAA,EAAKC,UAAUC,gBAAkB,SAAUC,EAAQC,GAAU,GACzD,IAAKC,KAAKC,WAAWC,YAAYC,UAAUC,gBAEvC,OADAC,EAAOC,MAAM,+FACL,EAEZN,KAAKO,8BAA8B,SAAUC,MAAMC,QAAQX,GAAUA,EAAOY,OAAS,GACrF,MAAMC,EAAQX,KAAKY,yBAAyBC,eAC5C,GAAIL,MAAMC,QAAQX,GACd,IAAK,IAAIgB,EAAI,EAAGA,EAAIhB,EAAOY,SAAUI,EACjCd,KAAKe,wBAAwBf,KAAKY,yBAAyBC,iBAAkBf,EAAOgB,GAAIA,IAAMhB,EAAOY,OAAS,GAAKX,QAIvHC,KAAKe,wBAAwBf,KAAKY,yBAAyBC,iBAAkBf,EAAQC,GAEzF,OAAOY,CACX,EACAhB,EAAKC,UAAUoB,oBAAsB,SAAUjB,GAAU,GACrD,OAAOC,KAAKH,gBAAgBoB,EAAOC,iBAAkBnB,EACzD,EACAJ,EAAKC,UAAUuB,8BAAgC,SAAUC,EAAMC,GAEvDD,IAASE,EAAaC,YACtBH,EAAOE,EAAaE,mBAExBxB,KAAKyB,mBAAmBL,GACxBpB,KAAK0B,qCACL1B,KAAK2B,gCAAgCC,QAAQR,GAAQC,EACrDrB,KAAK2B,gCAAgCE,MAAMT,GAAQC,EAASS,KAAKC,IAAI,GAAI/B,KAAKY,yBAAyBC,g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