@babylonjs/viewer 7.41.0 → 7.41.1-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/photoStudio.env +0 -0
- package/dist/babylon-viewer.esm.js +2 -0
- package/dist/babylon-viewer.esm.js.map +1 -0
- package/dist/babylon-viewer.esm.min.js +2 -0
- package/dist/babylon-viewer.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_ies-BS2USlck.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js +84 -0
- package/dist/chunks/EXT_lights_ies-C-joQ5O4.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-C3wbbb5Z.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-DDdRDnM2.esm.min.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-AXAnRQN7.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-BcjPo6uC.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-DlUkQB2P.esm.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-yJ4OpORd.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-BQWbvJfK.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-C0pGpnGv.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-Dd7Uqtmh.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-DehlrnW-.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-C5NMuDj4.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-Cp3LHdoG.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-DEBOwDXh.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js +352 -0
- package/dist/chunks/KHR_animation_pointer-Dx1OeG2b.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-Ch0QOlBL.esm.min.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js +610 -0
- package/dist/chunks/KHR_draco_mesh_compression-D59SFLyo.esm.js.map +1 -0
- package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-Blj_9jts.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-CR0LYUa7.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js +581 -0
- package/dist/chunks/KHR_lights_punctual--w0a62AP.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-BojffBbG.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-BPtHWkOQ.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-DU5_bnCL.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-BBuRlPhc.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-Eg0xbuWN.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-Bkzk60Y5.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-C3DaLgRY.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-DL_XFhxj.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-DbMQPBgM.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-BuHyjtBD.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-Djlr_ul3.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-BIe6qBOo.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-DOfaAmNY.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-BgElZgUu.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-lUeo07SZ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-9ShQyhJ6.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-DE5LjLg6.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-BfZe6ZFu.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-OWjuK2V4.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-dowPxbW3.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-nWeBZu0R.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-BPNQkK0O.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-CHr_yLLX.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-BYXpcsdj.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-Cr7YsDHT.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js +262 -0
- package/dist/chunks/KHR_materials_variants-BCVX3sJa.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-BXzl6KpJ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-BD9KEaJz.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-DrqGUGW6.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-Dg22auJA.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-hvxpvTbe.esm.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js +39 -0
- package/dist/chunks/KHR_node_hoverability-BDiqFmBB.esm.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js +2 -0
- package/dist/chunks/KHR_node_hoverability-CumkOtZM.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-BKEa-Yfj.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-K0fsD4Vv.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-8YVY1pKo.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-BM__NeSW.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform--qxpdvRw.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-C0MO-oJp.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-D9FpHvJo.esm.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-DeXPWWQE.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-BbICSwFH.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js +2201 -0
- package/dist/chunks/MSFT_audio_emitter-Dd5lbfUc.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js +337 -0
- package/dist/chunks/MSFT_lod-B0zrRF3s.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-Bd4znUfD.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-CdIpMgsb.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-WFc8m_Ka.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-CTbtGna8.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-yTSoBQJx.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-8TJDgymS.esm.js +2482 -0
- package/dist/chunks/animationGroup-8TJDgymS.esm.js.map +1 -0
- package/dist/chunks/animationGroup-toXtd3a1.esm.min.js +2 -0
- package/dist/chunks/animationGroup-toXtd3a1.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-7pMDUaac.esm.min.js +2 -0
- package/dist/chunks/assetContainer-7pMDUaac.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-DYzO0AbX.esm.js +1720 -0
- package/dist/chunks/assetContainer-DYzO0AbX.esm.js.map +1 -0
- package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js +2 -0
- package/dist/chunks/audioEngine-Kz4HSEXd.esm.min.js.map +1 -0
- package/dist/chunks/audioEngine-peiGqjr6.esm.js +305 -0
- package/dist/chunks/audioEngine-peiGqjr6.esm.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-BZvcL01J.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-CPflSjER.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-CR0XhSAg.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-DVJdcB62.esm.min.js.map +1 -0
- package/dist/chunks/dds-6EdM5O6M.esm.js +540 -0
- package/dist/chunks/dds-6EdM5O6M.esm.js.map +1 -0
- package/dist/chunks/dds-DVX_K9B3.esm.min.js +2 -0
- package/dist/chunks/dds-DVX_K9B3.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-BAK7Ib2Z.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-_nktVxwZ.esm.js.map +1 -0
- package/dist/chunks/decalFragment-C_Cews3-.esm.js +18 -0
- package/dist/chunks/decalFragment-C_Cews3-.esm.js.map +1 -0
- package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js +2 -0
- package/dist/chunks/decalFragment-Dmj88EX9.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js +2 -0
- package/dist/chunks/default.fragment-Bv_nR7po.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js +2 -0
- package/dist/chunks/default.fragment-CkZQyJVM.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-CyFHDykY.esm.js +446 -0
- package/dist/chunks/default.fragment-CyFHDykY.esm.js.map +1 -0
- package/dist/chunks/default.fragment-ej-2z5tS.esm.js +515 -0
- package/dist/chunks/default.fragment-ej-2z5tS.esm.js.map +1 -0
- package/dist/chunks/default.vertex-16mVOFgT.esm.js +211 -0
- package/dist/chunks/default.vertex-16mVOFgT.esm.js.map +1 -0
- package/dist/chunks/default.vertex-D--q2At3.esm.min.js +2 -0
- package/dist/chunks/default.vertex-D--q2At3.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-DDlgZTrR.esm.js +190 -0
- package/dist/chunks/default.vertex-DDlgZTrR.esm.js.map +1 -0
- package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js +2 -0
- package/dist/chunks/default.vertex-_jqs3KiZ.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-8YG0iNg8.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-BoBSRTbi.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-Dt_5vo1d.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-R6gGjkAM.esm.min.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
- package/dist/chunks/dumpTools-Bhux0wvM.esm.js +200 -0
- package/dist/chunks/dumpTools-Bhux0wvM.esm.js.map +1 -0
- package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js +2 -0
- package/dist/chunks/dumpTools-CHCb2UkY.esm.min.js.map +1 -0
- package/dist/chunks/engine-DF_zE4qj.esm.js +2213 -0
- package/dist/chunks/engine-DF_zE4qj.esm.js.map +1 -0
- package/dist/chunks/engine-DVmdDcyP.esm.min.js +2 -0
- package/dist/chunks/engine-DVmdDcyP.esm.min.js.map +1 -0
- package/dist/chunks/engine.common-CvOmoKru.esm.js +1162 -0
- package/dist/chunks/engine.common-CvOmoKru.esm.js.map +1 -0
- package/dist/chunks/engine.common-DpTzktQJ.esm.min.js +2 -0
- package/dist/chunks/engine.common-DpTzktQJ.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js +64 -0
- package/dist/chunks/envTextureLoader-4YxGm-Px.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-DMQui088.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-DMQui088.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-BPGrTBPI.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-DvkpsqkN.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js +1683 -0
- package/dist/chunks/exrTextureLoader-BRkB54sO.esm.js.map +1 -0
- package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-BtN7_zst.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-BrGGFaiu.esm.js +101 -0
- package/dist/chunks/fogFragment-BrGGFaiu.esm.js.map +1 -0
- package/dist/chunks/fogFragment-ByOwwQur.esm.min.js +2 -0
- package/dist/chunks/fogFragment-ByOwwQur.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-Chod24nu.esm.min.js +2 -0
- package/dist/chunks/fogFragment-Chod24nu.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-gZfybCpt.esm.js +102 -0
- package/dist/chunks/fogFragment-gZfybCpt.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-BdEia8ob.esm.min.js.map +1 -0
- package/dist/chunks/fresnelFunction-DBlxfmri.esm.js +12 -0
- package/dist/chunks/fresnelFunction-DBlxfmri.esm.js.map +1 -0
- package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-D4C1IGb3.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-fUFiWvYb.esm.js +7693 -0
- package/dist/chunks/glTFLoader-fUFiWvYb.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-BB_Vw079.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-CttmY50U.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-CttmY50U.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-B0Rp1hEo.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-B0Rp1hEo.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-Cca_z552.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-D4ID83NC.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-HJ5dbl0w.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js +253 -0
- package/dist/chunks/hdrTextureLoader-C3kqy6YV.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-Dhlluz4z.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-BJotVqUd.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-C66wRWtu.esm.js +110 -0
- package/dist/chunks/helperFunctions-C66wRWtu.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-DwEZ9rqh.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-gnki_9Kj.esm.js +83 -0
- package/dist/chunks/helperFunctions-gnki_9Kj.esm.js.map +1 -0
- package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js +189 -0
- package/dist/chunks/iesTextureLoader-QDs2Cwy5.esm.js.map +1 -0
- package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js +2 -0
- package/dist/chunks/iesTextureLoader-pwA6Q4HK.esm.min.js.map +1 -0
- package/dist/chunks/index-C6hXZyZb.esm.js +74889 -0
- package/dist/chunks/index-C6hXZyZb.esm.js.map +1 -0
- package/dist/chunks/index-rZVkfTE6.esm.min.js +57 -0
- package/dist/chunks/index-rZVkfTE6.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-jVu-Sj-0.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-zG9azrZF.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-0cA1pTvQ.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-CYxYhXIS.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-D4KGxdX-.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-DJlt2-H5.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-BS2JEtXA.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-DKPfA10X.esm.js +81 -0
- package/dist/chunks/logDepthVertex-DKPfA10X.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-ojTShW5I.esm.js +77 -0
- package/dist/chunks/logDepthVertex-ojTShW5I.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-v-0pHNc-.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-BAzmbS0W.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-Cnux1jkK.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-CwS0hUUZ.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-DCawby1A.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-QvH0RgeZ.esm.js +26 -0
- package/dist/chunks/meshUboDeclaration-QvH0RgeZ.esm.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-g2s_cYI1.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-BOutXdVR.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-BPwrX8RK.esm.js +1338 -0
- package/dist/chunks/objFileLoader-BPwrX8RK.esm.js.map +1 -0
- package/dist/chunks/oitFragment-CmcWUhsZ.esm.js +1240 -0
- package/dist/chunks/oitFragment-CmcWUhsZ.esm.js.map +1 -0
- package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js +1078 -0
- package/dist/chunks/oitFragment-D8XBQ6Wa.esm.js.map +1 -0
- package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js +2 -0
- package/dist/chunks/oitFragment-DgAlmoHs.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js +2 -0
- package/dist/chunks/oitFragment-DpJ5xGhy.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment--XRaXRhU.esm.js +15 -0
- package/dist/chunks/pass.fragment--XRaXRhU.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-5Q3qXxDe.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-BBLiyU_i.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js +15 -0
- package/dist/chunks/pass.fragment-DI4ZYZJe.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js +3269 -0
- package/dist/chunks/pbr.fragment-C7xQS4ZJ.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-Ddxaik8T.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-fky04gH_.esm.js +3222 -0
- package/dist/chunks/pbr.fragment-fky04gH_.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-ya1zai4w.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js +223 -0
- package/dist/chunks/pbr.vertex-BPEYHoRM.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-BXcMYADF.esm.js +348 -0
- package/dist/chunks/pbr.vertex-BXcMYADF.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-BjA08auU.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-Cx2V3lNf.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-BHpQrNSx.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-DnDbk0tq.esm.js.map +1 -0
- package/dist/chunks/rawTexture-CWiRIto8.esm.js +191 -0
- package/dist/chunks/rawTexture-CWiRIto8.esm.js.map +1 -0
- package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js +2 -0
- package/dist/chunks/rawTexture-DX8V9PEj.esm.min.js.map +1 -0
- package/dist/chunks/ray-ix7SqYNQ.esm.min.js +2 -0
- package/dist/chunks/ray-ix7SqYNQ.esm.min.js.map +1 -0
- package/dist/chunks/ray-nTZBkOil.esm.js +946 -0
- package/dist/chunks/ray-nTZBkOil.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-Be3ofvlt.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-C05QJpT2.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-D3SYBclQ.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-DBG6KfKF.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-BlhtohrO.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-BmJKYw6A.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-dr2kGjSO.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-hXPzg1p5.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-Bs42LtsP.esm.min.js.map +1 -0
- package/dist/chunks/splatFileLoader-Dp33YOem.esm.js +3379 -0
- package/dist/chunks/splatFileLoader-Dp33YOem.esm.js.map +1 -0
- package/dist/chunks/spotLight-C0NmKeem.esm.js +701 -0
- package/dist/chunks/spotLight-C0NmKeem.esm.js.map +1 -0
- package/dist/chunks/spotLight-CcuCNdES.esm.min.js +2 -0
- package/dist/chunks/spotLight-CcuCNdES.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-C1E5n_4w.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-v_D8QA4q.esm.js +1807 -0
- package/dist/chunks/standardMaterial-v_D8QA4q.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-DC2IRQDj.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js +238 -0
- package/dist/chunks/stlFileLoader-LRHEIFfU.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-2ekJC0En.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-Clj6zUK-.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-DksimP2U.esm.js +3848 -0
- package/dist/chunks/thinEngine-DksimP2U.esm.js.map +1 -0
- package/dist/chunks/thinEngine-tsALaFYH.esm.min.js +2 -0
- package/dist/chunks/thinEngine-tsALaFYH.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-B8AW0Oa2.esm.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-kCGEJ0-e.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-Bjijk3lU.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-D9917nJN.esm.js +428 -0
- package/dist/chunks/vertexColorMixing-D9917nJN.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-DgthWrKf.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js +538 -0
- package/dist/chunks/vertexColorMixing-U1SA6UK3.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-BOGR1D8F.esm.min.js.map +1 -0
- package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js +11533 -0
- package/dist/chunks/webgpuEngine-BrzOpZ-2.esm.js.map +1 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js +122 -0
- package/dist/chunks/workerPool-BUOov2K1.esm.js.map +1 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +2 -0
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +1 -0
- package/lib/index.d.ts +591 -0
- package/lib/index.js +2165 -0
- package/lib/index.js.map +1 -0
- package/package.json +19 -28
- package/readme.md +28 -28
- package/configuration/configuration.d.ts +0 -107
- package/configuration/configuration.js +0 -16
- package/configuration/configuration.js.map +0 -1
- package/configuration/configurationCompatibility.d.ts +0 -8
- package/configuration/configurationCompatibility.js +0 -66
- package/configuration/configurationCompatibility.js.map +0 -1
- package/configuration/configurationContainer.d.ts +0 -10
- package/configuration/configurationContainer.js +0 -10
- package/configuration/configurationContainer.js.map +0 -1
- package/configuration/globals.d.ts +0 -6
- package/configuration/globals.js +0 -18
- package/configuration/globals.js.map +0 -1
- package/configuration/index.d.ts +0 -2
- package/configuration/index.js +0 -4
- package/configuration/index.js.map +0 -1
- package/configuration/interfaces/cameraConfiguration.d.ts +0 -31
- package/configuration/interfaces/cameraConfiguration.js +0 -2
- package/configuration/interfaces/cameraConfiguration.js.map +0 -1
- package/configuration/interfaces/colorGradingConfiguration.d.ts +0 -81
- package/configuration/interfaces/colorGradingConfiguration.js +0 -2
- package/configuration/interfaces/colorGradingConfiguration.js.map +0 -1
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +0 -20
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +0 -2
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +0 -1
- package/configuration/interfaces/environmentMapConfiguration.d.ts +0 -22
- package/configuration/interfaces/environmentMapConfiguration.js +0 -2
- package/configuration/interfaces/environmentMapConfiguration.js.map +0 -1
- package/configuration/interfaces/groundConfiguration.d.ts +0 -24
- package/configuration/interfaces/groundConfiguration.js +0 -2
- package/configuration/interfaces/groundConfiguration.js.map +0 -1
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +0 -45
- package/configuration/interfaces/imageProcessingConfiguration.js +0 -2
- package/configuration/interfaces/imageProcessingConfiguration.js.map +0 -1
- package/configuration/interfaces/index.d.ts +0 -15
- package/configuration/interfaces/index.js +0 -16
- package/configuration/interfaces/index.js.map +0 -1
- package/configuration/interfaces/lightConfiguration.d.ts +0 -60
- package/configuration/interfaces/lightConfiguration.js +0 -2
- package/configuration/interfaces/lightConfiguration.js.map +0 -1
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +0 -26
- package/configuration/interfaces/modelAnimationConfiguration.js +0 -2
- package/configuration/interfaces/modelAnimationConfiguration.js.map +0 -1
- package/configuration/interfaces/modelConfiguration.d.ts +0 -65
- package/configuration/interfaces/modelConfiguration.js +0 -2
- package/configuration/interfaces/modelConfiguration.js.map +0 -1
- package/configuration/interfaces/observersConfiguration.d.ts +0 -5
- package/configuration/interfaces/observersConfiguration.js +0 -2
- package/configuration/interfaces/observersConfiguration.js.map +0 -1
- package/configuration/interfaces/sceneConfiguration.d.ts +0 -48
- package/configuration/interfaces/sceneConfiguration.js +0 -2
- package/configuration/interfaces/sceneConfiguration.js.map +0 -1
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +0 -23
- package/configuration/interfaces/sceneOptimizerConfiguration.js +0 -2
- package/configuration/interfaces/sceneOptimizerConfiguration.js.map +0 -1
- package/configuration/interfaces/skyboxConfiguration.d.ts +0 -21
- package/configuration/interfaces/skyboxConfiguration.js +0 -2
- package/configuration/interfaces/skyboxConfiguration.js.map +0 -1
- package/configuration/interfaces/templateConfiguration.d.ts +0 -67
- package/configuration/interfaces/templateConfiguration.js +0 -2
- package/configuration/interfaces/templateConfiguration.js.map +0 -1
- package/configuration/interfaces/vrConfiguration.d.ts +0 -16
- package/configuration/interfaces/vrConfiguration.js +0 -2
- package/configuration/interfaces/vrConfiguration.js.map +0 -1
- package/configuration/loader.d.ts +0 -4
- package/configuration/loader.js +0 -17
- package/configuration/loader.js.map +0 -1
- package/configuration/mappers.d.ts +0 -43
- package/configuration/mappers.js +0 -193
- package/configuration/mappers.js.map +0 -1
- package/configuration/renderOnlyLoader.d.ts +0 -33
- package/configuration/renderOnlyLoader.js +0 -162
- package/configuration/renderOnlyLoader.js.map +0 -1
- package/configuration/types/default.d.ts +0 -6
- package/configuration/types/default.js +0 -121
- package/configuration/types/default.js.map +0 -1
- package/configuration/types/environmentMap.d.ts +0 -5
- package/configuration/types/environmentMap.js +0 -14
- package/configuration/types/environmentMap.js.map +0 -1
- package/configuration/types/extended.d.ts +0 -6
- package/configuration/types/extended.js +0 -317
- package/configuration/types/extended.js.map +0 -1
- package/configuration/types/index.d.ts +0 -14
- package/configuration/types/index.js +0 -51
- package/configuration/types/index.js.map +0 -1
- package/configuration/types/minimal.d.ts +0 -6
- package/configuration/types/minimal.js +0 -43
- package/configuration/types/minimal.js.map +0 -1
- package/configuration/types/renderOnlyDefault.d.ts +0 -30
- package/configuration/types/renderOnlyDefault.js +0 -31
- package/configuration/types/renderOnlyDefault.js.map +0 -1
- package/configuration/types/shadowLight.d.ts +0 -9
- package/configuration/types/shadowLight.js +0 -64
- package/configuration/types/shadowLight.js.map +0 -1
- package/helper/index.d.ts +0 -29
- package/helper/index.js +0 -66
- package/helper/index.js.map +0 -1
- package/index.d.ts +0 -30
- package/index.js +0 -46
- package/index.js.map +0 -1
- package/initializer.d.ts +0 -11
- package/initializer.js +0 -35
- package/initializer.js.map +0 -1
- package/interfaces.d.ts +0 -5
- package/interfaces.js +0 -7
- package/interfaces.js.map +0 -1
- package/labs/environmentSerializer.d.ts +0 -126
- package/labs/environmentSerializer.js +0 -191
- package/labs/environmentSerializer.js.map +0 -1
- package/labs/texture.d.ts +0 -183
- package/labs/texture.js +0 -351
- package/labs/texture.js.map +0 -1
- package/labs/viewerLabs.d.ts +0 -51
- package/labs/viewerLabs.js +0 -134
- package/labs/viewerLabs.js.map +0 -1
- package/loader/modelLoader.d.ts +0 -56
- package/loader/modelLoader.js +0 -202
- package/loader/modelLoader.js.map +0 -1
- package/loader/plugins/applyMaterialConfig.d.ts +0 -12
- package/loader/plugins/applyMaterialConfig.js +0 -16
- package/loader/plugins/applyMaterialConfig.js.map +0 -1
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +0 -9
- package/loader/plugins/extendedMaterialLoaderPlugin.js +0 -16
- package/loader/plugins/extendedMaterialLoaderPlugin.js.map +0 -1
- package/loader/plugins/index.d.ts +0 -19
- package/loader/plugins/index.js +0 -44
- package/loader/plugins/index.js.map +0 -1
- package/loader/plugins/loaderPlugin.d.ts +0 -24
- package/loader/plugins/loaderPlugin.js +0 -2
- package/loader/plugins/loaderPlugin.js.map +0 -1
- package/loader/plugins/msftLodLoaderPlugin.d.ts +0 -12
- package/loader/plugins/msftLodLoaderPlugin.js +0 -21
- package/loader/plugins/msftLodLoaderPlugin.js.map +0 -1
- package/loader/plugins/telemetryLoaderPlugin.d.ts +0 -12
- package/loader/plugins/telemetryLoaderPlugin.js +0 -36
- package/loader/plugins/telemetryLoaderPlugin.js.map +0 -1
- package/managers/observablesManager.d.ts +0 -66
- package/managers/observablesManager.js +0 -35
- package/managers/observablesManager.js.map +0 -1
- package/managers/sceneManager.d.ts +0 -245
- package/managers/sceneManager.js +0 -1375
- package/managers/sceneManager.js.map +0 -1
- package/managers/telemetryManager.d.ts +0 -78
- package/managers/telemetryManager.js +0 -117
- package/managers/telemetryManager.js.map +0 -1
- package/model/modelAnimation.d.ts +0 -215
- package/model/modelAnimation.js +0 -237
- package/model/modelAnimation.js.map +0 -1
- package/model/viewerModel.d.ts +0 -233
- package/model/viewerModel.js +0 -673
- package/model/viewerModel.js.map +0 -1
- package/optimizer/custom/extended.d.ts +0 -13
- package/optimizer/custom/extended.js +0 -101
- package/optimizer/custom/extended.js.map +0 -1
- package/optimizer/custom/index.d.ts +0 -9
- package/optimizer/custom/index.js +0 -26
- package/optimizer/custom/index.js.map +0 -1
- package/renderOnlyIndex.d.ts +0 -11
- package/renderOnlyIndex.js +0 -18
- package/renderOnlyIndex.js.map +0 -1
- package/templating/eventManager.d.ts +0 -35
- package/templating/eventManager.js +0 -66
- package/templating/eventManager.js.map +0 -1
- package/templating/plugins/hdButtonPlugin.d.ts +0 -9
- package/templating/plugins/hdButtonPlugin.js +0 -22
- package/templating/plugins/hdButtonPlugin.js.map +0 -1
- package/templating/plugins/printButton.d.ts +0 -9
- package/templating/plugins/printButton.js +0 -41
- package/templating/plugins/printButton.js.map +0 -1
- package/templating/templateManager.d.ts +0 -197
- package/templating/templateManager.js +0 -561
- package/templating/templateManager.js.map +0 -1
- package/templating/viewerTemplatePlugin.d.ts +0 -21
- package/templating/viewerTemplatePlugin.js +0 -69
- package/templating/viewerTemplatePlugin.js.map +0 -1
- package/viewer/defaultViewer.d.ts +0 -130
- package/viewer/defaultViewer.js +0 -672
- package/viewer/defaultViewer.js.map +0 -1
- package/viewer/renderOnlyViewer.d.ts +0 -9
- package/viewer/renderOnlyViewer.js +0 -46
- package/viewer/renderOnlyViewer.js.map +0 -1
- package/viewer/viewer.d.ts +0 -258
- package/viewer/viewer.js +0 -783
- package/viewer/viewer.js.map +0 -1
- package/viewer/viewerManager.d.ts +0 -58
- package/viewer/viewerManager.js +0 -91
- package/viewer/viewerManager.js.map +0 -1
- package/viewer/viewerWithTemplate.d.ts +0 -9
- package/viewer/viewerWithTemplate.js +0 -20
- package/viewer/viewerWithTemplate.js.map +0 -1
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { am as STLFileLoaderMetadata, M as Mesh, T as Tools, V as VertexBuffer, y as registerSceneLoaderPlugin } from './index-C6hXZyZb.esm.js';
|
|
2
|
+
import { A as AssetContainer } from './assetContainer-DYzO0AbX.esm.js';
|
|
3
|
+
import './standardMaterial-v_D8QA4q.esm.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* STL file type loader.
|
|
7
|
+
* This is a babylon scene loader plugin.
|
|
8
|
+
*/
|
|
9
|
+
class STLFileLoader {
|
|
10
|
+
constructor() {
|
|
11
|
+
/** @internal */
|
|
12
|
+
this.solidPattern = /solid (\S*)([\S\s]*?)endsolid[ ]*(\S*)/g;
|
|
13
|
+
/** @internal */
|
|
14
|
+
this.facetsPattern = /facet([\s\S]*?)endfacet/g;
|
|
15
|
+
/** @internal */
|
|
16
|
+
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;
|
|
17
|
+
/** @internal */
|
|
18
|
+
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;
|
|
19
|
+
/**
|
|
20
|
+
* Defines the name of the plugin.
|
|
21
|
+
*/
|
|
22
|
+
this.name = STLFileLoaderMetadata.name;
|
|
23
|
+
/**
|
|
24
|
+
* Defines the extensions the stl loader is able to load.
|
|
25
|
+
* force data to come in as an ArrayBuffer
|
|
26
|
+
* we'll convert to string if it looks like it's an ASCII .stl
|
|
27
|
+
*/
|
|
28
|
+
this.extensions = STLFileLoaderMetadata.extensions;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Import meshes into a scene.
|
|
32
|
+
* @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
|
|
33
|
+
* @param scene The scene to import into
|
|
34
|
+
* @param data The data to import
|
|
35
|
+
* @param rootUrl The root url for scene and resources
|
|
36
|
+
* @param meshes The meshes array to import into
|
|
37
|
+
* @returns True if successful or false otherwise
|
|
38
|
+
*/
|
|
39
|
+
importMesh(meshesNames, scene, data, rootUrl, meshes) {
|
|
40
|
+
let matches;
|
|
41
|
+
if (typeof data !== "string") {
|
|
42
|
+
if (this._isBinary(data)) {
|
|
43
|
+
// binary .stl
|
|
44
|
+
const babylonMesh = new Mesh("stlmesh", scene);
|
|
45
|
+
this._parseBinary(babylonMesh, data);
|
|
46
|
+
if (meshes) {
|
|
47
|
+
meshes.push(babylonMesh);
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
// ASCII .stl
|
|
52
|
+
// convert to string
|
|
53
|
+
data = new TextDecoder().decode(new Uint8Array(data));
|
|
54
|
+
}
|
|
55
|
+
//if arrived here, data is a string, containing the STLA data.
|
|
56
|
+
while ((matches = this.solidPattern.exec(data))) {
|
|
57
|
+
let meshName = matches[1];
|
|
58
|
+
const meshNameFromEnd = matches[3];
|
|
59
|
+
if (meshNameFromEnd && meshName != meshNameFromEnd) {
|
|
60
|
+
Tools.Error("Error in STL, solid name != endsolid name");
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
// check meshesNames
|
|
64
|
+
if (meshesNames && meshName) {
|
|
65
|
+
if (meshesNames instanceof Array) {
|
|
66
|
+
if (!meshesNames.indexOf(meshName)) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
if (meshName !== meshesNames) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// stl mesh name can be empty as well
|
|
77
|
+
meshName = meshName || "stlmesh";
|
|
78
|
+
const babylonMesh = new Mesh(meshName, scene);
|
|
79
|
+
this._parseASCII(babylonMesh, matches[2]);
|
|
80
|
+
if (meshes) {
|
|
81
|
+
meshes.push(babylonMesh);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Load into a scene.
|
|
88
|
+
* @param scene The scene to load into
|
|
89
|
+
* @param data The data to import
|
|
90
|
+
* @param rootUrl The root url for scene and resources
|
|
91
|
+
* @returns true if successful or false otherwise
|
|
92
|
+
*/
|
|
93
|
+
load(scene, data, rootUrl) {
|
|
94
|
+
const result = this.importMesh(null, scene, data, rootUrl, null);
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Load into an asset container.
|
|
99
|
+
* @param scene The scene to load into
|
|
100
|
+
* @param data The data to import
|
|
101
|
+
* @param rootUrl The root url for scene and resources
|
|
102
|
+
* @returns The loaded asset container
|
|
103
|
+
*/
|
|
104
|
+
loadAssetContainer(scene, data, rootUrl) {
|
|
105
|
+
const container = new AssetContainer(scene);
|
|
106
|
+
scene._blockEntityCollection = true;
|
|
107
|
+
this.importMesh(null, scene, data, rootUrl, container.meshes);
|
|
108
|
+
scene._blockEntityCollection = false;
|
|
109
|
+
return container;
|
|
110
|
+
}
|
|
111
|
+
_isBinary(data) {
|
|
112
|
+
// check if file size is correct for binary stl
|
|
113
|
+
const reader = new DataView(data);
|
|
114
|
+
// A Binary STL header is 80 bytes, if the data size is not great than
|
|
115
|
+
// that then it's not a binary STL.
|
|
116
|
+
if (reader.byteLength <= 80) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
const faceSize = (32 / 8) * 3 + (32 / 8) * 3 * 3 + 16 / 8;
|
|
120
|
+
const nFaces = reader.getUint32(80, true);
|
|
121
|
+
if (80 + 32 / 8 + nFaces * faceSize === reader.byteLength) {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
// US-ASCII begin with 's', 'o', 'l', 'i', 'd'
|
|
125
|
+
const ascii = [115, 111, 108, 105, 100];
|
|
126
|
+
for (let off = 0; off < 5; off++) {
|
|
127
|
+
if (reader.getUint8(off) !== ascii[off]) {
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
_parseBinary(mesh, data) {
|
|
134
|
+
const reader = new DataView(data);
|
|
135
|
+
const faces = reader.getUint32(80, true);
|
|
136
|
+
const dataOffset = 84;
|
|
137
|
+
const faceLength = 12 * 4 + 2;
|
|
138
|
+
let offset = 0;
|
|
139
|
+
const positions = new Float32Array(faces * 3 * 3);
|
|
140
|
+
const normals = new Float32Array(faces * 3 * 3);
|
|
141
|
+
const indices = new Uint32Array(faces * 3);
|
|
142
|
+
let indicesCount = 0;
|
|
143
|
+
for (let face = 0; face < faces; face++) {
|
|
144
|
+
const start = dataOffset + face * faceLength;
|
|
145
|
+
const normalX = reader.getFloat32(start, true);
|
|
146
|
+
const normalY = reader.getFloat32(start + 4, true);
|
|
147
|
+
const normalZ = reader.getFloat32(start + 8, true);
|
|
148
|
+
for (let i = 1; i <= 3; i++) {
|
|
149
|
+
const vertexstart = start + i * 12;
|
|
150
|
+
// ordering is intentional to match ascii import
|
|
151
|
+
positions[offset] = reader.getFloat32(vertexstart, true);
|
|
152
|
+
normals[offset] = normalX;
|
|
153
|
+
if (!STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES) {
|
|
154
|
+
positions[offset + 2] = reader.getFloat32(vertexstart + 4, true);
|
|
155
|
+
positions[offset + 1] = reader.getFloat32(vertexstart + 8, true);
|
|
156
|
+
normals[offset + 2] = normalY;
|
|
157
|
+
normals[offset + 1] = normalZ;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
positions[offset + 1] = reader.getFloat32(vertexstart + 4, true);
|
|
161
|
+
positions[offset + 2] = reader.getFloat32(vertexstart + 8, true);
|
|
162
|
+
normals[offset + 1] = normalY;
|
|
163
|
+
normals[offset + 2] = normalZ;
|
|
164
|
+
}
|
|
165
|
+
offset += 3;
|
|
166
|
+
}
|
|
167
|
+
if (STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES) {
|
|
168
|
+
indices[indicesCount] = indicesCount;
|
|
169
|
+
indices[indicesCount + 1] = indicesCount + 2;
|
|
170
|
+
indices[indicesCount + 2] = indicesCount + 1;
|
|
171
|
+
indicesCount += 3;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
indices[indicesCount] = indicesCount++;
|
|
175
|
+
indices[indicesCount] = indicesCount++;
|
|
176
|
+
indices[indicesCount] = indicesCount++;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
mesh.setVerticesData(VertexBuffer.PositionKind, positions);
|
|
180
|
+
mesh.setVerticesData(VertexBuffer.NormalKind, normals);
|
|
181
|
+
mesh.setIndices(indices);
|
|
182
|
+
mesh.computeWorldMatrix(true);
|
|
183
|
+
}
|
|
184
|
+
_parseASCII(mesh, solidData) {
|
|
185
|
+
const positions = [];
|
|
186
|
+
const normals = [];
|
|
187
|
+
const indices = [];
|
|
188
|
+
let indicesCount = 0;
|
|
189
|
+
//load facets, ignoring loop as the standard doesn't define it can contain more than vertices
|
|
190
|
+
let matches;
|
|
191
|
+
while ((matches = this.facetsPattern.exec(solidData))) {
|
|
192
|
+
const facet = matches[1];
|
|
193
|
+
//one normal per face
|
|
194
|
+
const normalMatches = this.normalPattern.exec(facet);
|
|
195
|
+
this.normalPattern.lastIndex = 0;
|
|
196
|
+
if (!normalMatches) {
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
const normal = [Number(normalMatches[1]), Number(normalMatches[5]), Number(normalMatches[3])];
|
|
200
|
+
let vertexMatch;
|
|
201
|
+
while ((vertexMatch = this.vertexPattern.exec(facet))) {
|
|
202
|
+
if (!STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES) {
|
|
203
|
+
positions.push(Number(vertexMatch[1]), Number(vertexMatch[5]), Number(vertexMatch[3]));
|
|
204
|
+
normals.push(normal[0], normal[1], normal[2]);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
positions.push(Number(vertexMatch[1]), Number(vertexMatch[3]), Number(vertexMatch[5]));
|
|
208
|
+
// Flipping the second and third component because inverted
|
|
209
|
+
// when normal was declared.
|
|
210
|
+
normals.push(normal[0], normal[2], normal[1]);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES) {
|
|
214
|
+
indices.push(indicesCount, indicesCount + 2, indicesCount + 1);
|
|
215
|
+
indicesCount += 3;
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
indices.push(indicesCount++, indicesCount++, indicesCount++);
|
|
219
|
+
}
|
|
220
|
+
this.vertexPattern.lastIndex = 0;
|
|
221
|
+
}
|
|
222
|
+
this.facetsPattern.lastIndex = 0;
|
|
223
|
+
mesh.setVerticesData(VertexBuffer.PositionKind, positions);
|
|
224
|
+
mesh.setVerticesData(VertexBuffer.NormalKind, normals);
|
|
225
|
+
mesh.setIndices(indices);
|
|
226
|
+
mesh.computeWorldMatrix(true);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Defines if Y and Z axes are swapped or not when loading an STL file.
|
|
231
|
+
* The default is false to maintain backward compatibility. When set to
|
|
232
|
+
* true, coordinates from the STL file are used without change.
|
|
233
|
+
*/
|
|
234
|
+
STLFileLoader.DO_NOT_ALTER_FILE_COORDINATES = false;
|
|
235
|
+
registerSceneLoaderPlugin(new STLFileLoader());
|
|
236
|
+
|
|
237
|
+
export { STLFileLoader };
|
|
238
|
+
//# sourceMappingURL=stlFileLoader-LRHEIFfU.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stlFileLoader-LRHEIFfU.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,aAAa,GAAG,mJAAmJ;AAChL;AACA,QAAQ,IAAI,CAAC,aAAa,GAAG,mJAAmJ;AAChL;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC,IAAI;AAC9C;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,UAAU,GAAG,qBAAqB,CAAC,UAAU;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE;AAC1D,QAAQ,IAAI,OAAO;AACnB,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AACtC,YAAY,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE;AACtC;AACA,gBAAgB,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;AAC9D,gBAAgB,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC;AACpD,gBAAgB,IAAI,MAAM,EAAE;AAC5B,oBAAoB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;AAC5C;AACA,gBAAgB,OAAO,IAAI;AAC3B;AACA;AACA;AACA,YAAY,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,I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GAAG,CAAC;AACxC,QAAQ,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,YAAY,EAAE,SAAS,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC;AAC9D,QAAQ,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;AAChC,QAAQ,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,CAAC,6BAA6B,GAAG,KAAK;AACnD,yBAAyB,CAAC,IAAI,aAAa,EAAE,CAAC;;;;"}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { L as Logger } from './index-C6hXZyZb.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-2ekJC0En.esm.js.map
|