@babylonjs/viewer 7.31.0-alpha → 7.31.1
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-1Sn4IFKs.esm.min.js +0 -2
- package/dist/chunks/EXT_lights_image_based-1Sn4IFKs.esm.min.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-D3t-ue9C.esm.js +0 -172
- package/dist/chunks/EXT_lights_image_based-D3t-ue9C.esm.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-CzXou_C5.esm.min.js +0 -2
- package/dist/chunks/EXT_mesh_gpu_instancing-CzXou_C5.esm.min.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-DNqfkZKe.esm.js +0 -86
- package/dist/chunks/EXT_mesh_gpu_instancing-DNqfkZKe.esm.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-BFcdcCqV.esm.js +0 -134
- package/dist/chunks/EXT_meshopt_compression-BFcdcCqV.esm.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-ypfe6hxf.esm.min.js +0 -2
- package/dist/chunks/EXT_meshopt_compression-ypfe6hxf.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-BY8qfvRI.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_avif-BY8qfvRI.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-Rv3zIg4n.esm.js +0 -44
- package/dist/chunks/EXT_texture_avif-Rv3zIg4n.esm.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-D2O_CsAp.esm.js +0 -43
- package/dist/chunks/EXT_texture_webp-D2O_CsAp.esm.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-oE-jrE0E.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_webp-oE-jrE0E.esm.min.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-BhuY0e54.esm.js +0 -64
- package/dist/chunks/ExtrasAsMetadata-BhuY0e54.esm.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-qFEtoYbf.esm.min.js +0 -2
- package/dist/chunks/ExtrasAsMetadata-qFEtoYbf.esm.min.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-Bj6qGv9V.esm.min.js +0 -2
- package/dist/chunks/KHR_animation_pointer-Bj6qGv9V.esm.min.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-e5LnBZe7.esm.js +0 -343
- package/dist/chunks/KHR_animation_pointer-e5LnBZe7.esm.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-BnFvVWE1.esm.js +0 -610
- package/dist/chunks/KHR_draco_mesh_compression-BnFvVWE1.esm.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-CVQu_5W6.esm.min.js +0 -2
- package/dist/chunks/KHR_draco_mesh_compression-CVQu_5W6.esm.min.js.map +0 -1
- package/dist/chunks/KHR_interactivity-D7Zg2GDq.esm.js +0 -4033
- package/dist/chunks/KHR_interactivity-D7Zg2GDq.esm.js.map +0 -1
- package/dist/chunks/KHR_interactivity-xGH2Adpb.esm.min.js +0 -2
- package/dist/chunks/KHR_interactivity-xGH2Adpb.esm.min.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-BBAuDZDL.esm.js +0 -1253
- package/dist/chunks/KHR_lights_punctual-BBAuDZDL.esm.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-By9M6UVy.esm.min.js +0 -2
- package/dist/chunks/KHR_lights_punctual-By9M6UVy.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-Dkjoca14.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_anisotropy-Dkjoca14.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-qH3HobA9.esm.js +0 -64
- package/dist/chunks/KHR_materials_anisotropy-qH3HobA9.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-DAuJsTVp.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_clearcoat-DAuJsTVp.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-Rh6mwG6v.esm.js +0 -96
- package/dist/chunks/KHR_materials_clearcoat-Rh6mwG6v.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-CaxPwhcF.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_diffuse_transmission-CaxPwhcF.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-jR3LYlsn.esm.js +0 -97
- package/dist/chunks/KHR_materials_diffuse_transmission-jR3LYlsn.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-BRhiELQt.esm.js +0 -62
- package/dist/chunks/KHR_materials_dispersion-BRhiELQt.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-c6lYSa9v.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_dispersion-c6lYSa9v.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-C4KADmHK.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_emissive_strength-C4KADmHK.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-COLYrrO0.esm.js +0 -55
- package/dist/chunks/KHR_materials_emissive_strength-COLYrrO0.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-9bOEUBVJ.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_ior-9bOEUBVJ.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-CfRDQILO.esm.js +0 -64
- package/dist/chunks/KHR_materials_ior-CfRDQILO.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-BK4vIyb6.esm.js +0 -72
- package/dist/chunks/KHR_materials_iridescence-BK4vIyb6.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-DMeUVUvt.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_iridescence-DMeUVUvt.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CWS40ry_.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CWS40ry_.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-cT4jFxi_.esm.js +0 -81
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-cT4jFxi_.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-BsgoALiy.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_sheen-BsgoALiy.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-CvenDbqD.esm.js +0 -85
- package/dist/chunks/KHR_materials_sheen-CvenDbqD.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-BeN-G9hP.esm.js +0 -75
- package/dist/chunks/KHR_materials_specular-BeN-G9hP.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-Czv7IKcP.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_specular-Czv7IKcP.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-Bak4NBR7.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_transmission-Bak4NBR7.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-heOgvXed.esm.js +0 -307
- package/dist/chunks/KHR_materials_transmission-heOgvXed.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-IBVAhMFj.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_unlit-IBVAhMFj.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-wxh2_v42.esm.js +0 -74
- package/dist/chunks/KHR_materials_unlit-wxh2_v42.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-BsiSr1O-.esm.js +0 -238
- package/dist/chunks/KHR_materials_variants-BsiSr1O-.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-Dj5fUGRW.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_variants-Dj5fUGRW.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-CZH9egfT.esm.js +0 -87
- package/dist/chunks/KHR_materials_volume-CZH9egfT.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-DfCuukn0.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_volume-DfCuukn0.esm.min.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-BIobOHHb.esm.min.js +0 -2
- package/dist/chunks/KHR_mesh_quantization-BIobOHHb.esm.min.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-QON7M_53.esm.js +0 -26
- package/dist/chunks/KHR_mesh_quantization-QON7M_53.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-BoG2JtnT.esm.js +0 -43
- package/dist/chunks/KHR_texture_basisu-BoG2JtnT.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-CzUzxtEH.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_basisu-CzUzxtEH.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-B3PKgt19.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_transform-B3PKgt19.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-Da8RjC5v.esm.js +0 -63
- package/dist/chunks/KHR_texture_transform-Da8RjC5v.esm.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-BXaa7VXe.esm.js +0 -51
- package/dist/chunks/KHR_xmp_json_ld-BXaa7VXe.esm.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-HVJ543WV.esm.min.js +0 -2
- package/dist/chunks/KHR_xmp_json_ld-HVJ543WV.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-BYUSVj_s.esm.js +0 -2207
- package/dist/chunks/MSFT_audio_emitter-BYUSVj_s.esm.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-Bf4t92OW.esm.min.js +0 -2
- package/dist/chunks/MSFT_audio_emitter-Bf4t92OW.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_lod-BTk5ksDE.esm.min.js +0 -2
- package/dist/chunks/MSFT_lod-BTk5ksDE.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_lod-D5456UFP.esm.js +0 -337
- package/dist/chunks/MSFT_lod-D5456UFP.esm.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-CCs8f9du.esm.js +0 -46
- package/dist/chunks/MSFT_minecraftMesh-CCs8f9du.esm.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-CgKnODjc.esm.min.js +0 -2
- package/dist/chunks/MSFT_minecraftMesh-CgKnODjc.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-BNCv6Gre.esm.min.js +0 -2
- package/dist/chunks/MSFT_sRGBFactors-BNCv6Gre.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-C3nCz417.esm.js +0 -47
- package/dist/chunks/MSFT_sRGBFactors-C3nCz417.esm.js.map +0 -1
- package/dist/chunks/animationGroup-B_FlMnip.esm.js +0 -2479
- package/dist/chunks/animationGroup-B_FlMnip.esm.js.map +0 -1
- package/dist/chunks/animationGroup-U_g242TE.esm.min.js +0 -2
- package/dist/chunks/animationGroup-U_g242TE.esm.min.js.map +0 -1
- package/dist/chunks/assetContainer-DJXgbG9e.esm.min.js +0 -2
- package/dist/chunks/assetContainer-DJXgbG9e.esm.min.js.map +0 -1
- package/dist/chunks/assetContainer-shLWEkis.esm.js +0 -1720
- package/dist/chunks/assetContainer-shLWEkis.esm.js.map +0 -1
- package/dist/chunks/audioEngine-BdqCvyFS.esm.min.js +0 -2
- package/dist/chunks/audioEngine-BdqCvyFS.esm.min.js.map +0 -1
- package/dist/chunks/audioEngine-CSl97t3Y.esm.js +0 -305
- package/dist/chunks/audioEngine-CSl97t3Y.esm.js.map +0 -1
- package/dist/chunks/bakedVertexAnimation-C225r8bl.esm.min.js +0 -2
- package/dist/chunks/bakedVertexAnimation-C225r8bl.esm.min.js.map +0 -1
- package/dist/chunks/bakedVertexAnimation-Dne6l1Oz.esm.js +0 -119
- package/dist/chunks/bakedVertexAnimation-Dne6l1Oz.esm.js.map +0 -1
- package/dist/chunks/basisTextureLoader-BfheE-xD.esm.min.js +0 -2
- package/dist/chunks/basisTextureLoader-BfheE-xD.esm.min.js.map +0 -1
- package/dist/chunks/basisTextureLoader-VQfGwMJX.esm.js +0 -600
- package/dist/chunks/basisTextureLoader-VQfGwMJX.esm.js.map +0 -1
- package/dist/chunks/dds-CPxH79qD.esm.min.js +0 -2
- package/dist/chunks/dds-CPxH79qD.esm.min.js.map +0 -1
- package/dist/chunks/dds-jupK5Xca.esm.js +0 -540
- package/dist/chunks/dds-jupK5Xca.esm.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-CWwCoP7e.esm.js +0 -88
- package/dist/chunks/ddsTextureLoader-CWwCoP7e.esm.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-ee9z1K7d.esm.min.js +0 -2
- package/dist/chunks/ddsTextureLoader-ee9z1K7d.esm.min.js.map +0 -1
- package/dist/chunks/decalFragment-Bgt_beL3.esm.min.js +0 -2
- package/dist/chunks/decalFragment-Bgt_beL3.esm.min.js.map +0 -1
- package/dist/chunks/decalFragment-U3dusC_b.esm.js +0 -18
- package/dist/chunks/decalFragment-U3dusC_b.esm.js.map +0 -1
- package/dist/chunks/default.fragment-755hWDS-.esm.min.js +0 -2
- package/dist/chunks/default.fragment-755hWDS-.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-D_6g-4FJ.esm.min.js +0 -2
- package/dist/chunks/default.fragment-D_6g-4FJ.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-gPrZWAN-.esm.js +0 -515
- package/dist/chunks/default.fragment-gPrZWAN-.esm.js.map +0 -1
- package/dist/chunks/default.fragment-nUN83GhL.esm.js +0 -449
- package/dist/chunks/default.fragment-nUN83GhL.esm.js.map +0 -1
- package/dist/chunks/default.vertex-DtF9_kYE.esm.min.js +0 -2
- package/dist/chunks/default.vertex-DtF9_kYE.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-DvTIJZKP.esm.min.js +0 -2
- package/dist/chunks/default.vertex-DvTIJZKP.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-F2GFvisP.esm.js +0 -199
- package/dist/chunks/default.vertex-F2GFvisP.esm.js.map +0 -1
- package/dist/chunks/default.vertex-OWU0h_CV.esm.js +0 -180
- package/dist/chunks/default.vertex-OWU0h_CV.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-BaqLnFSv.esm.js +0 -15
- package/dist/chunks/defaultUboDeclaration-BaqLnFSv.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-CUGFIA-Y.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-CUGFIA-Y.esm.min.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-DbiYbpus.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-DbiYbpus.esm.min.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-DlF6YqnH.esm.js +0 -13
- package/dist/chunks/defaultUboDeclaration-DlF6YqnH.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-CC7eSIIa.esm.min.js +0 -2
- package/dist/chunks/dumpTools-CC7eSIIa.esm.min.js.map +0 -1
- package/dist/chunks/dumpTools-CP5neapl.esm.js +0 -402
- package/dist/chunks/dumpTools-CP5neapl.esm.js.map +0 -1
- package/dist/chunks/engine-CXvt3UCI.esm.min.js +0 -2
- package/dist/chunks/engine-CXvt3UCI.esm.min.js.map +0 -1
- package/dist/chunks/engine-trgW7_81.esm.js +0 -2174
- package/dist/chunks/engine-trgW7_81.esm.js.map +0 -1
- package/dist/chunks/engine.common-BPl1llb8.esm.min.js +0 -2
- package/dist/chunks/engine.common-BPl1llb8.esm.min.js.map +0 -1
- package/dist/chunks/engine.common-GP9nuuba.esm.js +0 -1088
- package/dist/chunks/engine.common-GP9nuuba.esm.js.map +0 -1
- package/dist/chunks/envTextureLoader-1bAO1Mm5.esm.js +0 -65
- package/dist/chunks/envTextureLoader-1bAO1Mm5.esm.js.map +0 -1
- package/dist/chunks/envTextureLoader-ClAG0fvY.esm.min.js +0 -2
- package/dist/chunks/envTextureLoader-ClAG0fvY.esm.min.js.map +0 -1
- package/dist/chunks/environmentTextureTools-DObcbjyn.esm.js +0 -382
- package/dist/chunks/environmentTextureTools-DObcbjyn.esm.js.map +0 -1
- package/dist/chunks/environmentTextureTools-DSF9-gKd.esm.min.js +0 -2
- package/dist/chunks/environmentTextureTools-DSF9-gKd.esm.min.js.map +0 -1
- package/dist/chunks/exrTextureLoader-KLC0QCGj.esm.min.js +0 -2
- package/dist/chunks/exrTextureLoader-KLC0QCGj.esm.min.js.map +0 -1
- package/dist/chunks/exrTextureLoader-b9G_ErfI.esm.js +0 -1682
- package/dist/chunks/exrTextureLoader-b9G_ErfI.esm.js.map +0 -1
- package/dist/chunks/fogFragment-Cr8RDhS8.esm.min.js +0 -2
- package/dist/chunks/fogFragment-Cr8RDhS8.esm.min.js.map +0 -1
- package/dist/chunks/fogFragment-CxJJx6zN.esm.js +0 -102
- package/dist/chunks/fogFragment-CxJJx6zN.esm.js.map +0 -1
- package/dist/chunks/fresnelFunction-BbOBXKTe.esm.min.js +0 -2
- package/dist/chunks/fresnelFunction-BbOBXKTe.esm.min.js.map +0 -1
- package/dist/chunks/fresnelFunction-Cpph6xZu.esm.js +0 -12
- package/dist/chunks/fresnelFunction-Cpph6xZu.esm.js.map +0 -1
- package/dist/chunks/glTFLoader-BFTXjWeW.esm.js +0 -7577
- package/dist/chunks/glTFLoader-BFTXjWeW.esm.js.map +0 -1
- package/dist/chunks/glTFLoader-C1FQTJvU.esm.min.js +0 -2
- package/dist/chunks/glTFLoader-C1FQTJvU.esm.min.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-BCVHkNQT.esm.js +0 -77
- package/dist/chunks/glTFLoaderAnimation-BCVHkNQT.esm.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-ncwBNhw0.esm.min.js +0 -2
- package/dist/chunks/glTFLoaderAnimation-ncwBNhw0.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-66G9hOzR.esm.js +0 -35
- package/dist/chunks/harmonicsFunctions-66G9hOzR.esm.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-Bvt11NHS.esm.js +0 -34
- package/dist/chunks/harmonicsFunctions-Bvt11NHS.esm.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-D0Re3qr9.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-D0Re3qr9.esm.min.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-D9bArd30.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-D9bArd30.esm.min.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-BMnKRS4K.esm.min.js +0 -2
- package/dist/chunks/hdrTextureLoader-BMnKRS4K.esm.min.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-ETVy5rPX.esm.js +0 -252
- package/dist/chunks/hdrTextureLoader-ETVy5rPX.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-1Uut4KQI.esm.js +0 -108
- package/dist/chunks/helperFunctions-1Uut4KQI.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-1x6PNrxE.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-1x6PNrxE.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-CJjw4iZI.esm.js +0 -80
- package/dist/chunks/helperFunctions-CJjw4iZI.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-J9m3fJc_.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-J9m3fJc_.esm.min.js.map +0 -1
- package/dist/chunks/index-Cb7zGjYe.esm.js +0 -72045
- package/dist/chunks/index-Cb7zGjYe.esm.js.map +0 -1
- package/dist/chunks/index-CkOp_ioW.esm.min.js +0 -57
- package/dist/chunks/index-CkOp_ioW.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-C4PPft8N.esm.min.js +0 -2
- package/dist/chunks/ktxTextureLoader-C4PPft8N.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-DLZDXIUP.esm.js +0 -814
- package/dist/chunks/ktxTextureLoader-DLZDXIUP.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-BOGD7tpa.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-BOGD7tpa.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-BRSEcIOm.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-BRSEcIOm.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-Bix7HqfF.esm.js +0 -20
- package/dist/chunks/logDepthDeclaration-Bix7HqfF.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-CvnYdiLu.esm.js +0 -35
- package/dist/chunks/logDepthDeclaration-CvnYdiLu.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-CwCjtdqq.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-CwCjtdqq.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-Nm8V7C0Z.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-Nm8V7C0Z.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-_i7_lZHr.esm.js +0 -77
- package/dist/chunks/logDepthVertex-_i7_lZHr.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-eenp9mns.esm.js +0 -488
- package/dist/chunks/logDepthVertex-eenp9mns.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-HzWn5jph.esm.js +0 -11
- package/dist/chunks/mainUVVaryingDeclaration-HzWn5jph.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-lsGkWAON.esm.min.js +0 -2
- package/dist/chunks/mainUVVaryingDeclaration-lsGkWAON.esm.min.js.map +0 -1
- package/dist/chunks/meshUboDeclaration-BmNS2VSX.esm.min.js +0 -2
- package/dist/chunks/meshUboDeclaration-BmNS2VSX.esm.min.js.map +0 -1
- package/dist/chunks/meshUboDeclaration-CEgHTdJe.esm.js +0 -24
- package/dist/chunks/meshUboDeclaration-CEgHTdJe.esm.js.map +0 -1
- package/dist/chunks/objFileLoader-8bz2-Jb0.esm.min.js +0 -2
- package/dist/chunks/objFileLoader-8bz2-Jb0.esm.min.js.map +0 -1
- package/dist/chunks/objFileLoader-BDQi-zCy.esm.js +0 -1338
- package/dist/chunks/objFileLoader-BDQi-zCy.esm.js.map +0 -1
- package/dist/chunks/oitFragment-Be6X-0NA.esm.js +0 -1150
- package/dist/chunks/oitFragment-Be6X-0NA.esm.js.map +0 -1
- package/dist/chunks/oitFragment-DWdtkgKQ.esm.min.js +0 -2
- package/dist/chunks/oitFragment-DWdtkgKQ.esm.min.js.map +0 -1
- package/dist/chunks/oitFragment-o6GCGw0X.esm.min.js +0 -2
- package/dist/chunks/oitFragment-o6GCGw0X.esm.min.js.map +0 -1
- package/dist/chunks/oitFragment-x42vz6VK.esm.js +0 -1210
- package/dist/chunks/oitFragment-x42vz6VK.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-CMPjD56P.esm.js +0 -15
- package/dist/chunks/pass.fragment-CMPjD56P.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-DeE_D_Ho.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-DeE_D_Ho.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-XFaFDzze.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-XFaFDzze.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-sInzyG4C.esm.js +0 -15
- package/dist/chunks/pass.fragment-sInzyG4C.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-B9NWhj7v.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-B9NWhj7v.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-BhRoKi7n.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-BhRoKi7n.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-CUczqvrb.esm.js +0 -3219
- package/dist/chunks/pbr.fragment-CUczqvrb.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-gKQNER09.esm.js +0 -3165
- package/dist/chunks/pbr.fragment-gKQNER09.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-C4dWKPQ3.esm.js +0 -335
- package/dist/chunks/pbr.vertex-C4dWKPQ3.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-CATY0wtz.esm.js +0 -210
- package/dist/chunks/pbr.vertex-CATY0wtz.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-CeQL7NsJ.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-CeQL7NsJ.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-D74kRBI7.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-D74kRBI7.esm.min.js.map +0 -1
- package/dist/chunks/postprocess.vertex-D9sxQJT6.esm.js +0 -18
- package/dist/chunks/postprocess.vertex-D9sxQJT6.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-DdMLiNeD.esm.min.js +0 -2
- package/dist/chunks/postprocess.vertex-DdMLiNeD.esm.min.js.map +0 -1
- package/dist/chunks/postprocess.vertex-DdSrvJuP.esm.min.js +0 -2
- package/dist/chunks/postprocess.vertex-DdSrvJuP.esm.min.js.map +0 -1
- package/dist/chunks/postprocess.vertex-EjDuDs7l.esm.js +0 -20
- package/dist/chunks/postprocess.vertex-EjDuDs7l.esm.js.map +0 -1
- package/dist/chunks/rawTexture-Bo4-e4rx.esm.js +0 -191
- package/dist/chunks/rawTexture-Bo4-e4rx.esm.js.map +0 -1
- package/dist/chunks/rawTexture-WJAHgyBM.esm.min.js +0 -2
- package/dist/chunks/rawTexture-WJAHgyBM.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-BsO7SzGw.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-BsO7SzGw.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-CXGWY_Zq.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-CXGWY_Zq.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-DHrGqYGx.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-DHrGqYGx.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-M48plJKv.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-M48plJKv.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-72S9TLT4.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-72S9TLT4.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-BUON0ZNd.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-BUON0ZNd.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-CNl9WQUM.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-CNl9WQUM.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-DtRf0vhW.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-DtRf0vhW.esm.js.map +0 -1
- package/dist/chunks/splatFileLoader-1QbSvkNp.esm.min.js +0 -2
- package/dist/chunks/splatFileLoader-1QbSvkNp.esm.min.js.map +0 -1
- package/dist/chunks/splatFileLoader-BLSQsIhb.esm.js +0 -3534
- package/dist/chunks/splatFileLoader-BLSQsIhb.esm.js.map +0 -1
- package/dist/chunks/standardMaterial-4sW8n3MU.esm.min.js +0 -2
- package/dist/chunks/standardMaterial-4sW8n3MU.esm.min.js.map +0 -1
- package/dist/chunks/standardMaterial-BMVfbLzg.esm.js +0 -1800
- package/dist/chunks/standardMaterial-BMVfbLzg.esm.js.map +0 -1
- package/dist/chunks/stlFileLoader-BsbF7xOo.esm.js +0 -238
- package/dist/chunks/stlFileLoader-BsbF7xOo.esm.js.map +0 -1
- package/dist/chunks/stlFileLoader-CIEDAEkS.esm.min.js +0 -2
- package/dist/chunks/stlFileLoader-CIEDAEkS.esm.min.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-BbTIdrAk.esm.min.js +0 -2
- package/dist/chunks/tgaTextureLoader-BbTIdrAk.esm.min.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-Dzknjg7w.esm.js +0 -349
- package/dist/chunks/tgaTextureLoader-Dzknjg7w.esm.js.map +0 -1
- package/dist/chunks/thinEngine-D9PVgBpS.esm.min.js +0 -2
- package/dist/chunks/thinEngine-D9PVgBpS.esm.min.js.map +0 -1
- package/dist/chunks/thinEngine-DGKggD4b.esm.js +0 -3721
- package/dist/chunks/thinEngine-DGKggD4b.esm.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-Cm7oVt83.esm.js +0 -314
- package/dist/chunks/thinInstanceMesh-Cm7oVt83.esm.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-CpMngBy7.esm.min.js +0 -2
- package/dist/chunks/thinInstanceMesh-CpMngBy7.esm.min.js.map +0 -1
- package/dist/chunks/vertexColorMixing-DH0rI910.esm.min.js +0 -2
- package/dist/chunks/vertexColorMixing-DH0rI910.esm.min.js.map +0 -1
- package/dist/chunks/vertexColorMixing-U49ClqLL.esm.js +0 -528
- package/dist/chunks/vertexColorMixing-U49ClqLL.esm.js.map +0 -1
- package/dist/chunks/webgpuEngine-BL-YuOoY.esm.min.js +0 -2
- package/dist/chunks/webgpuEngine-BL-YuOoY.esm.min.js.map +0 -1
- package/dist/chunks/webgpuEngine-DPV5C2k5.esm.js +0 -11191
- package/dist/chunks/webgpuEngine-DPV5C2k5.esm.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 -325
- package/lib/index.js +0 -1116
- package/lib/index.js.map +0 -1
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Helper class to push actions to a pool of workers.
|
|
3
|
-
*/
|
|
4
|
-
class WorkerPool {
|
|
5
|
-
/**
|
|
6
|
-
* Constructor
|
|
7
|
-
* @param workers Array of workers to use for actions
|
|
8
|
-
*/
|
|
9
|
-
constructor(workers) {
|
|
10
|
-
this._pendingActions = new Array();
|
|
11
|
-
this._workerInfos = workers.map((worker) => ({
|
|
12
|
-
workerPromise: Promise.resolve(worker),
|
|
13
|
-
idle: true,
|
|
14
|
-
}));
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Terminates all workers and clears any pending actions.
|
|
18
|
-
*/
|
|
19
|
-
dispose() {
|
|
20
|
-
for (const workerInfo of this._workerInfos) {
|
|
21
|
-
workerInfo.workerPromise.then((worker) => {
|
|
22
|
-
worker.terminate();
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
this._workerInfos.length = 0;
|
|
26
|
-
this._pendingActions.length = 0;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Pushes an action to the worker pool. If all the workers are active, the action will be
|
|
30
|
-
* pended until a worker has completed its action.
|
|
31
|
-
* @param action The action to perform. Call onComplete when the action is complete.
|
|
32
|
-
*/
|
|
33
|
-
push(action) {
|
|
34
|
-
if (!this._executeOnIdleWorker(action)) {
|
|
35
|
-
this._pendingActions.push(action);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
_executeOnIdleWorker(action) {
|
|
39
|
-
for (const workerInfo of this._workerInfos) {
|
|
40
|
-
if (workerInfo.idle) {
|
|
41
|
-
this._execute(workerInfo, action);
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
_execute(workerInfo, action) {
|
|
48
|
-
workerInfo.idle = false;
|
|
49
|
-
workerInfo.workerPromise.then((worker) => {
|
|
50
|
-
action(worker, () => {
|
|
51
|
-
const nextAction = this._pendingActions.shift();
|
|
52
|
-
if (nextAction) {
|
|
53
|
-
this._execute(workerInfo, nextAction);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
workerInfo.idle = true;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Similar to the WorkerPool class except it creates and destroys workers automatically with a maximum of `maxWorkers` workers.
|
|
64
|
-
* Workers are terminated when it is idle for at least `idleTimeElapsedBeforeRelease` milliseconds.
|
|
65
|
-
*/
|
|
66
|
-
class AutoReleaseWorkerPool extends WorkerPool {
|
|
67
|
-
constructor(maxWorkers, createWorkerAsync, options = AutoReleaseWorkerPool.DefaultOptions) {
|
|
68
|
-
super([]);
|
|
69
|
-
this._maxWorkers = maxWorkers;
|
|
70
|
-
this._createWorkerAsync = createWorkerAsync;
|
|
71
|
-
this._options = options;
|
|
72
|
-
}
|
|
73
|
-
push(action) {
|
|
74
|
-
if (!this._executeOnIdleWorker(action)) {
|
|
75
|
-
if (this._workerInfos.length < this._maxWorkers) {
|
|
76
|
-
const workerInfo = {
|
|
77
|
-
workerPromise: this._createWorkerAsync(),
|
|
78
|
-
idle: false,
|
|
79
|
-
};
|
|
80
|
-
this._workerInfos.push(workerInfo);
|
|
81
|
-
this._execute(workerInfo, action);
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
this._pendingActions.push(action);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
_execute(workerInfo, action) {
|
|
89
|
-
// Reset the idle timeout.
|
|
90
|
-
if (workerInfo.timeoutId) {
|
|
91
|
-
clearTimeout(workerInfo.timeoutId);
|
|
92
|
-
delete workerInfo.timeoutId;
|
|
93
|
-
}
|
|
94
|
-
super._execute(workerInfo, (worker, onComplete) => {
|
|
95
|
-
action(worker, () => {
|
|
96
|
-
onComplete();
|
|
97
|
-
if (workerInfo.idle) {
|
|
98
|
-
// Schedule the worker to be terminated after the elapsed time.
|
|
99
|
-
workerInfo.timeoutId = setTimeout(() => {
|
|
100
|
-
workerInfo.workerPromise.then((worker) => {
|
|
101
|
-
worker.terminate();
|
|
102
|
-
});
|
|
103
|
-
const indexOf = this._workerInfos.indexOf(workerInfo);
|
|
104
|
-
if (indexOf !== -1) {
|
|
105
|
-
this._workerInfos.splice(indexOf, 1);
|
|
106
|
-
}
|
|
107
|
-
}, this._options.idleTimeElapsedBeforeRelease);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Default options for the constructor.
|
|
115
|
-
* Override to change the defaults.
|
|
116
|
-
*/
|
|
117
|
-
AutoReleaseWorkerPool.DefaultOptions = {
|
|
118
|
-
idleTimeElapsedBeforeRelease: 1000,
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export { AutoReleaseWorkerPool as A };
|
|
122
|
-
//# sourceMappingURL=workerPool-BUOov2K1.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workerPool-BUOov2K1.esm.js","sources":["../../../../../dev/core/dist/Misc/workerPool.js"],"sourcesContent":["/**\n * Helper class to push actions to a pool of workers.\n */\nexport class WorkerPool {\n /**\n * Constructor\n * @param workers Array of workers to use for actions\n */\n constructor(workers) {\n this._pendingActions = new Array();\n this._workerInfos = workers.map((worker) => ({\n workerPromise: Promise.resolve(worker),\n idle: true,\n }));\n }\n /**\n * Terminates all workers and clears any pending actions.\n */\n dispose() {\n for (const workerInfo of this._workerInfos) {\n workerInfo.workerPromise.then((worker) => {\n worker.terminate();\n });\n }\n this._workerInfos.length = 0;\n this._pendingActions.length = 0;\n }\n /**\n * Pushes an action to the worker pool. If all the workers are active, the action will be\n * pended until a worker has completed its action.\n * @param action The action to perform. Call onComplete when the action is complete.\n */\n push(action) {\n if (!this._executeOnIdleWorker(action)) {\n this._pendingActions.push(action);\n }\n }\n _executeOnIdleWorker(action) {\n for (const workerInfo of this._workerInfos) {\n if (workerInfo.idle) {\n this._execute(workerInfo, action);\n return true;\n }\n }\n return false;\n }\n _execute(workerInfo, action) {\n workerInfo.idle = false;\n workerInfo.workerPromise.then((worker) => {\n action(worker, () => {\n const nextAction = this._pendingActions.shift();\n if (nextAction) {\n this._execute(workerInfo, nextAction);\n }\n else {\n workerInfo.idle = true;\n }\n });\n });\n }\n}\n/**\n * Similar to the WorkerPool class except it creates and destroys workers automatically with a maximum of `maxWorkers` workers.\n * Workers are terminated when it is idle for at least `idleTimeElapsedBeforeRelease` milliseconds.\n */\nexport class AutoReleaseWorkerPool extends WorkerPool {\n constructor(maxWorkers, createWorkerAsync, options = AutoReleaseWorkerPool.DefaultOptions) {\n super([]);\n this._maxWorkers = maxWorkers;\n this._createWorkerAsync = createWorkerAsync;\n this._options = options;\n }\n push(action) {\n if (!this._executeOnIdleWorker(action)) {\n if (this._workerInfos.length < this._maxWorkers) {\n const workerInfo = {\n workerPromise: this._createWorkerAsync(),\n idle: false,\n };\n this._workerInfos.push(workerInfo);\n this._execute(workerInfo, action);\n }\n else {\n this._pendingActions.push(action);\n }\n }\n }\n _execute(workerInfo, action) {\n // Reset the idle timeout.\n if (workerInfo.timeoutId) {\n clearTimeout(workerInfo.timeoutId);\n delete workerInfo.timeoutId;\n }\n super._execute(workerInfo, (worker, onComplete) => {\n action(worker, () => {\n onComplete();\n if (workerInfo.idle) {\n // Schedule the worker to be terminated after the elapsed time.\n workerInfo.timeoutId = setTimeout(() => {\n workerInfo.workerPromise.then((worker) => {\n worker.terminate();\n });\n const indexOf = this._workerInfos.indexOf(workerInfo);\n if (indexOf !== -1) {\n this._workerInfos.splice(indexOf, 1);\n }\n }, this._options.idleTimeElapsedBeforeRelease);\n }\n });\n });\n }\n}\n/**\n * Default options for the constructor.\n * Override to change the defaults.\n */\nAutoReleaseWorkerPool.DefaultOptions = {\n idleTimeElapsedBeforeRelease: 1000,\n};\n//# sourceMappingURL=workerPool.js.map"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
class e{constructor(e){this._pendingActions=new Array,this._workerInfos=e.map((e=>({workerPromise:Promise.resolve(e),idle:!0})))}dispose(){for(const e of this._workerInfos)e.workerPromise.then((e=>{e.terminate()}));this._workerInfos.length=0,this._pendingActions.length=0}push(e){this._executeOnIdleWorker(e)||this._pendingActions.push(e)}_executeOnIdleWorker(e){for(const s of this._workerInfos)if(s.idle)return this._execute(s,e),!0;return!1}_execute(e,s){e.idle=!1,e.workerPromise.then((t=>{s(t,(()=>{const s=this._pendingActions.shift();s?this._execute(e,s):e.idle=!0}))}))}}class s extends e{constructor(e,t,i=s.DefaultOptions){super([]),this._maxWorkers=e,this._createWorkerAsync=t,this._options=i}push(e){if(!this._executeOnIdleWorker(e))if(this._workerInfos.length<this._maxWorkers){const s={workerPromise:this._createWorkerAsync(),idle:!1};this._workerInfos.push(s),this._execute(s,e)}else this._pendingActions.push(e)}_execute(e,s){e.timeoutId&&(clearTimeout(e.timeoutId),delete e.timeoutId),super._execute(e,((t,i)=>{s(t,(()=>{i(),e.idle&&(e.timeoutId=setTimeout((()=>{e.workerPromise.then((e=>{e.terminate()}));const s=this._workerInfos.indexOf(e);-1!==s&&this._workerInfos.splice(s,1)}),this._options.idleTimeElapsedBeforeRelease))}))}))}}s.DefaultOptions={idleTimeElapsedBeforeRelease:1e3};export{s as A};
|
|
2
|
-
//# sourceMappingURL=workerPool-BWHiDmEZ.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workerPool-BWHiDmEZ.esm.min.js","sources":["../../../../../dev/core/dist/Misc/workerPool.js"],"sourcesContent":["/**\n * Helper class to push actions to a pool of workers.\n */\nexport class WorkerPool {\n /**\n * Constructor\n * @param workers Array of workers to use for actions\n */\n constructor(workers) {\n this._pendingActions = new Array();\n this._workerInfos = workers.map((worker) => ({\n workerPromise: Promise.resolve(worker),\n idle: true,\n }));\n }\n /**\n * Terminates all workers and clears any pending actions.\n */\n dispose() {\n for (const workerInfo of this._workerInfos) {\n workerInfo.workerPromise.then((worker) => {\n worker.terminate();\n });\n }\n this._workerInfos.length = 0;\n this._pendingActions.length = 0;\n }\n /**\n * Pushes an action to the worker pool. If all the workers are active, the action will be\n * pended until a worker has completed its action.\n * @param action The action to perform. Call onComplete when the action is complete.\n */\n push(action) {\n if (!this._executeOnIdleWorker(action)) {\n this._pendingActions.push(action);\n }\n }\n _executeOnIdleWorker(action) {\n for (const workerInfo of this._workerInfos) {\n if (workerInfo.idle) {\n this._execute(workerInfo, action);\n return true;\n }\n }\n return false;\n }\n _execute(workerInfo, action) {\n workerInfo.idle = false;\n workerInfo.workerPromise.then((worker) => {\n action(worker, () => {\n const nextAction = this._pendingActions.shift();\n if (nextAction) {\n this._execute(workerInfo, nextAction);\n }\n else {\n workerInfo.idle = true;\n }\n });\n });\n }\n}\n/**\n * Similar to the WorkerPool class except it creates and destroys workers automatically with a maximum of `maxWorkers` workers.\n * Workers are terminated when it is idle for at least `idleTimeElapsedBeforeRelease` milliseconds.\n */\nexport class AutoReleaseWorkerPool extends WorkerPool {\n constructor(maxWorkers, createWorkerAsync, options = AutoReleaseWorkerPool.DefaultOptions) {\n super([]);\n this._maxWorkers = maxWorkers;\n this._createWorkerAsync = createWorkerAsync;\n this._options = options;\n }\n push(action) {\n if (!this._executeOnIdleWorker(action)) {\n if (this._workerInfos.length < this._maxWorkers) {\n const workerInfo = {\n workerPromise: this._createWorkerAsync(),\n idle: false,\n };\n this._workerInfos.push(workerInfo);\n this._execute(workerInfo, action);\n }\n else {\n this._pendingActions.push(action);\n }\n }\n }\n _execute(workerInfo, action) {\n // Reset the idle timeout.\n if (workerInfo.timeoutId) {\n clearTimeout(workerInfo.timeoutId);\n delete workerInfo.timeoutId;\n }\n super._execute(workerInfo, (worker, onComplete) => {\n action(worker, () => {\n onComplete();\n if (workerInfo.idle) {\n // Schedule the worker to be terminated after the elapsed time.\n workerInfo.timeoutId = setTimeout(() => {\n workerInfo.workerPromise.then((worker) => {\n worker.terminate();\n });\n const indexOf = this._workerInfos.indexOf(workerInfo);\n if (indexOf !== -1) {\n this._workerInfos.splice(indexOf, 1);\n }\n }, this._options.idleTimeElapsedBeforeRelease);\n }\n });\n });\n }\n}\n/**\n * Default options for the constructor.\n * Override to change the defaults.\n */\nAutoReleaseWorkerPool.DefaultOptions = {\n idleTimeElapsedBeforeRelease: 1000,\n};\n//# sourceMappingURL=workerPool.js.map"],"names":["WorkerPool","constructor","workers","this","_pendingActions","Array","_workerInfos","map","worker","workerPromise","Promise","resolve","idle","dispose","workerInfo","then","terminate","length","push","action","_executeOnIdleWorker","_execute","nextAction","shift","AutoReleaseWorkerPool","maxWorkers","createWorkerAsync","options","DefaultOptions","super","_maxWorkers","_createWorkerAsync","_options","timeoutId","clearTimeout","onComplete","setTimeout","indexOf","splice","idleTimeElapsedBeforeRelease"],"mappings":"AAGO,MAAMA,EAKT,WAAAC,CAAYC,GACRC,KAAKC,gBAAkB,IAAIC,MAC3BF,KAAKG,aAAeJ,EAAQK,KAAKC,IAAY,CACzCC,cAAeC,QAAQC,QAAQH,GAC/BI,MAAM,KAEb,CAID,OAAAC,GACI,IAAK,MAAMC,KAAcX,KAAKG,aAC1BQ,EAAWL,cAAcM,MAAMP,IAC3BA,EAAOQ,WAAW,IAG1Bb,KAAKG,aAAaW,OAAS,EAC3Bd,KAAKC,gBAAgBa,OAAS,CACjC,CAMD,IAAAC,CAAKC,GACIhB,KAAKiB,qBAAqBD,IAC3BhB,KAAKC,gBAAgBc,KAAKC,EAEjC,CACD,oBAAAC,CAAqBD,GACjB,IAAK,MAAML,KAAcX,KAAKG,aAC1B,GAAIQ,EAAWF,KAEX,OADAT,KAAKkB,SAASP,EAAYK,IACnB,EAGf,OAAO,CACV,CACD,QAAAE,CAASP,EAAYK,GACjBL,EAAWF,MAAO,EAClBE,EAAWL,cAAcM,MAAMP,IAC3BW,EAAOX,GAAQ,KACX,MAAMc,EAAanB,KAAKC,gBAAgBmB,QACpCD,EACAnB,KAAKkB,SAASP,EAAYQ,GAG1BR,EAAWF,MAAO,CACrB,GACH,GAET,EAME,MAAMY,UAA8BxB,EACvC,WAAAC,CAAYwB,EAAYC,EAAmBC,EAAUH,EAAsBI,gBACvEC,MAAM,IACN1B,KAAK2B,YAAcL,EACnBtB,KAAK4B,mBAAqBL,EAC1BvB,KAAK6B,SAAWL,CACnB,CACD,IAAAT,CAAKC,GACD,IAAKhB,KAAKiB,qBAAqBD,GAC3B,GAAIhB,KAAKG,aAAaW,OAASd,KAAK2B,YAAa,CAC7C,MAAMhB,EAAa,CACfL,cAAeN,KAAK4B,qBACpBnB,MAAM,GAEVT,KAAKG,aAAaY,KAAKJ,GACvBX,KAAKkB,SAASP,EAAYK,EAC7B,MAEGhB,KAAKC,gBAAgBc,KAAKC,EAGrC,CACD,QAAAE,CAASP,EAAYK,GAEbL,EAAWmB,YACXC,aAAapB,EAAWmB,kBACjBnB,EAAWmB,WAEtBJ,MAAMR,SAASP,GAAY,CAACN,EAAQ2B,KAChChB,EAAOX,GAAQ,KACX2B,IACIrB,EAAWF,OAEXE,EAAWmB,UAAYG,YAAW,KAC9BtB,EAAWL,cAAcM,MAAMP,IAC3BA,EAAOQ,WAAW,IAEtB,MAAMqB,EAAUlC,KAAKG,aAAa+B,QAAQvB,IACzB,IAAbuB,GACAlC,KAAKG,aAAagC,OAAOD,EAAS,EACrC,GACFlC,KAAK6B,SAASO,8BACpB,GACH,GAET,EAMLf,EAAsBI,eAAiB,CACnCW,6BAA8B"}
|
package/docs/ViewerDefault.jpg
DELETED
|
Binary file
|
package/docs/ViewerParts.jpg
DELETED
|
Binary file
|
package/docs/ViewerSlots.jpg
DELETED
|
Binary file
|
package/docs/ViewerStyled.jpg
DELETED
|
Binary file
|
package/lib/index.d.ts
DELETED
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { Nullable, AssetContainer, HotSpotQuery, IDisposable, AbstractEngine, LoadAssetContainerOptions, AbstractEngineOptions, EngineOptions, WebGPUEngineOptions } from '@babylonjs/core/index.js';
|
|
2
|
-
import { Color4 } from '@babylonjs/core/Maths/math.color.js';
|
|
3
|
-
import { Observable } from '@babylonjs/core/Misc/observable.js';
|
|
4
|
-
import { Scene } from '@babylonjs/core/scene.js';
|
|
5
|
-
import * as lit_html from 'lit-html';
|
|
6
|
-
import * as lit from 'lit';
|
|
7
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
8
|
-
|
|
9
|
-
declare const defaultViewerOptions: {
|
|
10
|
-
readonly backgroundColor: Color4;
|
|
11
|
-
};
|
|
12
|
-
type ViewerDetails = {
|
|
13
|
-
/**
|
|
14
|
-
* Gets the Viewer instance.
|
|
15
|
-
*/
|
|
16
|
-
viewer: Viewer;
|
|
17
|
-
/**
|
|
18
|
-
* Provides access to the Scene managed by the Viewer.
|
|
19
|
-
*/
|
|
20
|
-
scene: Scene;
|
|
21
|
-
/**
|
|
22
|
-
* Provides access to the currently loaded model.
|
|
23
|
-
*/
|
|
24
|
-
model: Nullable<AssetContainer>;
|
|
25
|
-
};
|
|
26
|
-
type ViewerOptions = Partial<typeof defaultViewerOptions & Readonly<{
|
|
27
|
-
/**
|
|
28
|
-
* Called once when the viewer is initialized and provides viewer details that can be used for advanced customization.
|
|
29
|
-
*/
|
|
30
|
-
onInitialized: (details: Readonly<ViewerDetails>) => void;
|
|
31
|
-
}>>;
|
|
32
|
-
type ViewerHotSpotQuery = {
|
|
33
|
-
/**
|
|
34
|
-
* The index of the mesh within the loaded model.
|
|
35
|
-
*/
|
|
36
|
-
meshIndex: number;
|
|
37
|
-
} & HotSpotQuery;
|
|
38
|
-
/**
|
|
39
|
-
* Information computed from the hot spot surface data, canvas and mesh datas
|
|
40
|
-
*/
|
|
41
|
-
type ViewerHotSpot = {
|
|
42
|
-
/**
|
|
43
|
-
* 2D canvas position in pixels
|
|
44
|
-
*/
|
|
45
|
-
screenPosition: [number, number];
|
|
46
|
-
/**
|
|
47
|
-
* 3D world coordinates
|
|
48
|
-
*/
|
|
49
|
-
worldPosition: [number, number, number];
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Provides an experience for viewing a single 3D model.
|
|
53
|
-
* @remarks
|
|
54
|
-
* The Viewer is not tied to a specific UI framework and can be used with Babylon.js in a browser or with Babylon Native.
|
|
55
|
-
* Includes (or will include) support for common model viewing requirements such as:
|
|
56
|
-
* - Loading different model formats.
|
|
57
|
-
* - Setting up a camera and providing default behaviors like auto orbit and pose interpolation.
|
|
58
|
-
* - Framing the loaded model in the camera's view.
|
|
59
|
-
* - Setting up the environment, lighting, and tone mapping.
|
|
60
|
-
* - Enumerating and playing (or auto playing) animations.
|
|
61
|
-
* - Enumerating and switching between material variants.
|
|
62
|
-
* - Full screen and XR modes.
|
|
63
|
-
*/
|
|
64
|
-
declare class Viewer implements IDisposable {
|
|
65
|
-
private readonly _engine;
|
|
66
|
-
/**
|
|
67
|
-
* Fired when the environment has changed.
|
|
68
|
-
*/
|
|
69
|
-
readonly onEnvironmentChanged: Observable<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Fired when an error occurs while loading the environment.
|
|
72
|
-
*/
|
|
73
|
-
readonly onEnvironmentError: Observable<unknown>;
|
|
74
|
-
/**
|
|
75
|
-
* Fired when a model is loaded into the viewer (or unloaded from the viewer).
|
|
76
|
-
*/
|
|
77
|
-
readonly onModelChanged: Observable<void>;
|
|
78
|
-
/**
|
|
79
|
-
* Fired when an error occurs while loading a model.
|
|
80
|
-
*/
|
|
81
|
-
readonly onModelError: Observable<unknown>;
|
|
82
|
-
/**
|
|
83
|
-
* Fired when the selected animation changes.
|
|
84
|
-
*/
|
|
85
|
-
readonly onSelectedAnimationChanged: Observable<void>;
|
|
86
|
-
/**
|
|
87
|
-
* Fired when the animation speed changes.
|
|
88
|
-
*/
|
|
89
|
-
readonly onAnimationSpeedChanged: Observable<void>;
|
|
90
|
-
/**
|
|
91
|
-
* Fired when the selected animation is playing or paused.
|
|
92
|
-
*/
|
|
93
|
-
readonly onIsAnimationPlayingChanged: Observable<void>;
|
|
94
|
-
/**
|
|
95
|
-
* Fired when the current point on the selected animation timeline changes.
|
|
96
|
-
*/
|
|
97
|
-
readonly onAnimationProgressChanged: Observable<void>;
|
|
98
|
-
private readonly _details;
|
|
99
|
-
private readonly _snapshotHelper;
|
|
100
|
-
private readonly _camera;
|
|
101
|
-
private readonly _autoRotationBehavior;
|
|
102
|
-
private readonly _renderLoopController;
|
|
103
|
-
private _skybox;
|
|
104
|
-
private _light;
|
|
105
|
-
private _isDisposed;
|
|
106
|
-
private readonly _loadModelLock;
|
|
107
|
-
private _loadModelAbortController;
|
|
108
|
-
private readonly _loadEnvironmentLock;
|
|
109
|
-
private _environment;
|
|
110
|
-
private _loadEnvironmentAbortController;
|
|
111
|
-
private _selectedAnimation;
|
|
112
|
-
private _activeAnimationObservers;
|
|
113
|
-
private _animationSpeed;
|
|
114
|
-
constructor(_engine: AbstractEngine, options?: ViewerOptions);
|
|
115
|
-
/**
|
|
116
|
-
* The list of animation names for the currently loaded model.
|
|
117
|
-
*/
|
|
118
|
-
get animations(): readonly string[];
|
|
119
|
-
/**
|
|
120
|
-
* The currently selected animation index.
|
|
121
|
-
*/
|
|
122
|
-
get selectedAnimation(): number;
|
|
123
|
-
set selectedAnimation(value: number);
|
|
124
|
-
/**
|
|
125
|
-
* True if an animation is currently playing.
|
|
126
|
-
*/
|
|
127
|
-
get isAnimationPlaying(): boolean;
|
|
128
|
-
/**
|
|
129
|
-
* The speed scale at which animations are played.
|
|
130
|
-
*/
|
|
131
|
-
get animationSpeed(): number;
|
|
132
|
-
set animationSpeed(value: number);
|
|
133
|
-
/**
|
|
134
|
-
* The current point on the selected animation timeline, normalized between 0 and 1.
|
|
135
|
-
*/
|
|
136
|
-
get animationProgress(): number;
|
|
137
|
-
set animationProgress(value: number);
|
|
138
|
-
private get _activeAnimation();
|
|
139
|
-
/**
|
|
140
|
-
* Loads a 3D model from the specified URL.
|
|
141
|
-
* @remarks
|
|
142
|
-
* If a model is already loaded, it will be unloaded before loading the new model.
|
|
143
|
-
* @param source A url or File or ArrayBufferView that points to the model to load.
|
|
144
|
-
* @param options The options to use when loading the model.
|
|
145
|
-
* @param abortSignal An optional signal that can be used to abort the loading process.
|
|
146
|
-
*/
|
|
147
|
-
loadModel(source: string | File | ArrayBufferView, options?: LoadAssetContainerOptions, abortSignal?: AbortSignal): Promise<void>;
|
|
148
|
-
/**
|
|
149
|
-
* Unloads the current 3D model if one is loaded.
|
|
150
|
-
* @param abortSignal An optional signal that can be used to abort the reset.
|
|
151
|
-
*/
|
|
152
|
-
resetModel(abortSignal?: AbortSignal): Promise<void>;
|
|
153
|
-
private _updateModel;
|
|
154
|
-
/**
|
|
155
|
-
* Loads an environment texture from the specified url and sets up a corresponding skybox.
|
|
156
|
-
* @remarks
|
|
157
|
-
* If an environment is already loaded, it will be unloaded before loading the new environment.
|
|
158
|
-
* @param url The url of the environment texture to load.
|
|
159
|
-
* @param options The options to use when loading the environment.
|
|
160
|
-
* @param abortSignal An optional signal that can be used to abort the loading process.
|
|
161
|
-
*/
|
|
162
|
-
loadEnvironment(url: string, options?: {}, abortSignal?: AbortSignal): Promise<void>;
|
|
163
|
-
/**
|
|
164
|
-
* Unloads the current environment if one is loaded.
|
|
165
|
-
* @param abortSignal An optional signal that can be used to abort the reset.
|
|
166
|
-
*/
|
|
167
|
-
resetEnvironment(abortSignal?: AbortSignal): Promise<void>;
|
|
168
|
-
private _updateEnvironment;
|
|
169
|
-
/**
|
|
170
|
-
* Toggles the play/pause animation state if there is a selected animation.
|
|
171
|
-
*/
|
|
172
|
-
toggleAnimation(): void;
|
|
173
|
-
/**
|
|
174
|
-
* Plays the selected animation if there is one.
|
|
175
|
-
*/
|
|
176
|
-
playAnimation(): void;
|
|
177
|
-
/**
|
|
178
|
-
* Pauses the selected animation if there is one.
|
|
179
|
-
*/
|
|
180
|
-
pauseAnimation(): Promise<void>;
|
|
181
|
-
/**
|
|
182
|
-
* Disposes of the resources held by the Viewer.
|
|
183
|
-
*/
|
|
184
|
-
dispose(): void;
|
|
185
|
-
/**
|
|
186
|
-
* retrun world and canvas coordinates of an hot spot
|
|
187
|
-
* @param hotSpotQuery mesh index and surface information to query the hot spot positions
|
|
188
|
-
* @param res Query a Hot Spot and does the conversion for Babylon Hot spot to a more generic HotSpotPositions, without Vector types
|
|
189
|
-
* @returns true if hotspot found
|
|
190
|
-
*/
|
|
191
|
-
getHotSpotToRef(hotSpotQuery: Readonly<ViewerHotSpotQuery>, res: ViewerHotSpot): boolean;
|
|
192
|
-
private _updateCamera;
|
|
193
|
-
private _updateLight;
|
|
194
|
-
private _applyAnimationSpeed;
|
|
195
|
-
/**
|
|
196
|
-
* Check for disposed or aborted state (basically everything that can interrupt an async operation).
|
|
197
|
-
* @param abortSignals A set of optional AbortSignals to also check.
|
|
198
|
-
*/
|
|
199
|
-
private _throwIfDisposedOrAborted;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Options for creating a Viewer instance that is bound to an HTML canvas.
|
|
204
|
-
*/
|
|
205
|
-
type CanvasViewerOptions = ViewerOptions & (({
|
|
206
|
-
engine?: undefined;
|
|
207
|
-
} & AbstractEngineOptions) | ({
|
|
208
|
-
engine: "WebGL";
|
|
209
|
-
} & EngineOptions) | ({
|
|
210
|
-
engine: "WebGPU";
|
|
211
|
-
} & WebGPUEngineOptions));
|
|
212
|
-
/**
|
|
213
|
-
* Chooses a default engine for the current browser environment.
|
|
214
|
-
* @returns The default engine to use.
|
|
215
|
-
*/
|
|
216
|
-
declare function getDefaultEngine(): NonNullable<CanvasViewerOptions["engine"]>;
|
|
217
|
-
/**
|
|
218
|
-
* Creates a Viewer instance that is bound to an HTML canvas.
|
|
219
|
-
* @remarks
|
|
220
|
-
* This function can be shared across multiple UI integrations (e.g. Web Components, React, etc.).
|
|
221
|
-
* @param canvas The canvas element to bind the Viewer to.
|
|
222
|
-
* @param options The options to use when creating the Viewer and binding it to the specified canvas.
|
|
223
|
-
* @returns A Viewer instance that is bound to the specified canvas.
|
|
224
|
-
*/
|
|
225
|
-
declare function createViewerForCanvas(canvas: HTMLCanvasElement, options?: CanvasViewerOptions): Promise<Viewer>;
|
|
226
|
-
|
|
227
|
-
interface HTML3DElementEventMap extends HTMLElementEventMap {
|
|
228
|
-
viewerready: Event;
|
|
229
|
-
environmentchange: Event;
|
|
230
|
-
environmenterror: ErrorEvent;
|
|
231
|
-
modelchange: Event;
|
|
232
|
-
modelerror: ErrorEvent;
|
|
233
|
-
selectedanimationchange: Event;
|
|
234
|
-
animationspeedchange: Event;
|
|
235
|
-
animationplayingchange: Event;
|
|
236
|
-
animationprogresschange: Event;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Represents a custom element that displays a 3D model using the Babylon.js Viewer.
|
|
240
|
-
*/
|
|
241
|
-
declare class HTML3DElement extends LitElement {
|
|
242
|
-
private readonly _viewerLock;
|
|
243
|
-
private _viewerDetails?;
|
|
244
|
-
static styles: lit.CSSResult;
|
|
245
|
-
/**
|
|
246
|
-
* Gets the underlying viewer details (when the underlying viewer is in a loaded state).
|
|
247
|
-
* This is useful for advanced scenarios where direct access to the viewer or Babylon scene is needed.
|
|
248
|
-
*/
|
|
249
|
-
get viewerDetails(): Readonly<ViewerDetails> | undefined;
|
|
250
|
-
/**
|
|
251
|
-
* Get hotspot world and screen values from a named hotspot
|
|
252
|
-
* @param name slot of the hot spot
|
|
253
|
-
* @param result resulting world and screen positions
|
|
254
|
-
* @returns world and screen space coordinates
|
|
255
|
-
*/
|
|
256
|
-
queryHotSpot(name: string, result: ViewerHotSpot): boolean;
|
|
257
|
-
/**
|
|
258
|
-
* The engine to use for rendering.
|
|
259
|
-
*/
|
|
260
|
-
engine: NonNullable<CanvasViewerOptions["engine"]>;
|
|
261
|
-
/**
|
|
262
|
-
* The model URL.
|
|
263
|
-
*/
|
|
264
|
-
source: Nullable<string>;
|
|
265
|
-
/**
|
|
266
|
-
* Forces the model to be loaded with the specified extension.
|
|
267
|
-
* @remarks
|
|
268
|
-
* If this property is not set, the extension will be inferred from the model URL when possible.
|
|
269
|
-
*/
|
|
270
|
-
extension: Nullable<string>;
|
|
271
|
-
/**
|
|
272
|
-
* The environment URL.
|
|
273
|
-
*/
|
|
274
|
-
environment: Nullable<string>;
|
|
275
|
-
/**
|
|
276
|
-
* A string value that encodes one or more hotspots.
|
|
277
|
-
*/
|
|
278
|
-
hotspots: Nullable<Record<string, ViewerHotSpotQuery>>;
|
|
279
|
-
/**
|
|
280
|
-
* The list of animation names for the currently loaded model.
|
|
281
|
-
*/
|
|
282
|
-
get animations(): readonly string[];
|
|
283
|
-
/**
|
|
284
|
-
* The currently selected animation index.
|
|
285
|
-
*/
|
|
286
|
-
get selectedAnimation(): number;
|
|
287
|
-
/**
|
|
288
|
-
* True if an animation is currently playing.
|
|
289
|
-
*/
|
|
290
|
-
get isAnimationPlaying(): boolean;
|
|
291
|
-
/**
|
|
292
|
-
* The speed scale at which animations are played.
|
|
293
|
-
*/
|
|
294
|
-
animationSpeed: number;
|
|
295
|
-
/**
|
|
296
|
-
* The current point on the selected animation timeline, normalized between 0 and 1.
|
|
297
|
-
*/
|
|
298
|
-
animationProgress: number;
|
|
299
|
-
private _animations;
|
|
300
|
-
private _selectedAnimation;
|
|
301
|
-
private _isAnimationPlaying;
|
|
302
|
-
private _canvasContainer;
|
|
303
|
-
/**
|
|
304
|
-
* Toggles the play/pause animation state if there is a selected animation.
|
|
305
|
-
*/
|
|
306
|
-
toggleAnimation(): void;
|
|
307
|
-
connectedCallback(): void;
|
|
308
|
-
disconnectedCallback(): void;
|
|
309
|
-
update(changedProperties: PropertyValues): void;
|
|
310
|
-
render(): lit_html.TemplateResult<1>;
|
|
311
|
-
addEventListener<K extends keyof HTML3DElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTML3DElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
312
|
-
private _dispatchCustomEvent;
|
|
313
|
-
private _onSelectedAnimationChanged;
|
|
314
|
-
private _onAnimationSpeedChanged;
|
|
315
|
-
private _onProgressChanged;
|
|
316
|
-
private _onProgressPointerDown;
|
|
317
|
-
private _setupViewer;
|
|
318
|
-
private _tearDownViewer;
|
|
319
|
-
private _updateAnimationSpeed;
|
|
320
|
-
private _updateSelectedAnimation;
|
|
321
|
-
private _updateModel;
|
|
322
|
-
private _updateEnv;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
export { type CanvasViewerOptions, HTML3DElement, Viewer, type ViewerDetails, type ViewerHotSpot, type ViewerHotSpotQuery, type ViewerOptions, createViewerForCanvas, getDefaultEngine };
|