@babylonjs/viewer 7.31.2-alpha → 7.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configuration/configuration.d.ts +107 -0
- package/configuration/configuration.js +16 -0
- package/configuration/configuration.js.map +1 -0
- package/configuration/configurationCompatibility.d.ts +8 -0
- package/configuration/configurationCompatibility.js +66 -0
- package/configuration/configurationCompatibility.js.map +1 -0
- package/configuration/configurationContainer.d.ts +10 -0
- package/configuration/configurationContainer.js +10 -0
- package/configuration/configurationContainer.js.map +1 -0
- package/configuration/globals.d.ts +6 -0
- package/configuration/globals.js +18 -0
- package/configuration/globals.js.map +1 -0
- package/configuration/index.d.ts +2 -0
- package/configuration/index.js +4 -0
- package/configuration/index.js.map +1 -0
- package/configuration/interfaces/cameraConfiguration.d.ts +31 -0
- package/configuration/interfaces/cameraConfiguration.js +2 -0
- package/configuration/interfaces/cameraConfiguration.js.map +1 -0
- package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -0
- package/configuration/interfaces/colorGradingConfiguration.js +2 -0
- package/configuration/interfaces/colorGradingConfiguration.js.map +1 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +2 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -0
- package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -0
- package/configuration/interfaces/environmentMapConfiguration.js +2 -0
- package/configuration/interfaces/environmentMapConfiguration.js.map +1 -0
- package/configuration/interfaces/groundConfiguration.d.ts +24 -0
- package/configuration/interfaces/groundConfiguration.js +2 -0
- package/configuration/interfaces/groundConfiguration.js.map +1 -0
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +45 -0
- package/configuration/interfaces/imageProcessingConfiguration.js +2 -0
- package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -0
- package/configuration/interfaces/index.d.ts +15 -0
- package/configuration/interfaces/index.js +16 -0
- package/configuration/interfaces/index.js.map +1 -0
- package/configuration/interfaces/lightConfiguration.d.ts +60 -0
- package/configuration/interfaces/lightConfiguration.js +2 -0
- package/configuration/interfaces/lightConfiguration.js.map +1 -0
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -0
- package/configuration/interfaces/modelAnimationConfiguration.js +2 -0
- package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -0
- package/configuration/interfaces/modelConfiguration.d.ts +65 -0
- package/configuration/interfaces/modelConfiguration.js +2 -0
- package/configuration/interfaces/modelConfiguration.js.map +1 -0
- package/configuration/interfaces/observersConfiguration.d.ts +5 -0
- package/configuration/interfaces/observersConfiguration.js +2 -0
- package/configuration/interfaces/observersConfiguration.js.map +1 -0
- package/configuration/interfaces/sceneConfiguration.d.ts +48 -0
- package/configuration/interfaces/sceneConfiguration.js +2 -0
- package/configuration/interfaces/sceneConfiguration.js.map +1 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.js +2 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -0
- package/configuration/interfaces/skyboxConfiguration.d.ts +21 -0
- package/configuration/interfaces/skyboxConfiguration.js +2 -0
- package/configuration/interfaces/skyboxConfiguration.js.map +1 -0
- package/configuration/interfaces/templateConfiguration.d.ts +67 -0
- package/configuration/interfaces/templateConfiguration.js +2 -0
- package/configuration/interfaces/templateConfiguration.js.map +1 -0
- package/configuration/interfaces/vrConfiguration.d.ts +16 -0
- package/configuration/interfaces/vrConfiguration.js +2 -0
- package/configuration/interfaces/vrConfiguration.js.map +1 -0
- package/configuration/loader.d.ts +4 -0
- package/configuration/loader.js +17 -0
- package/configuration/loader.js.map +1 -0
- package/configuration/mappers.d.ts +43 -0
- package/configuration/mappers.js +192 -0
- package/configuration/mappers.js.map +1 -0
- package/configuration/renderOnlyLoader.d.ts +33 -0
- package/configuration/renderOnlyLoader.js +162 -0
- package/configuration/renderOnlyLoader.js.map +1 -0
- package/configuration/types/default.d.ts +6 -0
- package/configuration/types/default.js +121 -0
- package/configuration/types/default.js.map +1 -0
- package/configuration/types/environmentMap.d.ts +5 -0
- package/configuration/types/environmentMap.js +14 -0
- package/configuration/types/environmentMap.js.map +1 -0
- package/configuration/types/extended.d.ts +6 -0
- package/configuration/types/extended.js +317 -0
- package/configuration/types/extended.js.map +1 -0
- package/configuration/types/index.d.ts +14 -0
- package/configuration/types/index.js +51 -0
- package/configuration/types/index.js.map +1 -0
- package/configuration/types/minimal.d.ts +6 -0
- package/configuration/types/minimal.js +43 -0
- package/configuration/types/minimal.js.map +1 -0
- package/configuration/types/renderOnlyDefault.d.ts +30 -0
- package/configuration/types/renderOnlyDefault.js +31 -0
- package/configuration/types/renderOnlyDefault.js.map +1 -0
- package/configuration/types/shadowLight.d.ts +9 -0
- package/configuration/types/shadowLight.js +64 -0
- package/configuration/types/shadowLight.js.map +1 -0
- package/helper/index.d.ts +29 -0
- package/helper/index.js +66 -0
- package/helper/index.js.map +1 -0
- package/index.d.ts +30 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/initializer.d.ts +11 -0
- package/initializer.js +35 -0
- package/initializer.js.map +1 -0
- package/interfaces.d.ts +5 -0
- package/interfaces.js +7 -0
- package/interfaces.js.map +1 -0
- package/labs/environmentSerializer.d.ts +126 -0
- package/labs/environmentSerializer.js +191 -0
- package/labs/environmentSerializer.js.map +1 -0
- package/labs/texture.d.ts +183 -0
- package/labs/texture.js +350 -0
- package/labs/texture.js.map +1 -0
- package/labs/viewerLabs.d.ts +51 -0
- package/labs/viewerLabs.js +134 -0
- package/labs/viewerLabs.js.map +1 -0
- package/loader/modelLoader.d.ts +56 -0
- package/loader/modelLoader.js +199 -0
- package/loader/modelLoader.js.map +1 -0
- package/loader/plugins/applyMaterialConfig.d.ts +12 -0
- package/loader/plugins/applyMaterialConfig.js +16 -0
- package/loader/plugins/applyMaterialConfig.js.map +1 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.js +16 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -0
- package/loader/plugins/index.d.ts +19 -0
- package/loader/plugins/index.js +44 -0
- package/loader/plugins/index.js.map +1 -0
- package/loader/plugins/loaderPlugin.d.ts +24 -0
- package/loader/plugins/loaderPlugin.js +2 -0
- package/loader/plugins/loaderPlugin.js.map +1 -0
- package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -0
- package/loader/plugins/msftLodLoaderPlugin.js +21 -0
- package/loader/plugins/msftLodLoaderPlugin.js.map +1 -0
- package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -0
- package/loader/plugins/telemetryLoaderPlugin.js +36 -0
- package/loader/plugins/telemetryLoaderPlugin.js.map +1 -0
- package/managers/observablesManager.d.ts +66 -0
- package/managers/observablesManager.js +35 -0
- package/managers/observablesManager.js.map +1 -0
- package/managers/sceneManager.d.ts +245 -0
- package/managers/sceneManager.js +1375 -0
- package/managers/sceneManager.js.map +1 -0
- package/managers/telemetryManager.d.ts +78 -0
- package/managers/telemetryManager.js +117 -0
- package/managers/telemetryManager.js.map +1 -0
- package/model/modelAnimation.d.ts +215 -0
- package/model/modelAnimation.js +237 -0
- package/model/modelAnimation.js.map +1 -0
- package/model/viewerModel.d.ts +233 -0
- package/model/viewerModel.js +673 -0
- package/model/viewerModel.js.map +1 -0
- package/optimizer/custom/extended.d.ts +13 -0
- package/optimizer/custom/extended.js +101 -0
- package/optimizer/custom/extended.js.map +1 -0
- package/optimizer/custom/index.d.ts +9 -0
- package/optimizer/custom/index.js +26 -0
- package/optimizer/custom/index.js.map +1 -0
- package/package.json +27 -18
- package/readme.md +21 -145
- package/renderOnlyIndex.d.ts +11 -0
- package/renderOnlyIndex.js +18 -0
- package/renderOnlyIndex.js.map +1 -0
- package/templating/eventManager.d.ts +35 -0
- package/templating/eventManager.js +66 -0
- package/templating/eventManager.js.map +1 -0
- package/templating/plugins/hdButtonPlugin.d.ts +9 -0
- package/templating/plugins/hdButtonPlugin.js +21 -0
- package/templating/plugins/hdButtonPlugin.js.map +1 -0
- package/templating/plugins/printButton.d.ts +9 -0
- package/templating/plugins/printButton.js +40 -0
- package/templating/plugins/printButton.js.map +1 -0
- package/templating/templateManager.d.ts +197 -0
- package/templating/templateManager.js +561 -0
- package/templating/templateManager.js.map +1 -0
- package/templating/viewerTemplatePlugin.d.ts +21 -0
- package/templating/viewerTemplatePlugin.js +69 -0
- package/templating/viewerTemplatePlugin.js.map +1 -0
- package/viewer/defaultViewer.d.ts +130 -0
- package/viewer/defaultViewer.js +672 -0
- package/viewer/defaultViewer.js.map +1 -0
- package/viewer/renderOnlyViewer.d.ts +9 -0
- package/viewer/renderOnlyViewer.js +46 -0
- package/viewer/renderOnlyViewer.js.map +1 -0
- package/viewer/viewer.d.ts +258 -0
- package/viewer/viewer.js +783 -0
- package/viewer/viewer.js.map +1 -0
- package/viewer/viewerManager.d.ts +58 -0
- package/viewer/viewerManager.js +91 -0
- package/viewer/viewerManager.js.map +1 -0
- package/viewer/viewerWithTemplate.d.ts +9 -0
- package/viewer/viewerWithTemplate.js +20 -0
- package/viewer/viewerWithTemplate.js.map +1 -0
- package/assets/photoStudio.env +0 -0
- package/dist/babylon-viewer.esm.js +0 -2
- package/dist/babylon-viewer.esm.js.map +0 -1
- package/dist/babylon-viewer.esm.min.js +0 -2
- package/dist/babylon-viewer.esm.min.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-Bu99wg1Z.esm.min.js +0 -2
- package/dist/chunks/EXT_lights_image_based-Bu99wg1Z.esm.min.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-DPqrDbn9.esm.js +0 -172
- package/dist/chunks/EXT_lights_image_based-DPqrDbn9.esm.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-CPBiRAdj.esm.min.js +0 -2
- package/dist/chunks/EXT_mesh_gpu_instancing-CPBiRAdj.esm.min.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-DhIDgDVg.esm.js +0 -86
- package/dist/chunks/EXT_mesh_gpu_instancing-DhIDgDVg.esm.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-D_mGpseT.esm.js +0 -134
- package/dist/chunks/EXT_meshopt_compression-D_mGpseT.esm.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-vbCzUEGj.esm.min.js +0 -2
- package/dist/chunks/EXT_meshopt_compression-vbCzUEGj.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-BCVXrZxi.esm.js +0 -44
- package/dist/chunks/EXT_texture_avif-BCVXrZxi.esm.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-BgCdr3Jj.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_avif-BgCdr3Jj.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-C7SZVBRt.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_webp-C7SZVBRt.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-CUdLff6B.esm.js +0 -43
- package/dist/chunks/EXT_texture_webp-CUdLff6B.esm.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-Bcup1Yvu.esm.js +0 -64
- package/dist/chunks/ExtrasAsMetadata-Bcup1Yvu.esm.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-mhWZ5cxz.esm.min.js +0 -2
- package/dist/chunks/ExtrasAsMetadata-mhWZ5cxz.esm.min.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-CG9HzgYY.esm.js +0 -343
- package/dist/chunks/KHR_animation_pointer-CG9HzgYY.esm.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-Ds9iVKW1.esm.min.js +0 -2
- package/dist/chunks/KHR_animation_pointer-Ds9iVKW1.esm.min.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-B5PdyfsM.esm.js +0 -610
- package/dist/chunks/KHR_draco_mesh_compression-B5PdyfsM.esm.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-BLmRwuRi.esm.min.js +0 -2
- package/dist/chunks/KHR_draco_mesh_compression-BLmRwuRi.esm.min.js.map +0 -1
- package/dist/chunks/KHR_interactivity-CtK0-uvj.esm.js +0 -4033
- package/dist/chunks/KHR_interactivity-CtK0-uvj.esm.js.map +0 -1
- package/dist/chunks/KHR_interactivity-DMuDcgyC.esm.min.js +0 -2
- package/dist/chunks/KHR_interactivity-DMuDcgyC.esm.min.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-BFl9FZcO.esm.min.js +0 -2
- package/dist/chunks/KHR_lights_punctual-BFl9FZcO.esm.min.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-BpH9gcZp.esm.js +0 -1253
- package/dist/chunks/KHR_lights_punctual-BpH9gcZp.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-masLGEgT.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_anisotropy-masLGEgT.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-rXmfwDo1.esm.js +0 -64
- package/dist/chunks/KHR_materials_anisotropy-rXmfwDo1.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-BFN54hPf.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_clearcoat-BFN54hPf.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-DjV_jpZT.esm.js +0 -96
- package/dist/chunks/KHR_materials_clearcoat-DjV_jpZT.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-BhBeIoHv.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_diffuse_transmission-BhBeIoHv.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-CoQNIcsw.esm.js +0 -97
- package/dist/chunks/KHR_materials_diffuse_transmission-CoQNIcsw.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-Cprz2cPV.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_dispersion-Cprz2cPV.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-DGOicDvV.esm.js +0 -62
- package/dist/chunks/KHR_materials_dispersion-DGOicDvV.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-C4_YqG8q.esm.js +0 -55
- package/dist/chunks/KHR_materials_emissive_strength-C4_YqG8q.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-W2dd4r-6.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_emissive_strength-W2dd4r-6.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-BYU-vY5Q.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_ior-BYU-vY5Q.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-DccpU3gD.esm.js +0 -64
- package/dist/chunks/KHR_materials_ior-DccpU3gD.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-D0szEfE_.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_iridescence-D0szEfE_.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-DmIcVACG.esm.js +0 -72
- package/dist/chunks/KHR_materials_iridescence-DmIcVACG.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-6Dp-wDua.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-6Dp-wDua.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B2O4xz4s.esm.js +0 -81
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-B2O4xz4s.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-Bjgqqags.esm.js +0 -85
- package/dist/chunks/KHR_materials_sheen-Bjgqqags.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-CQ9RWHBq.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_sheen-CQ9RWHBq.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-8OIOS29B.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_specular-8OIOS29B.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-DGSiysaL.esm.js +0 -75
- package/dist/chunks/KHR_materials_specular-DGSiysaL.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-B95PX_5_.esm.js +0 -307
- package/dist/chunks/KHR_materials_transmission-B95PX_5_.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-CKbVlHxS.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_transmission-CKbVlHxS.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-BxBOrDgv.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_unlit-BxBOrDgv.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-C37iFQd7.esm.js +0 -74
- package/dist/chunks/KHR_materials_unlit-C37iFQd7.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-8noH_WpN.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_variants-8noH_WpN.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-Du6GDv5B.esm.js +0 -238
- package/dist/chunks/KHR_materials_variants-Du6GDv5B.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-CEAHNMZ8.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_volume-CEAHNMZ8.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-FkLUpsDT.esm.js +0 -87
- package/dist/chunks/KHR_materials_volume-FkLUpsDT.esm.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-6Xt7UB1S.esm.min.js +0 -2
- package/dist/chunks/KHR_mesh_quantization-6Xt7UB1S.esm.min.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-c4wmYmTF.esm.js +0 -26
- package/dist/chunks/KHR_mesh_quantization-c4wmYmTF.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-8-bmR0TW.esm.js +0 -43
- package/dist/chunks/KHR_texture_basisu-8-bmR0TW.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-DwTpt_z2.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_basisu-DwTpt_z2.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-BQ15bsLB.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_transform-BQ15bsLB.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-wFFha0xp.esm.js +0 -63
- package/dist/chunks/KHR_texture_transform-wFFha0xp.esm.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-CeNxplLR.esm.js +0 -51
- package/dist/chunks/KHR_xmp_json_ld-CeNxplLR.esm.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-DhU3iBNH.esm.min.js +0 -2
- package/dist/chunks/KHR_xmp_json_ld-DhU3iBNH.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-BnRYwq4E.esm.min.js +0 -2
- package/dist/chunks/MSFT_audio_emitter-BnRYwq4E.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-DkqPp6tN.esm.js +0 -2207
- package/dist/chunks/MSFT_audio_emitter-DkqPp6tN.esm.js.map +0 -1
- package/dist/chunks/MSFT_lod-BCEIzSnI.esm.min.js +0 -2
- package/dist/chunks/MSFT_lod-BCEIzSnI.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_lod-CO61R8sw.esm.js +0 -337
- package/dist/chunks/MSFT_lod-CO61R8sw.esm.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-BH3sIkON.esm.js +0 -46
- package/dist/chunks/MSFT_minecraftMesh-BH3sIkON.esm.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-Q1BsF4PP.esm.min.js +0 -2
- package/dist/chunks/MSFT_minecraftMesh-Q1BsF4PP.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-CPT3PGJ2.esm.js +0 -47
- package/dist/chunks/MSFT_sRGBFactors-CPT3PGJ2.esm.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-guWHOMlP.esm.min.js +0 -2
- package/dist/chunks/MSFT_sRGBFactors-guWHOMlP.esm.min.js.map +0 -1
- package/dist/chunks/animationGroup-BV7aO-eR.esm.min.js +0 -2
- package/dist/chunks/animationGroup-BV7aO-eR.esm.min.js.map +0 -1
- package/dist/chunks/animationGroup-fRNxtHpE.esm.js +0 -2479
- package/dist/chunks/animationGroup-fRNxtHpE.esm.js.map +0 -1
- package/dist/chunks/assetContainer-C2D4MNHn.esm.min.js +0 -2
- package/dist/chunks/assetContainer-C2D4MNHn.esm.min.js.map +0 -1
- package/dist/chunks/assetContainer-ferB6yjl.esm.js +0 -1720
- package/dist/chunks/assetContainer-ferB6yjl.esm.js.map +0 -1
- package/dist/chunks/audioEngine-Dl13mOqb.esm.js +0 -305
- package/dist/chunks/audioEngine-Dl13mOqb.esm.js.map +0 -1
- package/dist/chunks/audioEngine-SZREW2D_.esm.min.js +0 -2
- package/dist/chunks/audioEngine-SZREW2D_.esm.min.js.map +0 -1
- package/dist/chunks/bakedVertexAnimation-4aXg91oO.esm.js +0 -119
- package/dist/chunks/bakedVertexAnimation-4aXg91oO.esm.js.map +0 -1
- package/dist/chunks/bakedVertexAnimation-T3cED2HN.esm.min.js +0 -2
- package/dist/chunks/bakedVertexAnimation-T3cED2HN.esm.min.js.map +0 -1
- package/dist/chunks/basisTextureLoader-DSGQZib9.esm.js +0 -600
- package/dist/chunks/basisTextureLoader-DSGQZib9.esm.js.map +0 -1
- package/dist/chunks/basisTextureLoader-v4_o_fMz.esm.min.js +0 -2
- package/dist/chunks/basisTextureLoader-v4_o_fMz.esm.min.js.map +0 -1
- package/dist/chunks/dds-CDf6Vnct.esm.min.js +0 -2
- package/dist/chunks/dds-CDf6Vnct.esm.min.js.map +0 -1
- package/dist/chunks/dds-DPWUjtZm.esm.js +0 -540
- package/dist/chunks/dds-DPWUjtZm.esm.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-B5jRVr5R.esm.js +0 -88
- package/dist/chunks/ddsTextureLoader-B5jRVr5R.esm.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-CHfJAMFs.esm.min.js +0 -2
- package/dist/chunks/ddsTextureLoader-CHfJAMFs.esm.min.js.map +0 -1
- package/dist/chunks/decalFragment-5zyWGFEd.esm.js +0 -18
- package/dist/chunks/decalFragment-5zyWGFEd.esm.js.map +0 -1
- package/dist/chunks/decalFragment-Cn-fVxCI.esm.min.js +0 -2
- package/dist/chunks/decalFragment-Cn-fVxCI.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-BEoLaP7_.esm.js +0 -442
- package/dist/chunks/default.fragment-BEoLaP7_.esm.js.map +0 -1
- package/dist/chunks/default.fragment-CmKg3wkR.esm.min.js +0 -2
- package/dist/chunks/default.fragment-CmKg3wkR.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-DU5u-tKQ.esm.js +0 -505
- package/dist/chunks/default.fragment-DU5u-tKQ.esm.js.map +0 -1
- package/dist/chunks/default.fragment-JhBDSfPu.esm.min.js +0 -2
- package/dist/chunks/default.fragment-JhBDSfPu.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-CCEtWkWn.esm.min.js +0 -2
- package/dist/chunks/default.vertex-CCEtWkWn.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-DcVWTyE_.esm.js +0 -180
- package/dist/chunks/default.vertex-DcVWTyE_.esm.js.map +0 -1
- package/dist/chunks/default.vertex-uLlXP-ke.esm.min.js +0 -2
- package/dist/chunks/default.vertex-uLlXP-ke.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-vRLCIPKo.esm.js +0 -203
- package/dist/chunks/default.vertex-vRLCIPKo.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-7bWnlCRA.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-7bWnlCRA.esm.min.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-Ca6N3sbv.esm.js +0 -15
- package/dist/chunks/defaultUboDeclaration-Ca6N3sbv.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-DVI7ADQs.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-DVI7ADQs.esm.min.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-nLg0xLMZ.esm.js +0 -13
- package/dist/chunks/defaultUboDeclaration-nLg0xLMZ.esm.js.map +0 -1
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js +0 -11
- package/dist/chunks/drawWrapper.functions-CKg3_9x4.esm.js.map +0 -1
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js +0 -2
- package/dist/chunks/drawWrapper.functions-ng7lvueZ.esm.min.js.map +0 -1
- package/dist/chunks/dumpTools-CbTZsyY8.esm.js +0 -402
- package/dist/chunks/dumpTools-CbTZsyY8.esm.js.map +0 -1
- package/dist/chunks/dumpTools-D0DEZ6xo.esm.min.js +0 -2
- package/dist/chunks/dumpTools-D0DEZ6xo.esm.min.js.map +0 -1
- package/dist/chunks/engine-CJv-6a9O.esm.js +0 -2174
- package/dist/chunks/engine-CJv-6a9O.esm.js.map +0 -1
- package/dist/chunks/engine-DgducW4e.esm.min.js +0 -2
- package/dist/chunks/engine-DgducW4e.esm.min.js.map +0 -1
- package/dist/chunks/engine.common-D2W-L46m.esm.js +0 -1088
- package/dist/chunks/engine.common-D2W-L46m.esm.js.map +0 -1
- package/dist/chunks/engine.common-D4StMtLB.esm.min.js +0 -2
- package/dist/chunks/engine.common-D4StMtLB.esm.min.js.map +0 -1
- package/dist/chunks/envTextureLoader-CJc7342v.esm.js +0 -65
- package/dist/chunks/envTextureLoader-CJc7342v.esm.js.map +0 -1
- package/dist/chunks/envTextureLoader-DSspqLXm.esm.min.js +0 -2
- package/dist/chunks/envTextureLoader-DSspqLXm.esm.min.js.map +0 -1
- package/dist/chunks/environmentTextureTools-CORONKRA.esm.min.js +0 -2
- package/dist/chunks/environmentTextureTools-CORONKRA.esm.min.js.map +0 -1
- package/dist/chunks/environmentTextureTools-Swa-KQ-3.esm.js +0 -382
- package/dist/chunks/environmentTextureTools-Swa-KQ-3.esm.js.map +0 -1
- package/dist/chunks/exrTextureLoader-B9HWungW.esm.min.js +0 -2
- package/dist/chunks/exrTextureLoader-B9HWungW.esm.min.js.map +0 -1
- package/dist/chunks/exrTextureLoader-DunbcZ7d.esm.js +0 -1682
- package/dist/chunks/exrTextureLoader-DunbcZ7d.esm.js.map +0 -1
- package/dist/chunks/fogFragment-D9mC3pbA.esm.js +0 -102
- package/dist/chunks/fogFragment-D9mC3pbA.esm.js.map +0 -1
- package/dist/chunks/fogFragment-DPTJpIWQ.esm.min.js +0 -2
- package/dist/chunks/fogFragment-DPTJpIWQ.esm.min.js.map +0 -1
- package/dist/chunks/fresnelFunction-BkCWVEkT.esm.min.js +0 -2
- package/dist/chunks/fresnelFunction-BkCWVEkT.esm.min.js.map +0 -1
- package/dist/chunks/fresnelFunction-DOIp4usQ.esm.js +0 -12
- package/dist/chunks/fresnelFunction-DOIp4usQ.esm.js.map +0 -1
- package/dist/chunks/glTFLoader-CEI2fp2n.esm.js +0 -7577
- package/dist/chunks/glTFLoader-CEI2fp2n.esm.js.map +0 -1
- package/dist/chunks/glTFLoader-D7VBOuzQ.esm.min.js +0 -2
- package/dist/chunks/glTFLoader-D7VBOuzQ.esm.min.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-CH7YRgX4.esm.js +0 -77
- package/dist/chunks/glTFLoaderAnimation-CH7YRgX4.esm.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-vnFNXnU4.esm.min.js +0 -2
- package/dist/chunks/glTFLoaderAnimation-vnFNXnU4.esm.min.js.map +0 -1
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js +0 -2
- package/dist/chunks/gltfPathToObjectConverter-Dyt_Y9jE.esm.min.js.map +0 -1
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js +0 -67
- package/dist/chunks/gltfPathToObjectConverter-GcUmfOyo.esm.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-BKRAxs8o.esm.js +0 -34
- package/dist/chunks/harmonicsFunctions-BKRAxs8o.esm.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-CCZGF16P.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-CCZGF16P.esm.min.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-DhrysKHN.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-DhrysKHN.esm.min.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-QMtc217V.esm.js +0 -35
- package/dist/chunks/harmonicsFunctions-QMtc217V.esm.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-BHz9fdTt.esm.js +0 -252
- package/dist/chunks/hdrTextureLoader-BHz9fdTt.esm.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-BiWDXv7M.esm.min.js +0 -2
- package/dist/chunks/hdrTextureLoader-BiWDXv7M.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-B_X2yLxw.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-B_X2yLxw.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-BbV5qw2v.esm.js +0 -108
- package/dist/chunks/helperFunctions-BbV5qw2v.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-CIS6xTXo.esm.js +0 -80
- package/dist/chunks/helperFunctions-CIS6xTXo.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-DzZgTEml.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-DzZgTEml.esm.min.js.map +0 -1
- package/dist/chunks/index-B6NQz4kn.esm.js +0 -72142
- package/dist/chunks/index-B6NQz4kn.esm.js.map +0 -1
- package/dist/chunks/index-C7KPae9Y.esm.min.js +0 -57
- package/dist/chunks/index-C7KPae9Y.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-D40Yd5Ne.esm.js +0 -814
- package/dist/chunks/ktxTextureLoader-D40Yd5Ne.esm.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-DVCbKGMP.esm.min.js +0 -2
- package/dist/chunks/ktxTextureLoader-DVCbKGMP.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-CiQSKcW_.esm.js +0 -35
- package/dist/chunks/logDepthDeclaration-CiQSKcW_.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-DQDUiKGd.esm.js +0 -20
- package/dist/chunks/logDepthDeclaration-DQDUiKGd.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-OAjWEnc-.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-OAjWEnc-.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-eAf-B4Qw.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-eAf-B4Qw.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-BxafEG6B.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-BxafEG6B.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-D7KN8iZ6.esm.js +0 -488
- package/dist/chunks/logDepthVertex-D7KN8iZ6.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-DAIqazpL.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-DAIqazpL.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-DAZFp6e0.esm.js +0 -77
- package/dist/chunks/logDepthVertex-DAZFp6e0.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-DPJLg27c.esm.js +0 -11
- package/dist/chunks/mainUVVaryingDeclaration-DPJLg27c.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-EiRn7D3W.esm.min.js +0 -2
- package/dist/chunks/mainUVVaryingDeclaration-EiRn7D3W.esm.min.js.map +0 -1
- package/dist/chunks/meshUboDeclaration-BjHe-S8d.esm.min.js +0 -2
- package/dist/chunks/meshUboDeclaration-BjHe-S8d.esm.min.js.map +0 -1
- package/dist/chunks/meshUboDeclaration-Cn3eKbmX.esm.js +0 -24
- package/dist/chunks/meshUboDeclaration-Cn3eKbmX.esm.js.map +0 -1
- package/dist/chunks/objFileLoader-BXeddthR.esm.min.js +0 -2
- package/dist/chunks/objFileLoader-BXeddthR.esm.min.js.map +0 -1
- package/dist/chunks/objFileLoader-CFEEWIIl.esm.js +0 -1338
- package/dist/chunks/objFileLoader-CFEEWIIl.esm.js.map +0 -1
- package/dist/chunks/oitFragment-BZzzm_wf.esm.min.js +0 -2
- package/dist/chunks/oitFragment-BZzzm_wf.esm.min.js.map +0 -1
- package/dist/chunks/oitFragment-Bh1KfM3D.esm.js +0 -1210
- package/dist/chunks/oitFragment-Bh1KfM3D.esm.js.map +0 -1
- package/dist/chunks/oitFragment-DU3ZNNc6.esm.js +0 -1150
- package/dist/chunks/oitFragment-DU3ZNNc6.esm.js.map +0 -1
- package/dist/chunks/oitFragment-pjH-ZH-d.esm.min.js +0 -2
- package/dist/chunks/oitFragment-pjH-ZH-d.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-Cb0i-qvg.esm.js +0 -15
- package/dist/chunks/pass.fragment-Cb0i-qvg.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-CbfJPJcn.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-CbfJPJcn.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-DdIndJNa.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-DdIndJNa.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-vN8blXbN.esm.js +0 -15
- package/dist/chunks/pass.fragment-vN8blXbN.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-C2G0ox2-.esm.js +0 -3219
- package/dist/chunks/pbr.fragment-C2G0ox2-.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-C5Mxb1ea.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-C5Mxb1ea.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-CY45SSSY.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-CY45SSSY.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-DhchzNW7.esm.js +0 -3165
- package/dist/chunks/pbr.fragment-DhchzNW7.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-BDf74Tb0.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-BDf74Tb0.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-BmJOHGPR.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-BmJOHGPR.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-DQXclaDC.esm.js +0 -338
- package/dist/chunks/pbr.vertex-DQXclaDC.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-DzFjZN2y.esm.js +0 -210
- package/dist/chunks/pbr.vertex-DzFjZN2y.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-BBl-_7dj.esm.js +0 -18
- package/dist/chunks/postprocess.vertex-BBl-_7dj.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-BClAAKy6.esm.js +0 -20
- package/dist/chunks/postprocess.vertex-BClAAKy6.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-BkdQlwaC.esm.min.js +0 -2
- package/dist/chunks/postprocess.vertex-BkdQlwaC.esm.min.js.map +0 -1
- package/dist/chunks/postprocess.vertex-svkVyHTq.esm.min.js +0 -2
- package/dist/chunks/postprocess.vertex-svkVyHTq.esm.min.js.map +0 -1
- package/dist/chunks/rawTexture-BJRhApe5.esm.min.js +0 -2
- package/dist/chunks/rawTexture-BJRhApe5.esm.min.js.map +0 -1
- package/dist/chunks/rawTexture-C35ZUbAd.esm.js +0 -191
- package/dist/chunks/rawTexture-C35ZUbAd.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-BxTniwrX.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-BxTniwrX.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-CP7qS7gr.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-CP7qS7gr.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-QYWWsGy6.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-QYWWsGy6.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-wNMR9n-P.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-wNMR9n-P.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-BF77xQ1S.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-BF77xQ1S.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-Bd5-3JVl.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-Bd5-3JVl.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-DA0xtXAM.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-DA0xtXAM.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-DVi_k3Lf.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-DVi_k3Lf.esm.min.js.map +0 -1
- package/dist/chunks/splatFileLoader-ChunqjQD.esm.min.js +0 -2
- package/dist/chunks/splatFileLoader-ChunqjQD.esm.min.js.map +0 -1
- package/dist/chunks/splatFileLoader-DUr6gOOn.esm.js +0 -3807
- package/dist/chunks/splatFileLoader-DUr6gOOn.esm.js.map +0 -1
- package/dist/chunks/standardMaterial-D6jitvBE.esm.min.js +0 -2
- package/dist/chunks/standardMaterial-D6jitvBE.esm.min.js.map +0 -1
- package/dist/chunks/standardMaterial-DlHgPZIM.esm.js +0 -1798
- package/dist/chunks/standardMaterial-DlHgPZIM.esm.js.map +0 -1
- package/dist/chunks/stlFileLoader-5sUFJ7IH.esm.min.js +0 -2
- package/dist/chunks/stlFileLoader-5sUFJ7IH.esm.min.js.map +0 -1
- package/dist/chunks/stlFileLoader-DJ-BBX2A.esm.js +0 -238
- package/dist/chunks/stlFileLoader-DJ-BBX2A.esm.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-BVwiWJsD.esm.js +0 -349
- package/dist/chunks/tgaTextureLoader-BVwiWJsD.esm.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-DzDouJsZ.esm.min.js +0 -2
- package/dist/chunks/tgaTextureLoader-DzDouJsZ.esm.min.js.map +0 -1
- package/dist/chunks/thinEngine-By4xcB0c.esm.min.js +0 -2
- package/dist/chunks/thinEngine-By4xcB0c.esm.min.js.map +0 -1
- package/dist/chunks/thinEngine-CrA16gfj.esm.js +0 -3721
- package/dist/chunks/thinEngine-CrA16gfj.esm.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-BHC7hPty.esm.min.js +0 -2
- package/dist/chunks/thinInstanceMesh-BHC7hPty.esm.min.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-BUQi2G1Q.esm.js +0 -314
- package/dist/chunks/thinInstanceMesh-BUQi2G1Q.esm.js.map +0 -1
- package/dist/chunks/vertexColorMixing-CtCCYedT.esm.js +0 -528
- package/dist/chunks/vertexColorMixing-CtCCYedT.esm.js.map +0 -1
- package/dist/chunks/vertexColorMixing-CvZive-n.esm.min.js +0 -2
- package/dist/chunks/vertexColorMixing-CvZive-n.esm.min.js.map +0 -1
- package/dist/chunks/webgpuEngine-Bxraqzju.esm.js +0 -11214
- package/dist/chunks/webgpuEngine-Bxraqzju.esm.js.map +0 -1
- package/dist/chunks/webgpuEngine-DjPV9U5n.esm.min.js +0 -2
- package/dist/chunks/webgpuEngine-DjPV9U5n.esm.min.js.map +0 -1
- package/dist/chunks/workerPool-BUOov2K1.esm.js +0 -122
- package/dist/chunks/workerPool-BUOov2K1.esm.js.map +0 -1
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +0 -2
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +0 -1
- package/docs/ViewerDefault.jpg +0 -0
- package/docs/ViewerParts.jpg +0 -0
- package/docs/ViewerSlots.jpg +0 -0
- package/docs/ViewerStyled.jpg +0 -0
- package/lib/index.d.ts +0 -327
- package/lib/index.js +0 -1153
- package/lib/index.js.map +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { i as ShaderStore } from './index-B6NQz4kn.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-BClAAKy6.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postprocess.vertex-BClAAKy6.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,CAAC;AACvC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC;AACF;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C;AACY,MAAC,2BAA2B,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./index-C7KPae9Y.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-BkdQlwaC.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postprocess.vertex-BkdQlwaC.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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./index-C7KPae9Y.esm.min.js";const n="postprocessVertexShader",i="attribute vec2 position;uniform vec2 scale;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvUV=(position*madd+madd)*scale;gl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}";e.ShadersStore[n]=i;const o={name:n,shader:i};export{o as postprocessVertexShader};
|
|
2
|
-
//# sourceMappingURL=postprocess.vertex-svkVyHTq.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postprocess.vertex-svkVyHTq.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/postprocess.vertex.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nconst name = \"postprocessVertexShader\";\nconst shader = `attribute vec2 position;uniform vec2 scale;varying vec2 vUV;const vec2 madd=vec2(0.5,0.5);\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\nvUV=(position*madd+madd)*scale;gl_Position=vec4(position,0.0,1.0);\n#define CUSTOM_VERTEX_MAIN_END\n}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const postprocessVertexShader = { name, shader };\n//# sourceMappingURL=postprocess.vertex.js.map"],"names":["name","shader","ShaderStore","ShadersStore","postprocessVertexShader"],"mappings":"gDAEA,MAAMA,EAAO,0BACPC,EAAS,4RAQfC,EAAYC,aAAaH,GAAQC,EAErB,MAACG,EAA0B,CAAEJ,OAAMC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{q as e,C as t}from"./index-C7KPae9Y.esm.min.js";class T extends e{constructor(T,E,r,R,_,i=!0,n=!1,A=t.TEXTURE_TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_UNSIGNED_INT,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(T,E,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 T(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,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new T(e,E,r,t.TEXTUREFORMAT_LUMINANCE,R,_,i,n)}static CreateLuminanceAlphaTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new T(e,E,r,t.TEXTUREFORMAT_LUMINANCE_ALPHA,R,_,i,n)}static CreateAlphaTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE){return new T(e,E,r,t.TEXTUREFORMAT_ALPHA,R,_,i,n)}static CreateRGBTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_INT,s=0,u=!1){return new T(e,E,r,t.TEXTUREFORMAT_RGB,R,_,i,n,A,s,u)}static CreateRGBATexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_INT,s=0,u=!1){return new T(e,E,r,t.TEXTUREFORMAT_RGBA,R,_,i,n,A,s,u)}static CreateRGBAStorageTexture(e,E,r,R,_=!0,i=!1,n=t.TEXTURE_TRILINEAR_SAMPLINGMODE,A=t.TEXTURETYPE_UNSIGNED_INT,s=!1){return new T(e,E,r,t.TEXTUREFORMAT_RGBA,R,_,i,n,A,t.TEXTURE_CREATIONFLAG_STORAGE,s)}static CreateRTexture(E,r,R,_,i=!0,n=!1,A=e.TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_FLOAT){return new T(E,r,R,t.TEXTUREFORMAT_R,_,i,n,A,s)}static CreateRStorageTexture(E,r,R,_,i=!0,n=!1,A=e.TRILINEAR_SAMPLINGMODE,s=t.TEXTURETYPE_FLOAT){return new T(E,r,R,t.TEXTUREFORMAT_R,_,i,n,A,s,t.TEXTURE_CREATIONFLAG_STORAGE)}}export{T as R};
|
|
2
|
-
//# sourceMappingURL=rawTexture-BJRhApe5.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rawTexture-BJRhApe5.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_INT, 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_INT, 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_INT, 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_INT, 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_INT","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":"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"}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { q as Texture, C as Constants } from './index-B6NQz4kn.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_INT, 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_INT, 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_INT, 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_INT, 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-C35ZUbAd.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rawTexture-C35ZUbAd.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_INT, 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_INT, 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_INT, 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_INT, 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":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./index-C7KPae9Y.esm.min.js";import"./helperFunctions-B_X2yLxw.esm.min.js";const r="rgbdDecodePixelShader",t="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}";e.ShadersStoreWGSL[r]=t;const n={name:r,shader:t};export{n as rgbdDecodePixelShaderWGSL};
|
|
2
|
-
//# sourceMappingURL=rgbdDecode.fragment-BxTniwrX.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgbdDecode.fragment-BxTniwrX.esm.min.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStoreWGSL","rgbdDecodePixelShaderWGSL"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,qUAMfC,EAAYC,iBAAiBH,GAAQC,EAEzB,MAACG,EAA4B,CAAEJ,OAAMC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { i as ShaderStore } from './index-B6NQz4kn.esm.js';
|
|
2
|
-
import './helperFunctions-CIS6xTXo.esm.js';
|
|
3
|
-
|
|
4
|
-
// Do not edit.
|
|
5
|
-
const name = "rgbdDecodePixelShader";
|
|
6
|
-
const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
|
|
7
|
-
#include<helperFunctions>
|
|
8
|
-
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
9
|
-
@fragment
|
|
10
|
-
fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;
|
|
11
|
-
// Sideeffect
|
|
12
|
-
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
13
|
-
/** @internal */
|
|
14
|
-
const rgbdDecodePixelShaderWGSL = { name, shader };
|
|
15
|
-
|
|
16
|
-
export { rgbdDecodePixelShaderWGSL };
|
|
17
|
-
//# sourceMappingURL=rgbdDecode.fragment-CP7qS7gr.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgbdDecode.fragment-CP7qS7gr.esm.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=vec4f(fromRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,2JAA2J,CAAC,CAAC;AAC7J;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C;AACY,MAAC,yBAAyB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { i as ShaderStore } from './index-B6NQz4kn.esm.js';
|
|
2
|
-
import './helperFunctions-BbV5qw2v.esm.js';
|
|
3
|
-
|
|
4
|
-
// Do not edit.
|
|
5
|
-
const name = "rgbdDecodePixelShader";
|
|
6
|
-
const shader = `varying vec2 vUV;uniform sampler2D textureSampler;
|
|
7
|
-
#include<helperFunctions>
|
|
8
|
-
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
9
|
-
void main(void)
|
|
10
|
-
{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;
|
|
11
|
-
// Sideeffect
|
|
12
|
-
ShaderStore.ShadersStore[name] = shader;
|
|
13
|
-
/** @internal */
|
|
14
|
-
const rgbdDecodePixelShader = { name, shader };
|
|
15
|
-
|
|
16
|
-
export { rgbdDecodePixelShader };
|
|
17
|
-
//# sourceMappingURL=rgbdDecode.fragment-QYWWsGy6.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgbdDecode.fragment-QYWWsGy6.esm.js","sources":["../../../../../dev/core/dist/Shaders/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,iEAAiE,CAAC,CAAC;AACnE;AACA,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC;AACY,MAAC,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./index-C7KPae9Y.esm.min.js";import"./helperFunctions-DzZgTEml.esm.min.js";const r="rgbdDecodePixelShader",n="varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}";e.ShadersStore[r]=n;const o={name:r,shader:n};export{o as rgbdDecodePixelShader};
|
|
2
|
-
//# sourceMappingURL=rgbdDecode.fragment-wNMR9n-P.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgbdDecode.fragment-wNMR9n-P.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/rgbdDecode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdDecodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdDecodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdDecode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStore","rgbdDecodePixelShader"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,0MAMfC,EAAYC,aAAaH,GAAQC,EAErB,MAACG,EAAwB,CAAEJ,OAAMC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { i as ShaderStore } from './index-B6NQz4kn.esm.js';
|
|
2
|
-
import './helperFunctions-BbV5qw2v.esm.js';
|
|
3
|
-
|
|
4
|
-
// Do not edit.
|
|
5
|
-
const name = "rgbdEncodePixelShader";
|
|
6
|
-
const shader = `varying vec2 vUV;uniform sampler2D textureSampler;
|
|
7
|
-
#include<helperFunctions>
|
|
8
|
-
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
9
|
-
void main(void)
|
|
10
|
-
{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;
|
|
11
|
-
// Sideeffect
|
|
12
|
-
ShaderStore.ShadersStore[name] = shader;
|
|
13
|
-
/** @internal */
|
|
14
|
-
const rgbdEncodePixelShader = { name, shader };
|
|
15
|
-
|
|
16
|
-
export { rgbdEncodePixelShader };
|
|
17
|
-
//# sourceMappingURL=rgbdEncode.fragment-BF77xQ1S.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgbdEncode.fragment-BF77xQ1S.esm.js","sources":["../../../../../dev/core/dist/Shaders/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,yDAAyD,CAAC,CAAC;AAC3D;AACA,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AACxC;AACY,MAAC,qBAAqB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./index-C7KPae9Y.esm.min.js";import"./helperFunctions-B_X2yLxw.esm.min.js";const r="rgbdEncodePixelShader",t="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}";e.ShadersStoreWGSL[r]=t;const n={name:r,shader:t};export{n as rgbdEncodePixelShaderWGSL};
|
|
2
|
-
//# sourceMappingURL=rgbdEncode.fragment-Bd5-3JVl.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgbdEncode.fragment-Bd5-3JVl.esm.min.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStoreWGSL","rgbdEncodePixelShaderWGSL"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,4TAMfC,EAAYC,iBAAiBH,GAAQC,EAEzB,MAACG,EAA4B,CAAEJ,OAAMC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { i as ShaderStore } from './index-B6NQz4kn.esm.js';
|
|
2
|
-
import './helperFunctions-CIS6xTXo.esm.js';
|
|
3
|
-
|
|
4
|
-
// Do not edit.
|
|
5
|
-
const name = "rgbdEncodePixelShader";
|
|
6
|
-
const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
|
|
7
|
-
#include<helperFunctions>
|
|
8
|
-
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
9
|
-
@fragment
|
|
10
|
-
fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;
|
|
11
|
-
// Sideeffect
|
|
12
|
-
ShaderStore.ShadersStoreWGSL[name] = shader;
|
|
13
|
-
/** @internal */
|
|
14
|
-
const rgbdEncodePixelShaderWGSL = { name, shader };
|
|
15
|
-
|
|
16
|
-
export { rgbdEncodePixelShaderWGSL };
|
|
17
|
-
//# sourceMappingURL=rgbdEncode.fragment-DA0xtXAM.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgbdEncode.fragment-DA0xtXAM.esm.js","sources":["../../../../../dev/core/dist/ShadersWGSL/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=toRGBD(textureSample(textureSampler,textureSamplerSampler,input.vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStoreWGSL[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShaderWGSL = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":[],"mappings":";;;AAAA;AAGA,MAAM,IAAI,GAAG,uBAAuB,CAAC;AACrC,MAAM,MAAM,GAAG,CAAC;AAChB;AACA;AACA;AACA,kJAAkJ,CAAC,CAAC;AACpJ;AACA,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C;AACY,MAAC,yBAAyB,GAAG,EAAE,IAAI,EAAE,MAAM;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./index-C7KPae9Y.esm.min.js";import"./helperFunctions-DzZgTEml.esm.min.js";const r="rgbdEncodePixelShader",n="varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}";e.ShadersStore[r]=n;const o={name:r,shader:n};export{o as rgbdEncodePixelShader};
|
|
2
|
-
//# sourceMappingURL=rgbdEncode.fragment-DVi_k3Lf.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rgbdEncode.fragment-DVi_k3Lf.esm.min.js","sources":["../../../../../dev/core/dist/Shaders/rgbdEncode.fragment.js"],"sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/helperFunctions\";\nconst name = \"rgbdEncodePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;\n#include<helperFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @internal */\nexport const rgbdEncodePixelShader = { name, shader };\n//# sourceMappingURL=rgbdEncode.fragment.js.map"],"names":["name","shader","ShaderStore","ShadersStore","rgbdEncodePixelShader"],"mappings":"8FAGA,MAAMA,EAAO,wBACPC,EAAS,kMAMfC,EAAYC,aAAaH,GAAQC,EAErB,MAACG,EAAwB,CAAEJ,OAAMC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,R as t,x as s,y as i,z as r,H as n,J as o,K as a,N as c,Q as l,W as u,X as h,Y as d,Z as _,_ as p,V as m,$ as x,a0 as f,M as g,a1 as y,t as T,v,a2 as w,a3 as C,L as A,a4 as P,T as b,a5 as M,C as R,a6 as I,s as S,a7 as E,k as D,a8 as k,a9 as F,aa as V,ab as z,E as U,ac as B,ad as L,ae as N,p as O,af as W,ag as Z,B as X,ah as G,w as H}from"./index-C7KPae9Y.esm.min.js";import"./fogFragment-DPTJpIWQ.esm.min.js";import"./logDepthDeclaration-eAf-B4Qw.esm.min.js";import"./logDepthVertex-DAIqazpL.esm.min.js";import{R as Y}from"./rawTexture-BJRhApe5.esm.min.js";import"./thinInstanceMesh-BHC7hPty.esm.min.js";import{A as j}from"./assetContainer-C2D4MNHn.esm.min.js";import{S as K}from"./standardMaterial-D6jitvBE.esm.min.js";e.IncludesShadersStore.gaussianSplattingFragmentDeclaration="vec4 gaussianColor(vec4 inColor)\n{float A=-dot(vPosition,vPosition);if (A<-4.0) discard;float B=exp(A)*inColor.a;\n#include<logDepthFragment>\nvec3 color=inColor.rgb;\n#ifdef FOG\n#include<fogFragment>\n#endif\nreturn vec4(color,B);}\n";e.ShadersStore.gaussianSplattingPixelShader="#include<clipPlaneFragmentDeclaration>\n#include<logDepthDeclaration>\n#include<fogFragmentDeclaration>\nvarying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplattingFragmentDeclaration>\nvoid main () { \n#include<clipPlaneFragment>\ngl_FragColor=gaussianColor(vColor);}\n";e.IncludesShadersStore.gaussianSplattingVertexDeclaration="attribute vec2 position;uniform mat4 view;uniform mat4 projection;uniform mat4 world;";e.IncludesShadersStore.gaussianSplattingUboDeclaration="#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nattribute vec2 position;";e.IncludesShadersStore.gaussianSplatting="#if !defined(WEBGL2) && !defined(WEBGPU) && !defined(NATIVE)\nmat3 transpose(mat3 matrix) {return mat3(matrix[0][0],matrix[1][0],matrix[2][0],\nmatrix[0][1],matrix[1][1],matrix[2][1],\nmatrix[0][2],matrix[1][2],matrix[2][2]);}\n#endif\nvec2 getDataUV(float index,vec2 textureSize) {float y=floor(index/textureSize.x);float x=index-y*textureSize.x;return vec2((x+0.5)/textureSize.x,(y+0.5)/textureSize.y);}\nstruct Splat {vec4 center;vec4 color;vec4 covA;vec4 covB;};Splat readSplat(float splatIndex)\n{Splat splat;vec2 splatUV=getDataUV(splatIndex,dataTextureSize);splat.center=texture2D(centersTexture,splatUV);splat.color=texture2D(colorsTexture,splatUV);splat.covA=texture2D(covariancesATexture,splatUV)*splat.center.w;splat.covB=texture2D(covariancesBTexture,splatUV)*splat.center.w;return splat;}\nvec4 gaussianSplatting(vec2 meshPos,vec3 worldPos,vec2 scale,vec3 covA,vec3 covB,mat4 worldMatrix,mat4 viewMatrix,mat4 projectionMatrix)\n{mat4 modelView=viewMatrix*worldMatrix;vec4 camspace=viewMatrix*vec4(worldPos,1.);vec4 pos2d=projectionMatrix*camspace;float bounds=1.2*pos2d.w;if (pos2d.z<-pos2d.w || pos2d.x<-bounds || pos2d.x>bounds\n|| pos2d.y<-bounds || pos2d.y>bounds) {return vec4(0.0,0.0,2.0,1.0);}\nmat3 Vrk=mat3(\ncovA.x,covA.y,covA.z,\ncovA.y,covB.x,covB.y,\ncovA.z,covB.y,covB.z\n);mat3 J=mat3(\nfocal.x/camspace.z,0.,-(focal.x*camspace.x)/(camspace.z*camspace.z),\n0.,focal.y/camspace.z,-(focal.y*camspace.y)/(camspace.z*camspace.z),\n0.,0.,0.\n);mat3 invy=mat3(1,0,0,0,-1,0,0,0,1);mat3 T=invy*transpose(mat3(modelView))*J;mat3 cov2d=transpose(T)*Vrk*T;float mid=(cov2d[0][0]+cov2d[1][1])/2.0;float radius=length(vec2((cov2d[0][0]-cov2d[1][1])/2.0,cov2d[0][1]));float lambda1=mid+radius,lambda2=mid-radius;if (lambda2<0.0)\n{return vec4(0.0,0.0,2.0,1.0);}\nvec2 diagonalVector=normalize(vec2(cov2d[0][1],lambda1-cov2d[0][0]));vec2 majorAxis=min(sqrt(2.0*lambda1),1024.0)*diagonalVector;vec2 minorAxis=min(sqrt(2.0*lambda2),1024.0)*vec2(diagonalVector.y,-diagonalVector.x);vec2 vCenter=vec2(pos2d);return vec4(\nvCenter \n+ ((meshPos.x*majorAxis\n+ meshPos.y*minorAxis)*invViewport*pos2d.w)*scale,pos2d.zw);}";e.ShadersStore.gaussianSplattingVertexShader="#include<__decl__gaussianSplattingVertex>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute float splatIndex;uniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;varying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplatting>\nvoid main () {Splat splat=readSplat(splatIndex);vec3 covA=splat.covA.xyz;vec3 covB=vec3(splat.covA.w,splat.covB.xy);vec4 worldPos=world*vec4(splat.center.xyz,1.0);vColor=splat.color;vPosition=position;gl_Position=gaussianSplatting(position,worldPos.xyz,vec2(1.,1.),covA,covB,world,view,projection);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n";class q extends p{constructor(){super(),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.rebuild()}}class Q extends s{constructor(e,t){super(e,t),this.backFaceCulling=!1}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(e,t){const s=!0,l=t._drawWrapper;if(l.effect&&this.isFrozen&&l._wasPreviouslyReady&&l._wasPreviouslyUsingInstances===s)return!0;t.materialDefines||(t.materialDefines=new q);const u=this.getScene(),h=t.materialDefines;if(this._isReadyForSubMesh(t))return!0;const d=u.getEngine();if(i(e,u,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,h),r(u,d,this,h,s,null,!0),n(e,h,!1,!1),h.isDirty){h.markAsProcessed(),u.resetCachedMaterial();const e=[m.PositionKind,"splatIndex"];o(e,h);const s=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal"],i=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture"],r=["Scene","Mesh"];a({uniformsNames:s,uniformBuffersNames:r,samplers:i,defines:h}),c(s);const n=h.toString(),l=u.getEngine().createEffect("gaussianSplatting",{attributes:e,uniformsNames:s,uniformBuffersNames:r,samplers:i,defines:n,onCompiled:this.onCompiled,onError:this.onError},d);t.setEffect(l,h,this._materialContext)}return!(!t.effect||!t.effect.isReady())&&(h._renderId=u.getRenderId(),l._wasPreviouslyReady=!0,l._wasPreviouslyUsingInstances=s,!0)}static BindEffect(e,t,s){const i=s.getEngine(),r=s.activeCamera,n=i.getRenderWidth(),o=i.getRenderHeight(),a=r?.rigParent?.rigCameras.length||1;t.setFloat2("invViewport",1/(n/a),1/o);let c=1e3;if(r){const e=r.getProjectionMatrix().m[5];c=r.fovMode==l.FOVMODE_VERTICAL_FIXED?o*e/2:n*e/2}t.setFloat2("focal",c,c);const u=e;if(u.covariancesATexture){const e=u.covariancesATexture.getSize();t.setFloat2("dataTextureSize",e.width,e.height),t.setTexture("covariancesATexture",u.covariancesATexture),t.setTexture("covariancesBTexture",u.covariancesBTexture),t.setTexture("centersTexture",u.centersTexture),t.setTexture("colorsTexture",u.colorsTexture)}}bindForSubMesh(e,t,s){const i=this.getScene(),r=s.materialDefines;if(!r)return;const n=s.effect;if(!n)return;this._activeEffect=n,t.getMeshUniformBuffer().bindToEffect(n,"Mesh"),t.transferToEffect(e);this._mustRebind(i,n,s,t.visibility)?(this.bindView(n),this.bindViewProjection(n),Q.BindEffect(t,this._activeEffect,i),u(n,this,i)):i.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0),h(i,t,n),this.useLogarithmicDepth&&d(r,n,i),this._afterBind(t,this._activeEffect,s)}clone(e){return _.Clone((()=>new Q(e,this.getScene())),this)}serialize(){const e=super.serialize();return e.customType="BABYLON.GaussianSplattingMaterial",e}getClassName(){return"GaussianSplattingMaterial"}static Parse(e,t,s){return _.Parse((()=>new Q(e.name,t)),e,t,s)}}t("BABYLON.GaussianSplattingMaterial",Q);const J=f,$={...x,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:J},ee=(e,t)=>{const s=(1<<t)-1;return(e&s)/s},te=(e,t)=>{t.x=ee(e>>>21,11),t.y=ee(e>>>11,10),t.z=ee(e,11)},se=(e,t)=>{t[0]=255*ee(e>>>24,8),t[1]=255*ee(e>>>16,8),t[2]=255*ee(e>>>8,8),t[3]=255*ee(e,8)},ie=(e,t)=>{const s=1/(.5*Math.sqrt(2)),i=(ee(e>>>20,10)-.5)*s,r=(ee(e>>>10,10)-.5)*s,n=(ee(e,10)-.5)*s,o=Math.sqrt(1-(i*i+r*r+n*n));switch(e>>>30){case 0:t.set(o,i,r,n);break;case 1:t.set(i,o,r,n);break;case 2:t.set(i,r,o,n);break;case 3:t.set(i,r,n,o)}};var re,ne,oe,ae,ce,le;!function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e[e.DOUBLE=3]="DOUBLE",e[e.UCHAR=4]="UCHAR",e[e.UNDEFINED=5]="UNDEFINED"}(re||(re={})),function(e){e[e.MIN_X=0]="MIN_X",e[e.MIN_Y=1]="MIN_Y",e[e.MIN_Z=2]="MIN_Z",e[e.MAX_X=3]="MAX_X",e[e.MAX_Y=4]="MAX_Y",e[e.MAX_Z=5]="MAX_Z",e[e.MIN_SCALE_X=6]="MIN_SCALE_X",e[e.MIN_SCALE_Y=7]="MIN_SCALE_Y",e[e.MIN_SCALE_Z=8]="MIN_SCALE_Z",e[e.MAX_SCALE_X=9]="MAX_SCALE_X",e[e.MAX_SCALE_Y=10]="MAX_SCALE_Y",e[e.MAX_SCALE_Z=11]="MAX_SCALE_Z",e[e.PACKED_POSITION=12]="PACKED_POSITION",e[e.PACKED_ROTATION=13]="PACKED_ROTATION",e[e.PACKED_SCALE=14]="PACKED_SCALE",e[e.PACKED_COLOR=15]="PACKED_COLOR",e[e.X=16]="X",e[e.Y=17]="Y",e[e.Z=18]="Z",e[e.SCALE_0=19]="SCALE_0",e[e.SCALE_1=20]="SCALE_1",e[e.SCALE_2=21]="SCALE_2",e[e.DIFFUSE_RED=22]="DIFFUSE_RED",e[e.DIFFUSE_GREEN=23]="DIFFUSE_GREEN",e[e.DIFFUSE_BLUE=24]="DIFFUSE_BLUE",e[e.OPACITY=25]="OPACITY",e[e.F_DC_0=26]="F_DC_0",e[e.F_DC_1=27]="F_DC_1",e[e.F_DC_2=28]="F_DC_2",e[e.F_DC_3=29]="F_DC_3",e[e.ROT_0=30]="ROT_0",e[e.ROT_1=31]="ROT_1",e[e.ROT_2=32]="ROT_2",e[e.ROT_3=33]="ROT_3",e[e.UNDEFINED=34]="UNDEFINED"}(ne||(ne={}));class ue extends g{get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}set material(e){this._material=e,this._material.backFaceCulling=!0,this._material.cullBackFaces=!1,e.resetDrawCache()}get material(){return this._material}constructor(e,t=null,s=null,i=!1){super(e,s),this._vertexCount=0,this._worker=null,this._frameIdLastUpdate=-1,this._modelViewMatrix=y.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._splatPositions=null,this._splatIndex=null,this._covariancesA=null,this._covariancesB=null,this._colors=null,this._keepInRam=!1,this._delayedTextureUpdate=null,this._oldDirection=new T,this._useRGBACovariants=!1,this._material=null,this._tmpCovariances=[0,0,0,0,0,0],this._sortIsDirty=!1;const r=new v;r.positions=[-3,-2,0,3,-2,0,0,4,0],r.indices=[0,1,2],r.applyToMesh(this),this.subMeshes=[],new w(0,0,3,0,3,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,this._keepInRam=i,t&&this.loadFileAsync(t),this._material=new Q(this.name+"_material",this._scene)}getClassName(){return"GaussianSplattingMesh"}getTotalVertices(){return this._vertexCount}isReady(e=!1){return!!super.isReady(e,!0)&&(!!this._readyToDisplay||(this._postToWorker(!0),!1))}_postToWorker(e=!1){const t=this.getScene().getFrameId();if((e||t!==this._frameIdLastUpdate)&&this._worker&&this._scene.activeCamera&&this._canPostToWorker){const s=this._scene.activeCamera.getViewMatrix();this.getWorldMatrix().multiplyToRef(s,this._modelViewMatrix),s.invertToRef(C.Matrix[0]),this.getWorldMatrix().multiplyToRef(C.Matrix[0],C.Matrix[1]),T.TransformNormalToRef(T.Forward(this._scene.useRightHandedSystem),C.Matrix[1],C.Vector3[2]),C.Vector3[2].normalize();const i=T.Dot(C.Vector3[2],this._oldDirection);(e||Math.abs(i-1)>=.01)&&(this._oldDirection.copyFrom(C.Vector3[2]),this._frameIdLastUpdate=t,this._canPostToWorker=!1,this._worker.postMessage({view:this._modelViewMatrix.m,depthMix:this._depthMix,useRightHandedSystem:this._scene.useRightHandedSystem},[this._depthMix.buffer]))}}render(e,t,s){return this._postToWorker(),super.render(e,t,s)}static _TypeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4}return 5}static _ValueNameToEnum(e){switch(e){case"min_x":return 0;case"min_y":return 1;case"min_z":return 2;case"max_x":return 3;case"max_y":return 4;case"max_z":return 5;case"min_scale_x":return 6;case"min_scale_y":return 7;case"min_scale_z":return 8;case"max_scale_x":return 9;case"max_scale_y":return 10;case"max_scale_z":return 11;case"packed_position":return 12;case"packed_rotation":return 13;case"packed_scale":return 14;case"packed_color":return 15;case"x":return 16;case"y":return 17;case"z":return 18;case"scale_0":return 19;case"scale_1":return 20;case"scale_2":return 21;case"diffuse_red":case"red":return 22;case"diffuse_green":case"green":return 23;case"diffuse_blue":case"blue":return 24;case"f_dc_0":return 26;case"f_dc_1":return 27;case"f_dc_2":return 28;case"f_dc_3":return 29;case"opacity":return 25;case"rot_0":return 30;case"rot_1":return 31;case"rot_2":return 32;case"rot_3":return 33}return 34}static ParseHeader(e){const t=new Uint8Array(e),s=(new TextDecoder).decode(t.slice(0,10240)),i="end_header\n",r=s.indexOf(i);if(r<0||!s)return null;const n=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element chunk (\d+)\n/.exec(s);let a=0;o&&(a=parseInt(o[1]));let c=0,l=0;const u={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let h;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(h||(h={}));let d=1;const _=[],p=[],m=s.slice(0,r).split("\n");for(const e of m)if(e.startsWith("property ")){const[,t,s]=e.split(" "),i=ue._ValueNameToEnum(s),r=ue._TypeNameToEnum(t);1==d?(p.push({value:i,type:r,offset:l}),l+=u[t]):0==d&&(_.push({value:i,type:r,offset:c}),c+=u[t]),u[t]||A.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?d=1:"vertex"==t&&(d=0)}return{vertexCount:n,chunkCount:a,rowVertexLength:c,rowChunkLength:l,vertexProperties:_,chunkProperties:p,dataView:new DataView(e,r+11),buffer:new ArrayBuffer(ue._RowOutputLength*n)}}static _GetCompressedChunks(e,t){if(!e.chunkCount)return null;const s=e.dataView,i=new Array(e.chunkCount);for(let r=0;r<e.chunkCount;r++){const n={min:new T,max:new T,minScale:new T,maxScale:new T};i[r]=n;for(let i=0;i<e.chunkProperties.length;i++){const r=e.chunkProperties[i];let o;if(0===r.type)switch(o=s.getFloat32(r.offset+t.value,!0),r.value){case 0:n.min.x=o;break;case 1:n.min.y=o;break;case 2:n.min.z=o;break;case 3:n.max.x=o;break;case 4:n.max.y=o;break;case 5:n.max.z=o;break;case 6:n.minScale.x=o;break;case 7:n.minScale.y=o;break;case 8:n.minScale.z=o;break;case 9:n.maxScale.x=o;break;case 10:n.maxScale.y=o;break;case 11:n.maxScale.z=o}}t.value+=e.rowChunkLength}return i}static _GetSplat(e,t,s,i){const r=C.Quaternion[0],n=C.Vector3[0],o=ue._RowOutputLength,a=e.buffer,c=e.dataView,l=new Float32Array(a,t*o,3),u=new Float32Array(a,t*o+12,3),h=new Uint8ClampedArray(a,t*o+24,4),d=new Uint8ClampedArray(a,t*o+28,4),_=t>>8;let p=255,m=0,x=0,f=0;for(let t=0;t<e.vertexProperties.length;t++){const o=e.vertexProperties[t];let a;switch(o.type){case 0:a=c.getFloat32(i.value+o.offset,!0);break;case 1:a=c.getInt32(i.value+o.offset,!0);break;case 2:a=c.getUint32(i.value+o.offset,!0);break;case 3:a=c.getFloat64(i.value+o.offset,!0);break;case 4:a=c.getUint8(i.value+o.offset);break;default:continue}switch(o.value){case 12:{const e=s[_];te(a,n),l[0]=$.Lerp(e.min.x,e.max.x,n.x),l[1]=-$.Lerp(e.min.y,e.max.y,n.y),l[2]=$.Lerp(e.min.z,e.max.z,n.z)}break;case 13:ie(a,r),p=r.w,m=r.z,x=r.y,f=r.x;break;case 14:{const e=s[_];te(a,n),u[0]=Math.exp($.Lerp(e.minScale.x,e.maxScale.x,n.x)),u[1]=Math.exp($.Lerp(e.minScale.y,e.maxScale.y,n.y)),u[2]=Math.exp($.Lerp(e.minScale.z,e.maxScale.z,n.z))}break;case 15:se(a,h);break;case 16:l[0]=a;break;case 17:l[1]=a;break;case 18:l[2]=a;break;case 19:u[0]=Math.exp(a);break;case 20:u[1]=Math.exp(a);break;case 21:u[2]=Math.exp(a);break;case 22:h[0]=a;break;case 23:h[1]=a;break;case 24:h[2]=a;break;case 26:h[0]=255*(.5+ue._SH_C0*a);break;case 27:h[1]=255*(.5+ue._SH_C0*a);break;case 28:h[2]=255*(.5+ue._SH_C0*a);break;case 29:h[3]=255*(.5+ue._SH_C0*a);break;case 25:h[3]=1/(1+Math.exp(-a))*255;break;case 30:p=a;break;case 31:m=a;break;case 32:x=a;break;case 33:f=a}}r.set(m,x,f,p),r.normalize(),d[0]=128*r.w+128,d[1]=128*r.x+128,d[2]=128*r.y+128,d[3]=128*r.z+128,i.value+=e.rowVertexLength}static*ConvertPLYToSplat(e,t=!1){const s=ue.ParseHeader(e);if(!s)return e;const i={value:0},r=ue._GetCompressedChunks(s,i);for(let e=0;e<s.vertexCount;e++)ue._GetSplat(s,e,r,i),e%3e4==0&&t&&(yield);return s.buffer}static async ConvertPLYToSplatAsync(e){return P(ue.ConvertPLYToSplat(e,!0),E())}loadDataAsync(e){return this.updateDataAsync(e)}loadFileAsync(e){return b.LoadFileAsync(e,!0).then((async e=>{ue.ConvertPLYToSplatAsync(e).then((e=>{this.updateDataAsync(e)}))}))}dispose(e){this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._worker?.terminate(),this._worker=null,super.dispose(e,!0)}_copyTextures(e){this._covariancesATexture=e.covariancesATexture?.clone(),this._covariancesBTexture=e.covariancesBTexture?.clone(),this._centersTexture=e.centersTexture?.clone(),this._colorsTexture=e.colorsTexture?.clone()}clone(e=""){const t=new ue(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewMatrix=y.Identity(),t._splatPositions=this._splatPositions,t._readyToDisplay=!1,t._instanciateWorker();const s=this.getBoundingInfo();return t.getBoundingInfo().reConstruct(s.minimum,s.maximum,this.getWorldMatrix()),t.forcedInstanceCount=t._vertexCount,t.setEnabled(!0),t}_makeSplat(e,t,s,i,r,n,o,a,c){const l=C.Matrix[0],u=C.Matrix[1],h=C.Quaternion[0],d=this._useRGBACovariants?4:2,_=s[8*e+0],p=-s[8*e+1],m=s[8*e+2];this._splatPositions[4*e+0]=_,this._splatPositions[4*e+1]=p,this._splatPositions[4*e+2]=m,a.minimizeInPlaceFromFloats(_,p,m),c.maximizeInPlaceFromFloats(_,p,m),h.set((i[32*e+28+1]-128)/128,(i[32*e+28+2]-128)/128,(i[32*e+28+3]-128)/128,-(i[32*e+28+0]-128)/128),h.toRotationMatrix(l),y.ScalingToRef(2*s[8*e+3+0],2*s[8*e+3+1],2*s[8*e+3+2],u);const x=l.multiplyToRef(u,C.Matrix[0]).m,f=this._tmpCovariances;f[0]=x[0]*x[0]+x[1]*x[1]+x[2]*x[2],f[1]=x[0]*x[4]+x[1]*x[5]+x[2]*x[6],f[2]=x[0]*x[8]+x[1]*x[9]+x[2]*x[10],f[3]=x[4]*x[4]+x[5]*x[5]+x[6]*x[6],f[4]=x[4]*x[8]+x[5]*x[9]+x[6]*x[10],f[5]=x[8]*x[8]+x[9]*x[9]+x[10]*x[10];let g=-1e4;for(let e=0;e<6;e++)g=Math.max(g,Math.abs(f[e]));this._splatPositions[4*e+3]=g;const T=g;r[4*t+0]=M(f[0]/T),r[4*t+1]=M(f[1]/T),r[4*t+2]=M(f[2]/T),r[4*t+3]=M(f[3]/T),n[t*d+0]=M(f[4]/T),n[t*d+1]=M(f[5]/T),o[4*t+0]=i[32*e+24+0],o[4*t+1]=i[32*e+24+1],o[4*t+2]=i[32*e+24+2],o[4*t+3]=i[32*e+24+3]}_updateTextures(e,t,s){const i=this._getTextureSize(this._vertexCount),r=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,R.TEXTURE_BILINEAR_SAMPLINGMODE,R.TEXTURETYPE_FLOAT),n=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,R.TEXTURE_BILINEAR_SAMPLINGMODE,R.TEXTURETYPE_UNSIGNED_BYTE),o=(e,t,s,i)=>new Y(e,t,s,i,this._scene,!1,!1,R.TEXTURE_BILINEAR_SAMPLINGMODE,R.TEXTURETYPE_HALF_FLOAT);if(this._keepInRam&&(this._covariancesA=e,this._covariancesB=t,this._colors=s),this._covariancesATexture){this._delayedTextureUpdate={covA:e,covB:t,colors:s,centers:this._splatPositions};const i=Float32Array.from(this._splatPositions),r=this._vertexCount;this._worker.postMessage({positions:i,vertexCount:r},[i.buffer]),this._postToWorker(!0)}else this._covariancesATexture=o(e,i.x,i.y,R.TEXTUREFORMAT_RGBA),this._covariancesBTexture=o(t,i.x,i.y,this._useRGBACovariants?R.TEXTUREFORMAT_RGBA:R.TEXTUREFORMAT_RG),this._centersTexture=r(this._splatPositions,i.x,i.y,R.TEXTUREFORMAT_RGBA),this._colorsTexture=n(s,i.x,i.y,R.TEXTUREFORMAT_RGBA),this._instanciateWorker()}*_updateData(e,t){this._covariancesATexture||(this._readyToDisplay=!1);const s=new Uint8Array(e),i=new Float32Array(s.buffer),r=s.length/ue._RowOutputLength;r!=this._vertexCount&&this._updateSplatIndexBuffer(r),this._vertexCount=r;const n=this._getTextureSize(r),o=n.x*n.y,a=ue.ProgressiveUpdateAmount??n.y,c=n.x*a;this._splatPositions=new Float32Array(4*o);const l=new Uint16Array(4*o),u=new Uint16Array((this._useRGBACovariants?4:2)*o),h=new Uint8Array(4*o),d=new T(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),_=new T(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(ue.ProgressiveUpdateAmount){this._updateTextures(l,u,h),this.setEnabled(!0);const e=Math.ceil(n.y/a);for(let r=0;r<e;r++){const e=r*a,o=e*n.x;for(let e=0;e<c;e++)this._makeSplat(o+e,o+e,i,s,l,u,h,d,_);this._updateSubTextures(this._splatPositions,l,u,h,e,Math.min(a,n.y-e)),this.getBoundingInfo().reConstruct(d,_,this.getWorldMatrix()),t&&(yield)}const r=Float32Array.from(this._splatPositions),o=this._vertexCount;this._worker.postMessage({positions:r,vertexCount:o},[r.buffer]),this._sortIsDirty=!0}else{for(let e=0;e<r;e++)this._makeSplat(e,e,i,s,l,u,h,d,_),t&&e%327680==0&&(yield);this._updateTextures(l,u,h),this.getBoundingInfo().reConstruct(d,_,this.getWorldMatrix()),this.setEnabled(!0)}this._postToWorker(!0)}async updateDataAsync(e){return P(this._updateData(e,!0),E())}updateData(e){I(this._updateData(e,!1))}_updateSplatIndexBuffer(e){(!this._splatIndex||e>this._splatIndex.length)&&(this._splatIndex=new Float32Array(e),this.thinInstanceSetBuffer("splatIndex",this._splatIndex,1,!1)),this.forcedInstanceCount=e}_updateSubTextures(e,t,s,i,r,n){const o=(e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)},a=this._getTextureSize(this._vertexCount),c=this._useRGBACovariants?4:2,l=r*a.x,u=n*a.x,h=new Uint16Array(t.buffer,4*l*Uint16Array.BYTES_PER_ELEMENT,4*u),d=new Uint16Array(s.buffer,l*c*Uint16Array.BYTES_PER_ELEMENT,u*c),_=new Uint8Array(i.buffer,4*l,4*u),p=new Float32Array(e.buffer,4*l*Float32Array.BYTES_PER_ELEMENT,4*u);o(this._covariancesATexture,h,a.x,r,n),o(this._covariancesBTexture,d,a.x,r,n),((e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)})(this._centersTexture,p,a.x,r,n),((e,t,s,i,r)=>{this.getEngine().updateTextureData(e.getInternalTexture(),t,0,i,s,r,0,0,!1)})(this._colorsTexture,_,a.x,r,n)}_instanciateWorker(){if(!this._vertexCount)return;this._updateSplatIndexBuffer(this._vertexCount),this._worker?.terminate(),this._worker=new Worker(URL.createObjectURL(new Blob(["(",ue._CreateWorker.toString(),")(self)"],{type:"application/javascript"}))),this._depthMix=new BigInt64Array(this._vertexCount);const e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({positions:e,vertexCount:t},[e.buffer]),this._worker.onmessage=e=>{this._depthMix=e.data.depthMix;const s=new Uint32Array(e.data.depthMix.buffer);if(this._splatIndex)for(let e=0;e<this._vertexCount;e++)this._splatIndex[e]=s[2*e];if(this._delayedTextureUpdate){const e=this._getTextureSize(t);this._updateSubTextures(this._delayedTextureUpdate.centers,this._delayedTextureUpdate.covA,this._delayedTextureUpdate.covB,this._delayedTextureUpdate.colors,0,e.y),this._delayedTextureUpdate=null}this.thinInstanceBufferUpdated("splatIndex"),this._canPostToWorker=!0,this._readyToDisplay=!0,this._sortIsDirty&&(this._postToWorker(!0),this._sortIsDirty=!1)}}_getTextureSize(e){const t=this._scene.getEngine(),s=t.getCaps().maxTextureSize;let i=1;if(1!==t.version||t.isWebGPU)i=Math.ceil(e/s);else for(;s*i<e;)i*=2;return i>s&&(A.Error("GaussianSplatting texture size: ("+s+", "+i+"), maxTextureSize: "+s),i=s),new S(s,i)}}ue._RowOutputLength=32,ue._SH_C0=.28209479177387814,ue.ProgressiveUpdateAmount=0,ue._CreateWorker=function(e){let t,s,i,r,n=0;e.onmessage=o=>{if(o.data.positions)t=o.data.positions,n=o.data.vertexCount;else{const a=o.data.view;if(!t||!a)throw new Error("positions or view is not defined!");s=o.data.depthMix,i=new Uint32Array(s.buffer),r=new Float32Array(s.buffer);for(let e=0;e<n;e++)i[2*e]=e;let c=-1;o.data.useRightHandedSystem&&(c=1);for(let e=0;e<n;e++)r[2*e+1]=1e4+(a[2]*t[4*e+0]+a[6]*t[4*e+1]+a[10]*t[4*e+2])*c;s.sort(),e.postMessage({depthMix:s},[s.buffer])}}};class he{constructor(e,t,s,i,r){this.idx=0,this.color=new D(1,1,1,1),this.position=T.Zero(),this.rotation=T.Zero(),this.uv=new S(0,0),this.velocity=T.Zero(),this.pivot=T.Zero(),this.translateFromPivot=!1,this._pos=0,this._ind=0,this.groupId=0,this.idxInGroup=0,this._stillInvisible=!1,this._rotationMatrix=[1,0,0,0,1,0,0,0,1],this.parentId=null,this._globalPosition=T.Zero(),this.idx=e,this._group=t,this.groupId=s,this.idxInGroup=i,this._pcs=r}get size(){return this.size}set size(e){this.size=e}get quaternion(){return this.rotationQuaternion}set quaternion(e){this.rotationQuaternion=e}intersectsMesh(e,t){if(!e.hasBoundingInfo)return!1;if(!this._pcs.mesh)throw new Error("Point Cloud System doesnt contain the Mesh");if(t)return e.getBoundingInfo().boundingSphere.intersectsPoint(this.position.add(this._pcs.mesh.position));const s=e.getBoundingInfo().boundingBox,i=s.maximumWorld.x,r=s.minimumWorld.x,n=s.maximumWorld.y,o=s.minimumWorld.y,a=s.maximumWorld.z,c=s.minimumWorld.z,l=this.position.x+this._pcs.mesh.position.x,u=this.position.y+this._pcs.mesh.position.y,h=this.position.z+this._pcs.mesh.position.z;return r<=l&&l<=i&&o<=u&&u<=n&&c<=h&&h<=a}getRotationMatrix(e){let t;if(this.rotationQuaternion)t=this.rotationQuaternion;else{t=C.Quaternion[0];const e=this.rotation;k.RotationYawPitchRollToRef(e.y,e.x,e.z,t)}t.toRotationMatrix(e)}}class de{get groupID(){return this.groupId}set groupID(e){this.groupId=e}constructor(e,t){this.groupId=e,this._positionFunction=t}}class _e{constructor(e,t,s=Number.MAX_VALUE,i=V){this.origin=e,this.direction=t,this.length=s,this.epsilon=i}clone(){return new _e(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(e,t,s=0){const i=_e._TmpVector3[0].copyFromFloats(e.x-s,e.y-s,e.z-s),r=_e._TmpVector3[1].copyFromFloats(t.x+s,t.y+s,t.z+s);let n,o,a,c,l=0,u=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x<i.x||this.origin.x>r.x)return!1}else if(n=1/this.direction.x,o=(i.x-this.origin.x)*n,a=(r.x-this.origin.x)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y<i.y||this.origin.y>r.y)return!1}else if(n=1/this.direction.y,o=(i.y-this.origin.y)*n,a=(r.y-this.origin.y)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z<i.z||this.origin.z>r.z)return!1}else if(n=1/this.direction.z,o=(i.z-this.origin.z)*n,a=(r.z-this.origin.z)*n,a===-1/0&&(a=1/0),o>a&&(c=o,o=a,a=c),l=Math.max(o,l),u=Math.min(a,u),l>u)return!1;return!0}intersectsBox(e,t=0){return this.intersectsBoxMinMax(e.minimum,e.maximum,t)}intersectsSphere(e,t=0){const s=e.center.x-this.origin.x,i=e.center.y-this.origin.y,r=e.center.z-this.origin.z,n=s*s+i*i+r*r,o=e.radius+t,a=o*o;if(n<=a)return!0;const c=s*this.direction.x+i*this.direction.y+r*this.direction.z;if(c<0)return!1;return n-c*c<=a}intersectsTriangle(e,t,s){const i=_e._TmpVector3[0],r=_e._TmpVector3[1],n=_e._TmpVector3[2],o=_e._TmpVector3[3],a=_e._TmpVector3[4];t.subtractToRef(e,i),s.subtractToRef(e,r),T.CrossToRef(this.direction,r,n);const c=T.Dot(i,n);if(0===c)return null;const l=1/c;this.origin.subtractToRef(e,o);const u=T.Dot(o,n)*l;if(u<-this.epsilon||u>1+this.epsilon)return null;T.CrossToRef(o,i,a);const h=T.Dot(this.direction,a)*l;if(h<-this.epsilon||u+h>1+this.epsilon)return null;const d=T.Dot(r,a)*l;return d>this.length?null:new z(1-u-h,u,d)}intersectsPlane(e){let t;const s=T.Dot(e.normal,this.direction);if(Math.abs(s)<9.99999997475243e-7)return null;{const i=T.Dot(e.normal,this.origin);return t=(-e.d-i)/s,t<0?t<-9.99999997475243e-7?null:0:t}}intersectsAxis(e,t=0){switch(e){case"y":{const e=(this.origin.y-t)/this.direction.y;return e>0?null:new T(this.origin.x+this.direction.x*-e,t,this.origin.z+this.direction.z*-e)}case"x":{const e=(this.origin.x-t)/this.direction.x;return e>0?null:new T(t,this.origin.y+this.direction.y*-e,this.origin.z+this.direction.z*-e)}case"z":{const e=(this.origin.z-t)/this.direction.z;return e>0?null:new T(this.origin.x+this.direction.x*-e,this.origin.y+this.direction.y*-e,t)}default:return null}}intersectsMesh(e,t,s,i=!1,r,n=!1){const o=C.Matrix[0];return e.getWorldMatrix().invertToRef(o),this._tmpRay?_e.TransformToRef(this,o,this._tmpRay):this._tmpRay=_e.Transform(this,o),e.intersects(this._tmpRay,t,s,i,r,n)}intersectsMeshes(e,t,s){s?s.length=0:s=[];for(let i=0;i<e.length;i++){const r=this.intersectsMesh(e[i],t);r.hit&&s.push(r)}return s.sort(this._comparePickingInfo),s}_comparePickingInfo(e,t){return e.distance<t.distance?-1:e.distance>t.distance?1:0}intersectionSegment(e,t,s){const i=this.origin,r=C.Vector3[0],n=C.Vector3[1],o=C.Vector3[2],a=C.Vector3[3];t.subtractToRef(e,r),this.direction.scaleToRef(_e._Rayl,o),i.addToRef(o,n),e.subtractToRef(i,a);const c=T.Dot(r,r),l=T.Dot(r,o),u=T.Dot(o,o),h=T.Dot(r,a),d=T.Dot(o,a),_=c*u-l*l;let p,m,x=_,f=_;_<_e._Smallnum?(p=0,x=1,m=d,f=u):(p=l*d-u*h,m=c*d-l*h,p<0?(p=0,m=d,f=u):p>x&&(p=x,m=d+l,f=u)),m<0?(m=0,-h<0?p=0:-h>c?p=x:(p=-h,x=c)):m>f&&(m=f,-h+l<0?p=0:-h+l>c?p=x:(p=-h+l,x=c));const g=Math.abs(p)<_e._Smallnum?0:p/x,y=Math.abs(m)<_e._Smallnum?0:m/f,v=C.Vector3[4];o.scaleToRef(y,v);const w=C.Vector3[5];r.scaleToRef(g,w),w.addInPlace(a);const A=C.Vector3[6];w.subtractToRef(v,A);return y>0&&y<=this.length&&A.lengthSquared()<s*s?w.length():-1}update(e,t,s,i,r,n,o,a=!1){if(a){_e._RayDistant||(_e._RayDistant=_e.Zero()),_e._RayDistant.unprojectRayToRef(e,t,s,i,y.IdentityReadOnly,n,o);const a=C.Matrix[0];r.invertToRef(a),_e.TransformToRef(_e._RayDistant,a,this)}else this.unprojectRayToRef(e,t,s,i,r,n,o);return this}static Zero(){return new _e(T.Zero(),T.Zero())}static CreateNew(e,t,s,i,r,n,o){return _e.Zero().update(e,t,s,i,r,n,o)}static CreateNewFromTo(e,t,s=y.IdentityReadOnly){const i=new _e(new T(0,0,0),new T(0,0,0));return _e.CreateFromToToRef(e,t,i,s)}static CreateFromToToRef(e,t,s,i=y.IdentityReadOnly){s.origin.copyFrom(e);const r=t.subtractToRef(e,s.direction),n=Math.sqrt(r.x*r.x+r.y*r.y+r.z*r.z);return s.length=n,s.direction.normalize(),_e.TransformToRef(s,i,s)}static Transform(e,t){const s=new _e(new T(0,0,0),new T(0,0,0));return _e.TransformToRef(e,t,s),s}static TransformToRef(e,t,s){T.TransformCoordinatesToRef(e.origin,t,s.origin),T.TransformNormalToRef(e.direction,t,s.direction),s.length=e.length,s.epsilon=e.epsilon;const i=s.direction,r=i.length();if(0!==r&&1!==r){const e=1/r;i.x*=e,i.y*=e,i.z*=e,s.length*=r}return s}unprojectRayToRef(e,t,s,i,r,n,o){const a=C.Matrix[0];r.multiplyToRef(n,a),a.multiplyToRef(o,a),a.invert();const c=U.LastCreatedEngine,l=C.Vector3[0];l.x=e/s*2-1,l.y=-(t/i*2-1),l.z=c?.useReverseDepthBuffer?1:c?.isNDCHalfZRange?0:-1;const u=C.Vector3[1].copyFromFloats(l.x,l.y,1-1e-8),h=C.Vector3[2],d=C.Vector3[3];T._UnprojectFromInvertedMatrixToRef(l,a,h),T._UnprojectFromInvertedMatrixToRef(u,a,d),this.origin.copyFrom(h),d.subtractToRef(h,this.direction),this.direction.normalize()}}function pe(e,t,s,i,r,n=!1){const o=_e.Zero();return me(e,t,s,i,o,r,n),o}function me(e,t,s,i,r,n,o=!1,a=!1){const c=e.getEngine();if(!n&&!(n=e.activeCamera))return e;const l=n.viewport,u=c.getRenderHeight(),{x:h,y:d,width:_,height:p}=l.toGlobal(c.getRenderWidth(),u),m=1/c.getHardwareScalingLevel();return t=t*m-h,s=s*m-(u-d-p),r.update(t,s,_,p,i||y.IdentityReadOnly,o?y.IdentityReadOnly:n.getViewMatrix(),n.getProjectionMatrix(),a),e}function xe(e,t,s,i,r){if(!B)return e;const n=e.getEngine();if(!r&&!(r=e.activeCamera))throw new Error("Active camera not set");const o=r.viewport,a=n.getRenderHeight(),{x:c,y:l,width:u,height:h}=o.toGlobal(n.getRenderWidth(),a),d=y.Identity(),_=1/n.getHardwareScalingLevel();return t=t*_-c,s=s*_-(a-l-h),i.update(t,s,u,h,d,d,r.getProjectionMatrix()),e}function fe(e,t,s,i,r,n,o,a){const c=t(i,s.enableDistantPicking),l=s.intersects(c,r,o,n,i,a);return l&&l.hit?!r&&null!=e&&l.distance>=e.distance?null:l:null}function ge(e,t,s,i,r,n){let o=null;const a=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),c=e.cameraToUseForPointers||e.activeCamera,l=fe;for(let u=0;u<e.meshes.length;u++){const h=e.meshes[u];if(s){if(!s(h,-1))continue}else if(!h.isEnabled()||!h.isVisible||!h.isPickable)continue;const d=a&&h.isWorldMatrixCameraDependent(),_=h.computeWorldMatrix(d,c);if(h.hasThinInstances&&h.thinInstanceEnablePicking){const e=l(o,t,h,_,!0,!0,n);if(e){if(r)return e;const a=C.Matrix[1],c=h.thinInstanceGetWorldMatrices();for(let e=0;e<c.length;e++){if(s&&!s(h,e))continue;c[e].multiplyToRef(_,a);const u=l(o,t,h,a,i,r,n,!0);if(u&&(o=u,o.thinInstanceIndex=e,i))return o}}}else{const e=l(o,t,h,_,i,r,n);if(e&&(o=e,i))return o}}return o||new B}function ye(e,t,s,i){if(!B)return null;const r=[],n=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),o=e.cameraToUseForPointers||e.activeCamera,a=fe;for(let c=0;c<e.meshes.length;c++){const l=e.meshes[c];if(s){if(!s(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;const u=n&&l.isWorldMatrixCameraDependent(),h=l.computeWorldMatrix(u,o);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(a(null,t,l,h,!0,!0,i)){const e=C.Matrix[1],n=l.thinInstanceGetWorldMatrices();for(let o=0;o<n.length;o++){if(s&&!s(l,o))continue;n[o].multiplyToRef(h,e);const c=a(null,t,l,e,!1,!1,i,!0);c&&(c.thinInstanceIndex=o,r.push(c))}}}else{const e=a(null,t,l,h,!1,!1,i);e&&r.push(e)}}return r}function Te(e,t,s=100,i,r){i||(i=e.getWorldMatrix()),t.length=s,r?t.origin.copyFrom(r):t.origin.copyFrom(e.position);const n=C.Vector3[2];n.set(0,0,e._scene.useRightHandedSystem?-1:1);const o=C.Vector3[3];return T.TransformNormalToRef(n,i,o),T.NormalizeToRef(o,t.direction),t}_e._TmpVector3=F(6,T.Zero),_e._RayDistant=_e.Zero(),_e._Smallnum=1e-8,_e._Rayl=1e9,oe=N,(ae=l)&&(ae.prototype.getForwardRay=function(e=100,t,s){return Te(this,new _e(T.Zero(),T.Zero(),e),e,t,s)},ae.prototype.getForwardRayToRef=function(e,t=100,s,i){return Te(this,e,t,s,i)}),oe&&(L._IsPickingAvailable=!0,oe.prototype.createPickingRay=function(e,t,s,i,r=!1){return pe(this,e,t,s,i,r)}),N.prototype.createPickingRayToRef=function(e,t,s,i,r,n=!1,o=!1){return me(this,e,t,s,i,r,n,o)},N.prototype.createPickingRayInCameraSpace=function(e,t,s){return function(e,t,s,i){const r=_e.Zero();return xe(e,t,s,r,i),r}(this,e,t,s)},N.prototype.createPickingRayInCameraSpaceToRef=function(e,t,s,i){return xe(this,e,t,s,i)},N.prototype.pickWithBoundingInfo=function(e,t,s,i,r){return function(e,t,s,i,r,n){if(!B)return null;const o=ge(e,(i=>(e._tempPickingRay||(e._tempPickingRay=_e.Zero()),me(e,t,s,i,e._tempPickingRay,n||null),e._tempPickingRay)),i,r,!0);return o&&(o.ray=pe(e,t,s,y.Identity(),n||null)),o}(this,e,t,s,i,r)},N.prototype.pick=function(e,t,s,i,r,n,o=!1){return function(e,t,s,i,r,n,o){const a=ge(e,((i,r)=>(e._tempPickingRay||(e._tempPickingRay=_e.Zero()),me(e,t,s,i,e._tempPickingRay,n||null,!1,r),e._tempPickingRay)),i,r,!1,o);return a&&(a.ray=pe(e,t,s,y.Identity(),n||null)),a}(this,e,t,s,i,r,n,o)},N.prototype.pickWithRay=function(e,t,s,i){return function(e,t,s,i,r){const n=ge(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=y.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=_e.Zero()),_e.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,i,!1,r);return n&&(n.ray=t),n}(this,e,t,s,i)},N.prototype.multiPick=function(e,t,s,i,r){return function(e,t,s,i,r,n){return ye(e,(i=>pe(e,t,s,i,r||null)),i,n)}(this,e,t,s,i,r)},N.prototype.multiPickWithRay=function(e,t,s){return function(e,t,s,i){return ye(e,(s=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=y.Identity()),s.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=_e.Zero()),_e.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform)),s,i)}(this,e,t,s)},function(e){e[e.Color=2]="Color",e[e.UV=1]="UV",e[e.Random=0]="Random",e[e.Stated=3]="Stated"}(ce||(ce={}));class ve{get positions(){return this._positions32}get colors(){return this._colors32}get uvs(){return this._uvs32}constructor(e,t,s,i){this.particles=new Array,this.nbParticles=0,this.counter=0,this.vars={},this._promises=[],this._positions=new Array,this._indices=new Array,this._normals=new Array,this._colors=new Array,this._uvs=new Array,this._updatable=!0,this._isVisibilityBoxLocked=!1,this._alwaysVisible=!1,this._groups=new Array,this._groupCounter=0,this._computeParticleColor=!0,this._computeParticleTexture=!0,this._computeParticleRotation=!0,this._computeBoundingBox=!1,this._isReady=!1,this.name=e,this._size=t,this._scene=s||U.LastCreatedScene,i&&void 0!==i.updatable?this._updatable=i.updatable:this._updatable=!0}buildMeshAsync(e){return Promise.all(this._promises).then((()=>(this._isReady=!0,this._buildMesh(e))))}_buildMesh(e){0===this.nbParticles&&this.addPoints(1),this._positions32=new Float32Array(this._positions),this._uvs32=new Float32Array(this._uvs),this._colors32=new Float32Array(this._colors);const t=new v;t.set(this._positions32,m.PositionKind),this._uvs32.length>0&&t.set(this._uvs32,m.UVKind);let s=0;this._colors32.length>0&&(s=1,t.set(this._colors32,m.ColorKind));const i=new g(this.name,this._scene);t.applyToMesh(i,this._updatable),this.mesh=i,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);let r=e;return r||(r=new K("point cloud material",this._scene),r.emissiveColor=new O(s,s,s),r.disableLighting=!0,r.pointsCloud=!0,r.pointSize=this._size),i.material=r,new Promise((e=>e(i)))}_addParticle(e,t,s,i){const r=new he(e,t,s,i,this);return this.particles.push(r),r}_randomUnitVector(e){e.position=new T(Math.random(),Math.random(),Math.random()),e.color=new D(1,1,1,1)}_getColorIndicesForCoord(e,t,s,i){const r=e._groupImageData,n=s*(4*i)+4*t,o=[n,n+1,n+2,n+3],a=o[1],c=o[2],l=o[3],u=r[o[0]],h=r[a],d=r[c],_=r[l];return new D(u/255,h/255,d/255,_)}_setPointsColorOrUV(e,t,s,i,r,n,o,a){a=a??0,s&&e.updateFacetData();const c=2*e.getBoundingInfo().boundingSphere.radius;let l=e.getVerticesData(m.PositionKind);const u=e.getIndices(),h=e.getVerticesData(m.UVKind+(a?a+1:"")),d=e.getVerticesData(m.ColorKind),_=T.Zero();e.computeWorldMatrix();const p=e.getWorldMatrix();if(!p.isIdentity()){l=l.slice(0);for(let e=0;e<l.length/3;e++)T.TransformCoordinatesFromFloatsToRef(l[3*e],l[3*e+1],l[3*e+2],p,_),l[3*e]=_.x,l[3*e+1]=_.y,l[3*e+2]=_.z}let x=0,f=0,g=0,y=0,v=0,w=0,C=0,A=0,P=0,b=0,M=0,R=0,I=0;const E=T.Zero(),k=T.Zero(),F=T.Zero(),V=T.Zero(),z=T.Zero();let U=0,B=0,L=0,N=0,X=0,G=0;const H=S.Zero(),Y=S.Zero(),j=S.Zero(),K=S.Zero(),q=S.Zero();let Q=0,J=0,$=0,ee=0,te=0,se=0,ie=0,re=0,ne=0,oe=0,ae=0,ce=0;const le=W.Zero(),ue=W.Zero(),he=W.Zero(),de=W.Zero(),pe=W.Zero();let me,xe,fe=0,ge=0;o=o||0;let ye=new W(0,0,0,0),Te=T.Zero(),ve=T.Zero(),we=T.Zero(),Ce=0,Ae=T.Zero(),Pe=0,be=0;const Me=new _e(T.Zero(),new T(1,0,0));let Re,Ie=T.Zero();for(let a=0;a<u.length/3;a++){let _,p,m,S,W,_e,Se,Ee;f=u[3*a],g=u[3*a+1],y=u[3*a+2],v=l[3*f],w=l[3*f+1],C=l[3*f+2],A=l[3*g],P=l[3*g+1],b=l[3*g+2],M=l[3*y],R=l[3*y+1],I=l[3*y+2],E.set(v,w,C),k.set(A,P,b),F.set(M,R,I),k.subtractToRef(E,V),F.subtractToRef(k,z),h&&(U=h[2*f],B=h[2*f+1],L=h[2*g],N=h[2*g+1],X=h[2*y],G=h[2*y+1],H.set(U,B),Y.set(L,N),j.set(X,G),Y.subtractToRef(H,K),j.subtractToRef(Y,q)),d&&i&&(Q=d[4*f],J=d[4*f+1],$=d[4*f+2],ee=d[4*f+3],te=d[4*g],se=d[4*g+1],ie=d[4*g+2],re=d[4*g+3],ne=d[4*y],oe=d[4*y+1],ae=d[4*y+2],ce=d[4*y+3],le.set(Q,J,$,ee),ue.set(te,se,ie,re),he.set(ne,oe,ae,ce),ue.subtractToRef(le,de),he.subtractToRef(ue,pe));const De=new O(0,0,0),ke=new O(0,0,0);let Fe,Ve;for(let l=0;l<t._groupDensity[a];l++)x=this.particles.length,this._addParticle(x,t,this._groupCounter,a+l),Ve=this.particles[x],fe=Math.sqrt(Z(0,1)),ge=Z(0,1),me=E.add(V.scale(fe)).add(z.scale(fe*ge)),s&&(Te=e.getFacetNormal(a).normalize().scale(-1),ve=V.clone().normalize(),we=T.Cross(Te,ve),Ce=Z(0,2*Math.PI),Ae=ve.scale(Math.cos(Ce)).add(we.scale(Math.sin(Ce))),Ce=Z(.1,Math.PI/2),Ie=Ae.scale(Math.cos(Ce)).add(Te.scale(Math.sin(Ce))),Me.origin=me.add(Ie.scale(1e-5)),Me.direction=Ie,Me.length=c,Re=Me.intersectsMesh(e),Re.hit&&(be=Re.pickedPoint.subtract(me).length(),Pe=Z(0,1)*be,me.addInPlace(Ie.scale(Pe)))),Ve.position=me.clone(),this._positions.push(Ve.position.x,Ve.position.y,Ve.position.z),void 0!==i?h&&(xe=H.add(K.scale(fe)).add(q.scale(fe*ge)),i?r&&null!==t._groupImageData?(_=t._groupImgWidth,p=t._groupImgHeight,Fe=this._getColorIndicesForCoord(t,Math.round(xe.x*_),Math.round(xe.y*p),_),Ve.color=Fe,this._colors.push(Fe.r,Fe.g,Fe.b,Fe.a)):d?(ye=le.add(de.scale(fe)).add(pe.scale(fe*ge)),Ve.color=new D(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w)):(ye=le.set(Math.random(),Math.random(),Math.random(),1),Ve.color=new D(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w)):(Ve.uv=xe.clone(),this._uvs.push(Ve.uv.x,Ve.uv.y))):(n?(De.set(n.r,n.g,n.b),m=Z(-o,o),S=Z(-o,o),Ee=De.toHSV(),W=Ee.r,_e=Ee.g+m,Se=Ee.b+S,_e<0&&(_e=0),_e>1&&(_e=1),Se<0&&(Se=0),Se>1&&(Se=1),O.HSVtoRGBToRef(W,_e,Se,ke),ye.set(ke.r,ke.g,ke.b,1)):ye=le.set(Math.random(),Math.random(),Math.random(),1),Ve.color=new D(ye.x,ye.y,ye.z,ye.w),this._colors.push(ye.x,ye.y,ye.z,ye.w))}}_colorFromTexture(e,t,s){if(null===e.material)return A.Warn(e.name+"has no material."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const i=e.material.getActiveTextures();if(0===i.length)return A.Warn(e.name+"has no usable texture."),t._groupImageData=null,void this._setPointsColorOrUV(e,t,s,!0,!1);const r=e.clone();r.setEnabled(!1),this._promises.push(new Promise((e=>{X.WhenAllReady(i,(()=>{let n=t._textureNb;n<0&&(n=0),n>i.length-1&&(n=i.length-1);const o=()=>{t._groupImgWidth=i[n].getSize().width,t._groupImgHeight=i[n].getSize().height,this._setPointsColorOrUV(r,t,s,!0,!0,void 0,void 0,i[n].coordinatesIndex),r.dispose(),e()};t._groupImageData=null;const a=i[n].readPixels();a?a.then((e=>{t._groupImageData=e,o()})):o()}))})))}_calculateDensity(e,t,s){let i,r,n,o,a,c,l,u,h,d,_,p;const m=T.Zero(),x=T.Zero(),f=T.Zero(),g=T.Zero(),y=T.Zero(),v=T.Zero();let w;const C=[];let A=0;const P=s.length/3;for(let e=0;e<P;e++)i=s[3*e],r=s[3*e+1],n=s[3*e+2],o=t[3*i],a=t[3*i+1],c=t[3*i+2],l=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*n],_=t[3*n+1],p=t[3*n+2],m.set(o,a,c),x.set(l,u,h),f.set(d,_,p),x.subtractToRef(m,g),f.subtractToRef(x,y),T.CrossToRef(g,y,v),w=.5*v.length(),A+=w,C[e]=A;const b=new Array(P);let M=e;for(let e=P-1;e>0;e--){const t=C[e];if(0===t)b[e]=0;else{const s=(t-C[e-1])/t*M,i=Math.floor(s),r=s-i,n=i+Number(Math.random()<r);b[e]=n,M-=n}}return b[0]=M,b}addPoints(e,t=this._randomUnitVector){const s=new de(this._groupCounter,t);let i,r=this.nbParticles;for(let t=0;t<e;t++)i=this._addParticle(r,s,this._groupCounter,t),s&&s._positionFunction&&s._positionFunction(i,r,t),this._positions.push(i.position.x,i.position.y,i.position.z),i.color&&this._colors.push(i.color.r,i.color.g,i.color.b,i.color.a),i.uv&&this._uvs.push(i.uv.x,i.uv.y),r++;return this.nbParticles+=e,this._groupCounter++,this._groupCounter}addSurfacePoints(e,t,s,i,r){let n=s||0;(isNaN(n)||n<0||n>3)&&(n=0);const o=e.getVerticesData(m.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new de(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===n?c._textureNb=i||0:i=i||new D(1,1,1,1),n){case 2:this._colorFromTexture(e,c,!1);break;case 1:this._setPointsColorOrUV(e,c,!1,!1,!1);break;case 0:this._setPointsColorOrUV(e,c,!1);break;case 3:this._setPointsColorOrUV(e,c,!1,void 0,void 0,i,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}addVolumePoints(e,t,s,i,r){let n=s||0;(isNaN(n)||n<0||n>3)&&(n=0);const o=e.getVerticesData(m.PositionKind),a=e.getIndices();this._groups.push(this._groupCounter);const c=new de(this._groupCounter,null);switch(c._groupDensity=this._calculateDensity(t,o,a),2===n?c._textureNb=i||0:i=i||new D(1,1,1,1),n){case 2:this._colorFromTexture(e,c,!0);break;case 1:this._setPointsColorOrUV(e,c,!0,!1,!1);break;case 0:this._setPointsColorOrUV(e,c,!0);break;case 3:this._setPointsColorOrUV(e,c,!0,void 0,void 0,i,r)}return this.nbParticles+=t,this._groupCounter++,this._groupCounter-1}setParticles(e=0,t=this.nbParticles-1,s=!0){if(!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(e,t,s);const i=C.Matrix[0],r=this.mesh,n=this._colors32,o=this._positions32,a=this._uvs32,c=C.Vector3,l=c[5].copyFromFloats(1,0,0),u=c[6].copyFromFloats(0,1,0),h=c[7].copyFromFloats(0,0,1),d=c[8].setAll(Number.MAX_VALUE),_=c[9].setAll(-Number.MAX_VALUE);y.IdentityToRef(i);let p=0;if(this.mesh?.isFacetDataEnabled&&(this._computeBoundingBox=!0),t=t>=this.nbParticles?this.nbParticles-1:t,this._computeBoundingBox&&(0!=e||t!=this.nbParticles-1)){const e=this.mesh?.getBoundingInfo();e&&(d.copyFrom(e.minimum),_.copyFrom(e.maximum))}p=0;let x=0,f=0,g=0;for(let s=e;s<=t;s++){const e=this.particles[s];p=e.idx,x=3*p,f=4*p,g=2*p,this.updateParticle(e);const t=e._rotationMatrix,r=e.position,n=e._globalPosition;this._computeParticleRotation&&e.getRotationMatrix(i);if(null!==e.parentId){const s=this.particles[e.parentId],o=s._rotationMatrix,a=s._globalPosition,c=r.x*o[1]+r.y*o[4]+r.z*o[7],l=r.x*o[0]+r.y*o[3]+r.z*o[6],u=r.x*o[2]+r.y*o[5]+r.z*o[8];if(n.x=a.x+l,n.y=a.y+c,n.z=a.z+u,this._computeParticleRotation){const e=i.m;t[0]=e[0]*o[0]+e[1]*o[3]+e[2]*o[6],t[1]=e[0]*o[1]+e[1]*o[4]+e[2]*o[7],t[2]=e[0]*o[2]+e[1]*o[5]+e[2]*o[8],t[3]=e[4]*o[0]+e[5]*o[3]+e[6]*o[6],t[4]=e[4]*o[1]+e[5]*o[4]+e[6]*o[7],t[5]=e[4]*o[2]+e[5]*o[5]+e[6]*o[8],t[6]=e[8]*o[0]+e[9]*o[3]+e[10]*o[6],t[7]=e[8]*o[1]+e[9]*o[4]+e[10]*o[7],t[8]=e[8]*o[2]+e[9]*o[5]+e[10]*o[8]}}else if(n.x=0,n.y=0,n.z=0,this._computeParticleRotation){const e=i.m;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10]}const a=c[11];e.translateFromPivot?a.setAll(0):a.copyFrom(e.pivot);const m=c[0];m.copyFrom(e.position);const y=m.x-e.pivot.x,T=m.y-e.pivot.y,v=m.z-e.pivot.z;let w=y*t[0]+T*t[3]+v*t[6],C=y*t[1]+T*t[4]+v*t[7],A=y*t[2]+T*t[5]+v*t[8];w+=a.x,C+=a.y,A+=a.z;const P=o[x]=n.x+l.x*w+u.x*C+h.x*A,b=o[x+1]=n.y+l.y*w+u.y*C+h.y*A,M=o[x+2]=n.z+l.z*w+u.z*C+h.z*A;if(this._computeBoundingBox&&(d.minimizeInPlaceFromFloats(P,b,M),_.maximizeInPlaceFromFloats(P,b,M)),this._computeParticleColor&&e.color){const t=e.color,s=this._colors32;s[f]=t.r,s[f+1]=t.g,s[f+2]=t.b,s[f+3]=t.a}if(this._computeParticleTexture&&e.uv){const t=e.uv,s=this._uvs32;s[g]=t.x,s[g+1]=t.y}}return r&&(s&&(this._computeParticleColor&&r.updateVerticesData(m.ColorKind,n,!1,!1),this._computeParticleTexture&&r.updateVerticesData(m.UVKind,a,!1,!1),r.updateVerticesData(m.PositionKind,o,!1,!1)),this._computeBoundingBox&&(r.hasBoundingInfo?r.getBoundingInfo().reConstruct(d,_,r._worldMatrix):r.buildBoundingInfo(d,_,r._worldMatrix))),this.afterUpdateParticles(e,t,s),this}dispose(){this.mesh?.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._uvs32=null,this._colors32=null}refreshVisibleSize(){return this._isVisibilityBoxLocked||this.mesh?.refreshBoundingInfo(),this}setVisibilityBox(e){if(!this.mesh)return;const t=e/2;this.mesh.buildBoundingInfo(new T(-t,-t,-t),new T(t,t,t))}get isAlwaysVisible(){return this._alwaysVisible}set isAlwaysVisible(e){this.mesh&&(this._alwaysVisible=e,this.mesh.alwaysSelectAsActiveMesh=e)}set computeParticleRotation(e){this._computeParticleRotation=e}set computeParticleColor(e){this._computeParticleColor=e}set computeParticleTexture(e){this._computeParticleTexture=e}get computeParticleColor(){return this._computeParticleColor}get computeParticleTexture(){return this._computeParticleTexture}set computeBoundingBox(e){this._computeBoundingBox=e}get computeBoundingBox(){return this._computeBoundingBox}initParticles(){}recycleParticle(e){return e}updateParticle(e){return e}beforeUpdateParticles(e,t,s){}afterUpdateParticles(e,t,s){}}!function(e){e[e.Splat=0]="Splat",e[e.PointCloud=1]="PointCloud",e[e.Mesh=2]="Mesh"}(le||(le={}));class we{constructor(e=we._DefaultLoadingOptions){this.name=G.name,this._assetContainer=null,this.extensions=G.extensions,this._loadingOptions=e}createPlugin(e){return new we(e[G.name])}async importMeshAsync(e,t,s,i,r,n){return this._parse(e,t,s,i).then((e=>({meshes:e,particleSystems:[],skeletons:[],animationGroups:[],transformNodes:[],geometries:[],lights:[],spriteManagers:[]})))}static _BuildPointCloud(e,t){if(!t.byteLength)return!1;const s=new Uint8Array(t),i=new Float32Array(t),r=s.length/32;return e.addPoints(r,(function(e,t){const r=i[8*t+0],n=i[8*t+1],o=i[8*t+2];e.position=new T(r,n,o);const a=s[32*t+24+0]/255,c=s[32*t+24+1]/255,l=s[32*t+24+2]/255;e.color=new D(a,c,l,1)})),!0}static _BuildMesh(e,t){const s=new g("PLYMesh",e),i=new Uint8Array(t.data),r=new Float32Array(t.data),n=i.length/32,o=[],a=new v;for(let e=0;e<n;e++){const t=r[8*e+0],s=r[8*e+1],i=r[8*e+2];o.push(t,s,i)}if(t.hasVertexColors){const e=new Float32Array(4*n);for(let t=0;t<n;t++){const s=i[32*t+24+0]/255,r=i[32*t+24+1]/255,n=i[32*t+24+2]/255;e[4*t+0]=s,e[4*t+1]=r,e[4*t+2]=n,e[4*t+3]=1}a.colors=e}return a.positions=o,a.indices=t.faces,a.applyToMesh(s),s}_parse(e,t,s,i){return we._ConvertPLYToSplat(s).then((async e=>{const s=[];switch(e.mode){case 0:{const i=new ue("GaussianSplatting",null,t,this._loadingOptions.keepInRam);i._parentContainer=this._assetContainer,s.push(i),await i.updateDataAsync(e.data)}break;case 1:{const i=new ve("PointCloud",1,t);if(we._BuildPointCloud(i,e.data))return Promise.all([i.buildMeshAsync()]).then((e=>(s.push(e[0]),s)));i.dispose()}break;case 2:if(!e.faces)throw new Error("PLY mesh doesn't contain face informations.");s.push(we._BuildMesh(t,e));break;default:throw new Error("Unsupported Splat mode")}return new Promise((e=>{e(s)}))}))}loadAssetContainerAsync(e,t,s){const i=new j(e);return this._assetContainer=i,this.importMeshAsync(null,e,t,s).then((e=>(e.meshes.forEach((e=>i.meshes.push(e))),this._assetContainer=null,i))).catch((e=>{throw this._assetContainer=null,e}))}loadAsync(e,t,s){return this.importMeshAsync(null,e,t,s).then((()=>{}))}static _ConvertPLYToSplat(e){const t=new Uint8Array(e),s=(new TextDecoder).decode(t.slice(0,10240)),i="end_header\n",r=s.indexOf(i);if(r<0||!s)return new Promise((t=>{t({mode:0,data:e})}));const n=parseInt(/element vertex (\d+)\n/.exec(s)[1]),o=/element face (\d+)\n/.exec(s);let a=0;o&&(a=parseInt(o[1]));const c=/element chunk (\d+)\n/.exec(s);let l=0;c&&(l=parseInt(c[1]));let u=0,h=0;const d={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};let _;!function(e){e[e.Vertex=0]="Vertex",e[e.Chunk=1]="Chunk"}(_||(_={}));let p=1;const m=[],x=s.slice(0,r).split("\n");for(const e of x)if(e.startsWith("property ")){const[,t,s]=e.split(" ");1==p?h+=d[t]:0==p&&(m.push({name:s,type:t,offset:u}),u+=d[t]),d[t]||A.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){const[,t]=e.split(" ");"chunk"==t?p=1:"vertex"==t&&(p=0)}const f=u,g=h;return ue.ConvertPLYToSplatAsync(e).then((t=>{const s=new DataView(e,r+11);let i=g*l+f*n;const o=[];if(a)for(let e=0;e<a;e++){const e=s.getUint8(i);if(3==e){i+=1;for(let t=0;t<e;t++){const e=s.getUint32(i+4*(2-t),!0);o.push(e)}i+=12}}if(l)return new Promise((e=>{e({mode:0,data:t,faces:o,hasVertexColors:!1})}));let c=0,u=0;const h=["x","y","z","scale_0","scale_1","scale_2","opacity","rot_0","rot_1","rot_2","rot_3"],d=["red","green","blue","f_dc_0","f_dc_1","f_dc_2"];for(let e=0;e<m.length;e++){const t=m[e];h.includes(t.name)&&c++,d.includes(t.name)&&u++}const _=c==h.length&&3==u,p=a?2:_?0:1;return new Promise((e=>{e({mode:p,data:t,faces:o,hasVertexColors:!!u})}))}))}}we._DefaultLoadingOptions={keepInRam:!1},H(new we);export{we as SPLATFileLoader};
|
|
2
|
-
//# sourceMappingURL=splatFileLoader-ChunqjQD.esm.min.js.map
|