@babylonjs/viewer 7.40.2 → 7.40.3-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-CD6xLsCy.esm.js +84 -0
- package/dist/chunks/EXT_lights_ies-CD6xLsCy.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_ies-DS9bIHFP.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_ies-DS9bIHFP.esm.min.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-BGdZs5mF.esm.js +171 -0
- package/dist/chunks/EXT_lights_image_based-BGdZs5mF.esm.js.map +1 -0
- package/dist/chunks/EXT_lights_image_based-DJq0NJF1.esm.min.js +2 -0
- package/dist/chunks/EXT_lights_image_based-DJq0NJF1.esm.min.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-D70tpOB6.esm.js +86 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-D70tpOB6.esm.js.map +1 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DcgiYr6J.esm.min.js +2 -0
- package/dist/chunks/EXT_mesh_gpu_instancing-DcgiYr6J.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-hkW0_ox-.esm.min.js +2 -0
- package/dist/chunks/EXT_meshopt_compression-hkW0_ox-.esm.min.js.map +1 -0
- package/dist/chunks/EXT_meshopt_compression-yaTtGxec.esm.js +134 -0
- package/dist/chunks/EXT_meshopt_compression-yaTtGxec.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-Chwut1VD.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_avif-Chwut1VD.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_avif-CyxmV9wZ.esm.js +44 -0
- package/dist/chunks/EXT_texture_avif-CyxmV9wZ.esm.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-C8kKXzMe.esm.min.js +2 -0
- package/dist/chunks/EXT_texture_webp-C8kKXzMe.esm.min.js.map +1 -0
- package/dist/chunks/EXT_texture_webp-C9fxnRq1.esm.js +43 -0
- package/dist/chunks/EXT_texture_webp-C9fxnRq1.esm.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-B6-h7vlD.esm.min.js +2 -0
- package/dist/chunks/ExtrasAsMetadata-B6-h7vlD.esm.min.js.map +1 -0
- package/dist/chunks/ExtrasAsMetadata-sw0sAaoo.esm.js +64 -0
- package/dist/chunks/ExtrasAsMetadata-sw0sAaoo.esm.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-CP7-gocW.esm.min.js +2 -0
- package/dist/chunks/KHR_animation_pointer-CP7-gocW.esm.min.js.map +1 -0
- package/dist/chunks/KHR_animation_pointer-lrzgXMw2.esm.js +352 -0
- package/dist/chunks/KHR_animation_pointer-lrzgXMw2.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-6ejAggyS.esm.js +610 -0
- package/dist/chunks/KHR_draco_mesh_compression-6ejAggyS.esm.js.map +1 -0
- package/dist/chunks/KHR_draco_mesh_compression-BaG0uIFE.esm.min.js +2 -0
- package/dist/chunks/KHR_draco_mesh_compression-BaG0uIFE.esm.min.js.map +1 -0
- package/dist/chunks/KHR_interactivity-BCSmv9s-.esm.js +4033 -0
- package/dist/chunks/KHR_interactivity-BCSmv9s-.esm.js.map +1 -0
- package/dist/chunks/KHR_interactivity-BwG2kMjm.esm.min.js +2 -0
- package/dist/chunks/KHR_interactivity-BwG2kMjm.esm.min.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-BmAkLiea.esm.js +581 -0
- package/dist/chunks/KHR_lights_punctual-BmAkLiea.esm.js.map +1 -0
- package/dist/chunks/KHR_lights_punctual-D1dtMznV.esm.min.js +2 -0
- package/dist/chunks/KHR_lights_punctual-D1dtMznV.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-CRJDUZsx.esm.js +65 -0
- package/dist/chunks/KHR_materials_anisotropy-CRJDUZsx.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_anisotropy-Dp1pJfRB.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_anisotropy-Dp1pJfRB.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-BD3XLdt2.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_clearcoat-BD3XLdt2.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_clearcoat-DJKj9xQP.esm.js +96 -0
- package/dist/chunks/KHR_materials_clearcoat-DJKj9xQP.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-BYYyEZrB.esm.js +97 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-BYYyEZrB.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DhA5fNkp.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_diffuse_transmission-DhA5fNkp.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-CDCigqMd.esm.js +62 -0
- package/dist/chunks/KHR_materials_dispersion-CDCigqMd.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_dispersion-CzJ-kzY0.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_dispersion-CzJ-kzY0.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-C727hCIO.esm.js +55 -0
- package/dist/chunks/KHR_materials_emissive_strength-C727hCIO.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_emissive_strength-DHmw-T7v.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_emissive_strength-DHmw-T7v.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-CUkwwamZ.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_ior-CUkwwamZ.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_ior-arU1qfpr.esm.js +64 -0
- package/dist/chunks/KHR_materials_ior-arU1qfpr.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-BDFcEA9b.esm.js +72 -0
- package/dist/chunks/KHR_materials_iridescence-BDFcEA9b.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_iridescence-Dv1MtidF.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_iridescence-Dv1MtidF.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-IoDqngfZ.esm.js +81 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-IoDqngfZ.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-r32OVvwD.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-r32OVvwD.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-BBwukNo5.esm.js +85 -0
- package/dist/chunks/KHR_materials_sheen-BBwukNo5.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_sheen-upfKannz.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_sheen-upfKannz.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-CLFluGSg.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_specular-CLFluGSg.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_specular-CRQL_z4b.esm.js +75 -0
- package/dist/chunks/KHR_materials_specular-CRQL_z4b.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-6oV0DB3N.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_transmission-6oV0DB3N.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_transmission-x9Lwa871.esm.js +307 -0
- package/dist/chunks/KHR_materials_transmission-x9Lwa871.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-B_foF8Lt.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_unlit-B_foF8Lt.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_unlit-CDGuKJjb.esm.js +74 -0
- package/dist/chunks/KHR_materials_unlit-CDGuKJjb.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-DANx-_Mx.esm.js +262 -0
- package/dist/chunks/KHR_materials_variants-DANx-_Mx.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_variants-DL4EGGiE.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_variants-DL4EGGiE.esm.min.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-Dlquu8Y2.esm.js +87 -0
- package/dist/chunks/KHR_materials_volume-Dlquu8Y2.esm.js.map +1 -0
- package/dist/chunks/KHR_materials_volume-LVeMDkB_.esm.min.js +2 -0
- package/dist/chunks/KHR_materials_volume-LVeMDkB_.esm.min.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-C1w2vzgz.esm.js +26 -0
- package/dist/chunks/KHR_mesh_quantization-C1w2vzgz.esm.js.map +1 -0
- package/dist/chunks/KHR_mesh_quantization-DfOGHc4g.esm.min.js +2 -0
- package/dist/chunks/KHR_mesh_quantization-DfOGHc4g.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-BxU_AIs6.esm.min.js +2 -0
- package/dist/chunks/KHR_node_hoverability-BxU_AIs6.esm.min.js.map +1 -0
- package/dist/chunks/KHR_node_hoverability-DODhQaXP.esm.js +39 -0
- package/dist/chunks/KHR_node_hoverability-DODhQaXP.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-3haIZvsb.esm.js +46 -0
- package/dist/chunks/KHR_node_visibility-3haIZvsb.esm.js.map +1 -0
- package/dist/chunks/KHR_node_visibility-DDRTTQ-U.esm.min.js +2 -0
- package/dist/chunks/KHR_node_visibility-DDRTTQ-U.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-CEPiCdOn.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_basisu-CEPiCdOn.esm.min.js.map +1 -0
- package/dist/chunks/KHR_texture_basisu-gXsppVcQ.esm.js +43 -0
- package/dist/chunks/KHR_texture_basisu-gXsppVcQ.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-Bjux7yCy.esm.js +63 -0
- package/dist/chunks/KHR_texture_transform-Bjux7yCy.esm.js.map +1 -0
- package/dist/chunks/KHR_texture_transform-_PXwFDP8.esm.min.js +2 -0
- package/dist/chunks/KHR_texture_transform-_PXwFDP8.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-DpaeEUGt.esm.min.js +2 -0
- package/dist/chunks/KHR_xmp_json_ld-DpaeEUGt.esm.min.js.map +1 -0
- package/dist/chunks/KHR_xmp_json_ld-DyzNphyu.esm.js +51 -0
- package/dist/chunks/KHR_xmp_json_ld-DyzNphyu.esm.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-BGoxaF5U.esm.min.js +2 -0
- package/dist/chunks/MSFT_audio_emitter-BGoxaF5U.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_audio_emitter-DEE5n41V.esm.js +2207 -0
- package/dist/chunks/MSFT_audio_emitter-DEE5n41V.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-D-_-eQHW.esm.js +337 -0
- package/dist/chunks/MSFT_lod-D-_-eQHW.esm.js.map +1 -0
- package/dist/chunks/MSFT_lod-XoRI0gWX.esm.min.js +2 -0
- package/dist/chunks/MSFT_lod-XoRI0gWX.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-DO_tijSD.esm.js +46 -0
- package/dist/chunks/MSFT_minecraftMesh-DO_tijSD.esm.js.map +1 -0
- package/dist/chunks/MSFT_minecraftMesh-_iQvjiZi.esm.min.js +2 -0
- package/dist/chunks/MSFT_minecraftMesh-_iQvjiZi.esm.min.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-BLHF-pts.esm.js +47 -0
- package/dist/chunks/MSFT_sRGBFactors-BLHF-pts.esm.js.map +1 -0
- package/dist/chunks/MSFT_sRGBFactors-BTokzGgG.esm.min.js +2 -0
- package/dist/chunks/MSFT_sRGBFactors-BTokzGgG.esm.min.js.map +1 -0
- package/dist/chunks/animationGroup-BPxpoNna.esm.js +2482 -0
- package/dist/chunks/animationGroup-BPxpoNna.esm.js.map +1 -0
- package/dist/chunks/animationGroup-TpjYesJi.esm.min.js +2 -0
- package/dist/chunks/animationGroup-TpjYesJi.esm.min.js.map +1 -0
- package/dist/chunks/assetContainer-C11e8jK9.esm.js +1720 -0
- package/dist/chunks/assetContainer-C11e8jK9.esm.js.map +1 -0
- package/dist/chunks/assetContainer-DN0guS4J.esm.min.js +2 -0
- package/dist/chunks/assetContainer-DN0guS4J.esm.min.js.map +1 -0
- package/dist/chunks/audioEngine-BPCDLqX1.esm.js +305 -0
- package/dist/chunks/audioEngine-BPCDLqX1.esm.js.map +1 -0
- package/dist/chunks/audioEngine-jDnUlloH.esm.min.js +2 -0
- package/dist/chunks/audioEngine-jDnUlloH.esm.min.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-Cz6yjm9Z.esm.js +114 -0
- package/dist/chunks/bakedVertexAnimation-Cz6yjm9Z.esm.js.map +1 -0
- package/dist/chunks/bakedVertexAnimation-QOLg75eL.esm.min.js +2 -0
- package/dist/chunks/bakedVertexAnimation-QOLg75eL.esm.min.js.map +1 -0
- package/dist/chunks/basisTextureLoader-BoGBC9bq.esm.js +600 -0
- package/dist/chunks/basisTextureLoader-BoGBC9bq.esm.js.map +1 -0
- package/dist/chunks/basisTextureLoader-D6orCmzb.esm.min.js +2 -0
- package/dist/chunks/basisTextureLoader-D6orCmzb.esm.min.js.map +1 -0
- package/dist/chunks/dds-DPGLfLtA.esm.js +540 -0
- package/dist/chunks/dds-DPGLfLtA.esm.js.map +1 -0
- package/dist/chunks/dds-ty-4gLsX.esm.min.js +2 -0
- package/dist/chunks/dds-ty-4gLsX.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-BCk_i6Vj.esm.min.js +2 -0
- package/dist/chunks/ddsTextureLoader-BCk_i6Vj.esm.min.js.map +1 -0
- package/dist/chunks/ddsTextureLoader-DVbQnnL_.esm.js +88 -0
- package/dist/chunks/ddsTextureLoader-DVbQnnL_.esm.js.map +1 -0
- package/dist/chunks/decalFragment-BiywWcVN.esm.js +18 -0
- package/dist/chunks/decalFragment-BiywWcVN.esm.js.map +1 -0
- package/dist/chunks/decalFragment-D06mgECc.esm.min.js +2 -0
- package/dist/chunks/decalFragment-D06mgECc.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-B_HQTa4-.esm.min.js +2 -0
- package/dist/chunks/default.fragment-B_HQTa4-.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-BiTyj-JR.esm.min.js +2 -0
- package/dist/chunks/default.fragment-BiTyj-JR.esm.min.js.map +1 -0
- package/dist/chunks/default.fragment-DPPypY0M.esm.js +515 -0
- package/dist/chunks/default.fragment-DPPypY0M.esm.js.map +1 -0
- package/dist/chunks/default.fragment-Yh18209a.esm.js +446 -0
- package/dist/chunks/default.fragment-Yh18209a.esm.js.map +1 -0
- package/dist/chunks/default.vertex-BGoXgJxH.esm.min.js +2 -0
- package/dist/chunks/default.vertex-BGoXgJxH.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-CHD4PKUY.esm.min.js +2 -0
- package/dist/chunks/default.vertex-CHD4PKUY.esm.min.js.map +1 -0
- package/dist/chunks/default.vertex-L7AngZxY.esm.js +211 -0
- package/dist/chunks/default.vertex-L7AngZxY.esm.js.map +1 -0
- package/dist/chunks/default.vertex-bWGrH88y.esm.js +190 -0
- package/dist/chunks/default.vertex-bWGrH88y.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-C1wAUiUE.esm.js +15 -0
- package/dist/chunks/defaultUboDeclaration-C1wAUiUE.esm.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-Cui4ai4R.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-Cui4ai4R.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DQrGGmYB.esm.min.js +2 -0
- package/dist/chunks/defaultUboDeclaration-DQrGGmYB.esm.min.js.map +1 -0
- package/dist/chunks/defaultUboDeclaration-DwKq3ipu.esm.js +13 -0
- package/dist/chunks/defaultUboDeclaration-DwKq3ipu.esm.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +11 -0
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +1 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +2 -0
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +1 -0
- package/dist/chunks/dumpTools-CK6KW8rD.esm.js +200 -0
- package/dist/chunks/dumpTools-CK6KW8rD.esm.js.map +1 -0
- package/dist/chunks/dumpTools-DtuBR0TB.esm.min.js +2 -0
- package/dist/chunks/dumpTools-DtuBR0TB.esm.min.js.map +1 -0
- package/dist/chunks/engine-CjwHJJ_I.esm.js +2216 -0
- package/dist/chunks/engine-CjwHJJ_I.esm.js.map +1 -0
- package/dist/chunks/engine-DDdcZyBr.esm.min.js +2 -0
- package/dist/chunks/engine-DDdcZyBr.esm.min.js.map +1 -0
- package/dist/chunks/engine.common-9BWDtT2M.esm.js +1162 -0
- package/dist/chunks/engine.common-9BWDtT2M.esm.js.map +1 -0
- package/dist/chunks/engine.common-B3oiG-PJ.esm.min.js +2 -0
- package/dist/chunks/engine.common-B3oiG-PJ.esm.min.js.map +1 -0
- package/dist/chunks/envTextureLoader-B2kcZ0TS.esm.js +64 -0
- package/dist/chunks/envTextureLoader-B2kcZ0TS.esm.js.map +1 -0
- package/dist/chunks/envTextureLoader-BJ0RU-N0.esm.min.js +2 -0
- package/dist/chunks/envTextureLoader-BJ0RU-N0.esm.min.js.map +1 -0
- package/dist/chunks/environmentTextureTools-BDDKxUKH.esm.js +382 -0
- package/dist/chunks/environmentTextureTools-BDDKxUKH.esm.js.map +1 -0
- package/dist/chunks/environmentTextureTools-BuVOE0iE.esm.min.js +2 -0
- package/dist/chunks/environmentTextureTools-BuVOE0iE.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-ByEbgBJq.esm.min.js +2 -0
- package/dist/chunks/exrTextureLoader-ByEbgBJq.esm.min.js.map +1 -0
- package/dist/chunks/exrTextureLoader-CVJEgA3V.esm.js +1683 -0
- package/dist/chunks/exrTextureLoader-CVJEgA3V.esm.js.map +1 -0
- package/dist/chunks/fogFragment-BCI6G-ZP.esm.min.js +2 -0
- package/dist/chunks/fogFragment-BCI6G-ZP.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-DWRmb1tG.esm.min.js +2 -0
- package/dist/chunks/fogFragment-DWRmb1tG.esm.min.js.map +1 -0
- package/dist/chunks/fogFragment-Dmcif2rs.esm.js +102 -0
- package/dist/chunks/fogFragment-Dmcif2rs.esm.js.map +1 -0
- package/dist/chunks/fogFragment-K4UslW3k.esm.js +101 -0
- package/dist/chunks/fogFragment-K4UslW3k.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-Byr-DptL.esm.js +12 -0
- package/dist/chunks/fresnelFunction-Byr-DptL.esm.js.map +1 -0
- package/dist/chunks/fresnelFunction-nqy6Uoot.esm.min.js +2 -0
- package/dist/chunks/fresnelFunction-nqy6Uoot.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-BNHy6PGg.esm.min.js +2 -0
- package/dist/chunks/glTFLoader-BNHy6PGg.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoader-Bt4XTOHj.esm.js +7658 -0
- package/dist/chunks/glTFLoader-Bt4XTOHj.esm.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-C7bRnMuQ.esm.min.js +2 -0
- package/dist/chunks/glTFLoaderAnimation-C7bRnMuQ.esm.min.js.map +1 -0
- package/dist/chunks/glTFLoaderAnimation-wzgl1G3Q.esm.js +77 -0
- package/dist/chunks/glTFLoaderAnimation-wzgl1G3Q.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-CJK-zUAx.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-CJK-zUAx.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-Cc4Kn69U.esm.js +35 -0
- package/dist/chunks/harmonicsFunctions-Cc4Kn69U.esm.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-D_T4jAii.esm.min.js +2 -0
- package/dist/chunks/harmonicsFunctions-D_T4jAii.esm.min.js.map +1 -0
- package/dist/chunks/harmonicsFunctions-KLqvdh60.esm.js +34 -0
- package/dist/chunks/harmonicsFunctions-KLqvdh60.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-C6Df--L1.esm.js +253 -0
- package/dist/chunks/hdrTextureLoader-C6Df--L1.esm.js.map +1 -0
- package/dist/chunks/hdrTextureLoader-CsfShnoX.esm.min.js +2 -0
- package/dist/chunks/hdrTextureLoader-CsfShnoX.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-DDGAItWp.esm.js +80 -0
- package/dist/chunks/helperFunctions-DDGAItWp.esm.js.map +1 -0
- package/dist/chunks/helperFunctions-DR_I6MXm.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-DR_I6MXm.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-DciHbMbJ.esm.min.js +2 -0
- package/dist/chunks/helperFunctions-DciHbMbJ.esm.min.js.map +1 -0
- package/dist/chunks/helperFunctions-Dp1Kzl1o.esm.js +108 -0
- package/dist/chunks/helperFunctions-Dp1Kzl1o.esm.js.map +1 -0
- package/dist/chunks/iesTextureLoader-6OJu6Vq2.esm.min.js +2 -0
- package/dist/chunks/iesTextureLoader-6OJu6Vq2.esm.min.js.map +1 -0
- package/dist/chunks/iesTextureLoader-Bm570oWa.esm.js +189 -0
- package/dist/chunks/iesTextureLoader-Bm570oWa.esm.js.map +1 -0
- package/dist/chunks/index-B6sqDOGz.esm.js +74825 -0
- package/dist/chunks/index-B6sqDOGz.esm.js.map +1 -0
- package/dist/chunks/index-D3BVnHHq.esm.min.js +57 -0
- package/dist/chunks/index-D3BVnHHq.esm.min.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-Bqe5q1rf.esm.js +814 -0
- package/dist/chunks/ktxTextureLoader-Bqe5q1rf.esm.js.map +1 -0
- package/dist/chunks/ktxTextureLoader-CYGltN4N.esm.min.js +2 -0
- package/dist/chunks/ktxTextureLoader-CYGltN4N.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-5ljdm3vC.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-5ljdm3vC.esm.min.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BAi1U8tp.esm.js +35 -0
- package/dist/chunks/logDepthDeclaration-BAi1U8tp.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-BhyTMFMU.esm.js +11 -0
- package/dist/chunks/logDepthDeclaration-BhyTMFMU.esm.js.map +1 -0
- package/dist/chunks/logDepthDeclaration-TpKbhGMf.esm.min.js +2 -0
- package/dist/chunks/logDepthDeclaration-TpKbhGMf.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-CAe41JFY.esm.js +77 -0
- package/dist/chunks/logDepthVertex-CAe41JFY.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-DSb3D1Hm.esm.js +81 -0
- package/dist/chunks/logDepthVertex-DSb3D1Hm.esm.js.map +1 -0
- package/dist/chunks/logDepthVertex-I7P1jvLX.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-I7P1jvLX.esm.min.js.map +1 -0
- package/dist/chunks/logDepthVertex-JJkSRL9W.esm.min.js +2 -0
- package/dist/chunks/logDepthVertex-JJkSRL9W.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-BOsqkSBn.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-BOsqkSBn.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CInC18r7.esm.js +11 -0
- package/dist/chunks/mainUVVaryingDeclaration-CInC18r7.esm.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-CS3E9EgB.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-CS3E9EgB.esm.min.js.map +1 -0
- package/dist/chunks/mainUVVaryingDeclaration-ChM_7YDH.esm.min.js +2 -0
- package/dist/chunks/mainUVVaryingDeclaration-ChM_7YDH.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-BJzygYVf.esm.min.js +2 -0
- package/dist/chunks/meshUboDeclaration-BJzygYVf.esm.min.js.map +1 -0
- package/dist/chunks/meshUboDeclaration-DM7Knmm0.esm.js +26 -0
- package/dist/chunks/meshUboDeclaration-DM7Knmm0.esm.js.map +1 -0
- package/dist/chunks/objFileLoader-DXh6dEqA.esm.min.js +2 -0
- package/dist/chunks/objFileLoader-DXh6dEqA.esm.min.js.map +1 -0
- package/dist/chunks/objFileLoader-DzxFwUIY.esm.js +1338 -0
- package/dist/chunks/objFileLoader-DzxFwUIY.esm.js.map +1 -0
- package/dist/chunks/oitFragment-C2V-9s6u.esm.min.js +2 -0
- package/dist/chunks/oitFragment-C2V-9s6u.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-DOPwpc5v.esm.js +1240 -0
- package/dist/chunks/oitFragment-DOPwpc5v.esm.js.map +1 -0
- package/dist/chunks/oitFragment-kS5s81PF.esm.min.js +2 -0
- package/dist/chunks/oitFragment-kS5s81PF.esm.min.js.map +1 -0
- package/dist/chunks/oitFragment-yAzK8PUt.esm.js +1078 -0
- package/dist/chunks/oitFragment-yAzK8PUt.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-5ocLOmrf.esm.js +15 -0
- package/dist/chunks/pass.fragment-5ocLOmrf.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-BN-f4kEG.esm.js +15 -0
- package/dist/chunks/pass.fragment-BN-f4kEG.esm.js.map +1 -0
- package/dist/chunks/pass.fragment-CE2yo34Z.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-CE2yo34Z.esm.min.js.map +1 -0
- package/dist/chunks/pass.fragment-O74A4S0m.esm.min.js +2 -0
- package/dist/chunks/pass.fragment-O74A4S0m.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-AC22HTP0.esm.js +3273 -0
- package/dist/chunks/pbr.fragment-AC22HTP0.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-BsRPu6hA.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-BsRPu6hA.esm.min.js.map +1 -0
- package/dist/chunks/pbr.fragment-Dxb2AuuM.esm.js +3232 -0
- package/dist/chunks/pbr.fragment-Dxb2AuuM.esm.js.map +1 -0
- package/dist/chunks/pbr.fragment-Jz2EDvVc.esm.min.js +2 -0
- package/dist/chunks/pbr.fragment-Jz2EDvVc.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-BkRM-a3D.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-BkRM-a3D.esm.min.js.map +1 -0
- package/dist/chunks/pbr.vertex-DC-IeqOc.esm.js +348 -0
- package/dist/chunks/pbr.vertex-DC-IeqOc.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-DFq751_7.esm.js +223 -0
- package/dist/chunks/pbr.vertex-DFq751_7.esm.js.map +1 -0
- package/dist/chunks/pbr.vertex-NaenLCtj.esm.min.js +2 -0
- package/dist/chunks/pbr.vertex-NaenLCtj.esm.min.js.map +1 -0
- package/dist/chunks/postprocess.vertex-CCzNHvuk.esm.js +20 -0
- package/dist/chunks/postprocess.vertex-CCzNHvuk.esm.js.map +1 -0
- package/dist/chunks/postprocess.vertex-Mo0vpVxw.esm.min.js +2 -0
- package/dist/chunks/postprocess.vertex-Mo0vpVxw.esm.min.js.map +1 -0
- package/dist/chunks/rawTexture-DsvWY4wf.esm.js +191 -0
- package/dist/chunks/rawTexture-DsvWY4wf.esm.js.map +1 -0
- package/dist/chunks/rawTexture-Ub3t-s7i.esm.min.js +2 -0
- package/dist/chunks/rawTexture-Ub3t-s7i.esm.min.js.map +1 -0
- package/dist/chunks/ray-BRtIhzin.esm.min.js +2 -0
- package/dist/chunks/ray-BRtIhzin.esm.min.js.map +1 -0
- package/dist/chunks/ray-DGNoxqma.esm.js +946 -0
- package/dist/chunks/ray-DGNoxqma.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CZhZbezW.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-CZhZbezW.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-CgKBbbD1.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-CgKBbbD1.esm.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-LHNdHf3k.esm.min.js +2 -0
- package/dist/chunks/rgbdDecode.fragment-LHNdHf3k.esm.min.js.map +1 -0
- package/dist/chunks/rgbdDecode.fragment-fiTenc35.esm.js +13 -0
- package/dist/chunks/rgbdDecode.fragment-fiTenc35.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-9S80Pwpo.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-9S80Pwpo.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-BqEeZloN.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-BqEeZloN.esm.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-DNHQ71A7.esm.min.js +2 -0
- package/dist/chunks/rgbdEncode.fragment-DNHQ71A7.esm.min.js.map +1 -0
- package/dist/chunks/rgbdEncode.fragment-Opuv8m2e.esm.js +13 -0
- package/dist/chunks/rgbdEncode.fragment-Opuv8m2e.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-ZYsB_KqH.esm.js +3379 -0
- package/dist/chunks/splatFileLoader-ZYsB_KqH.esm.js.map +1 -0
- package/dist/chunks/splatFileLoader-vkPYxHIT.esm.min.js +2 -0
- package/dist/chunks/splatFileLoader-vkPYxHIT.esm.min.js.map +1 -0
- package/dist/chunks/spotLight-BlYHhPZ5.esm.js +701 -0
- package/dist/chunks/spotLight-BlYHhPZ5.esm.js.map +1 -0
- package/dist/chunks/spotLight-CbgIfMbz.esm.min.js +2 -0
- package/dist/chunks/spotLight-CbgIfMbz.esm.min.js.map +1 -0
- package/dist/chunks/standardMaterial-2SzHzTgX.esm.js +1806 -0
- package/dist/chunks/standardMaterial-2SzHzTgX.esm.js.map +1 -0
- package/dist/chunks/standardMaterial-BuAbZl_Z.esm.min.js +2 -0
- package/dist/chunks/standardMaterial-BuAbZl_Z.esm.min.js.map +1 -0
- package/dist/chunks/stlFileLoader-5Kq215Ci.esm.js +238 -0
- package/dist/chunks/stlFileLoader-5Kq215Ci.esm.js.map +1 -0
- package/dist/chunks/stlFileLoader-wv5ATvZu.esm.min.js +2 -0
- package/dist/chunks/stlFileLoader-wv5ATvZu.esm.min.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-DWICU4Mc.esm.js +349 -0
- package/dist/chunks/tgaTextureLoader-DWICU4Mc.esm.js.map +1 -0
- package/dist/chunks/tgaTextureLoader-bJsNfJzG.esm.min.js +2 -0
- package/dist/chunks/tgaTextureLoader-bJsNfJzG.esm.min.js.map +1 -0
- package/dist/chunks/thinEngine-BeWECwt6.esm.js +3848 -0
- package/dist/chunks/thinEngine-BeWECwt6.esm.js.map +1 -0
- package/dist/chunks/thinEngine-DFwbHE_G.esm.min.js +2 -0
- package/dist/chunks/thinEngine-DFwbHE_G.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-B1pIcpZJ.esm.min.js +2 -0
- package/dist/chunks/thinInstanceMesh-B1pIcpZJ.esm.min.js.map +1 -0
- package/dist/chunks/thinInstanceMesh-CwRJpzmW.esm.js +314 -0
- package/dist/chunks/thinInstanceMesh-CwRJpzmW.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-BKr2fbgc.esm.js +531 -0
- package/dist/chunks/vertexColorMixing-BKr2fbgc.esm.js.map +1 -0
- package/dist/chunks/vertexColorMixing-BygjAnHj.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-BygjAnHj.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-HfObYyiq.esm.min.js +2 -0
- package/dist/chunks/vertexColorMixing-HfObYyiq.esm.min.js.map +1 -0
- package/dist/chunks/vertexColorMixing-_UoBUkRQ.esm.js +421 -0
- package/dist/chunks/vertexColorMixing-_UoBUkRQ.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-BPO8q4wr.esm.js +11533 -0
- package/dist/chunks/webgpuEngine-BPO8q4wr.esm.js.map +1 -0
- package/dist/chunks/webgpuEngine-DvdhZwbl.esm.min.js +2 -0
- package/dist/chunks/webgpuEngine-DvdhZwbl.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 +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,2 @@
|
|
|
1
|
+
import{i as e}from"./index-D3BVnHHq.esm.min.js";import"./vertexColorMixing-HfObYyiq.esm.min.js";import"./harmonicsFunctions-CJK-zUAx.esm.min.js";import"./mainUVVaryingDeclaration-ChM_7YDH.esm.min.js";import"./helperFunctions-DR_I6MXm.esm.min.js";import"./logDepthVertex-JJkSRL9W.esm.min.js";import"./logDepthDeclaration-TpKbhGMf.esm.min.js";e.IncludesShadersStore.pbrVertexDeclaration="uniform mat4 view;uniform mat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif \n#ifdef ALBEDO\nuniform mat4 albedoMatrix;uniform vec2 vAlbedoInfos;\n#endif\n#ifdef AMBIENT\nuniform mat4 ambientMatrix;uniform vec4 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform mat4 opacityMatrix;uniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;uniform mat4 emissiveMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;uniform mat4 lightmapMatrix;\n#endif\n#ifdef REFLECTIVITY \nuniform vec3 vReflectivityInfos;uniform mat4 reflectivityMatrix;\n#endif\n#ifdef METALLIC_REFLECTANCE\nuniform vec2 vMetallicReflectanceInfos;uniform mat4 metallicReflectanceMatrix;\n#endif\n#ifdef REFLECTANCE\nuniform vec2 vReflectanceInfos;uniform mat4 reflectanceMatrix;\n#endif\n#ifdef MICROSURFACEMAP\nuniform vec2 vMicroSurfaceSamplerInfos;uniform mat4 microSurfaceSamplerMatrix;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;uniform mat4 bumpMatrix;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;\n#endif\n#ifdef CLEARCOAT\n#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS)\nuniform vec4 vClearCoatInfos;\n#endif\n#ifdef CLEARCOAT_TEXTURE\nuniform mat4 clearCoatMatrix;\n#endif\n#ifdef CLEARCOAT_TEXTURE_ROUGHNESS\nuniform mat4 clearCoatRoughnessMatrix;\n#endif\n#ifdef CLEARCOAT_BUMP\nuniform vec2 vClearCoatBumpInfos;uniform mat4 clearCoatBumpMatrix;\n#endif\n#ifdef CLEARCOAT_TINT_TEXTURE\nuniform vec2 vClearCoatTintInfos;uniform mat4 clearCoatTintMatrix;\n#endif\n#endif\n#ifdef IRIDESCENCE\n#if defined(IRIDESCENCE_TEXTURE) || defined(IRIDESCENCE_THICKNESS_TEXTURE)\nuniform vec4 vIridescenceInfos;\n#endif\n#ifdef IRIDESCENCE_TEXTURE\nuniform mat4 iridescenceMatrix;\n#endif\n#ifdef IRIDESCENCE_THICKNESS_TEXTURE\nuniform mat4 iridescenceThicknessMatrix;\n#endif\n#endif\n#ifdef ANISOTROPIC\n#ifdef ANISOTROPIC_TEXTURE\nuniform vec2 vAnisotropyInfos;uniform mat4 anisotropyMatrix;\n#endif\n#endif\n#ifdef SHEEN\n#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS)\nuniform vec4 vSheenInfos;\n#endif\n#ifdef SHEEN_TEXTURE\nuniform mat4 sheenMatrix;\n#endif\n#ifdef SHEEN_TEXTURE_ROUGHNESS\nuniform mat4 sheenRoughnessMatrix;\n#endif\n#endif\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nuniform vec4 vRefractionInfos;uniform mat4 refractionMatrix;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nuniform vec2 vThicknessInfos;uniform mat4 thicknessMatrix;\n#endif\n#ifdef SS_REFRACTIONINTENSITY_TEXTURE\nuniform vec2 vRefractionIntensityInfos;uniform mat4 refractionIntensityMatrix;\n#endif\n#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE\nuniform vec2 vTranslucencyIntensityInfos;uniform mat4 translucencyIntensityMatrix;\n#endif\n#ifdef SS_TRANSLUCENCYCOLOR_TEXTURE\nuniform vec2 vTranslucencyColorInfos;uniform mat4 translucencyColorMatrix;\n#endif\n#endif\n#ifdef NORMAL\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nuniform vec3 vSphericalL00;uniform vec3 vSphericalL1_1;uniform vec3 vSphericalL10;uniform vec3 vSphericalL11;uniform vec3 vSphericalL2_2;uniform vec3 vSphericalL2_1;uniform vec3 vSphericalL20;uniform vec3 vSphericalL21;uniform vec3 vSphericalL22;\n#else\nuniform vec3 vSphericalX;uniform vec3 vSphericalY;uniform vec3 vSphericalZ;uniform vec3 vSphericalXX_ZZ;uniform vec3 vSphericalYY_ZZ;uniform vec3 vSphericalZZ;uniform vec3 vSphericalXY;uniform vec3 vSphericalYZ;uniform vec3 vSphericalZX;\n#endif\n#endif\n#endif\n#endif\n#ifdef DETAIL\nuniform vec4 vDetailInfos;uniform mat4 detailMatrix;\n#endif\n#include<decalVertexDeclaration>\n#define ADDITIONAL_VERTEX_DECLARATION\n";const n="pbrVertexShader",i="#define CUSTOM_VERTEX_EXTENSION\nprecision highp float;\n#include<__decl__pbrVertex>\n#define CUSTOM_VERTEX_BEGIN\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#include<uvAttributeDeclaration>[2..7]\n#include<mainUVVaryingDeclaration>[1..7]\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<helperFunctions>\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\n#include<prePassVertexDeclaration>\n#include<samplerVertexDeclaration>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)\n#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)\n#include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)\n#include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)\n#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler)\n#include<samplerVertexDeclaration>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance)\n#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance)\n#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)\n#ifdef CLEARCOAT\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint)\n#endif\n#ifdef IRIDESCENCE\n#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence)\n#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness)\n#endif\n#ifdef SHEEN\n#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)\n#endif\n#ifdef ANISOTROPIC\n#include<samplerVertexDeclaration>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy)\n#endif\n#ifdef SUBSURFACE\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor)\n#endif\nvarying vec3 vPositionW;\n#if DEBUGMODE>0\nvarying vec4 vClipSpacePosition;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#include<harmonicsFunctions>\n#endif\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#include<bumpVertexDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#ifdef UV2\nvec2 uv2Updated=uv2;\n#endif\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=positionUpdated;\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include<instancesVertex>\n#if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);vPositionW=vec3(worldPos);\n#ifdef PREPASS\n#include<prePassVertex>\n#endif\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vNormalW=normalize(normalWorld*vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\nvEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_WORLDPOS\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\n#if DEBUGMODE>0\nvClipSpacePosition=gl_Position;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n#ifndef UV1\nvec2 uvUpdated=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2Updated=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uvUpdated;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2Updated;\n#endif\n#include<uvVariableDeclaration>[3..7]\n#include<samplerVertexImplementation>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo,_MATRIXNAME_,albedo,_INFONAME_,AlbedoInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity,_MATRIXNAME_,reflectivity,_INFONAME_,ReflectivityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler,_MATRIXNAME_,microSurfaceSampler,_INFONAME_,MicroSurfaceSamplerInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance,_MATRIXNAME_,metallicReflectance,_INFONAME_,MetallicReflectanceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance,_MATRIXNAME_,reflectance,_INFONAME_,ReflectanceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)\n#ifdef CLEARCOAT\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat,_MATRIXNAME_,clearCoat,_INFONAME_,ClearCoatInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness,_MATRIXNAME_,clearCoatRoughness,_INFONAME_,ClearCoatInfos.z)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump,_MATRIXNAME_,clearCoatBump,_INFONAME_,ClearCoatBumpInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint,_MATRIXNAME_,clearCoatTint,_INFONAME_,ClearCoatTintInfos.x)\n#endif\n#ifdef IRIDESCENCE\n#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence,_MATRIXNAME_,iridescence,_INFONAME_,IridescenceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness,_MATRIXNAME_,iridescenceThickness,_INFONAME_,IridescenceInfos.z)\n#endif\n#ifdef SHEEN\n#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen,_MATRIXNAME_,sheen,_INFONAME_,SheenInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness,_MATRIXNAME_,sheenRoughness,_INFONAME_,SheenInfos.z)\n#endif\n#ifdef ANISOTROPIC\n#include<samplerVertexImplementation>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy,_MATRIXNAME_,anisotropy,_INFONAME_,AnisotropyInfos.x)\n#endif\n#ifdef SUBSURFACE\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness,_MATRIXNAME_,thickness,_INFONAME_,ThicknessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity,_MATRIXNAME_,refractionIntensity,_INFONAME_,RefractionIntensityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity,_MATRIXNAME_,translucencyIntensity,_INFONAME_,TranslucencyIntensityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor,_MATRIXNAME_,translucencyColor,_INFONAME_,TranslucencyColorInfos.x)\n#endif\n#include<bumpVertex>\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}";e.ShadersStore[n]=i;const E={name:n,shader:i};export{E as pbrVertexShader};
|
|
2
|
+
//# sourceMappingURL=pbr.vertex-NaenLCtj.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pbr.vertex-NaenLCtj.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/ShadersInclude/pbrVertexDeclaration.js","../../../../../dev/core/dist/Shaders/pbr.vertex.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../../Engines/shaderStore\";\nimport \"./decalVertexDeclaration\";\nconst name = \"pbrVertexDeclaration\";\nconst shader = `uniform mat4 view;uniform mat4 viewProjection;\n#ifdef MULTIVIEW\nmat4 viewProjectionR;\n#endif \n#ifdef ALBEDO\nuniform mat4 albedoMatrix;uniform vec2 vAlbedoInfos;\n#endif\n#ifdef AMBIENT\nuniform mat4 ambientMatrix;uniform vec4 vAmbientInfos;\n#endif\n#ifdef OPACITY\nuniform mat4 opacityMatrix;uniform vec2 vOpacityInfos;\n#endif\n#ifdef EMISSIVE\nuniform vec2 vEmissiveInfos;uniform mat4 emissiveMatrix;\n#endif\n#ifdef LIGHTMAP\nuniform vec2 vLightmapInfos;uniform mat4 lightmapMatrix;\n#endif\n#ifdef REFLECTIVITY \nuniform vec3 vReflectivityInfos;uniform mat4 reflectivityMatrix;\n#endif\n#ifdef METALLIC_REFLECTANCE\nuniform vec2 vMetallicReflectanceInfos;uniform mat4 metallicReflectanceMatrix;\n#endif\n#ifdef REFLECTANCE\nuniform vec2 vReflectanceInfos;uniform mat4 reflectanceMatrix;\n#endif\n#ifdef MICROSURFACEMAP\nuniform vec2 vMicroSurfaceSamplerInfos;uniform mat4 microSurfaceSamplerMatrix;\n#endif\n#ifdef BUMP\nuniform vec3 vBumpInfos;uniform mat4 bumpMatrix;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\n#ifdef REFLECTION\nuniform vec2 vReflectionInfos;uniform mat4 reflectionMatrix;\n#endif\n#ifdef CLEARCOAT\n#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS)\nuniform vec4 vClearCoatInfos;\n#endif\n#ifdef CLEARCOAT_TEXTURE\nuniform mat4 clearCoatMatrix;\n#endif\n#ifdef CLEARCOAT_TEXTURE_ROUGHNESS\nuniform mat4 clearCoatRoughnessMatrix;\n#endif\n#ifdef CLEARCOAT_BUMP\nuniform vec2 vClearCoatBumpInfos;uniform mat4 clearCoatBumpMatrix;\n#endif\n#ifdef CLEARCOAT_TINT_TEXTURE\nuniform vec2 vClearCoatTintInfos;uniform mat4 clearCoatTintMatrix;\n#endif\n#endif\n#ifdef IRIDESCENCE\n#if defined(IRIDESCENCE_TEXTURE) || defined(IRIDESCENCE_THICKNESS_TEXTURE)\nuniform vec4 vIridescenceInfos;\n#endif\n#ifdef IRIDESCENCE_TEXTURE\nuniform mat4 iridescenceMatrix;\n#endif\n#ifdef IRIDESCENCE_THICKNESS_TEXTURE\nuniform mat4 iridescenceThicknessMatrix;\n#endif\n#endif\n#ifdef ANISOTROPIC\n#ifdef ANISOTROPIC_TEXTURE\nuniform vec2 vAnisotropyInfos;uniform mat4 anisotropyMatrix;\n#endif\n#endif\n#ifdef SHEEN\n#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS)\nuniform vec4 vSheenInfos;\n#endif\n#ifdef SHEEN_TEXTURE\nuniform mat4 sheenMatrix;\n#endif\n#ifdef SHEEN_TEXTURE_ROUGHNESS\nuniform mat4 sheenRoughnessMatrix;\n#endif\n#endif\n#ifdef SUBSURFACE\n#ifdef SS_REFRACTION\nuniform vec4 vRefractionInfos;uniform mat4 refractionMatrix;\n#endif\n#ifdef SS_THICKNESSANDMASK_TEXTURE\nuniform vec2 vThicknessInfos;uniform mat4 thicknessMatrix;\n#endif\n#ifdef SS_REFRACTIONINTENSITY_TEXTURE\nuniform vec2 vRefractionIntensityInfos;uniform mat4 refractionIntensityMatrix;\n#endif\n#ifdef SS_TRANSLUCENCYINTENSITY_TEXTURE\nuniform vec2 vTranslucencyIntensityInfos;uniform mat4 translucencyIntensityMatrix;\n#endif\n#ifdef SS_TRANSLUCENCYCOLOR_TEXTURE\nuniform vec2 vTranslucencyColorInfos;uniform mat4 translucencyColorMatrix;\n#endif\n#endif\n#ifdef NORMAL\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\n#ifdef USESPHERICALFROMREFLECTIONMAP\n#ifdef SPHERICAL_HARMONICS\nuniform vec3 vSphericalL00;uniform vec3 vSphericalL1_1;uniform vec3 vSphericalL10;uniform vec3 vSphericalL11;uniform vec3 vSphericalL2_2;uniform vec3 vSphericalL2_1;uniform vec3 vSphericalL20;uniform vec3 vSphericalL21;uniform vec3 vSphericalL22;\n#else\nuniform vec3 vSphericalX;uniform vec3 vSphericalY;uniform vec3 vSphericalZ;uniform vec3 vSphericalXX_ZZ;uniform vec3 vSphericalYY_ZZ;uniform vec3 vSphericalZZ;uniform vec3 vSphericalXY;uniform vec3 vSphericalYZ;uniform vec3 vSphericalZX;\n#endif\n#endif\n#endif\n#endif\n#ifdef DETAIL\nuniform vec4 vDetailInfos;uniform mat4 detailMatrix;\n#endif\n#include<decalVertexDeclaration>\n#define ADDITIONAL_VERTEX_DECLARATION\n`;\n// Sideeffect\nShaderStore.IncludesShadersStore[name] = shader;\n/** @internal */\nexport const pbrVertexDeclaration = { name, shader };\n//# sourceMappingURL=pbrVertexDeclaration.js.map","// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/pbrVertexDeclaration\";\nimport \"./ShadersInclude/pbrUboDeclaration\";\nimport \"./ShadersInclude/uvAttributeDeclaration\";\nimport \"./ShadersInclude/mainUVVaryingDeclaration\";\nimport \"./ShadersInclude/helperFunctions\";\nimport \"./ShadersInclude/bonesDeclaration\";\nimport \"./ShadersInclude/bakedVertexAnimationDeclaration\";\nimport \"./ShadersInclude/instancesDeclaration\";\nimport \"./ShadersInclude/prePassVertexDeclaration\";\nimport \"./ShadersInclude/samplerVertexDeclaration\";\nimport \"./ShadersInclude/harmonicsFunctions\";\nimport \"./ShadersInclude/bumpVertexDeclaration\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"./ShadersInclude/fogVertexDeclaration\";\nimport \"./ShadersInclude/lightVxFragmentDeclaration\";\nimport \"./ShadersInclude/lightVxUboDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobalDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexDeclaration\";\nimport \"./ShadersInclude/logDepthDeclaration\";\nimport \"./ShadersInclude/morphTargetsVertexGlobal\";\nimport \"./ShadersInclude/morphTargetsVertex\";\nimport \"./ShadersInclude/instancesVertex\";\nimport \"./ShadersInclude/bonesVertex\";\nimport \"./ShadersInclude/bakedVertexAnimation\";\nimport \"./ShadersInclude/prePassVertex\";\nimport \"./ShadersInclude/uvVariableDeclaration\";\nimport \"./ShadersInclude/samplerVertexImplementation\";\nimport \"./ShadersInclude/bumpVertex\";\nimport \"./ShadersInclude/clipPlaneVertex\";\nimport \"./ShadersInclude/fogVertex\";\nimport \"./ShadersInclude/shadowsVertex\";\nimport \"./ShadersInclude/vertexColorMixing\";\nimport \"./ShadersInclude/logDepthVertex\";\nconst name = \"pbrVertexShader\";\nconst shader = `#define CUSTOM_VERTEX_EXTENSION\nprecision highp float;\n#include<__decl__pbrVertex>\n#define CUSTOM_VERTEX_BEGIN\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef TANGENT\nattribute vec4 tangent;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#include<uvAttributeDeclaration>[2..7]\n#include<mainUVVaryingDeclaration>[1..7]\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<helperFunctions>\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\n#include<prePassVertexDeclaration>\n#include<samplerVertexDeclaration>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail)\n#include<samplerVertexDeclaration>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient)\n#include<samplerVertexDeclaration>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive)\n#include<samplerVertexDeclaration>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap)\n#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler)\n#include<samplerVertexDeclaration>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance)\n#include<samplerVertexDeclaration>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance)\n#include<samplerVertexDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump)\n#include<samplerVertexDeclaration>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal)\n#ifdef CLEARCOAT\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump)\n#include<samplerVertexDeclaration>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint)\n#endif\n#ifdef IRIDESCENCE\n#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence)\n#include<samplerVertexDeclaration>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness)\n#endif\n#ifdef SHEEN\n#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness)\n#endif\n#ifdef ANISOTROPIC\n#include<samplerVertexDeclaration>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy)\n#endif\n#ifdef SUBSURFACE\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity)\n#include<samplerVertexDeclaration>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor)\n#endif\nvarying vec3 vPositionW;\n#if DEBUGMODE>0\nvarying vec4 vClipSpacePosition;\n#endif\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvarying vec3 vEnvironmentIrradiance;\n#include<harmonicsFunctions>\n#endif\n#endif\n#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)\nvarying vec4 vColor;\n#endif\n#include<bumpVertexDeclaration>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightVxFragment>[0..maxSimultaneousLights]\n#include<morphTargetsVertexGlobalDeclaration>\n#include<morphTargetsVertexDeclaration>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvarying vec3 vPositionUVW;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvarying vec3 vDirectionW;\n#endif\n#include<logDepthDeclaration>\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvec3 positionUpdated=position;\n#ifdef NORMAL\nvec3 normalUpdated=normal;\n#endif\n#ifdef TANGENT\nvec4 tangentUpdated=tangent;\n#endif\n#ifdef UV1\nvec2 uvUpdated=uv;\n#endif\n#ifdef UV2\nvec2 uv2Updated=uv2;\n#endif\n#include<morphTargetsVertexGlobal>\n#include<morphTargetsVertex>[0..maxSimultaneousMorphTargets]\n#ifdef REFLECTIONMAP_SKYBOX\nvPositionUVW=positionUpdated;\n#endif\n#define CUSTOM_VERTEX_UPDATE_POSITION\n#define CUSTOM_VERTEX_UPDATE_NORMAL\n#include<instancesVertex>\n#if defined(PREPASS) && ((defined(PREPASS_VELOCITY) || defined(PREPASS_VELOCITY_LINEAR)) && !defined(BONES_VELOCITY_ENABLED)\nvCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0);vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);\n#endif\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(positionUpdated,1.0);vPositionW=vec3(worldPos);\n#ifdef PREPASS\n#include<prePassVertex>\n#endif\n#ifdef NORMAL\nmat3 normalWorld=mat3(finalWorld);\n#if defined(INSTANCES) && defined(THIN_INSTANCES)\nvNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2]));vNormalW=normalize(normalWorld*vNormalW);\n#else\n#ifdef NONUNIFORMSCALING\nnormalWorld=transposeMat3(inverseMat3(normalWorld));\n#endif\nvNormalW=normalize(normalWorld*normalUpdated);\n#endif\n#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX)\nvec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz;\n#ifdef REFLECTIONMAP_OPPOSITEZ\nreflectionVector.z*=-1.0;\n#endif\nvEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector);\n#endif\n#endif\n#define CUSTOM_VERTEX_UPDATE_WORLDPOS\n#ifdef MULTIVIEW\nif (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;}\n#else\ngl_Position=viewProjection*worldPos;\n#endif\n#if DEBUGMODE>0\nvClipSpacePosition=gl_Position;\n#endif\n#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED)\nvDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0)));\n#endif\n#ifndef UV1\nvec2 uvUpdated=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2Updated=vec2(0.,0.);\n#endif\n#ifdef MAINUV1\nvMainUV1=uvUpdated;\n#endif\n#ifdef MAINUV2\nvMainUV2=uv2Updated;\n#endif\n#include<uvVariableDeclaration>[3..7]\n#include<samplerVertexImplementation>(_DEFINENAME_,ALBEDO,_VARYINGNAME_,Albedo,_MATRIXNAME_,albedo,_INFONAME_,AlbedoInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DETAIL,_VARYINGNAME_,Detail,_MATRIXNAME_,detail,_INFONAME_,DetailInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,AMBIENT,_VARYINGNAME_,Ambient,_MATRIXNAME_,ambient,_INFONAME_,AmbientInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,OPACITY,_VARYINGNAME_,Opacity,_MATRIXNAME_,opacity,_INFONAME_,OpacityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,EMISSIVE,_VARYINGNAME_,Emissive,_MATRIXNAME_,emissive,_INFONAME_,EmissiveInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,LIGHTMAP,_VARYINGNAME_,Lightmap,_MATRIXNAME_,lightmap,_INFONAME_,LightmapInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTIVITY,_VARYINGNAME_,Reflectivity,_MATRIXNAME_,reflectivity,_INFONAME_,ReflectivityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,MICROSURFACEMAP,_VARYINGNAME_,MicroSurfaceSampler,_MATRIXNAME_,microSurfaceSampler,_INFONAME_,MicroSurfaceSamplerInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,METALLIC_REFLECTANCE,_VARYINGNAME_,MetallicReflectance,_MATRIXNAME_,metallicReflectance,_INFONAME_,MetallicReflectanceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,REFLECTANCE,_VARYINGNAME_,Reflectance,_MATRIXNAME_,reflectance,_INFONAME_,ReflectanceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_MATRIXNAME_,bump,_INFONAME_,BumpInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,DECAL,_VARYINGNAME_,Decal,_MATRIXNAME_,decal,_INFONAME_,DecalInfos.x)\n#ifdef CLEARCOAT\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE,_VARYINGNAME_,ClearCoat,_MATRIXNAME_,clearCoat,_INFONAME_,ClearCoatInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TEXTURE_ROUGHNESS,_VARYINGNAME_,ClearCoatRoughness,_MATRIXNAME_,clearCoatRoughness,_INFONAME_,ClearCoatInfos.z)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_BUMP,_VARYINGNAME_,ClearCoatBump,_MATRIXNAME_,clearCoatBump,_INFONAME_,ClearCoatBumpInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,CLEARCOAT_TINT_TEXTURE,_VARYINGNAME_,ClearCoatTint,_MATRIXNAME_,clearCoatTint,_INFONAME_,ClearCoatTintInfos.x)\n#endif\n#ifdef IRIDESCENCE\n#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_TEXTURE,_VARYINGNAME_,Iridescence,_MATRIXNAME_,iridescence,_INFONAME_,IridescenceInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,IRIDESCENCE_THICKNESS_TEXTURE,_VARYINGNAME_,IridescenceThickness,_MATRIXNAME_,iridescenceThickness,_INFONAME_,IridescenceInfos.z)\n#endif\n#ifdef SHEEN\n#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE,_VARYINGNAME_,Sheen,_MATRIXNAME_,sheen,_INFONAME_,SheenInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SHEEN_TEXTURE_ROUGHNESS,_VARYINGNAME_,SheenRoughness,_MATRIXNAME_,sheenRoughness,_INFONAME_,SheenInfos.z)\n#endif\n#ifdef ANISOTROPIC\n#include<samplerVertexImplementation>(_DEFINENAME_,ANISOTROPIC_TEXTURE,_VARYINGNAME_,Anisotropy,_MATRIXNAME_,anisotropy,_INFONAME_,AnisotropyInfos.x)\n#endif\n#ifdef SUBSURFACE\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_THICKNESSANDMASK_TEXTURE,_VARYINGNAME_,Thickness,_MATRIXNAME_,thickness,_INFONAME_,ThicknessInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_REFRACTIONINTENSITY_TEXTURE,_VARYINGNAME_,RefractionIntensity,_MATRIXNAME_,refractionIntensity,_INFONAME_,RefractionIntensityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYINTENSITY_TEXTURE,_VARYINGNAME_,TranslucencyIntensity,_MATRIXNAME_,translucencyIntensity,_INFONAME_,TranslucencyIntensityInfos.x)\n#include<samplerVertexImplementation>(_DEFINENAME_,SS_TRANSLUCENCYCOLOR_TEXTURE,_VARYINGNAME_,TranslucencyColor,_MATRIXNAME_,translucencyColor,_INFONAME_,TranslucencyColorInfos.x)\n#endif\n#include<bumpVertex>\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#include<vertexColorMixing>\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#include<logDepthVertex>\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const pbrVertexShader = { name, shader };\n//# sourceMappingURL=pbr.vertex.js.map"],"names":["ShaderStore","IncludesShadersStore","name","shader","ShadersStore","pbrVertexShader"],"mappings":"qVA2HAA,EAAYC,qBAAyB,qBAvHtB,iqHC+Bf,MAAMC,EAAO,kBACPC,EAAS,s6UAiNfH,EAAYI,aAAaF,GAAQC,EAErB,MAACE,EAAkB,CAAEH,OAAMC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { i as ShaderStore } from './index-B6sqDOGz.esm.js';
|
|
2
|
+
|
|
3
|
+
// Do not edit.
|
|
4
|
+
const name = "postprocessVertexShader";
|
|
5
|
+
const shader = `attribute position: vec2<f32>;uniform scale: vec2<f32>;varying vUV: vec2<f32>;const madd=vec2(0.5,0.5);
|
|
6
|
+
#define CUSTOM_VERTEX_DEFINITIONS
|
|
7
|
+
@vertex
|
|
8
|
+
fn main(input : VertexInputs)->FragmentInputs {
|
|
9
|
+
#define CUSTOM_VERTEX_MAIN_BEGIN
|
|
10
|
+
vertexOutputs.vUV=(vertexInputs.position*madd+madd)*uniforms.scale;vertexOutputs.position=vec4(vertexInputs.position,0.0,1.0);
|
|
11
|
+
#define CUSTOM_VERTEX_MAIN_END
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
// Sideeffect
|
|
15
|
+
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
16
|
+
/** @internal */
|
|
17
|
+
const postprocessVertexShaderWGSL = { name, shader };
|
|
18
|
+
|
|
19
|
+
export { postprocessVertexShaderWGSL };
|
|
20
|
+
//# sourceMappingURL=postprocess.vertex-CCzNHvuk.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postprocess.vertex-CCzNHvuk.esm.js","sources":["../../../../../dev/core/dist/ShadersWGSL/postprocess.vertex.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nconst name = \"postprocessVertexShader\";\nconst shader = `attribute position: vec2<f32>;uniform scale: vec2<f32>;varying vUV: vec2<f32>;const madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvertexOutputs.vUV=(vertexInputs.position*madd+madd)*uniforms.scale;vertexOutputs.position=vec4(vertexInputs.position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}\n`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const postprocessVertexShaderWGSL = { name, shader };\n//# sourceMappingURL=postprocess.vertex.js.map"],"names":[],"mappings":";;AAAA;AAEA,MAAM,IAAI,GAAG,yBAAyB;AACtC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM;AAC3C;AACY,MAAC,2BAA2B,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e}from"./index-D3BVnHHq.esm.min.js";const n="postprocessVertexShader",t="attribute position: vec2<f32>;uniform scale: vec2<f32>;varying vUV: vec2<f32>;const madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvertexOutputs.vUV=(vertexInputs.position*madd+madd)*uniforms.scale;vertexOutputs.position=vec4(vertexInputs.position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}\n";e.ShadersStoreWGSL[n]=t;const s={name:n,shader:t};export{s as postprocessVertexShaderWGSL};
|
|
2
|
+
//# sourceMappingURL=postprocess.vertex-Mo0vpVxw.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postprocess.vertex-Mo0vpVxw.esm.min.js","sources":["../../../../../dev/core/dist/ShadersWGSL/postprocess.vertex.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nconst name = \"postprocessVertexShader\";\nconst shader = `attribute position: vec2<f32>;uniform scale: vec2<f32>;varying vUV: vec2<f32>;const madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvertexOutputs.vUV=(vertexInputs.position*madd+madd)*uniforms.scale;vertexOutputs.position=vec4(vertexInputs.position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}\n`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const postprocessVertexShaderWGSL = { name, shader };\n//# sourceMappingURL=postprocess.vertex.js.map"],"names":["name","shader","ShaderStore","ShadersStoreWGSL","postprocessVertexShaderWGSL"],"mappings":"gDAEA,MAAMA,EAAO,0BACPC,EAAS,8YAUfC,EAAYC,iBAAiBH,GAAQC,EAEzB,MAACG,EAA8B,CAAEJ,OAAMC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { t as Texture, C as Constants } from './index-B6sqDOGz.esm.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Raw texture can help creating a texture directly from an array of data.
|
|
5
|
+
* This can be super useful if you either get the data from an uncompressed source or
|
|
6
|
+
* if you wish to create your texture pixel by pixel.
|
|
7
|
+
*/
|
|
8
|
+
class RawTexture extends Texture {
|
|
9
|
+
/**
|
|
10
|
+
* Instantiates a new RawTexture.
|
|
11
|
+
* Raw texture can help creating a texture directly from an array of data.
|
|
12
|
+
* This can be super useful if you either get the data from an uncompressed source or
|
|
13
|
+
* if you wish to create your texture pixel by pixel.
|
|
14
|
+
* @param data define the array of data to use to create the texture (null to create an empty texture)
|
|
15
|
+
* @param width define the width of the texture
|
|
16
|
+
* @param height define the height of the texture
|
|
17
|
+
* @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)
|
|
18
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
19
|
+
* @param generateMipMaps define whether mip maps should be generated or not
|
|
20
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
21
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
22
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
23
|
+
* @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
|
|
24
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
25
|
+
*/
|
|
26
|
+
constructor(data, width, height,
|
|
27
|
+
/**
|
|
28
|
+
* Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)
|
|
29
|
+
*/
|
|
30
|
+
format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags, useSRGBBuffer) {
|
|
31
|
+
super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);
|
|
32
|
+
this.format = format;
|
|
33
|
+
if (!this._engine) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {
|
|
37
|
+
samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
|
|
38
|
+
}
|
|
39
|
+
if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {
|
|
40
|
+
samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;
|
|
41
|
+
}
|
|
42
|
+
this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);
|
|
43
|
+
this.wrapU = Texture.CLAMP_ADDRESSMODE;
|
|
44
|
+
this.wrapV = Texture.CLAMP_ADDRESSMODE;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Updates the texture underlying data.
|
|
48
|
+
* @param data Define the new data of the texture
|
|
49
|
+
*/
|
|
50
|
+
update(data) {
|
|
51
|
+
this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Clones the texture.
|
|
55
|
+
* @returns the cloned texture
|
|
56
|
+
*/
|
|
57
|
+
clone() {
|
|
58
|
+
if (!this._texture) {
|
|
59
|
+
return super.clone();
|
|
60
|
+
}
|
|
61
|
+
const rawTexture = new RawTexture(null, this.getSize().width, this.getSize().height, this.format, this.getScene(), this._texture.generateMipMaps, this._invertY, this.samplingMode, this._texture.type, this._texture._creationFlags, this._useSRGBBuffer);
|
|
62
|
+
rawTexture._texture = this._texture;
|
|
63
|
+
this._texture.incrementReferences();
|
|
64
|
+
return rawTexture;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Creates a luminance texture from some data.
|
|
68
|
+
* @param data Define the texture data
|
|
69
|
+
* @param width Define the width of the texture
|
|
70
|
+
* @param height Define the height of the texture
|
|
71
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
72
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
73
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
74
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
75
|
+
* @returns the luminance texture
|
|
76
|
+
*/
|
|
77
|
+
static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
|
|
78
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Creates a luminance alpha texture from some data.
|
|
82
|
+
* @param data Define the texture data
|
|
83
|
+
* @param width Define the width of the texture
|
|
84
|
+
* @param height Define the height of the texture
|
|
85
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
86
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
87
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
88
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
89
|
+
* @returns the luminance alpha texture
|
|
90
|
+
*/
|
|
91
|
+
static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
|
|
92
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Creates an alpha texture from some data.
|
|
96
|
+
* @param data Define the texture data
|
|
97
|
+
* @param width Define the width of the texture
|
|
98
|
+
* @param height Define the height of the texture
|
|
99
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
100
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
101
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
102
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
103
|
+
* @returns the alpha texture
|
|
104
|
+
*/
|
|
105
|
+
static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {
|
|
106
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Creates a RGB texture from some data.
|
|
110
|
+
* @param data Define the texture data
|
|
111
|
+
* @param width Define the width of the texture
|
|
112
|
+
* @param height Define the height of the texture
|
|
113
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
114
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
115
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
116
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
117
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
118
|
+
* @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
|
|
119
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
120
|
+
* @returns the RGB alpha texture
|
|
121
|
+
*/
|
|
122
|
+
static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags = 0, useSRGBBuffer = false) {
|
|
123
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Creates a RGBA texture from some data.
|
|
127
|
+
* @param data Define the texture data
|
|
128
|
+
* @param width Define the width of the texture
|
|
129
|
+
* @param height Define the height of the texture
|
|
130
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
131
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
132
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
133
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
134
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
135
|
+
* @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)
|
|
136
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
137
|
+
* @returns the RGBA texture
|
|
138
|
+
*/
|
|
139
|
+
static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags = 0, useSRGBBuffer = false) {
|
|
140
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Creates a RGBA storage texture from some data.
|
|
144
|
+
* @param data Define the texture data
|
|
145
|
+
* @param width Define the width of the texture
|
|
146
|
+
* @param height Define the height of the texture
|
|
147
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
148
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
149
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
150
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
151
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
152
|
+
* @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).
|
|
153
|
+
* @returns the RGBA texture
|
|
154
|
+
*/
|
|
155
|
+
static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, useSRGBBuffer = false) {
|
|
156
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Creates a R texture from some data.
|
|
160
|
+
* @param data Define the texture data
|
|
161
|
+
* @param width Define the width of the texture
|
|
162
|
+
* @param height Define the height of the texture
|
|
163
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
164
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
165
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
166
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
167
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
168
|
+
* @returns the R texture
|
|
169
|
+
*/
|
|
170
|
+
static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {
|
|
171
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Creates a R storage texture from some data.
|
|
175
|
+
* @param data Define the texture data
|
|
176
|
+
* @param width Define the width of the texture
|
|
177
|
+
* @param height Define the height of the texture
|
|
178
|
+
* @param sceneOrEngine defines the scene or engine the texture will belong to
|
|
179
|
+
* @param generateMipMaps Define whether or not to create mip maps for the texture
|
|
180
|
+
* @param invertY define if the data should be flipped on Y when uploaded to the GPU
|
|
181
|
+
* @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)
|
|
182
|
+
* @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)
|
|
183
|
+
* @returns the R texture
|
|
184
|
+
*/
|
|
185
|
+
static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {
|
|
186
|
+
return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export { RawTexture as R };
|
|
191
|
+
//# sourceMappingURL=rawTexture-DsvWY4wf.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rawTexture-DsvWY4wf.esm.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawTexture.js"],"sourcesContent":["import { Texture } from \"./texture\";\nimport { Constants } from \"../../Engines/constants\";\n/**\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n */\nexport class RawTexture extends Texture {\n /**\n * Instantiates a new RawTexture.\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n * @param data define the array of data to use to create the texture (null to create an empty texture)\n * @param width define the width of the texture\n * @param height define the height of the texture\n * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps define whether mip maps should be generated or not\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n */\n constructor(data, width, height, \n /**\n * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n */\n format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags, useSRGBBuffer) {\n super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);\n this.format = format;\n if (!this._engine) {\n return;\n }\n if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n /**\n * Updates the texture underlying data.\n * @param data Define the new data of the texture\n */\n update(data) {\n this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);\n }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n if (!this._texture) {\n return super.clone();\n }\n const rawTexture = new RawTexture(null, this.getSize().width, this.getSize().height, this.format, this.getScene(), this._texture.generateMipMaps, this._invertY, this.samplingMode, this._texture.type, this._texture._creationFlags, this._useSRGBBuffer);\n rawTexture._texture = this._texture;\n this._texture.incrementReferences();\n return rawTexture;\n }\n /**\n * Creates a luminance texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance texture\n */\n static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a luminance alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance alpha texture\n */\n static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates an alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the alpha texture\n */\n static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a RGB texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGB alpha texture\n */\n static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);\n }\n /**\n * Creates a R texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);\n }\n /**\n * Creates a R storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);\n }\n}\n//# sourceMappingURL=rawTexture.js.map"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,UAAU,SAAS,OAAO,CAAC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM;AACnC;AACA;AACA;AACA,IAAI,MAAM,EAAE,aAAa,EAAE,eAAe,GAAG,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC,8BAA8B,EAAE,IAAI,GAAG,SAAS,CAAC,yBAAyB,EAAE,aAAa,EAAE,aAAa,EAAE;AACvM,Q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AE,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,qBAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,GAAG,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,sBAAsB,EAAE,IAAI,GAAG,SAAS,CAAC,iBAAiB,EAAE;AACjM,QAAQ,OAAO,IAAI,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,4BAA4B,CAAC;AAClL;AACA;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e,C as t}from"./index-D3BVnHHq.esm.min.js";class E extends e{constructor(E,T,r,R,_,i=!0,n=!1,A=t.TEXTURE_TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_UNSIGNED_BYTE,u,a){super(null,_,!i,n,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,u),this.format=R,this._engine&&(this._engine._caps.textureFloatLinearFiltering||s!==t.TEXTURETYPE_FLOAT||(A=t.TEXTURE_NEAREST_SAMPLINGMODE),this._engine._caps.textureHalfFloatLinearFiltering||s!==t.TEXTURETYPE_HALF_FLOAT||(A=t.TEXTURE_NEAREST_SAMPLINGMODE),this._texture=this._engine.createRawTexture(E,T,r,R,i,n,A,null,s,u??0,a??!1),this.wrapU=e.CLAMP_ADDRESSMODE,this.wrapV=e.CLAMP_ADDRESSMODE)}update(e){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type,this._texture._useSRGBBuffer)}clone(){if(!this._texture)return super.clone();const e=new E(null,this.getSize().width,this.getSize().height,this.format,this.getScene(),this._texture.generateMipMaps,this._invertY,this.samplingMode,this._texture.type,this._texture._creationFlags,this._useSRGBBuffer);return e._texture=this._texture,this._texture.incrementReferences(),e}static CreateLuminanceTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new E(e,T,r,t.TEXTUREFORMAT_LUMINANCE,R,_,i,n)}static CreateLuminanceAlphaTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new E(e,T,r,t.TEXTUREFORMAT_LUMINANCE_ALPHA,R,_,i,n)}static CreateAlphaTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new E(e,T,r,t.TEXTUREFORMAT_ALPHA,R,_,i,n)}static CreateRGBTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_BYTE,s=0,u=!1){return new E(e,T,r,t.TEXTUREFORMAT_RGB,R,_,i,n,A,s,u)}static CreateRGBATexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_BYTE,s=0,u=!1){return new E(e,T,r,t.TEXTUREFORMAT_RGBA,R,_,i,n,A,s,u)}static CreateRGBAStorageTexture(e,T,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_BYTE,s=!1){return new E(e,T,r,t.TEXTUREFORMAT_RGBA,R,_,i,n,A,t.TEXTURE_CREATIONFLAG_STORAGE,s)}static CreateRTexture(T,r,R,_,i=!0,n=!1,A=e.TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_FLOAT){return new E(T,r,R,t.TEXTUREFORMAT_R,_,i,n,A,s)}static CreateRStorageTexture(T,r,R,_,i=!0,n=!1,A=e.TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_FLOAT){return new E(T,r,R,t.TEXTUREFORMAT_R,_,i,n,A,s,t.TEXTURE_CREATIONFLAG_STORAGE)}}export{E as R};
|
|
2
|
+
//# sourceMappingURL=rawTexture-Ub3t-s7i.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rawTexture-Ub3t-s7i.esm.min.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawTexture.js"],"sourcesContent":["import { Texture } from \"./texture\";\nimport { Constants } from \"../../Engines/constants\";\n/**\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n */\nexport class RawTexture extends Texture {\n /**\n * Instantiates a new RawTexture.\n * Raw texture can help creating a texture directly from an array of data.\n * This can be super useful if you either get the data from an uncompressed source or\n * if you wish to create your texture pixel by pixel.\n * @param data define the array of data to use to create the texture (null to create an empty texture)\n * @param width define the width of the texture\n * @param height define the height of the texture\n * @param format define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps define whether mip maps should be generated or not\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n */\n constructor(data, width, height, \n /**\n * Define the format of the data (RGB, RGBA... Engine.TEXTUREFORMAT_xxx)\n */\n format, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags, useSRGBBuffer) {\n super(null, sceneOrEngine, !generateMipMaps, invertY, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, creationFlags);\n this.format = format;\n if (!this._engine) {\n return;\n }\n if (!this._engine._caps.textureFloatLinearFiltering && type === Constants.TEXTURETYPE_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n if (!this._engine._caps.textureHalfFloatLinearFiltering && type === Constants.TEXTURETYPE_HALF_FLOAT) {\n samplingMode = Constants.TEXTURE_NEAREST_SAMPLINGMODE;\n }\n this._texture = this._engine.createRawTexture(data, width, height, format, generateMipMaps, invertY, samplingMode, null, type, creationFlags ?? 0, useSRGBBuffer ?? false);\n this.wrapU = Texture.CLAMP_ADDRESSMODE;\n this.wrapV = Texture.CLAMP_ADDRESSMODE;\n }\n /**\n * Updates the texture underlying data.\n * @param data Define the new data of the texture\n */\n update(data) {\n this._getEngine().updateRawTexture(this._texture, data, this._texture.format, this._texture.invertY, null, this._texture.type, this._texture._useSRGBBuffer);\n }\n /**\n * Clones the texture.\n * @returns the cloned texture\n */\n clone() {\n if (!this._texture) {\n return super.clone();\n }\n const rawTexture = new RawTexture(null, this.getSize().width, this.getSize().height, this.format, this.getScene(), this._texture.generateMipMaps, this._invertY, this.samplingMode, this._texture.type, this._texture._creationFlags, this._useSRGBBuffer);\n rawTexture._texture = this._texture;\n this._texture.incrementReferences();\n return rawTexture;\n }\n /**\n * Creates a luminance texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance texture\n */\n static CreateLuminanceTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a luminance alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the luminance alpha texture\n */\n static CreateLuminanceAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_LUMINANCE_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates an alpha texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @returns the alpha texture\n */\n static CreateAlphaTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_ALPHA, sceneOrEngine, generateMipMaps, invertY, samplingMode);\n }\n /**\n * Creates a RGB texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGB alpha texture\n */\n static CreateRGBTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGB, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param creationFlags specific flags to use when creating the texture (Constants.TEXTURE_CREATIONFLAG_STORAGE for storage textures, for eg)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBATexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, creationFlags = 0, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, creationFlags, useSRGBBuffer);\n }\n /**\n * Creates a RGBA storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @param useSRGBBuffer defines if the texture must be loaded in a sRGB GPU buffer (if supported by the GPU).\n * @returns the RGBA texture\n */\n static CreateRGBAStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, useSRGBBuffer = false) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_RGBA, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE, useSRGBBuffer);\n }\n /**\n * Creates a R texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type);\n }\n /**\n * Creates a R storage texture from some data.\n * @param data Define the texture data\n * @param width Define the width of the texture\n * @param height Define the height of the texture\n * @param sceneOrEngine defines the scene or engine the texture will belong to\n * @param generateMipMaps Define whether or not to create mip maps for the texture\n * @param invertY define if the data should be flipped on Y when uploaded to the GPU\n * @param samplingMode define the texture sampling mode (Texture.xxx_SAMPLINGMODE)\n * @param type define the format of the data (int, float... Engine.TEXTURETYPE_xxx)\n * @returns the R texture\n */\n static CreateRStorageTexture(data, width, height, sceneOrEngine, generateMipMaps = true, invertY = false, samplingMode = Texture.TRILINEAR_SAMPLINGMODE, type = Constants.TEXTURETYPE_FLOAT) {\n return new RawTexture(data, width, height, Constants.TEXTUREFORMAT_R, sceneOrEngine, generateMipMaps, invertY, samplingMode, type, Constants.TEXTURE_CREATIONFLAG_STORAGE);\n }\n}\n//# sourceMappingURL=rawTexture.js.map"],"names":["RawTexture","Texture","constructor","data","width","height","format","sceneOrEngine","generateMipMaps","invertY","samplingMode","Constants","TEXTURE_TRILINEAR_SAMPLINGMODE","type","TEXTURETYPE_UNSIGNED_BYTE","creationFlags","useSRGBBuffer","super","undefined","this","_engine","_caps","textureFloatLinearFiltering","TEXTURETYPE_FLOAT","TEXTURE_NEAREST_SAMPLINGMODE","textureHalfFloatLinearFiltering","TEXTURETYPE_HALF_FLOAT","_texture","createRawTexture","wrapU","CLAMP_ADDRESSMODE","wrapV","update","_getEngine","updateRawTexture","_useSRGBBuffer","clone","rawTexture","getSize","getScene","_invertY","_creationFlags","incrementReferences","CreateLuminanceTexture","TEXTUREFORMAT_LUMINANCE","CreateLuminanceAlphaTexture","TEXTUREFORMAT_LUMINANCE_ALPHA","CreateAlphaTexture","TEXTUREFORMAT_ALPHA","CreateRGBTexture","TEXTUREFORMAT_RGB","CreateRGBATexture","TEXTUREFORMAT_RGBA","CreateRGBAStorageTexture","TEXTURE_CREATIONFLAG_STORAGE","CreateRTexture","TRILINEAR_SAMPLINGMODE","TEXTUREFORMAT_R","CreateRStorageTexture"],"mappings":"uDAOO,MAAMA,UAAmBC,EAkB5B,WAAAC,CAAYC,EAAMC,EAAOC,EAIzBC,EAAQC,EAAeC,GAAkB,EAAMC,GAAU,EAAOC,EAAeC,EAAUC,+BAAgCC,EAAOF,EAAUG,0BAA2BC,EAAeC,GAChLC,MAAM,KAAMV,GAAgBC,EAAiBC,OAASS,OAAWA,OAAWA,OAAWA,OAAWA,OAAWA,OAAWA,OAAWA,EAAWH,GAC9II,KAAKb,OAASA,EACTa,KAAKC,UAGLD,KAAKC,QAAQC,MAAMC,6BAA+BT,IAASF,EAAUY,oBACtEb,EAAeC,EA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6C,CAAsBvD,EAAMC,EAAOC,EAAQE,EAAeC,GAAkB,EAAMC,GAAU,EAAOC,EAAeT,EAAQuD,uBAAwB3C,EAAOF,EAAUY,mBACtK,OAAO,IAAIvB,EAAWG,EAAMC,EAAOC,EAAQM,EAAU8C,gBAAiBlD,EAAeC,EAAiBC,EAASC,EAAcG,EAAMF,EAAU2C,6BACrJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{af as t,v as e,ag as i,ah as n,a6 as r,a4 as o,E as s,ai as a,aj as c,ak as h,Y as l}from"./index-D3BVnHHq.esm.min.js";class u{constructor(t,e,n=Number.MAX_VALUE,r=i){this.origin=t,this.direction=e,this.length=n,this.epsilon=r}clone(){return new u(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(t,e,i=0){const n=u._TmpVector3[0].copyFromFloats(t.x-i,t.y-i,t.z-i),r=u._TmpVector3[1].copyFromFloats(e.x+i,e.y+i,e.z+i);let o,s,a,c,h=0,l=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<n.x||this.origin.x>r.x)return!1}else if(o=1/this.direction.x,s=(n.x-this.origin.x)*o,a=(r.x-this.origin.x)*o,a===-1/0&&(a=1/0),s>a&&(c=s,s=a,a=c),h=Math.max(s,h),l=Math.min(a,l),h>l)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<n.y||this.origin.y>r.y)return!1}else if(o=1/this.direction.y,s=(n.y-this.origin.y)*o,a=(r.y-this.origin.y)*o,a===-1/0&&(a=1/0),s>a&&(c=s,s=a,a=c),h=Math.max(s,h),l=Math.min(a,l),h>l)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<n.z||this.origin.z>r.z)return!1}else if(o=1/this.direction.z,s=(n.z-this.origin.z)*o,a=(r.z-this.origin.z)*o,a===-1/0&&(a=1/0),s>a&&(c=s,s=a,a=c),h=Math.max(s,h),l=Math.min(a,l),h>l)return!1;return!0}intersectsBox(t,e=0){return this.intersectsBoxMinMax(t.minimum,t.maximum,e)}intersectsSphere(t,e=0){const i=t.center.x-this.origin.x,n=t.center.y-this.origin.y,r=t.center.z-this.origin.z,o=i*i+n*n+r*r,s=t.radius+e,a=s*s;if(o<=a)return!0;const c=i*this.direction.x+n*this.direction.y+r*this.direction.z;if(c<0)return!1;return o-c*c<=a}intersectsTriangle(t,i,r){const o=u._TmpVector3[0],s=u._TmpVector3[1],a=u._TmpVector3[2],c=u._TmpVector3[3],h=u._TmpVector3[4];i.subtractToRef(t,o),r.subtractToRef(t,s),e.CrossToRef(this.direction,s,a);const l=e.Dot(o,a);if(0===l)return null;const f=1/l;this.origin.subtractToRef(t,c);const m=e.Dot(c,a)*f;if(m<-this.epsilon||m>1+this.epsilon)return null;e.CrossToRef(c,o,h);const y=e.Dot(this.direction,h)*f;if(y<-this.epsilon||m+y>1+this.epsilon)return null;const d=e.Dot(s,h)*f;return d>this.length?null:new n(1-m-y,m,d)}intersectsPlane(t){let i;const n=e.Dot(t.normal,this.direction);if(Math.abs(n)<9.99999997475243e-7)return null;{const r=e.Dot(t.normal,this.origin);return i=(-t.d-r)/n,i<0?i<-9.99999997475243e-7?null:0:i}}intersectsAxis(t,i=0){switch(t){case"y":{const t=(this.origin.y-i)/this.direction.y;return t>0?null:new e(this.origin.x+this.direction.x*-t,i,this.origin.z+this.direction.z*-t)}case"x":{const t=(this.origin.x-i)/this.direction.x;return t>0?null:new e(i,this.origin.y+this.direction.y*-t,this.origin.z+this.direction.z*-t)}case"z":{const t=(this.origin.z-i)/this.direction.z;return t>0?null:new e(this.origin.x+this.direction.x*-t,this.origin.y+this.direction.y*-t,i)}default:return null}}intersectsMesh(t,e,i,n=!1,o,s=!1){const a=r.Matrix[0];return t.getWorldMatrix().invertToRef(a),this._tmpRay?u.TransformToRef(this,a,this._tmpRay):this._tmpRay=u.Transform(this,a),t.intersects(this._tmpRay,e,i,n,o,s)}intersectsMeshes(t,e,i){i?i.length=0:i=[];for(let n=0;n<t.length;n++){const r=this.intersectsMesh(t[n],e);r.hit&&i.push(r)}return i.sort(this._comparePickingInfo),i}_comparePickingInfo(t,e){return t.distance<e.distance?-1:t.distance>e.distance?1:0}intersectionSegment(t,i,n){const o=this.origin,s=r.Vector3[0],a=r.Vector3[1],c=r.Vector3[2],h=r.Vector3[3];i.subtractToRef(t,s),this.direction.scaleToRef(u._Rayl,c),o.addToRef(c,a),t.subtractToRef(o,h);const l=e.Dot(s,s),f=e.Dot(s,c),m=e.Dot(c,c),y=e.Dot(s,h),d=e.Dot(c,h),g=l*m-f*f;let R,p,T=g,x=g;g<u._Smallnum?(R=0,T=1,p=d,x=m):(R=f*d-m*y,p=l*d-f*y,R<0?(R=0,p=d,x=m):R>T&&(R=T,p=d+f,x=m)),p<0?(p=0,-y<0?R=0:-y>l?R=T:(R=-y,T=l)):p>x&&(p=x,-y+f<0?R=0:-y+f>l?R=T:(R=-y+f,T=l));const _=Math.abs(R)<u._Smallnum?0:R/T,M=Math.abs(p)<u._Smallnum?0:p/x,I=r.Vector3[4];c.scaleToRef(M,I);const k=r.Vector3[5];s.scaleToRef(_,k),k.addInPlace(h);const v=r.Vector3[6];k.subtractToRef(I,v);return M>0&&M<=this.length&&v.lengthSquared()<n*n?k.length():-1}update(t,e,i,n,s,a,c,h=!1){if(h){u._RayDistant||(u._RayDistant=u.Zero()),u._RayDistant.unprojectRayToRef(t,e,i,n,o.IdentityReadOnly,a,c);const h=r.Matrix[0];s.invertToRef(h),u.TransformToRef(u._RayDistant,h,this)}else this.unprojectRayToRef(t,e,i,n,s,a,c);return this}static Zero(){return new u(e.Zero(),e.Zero())}static CreateNew(t,e,i,n,r,o,s){return u.Zero().update(t,e,i,n,r,o,s)}static CreateNewFromTo(t,i,n=o.IdentityReadOnly){const r=new u(new e(0,0,0),new e(0,0,0));return u.CreateFromToToRef(t,i,r,n)}static CreateFromToToRef(t,e,i,n=o.IdentityReadOnly){i.origin.copyFrom(t);const r=e.subtractToRef(t,i.direction),s=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return i.length=s,i.direction.normalize(),u.TransformToRef(i,n,i)}static Transform(t,i){const n=new u(new e(0,0,0),new e(0,0,0));return u.TransformToRef(t,i,n),n}static TransformToRef(t,i,n){e.TransformCoordinatesToRef(t.origin,i,n.origin),e.TransformNormalToRef(t.direction,i,n.direction),n.length=t.length,n.epsilon=t.epsilon;const r=n.direction,o=r.length();if(0!==o&&1!==o){const t=1/o;r.x*=t,r.y*=t,r.z*=t,n.length*=o}return n}unprojectRayToRef(t,i,n,o,a,c,h){const l=r.Matrix[0];a.multiplyToRef(c,l),l.multiplyToRef(h,l),l.invert();const u=s.LastCreatedEngine,f=r.Vector3[0];f.x=t/n*2-1,f.y=-(i/o*2-1),f.z=u?.useReverseDepthBuffer?1:u?.isNDCHalfZRange?0:-1;const m=r.Vector3[1].copyFromFloats(f.x,f.y,1-1e-8),y=r.Vector3[2],d=r.Vector3[3];e._UnprojectFromInvertedMatrixToRef(f,l,y),e._UnprojectFromInvertedMatrixToRef(m,l,d),this.origin.copyFrom(y),d.subtractToRef(y,this.direction),this.direction.normalize()}}function f(t,e,i,n,r,o=!1){const s=u.Zero();return m(t,e,i,n,s,r,o),s}function m(t,e,i,n,r,s,a=!1,c=!1){const h=t.getEngine();if(!s&&!(s=t.activeCamera))return t;const l=s.viewport,u=h.getRenderHeight(),{x:f,y:m,width:y,height:d}=l.toGlobal(h.getRenderWidth(),u),g=1/h.getHardwareScalingLevel();return e=e*g-f,i=i*g-(u-m-d),r.update(e,i,y,d,n||o.IdentityReadOnly,a?o.IdentityReadOnly:s.getViewMatrix(),s.getProjectionMatrix(),c),t}function y(t,e,i,n){const r=u.Zero();return d(t,e,i,r,n),r}function d(t,e,i,n,r){if(!a)return t;const s=t.getEngine();if(!r&&!(r=t.activeCamera))throw new Error("Active camera not set");const c=r.viewport,h=s.getRenderHeight(),{x:l,y:u,width:f,height:m}=c.toGlobal(s.getRenderWidth(),h),y=o.Identity(),d=1/s.getHardwareScalingLevel();return e=e*d-l,i=i*d-(h-u-m),n.update(e,i,f,m,y,y,r.getProjectionMatrix()),t}function g(t,e,i,n,r,o,s,a){const c=e(n,i.enableDistantPicking),h=i.intersects(c,r,s,o,n,a);return h&&h.hit?!r&&null!=t&&h.distance>=t.distance?null:h:null}function R(t,e,i,n,o,s){let c=null;const h=!!(t.activeCameras&&t.activeCameras.length>1&&t.cameraToUseForPointers!==t.activeCamera),l=t.cameraToUseForPointers||t.activeCamera,u=g;for(let a=0;a<t.meshes.length;a++){const f=t.meshes[a];if(i){if(!i(f,-1))continue}else if(!f.isEnabled()||!f.isVisible||!f.isPickable)continue;const m=h&&f.isWorldMatrixCameraDependent(),y=f.computeWorldMatrix(m,l);if(f.hasThinInstances&&f.thinInstanceEnablePicking){const t=u(c,e,f,y,!0,!0,s);if(t){if(o)return t;const a=r.Matrix[1],h=f.thinInstanceGetWorldMatrices();for(let t=0;t<h.length;t++){if(i&&!i(f,t))continue;h[t].multiplyToRef(y,a);const r=u(c,e,f,a,n,o,s,!0);if(r&&(c=r,c.thinInstanceIndex=t,n))return c}}}else{const t=u(c,e,f,y,n,o,s);if(t&&(c=t,n))return c}}return c||new a}function p(t,e,i,n){if(!a)return null;const o=[],s=!!(t.activeCameras&&t.activeCameras.length>1&&t.cameraToUseForPointers!==t.activeCamera),c=t.cameraToUseForPointers||t.activeCamera,h=g;for(let a=0;a<t.meshes.length;a++){const l=t.meshes[a];if(i){if(!i(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;const u=s&&l.isWorldMatrixCameraDependent(),f=l.computeWorldMatrix(u,c);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(h(null,e,l,f,!0,!0,n)){const t=r.Matrix[1],s=l.thinInstanceGetWorldMatrices();for(let r=0;r<s.length;r++){if(i&&!i(l,r))continue;s[r].multiplyToRef(f,t);const a=h(null,e,l,t,!1,!1,n,!0);a&&(a.thinInstanceIndex=r,o.push(a))}}}else{const t=h(null,e,l,f,!1,!1,n);t&&o.push(t)}}return o}function T(t,e,i,n,r,s){if(!a)return null;const c=R(t,(n=>(t._tempPickingRay||(t._tempPickingRay=u.Zero()),m(t,e,i,n,t._tempPickingRay,s||null),t._tempPickingRay)),n,r,!0);return c&&(c.ray=f(t,e,i,o.Identity(),s||null)),c}function x(t,e,i,n,r,s,a,c=!1){const h=R(t,((n,r)=>(t._tempPickingRay||(t._tempPickingRay=u.Zero()),m(t,e,i,n,t._tempPickingRay,s||null,!1,r),t._tempPickingRay)),n,r,!1,a);return h&&(h.ray=f(t,e,i,o.Identity(),s||null)),h}function _(t,e,i,n,r){const s=R(t,(i=>(t._pickWithRayInverseMatrix||(t._pickWithRayInverseMatrix=o.Identity()),i.invertToRef(t._pickWithRayInverseMatrix),t._cachedRayForTransform||(t._cachedRayForTransform=u.Zero()),u.TransformToRef(e,t._pickWithRayInverseMatrix,t._cachedRayForTransform),t._cachedRayForTransform)),i,n,!1,r);return s&&(s.ray=e),s}function M(t,e,i,n,r,o){return p(t,(n=>f(t,e,i,n,r||null)),n,o)}function I(t,e,i,n){return p(t,(i=>(t._pickWithRayInverseMatrix||(t._pickWithRayInverseMatrix=o.Identity()),i.invertToRef(t._pickWithRayInverseMatrix),t._cachedRayForTransform||(t._cachedRayForTransform=u.Zero()),u.TransformToRef(e,t._pickWithRayInverseMatrix,t._cachedRayForTransform),t._cachedRayForTransform)),i,n)}function k(t,i,n=100,o,s){o||(o=t.getWorldMatrix()),i.length=n,s?i.origin.copyFrom(s):i.origin.copyFrom(t.position);const a=r.Vector3[2];a.set(0,0,t._scene.useRightHandedSystem?-1:1);const c=r.Vector3[3];return e.TransformNormalToRef(a,o,c),e.NormalizeToRef(c,i.direction),i}function v(t,i){i&&(i.prototype.getForwardRay=function(t=100,i,n){return k(this,new u(e.Zero(),e.Zero(),t),t,i,n)},i.prototype.getForwardRayToRef=function(t,e=100,i,n){return k(this,t,e,i,n)}),t&&(c._IsPickingAvailable=!0,t.prototype.createPickingRay=function(t,e,i,n,r=!1){return f(this,t,e,i,n,r)})}u._TmpVector3=t(6,e.Zero),u._RayDistant=u.Zero(),u._Smallnum=1e-8,u._Rayl=1e9,v(h,l),h.prototype.createPickingRayToRef=function(t,e,i,n,r,o=!1,s=!1){return m(this,t,e,i,n,r,o,s)},h.prototype.createPickingRayInCameraSpace=function(t,e,i){return y(this,t,e,i)},h.prototype.createPickingRayInCameraSpaceToRef=function(t,e,i,n){return d(this,t,e,i,n)},h.prototype.pickWithBoundingInfo=function(t,e,i,n,r){return T(this,t,e,i,n,r)},h.prototype.pick=function(t,e,i,n,r,o,s=!1){return x(this,t,e,i,n,r,o,s)},h.prototype.pickWithRay=function(t,e,i,n){return _(this,t,e,i,n)},h.prototype.multiPick=function(t,e,i,n,r){return M(this,t,e,i,n,r)},h.prototype.multiPickWithRay=function(t,e,i){return I(this,t,e,i)};export{v as AddRayExtensions,f as CreatePickingRay,y as CreatePickingRayInCameraSpace,d as CreatePickingRayInCameraSpaceToRef,m as CreatePickingRayToRef,k as GetForwardRayToRef,M as MultiPick,I as MultiPickWithRay,x as Pick,T as PickWithBoundingInfo,_ as PickWithRay,u as Ray};
|
|
2
|
+
//# sourceMappingURL=ray-BRtIhzin.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ray-BRtIhzin.esm.min.js","sources":["../../../../../dev/core/dist/Culling/ray.core.js","../../../../../dev/core/dist/Culling/ray.js"],"sourcesContent":["import { Epsilon } from \"core/Maths/math.constants\";\nimport { Matrix, TmpVectors, Vector3 } from \"core/Maths/math.vector\";\nimport { BuildArray } from \"core/Misc/arrayTools\";\nimport { IntersectionInfo } from \"../Collisions/intersectionInfo\";\nimport { PickingInfo } from \"core/Collisions/pickingInfo\";\nimport { EngineStore } from \"core/Engines/engineStore\";\nimport { _ImportHelper } from \"core/import.helper\";\n/**\n * Use this object to customize mesh picking behavior\n */\nexport const PickingCustomization = {\n internalPickerForMesh: undefined,\n};\n/**\n * Class representing a ray with position and direction\n */\nexport class Ray {\n /**\n * Creates a new ray\n * @param origin origin point\n * @param direction direction\n * @param length length of the ray\n * @param epsilon The epsilon value to use when calculating the ray/triangle intersection (default: 0)\n */\n constructor(\n /** origin point */\n origin, \n /** direction */\n direction, \n /** [Number.MAX_VALUE] length of the ray */\n length = Number.MAX_VALUE, \n /** [Epsilon] The epsilon value to use when calculating the ray/triangle intersection (default: Epsilon from math constants) */\n epsilon = Epsilon) {\n this.origin = origin;\n this.direction = direction;\n this.length = length;\n this.epsilon = epsilon;\n }\n // Methods\n /**\n * Clone the current ray\n * @returns a new ray\n */\n clone() {\n return new Ray(this.origin.clone(), this.direction.clone(), this.length);\n }\n /**\n * Checks if the ray intersects a box\n * This does not account for the ray length by design to improve perfs.\n * @param minimum bound of the box\n * @param maximum bound of the box\n * @param intersectionTreshold extra extend to be added to the box in all direction\n * @returns if the box was hit\n */\n intersectsBoxMinMax(minimum, maximum, intersectionTreshold = 0) {\n const newMinimum = Ray._TmpVector3[0].copyFromFloats(minimum.x - intersectionTreshold, minimum.y - intersectionTreshold, minimum.z - intersectionTreshold);\n const newMaximum = Ray._TmpVector3[1].copyFromFloats(maximum.x + intersectionTreshold, maximum.y + intersectionTreshold, maximum.z + intersectionTreshold);\n let d = 0.0;\n let maxValue = Number.MAX_VALUE;\n let inv;\n let min;\n let max;\n let temp;\n if (Math.abs(this.direction.x) < 0.0000001) {\n if (this.origin.x < newMinimum.x || this.origin.x > newMaximum.x) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.x;\n min = (newMinimum.x - this.origin.x) * inv;\n max = (newMaximum.x - this.origin.x) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n if (Math.abs(this.direction.y) < 0.0000001) {\n if (this.origin.y < newMinimum.y || this.origin.y > newMaximum.y) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.y;\n min = (newMinimum.y - this.origin.y) * inv;\n max = (newMaximum.y - this.origin.y) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n if (Math.abs(this.direction.z) < 0.0000001) {\n if (this.origin.z < newMinimum.z || this.origin.z > newMaximum.z) {\n return false;\n }\n }\n else {\n inv = 1.0 / this.direction.z;\n min = (newMinimum.z - this.origin.z) * inv;\n max = (newMaximum.z - this.origin.z) * inv;\n if (max === -Infinity) {\n max = Infinity;\n }\n if (min > max) {\n temp = min;\n min = max;\n max = temp;\n }\n d = Math.max(min, d);\n maxValue = Math.min(max, maxValue);\n if (d > maxValue) {\n return false;\n }\n }\n return true;\n }\n /**\n * Checks if the ray intersects a box\n * This does not account for the ray lenght by design to improve perfs.\n * @param box the bounding box to check\n * @param intersectionTreshold extra extend to be added to the BoundingBox in all direction\n * @returns if the box was hit\n */\n intersectsBox(box, intersectionTreshold = 0) {\n return this.intersectsBoxMinMax(box.minimum, box.maximum, intersectionTreshold);\n }\n /**\n * If the ray hits a sphere\n * @param sphere the bounding sphere to check\n * @param intersectionTreshold extra extend to be added to the BoundingSphere in all direction\n * @returns true if it hits the sphere\n */\n intersectsSphere(sphere, intersectionTreshold = 0) {\n const x = sphere.center.x - this.origin.x;\n const y = sphere.center.y - this.origin.y;\n const z = sphere.center.z - this.origin.z;\n const pyth = x * x + y * y + z * z;\n const radius = sphere.radius + intersectionTreshold;\n const rr = radius * radius;\n if (pyth <= rr) {\n return true;\n }\n const dot = x * this.direction.x + y * this.direction.y + z * this.direction.z;\n if (dot < 0.0) {\n return false;\n }\n const temp = pyth - dot * dot;\n return temp <= rr;\n }\n /**\n * If the ray hits a triange\n * @param vertex0 triangle vertex\n * @param vertex1 triangle vertex\n * @param vertex2 triangle vertex\n * @returns intersection information if hit\n */\n intersectsTriangle(vertex0, vertex1, vertex2) {\n const edge1 = Ray._TmpVector3[0];\n const edge2 = Ray._TmpVector3[1];\n const pvec = Ray._TmpVector3[2];\n const tvec = Ray._TmpVector3[3];\n const qvec = Ray._TmpVector3[4];\n vertex1.subtractToRef(vertex0, edge1);\n vertex2.subtractToRef(vertex0, edge2);\n Vector3.CrossToRef(this.direction, edge2, pvec);\n const det = Vector3.Dot(edge1, pvec);\n if (det === 0) {\n return null;\n }\n const invdet = 1 / det;\n this.origin.subtractToRef(vertex0, tvec);\n const bv = Vector3.Dot(tvec, pvec) * invdet;\n if (bv < -this.epsilon || bv > 1.0 + this.epsilon) {\n return null;\n }\n Vector3.CrossToRef(tvec, edge1, qvec);\n const bw = Vector3.Dot(this.direction, qvec) * invdet;\n if (bw < -this.epsilon || bv + bw > 1.0 + this.epsilon) {\n return null;\n }\n //check if the distance is longer than the predefined length.\n const distance = Vector3.Dot(edge2, qvec) * invdet;\n if (distance > this.length) {\n return null;\n }\n return new IntersectionInfo(1 - bv - bw, bv, distance);\n }\n /**\n * Checks if ray intersects a plane\n * @param plane the plane to check\n * @returns the distance away it was hit\n */\n intersectsPlane(plane) {\n let distance;\n const result1 = Vector3.Dot(plane.normal, this.direction);\n if (Math.abs(result1) < 9.99999997475243e-7) {\n return null;\n }\n else {\n const result2 = Vector3.Dot(plane.normal, this.origin);\n distance = (-plane.d - result2) / result1;\n if (distance < 0.0) {\n if (distance < -9.99999997475243e-7) {\n return null;\n }\n else {\n return 0;\n }\n }\n return distance;\n }\n }\n /**\n * Calculate the intercept of a ray on a given axis\n * @param axis to check 'x' | 'y' | 'z'\n * @param offset from axis interception (i.e. an offset of 1y is intercepted above ground)\n * @returns a vector containing the coordinates where 'axis' is equal to zero (else offset), or null if there is no intercept.\n */\n intersectsAxis(axis, offset = 0) {\n switch (axis) {\n case \"y\": {\n const t = (this.origin.y - offset) / this.direction.y;\n if (t > 0) {\n return null;\n }\n return new Vector3(this.origin.x + this.direction.x * -t, offset, this.origin.z + this.direction.z * -t);\n }\n case \"x\": {\n const t = (this.origin.x - offset) / this.direction.x;\n if (t > 0) {\n return null;\n }\n return new Vector3(offset, this.origin.y + this.direction.y * -t, this.origin.z + this.direction.z * -t);\n }\n case \"z\": {\n const t = (this.origin.z - offset) / this.direction.z;\n if (t > 0) {\n return null;\n }\n return new Vector3(this.origin.x + this.direction.x * -t, this.origin.y + this.direction.y * -t, offset);\n }\n default:\n return null;\n }\n }\n /**\n * Checks if ray intersects a mesh. The ray is defined in WORLD space. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param mesh the mesh to check\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\n * @param worldToUse defines the world matrix to use to get the world coordinate of the intersection point\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\n * @returns picking info of the intersection\n */\n intersectsMesh(mesh, fastCheck, trianglePredicate, onlyBoundingInfo = false, worldToUse, skipBoundingInfo = false) {\n const tm = TmpVectors.Matrix[0];\n mesh.getWorldMatrix().invertToRef(tm);\n if (this._tmpRay) {\n Ray.TransformToRef(this, tm, this._tmpRay);\n }\n else {\n this._tmpRay = Ray.Transform(this, tm);\n }\n return mesh.intersects(this._tmpRay, fastCheck, trianglePredicate, onlyBoundingInfo, worldToUse, skipBoundingInfo);\n }\n /**\n * Checks if ray intersects a mesh\n * @param meshes the meshes to check\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param results array to store result in\n * @returns Array of picking infos\n */\n intersectsMeshes(meshes, fastCheck, results) {\n if (results) {\n results.length = 0;\n }\n else {\n results = [];\n }\n for (let i = 0; i < meshes.length; i++) {\n const pickInfo = this.intersectsMesh(meshes[i], fastCheck);\n if (pickInfo.hit) {\n results.push(pickInfo);\n }\n }\n results.sort(this._comparePickingInfo);\n return results;\n }\n _comparePickingInfo(pickingInfoA, pickingInfoB) {\n if (pickingInfoA.distance < pickingInfoB.distance) {\n return -1;\n }\n else if (pickingInfoA.distance > pickingInfoB.distance) {\n return 1;\n }\n else {\n return 0;\n }\n }\n /**\n * Intersection test between the ray and a given segment within a given tolerance (threshold)\n * @param sega the first point of the segment to test the intersection against\n * @param segb the second point of the segment to test the intersection against\n * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful\n * @returns the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection\n */\n intersectionSegment(sega, segb, threshold) {\n const o = this.origin;\n const u = TmpVectors.Vector3[0];\n const rsegb = TmpVectors.Vector3[1];\n const v = TmpVectors.Vector3[2];\n const w = TmpVectors.Vector3[3];\n segb.subtractToRef(sega, u);\n this.direction.scaleToRef(Ray._Rayl, v);\n o.addToRef(v, rsegb);\n sega.subtractToRef(o, w);\n const a = Vector3.Dot(u, u); // always >= 0\n const b = Vector3.Dot(u, v);\n const c = Vector3.Dot(v, v); // always >= 0\n const d = Vector3.Dot(u, w);\n const e = Vector3.Dot(v, w);\n const D = a * c - b * b; // always >= 0\n let sN, sD = D; // sc = sN / sD, default sD = D >= 0\n let tN, tD = D; // tc = tN / tD, default tD = D >= 0\n // compute the line parameters of the two closest points\n if (D < Ray._Smallnum) {\n // the lines are almost parallel\n sN = 0.0; // force using point P0 on segment S1\n sD = 1.0; // to prevent possible division by 0.0 later\n tN = e;\n tD = c;\n }\n else {\n // get the closest points on the infinite lines\n sN = b * e - c * d;\n tN = a * e - b * d;\n if (sN < 0.0) {\n // sc < 0 => the s=0 edge is visible\n sN = 0.0;\n tN = e;\n tD = c;\n }\n else if (sN > sD) {\n // sc > 1 => the s=1 edge is visible\n sN = sD;\n tN = e + b;\n tD = c;\n }\n }\n if (tN < 0.0) {\n // tc < 0 => the t=0 edge is visible\n tN = 0.0;\n // recompute sc for this edge\n if (-d < 0.0) {\n sN = 0.0;\n }\n else if (-d > a) {\n sN = sD;\n }\n else {\n sN = -d;\n sD = a;\n }\n }\n else if (tN > tD) {\n // tc > 1 => the t=1 edge is visible\n tN = tD;\n // recompute sc for this edge\n if (-d + b < 0.0) {\n sN = 0;\n }\n else if (-d + b > a) {\n sN = sD;\n }\n else {\n sN = -d + b;\n sD = a;\n }\n }\n // finally do the division to get sc and tc\n const sc = Math.abs(sN) < Ray._Smallnum ? 0.0 : sN / sD;\n const tc = Math.abs(tN) < Ray._Smallnum ? 0.0 : tN / tD;\n // get the difference of the two closest points\n const qtc = TmpVectors.Vector3[4];\n v.scaleToRef(tc, qtc);\n const qsc = TmpVectors.Vector3[5];\n u.scaleToRef(sc, qsc);\n qsc.addInPlace(w);\n const dP = TmpVectors.Vector3[6];\n qsc.subtractToRef(qtc, dP); // = S1(sc) - S2(tc)\n const isIntersected = tc > 0 && tc <= this.length && dP.lengthSquared() < threshold * threshold; // return intersection result\n if (isIntersected) {\n return qsc.length();\n }\n return -1;\n }\n /**\n * Update the ray from viewport position\n * @param x position\n * @param y y position\n * @param viewportWidth viewport width\n * @param viewportHeight viewport height\n * @param world world matrix\n * @param view view matrix\n * @param projection projection matrix\n * @param enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)\n * @returns this ray updated\n */\n update(x, y, viewportWidth, viewportHeight, world, view, projection, enableDistantPicking = false) {\n if (enableDistantPicking) {\n // With world matrices having great values (like 8000000000 on 1 or more scaling or position axis),\n // multiplying view/projection/world and doing invert will result in loss of float precision in the matrix.\n // One way to fix it is to compute the ray with world at identity then transform the ray in object space.\n // This is slower (2 matrix inverts instead of 1) but precision is preserved.\n // This is hidden behind `EnableDistantPicking` flag (default is false)\n if (!Ray._RayDistant) {\n Ray._RayDistant = Ray.Zero();\n }\n Ray._RayDistant.unprojectRayToRef(x, y, viewportWidth, viewportHeight, Matrix.IdentityReadOnly, view, projection);\n const tm = TmpVectors.Matrix[0];\n world.invertToRef(tm);\n Ray.TransformToRef(Ray._RayDistant, tm, this);\n }\n else {\n this.unprojectRayToRef(x, y, viewportWidth, viewportHeight, world, view, projection);\n }\n return this;\n }\n // Statics\n /**\n * Creates a ray with origin and direction of 0,0,0\n * @returns the new ray\n */\n static Zero() {\n return new Ray(Vector3.Zero(), Vector3.Zero());\n }\n /**\n * Creates a new ray from screen space and viewport\n * @param x position\n * @param y y position\n * @param viewportWidth viewport width\n * @param viewportHeight viewport height\n * @param world world matrix\n * @param view view matrix\n * @param projection projection matrix\n * @returns new ray\n */\n static CreateNew(x, y, viewportWidth, viewportHeight, world, view, projection) {\n const result = Ray.Zero();\n return result.update(x, y, viewportWidth, viewportHeight, world, view, projection);\n }\n /**\n * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be\n * transformed to the given world matrix.\n * @param origin The origin point\n * @param end The end point\n * @param world a matrix to transform the ray to. Default is the identity matrix.\n * @returns the new ray\n */\n static CreateNewFromTo(origin, end, world = Matrix.IdentityReadOnly) {\n const result = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 0));\n return Ray.CreateFromToToRef(origin, end, result, world);\n }\n /**\n * Function will update a transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be\n * transformed to the given world matrix.\n * @param origin The origin point\n * @param end The end point\n * @param result the object to store the result\n * @param world a matrix to transform the ray to. Default is the identity matrix.\n * @returns the ref ray\n */\n static CreateFromToToRef(origin, end, result, world = Matrix.IdentityReadOnly) {\n result.origin.copyFrom(origin);\n const direction = end.subtractToRef(origin, result.direction);\n const length = Math.sqrt(direction.x * direction.x + direction.y * direction.y + direction.z * direction.z);\n result.length = length;\n result.direction.normalize();\n return Ray.TransformToRef(result, world, result);\n }\n /**\n * Transforms a ray by a matrix\n * @param ray ray to transform\n * @param matrix matrix to apply\n * @returns the resulting new ray\n */\n static Transform(ray, matrix) {\n const result = new Ray(new Vector3(0, 0, 0), new Vector3(0, 0, 0));\n Ray.TransformToRef(ray, matrix, result);\n return result;\n }\n /**\n * Transforms a ray by a matrix\n * @param ray ray to transform\n * @param matrix matrix to apply\n * @param result ray to store result in\n * @returns the updated result ray\n */\n static TransformToRef(ray, matrix, result) {\n Vector3.TransformCoordinatesToRef(ray.origin, matrix, result.origin);\n Vector3.TransformNormalToRef(ray.direction, matrix, result.direction);\n result.length = ray.length;\n result.epsilon = ray.epsilon;\n const dir = result.direction;\n const len = dir.length();\n if (!(len === 0 || len === 1)) {\n const num = 1.0 / len;\n dir.x *= num;\n dir.y *= num;\n dir.z *= num;\n result.length *= len;\n }\n return result;\n }\n /**\n * Unproject a ray from screen space to object space\n * @param sourceX defines the screen space x coordinate to use\n * @param sourceY defines the screen space y coordinate to use\n * @param viewportWidth defines the current width of the viewport\n * @param viewportHeight defines the current height of the viewport\n * @param world defines the world matrix to use (can be set to Identity to go to world space)\n * @param view defines the view matrix to use\n * @param projection defines the projection matrix to use\n */\n unprojectRayToRef(sourceX, sourceY, viewportWidth, viewportHeight, world, view, projection) {\n const matrix = TmpVectors.Matrix[0];\n world.multiplyToRef(view, matrix);\n matrix.multiplyToRef(projection, matrix);\n matrix.invert();\n const engine = EngineStore.LastCreatedEngine;\n const nearScreenSource = TmpVectors.Vector3[0];\n nearScreenSource.x = (sourceX / viewportWidth) * 2 - 1;\n nearScreenSource.y = -((sourceY / viewportHeight) * 2 - 1);\n nearScreenSource.z = engine?.useReverseDepthBuffer ? 1 : engine?.isNDCHalfZRange ? 0 : -1;\n // far Z need to be close but < to 1 or camera projection matrix with maxZ = 0 will NaN\n const farScreenSource = TmpVectors.Vector3[1].copyFromFloats(nearScreenSource.x, nearScreenSource.y, 1.0 - 1e-8);\n const nearVec3 = TmpVectors.Vector3[2];\n const farVec3 = TmpVectors.Vector3[3];\n Vector3._UnprojectFromInvertedMatrixToRef(nearScreenSource, matrix, nearVec3);\n Vector3._UnprojectFromInvertedMatrixToRef(farScreenSource, matrix, farVec3);\n this.origin.copyFrom(nearVec3);\n farVec3.subtractToRef(nearVec3, this.direction);\n this.direction.normalize();\n }\n}\nRay._TmpVector3 = BuildArray(6, Vector3.Zero);\nRay._RayDistant = Ray.Zero();\nRay._Smallnum = 0.00000001;\nRay._Rayl = 10e8;\n/**\n * Creates a ray that can be used to pick in the scene\n * @param scene defines the scene to use for the picking\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param world defines the world matrix to use if you want to pick in object space (instead of world space)\n * @param camera defines the camera to use for the picking\n * @param cameraViewSpace defines if picking will be done in view space (false by default)\n * @returns a Ray\n */\nexport function CreatePickingRay(scene, x, y, world, camera, cameraViewSpace = false) {\n const result = Ray.Zero();\n CreatePickingRayToRef(scene, x, y, world, result, camera, cameraViewSpace);\n return result;\n}\n/**\n * Creates a ray that can be used to pick in the scene\n * @param scene defines the scene to use for the picking\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param world defines the world matrix to use if you want to pick in object space (instead of world space)\n * @param result defines the ray where to store the picking ray\n * @param camera defines the camera to use for the picking\n * @param cameraViewSpace defines if picking will be done in view space (false by default)\n * @param enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)\n * @returns the current scene\n */\nexport function CreatePickingRayToRef(scene, x, y, world, result, camera, cameraViewSpace = false, enableDistantPicking = false) {\n const engine = scene.getEngine();\n if (!camera && !(camera = scene.activeCamera)) {\n return scene;\n }\n const cameraViewport = camera.viewport;\n const renderHeight = engine.getRenderHeight();\n const { x: vx, y: vy, width, height } = cameraViewport.toGlobal(engine.getRenderWidth(), renderHeight);\n // Moving coordinates to local viewport world\n const levelInv = 1 / engine.getHardwareScalingLevel();\n x = x * levelInv - vx;\n y = y * levelInv - (renderHeight - vy - height);\n result.update(x, y, width, height, world ? world : Matrix.IdentityReadOnly, cameraViewSpace ? Matrix.IdentityReadOnly : camera.getViewMatrix(), camera.getProjectionMatrix(), enableDistantPicking);\n return scene;\n}\n/**\n * Creates a ray that can be used to pick in the scene\n * @param scene defines the scene to use for the picking\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param camera defines the camera to use for the picking\n * @returns a Ray\n */\nexport function CreatePickingRayInCameraSpace(scene, x, y, camera) {\n const result = Ray.Zero();\n CreatePickingRayInCameraSpaceToRef(scene, x, y, result, camera);\n return result;\n}\n/**\n * Creates a ray that can be used to pick in the scene\n * @param scene defines the scene to use for the picking\n * @param x defines the x coordinate of the origin (on-screen)\n * @param y defines the y coordinate of the origin (on-screen)\n * @param result defines the ray where to store the picking ray\n * @param camera defines the camera to use for the picking\n * @returns the current scene\n */\nexport function CreatePickingRayInCameraSpaceToRef(scene, x, y, result, camera) {\n if (!PickingInfo) {\n return scene;\n }\n const engine = scene.getEngine();\n if (!camera && !(camera = scene.activeCamera)) {\n throw new Error(\"Active camera not set\");\n }\n const cameraViewport = camera.viewport;\n const renderHeight = engine.getRenderHeight();\n const { x: vx, y: vy, width, height } = cameraViewport.toGlobal(engine.getRenderWidth(), renderHeight);\n const identity = Matrix.Identity();\n // Moving coordinates to local viewport world\n const levelInv = 1 / engine.getHardwareScalingLevel();\n x = x * levelInv - vx;\n y = y * levelInv - (renderHeight - vy - height);\n result.update(x, y, width, height, identity, identity, camera.getProjectionMatrix());\n return scene;\n}\nfunction InternalPickForMesh(pickingInfo, rayFunction, mesh, world, fastCheck, onlyBoundingInfo, trianglePredicate, skipBoundingInfo) {\n const ray = rayFunction(world, mesh.enableDistantPicking);\n const result = mesh.intersects(ray, fastCheck, trianglePredicate, onlyBoundingInfo, world, skipBoundingInfo);\n if (!result || !result.hit) {\n return null;\n }\n if (!fastCheck && pickingInfo != null && result.distance >= pickingInfo.distance) {\n return null;\n }\n return result;\n}\nfunction InternalPick(scene, rayFunction, predicate, fastCheck, onlyBoundingInfo, trianglePredicate) {\n let pickingInfo = null;\n const computeWorldMatrixForCamera = !!(scene.activeCameras && scene.activeCameras.length > 1 && scene.cameraToUseForPointers !== scene.activeCamera);\n const currentCamera = scene.cameraToUseForPointers || scene.activeCamera;\n const picker = PickingCustomization.internalPickerForMesh || InternalPickForMesh;\n for (let meshIndex = 0; meshIndex < scene.meshes.length; meshIndex++) {\n const mesh = scene.meshes[meshIndex];\n if (predicate) {\n if (!predicate(mesh, -1)) {\n continue;\n }\n }\n else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {\n continue;\n }\n const forceCompute = computeWorldMatrixForCamera && mesh.isWorldMatrixCameraDependent();\n const world = mesh.computeWorldMatrix(forceCompute, currentCamera);\n if (mesh.hasThinInstances && mesh.thinInstanceEnablePicking) {\n // first check if the ray intersects the whole bounding box/sphere of the mesh\n const result = picker(pickingInfo, rayFunction, mesh, world, true, true, trianglePredicate);\n if (result) {\n if (onlyBoundingInfo) {\n // the user only asked for a bounding info check so we can return\n return result;\n }\n const tmpMatrix = TmpVectors.Matrix[1];\n const thinMatrices = mesh.thinInstanceGetWorldMatrices();\n for (let index = 0; index < thinMatrices.length; index++) {\n if (predicate && !predicate(mesh, index)) {\n continue;\n }\n const thinMatrix = thinMatrices[index];\n thinMatrix.multiplyToRef(world, tmpMatrix);\n const result = picker(pickingInfo, rayFunction, mesh, tmpMatrix, fastCheck, onlyBoundingInfo, trianglePredicate, true);\n if (result) {\n pickingInfo = result;\n pickingInfo.thinInstanceIndex = index;\n if (fastCheck) {\n return pickingInfo;\n }\n }\n }\n }\n }\n else {\n const result = picker(pickingInfo, rayFunction, mesh, world, fastCheck, onlyBoundingInfo, trianglePredicate);\n if (result) {\n pickingInfo = result;\n if (fastCheck) {\n return pickingInfo;\n }\n }\n }\n }\n return pickingInfo || new PickingInfo();\n}\nfunction InternalMultiPick(scene, rayFunction, predicate, trianglePredicate) {\n if (!PickingInfo) {\n return null;\n }\n const pickingInfos = [];\n const computeWorldMatrixForCamera = !!(scene.activeCameras && scene.activeCameras.length > 1 && scene.cameraToUseForPointers !== scene.activeCamera);\n const currentCamera = scene.cameraToUseForPointers || scene.activeCamera;\n const picker = PickingCustomization.internalPickerForMesh || InternalPickForMesh;\n for (let meshIndex = 0; meshIndex < scene.meshes.length; meshIndex++) {\n const mesh = scene.meshes[meshIndex];\n if (predicate) {\n if (!predicate(mesh, -1)) {\n continue;\n }\n }\n else if (!mesh.isEnabled() || !mesh.isVisible || !mesh.isPickable) {\n continue;\n }\n const forceCompute = computeWorldMatrixForCamera && mesh.isWorldMatrixCameraDependent();\n const world = mesh.computeWorldMatrix(forceCompute, currentCamera);\n if (mesh.hasThinInstances && mesh.thinInstanceEnablePicking) {\n const result = picker(null, rayFunction, mesh, world, true, true, trianglePredicate);\n if (result) {\n const tmpMatrix = TmpVectors.Matrix[1];\n const thinMatrices = mesh.thinInstanceGetWorldMatrices();\n for (let index = 0; index < thinMatrices.length; index++) {\n if (predicate && !predicate(mesh, index)) {\n continue;\n }\n const thinMatrix = thinMatrices[index];\n thinMatrix.multiplyToRef(world, tmpMatrix);\n const result = picker(null, rayFunction, mesh, tmpMatrix, false, false, trianglePredicate, true);\n if (result) {\n result.thinInstanceIndex = index;\n pickingInfos.push(result);\n }\n }\n }\n }\n else {\n const result = picker(null, rayFunction, mesh, world, false, false, trianglePredicate);\n if (result) {\n pickingInfos.push(result);\n }\n }\n }\n return pickingInfos;\n}\n/** Launch a ray to try to pick a mesh in the scene using only bounding information of the main mesh (not using submeshes)\n * @param scene defines the scene to use for the picking\n * @param x position on screen\n * @param y position on screen\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @returns a PickingInfo (Please note that some info will not be set like distance, bv, bu and everything that cannot be capture by only using bounding infos)\n */\nexport function PickWithBoundingInfo(scene, x, y, predicate, fastCheck, camera) {\n if (!PickingInfo) {\n return null;\n }\n const result = InternalPick(scene, (world) => {\n if (!scene._tempPickingRay) {\n scene._tempPickingRay = Ray.Zero();\n }\n CreatePickingRayToRef(scene, x, y, world, scene._tempPickingRay, camera || null);\n return scene._tempPickingRay;\n }, predicate, fastCheck, true);\n if (result) {\n result.ray = CreatePickingRay(scene, x, y, Matrix.Identity(), camera || null);\n }\n return result;\n}\n/** Launch a ray to try to pick a mesh in the scene\n * @param scene defines the scene to use for the picking\n * @param x position on screen\n * @param y position on screen\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @param _enableDistantPicking defines if picking should handle large values for mesh position/scaling (false by default)\n * @returns a PickingInfo\n */\nexport function Pick(scene, x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking = false) {\n const result = InternalPick(scene, (world, enableDistantPicking) => {\n if (!scene._tempPickingRay) {\n scene._tempPickingRay = Ray.Zero();\n }\n CreatePickingRayToRef(scene, x, y, world, scene._tempPickingRay, camera || null, false, enableDistantPicking);\n return scene._tempPickingRay;\n }, predicate, fastCheck, false, trianglePredicate);\n if (result) {\n result.ray = CreatePickingRay(scene, x, y, Matrix.Identity(), camera || null);\n }\n return result;\n}\n/**\n * Use the given ray to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param scene defines the scene to use for the picking\n * @param ray The ray to use to pick meshes\n * @param predicate Predicate function used to determine eligible meshes. Can be set to null. In this case, a mesh must have isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param fastCheck defines if the first intersection will be used (and not the closest)\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns a PickingInfo\n */\nexport function PickWithRay(scene, ray, predicate, fastCheck, trianglePredicate) {\n const result = InternalPick(scene, (world) => {\n if (!scene._pickWithRayInverseMatrix) {\n scene._pickWithRayInverseMatrix = Matrix.Identity();\n }\n world.invertToRef(scene._pickWithRayInverseMatrix);\n if (!scene._cachedRayForTransform) {\n scene._cachedRayForTransform = Ray.Zero();\n }\n Ray.TransformToRef(ray, scene._pickWithRayInverseMatrix, scene._cachedRayForTransform);\n return scene._cachedRayForTransform;\n }, predicate, fastCheck, false, trianglePredicate);\n if (result) {\n result.ray = ray;\n }\n return result;\n}\n/**\n * Launch a ray to try to pick a mesh in the scene. A mesh triangle can be picked both from its front and back sides,\n * irrespective of orientation.\n * @param scene defines the scene to use for the picking\n * @param x X position on screen\n * @param y Y position on screen\n * @param predicate Predicate function used to determine eligible meshes and instances. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param camera camera to use for computing the picking ray. Can be set to null. In this case, the scene.activeCamera will be used\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns an array of PickingInfo\n */\nexport function MultiPick(scene, x, y, predicate, camera, trianglePredicate) {\n return InternalMultiPick(scene, (world) => CreatePickingRay(scene, x, y, world, camera || null), predicate, trianglePredicate);\n}\n/**\n * Launch a ray to try to pick a mesh in the scene\n * @param scene defines the scene to use for the picking\n * @param ray Ray to use\n * @param predicate Predicate function used to determine eligible meshes and instances. Can be set to null. In this case, a mesh must be enabled, visible and with isPickable set to true. thinInstanceIndex is -1 when the mesh is non-instanced\n * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected\n * @returns an array of PickingInfo\n */\nexport function MultiPickWithRay(scene, ray, predicate, trianglePredicate) {\n return InternalMultiPick(scene, (world) => {\n if (!scene._pickWithRayInverseMatrix) {\n scene._pickWithRayInverseMatrix = Matrix.Identity();\n }\n world.invertToRef(scene._pickWithRayInverseMatrix);\n if (!scene._cachedRayForTransform) {\n scene._cachedRayForTransform = Ray.Zero();\n }\n Ray.TransformToRef(ray, scene._pickWithRayInverseMatrix, scene._cachedRayForTransform);\n return scene._cachedRayForTransform;\n }, predicate, trianglePredicate);\n}\n/**\n * Gets a ray in the forward direction from the camera.\n * @param camera Defines the camera to use to get the ray from\n * @param length Defines the length of the ray to create\n * @param transform Defines the transform to apply to the ray, by default the world matrix is used to create a workd space ray\n * @param origin Defines the start point of the ray which defaults to the camera position\n * @returns the forward ray\n */\nexport function GetForwardRay(camera, length = 100, transform, origin) {\n return GetForwardRayToRef(camera, new Ray(Vector3.Zero(), Vector3.Zero(), length), length, transform, origin);\n}\n/**\n * Gets a ray in the forward direction from the camera.\n * @param camera Defines the camera to use to get the ray from\n * @param refRay the ray to (re)use when setting the values\n * @param length Defines the length of the ray to create\n * @param transform Defines the transform to apply to the ray, by default the world matrx is used to create a workd space ray\n * @param origin Defines the start point of the ray which defaults to the camera position\n * @returns the forward ray\n */\nexport function GetForwardRayToRef(camera, refRay, length = 100, transform, origin) {\n if (!transform) {\n transform = camera.getWorldMatrix();\n }\n refRay.length = length;\n if (origin) {\n refRay.origin.copyFrom(origin);\n }\n else {\n refRay.origin.copyFrom(camera.position);\n }\n const forward = TmpVectors.Vector3[2];\n forward.set(0, 0, camera._scene.useRightHandedSystem ? -1 : 1);\n const worldForward = TmpVectors.Vector3[3];\n Vector3.TransformNormalToRef(forward, transform, worldForward);\n Vector3.NormalizeToRef(worldForward, refRay.direction);\n return refRay;\n}\n/**\n * Initialize the minimal interdependecies between the Ray and Scene and Camera\n * @param sceneClass defines the scene prototype to use\n * @param cameraClass defines the camera prototype to use\n */\nexport function AddRayExtensions(sceneClass, cameraClass) {\n if (cameraClass) {\n cameraClass.prototype.getForwardRay = function (length = 100, transform, origin) {\n return GetForwardRayToRef(this, new Ray(Vector3.Zero(), Vector3.Zero(), length), length, transform, origin);\n };\n cameraClass.prototype.getForwardRayToRef = function (refRay, length = 100, transform, origin) {\n return GetForwardRayToRef(this, refRay, length, transform, origin);\n };\n }\n if (!sceneClass) {\n return;\n }\n _ImportHelper._IsPickingAvailable = true;\n sceneClass.prototype.createPickingRay = function (x, y, world, camera, cameraViewSpace = false) {\n return CreatePickingRay(this, x, y, world, camera, cameraViewSpace);\n };\n}\n//# sourceMappingURL=ray.core.js.map","import { Scene } from \"../scene\";\nimport { Camera } from \"../Cameras/camera\";\nimport { AddRayExtensions, CreatePickingRayInCameraSpace, CreatePickingRayInCameraSpaceToRef, CreatePickingRayToRef, MultiPick, MultiPickWithRay, Pick, PickWithBoundingInfo, PickWithRay, } from \"./ray.core\";\nexport * from \"./ray.core\";\n// Picking\nAddRayExtensions(Scene, Camera);\nScene.prototype.createPickingRayToRef = function (x, y, world, result, camera, cameraViewSpace = false, enableDistantPicking = false) {\n return CreatePickingRayToRef(this, x, y, world, result, camera, cameraViewSpace, enableDistantPicking);\n};\nScene.prototype.createPickingRayInCameraSpace = function (x, y, camera) {\n return CreatePickingRayInCameraSpace(this, x, y, camera);\n};\nScene.prototype.createPickingRayInCameraSpaceToRef = function (x, y, result, camera) {\n return CreatePickingRayInCameraSpaceToRef(this, x, y, result, camera);\n};\nScene.prototype.pickWithBoundingInfo = function (x, y, predicate, fastCheck, camera) {\n return PickWithBoundingInfo(this, x, y, predicate, fastCheck, camera);\n};\nScene.prototype.pick = function (x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking = false) {\n return Pick(this, x, y, predicate, fastCheck, camera, trianglePredicate, _enableDistantPicking);\n};\nScene.prototype.pickWithRay = function (ray, predicate, fastCheck, trianglePredicate) {\n return PickWithRay(this, ray, predicate, fastCheck, trianglePredicate);\n};\nScene.prototype.multiPick = function (x, y, predicate, camera, trianglePredicate) {\n return MultiPick(this, x, y, predicate, camera, trianglePredicate);\n};\nScene.prototype.multiPickWithRay = function (ray, predicate, trianglePredicate) {\n return MultiPickWithRay(this, ray, predicate, trianglePredicate);\n};\n//# sourceMappingURL=ray.js.map"],"names":["Ray","constructor","origin","direction","length","Number","MAX_VALUE","epsilon","Epsilon","this","clone","intersectsBoxMinMax","minimum","maximum","intersectionTreshold","newMinimum","_TmpVector3","copyFromFloats","x","y","z","newMaximum","inv","min","max","temp","d","maxValue","Math","abs","Infinity","intersectsBox","box","intersectsSphere","sphere","center","pyth","radius","rr","dot","intersectsTriangle","vertex0","vertex1","vertex2","edge1","edge2","pvec","tvec","qvec","subtractToRef","Vector3","CrossToRef","det","Dot","invdet","bv","bw","distance","IntersectionInfo","intersectsPlane","plane","result1","normal","result2","intersectsAxis","axis","offset","t","intersectsMesh","mesh","fastCheck","trianglePredicate","onlyBoundingInfo","worldToUse","skipBoundingInfo","tm","TmpVectors","Matrix","getWorldMatrix","invertToRef","_tmpRay","TransformToRef","Transform","intersects","intersectsMeshes","meshes","results","i","pickInfo","hit","push","sort","_comparePickingInfo","pickingInfoA","pickingInfoB","intersectionSegment","sega","segb","threshold","o","u","rsegb","v","w","scaleToRef","_Rayl","addToRef","a","b","c","e","D","sN","tN","sD","tD","_Smallnum","sc","tc","qtc","qsc","addInPlace","dP","lengthSquared","update","viewportWidth","viewportHeight","world","view","projection","enableDistantPicking","_RayDistant","Zero","unprojectRayToRef","IdentityReadOnly","CreateNew","CreateNewFromTo","end","result","CreateFromToToRef","copyFrom","sqrt","normalize","ray","matrix","TransformCoordinatesToRef","TransformNormalToRef","dir","len","num","sourceX","sourceY","multiplyToRef","invert","engine","EngineStore","LastCreatedEngine","nearScreenSource","useReverseDepthBuffer","isNDCHalfZRange","farScreenSource","nearVec3","farVec3","_UnprojectFromInvertedMatrixToRef","CreatePickingRay","scene","camera","cameraViewSpace","CreatePickingRayToRef","getEngine","activeCamera","cameraViewport","viewport","renderHeight","getRenderHeight","vx","vy","width","height","toGlobal","getRenderWidth","levelInv","getHardwareScalingLevel","getViewMatrix","getProjectionMatrix","CreatePickingRayInCameraSpace","CreatePickingRayInCameraSpaceToRef","PickingInfo","Error","identity","Identity","InternalPickForMesh","pickingInfo","rayFunction","InternalPick","predicate","computeWorldMatrixForCamera","activeCameras","cameraToUseForPointers","currentCamera","picker","meshIndex","isEnabled","isVisible","isPickable","forceCompute","isWorldMatrixCameraDependent","computeWorldMatrix","hasThinInstances","thinInstanceEnablePicking","tmpMatrix","thinMatrices","thinInstanceGetWorldMatrices","index","thinInstanceIndex","InternalMultiPick","pickingInfos","PickWithBoundingInfo","_tempPickingRay","Pick","_enableDistantPicking","PickWithRay","_pickWithRayInverseMatrix","_cachedRayForTransform","MultiPick","MultiPickWithRay","GetForwardRayToRef","refRay","transform","position","forward","set","_scene","useRightHandedSystem","worldForward","NormalizeToRef","AddRayExtensions","sceneClass","cameraClass","prototype","getForwardRay","getForwardRayToRef","_ImportHelper","_IsPickingAvailable","createPickingRay","BuildArray","Scene","Camera","createPickingRayToRef","createPickingRayInCameraSpace","createPickingRayInCameraSpaceToRef","pickWithBoundingInfo","pick","pickWithRay","multiPick","multiPickWithRay"],"mappings":"8HAgBO,MAAMA,EAQT,WAAAC,CAEAC,EAEAC,EAEAC,EAASC,OAAOC,UAEhBC,EAAUC,GACNC,KAAKP,OAASA,EACdO,KAAKN,UAAYA,EACjBM,KAAKL,OAASA,EACdK,KAAKF,QAAUA,CACvB,CAMI,KAAAG,GACI,OAAO,IAAIV,EAAIS,KAAKP,OAAOQ,QAASD,KAAKN,UAAUO,QAASD,KAAKL,OACzE,CASI,mBAAAO,CAAoBC,EAASC,EAASC,EAAuB,GACzD,MAAMC,EAAaf,EAAIgB,YAAY,GAAGC,eAAeL,EAAQM,EAAIJ,EAAsBF,EAAQO,EAAIL,EAAsBF,EAAQQ,EAAIN,GAC/HO,EAAarB,EAAIgB,YAAY,GAAGC,eAAeJ,EAAQK,EAAIJ,EAAsBD,EAAQM,EAAIL,EAAsBD,EAAQO,EAAIN,GACrI,IAEIQ,EACAC,EACAC,EACAC,EALAC,EAAI,EACJC,EAAWtB,OAAOC,UAKtB,GAAIsB,KAAKC,IAAIpB,KAAKN,UAAUe,GAAK,MAC7B,GAAIT,KAAKP,OAAOgB,EAAIH,EAAWG,GAAKT,KAAKP,OAAOgB,EAAIG,EAAWH,EAC3D,OAAO,OAiBX,GAbAI,EAAM,EAAMb,KAAKN,UAAUe,EAC3BK,GAAOR,EAAWG,EAAIT,KAAKP,OAAOgB,GAAKI,EACvCE,GAAOH,EAAWH,EAAIT,KAAKP,OAAOgB,GAAKI,EACnCE,KAASM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