@babylonjs/viewer 7.41.0-alpha → 7.41.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 +193 -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 +351 -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 +202 -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 +28 -19
- package/readme.md +28 -28
- 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 +22 -0
- package/templating/plugins/hdButtonPlugin.js.map +1 -0
- package/templating/plugins/printButton.d.ts +9 -0
- package/templating/plugins/printButton.js +41 -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_ies-CFzvmxxg.esm.min.js +0 -2
- package/dist/chunks/EXT_lights_ies-CFzvmxxg.esm.min.js.map +0 -1
- package/dist/chunks/EXT_lights_ies-cyFdY7yl.esm.js +0 -84
- package/dist/chunks/EXT_lights_ies-cyFdY7yl.esm.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-BNmSqx40.esm.min.js +0 -2
- package/dist/chunks/EXT_lights_image_based-BNmSqx40.esm.min.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-CC48JVU0.esm.js +0 -171
- package/dist/chunks/EXT_lights_image_based-CC48JVU0.esm.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-B2qj3kQu.esm.js +0 -86
- package/dist/chunks/EXT_mesh_gpu_instancing-B2qj3kQu.esm.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-lanrAAoi.esm.min.js +0 -2
- package/dist/chunks/EXT_mesh_gpu_instancing-lanrAAoi.esm.min.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-DjvHx7gJ.esm.js +0 -134
- package/dist/chunks/EXT_meshopt_compression-DjvHx7gJ.esm.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-oH6HzGir.esm.min.js +0 -2
- package/dist/chunks/EXT_meshopt_compression-oH6HzGir.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-BYWETW7-.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_avif-BYWETW7-.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-CKXEq29h.esm.js +0 -44
- package/dist/chunks/EXT_texture_avif-CKXEq29h.esm.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-Dl4GPoEU.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_webp-Dl4GPoEU.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-fAiSgaNl.esm.js +0 -43
- package/dist/chunks/EXT_texture_webp-fAiSgaNl.esm.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-BUQ3X3M6.esm.js +0 -64
- package/dist/chunks/ExtrasAsMetadata-BUQ3X3M6.esm.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-C_M9nxb4.esm.min.js +0 -2
- package/dist/chunks/ExtrasAsMetadata-C_M9nxb4.esm.min.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-BdFZyLUq.esm.js +0 -352
- package/dist/chunks/KHR_animation_pointer-BdFZyLUq.esm.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-CBqZcURZ.esm.min.js +0 -2
- package/dist/chunks/KHR_animation_pointer-CBqZcURZ.esm.min.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-DU2Rk2nj.esm.min.js +0 -2
- package/dist/chunks/KHR_draco_mesh_compression-DU2Rk2nj.esm.min.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-hVF9XuFz.esm.js +0 -610
- package/dist/chunks/KHR_draco_mesh_compression-hVF9XuFz.esm.js.map +0 -1
- package/dist/chunks/KHR_interactivity-COE1p684.esm.min.js +0 -2
- package/dist/chunks/KHR_interactivity-COE1p684.esm.min.js.map +0 -1
- package/dist/chunks/KHR_interactivity-Cv1s_pea.esm.js +0 -4033
- package/dist/chunks/KHR_interactivity-Cv1s_pea.esm.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-CHf5kbKi.esm.js +0 -581
- package/dist/chunks/KHR_lights_punctual-CHf5kbKi.esm.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-DIEAP5SG.esm.min.js +0 -2
- package/dist/chunks/KHR_lights_punctual-DIEAP5SG.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-CU-xxV6y.esm.js +0 -65
- package/dist/chunks/KHR_materials_anisotropy-CU-xxV6y.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-Cq6CU4qW.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_anisotropy-Cq6CU4qW.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-BSjcmIju.esm.js +0 -96
- package/dist/chunks/KHR_materials_clearcoat-BSjcmIju.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-CVNNhJRE.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_clearcoat-CVNNhJRE.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-BDuGIkOh.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_diffuse_transmission-BDuGIkOh.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-BZ-9rJUf.esm.js +0 -97
- package/dist/chunks/KHR_materials_diffuse_transmission-BZ-9rJUf.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-BxiGElVU.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_dispersion-BxiGElVU.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-UI4zH1V_.esm.js +0 -62
- package/dist/chunks/KHR_materials_dispersion-UI4zH1V_.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-BT-Nu60T.esm.js +0 -55
- package/dist/chunks/KHR_materials_emissive_strength-BT-Nu60T.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-CwkVNmN7.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_emissive_strength-CwkVNmN7.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-BGUUe5AW.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_ior-BGUUe5AW.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-BbBQF-yw.esm.js +0 -64
- package/dist/chunks/KHR_materials_ior-BbBQF-yw.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-IFN2ewvr.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_iridescence-IFN2ewvr.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-nLZDN7sc.esm.js +0 -72
- package/dist/chunks/KHR_materials_iridescence-nLZDN7sc.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CyNVQC-W.esm.js +0 -81
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CyNVQC-W.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-zxcydJdp.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-zxcydJdp.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-BWL9yo8Z.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_sheen-BWL9yo8Z.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-DSThWwq2.esm.js +0 -85
- package/dist/chunks/KHR_materials_sheen-DSThWwq2.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-B96NRFEV.esm.js +0 -75
- package/dist/chunks/KHR_materials_specular-B96NRFEV.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-D2JwOdxw.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_specular-D2JwOdxw.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-BvqtJXfD.esm.js +0 -307
- package/dist/chunks/KHR_materials_transmission-BvqtJXfD.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-ljXN4y_0.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_transmission-ljXN4y_0.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-CjGTXU3z.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_unlit-CjGTXU3z.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-ww00IloC.esm.js +0 -74
- package/dist/chunks/KHR_materials_unlit-ww00IloC.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-D0pVU1lm.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_variants-D0pVU1lm.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-D3IDOJfB.esm.js +0 -262
- package/dist/chunks/KHR_materials_variants-D3IDOJfB.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-BfZR8rbr.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_volume-BfZR8rbr.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-CLkC_Bvi.esm.js +0 -87
- package/dist/chunks/KHR_materials_volume-CLkC_Bvi.esm.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-BJv1P2Wt.esm.js +0 -26
- package/dist/chunks/KHR_mesh_quantization-BJv1P2Wt.esm.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-D69X_5bR.esm.min.js +0 -2
- package/dist/chunks/KHR_mesh_quantization-D69X_5bR.esm.min.js.map +0 -1
- package/dist/chunks/KHR_node_hoverability-CG6s7hhs.esm.min.js +0 -2
- package/dist/chunks/KHR_node_hoverability-CG6s7hhs.esm.min.js.map +0 -1
- package/dist/chunks/KHR_node_hoverability-xgvyZ_r-.esm.js +0 -39
- package/dist/chunks/KHR_node_hoverability-xgvyZ_r-.esm.js.map +0 -1
- package/dist/chunks/KHR_node_visibility-DUozjXRR.esm.min.js +0 -2
- package/dist/chunks/KHR_node_visibility-DUozjXRR.esm.min.js.map +0 -1
- package/dist/chunks/KHR_node_visibility-aAs5Kkey.esm.js +0 -46
- package/dist/chunks/KHR_node_visibility-aAs5Kkey.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-Bjw0jG1d.esm.js +0 -43
- package/dist/chunks/KHR_texture_basisu-Bjw0jG1d.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-FWm46QOj.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_basisu-FWm46QOj.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-BZYr2brj.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_transform-BZYr2brj.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-DdsN6SA_.esm.js +0 -63
- package/dist/chunks/KHR_texture_transform-DdsN6SA_.esm.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-DhFD64vh.esm.min.js +0 -2
- package/dist/chunks/KHR_xmp_json_ld-DhFD64vh.esm.min.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-sTn6N13E.esm.js +0 -51
- package/dist/chunks/KHR_xmp_json_ld-sTn6N13E.esm.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-5lrNj8-c.esm.min.js +0 -2
- package/dist/chunks/MSFT_audio_emitter-5lrNj8-c.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-B7RJSCaF.esm.js +0 -2201
- package/dist/chunks/MSFT_audio_emitter-B7RJSCaF.esm.js.map +0 -1
- package/dist/chunks/MSFT_lod-BJBjM7Gp.esm.js +0 -337
- package/dist/chunks/MSFT_lod-BJBjM7Gp.esm.js.map +0 -1
- package/dist/chunks/MSFT_lod-DpEZMnoU.esm.min.js +0 -2
- package/dist/chunks/MSFT_lod-DpEZMnoU.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-CXHPdyar.esm.min.js +0 -2
- package/dist/chunks/MSFT_minecraftMesh-CXHPdyar.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-DRC2tMvY.esm.js +0 -46
- package/dist/chunks/MSFT_minecraftMesh-DRC2tMvY.esm.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-Db1asZRk.esm.js +0 -47
- package/dist/chunks/MSFT_sRGBFactors-Db1asZRk.esm.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-RhAtY3q7.esm.min.js +0 -2
- package/dist/chunks/MSFT_sRGBFactors-RhAtY3q7.esm.min.js.map +0 -1
- package/dist/chunks/animationGroup-CjaFhT87.esm.min.js +0 -2
- package/dist/chunks/animationGroup-CjaFhT87.esm.min.js.map +0 -1
- package/dist/chunks/animationGroup-Ctc6BUYh.esm.js +0 -2482
- package/dist/chunks/animationGroup-Ctc6BUYh.esm.js.map +0 -1
- package/dist/chunks/assetContainer-DDEska5G.esm.min.js +0 -2
- package/dist/chunks/assetContainer-DDEska5G.esm.min.js.map +0 -1
- package/dist/chunks/assetContainer-QD3gUzyx.esm.js +0 -1720
- package/dist/chunks/assetContainer-QD3gUzyx.esm.js.map +0 -1
- package/dist/chunks/audioEngine-C6R2Ow6e.esm.js +0 -305
- package/dist/chunks/audioEngine-C6R2Ow6e.esm.js.map +0 -1
- package/dist/chunks/audioEngine-FKYFzzDb.esm.min.js +0 -2
- package/dist/chunks/audioEngine-FKYFzzDb.esm.min.js.map +0 -1
- package/dist/chunks/bakedVertexAnimation-DKR6lpIg.esm.min.js +0 -2
- package/dist/chunks/bakedVertexAnimation-DKR6lpIg.esm.min.js.map +0 -1
- package/dist/chunks/bakedVertexAnimation-Hxn22qoJ.esm.js +0 -114
- package/dist/chunks/bakedVertexAnimation-Hxn22qoJ.esm.js.map +0 -1
- package/dist/chunks/basisTextureLoader-BcNAHqjw.esm.min.js +0 -2
- package/dist/chunks/basisTextureLoader-BcNAHqjw.esm.min.js.map +0 -1
- package/dist/chunks/basisTextureLoader-Dr2d0ez5.esm.js +0 -600
- package/dist/chunks/basisTextureLoader-Dr2d0ez5.esm.js.map +0 -1
- package/dist/chunks/dds-CFrq_XFM.esm.js +0 -540
- package/dist/chunks/dds-CFrq_XFM.esm.js.map +0 -1
- package/dist/chunks/dds-D1NTXLIL.esm.min.js +0 -2
- package/dist/chunks/dds-D1NTXLIL.esm.min.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-DbvffCUa.esm.min.js +0 -2
- package/dist/chunks/ddsTextureLoader-DbvffCUa.esm.min.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-wyjUdBoO.esm.js +0 -88
- package/dist/chunks/ddsTextureLoader-wyjUdBoO.esm.js.map +0 -1
- package/dist/chunks/decalFragment-CGto5zyq.esm.js +0 -18
- package/dist/chunks/decalFragment-CGto5zyq.esm.js.map +0 -1
- package/dist/chunks/decalFragment-CU64C8uG.esm.min.js +0 -2
- package/dist/chunks/decalFragment-CU64C8uG.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-B2bhCC4E.esm.js +0 -446
- package/dist/chunks/default.fragment-B2bhCC4E.esm.js.map +0 -1
- package/dist/chunks/default.fragment-Boq79lom.esm.min.js +0 -2
- package/dist/chunks/default.fragment-Boq79lom.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-CluFtXFp.esm.min.js +0 -2
- package/dist/chunks/default.fragment-CluFtXFp.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-Dshl5Uqc.esm.js +0 -515
- package/dist/chunks/default.fragment-Dshl5Uqc.esm.js.map +0 -1
- package/dist/chunks/default.vertex-BAAgCiYo.esm.min.js +0 -2
- package/dist/chunks/default.vertex-BAAgCiYo.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-BhOIicZW.esm.min.js +0 -2
- package/dist/chunks/default.vertex-BhOIicZW.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-DL7IogGB.esm.js +0 -211
- package/dist/chunks/default.vertex-DL7IogGB.esm.js.map +0 -1
- package/dist/chunks/default.vertex-DOXcZEQ0.esm.js +0 -190
- package/dist/chunks/default.vertex-DOXcZEQ0.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-1qBz6EuF.esm.js +0 -15
- package/dist/chunks/defaultUboDeclaration-1qBz6EuF.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-B9LzMzlw.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-B9LzMzlw.esm.min.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-CXdodf7i.esm.js +0 -13
- package/dist/chunks/defaultUboDeclaration-CXdodf7i.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-CZlCaxgu.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-CZlCaxgu.esm.min.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-C3vcqEdz.esm.js +0 -200
- package/dist/chunks/dumpTools-C3vcqEdz.esm.js.map +0 -1
- package/dist/chunks/dumpTools-C8ZzlWEh.esm.min.js +0 -2
- package/dist/chunks/dumpTools-C8ZzlWEh.esm.min.js.map +0 -1
- package/dist/chunks/engine-_wVL12I1.esm.js +0 -2213
- package/dist/chunks/engine-_wVL12I1.esm.js.map +0 -1
- package/dist/chunks/engine-nCWszV_w.esm.min.js +0 -2
- package/dist/chunks/engine-nCWszV_w.esm.min.js.map +0 -1
- package/dist/chunks/engine.common-BuPfo1Wj.esm.min.js +0 -2
- package/dist/chunks/engine.common-BuPfo1Wj.esm.min.js.map +0 -1
- package/dist/chunks/engine.common-CT5iq3ZT.esm.js +0 -1162
- package/dist/chunks/engine.common-CT5iq3ZT.esm.js.map +0 -1
- package/dist/chunks/envTextureLoader-D7L0fVXR.esm.min.js +0 -2
- package/dist/chunks/envTextureLoader-D7L0fVXR.esm.min.js.map +0 -1
- package/dist/chunks/envTextureLoader-PtuRNDrr.esm.js +0 -64
- package/dist/chunks/envTextureLoader-PtuRNDrr.esm.js.map +0 -1
- package/dist/chunks/environmentTextureTools-BjmCbfSf.esm.min.js +0 -2
- package/dist/chunks/environmentTextureTools-BjmCbfSf.esm.min.js.map +0 -1
- package/dist/chunks/environmentTextureTools-DYbFmR95.esm.js +0 -382
- package/dist/chunks/environmentTextureTools-DYbFmR95.esm.js.map +0 -1
- package/dist/chunks/exrTextureLoader-BIPK0bPG.esm.min.js +0 -2
- package/dist/chunks/exrTextureLoader-BIPK0bPG.esm.min.js.map +0 -1
- package/dist/chunks/exrTextureLoader-CEhv_7O9.esm.js +0 -1683
- package/dist/chunks/exrTextureLoader-CEhv_7O9.esm.js.map +0 -1
- package/dist/chunks/fogFragment-B7_evZbY.esm.js +0 -102
- package/dist/chunks/fogFragment-B7_evZbY.esm.js.map +0 -1
- package/dist/chunks/fogFragment-CoZPb7oI.esm.min.js +0 -2
- package/dist/chunks/fogFragment-CoZPb7oI.esm.min.js.map +0 -1
- package/dist/chunks/fogFragment-DSO97-dc.esm.min.js +0 -2
- package/dist/chunks/fogFragment-DSO97-dc.esm.min.js.map +0 -1
- package/dist/chunks/fogFragment-wY2jQ7fb.esm.js +0 -101
- package/dist/chunks/fogFragment-wY2jQ7fb.esm.js.map +0 -1
- package/dist/chunks/fresnelFunction-BSEp5SCT.esm.js +0 -12
- package/dist/chunks/fresnelFunction-BSEp5SCT.esm.js.map +0 -1
- package/dist/chunks/fresnelFunction-Cg-NNSrz.esm.min.js +0 -2
- package/dist/chunks/fresnelFunction-Cg-NNSrz.esm.min.js.map +0 -1
- package/dist/chunks/glTFLoader-3ZUBWawQ.esm.min.js +0 -2
- package/dist/chunks/glTFLoader-3ZUBWawQ.esm.min.js.map +0 -1
- package/dist/chunks/glTFLoader-DVoAJl_A.esm.js +0 -7658
- package/dist/chunks/glTFLoader-DVoAJl_A.esm.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-By7yP8sQ.esm.js +0 -77
- package/dist/chunks/glTFLoaderAnimation-By7yP8sQ.esm.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-C9g-SHaJ.esm.min.js +0 -2
- package/dist/chunks/glTFLoaderAnimation-C9g-SHaJ.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-B8pgRSdd.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-B8pgRSdd.esm.min.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-BcfkM4gb.esm.js +0 -35
- package/dist/chunks/harmonicsFunctions-BcfkM4gb.esm.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-DF1x585z.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-DF1x585z.esm.min.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-a48Ki58F.esm.js +0 -34
- package/dist/chunks/harmonicsFunctions-a48Ki58F.esm.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-BWnO8u1r.esm.js +0 -253
- package/dist/chunks/hdrTextureLoader-BWnO8u1r.esm.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-Bii9QpYI.esm.min.js +0 -2
- package/dist/chunks/hdrTextureLoader-Bii9QpYI.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-BinFB44e.esm.js +0 -110
- package/dist/chunks/helperFunctions-BinFB44e.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-CZAyJNTJ.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-CZAyJNTJ.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-DjoUVhI2.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-DjoUVhI2.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-Ds3-3-tu.esm.js +0 -83
- package/dist/chunks/helperFunctions-Ds3-3-tu.esm.js.map +0 -1
- package/dist/chunks/iesTextureLoader-CsnjIN7M.esm.js +0 -189
- package/dist/chunks/iesTextureLoader-CsnjIN7M.esm.js.map +0 -1
- package/dist/chunks/iesTextureLoader-DkmTomCD.esm.min.js +0 -2
- package/dist/chunks/iesTextureLoader-DkmTomCD.esm.min.js.map +0 -1
- package/dist/chunks/index-Cw2FZpYY.esm.js +0 -74870
- package/dist/chunks/index-Cw2FZpYY.esm.js.map +0 -1
- package/dist/chunks/index-DRbhrB0j.esm.min.js +0 -57
- package/dist/chunks/index-DRbhrB0j.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-B4pmAFQl.esm.js +0 -814
- package/dist/chunks/ktxTextureLoader-B4pmAFQl.esm.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-B8Rlj2T0.esm.min.js +0 -2
- package/dist/chunks/ktxTextureLoader-B8Rlj2T0.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-CGz2sG_K.esm.js +0 -11
- package/dist/chunks/logDepthDeclaration-CGz2sG_K.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-CfVFs2QC.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-CfVFs2QC.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-CzVshpad.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-CzVshpad.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-xOwnAKtd.esm.js +0 -35
- package/dist/chunks/logDepthDeclaration-xOwnAKtd.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-BRgUZAsw.esm.js +0 -81
- package/dist/chunks/logDepthVertex-BRgUZAsw.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-CWfPfN9-.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-CWfPfN9-.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-HDlt7vTP.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-HDlt7vTP.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-l0uEG89p.esm.js +0 -77
- package/dist/chunks/logDepthVertex-l0uEG89p.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-B72zV2P9.esm.min.js +0 -2
- package/dist/chunks/mainUVVaryingDeclaration-B72zV2P9.esm.min.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-BDogjZrz.esm.js +0 -11
- package/dist/chunks/mainUVVaryingDeclaration-BDogjZrz.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-DO5HJKyl.esm.min.js +0 -2
- package/dist/chunks/mainUVVaryingDeclaration-DO5HJKyl.esm.min.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-DqzNajlu.esm.js +0 -11
- package/dist/chunks/mainUVVaryingDeclaration-DqzNajlu.esm.js.map +0 -1
- package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js +0 -119
- package/dist/chunks/mesh.vertexData.functions-B_pMCAzZ.esm.js.map +0 -1
- package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js +0 -2
- package/dist/chunks/mesh.vertexData.functions-Bo7e6Of9.esm.min.js.map +0 -1
- package/dist/chunks/meshUboDeclaration-BCO87lfZ.esm.js +0 -26
- package/dist/chunks/meshUboDeclaration-BCO87lfZ.esm.js.map +0 -1
- package/dist/chunks/meshUboDeclaration-o4Xf2fwW.esm.min.js +0 -2
- package/dist/chunks/meshUboDeclaration-o4Xf2fwW.esm.min.js.map +0 -1
- package/dist/chunks/objFileLoader-BfPYM2Sh.esm.min.js +0 -2
- package/dist/chunks/objFileLoader-BfPYM2Sh.esm.min.js.map +0 -1
- package/dist/chunks/objFileLoader-D1emf4Qh.esm.js +0 -1338
- package/dist/chunks/objFileLoader-D1emf4Qh.esm.js.map +0 -1
- package/dist/chunks/oitFragment-B92YpEfj.esm.min.js +0 -2
- package/dist/chunks/oitFragment-B92YpEfj.esm.min.js.map +0 -1
- package/dist/chunks/oitFragment-BoFKkDNv.esm.js +0 -1078
- package/dist/chunks/oitFragment-BoFKkDNv.esm.js.map +0 -1
- package/dist/chunks/oitFragment-Cfx3g0iX.esm.js +0 -1240
- package/dist/chunks/oitFragment-Cfx3g0iX.esm.js.map +0 -1
- package/dist/chunks/oitFragment-CiA7gld-.esm.min.js +0 -2
- package/dist/chunks/oitFragment-CiA7gld-.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-BLbIViJ7.esm.js +0 -15
- package/dist/chunks/pass.fragment-BLbIViJ7.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-BqMk9ouF.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-BqMk9ouF.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-BuVDFNSR.esm.js +0 -15
- package/dist/chunks/pass.fragment-BuVDFNSR.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-cM5FBHLm.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-cM5FBHLm.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-5L_F7nGn.esm.js +0 -3222
- package/dist/chunks/pbr.fragment-5L_F7nGn.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-BJNPHSa-.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-BJNPHSa-.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-CTLrOzV2.esm.js +0 -3269
- package/dist/chunks/pbr.fragment-CTLrOzV2.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-D9MJFOr2.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-D9MJFOr2.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-BJyjq_fb.esm.js +0 -223
- package/dist/chunks/pbr.vertex-BJyjq_fb.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-Bm8Ng4Sx.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-Bm8Ng4Sx.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-CAKPUhfb.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-CAKPUhfb.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-DJd_-MvE.esm.js +0 -348
- package/dist/chunks/pbr.vertex-DJd_-MvE.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-BjRX5eGi.esm.min.js +0 -2
- package/dist/chunks/postprocess.vertex-BjRX5eGi.esm.min.js.map +0 -1
- package/dist/chunks/postprocess.vertex-CFaKNIU-.esm.js +0 -20
- package/dist/chunks/postprocess.vertex-CFaKNIU-.esm.js.map +0 -1
- package/dist/chunks/rawTexture-ByD8l28R.esm.min.js +0 -2
- package/dist/chunks/rawTexture-ByD8l28R.esm.min.js.map +0 -1
- package/dist/chunks/rawTexture-DGz22uaX.esm.js +0 -191
- package/dist/chunks/rawTexture-DGz22uaX.esm.js.map +0 -1
- package/dist/chunks/ray-ByafiITx.esm.js +0 -946
- package/dist/chunks/ray-ByafiITx.esm.js.map +0 -1
- package/dist/chunks/ray-ChSTYrPm.esm.min.js +0 -2
- package/dist/chunks/ray-ChSTYrPm.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-CJ7PpH1N.esm.js +0 -13
- package/dist/chunks/rgbdDecode.fragment-CJ7PpH1N.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-DJ9crbPP.esm.js +0 -13
- package/dist/chunks/rgbdDecode.fragment-DJ9crbPP.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-DLpb3z18.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-DLpb3z18.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-ygeOUzIi.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-ygeOUzIi.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-BTG_wbck.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-BTG_wbck.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-C2s4AQaM.esm.js +0 -13
- package/dist/chunks/rgbdEncode.fragment-C2s4AQaM.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-C6LKySQH.esm.js +0 -13
- package/dist/chunks/rgbdEncode.fragment-C6LKySQH.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-CKB2lpgL.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-CKB2lpgL.esm.min.js.map +0 -1
- package/dist/chunks/splatFileLoader-BtSUlfZs.esm.min.js +0 -2
- package/dist/chunks/splatFileLoader-BtSUlfZs.esm.min.js.map +0 -1
- package/dist/chunks/splatFileLoader-Wn5sDtLq.esm.js +0 -3379
- package/dist/chunks/splatFileLoader-Wn5sDtLq.esm.js.map +0 -1
- package/dist/chunks/spotLight-CmDQEB8V.esm.js +0 -701
- package/dist/chunks/spotLight-CmDQEB8V.esm.js.map +0 -1
- package/dist/chunks/spotLight-hg94aMJD.esm.min.js +0 -2
- package/dist/chunks/spotLight-hg94aMJD.esm.min.js.map +0 -1
- package/dist/chunks/standardMaterial-BhIiLn1_.esm.js +0 -1806
- package/dist/chunks/standardMaterial-BhIiLn1_.esm.js.map +0 -1
- package/dist/chunks/standardMaterial-DQii8fRL.esm.min.js +0 -2
- package/dist/chunks/standardMaterial-DQii8fRL.esm.min.js.map +0 -1
- package/dist/chunks/stlFileLoader-D83u9BOr.esm.js +0 -238
- package/dist/chunks/stlFileLoader-D83u9BOr.esm.js.map +0 -1
- package/dist/chunks/stlFileLoader-DkXWqjZo.esm.min.js +0 -2
- package/dist/chunks/stlFileLoader-DkXWqjZo.esm.min.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-C9xl6cvE.esm.js +0 -349
- package/dist/chunks/tgaTextureLoader-C9xl6cvE.esm.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-DfzjGulW.esm.min.js +0 -2
- package/dist/chunks/tgaTextureLoader-DfzjGulW.esm.min.js.map +0 -1
- package/dist/chunks/thinEngine-Cu21aOSC.esm.min.js +0 -2
- package/dist/chunks/thinEngine-Cu21aOSC.esm.min.js.map +0 -1
- package/dist/chunks/thinEngine-IzS60pqU.esm.js +0 -3853
- package/dist/chunks/thinEngine-IzS60pqU.esm.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-BN8Ev-h8.esm.js +0 -314
- package/dist/chunks/thinInstanceMesh-BN8Ev-h8.esm.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-Bm9vmKU4.esm.min.js +0 -2
- package/dist/chunks/thinInstanceMesh-Bm9vmKU4.esm.min.js.map +0 -1
- package/dist/chunks/vertexColorMixing-Cazf4vEl.esm.min.js +0 -2
- package/dist/chunks/vertexColorMixing-Cazf4vEl.esm.min.js.map +0 -1
- package/dist/chunks/vertexColorMixing-DGvq3Fju.esm.js +0 -421
- package/dist/chunks/vertexColorMixing-DGvq3Fju.esm.js.map +0 -1
- package/dist/chunks/vertexColorMixing-D_6ZvivZ.esm.min.js +0 -2
- package/dist/chunks/vertexColorMixing-D_6ZvivZ.esm.min.js.map +0 -1
- package/dist/chunks/vertexColorMixing-DuYHnuUm.esm.js +0 -531
- package/dist/chunks/vertexColorMixing-DuYHnuUm.esm.js.map +0 -1
- package/dist/chunks/webgpuEngine-DHaXinU4.esm.min.js +0 -2
- package/dist/chunks/webgpuEngine-DHaXinU4.esm.min.js.map +0 -1
- package/dist/chunks/webgpuEngine-Dxev7pbz.esm.js +0 -11538
- package/dist/chunks/webgpuEngine-Dxev7pbz.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/lib/index.d.ts +0 -591
- package/lib/index.js +0 -2165
- package/lib/index.js.map +0 -1
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { a$ as PBRMaterial, aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Cw2FZpYY.esm.js';
|
|
2
|
-
import { G as GLTFLoader } from './glTFLoader-DVoAJl_A.esm.js';
|
|
3
|
-
import './rawTexture-DGz22uaX.esm.js';
|
|
4
|
-
import './assetContainer-QD3gUzyx.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-By7yP8sQ.esm.js';
|
|
6
|
-
|
|
7
|
-
const NAME = "KHR_materials_volume";
|
|
8
|
-
/**
|
|
9
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)
|
|
10
|
-
* @since 5.0.0
|
|
11
|
-
*/
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
|
-
class KHR_materials_volume {
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
constructor(loader) {
|
|
18
|
-
/**
|
|
19
|
-
* The name of this extension.
|
|
20
|
-
*/
|
|
21
|
-
this.name = NAME;
|
|
22
|
-
/**
|
|
23
|
-
* Defines a number that determines the order the extensions are applied.
|
|
24
|
-
*/
|
|
25
|
-
this.order = 173;
|
|
26
|
-
this._loader = loader;
|
|
27
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
28
|
-
if (this.enabled) {
|
|
29
|
-
// We need to disable instance usage because the attenuation factor depends on the node scale of each individual mesh
|
|
30
|
-
this._loader._disableInstancedMesh++;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/** @internal */
|
|
34
|
-
dispose() {
|
|
35
|
-
if (this.enabled) {
|
|
36
|
-
this._loader._disableInstancedMesh--;
|
|
37
|
-
}
|
|
38
|
-
this._loader = null;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @internal
|
|
42
|
-
*/
|
|
43
|
-
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
44
|
-
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
45
|
-
const promises = new Array();
|
|
46
|
-
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
47
|
-
promises.push(this._loadVolumePropertiesAsync(extensionContext, material, babylonMaterial, extension));
|
|
48
|
-
return Promise.all(promises).then(() => { });
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
_loadVolumePropertiesAsync(context, material, babylonMaterial, extension) {
|
|
52
|
-
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
53
|
-
throw new Error(`${context}: Material type not supported`);
|
|
54
|
-
}
|
|
55
|
-
// If transparency isn't enabled already, this extension shouldn't do anything.
|
|
56
|
-
// i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.
|
|
57
|
-
if ((!babylonMaterial.subSurface.isRefractionEnabled && !babylonMaterial.subSurface.isTranslucencyEnabled) || !extension.thicknessFactor) {
|
|
58
|
-
return Promise.resolve();
|
|
59
|
-
}
|
|
60
|
-
// IOR in this extension only affects interior.
|
|
61
|
-
babylonMaterial.subSurface.volumeIndexOfRefraction = babylonMaterial.indexOfRefraction;
|
|
62
|
-
const attenuationDistance = extension.attenuationDistance !== undefined ? extension.attenuationDistance : Number.MAX_VALUE;
|
|
63
|
-
babylonMaterial.subSurface.tintColorAtDistance = attenuationDistance;
|
|
64
|
-
if (extension.attenuationColor !== undefined && extension.attenuationColor.length == 3) {
|
|
65
|
-
babylonMaterial.subSurface.tintColor.copyFromFloats(extension.attenuationColor[0], extension.attenuationColor[1], extension.attenuationColor[2]);
|
|
66
|
-
}
|
|
67
|
-
babylonMaterial.subSurface.minimumThickness = 0.0;
|
|
68
|
-
babylonMaterial.subSurface.maximumThickness = extension.thicknessFactor;
|
|
69
|
-
babylonMaterial.subSurface.useThicknessAsDepth = true;
|
|
70
|
-
if (extension.thicknessTexture) {
|
|
71
|
-
extension.thicknessTexture.nonColorData = true;
|
|
72
|
-
return this._loader.loadTextureInfoAsync(`${context}/thicknessTexture`, extension.thicknessTexture).then((texture) => {
|
|
73
|
-
texture.name = `${babylonMaterial.name} (Thickness)`;
|
|
74
|
-
babylonMaterial.subSurface.thicknessTexture = texture;
|
|
75
|
-
babylonMaterial.subSurface.useGltfStyleTextures = true;
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
return Promise.resolve();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
unregisterGLTFExtension(NAME);
|
|
84
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_volume(loader));
|
|
85
|
-
|
|
86
|
-
export { KHR_materials_volume };
|
|
87
|
-
//# sourceMappingURL=KHR_materials_volume-CLkC_Bvi.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_volume-CLkC_Bvi.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_volume.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_volume\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_volume/README.md)\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_volume {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 173;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n // We need to disable instance usage because the attenuation factor depends on the node scale of each individual mesh\n this._loader._disableInstancedMesh++;\n }\n }\n /** @internal */\n dispose() {\n if (this.enabled) {\n this._loader._disableInstancedMesh--;\n }\n this._loader = null;\n }\n /**\n * @internal\n */\n loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadVolumePropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadVolumePropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n // If transparency isn't enabled already, this extension shouldn't do anything.\n // i.e. it requires either the KHR_materials_transmission or KHR_materials_diffuse_transmission extensions.\n if ((!babylonMaterial.subSurface.isRefractionEnabled && !babylonMaterial.subSurface.isTranslucencyEnabled) || !extension.thicknessFactor) {\n return Promise.resolve();\n }\n // IOR in this extension only affects interior.\n babylonMaterial.subSurface.volumeIndexOfRefraction = babylonMaterial.indexOfRefraction;\n const attenuationDistance = extension.attenuationDistance !== undefined ? extension.attenuationDistance : Number.MAX_VALUE;\n babylonMaterial.subSurface.tintColorAtDistance = attenuationDistance;\n if (extension.attenuationColor !== undefined && extension.attenuationColor.length == 3) {\n babylonMaterial.subSurface.tintColor.copyFromFloats(extension.attenuationColor[0], extension.attenuationColor[1], extension.attenuationColor[2]);\n }\n babylonMaterial.subSurface.minimumThickness = 0.0;\n babylonMaterial.subSurface.maximumThickness = extension.thicknessFactor;\n babylonMaterial.subSurface.useThicknessAsDepth = true;\n if (extension.thicknessTexture) {\n extension.thicknessTexture.nonColorData = true;\n return this._loader.loadTextureInfoAsync(`${context}/thicknessTexture`, extension.thicknessTexture).then((texture) => {\n texture.name = `${babylonMaterial.name} (Thickness)`;\n babylonMaterial.subSurface.thicknessTexture = texture;\n babylonMaterial.subSurface.useGltfStyleTextures = true;\n });\n }\n else {\n return Promise.resolve();\n }\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_volume(loader));\n//# sourceMappingURL=KHR_materials_volume.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACO,MAAM,oBAAoB,CAAC;AAClC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;AAC1B;AACA,YAAY,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE;AAChD;AACA;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;AAC1B,YAAY,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE;AAChD;AACA,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE;AACpE,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,gBAAgB,EAAE,SAAS,KAAK;AAC5G,YAAY,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE;AACxC,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC;AACvG,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,gBAAgB,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC;AAClH,YAAY,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;AACxD,SAAS,CAAC;AACV;AACA,IAAI,0BAA0B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE;AAC9E,QAAQ,IAAI,EAAE,eAAe,YAAY,WAAW,CAAC,EAAE;AACvD,YAAY,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC;AACtE;AACA;AACA;AACA,QAAQ,IAAI,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,mBAAmB,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,qBAAqB,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE;AAClJ,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE;AACpC;AACA;AACA,QAAQ,eAAe,CAAC,UAAU,CAAC,uBAAuB,GAAG,eAAe,CAAC,iBAAiB;AAC9F,QAAQ,MAAM,mBAAmB,GAAG,SAAS,CAAC,mBAAmB,KAAK,SAAS,GAAG,SAAS,CAAC,mBAAmB,GAAG,MAAM,CAAC,SAAS;AAClI,QAAQ,eAAe,CAAC,UAAU,CAAC,mBAAmB,GAAG,mBAAmB;AAC5E,QAAQ,IAAI,SAAS,CAAC,gBAAgB,KAAK,SAAS,IAAI,SAAS,CAAC,gBAAgB,CAAC,MAAM,IAAI,CAAC,EAAE;AAChG,YAAY,eAAe,CAAC,UAAU,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC5J;AACA,QAAQ,eAAe,CAAC,UAAU,CAAC,gBAAgB,GAAG,GAAG;AACzD,QAAQ,eAAe,CAAC,UAAU,CAAC,gBAAgB,GAAG,SAAS,CAAC,eAAe;AAC/E,QAAQ,eAAe,CAAC,UAAU,CAAC,mBAAmB,GAAG,IAAI;AAC7D,QAAQ,IAAI,SAAS,CAAC,gBAAgB,EAAE;AACxC,YAAY,SAAS,CAAC,gBAAgB,CAAC,YAAY,GAAG,IAAI;AAC1D,YAAY,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK;AAClI,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;AACpE,gBAAgB,eAAe,CAAC,UAAU,CAAC,gBAAgB,GAAG,OAAO;AACrE,gBAAgB,eAAe,CAAC,UAAU,CAAC,oBAAoB,GAAG,IAAI;AACtE,aAAa,CAAC;AACd;AACA,aAAa;AACb,YAAY,OAAO,OAAO,CAAC,OAAO,EAAE;AACpC;AACA;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Cw2FZpYY.esm.js';
|
|
2
|
-
|
|
3
|
-
const NAME = "KHR_mesh_quantization";
|
|
4
|
-
/**
|
|
5
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_mesh_quantization/README.md)
|
|
6
|
-
*/
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8
|
-
class KHR_mesh_quantization {
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
constructor(loader) {
|
|
13
|
-
/**
|
|
14
|
-
* The name of this extension.
|
|
15
|
-
*/
|
|
16
|
-
this.name = NAME;
|
|
17
|
-
this.enabled = loader.isExtensionUsed(NAME);
|
|
18
|
-
}
|
|
19
|
-
/** @internal */
|
|
20
|
-
dispose() { }
|
|
21
|
-
}
|
|
22
|
-
unregisterGLTFExtension(NAME);
|
|
23
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_mesh_quantization(loader));
|
|
24
|
-
|
|
25
|
-
export { KHR_mesh_quantization };
|
|
26
|
-
//# sourceMappingURL=KHR_mesh_quantization-BJv1P2Wt.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_mesh_quantization-BJv1P2Wt.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_mesh_quantization.js"],"sourcesContent":["import { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_mesh_quantization\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_mesh_quantization/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_mesh_quantization {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() { }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_mesh_quantization(loader));\n//# sourceMappingURL=KHR_mesh_quantization.js.map"],"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,uBAAuB;AACpC;AACA;AACA;AACA;AACO,MAAM,qBAAqB,CAAC;AACnC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;AACnD;AACA;AACA,IAAI,OAAO,GAAG;AACd;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aQ as s,aR as e}from"./index-DRbhrB0j.esm.min.js";const n="KHR_mesh_quantization";class i{constructor(s){this.name=n,this.enabled=s.isExtensionUsed(n)}dispose(){}}s(n),e(n,!0,(s=>new i(s)));export{i as KHR_mesh_quantization};
|
|
2
|
-
//# sourceMappingURL=KHR_mesh_quantization-D69X_5bR.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_mesh_quantization-D69X_5bR.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_mesh_quantization.js"],"sourcesContent":["import { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_mesh_quantization\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_mesh_quantization/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_mesh_quantization {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() { }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_mesh_quantization(loader));\n//# sourceMappingURL=KHR_mesh_quantization.js.map"],"names":["NAME","KHR_mesh_quantization","constructor","loader","this","name","enabled","isExtensionUsed","dispose","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"yDACA,MAAMA,EAAO,wBAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EACZI,KAAKE,QAAUH,EAAOI,gBAAgBP,EAC9C,CAEI,OAAAQ,GAAU,EAEdC,EAAwBT,GACxBU,EAAsBV,GAAM,GAAOG,GAAW,IAAIF,EAAsBE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aQ as e,aR as s}from"./index-DRbhrB0j.esm.min.js";const o="KHR_node_hoverability";class n{constructor(e){this.name=o,this._loader=e,this.enabled=e.isExtensionUsed(o)}async onReady(){this._loader.gltf.nodes?.forEach((e=>{e.extensions?.KHR_node_hoverability&&!1===e.extensions?.KHR_node_hoverability.hoverable&&e._babylonTransformNode?.getChildMeshes().forEach((e=>{e.pointerOverDisableMeshTesting=!0}))}))}dispose(){this._loader=null}}e(o),s(o,!0,(e=>new n(e)));export{n as KHR_node_hoverability};
|
|
2
|
-
//# sourceMappingURL=KHR_node_hoverability-CG6s7hhs.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_node_hoverability-CG6s7hhs.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_node_hoverability.js"],"sourcesContent":["import { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_node_hoverability\";\n/**\n * Loader extension for KHR_node_hoverability\n * @see https://github.com/KhronosGroup/glTF/pull/2426\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_node_hoverability {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n async onReady() {\n this._loader.gltf.nodes?.forEach((node) => {\n // default is true, so only apply if false\n if (node.extensions?.KHR_node_hoverability && node.extensions?.KHR_node_hoverability.hoverable === false) {\n node._babylonTransformNode?.getChildMeshes().forEach((mesh) => {\n mesh.pointerOverDisableMeshTesting = true;\n });\n }\n });\n }\n dispose() {\n this._loader = null;\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_node_hoverability(loader));\n//# sourceMappingURL=KHR_node_hoverability.js.map"],"names":["NAME","KHR_node_hoverability","constructor","loader","this","name","_loader","enabled","isExtensionUsed","onReady","gltf","nodes","forEach","node","extensions","hoverable","_babylonTransformNode","getChildMeshes","mesh","pointerOverDisableMeshTesting","dispose","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"yDACA,MAAMA,EAAO,wBAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EACZI,KAAKE,QAAUH,EACfC,KAAKG,QAAUJ,EAAOK,gBAAgBR,EAC9C,CACI,aAAMS,GACFL,KAAKE,QAAQI,KAAKC,OAAOC,SAASC,IAE1BA,EAAKC,YAAYb,wBAA8E,IAArDY,EAAKC,YAAYb,sBAAsBc,WACjFF,EAAKG,uBAAuBC,iBAAiBL,SAASM,IAClDA,EAAKC,+BAAgC,CAAI,GAE7D,GAEA,CACI,OAAAC,GACIhB,KAAKE,QAAU,IACvB,EAEAe,EAAwBrB,GACxBsB,EAAsBtB,GAAM,GAAOG,GAAW,IAAIF,EAAsBE"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Cw2FZpYY.esm.js';
|
|
2
|
-
|
|
3
|
-
const NAME = "KHR_node_hoverability";
|
|
4
|
-
/**
|
|
5
|
-
* Loader extension for KHR_node_hoverability
|
|
6
|
-
* @see https://github.com/KhronosGroup/glTF/pull/2426
|
|
7
|
-
*/
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
-
class KHR_node_hoverability {
|
|
10
|
-
/**
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
constructor(loader) {
|
|
14
|
-
/**
|
|
15
|
-
* The name of this extension.
|
|
16
|
-
*/
|
|
17
|
-
this.name = NAME;
|
|
18
|
-
this._loader = loader;
|
|
19
|
-
this.enabled = loader.isExtensionUsed(NAME);
|
|
20
|
-
}
|
|
21
|
-
async onReady() {
|
|
22
|
-
this._loader.gltf.nodes?.forEach((node) => {
|
|
23
|
-
// default is true, so only apply if false
|
|
24
|
-
if (node.extensions?.KHR_node_hoverability && node.extensions?.KHR_node_hoverability.hoverable === false) {
|
|
25
|
-
node._babylonTransformNode?.getChildMeshes().forEach((mesh) => {
|
|
26
|
-
mesh.pointerOverDisableMeshTesting = true;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
dispose() {
|
|
32
|
-
this._loader = null;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
unregisterGLTFExtension(NAME);
|
|
36
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_node_hoverability(loader));
|
|
37
|
-
|
|
38
|
-
export { KHR_node_hoverability };
|
|
39
|
-
//# sourceMappingURL=KHR_node_hoverability-xgvyZ_r-.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_node_hoverability-xgvyZ_r-.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_node_hoverability.js"],"sourcesContent":["import { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_node_hoverability\";\n/**\n * Loader extension for KHR_node_hoverability\n * @see https://github.com/KhronosGroup/glTF/pull/2426\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_node_hoverability {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n async onReady() {\n this._loader.gltf.nodes?.forEach((node) => {\n // default is true, so only apply if false\n if (node.extensions?.KHR_node_hoverability && node.extensions?.KHR_node_hoverability.hoverable === false) {\n node._babylonTransformNode?.getChildMeshes().forEach((mesh) => {\n mesh.pointerOverDisableMeshTesting = true;\n });\n }\n });\n }\n dispose() {\n this._loader = null;\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_node_hoverability(loader));\n//# sourceMappingURL=KHR_node_hoverability.js.map"],"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,uBAAuB;AACpC;AACA;AACA;AACA;AACA;AACO,MAAM,qBAAqB,CAAC;AACnC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;AACnD;AACA,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,KAAK;AACnD;AACA,YAAY,IAAI,IAAI,CAAC,UAAU,EAAE,qBAAqB,IAAI,IAAI,CAAC,UAAU,EAAE,qBAAqB,CAAC,SAAS,KAAK,KAAK,EAAE;AACtH,gBAAgB,IAAI,CAAC,qBAAqB,EAAE,cAAc,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK;AAC/E,oBAAoB,IAAI,CAAC,6BAA6B,GAAG,IAAI;AAC7D,iBAAiB,CAAC;AAClB;AACA,SAAS,CAAC;AACV;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aQ as i,aR as s}from"./index-DRbhrB0j.esm.min.js";const e="KHR_node_visibility";class o{constructor(i){this.name=e,this._loader=i,this.enabled=i.isExtensionUsed(e)}async onReady(){this._loader.gltf.nodes?.forEach((i=>{i._primitiveBabylonMeshes?.forEach((i=>{i.inheritVisibility=!0})),i.extensions?.KHR_node_visibility&&!1===i.extensions?.KHR_node_visibility.visible&&(i._babylonTransformNode&&(i._babylonTransformNode.isVisible=!1),i._primitiveBabylonMeshes?.forEach((i=>{i.isVisible=!1})))}))}dispose(){this._loader=null}}i(e),s(e,!0,(i=>new o(i)));export{o as KHR_node_visibility};
|
|
2
|
-
//# sourceMappingURL=KHR_node_visibility-DUozjXRR.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_node_visibility-DUozjXRR.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_node_visibility.js"],"sourcesContent":["import { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_node_visibility\";\n/**\n * Loader extension for KHR_node_visibility\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_node_visibility {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n async onReady() {\n this._loader.gltf.nodes?.forEach((node) => {\n node._primitiveBabylonMeshes?.forEach((mesh) => {\n mesh.inheritVisibility = true;\n });\n // When the JSON Pointer is used we need to change both the transform node and the primitive meshes to the new value.\n if (node.extensions?.KHR_node_visibility) {\n if (node.extensions?.KHR_node_visibility.visible === false) {\n if (node._babylonTransformNode) {\n node._babylonTransformNode.isVisible = false;\n }\n node._primitiveBabylonMeshes?.forEach((mesh) => {\n mesh.isVisible = false;\n });\n }\n }\n });\n }\n dispose() {\n this._loader = null;\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_node_visibility(loader));\n//# sourceMappingURL=KHR_node_visibility.js.map"],"names":["NAME","KHR_node_visibility","constructor","loader","this","name","_loader","enabled","isExtensionUsed","onReady","gltf","nodes","forEach","node","_primitiveBabylonMeshes","mesh","inheritVisibility","extensions","visible","_babylonTransformNode","isVisible","dispose","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"yDACA,MAAMA,EAAO,sBAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EACZI,KAAKE,QAAUH,EACfC,KAAKG,QAAUJ,EAAOK,gBAAgBR,EAC9C,CACI,aAAMS,GACFL,KAAKE,QAAQI,KAAKC,OAAOC,SAASC,IAC9BA,EAAKC,yBAAyBF,SAASG,IACnCA,EAAKC,mBAAoB,CAAI,IAG7BH,EAAKI,YAAYhB,sBACoC,IAAjDY,EAAKI,YAAYhB,oBAAoBiB,UACjCL,EAAKM,wBACLN,EAAKM,sBAAsBC,WAAY,GAE3CP,EAAKC,yBAAyBF,SAASG,IACnCA,EAAKK,WAAY,CAAK,IAG9C,GAEA,CACI,OAAAC,GACIjB,KAAKE,QAAU,IACvB,EAEAgB,EAAwBtB,GACxBuB,EAAsBvB,GAAM,GAAOG,GAAW,IAAIF,EAAoBE"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Cw2FZpYY.esm.js';
|
|
2
|
-
|
|
3
|
-
const NAME = "KHR_node_visibility";
|
|
4
|
-
/**
|
|
5
|
-
* Loader extension for KHR_node_visibility
|
|
6
|
-
*/
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8
|
-
class KHR_node_visibility {
|
|
9
|
-
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
constructor(loader) {
|
|
13
|
-
/**
|
|
14
|
-
* The name of this extension.
|
|
15
|
-
*/
|
|
16
|
-
this.name = NAME;
|
|
17
|
-
this._loader = loader;
|
|
18
|
-
this.enabled = loader.isExtensionUsed(NAME);
|
|
19
|
-
}
|
|
20
|
-
async onReady() {
|
|
21
|
-
this._loader.gltf.nodes?.forEach((node) => {
|
|
22
|
-
node._primitiveBabylonMeshes?.forEach((mesh) => {
|
|
23
|
-
mesh.inheritVisibility = true;
|
|
24
|
-
});
|
|
25
|
-
// When the JSON Pointer is used we need to change both the transform node and the primitive meshes to the new value.
|
|
26
|
-
if (node.extensions?.KHR_node_visibility) {
|
|
27
|
-
if (node.extensions?.KHR_node_visibility.visible === false) {
|
|
28
|
-
if (node._babylonTransformNode) {
|
|
29
|
-
node._babylonTransformNode.isVisible = false;
|
|
30
|
-
}
|
|
31
|
-
node._primitiveBabylonMeshes?.forEach((mesh) => {
|
|
32
|
-
mesh.isVisible = false;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
dispose() {
|
|
39
|
-
this._loader = null;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
unregisterGLTFExtension(NAME);
|
|
43
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_node_visibility(loader));
|
|
44
|
-
|
|
45
|
-
export { KHR_node_visibility };
|
|
46
|
-
//# sourceMappingURL=KHR_node_visibility-aAs5Kkey.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_node_visibility-aAs5Kkey.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_node_visibility.js"],"sourcesContent":["import { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_node_visibility\";\n/**\n * Loader extension for KHR_node_visibility\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_node_visibility {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n async onReady() {\n this._loader.gltf.nodes?.forEach((node) => {\n node._primitiveBabylonMeshes?.forEach((mesh) => {\n mesh.inheritVisibility = true;\n });\n // When the JSON Pointer is used we need to change both the transform node and the primitive meshes to the new value.\n if (node.extensions?.KHR_node_visibility) {\n if (node.extensions?.KHR_node_visibility.visible === false) {\n if (node._babylonTransformNode) {\n node._babylonTransformNode.isVisible = false;\n }\n node._primitiveBabylonMeshes?.forEach((mesh) => {\n mesh.isVisible = false;\n });\n }\n }\n });\n }\n dispose() {\n this._loader = null;\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_node_visibility(loader));\n//# sourceMappingURL=KHR_node_visibility.js.map"],"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,qBAAqB;AAClC;AACA;AACA;AACA;AACO,MAAM,mBAAmB,CAAC;AACjC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;AACnD;AACA,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,KAAK;AACnD,YAAY,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC,IAAI,KAAK;AAC5D,gBAAgB,IAAI,CAAC,iBAAiB,GAAG,IAAI;AAC7C,aAAa,CAAC;AACd;AACA,YAAY,IAAI,IAAI,CAAC,UAAU,EAAE,mBAAmB,EAAE;AACtD,gBAAgB,IAAI,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,OAAO,KAAK,KAAK,EAAE;AAC5E,oBAAoB,IAAI,IAAI,CAAC,qBAAqB,EAAE;AACpD,wBAAwB,IAAI,CAAC,qBAAqB,CAAC,SAAS,GAAG,KAAK;AACpE;AACA,oBAAoB,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC,IAAI,KAAK;AACpE,wBAAwB,IAAI,CAAC,SAAS,GAAG,KAAK;AAC9C,qBAAqB,CAAC;AACtB;AACA;AACA,SAAS,CAAC;AACV;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { G as GLTFLoader, A as ArrayItem } from './glTFLoader-DVoAJl_A.esm.js';
|
|
2
|
-
import { aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Cw2FZpYY.esm.js';
|
|
3
|
-
import './rawTexture-DGz22uaX.esm.js';
|
|
4
|
-
import './assetContainer-QD3gUzyx.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-By7yP8sQ.esm.js';
|
|
6
|
-
|
|
7
|
-
const NAME = "KHR_texture_basisu";
|
|
8
|
-
/**
|
|
9
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_basisu/README.md)
|
|
10
|
-
*/
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
-
class KHR_texture_basisu {
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
constructor(loader) {
|
|
17
|
-
/** The name of this extension. */
|
|
18
|
-
this.name = NAME;
|
|
19
|
-
this._loader = loader;
|
|
20
|
-
this.enabled = loader.isExtensionUsed(NAME);
|
|
21
|
-
}
|
|
22
|
-
/** @internal */
|
|
23
|
-
dispose() {
|
|
24
|
-
this._loader = null;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
_loadTextureAsync(context, texture, assign) {
|
|
30
|
-
return GLTFLoader.LoadExtensionAsync(context, texture, this.name, (extensionContext, extension) => {
|
|
31
|
-
const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);
|
|
32
|
-
const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);
|
|
33
|
-
return this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {
|
|
34
|
-
assign(babylonTexture);
|
|
35
|
-
}, texture._textureInfo.nonColorData ? { useRGBAIfASTCBC7NotAvailableWhenUASTC: true } : undefined, !texture._textureInfo.nonColorData);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
unregisterGLTFExtension(NAME);
|
|
40
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_texture_basisu(loader));
|
|
41
|
-
|
|
42
|
-
export { KHR_texture_basisu };
|
|
43
|
-
//# sourceMappingURL=KHR_texture_basisu-Bjw0jG1d.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_texture_basisu-Bjw0jG1d.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_texture_basisu.js"],"sourcesContent":["import { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_texture_basisu\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_basisu/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_texture_basisu {\n /**\n * @internal\n */\n constructor(loader) {\n /** The name of this extension. */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadTextureAsync(context, texture, assign) {\n return GLTFLoader.LoadExtensionAsync(context, texture, this.name, (extensionContext, extension) => {\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\n return this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {\n assign(babylonTexture);\n }, texture._textureInfo.nonColorData ? { useRGBAIfASTCBC7NotAvailableWhenUASTC: true } : undefined, !texture._textureInfo.nonColorData);\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_texture_basisu(loader));\n//# sourceMappingURL=KHR_texture_basisu.js.map"],"names":[],"mappings":";;;;;;AAEA,MAAM,IAAI,GAAG,oBAAoB;AACjC;AACA;AACA;AACA;AACO,MAAM,kBAAkB,CAAC;AAChC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;AACnD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE;AAChD,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,gBAAgB,EAAE,SAAS,KAAK;AAC3G,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,GAAG,UAAU,CAAC,cAAc,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC;AACvK,YAAY,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC;AACjH,YAAY,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,cAAc,KAAK;AACjG,gBAAgB,MAAM,CAAC,cAAc,CAAC;AACtC,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,YAAY,GAAG,EAAE,qCAAqC,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC;AACnJ,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{G as e,A as s}from"./glTFLoader-3ZUBWawQ.esm.min.js";import{aQ as t,aR as r}from"./index-DRbhrB0j.esm.min.js";import"./rawTexture-ByD8l28R.esm.min.js";import"./assetContainer-DDEska5G.esm.min.js";import"./glTFLoaderAnimation-C9g-SHaJ.esm.min.js";const a="KHR_texture_basisu";class o{constructor(e){this.name=a,this._loader=e,this.enabled=e.isExtensionUsed(a)}dispose(){this._loader=null}_loadTextureAsync(t,r,a){return e.LoadExtensionAsync(t,r,this.name,((o,n)=>{const i=null==r.sampler?e.DefaultSampler:s.Get(`${t}/sampler`,this._loader.gltf.samplers,r.sampler),l=s.Get(`${o}/source`,this._loader.gltf.images,n.source);return this._loader._createTextureAsync(t,i,l,(e=>{a(e)}),r._textureInfo.nonColorData?{useRGBAIfASTCBC7NotAvailableWhenUASTC:!0}:void 0,!r._textureInfo.nonColorData)}))}}t(a),r(a,!0,(e=>new o(e)));export{o as KHR_texture_basisu};
|
|
2
|
-
//# sourceMappingURL=KHR_texture_basisu-FWm46QOj.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_texture_basisu-FWm46QOj.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_texture_basisu.js"],"sourcesContent":["import { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_texture_basisu\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_basisu/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_texture_basisu {\n /**\n * @internal\n */\n constructor(loader) {\n /** The name of this extension. */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadTextureAsync(context, texture, assign) {\n return GLTFLoader.LoadExtensionAsync(context, texture, this.name, (extensionContext, extension) => {\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\n return this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {\n assign(babylonTexture);\n }, texture._textureInfo.nonColorData ? { useRGBAIfASTCBC7NotAvailableWhenUASTC: true } : undefined, !texture._textureInfo.nonColorData);\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_texture_basisu(loader));\n//# sourceMappingURL=KHR_texture_basisu.js.map"],"names":["NAME","KHR_texture_basisu","constructor","loader","this","name","_loader","enabled","isExtensionUsed","dispose","_loadTextureAsync","context","texture","assign","GLTFLoader","LoadExtensionAsync","extensionContext","extension","sampler","undefined","DefaultSampler","ArrayItem","Get","gltf","samplers","image","images","source","_createTextureAsync","babylonTexture","_textureInfo","nonColorData","useRGBAIfASTCBC7NotAvailableWhenUASTC","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"6PAEA,MAAMA,EAAO,qBAKN,MAAMC,EAIT,WAAAC,CAAYC,GAERC,KAAKC,KAAOL,EACZI,KAAKE,QAAUH,EACfC,KAAKG,QAAUJ,EAAOK,gBAAgBR,EAC9C,CAEI,OAAAS,GACIL,KAAKE,QAAU,IACvB,CAII,iBAAAI,CAAkBC,EAASC,EAASC,GAChC,OAAOC,EAAWC,mBAAmBJ,EAASC,EAASR,KAAKC,MAAM,CAACW,EAAkBC,KACjF,MAAMC,EAA6BC,MAAnBP,EAAQM,QAAuBJ,EAAWM,eAAiBC,EAAUC,IAAI,GAAGX,YAAmBP,KAAKE,QAAQiB,KAAKC,SAAUZ,EAAQM,SAC7IO,EAAQJ,EAAUC,IAAI,GAAGN,WAA2BZ,KAAKE,QAAQiB,KAAKG,OAAQT,EAAUU,QAC9F,OAAOvB,KAAKE,QAAQsB,oBAAoBjB,EAASO,EAASO,GAAQI,IAC9DhB,EAAOgB,EAAe,GACvBjB,EAAQkB,aAAaC,aAAe,CAAEC,uCAAuC,QAASb,GAAYP,EAAQkB,aAAaC,aAAa,GAEnJ,EAEAE,EAAwBjC,GACxBkC,EAAsBlC,GAAM,GAAOG,GAAW,IAAIF,EAAmBE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e,aQ as t,aR as o}from"./index-DRbhrB0j.esm.min.js";import{G as s}from"./glTFLoader-3ZUBWawQ.esm.min.js";import"./rawTexture-ByD8l28R.esm.min.js";import"./assetContainer-DDEska5G.esm.min.js";import"./glTFLoaderAnimation-C9g-SHaJ.esm.min.js";const n="KHR_texture_transform";class r{constructor(e){this.name=n,this._loader=e,this.enabled=this._loader.isExtensionUsed(n)}dispose(){this._loader=null}loadTextureInfoAsync(t,o,n){return s.LoadExtensionAsync(t,o,this.name,((s,r)=>this._loader.loadTextureInfoAsync(t,o,(t=>{if(!(t instanceof e))throw new Error(`${s}: Texture type not supported`);r.offset&&(t.uOffset=r.offset[0],t.vOffset=r.offset[1]),t.uRotationCenter=0,t.vRotationCenter=0,r.rotation&&(t.wAng=-r.rotation),r.scale&&(t.uScale=r.scale[0],t.vScale=r.scale[1]),null!=r.texCoord&&(t.coordinatesIndex=r.texCoord),n(t)}))))}}t(n),o(n,!0,(e=>new r(e)));export{r as KHR_texture_transform};
|
|
2
|
-
//# sourceMappingURL=KHR_texture_transform-BZYr2brj.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_texture_transform-BZYr2brj.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_texture_transform.js"],"sourcesContent":["import { Texture } from \"core/Materials/Textures/texture\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_texture_transform\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_transform/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_texture_transform {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadTextureInfoAsync(context, textureInfo, assign) {\n return GLTFLoader.LoadExtensionAsync(context, textureInfo, this.name, (extensionContext, extension) => {\n return this._loader.loadTextureInfoAsync(context, textureInfo, (babylonTexture) => {\n if (!(babylonTexture instanceof Texture)) {\n throw new Error(`${extensionContext}: Texture type not supported`);\n }\n if (extension.offset) {\n babylonTexture.uOffset = extension.offset[0];\n babylonTexture.vOffset = extension.offset[1];\n }\n // Always rotate around the origin.\n babylonTexture.uRotationCenter = 0;\n babylonTexture.vRotationCenter = 0;\n if (extension.rotation) {\n babylonTexture.wAng = -extension.rotation;\n }\n if (extension.scale) {\n babylonTexture.uScale = extension.scale[0];\n babylonTexture.vScale = extension.scale[1];\n }\n if (extension.texCoord != undefined) {\n babylonTexture.coordinatesIndex = extension.texCoord;\n }\n assign(babylonTexture);\n });\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_texture_transform(loader));\n//# sourceMappingURL=KHR_texture_transform.js.map"],"names":["NAME","KHR_texture_transform","constructor","loader","this","name","_loader","enabled","isExtensionUsed","dispose","loadTextureInfoAsync","context","textureInfo","assign","GLTFLoader","LoadExtensionAsync","extensionContext","extension","babylonTexture","Texture","Error","offset","uOffset","vOffset","uRotationCenter","vRotationCenter","rotation","wAng","scale","uScale","vScale","undefined","texCoord","coordinatesIndex","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"6PAGA,MAAMA,EAAO,wBAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EACZI,KAAKE,QAAUH,EACfC,KAAKG,QAAUH,KAAKE,QAAQE,gBAAgBR,EACpD,CAEI,OAAAS,GACIL,KAAKE,QAAU,IACvB,CAII,oBAAAI,CAAqBC,EAASC,EAAaC,GACvC,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAaR,KAAKC,MAAM,CAACW,EAAkBC,IAC9Eb,KAAKE,QAAQI,qBAAqBC,EAASC,GAAcM,IAC5D,KAAMA,aAA0BC,GAC5B,MAAM,IAAIC,MAAM,GAAGJ,iCAEnBC,EAAUI,SACVH,EAAeI,QAAUL,EAAUI,OAAO,GAC1CH,EAAeK,QAAUN,EAAUI,OAAO,IAG9CH,EAAeM,gBAAkB,EACjCN,EAAeO,gBAAkB,EAC7BR,EAAUS,WACVR,EAAeS,MAAQV,EAAUS,UAEjCT,EAAUW,QACVV,EAAeW,OAASZ,EAAUW,MAAM,GACxCV,EAAeY,OAASb,EAAUW,MAAM,IAElBG,MAAtBd,EAAUe,WACVd,EAAee,iBAAmBhB,EAAUe,UAEhDnB,EAAOK,EAAe,KAGtC,EAEAgB,EAAwBlC,GACxBmC,EAAsBnC,GAAM,GAAOG,GAAW,IAAIF,EAAsBE"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { t as Texture, aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Cw2FZpYY.esm.js';
|
|
2
|
-
import { G as GLTFLoader } from './glTFLoader-DVoAJl_A.esm.js';
|
|
3
|
-
import './rawTexture-DGz22uaX.esm.js';
|
|
4
|
-
import './assetContainer-QD3gUzyx.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-By7yP8sQ.esm.js';
|
|
6
|
-
|
|
7
|
-
const NAME = "KHR_texture_transform";
|
|
8
|
-
/**
|
|
9
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_transform/README.md)
|
|
10
|
-
*/
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
-
class KHR_texture_transform {
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
constructor(loader) {
|
|
17
|
-
/**
|
|
18
|
-
* The name of this extension.
|
|
19
|
-
*/
|
|
20
|
-
this.name = NAME;
|
|
21
|
-
this._loader = loader;
|
|
22
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
23
|
-
}
|
|
24
|
-
/** @internal */
|
|
25
|
-
dispose() {
|
|
26
|
-
this._loader = null;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @internal
|
|
30
|
-
*/
|
|
31
|
-
loadTextureInfoAsync(context, textureInfo, assign) {
|
|
32
|
-
return GLTFLoader.LoadExtensionAsync(context, textureInfo, this.name, (extensionContext, extension) => {
|
|
33
|
-
return this._loader.loadTextureInfoAsync(context, textureInfo, (babylonTexture) => {
|
|
34
|
-
if (!(babylonTexture instanceof Texture)) {
|
|
35
|
-
throw new Error(`${extensionContext}: Texture type not supported`);
|
|
36
|
-
}
|
|
37
|
-
if (extension.offset) {
|
|
38
|
-
babylonTexture.uOffset = extension.offset[0];
|
|
39
|
-
babylonTexture.vOffset = extension.offset[1];
|
|
40
|
-
}
|
|
41
|
-
// Always rotate around the origin.
|
|
42
|
-
babylonTexture.uRotationCenter = 0;
|
|
43
|
-
babylonTexture.vRotationCenter = 0;
|
|
44
|
-
if (extension.rotation) {
|
|
45
|
-
babylonTexture.wAng = -extension.rotation;
|
|
46
|
-
}
|
|
47
|
-
if (extension.scale) {
|
|
48
|
-
babylonTexture.uScale = extension.scale[0];
|
|
49
|
-
babylonTexture.vScale = extension.scale[1];
|
|
50
|
-
}
|
|
51
|
-
if (extension.texCoord != undefined) {
|
|
52
|
-
babylonTexture.coordinatesIndex = extension.texCoord;
|
|
53
|
-
}
|
|
54
|
-
assign(babylonTexture);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
unregisterGLTFExtension(NAME);
|
|
60
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_texture_transform(loader));
|
|
61
|
-
|
|
62
|
-
export { KHR_texture_transform };
|
|
63
|
-
//# sourceMappingURL=KHR_texture_transform-DdsN6SA_.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_texture_transform-DdsN6SA_.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_texture_transform.js"],"sourcesContent":["import { Texture } from \"core/Materials/Textures/texture\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_texture_transform\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_transform/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_texture_transform {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadTextureInfoAsync(context, textureInfo, assign) {\n return GLTFLoader.LoadExtensionAsync(context, textureInfo, this.name, (extensionContext, extension) => {\n return this._loader.loadTextureInfoAsync(context, textureInfo, (babylonTexture) => {\n if (!(babylonTexture instanceof Texture)) {\n throw new Error(`${extensionContext}: Texture type not supported`);\n }\n if (extension.offset) {\n babylonTexture.uOffset = extension.offset[0];\n babylonTexture.vOffset = extension.offset[1];\n }\n // Always rotate around the origin.\n babylonTexture.uRotationCenter = 0;\n babylonTexture.vRotationCenter = 0;\n if (extension.rotation) {\n babylonTexture.wAng = -extension.rotation;\n }\n if (extension.scale) {\n babylonTexture.uScale = extension.scale[0];\n babylonTexture.vScale = extension.scale[1];\n }\n if (extension.texCoord != undefined) {\n babylonTexture.coordinatesIndex = extension.texCoord;\n }\n assign(babylonTexture);\n });\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_texture_transform(loader));\n//# sourceMappingURL=KHR_texture_transform.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,uBAAuB;AACpC;AACA;AACA;AACA;AACO,MAAM,qBAAqB,CAAC;AACnC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE;AACvD,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,gBAAgB,EAAE,SAAS,KAAK;AAC/G,YAAY,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,cAAc,KAAK;AAC/F,gBAAgB,IAAI,EAAE,cAAc,YAAY,OAAO,CAAC,EAAE;AAC1D,oBAAoB,MAAM,IAAI,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAC;AACtF;AACA,gBAAgB,IAAI,SAAS,CAAC,MAAM,EAAE;AACtC,oBAAoB,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;AAChE,oBAAoB,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;AAChE;AACA;AACA,gBAAgB,cAAc,CAAC,eAAe,GAAG,CAAC;AAClD,gBAAgB,cAAc,CAAC,eAAe,GAAG,CAAC;AAClD,gBAAgB,IAAI,SAAS,CAAC,QAAQ,EAAE;AACxC,oBAAoB,cAAc,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,QAAQ;AAC7D;AACA,gBAAgB,IAAI,SAAS,CAAC,KAAK,EAAE;AACrC,oBAAoB,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9D,oBAAoB,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9D;AACA,gBAAgB,IAAI,SAAS,CAAC,QAAQ,IAAI,SAAS,EAAE;AACrD,oBAAoB,cAAc,CAAC,gBAAgB,GAAG,SAAS,CAAC,QAAQ;AACxE;AACA,gBAAgB,MAAM,CAAC,cAAc,CAAC;AACtC,aAAa,CAAC;AACd,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,qBAAqB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aQ as s,aR as t}from"./index-DRbhrB0j.esm.min.js";const o="KHR_xmp_json_ld";class e{constructor(s){this.name=o,this.order=100,this._loader=s,this.enabled=this._loader.isExtensionUsed(o)}dispose(){this._loader=null}onLoading(){if(null===this._loader.rootBabylonMesh)return;const s=this._loader.gltf.extensions?.KHR_xmp_json_ld,t=this._loader.gltf.asset?.extensions?.KHR_xmp_json_ld;if(s&&t){const o=+t.packet;s.packets&&o<s.packets.length&&(this._loader.rootBabylonMesh.metadata=this._loader.rootBabylonMesh.metadata||{},this._loader.rootBabylonMesh.metadata.xmp=s.packets[o])}}}s(o),t(o,!0,(s=>new e(s)));export{e as KHR_xmp_json_ld};
|
|
2
|
-
//# sourceMappingURL=KHR_xmp_json_ld-DhFD64vh.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_xmp_json_ld-DhFD64vh.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_xmp_json_ld.js"],"sourcesContent":["import { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_xmp_json_ld\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_xmp_json_ld/README.md)\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_xmp_json_ld {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 100;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * Called after the loader state changes to LOADING.\n */\n onLoading() {\n if (this._loader.rootBabylonMesh === null) {\n return;\n }\n const xmp_gltf = this._loader.gltf.extensions?.KHR_xmp_json_ld;\n const xmp_node = this._loader.gltf.asset?.extensions?.KHR_xmp_json_ld;\n if (xmp_gltf && xmp_node) {\n const packet = +xmp_node.packet;\n if (xmp_gltf.packets && packet < xmp_gltf.packets.length) {\n this._loader.rootBabylonMesh.metadata = this._loader.rootBabylonMesh.metadata || {};\n this._loader.rootBabylonMesh.metadata.xmp = xmp_gltf.packets[packet];\n }\n }\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_xmp_json_ld(loader));\n//# sourceMappingURL=KHR_xmp_json_ld.js.map"],"names":["NAME","KHR_xmp_json_ld","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","onLoading","rootBabylonMesh","xmp_gltf","gltf","extensions","xmp_node","asset","packet","packets","length","metadata","xmp","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"yDACA,MAAMA,EAAO,kBAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EACpD,CAEI,OAAAU,GACIN,KAAKG,QAAU,IACvB,CAII,SAAAI,GACI,GAAqC,OAAjCP,KAAKG,QAAQK,gBACb,OAEJ,MAAMC,EAAWT,KAAKG,QAAQO,KAAKC,YAAYd,gBACzCe,EAAWZ,KAAKG,QAAQO,KAAKG,OAAOF,YAAYd,gBACtD,GAAIY,GAAYG,EAAU,CACtB,MAAME,GAAUF,EAASE,OACrBL,EAASM,SAAWD,EAASL,EAASM,QAAQC,SAC9ChB,KAAKG,QAAQK,gBAAgBS,SAAWjB,KAAKG,QAAQK,gBAAgBS,UAAY,CAAE,EACnFjB,KAAKG,QAAQK,gBAAgBS,SAASC,IAAMT,EAASM,QAAQD,GAE7E,CACA,EAEAK,EAAwBvB,GACxBwB,EAAsBxB,GAAM,GAAOG,GAAW,IAAIF,EAAgBE"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { aQ as unregisterGLTFExtension, aR as registerGLTFExtension } from './index-Cw2FZpYY.esm.js';
|
|
2
|
-
|
|
3
|
-
const NAME = "KHR_xmp_json_ld";
|
|
4
|
-
/**
|
|
5
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_xmp_json_ld/README.md)
|
|
6
|
-
* @since 5.0.0
|
|
7
|
-
*/
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
9
|
-
class KHR_xmp_json_ld {
|
|
10
|
-
/**
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
constructor(loader) {
|
|
14
|
-
/**
|
|
15
|
-
* The name of this extension.
|
|
16
|
-
*/
|
|
17
|
-
this.name = NAME;
|
|
18
|
-
/**
|
|
19
|
-
* Defines a number that determines the order the extensions are applied.
|
|
20
|
-
*/
|
|
21
|
-
this.order = 100;
|
|
22
|
-
this._loader = loader;
|
|
23
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
24
|
-
}
|
|
25
|
-
/** @internal */
|
|
26
|
-
dispose() {
|
|
27
|
-
this._loader = null;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Called after the loader state changes to LOADING.
|
|
31
|
-
*/
|
|
32
|
-
onLoading() {
|
|
33
|
-
if (this._loader.rootBabylonMesh === null) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const xmp_gltf = this._loader.gltf.extensions?.KHR_xmp_json_ld;
|
|
37
|
-
const xmp_node = this._loader.gltf.asset?.extensions?.KHR_xmp_json_ld;
|
|
38
|
-
if (xmp_gltf && xmp_node) {
|
|
39
|
-
const packet = +xmp_node.packet;
|
|
40
|
-
if (xmp_gltf.packets && packet < xmp_gltf.packets.length) {
|
|
41
|
-
this._loader.rootBabylonMesh.metadata = this._loader.rootBabylonMesh.metadata || {};
|
|
42
|
-
this._loader.rootBabylonMesh.metadata.xmp = xmp_gltf.packets[packet];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
unregisterGLTFExtension(NAME);
|
|
48
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_xmp_json_ld(loader));
|
|
49
|
-
|
|
50
|
-
export { KHR_xmp_json_ld };
|
|
51
|
-
//# sourceMappingURL=KHR_xmp_json_ld-sTn6N13E.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_xmp_json_ld-sTn6N13E.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_xmp_json_ld.js"],"sourcesContent":["import { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_xmp_json_ld\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_xmp_json_ld/README.md)\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_xmp_json_ld {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n /**\n * Defines a number that determines the order the extensions are applied.\n */\n this.order = 100;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * Called after the loader state changes to LOADING.\n */\n onLoading() {\n if (this._loader.rootBabylonMesh === null) {\n return;\n }\n const xmp_gltf = this._loader.gltf.extensions?.KHR_xmp_json_ld;\n const xmp_node = this._loader.gltf.asset?.extensions?.KHR_xmp_json_ld;\n if (xmp_gltf && xmp_node) {\n const packet = +xmp_node.packet;\n if (xmp_gltf.packets && packet < xmp_gltf.packets.length) {\n this._loader.rootBabylonMesh.metadata = this._loader.rootBabylonMesh.metadata || {};\n this._loader.rootBabylonMesh.metadata.xmp = xmp_gltf.packets[packet];\n }\n }\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_xmp_json_ld(loader));\n//# sourceMappingURL=KHR_xmp_json_ld.js.map"],"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACO,MAAM,eAAe,CAAC;AAC7B;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,SAAS,GAAG;AAChB,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,KAAK,IAAI,EAAE;AACnD,YAAY;AACZ;AACA,QAAQ,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe;AACtE,QAAQ,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,eAAe;AAC7E,QAAQ,IAAI,QAAQ,IAAI,QAAQ,EAAE;AAClC,YAAY,MAAM,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM;AAC3C,YAAY,IAAI,QAAQ,CAAC,OAAO,IAAI,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE;AACtE,gBAAgB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,IAAI,EAAE;AACnG,gBAAgB,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;AACpF;AACA;AACA;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{bD as e,R as t,A as i,aV as n,v as o,E as s,L as a,T as r,_ as u,al as d,bE as l,a5 as h,o as c,aQ as _,aR as m}from"./index-DRbhrB0j.esm.min.js";import{A as p,G as g}from"./glTFLoader-3ZUBWawQ.esm.min.js";import"./audioEngine-FKYFzzDb.esm.min.js";import"./rawTexture-ByD8l28R.esm.min.js";import"./assetContainer-DDEska5G.esm.min.js";import"./glTFLoaderAnimation-C9g-SHaJ.esm.min.js";class f{constructor(e,t,i){this.frame=e,this.action=t,this.onlyOnce=i,this.isDone=!1}_clone(){return new f(this.frame,this.action,this.onlyOnce)}}class A{get loop(){return this._loop}set loop(e){e!==this._loop&&(this._loop=e,this.updateOptions({loop:e}))}get currentTime(){if(this._htmlAudioElement)return this._htmlAudioElement.currentTime;if(i.audioEngine?.audioContext&&(this.isPlaying||this.isPaused)){const e=this.isPaused?0:i.audioEngine.audioContext.currentTime-this._startTime;return this._currentTime+e}return 0}get spatialSound(){return this._spatialSound}set spatialSound(e){if(e==this._spatialSound)return;const t=this.isPlaying;this.pause(),e?(this._spatialSound=e,this._updateSpatialParameters()):this._disableSpatialSound(),t&&this.play()}constructor(e,t,u,d=null,l){if(this.autoplay=!1,this._loop=!1,this.useCustomAttenuation=!1,this.isPlaying=!1,this.isPaused=!1,this.refDistance=1,this.rolloffFactor=1,this.maxDistance=100,this.distanceModel="linear",this.metadata=null,this.onEndedObservable=new n,this._spatialSound=!1,this._panningModel="equalpower",this._playbackRate=1,this._streaming=!1,this._startTime=0,this._currentTime=0,this._position=o.Zero(),this._localDirection=new o(1,0,0),this._volume=1,this._isReadyToPlay=!1,this._isDirectional=!1,this._coneInnerAngle=360,this._coneOuterAngle=360,this._coneOuterGain=0,this._isOutputConnected=!1,this._urlType="Unknown",this.name=e,u=u||s.LastCreatedScene)if(this._scene=u,A._SceneComponentInitialization(u),this._readyToPlayCallback=d,this._customAttenuationFunction=(e,t,i,n,o)=>t<i?e*(1-t/i):0,l&&(this.autoplay=l.autoplay||!1,this._loop=l.loop||!1,void 0!==l.volume&&(this._volume=l.volume),this._spatialSound=l.spatialSound??!1,this.maxDistance=l.maxDistance??100,this.useCustomAttenuation=l.useCustomAttenuation??!1,this.rolloffFactor=l.rolloffFactor||1,this.refDistance=l.refDistance||1,this.distanceModel=l.distanceModel||"linear",this._playbackRate=l.playbackRate||1,this._streaming=l.streaming??!1,this._length=l.length,this._offset=l.offset),i.audioEngine?.canUseWebAudio&&i.audioEngine.audioContext){this._soundGain=i.audioEngine.audioContext.createGain(),this._soundGain.gain.value=this._volume,this._inputAudioNode=this._soundGain,this._outputAudioNode=this._soundGain,this._spatialSound&&this._createSpatialParameters(),this._scene.mainSoundTrack.addSound(this);let e=!0;if(t)try{"string"==typeof t?(this._urlType="String",this._url=t):t instanceof ArrayBuffer?this._urlType="ArrayBuffer":t instanceof HTMLMediaElement?this._urlType="MediaElement":t instanceof MediaStream?this._urlType="MediaStream":t instanceof AudioBuffer?this._urlType="AudioBuffer":Array.isArray(t)&&(this._urlType="Array");let n=[],o=!1;switch(this._urlType){case"MediaElement":this._streaming=!0,this._isReadyToPlay=!0,this._streamingSource=i.audioEngine.audioContext.createMediaElementSource(t),this.autoplay&&this.play(0,this._offset,this._length),this._readyToPlayCallback&&this._readyToPlayCallback();break;case"MediaStream":this._streaming=!0,this._isReadyToPlay=!0,this._streamingSource=i.audioEngine.audioContext.createMediaStreamSource(t),this.autoplay&&this.play(0,this._offset,this._length),this._readyToPlayCallback&&this._readyToPlayCallback();break;case"ArrayBuffer":t.byteLength>0&&(o=!0,this._soundLoaded(t));break;case"AudioBuffer":this._audioBufferLoaded(t);break;case"String":n.push(t);case"Array":0===n.length&&(n=t);for(let e=0;e<n.length;e++){const t=n[e];if(o=l&&l.skipCodecCheck||-1!==t.indexOf(".mp3",t.length-4)&&i.audioEngine.isMP3supported||-1!==t.indexOf(".ogg",t.length-4)&&i.audioEngine.isOGGsupported||-1!==t.indexOf(".wav",t.length-4)||-1!==t.indexOf(".m4a",t.length-4)||-1!==t.indexOf(".mp4",t.length-4)||-1!==t.indexOf("blob:"),o){this._streaming?(this._htmlAudioElement=new Audio(t),this._htmlAudioElement.controls=!1,this._htmlAudioElement.loop=this.loop,r.SetCorsBehavior(t,this._htmlAudioElement),this._htmlAudioElement.preload="auto",this._htmlAudioElement.addEventListener("canplaythrough",(()=>{this._isReadyToPlay=!0,this.autoplay&&this.play(0,this._offset,this._length),this._readyToPlayCallback&&this._readyToPlayCallback()}),{once:!0}),document.body.appendChild(this._htmlAudioElement),this._htmlAudioElement.load()):this._scene._loadFile(t,(e=>{this._soundLoaded(e)}),void 0,!0,!0,(e=>{e&&a.Error("XHR "+e.status+" error on: "+t+"."),a.Error("Sound creation aborted."),this._scene.mainSoundTrack.removeSound(this)}));break}}break;default:e=!1}e?o||(this._isReadyToPlay=!0,this._readyToPlayCallback&&setTimeout((()=>{this._readyToPlayCallback&&this._readyToPlayCallback()}),1e3)):a.Error("Parameter must be a URL to the sound, an Array of URLs (.mp3 & .ogg) or an ArrayBuffer of the sound.")}catch(e){a.Error("Unexpected error. Sound creation aborted."),this._scene.mainSoundTrack.removeSound(this)}}else this._scene.mainSoundTrack.addSound(this),i.audioEngine&&!i.audioEngine.WarnedWebAudioUnsupported&&(a.Error("Web Audio is not supported by your browser."),i.audioEngine.WarnedWebAudioUnsupported=!0),this._readyToPlayCallback&&setTimeout((()=>{this._readyToPlayCallback&&this._readyToPlayCallback()}),1e3)}dispose(){i.audioEngine?.canUseWebAudio&&(this.isPlaying&&this.stop(),this._isReadyToPlay=!1,-1===this.soundTrackId?this._scene.mainSoundTrack.removeSound(this):this._scene.soundTracks&&this._scene.soundTracks[this.soundTrackId].removeSound(this),this._soundGain&&(this._soundGain.disconnect(),this._soundGain=null),this._soundPanner&&(this._soundPanner.disconnect(),this._soundPanner=null),this._soundSource&&(this._soundSource.disconnect(),this._soundSource=null),this._audioBuffer=null,this._htmlAudioElement&&(this._htmlAudioElement.pause(),this._htmlAudioElement.src="",document.body.removeChild(this._htmlAudioElement),this._htmlAudioElement=null),this._streamingSource&&(this._streamingSource.disconnect(),this._streamingSource=null),this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._connectedTransformNode=null),this._clearTimeoutsAndObservers())}isReady(){return this._isReadyToPlay}getClassName(){return"Sound"}_audioBufferLoaded(e){i.audioEngine?.audioContext&&(this._audioBuffer=e,this._isReadyToPlay=!0,this.autoplay&&this.play(0,this._offset,this._length),this._readyToPlayCallback&&this._readyToPlayCallback())}_soundLoaded(e){i.audioEngine?.audioContext&&i.audioEngine.audioContext.decodeAudioData(e,(e=>{this._audioBufferLoaded(e)}),(e=>{a.Error("Error while decoding audio data for: "+this.name+" / Error: "+e)}))}setAudioBuffer(e){i.audioEngine?.canUseWebAudio&&(this._audioBuffer=e,this._isReadyToPlay=!0)}updateOptions(e){e&&(this.loop=e.loop??this.loop,this.maxDistance=e.maxDistance??this.maxDistance,this.useCustomAttenuation=e.useCustomAttenuation??this.useCustomAttenuation,this.rolloffFactor=e.rolloffFactor??this.rolloffFactor,this.refDistance=e.refDistance??this.refDistance,this.distanceModel=e.distanceModel??this.distanceModel,this._playbackRate=e.playbackRate??this._playbackRate,this._length=e.length??void 0,this.spatialSound=e.spatialSound??this._spatialSound,this._setOffset(e.offset??void 0),this.setVolume(e.volume??this._volume),this._updateSpatialParameters(),this.isPlaying&&(this._streaming&&this._htmlAudioElement?(this._htmlAudioElement.playbackRate=this._playbackRate,this._htmlAudioElement.loop!==this.loop&&(this._htmlAudioElement.loop=this.loop)):this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate,this._soundSource.loop!==this.loop&&(this._soundSource.loop=this.loop),void 0!==this._offset&&this._soundSource.loopStart!==this._offset&&(this._soundSource.loopStart=this._offset),void 0!==this._length&&this._length!==this._soundSource.loopEnd&&(this._soundSource.loopEnd=(0|this._offset)+this._length))))}_createSpatialParameters(){i.audioEngine?.canUseWebAudio&&i.audioEngine.audioContext&&(this._scene.headphone&&(this._panningModel="HRTF"),this._soundPanner=this._soundPanner??i.audioEngine.audioContext.createPanner(),this._soundPanner&&this._outputAudioNode&&(this._updateSpatialParameters(),this._soundPanner.connect(this._outputAudioNode),this._inputAudioNode=this._soundPanner))}_disableSpatialSound(){this._spatialSound&&(this._inputAudioNode=this._soundGain,this._soundPanner?.disconnect(),this._soundPanner=null,this._spatialSound=!1)}_updateSpatialParameters(){this._spatialSound&&(this._soundPanner?this.useCustomAttenuation?(this._soundPanner.distanceModel="linear",this._soundPanner.maxDistance=Number.MAX_VALUE,this._soundPanner.refDistance=1,this._soundPanner.rolloffFactor=1,this._soundPanner.panningModel=this._panningModel):(this._soundPanner.distanceModel=this.distanceModel,this._soundPanner.maxDistance=this.maxDistance,this._soundPanner.refDistance=this.refDistance,this._soundPanner.rolloffFactor=this.rolloffFactor,this._soundPanner.panningModel=this._panningModel):this._createSpatialParameters())}switchPanningModelToHRTF(){this._panningModel="HRTF",this._switchPanningModel()}switchPanningModelToEqualPower(){this._panningModel="equalpower",this._switchPanningModel()}_switchPanningModel(){i.audioEngine?.canUseWebAudio&&this._spatialSound&&this._soundPanner&&(this._soundPanner.panningModel=this._panningModel)}connectToSoundTrackAudioNode(e){i.audioEngine?.canUseWebAudio&&this._outputAudioNode&&(this._isOutputConnected&&this._outputAudioNode.disconnect(),this._outputAudioNode.connect(e),this._isOutputConnected=!0)}setDirectionalCone(e,t,i){t<e?a.Error("setDirectionalCone(): outer angle of the cone must be superior or equal to the inner angle."):(this._coneInnerAngle=e,this._coneOuterAngle=t,this._coneOuterGain=i,this._isDirectional=!0,this.isPlaying&&this.loop&&(this.stop(),this.play(0,this._offset,this._length)))}get directionalConeInnerAngle(){return this._coneInnerAngle}set directionalConeInnerAngle(e){if(e!=this._coneInnerAngle){if(this._coneOuterAngle<e)return void a.Error("directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneInnerAngle=e,i.audioEngine?.canUseWebAudio&&this._spatialSound&&this._soundPanner&&(this._soundPanner.coneInnerAngle=this._coneInnerAngle)}}get directionalConeOuterAngle(){return this._coneOuterAngle}set directionalConeOuterAngle(e){if(e!=this._coneOuterAngle){if(e<this._coneInnerAngle)return void a.Error("directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneOuterAngle=e,i.audioEngine?.canUseWebAudio&&this._spatialSound&&this._soundPanner&&(this._soundPanner.coneOuterAngle=this._coneOuterAngle)}}setPosition(e){e.equals(this._position)||(this._position.copyFrom(e),i.audioEngine?.canUseWebAudio&&this._spatialSound&&this._soundPanner&&!isNaN(this._position.x)&&!isNaN(this._position.y)&&!isNaN(this._position.z)&&(this._soundPanner.positionX.value=this._position.x,this._soundPanner.positionY.value=this._position.y,this._soundPanner.positionZ.value=this._position.z))}setLocalDirectionToMesh(e){this._localDirection=e,i.audioEngine?.canUseWebAudio&&this._connectedTransformNode&&this.isPlaying&&this._updateDirection()}_updateDirection(){if(!this._connectedTransformNode||!this._soundPanner)return;const e=this._connectedTransformNode.getWorldMatrix(),t=o.TransformNormal(this._localDirection,e);t.normalize(),this._soundPanner.orientationX.value=t.x,this._soundPanner.orientationY.value=t.y,this._soundPanner.orientationZ.value=t.z}updateDistanceFromListener(){if(i.audioEngine?.canUseWebAudio&&this._connectedTransformNode&&this.useCustomAttenuation&&this._soundGain&&this._scene.activeCamera){const e=this._scene.audioListenerPositionProvider?this._connectedTransformNode.position.subtract(this._scene.audioListenerPositionProvider()).length():this._connectedTransformNode.getDistanceToCamera(this._scene.activeCamera);this._soundGain.gain.value=this._customAttenuationFunction(this._volume,e,this.maxDistance,this.refDistance,this.rolloffFactor)}}setAttenuationFunction(e){this._customAttenuationFunction=e}play(e,t,n){if(this._isReadyToPlay&&this._scene.audioEnabled&&i.audioEngine?.audioContext)try{this._clearTimeoutsAndObservers();let o=e?i.audioEngine?.audioContext.currentTime+e:i.audioEngine?.audioContext.currentTime;if(this._soundSource&&this._streamingSource||this._spatialSound&&this._soundPanner&&(isNaN(this._position.x)||isNaN(this._position.y)||isNaN(this._position.z)||(this._soundPanner.positionX.value=this._position.x,this._soundPanner.positionY.value=this._position.y,this._soundPanner.positionZ.value=this._position.z),this._isDirectional&&(this._soundPanner.coneInnerAngle=this._coneInnerAngle,this._soundPanner.coneOuterAngle=this._coneOuterAngle,this._soundPanner.coneOuterGain=this._coneOuterGain,this._connectedTransformNode?this._updateDirection():this._soundPanner.setOrientation(this._localDirection.x,this._localDirection.y,this._localDirection.z))),this._streaming){if(!this._streamingSource&&this._htmlAudioElement&&(this._streamingSource=i.audioEngine.audioContext.createMediaElementSource(this._htmlAudioElement),this._htmlAudioElement.onended=()=>{this._onended()},this._htmlAudioElement.playbackRate=this._playbackRate),this._streamingSource&&(this._streamingSource.disconnect(),this._inputAudioNode&&this._streamingSource.connect(this._inputAudioNode)),this._htmlAudioElement){const e=()=>{if(i.audioEngine?.unlocked){if(!this._htmlAudioElement)return;this._htmlAudioElement.currentTime=t??0;const n=this._htmlAudioElement.play();void 0!==n&&n.catch((()=>{i.audioEngine?.lock(),(this.loop||this.autoplay)&&(this._audioUnlockedObserver=i.audioEngine?.onAudioUnlockedObservable.addOnce((()=>{e()})))}))}else(this.loop||this.autoplay)&&(this._audioUnlockedObserver=i.audioEngine?.onAudioUnlockedObservable.addOnce((()=>{e()})))};e()}}else{const s=()=>{if(i.audioEngine?.audioContext){if(n=n||this._length,void 0!==t&&this._setOffset(t),this._soundSource){const e=this._soundSource;e.onended=()=>{e.disconnect()}}if(this._soundSource=i.audioEngine?.audioContext.createBufferSource(),this._soundSource&&this._inputAudioNode){this._soundSource.buffer=this._audioBuffer,this._soundSource.connect(this._inputAudioNode),this._soundSource.loop=this.loop,void 0!==t&&(this._soundSource.loopStart=t),void 0!==n&&(this._soundSource.loopEnd=(0|t)+n),this._soundSource.playbackRate.value=this._playbackRate,this._soundSource.onended=()=>{this._onended()},o=e?i.audioEngine?.audioContext.currentTime+e:i.audioEngine.audioContext.currentTime;const s=((this.isPaused?this.currentTime:0)+(this._offset??0))%this._soundSource.buffer.duration;this._soundSource.start(o,s,this.loop?void 0:n)}}};"suspended"===i.audioEngine?.audioContext.state?this._tryToPlayTimeout=setTimeout((()=>{"suspended"===i.audioEngine?.audioContext.state?(i.audioEngine.lock(),(this.loop||this.autoplay)&&(this._audioUnlockedObserver=i.audioEngine.onAudioUnlockedObservable.addOnce((()=>{s()})))):s()}),500):s()}this._startTime=o,this.isPlaying=!0,this.isPaused=!1}catch(e){a.Error("Error while trying to play audio: "+this.name+", "+e.message)}}_onended(){this.isPlaying=!1,this._startTime=0,this._currentTime=0,this.onended&&this.onended(),this.onEndedObservable.notifyObservers(this)}stop(e){if(this.isPlaying)if(this._clearTimeoutsAndObservers(),this._streaming)this._htmlAudioElement?(this._htmlAudioElement.pause(),this._htmlAudioElement.currentTime>0&&(this._htmlAudioElement.currentTime=0)):this._streamingSource?.disconnect(),this.isPlaying=!1;else if(i.audioEngine?.audioContext&&this._soundSource){const t=e?i.audioEngine.audioContext.currentTime+e:void 0;this._soundSource.onended=()=>{this.isPlaying=!1,this.isPaused=!1,this._startTime=0,this._currentTime=0,this._soundSource&&(this._soundSource.onended=()=>{}),this._onended()},this._soundSource.stop(t)}else this.isPlaying=!1;else this.isPaused&&(this.isPaused=!1,this._startTime=0,this._currentTime=0)}pause(){this.isPlaying&&(this._clearTimeoutsAndObservers(),this._streaming?(this._htmlAudioElement?this._htmlAudioElement.pause():this._streamingSource?.disconnect(),this.isPlaying=!1,this.isPaused=!0):i.audioEngine?.audioContext&&this._soundSource&&(this._soundSource.onended=()=>{},this._soundSource.stop(),this.isPlaying=!1,this.isPaused=!0,this._currentTime+=i.audioEngine.audioContext.currentTime-this._startTime))}setVolume(e,t){i.audioEngine?.canUseWebAudio&&this._soundGain&&(t&&i.audioEngine.audioContext?(this._soundGain.gain.cancelScheduledValues(i.audioEngine.audioContext.currentTime),this._soundGain.gain.setValueAtTime(this._soundGain.gain.value,i.audioEngine.audioContext.currentTime),this._soundGain.gain.linearRampToValueAtTime(e,i.audioEngine.audioContext.currentTime+t)):this._soundGain.gain.value=e),this._volume=e}setPlaybackRate(e){this._playbackRate=e,this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate))}getPlaybackRate(){return this._playbackRate}getVolume(){return this._volume}attachToMesh(e){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null),this._connectedTransformNode=e,this._spatialSound||(this._spatialSound=!0,this._createSpatialParameters(),this.isPlaying&&this.loop&&(this.stop(),this.play(0,this._offset,this._length))),this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode),this._registerFunc=e=>this._onRegisterAfterWorldMatrixUpdate(e),this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc)}detachFromMesh(){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null,this._connectedTransformNode=null)}_onRegisterAfterWorldMatrixUpdate(e){if(e.getBoundingInfo){const t=e.getBoundingInfo();this.setPosition(t.boundingSphere.centerWorld)}else this.setPosition(e.absolutePosition);i.audioEngine?.canUseWebAudio&&this._isDirectional&&this.isPlaying&&this._updateDirection()}clone(){if(this._streaming)return null;{const e=()=>{u((()=>this._isReadyToPlay),(()=>{i._audioBuffer=this.getAudioBuffer(),i._isReadyToPlay=!0,i.autoplay&&i.play(0,this._offset,this._length)}),void 0,300)},t={autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this._spatialSound,maxDistance:this.maxDistance,useCustomAttenuation:this.useCustomAttenuation,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel},i=new A(this.name+"_cloned",new ArrayBuffer(0),this._scene,null,t);return this.useCustomAttenuation&&i.setAttenuationFunction(this._customAttenuationFunction),i.setPosition(this._position),i.setPlaybackRate(this._playbackRate),e(),i}}getAudioBuffer(){return this._audioBuffer}getSoundSource(){return this._soundSource}getSoundGain(){return this._soundGain}serialize(){const e={name:this.name,url:this._url,autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this._spatialSound,maxDistance:this.maxDistance,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel,playbackRate:this._playbackRate,panningModel:this._panningModel,soundTrackId:this.soundTrackId,metadata:this.metadata};return this._spatialSound&&(this._connectedTransformNode&&(e.connectedMeshId=this._connectedTransformNode.id),e.position=this._position.asArray(),e.refDistance=this.refDistance,e.distanceModel=this.distanceModel,e.isDirectional=this._isDirectional,e.localDirectionToMesh=this._localDirection.asArray(),e.coneInnerAngle=this._coneInnerAngle,e.coneOuterAngle=this._coneOuterAngle,e.coneOuterGain=this._coneOuterGain),e}static Parse(e,t,i,n){const s=e.name;let a;a=e.url?i+e.url:i+s;const r={autoplay:e.autoplay,loop:e.loop,volume:e.volume,spatialSound:e.spatialSound,maxDistance:e.maxDistance,rolloffFactor:e.rolloffFactor,refDistance:e.refDistance,distanceModel:e.distanceModel,playbackRate:e.playbackRate};let d;if(n){const e=()=>{u((()=>n._isReadyToPlay),(()=>{d._audioBuffer=n.getAudioBuffer(),d._isReadyToPlay=!0,d.autoplay&&d.play(0,d._offset,d._length)}),void 0,300)};d=new A(s,new ArrayBuffer(0),t,null,r),e()}else d=new A(s,a,t,(()=>{t.removePendingData(d)}),r),t.addPendingData(d);if(e.position){const t=o.FromArray(e.position);d.setPosition(t)}if(e.isDirectional&&(d.setDirectionalCone(e.coneInnerAngle||360,e.coneOuterAngle||360,e.coneOuterGain||0),e.localDirectionToMesh)){const t=o.FromArray(e.localDirectionToMesh);d.setLocalDirectionToMesh(t)}if(e.connectedMeshId){const i=t.getMeshById(e.connectedMeshId);i&&d.attachToMesh(i)}return e.metadata&&(d.metadata=e.metadata),d}_setOffset(e){this._offset!==e&&(this.isPaused&&(this.stop(),this.isPaused=!1),this._offset=e)}_clearTimeoutsAndObservers(){this._tryToPlayTimeout&&(clearTimeout(this._tryToPlayTimeout),this._tryToPlayTimeout=null),this._audioUnlockedObserver&&(i.audioEngine?.onAudioUnlockedObservable.remove(this._audioUnlockedObserver),this._audioUnlockedObserver=null)}}A._SceneComponentInitialization=t=>{throw e("AudioSceneComponent")},t("BABYLON.Sound",A);class y{constructor(e,t,i){if(this.loop=!1,this._coneInnerAngle=360,this._coneOuterAngle=360,this._volume=1,this.isPlaying=!1,this.isPaused=!1,this._sounds=[],this._weights=[],t.length!==i.length)throw new Error("Sounds length does not equal weights length");this.loop=e,this._weights=i;let n=0;for(const e of i)n+=e;const o=n>0?1/n:0;for(let e=0;e<this._weights.length;e++)this._weights[e]*=o;this._sounds=t;for(const e of this._sounds)e.onEndedObservable.add((()=>{this._onended()}))}get directionalConeInnerAngle(){return this._coneInnerAngle}set directionalConeInnerAngle(e){if(e!==this._coneInnerAngle){if(this._coneOuterAngle<e)return void a.Error("directionalConeInnerAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneInnerAngle=e;for(const t of this._sounds)t.directionalConeInnerAngle=e}}get directionalConeOuterAngle(){return this._coneOuterAngle}set directionalConeOuterAngle(e){if(e!==this._coneOuterAngle){if(e<this._coneInnerAngle)return void a.Error("directionalConeOuterAngle: outer angle of the cone must be superior or equal to the inner angle.");this._coneOuterAngle=e;for(const t of this._sounds)t.directionalConeOuterAngle=e}}get volume(){return this._volume}set volume(e){if(e!==this._volume)for(const t of this._sounds)t.setVolume(e)}_onended(){void 0!==this._currentIndex&&(this._sounds[this._currentIndex].autoplay=!1),this.loop&&this.isPlaying?this.play():this.isPlaying=!1}pause(){this.isPlaying&&(this.isPaused=!0,void 0!==this._currentIndex&&this._sounds[this._currentIndex].pause())}stop(){this.isPlaying=!1,void 0!==this._currentIndex&&this._sounds[this._currentIndex].stop()}play(e){if(!this.isPaused){this.stop();const e=Math.random();let t=0;for(let i=0;i<this._weights.length;i++)if(t+=this._weights[i],e<=t){this._currentIndex=i;break}}const t=this._sounds[this._currentIndex??0];t.isReady()?t.play(0,this.isPaused?void 0:e):t.autoplay=!0,this.isPlaying=!0,this.isPaused=!1}}class T{constructor(e,t={}){this.id=-1,this._isInitialized=!1,(e=e||s.LastCreatedScene)&&(this._scene=e,this.soundCollection=[],this._options=t,!this._options.mainTrack&&this._scene.soundTracks&&(this._scene.soundTracks.push(this),this.id=this._scene.soundTracks.length-1))}_initializeSoundTrackAudioGraph(){i.audioEngine?.canUseWebAudio&&i.audioEngine.audioContext&&(this._outputAudioNode=i.audioEngine.audioContext.createGain(),this._outputAudioNode.connect(i.audioEngine.masterGain),this._options&&this._options.volume&&(this._outputAudioNode.gain.value=this._options.volume),this._isInitialized=!0)}dispose(){if(i.audioEngine&&i.audioEngine.canUseWebAudio){for(this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas();this.soundCollection.length;)this.soundCollection[0].dispose();this._outputAudioNode&&this._outputAudioNode.disconnect(),this._outputAudioNode=null}}addSound(e){this._isInitialized||this._initializeSoundTrackAudioGraph(),i.audioEngine?.canUseWebAudio&&this._outputAudioNode&&e.connectToSoundTrackAudioNode(this._outputAudioNode),void 0!==e.soundTrackId&&(-1===e.soundTrackId?this._scene.mainSoundTrack.removeSound(e):this._scene.soundTracks&&this._scene.soundTracks[e.soundTrackId].removeSound(e)),this.soundCollection.push(e),e.soundTrackId=this.id}removeSound(e){const t=this.soundCollection.indexOf(e);-1!==t&&this.soundCollection.splice(t,1)}setVolume(e){i.audioEngine?.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.gain.value=e)}switchPanningModelToHRTF(){if(i.audioEngine?.canUseWebAudio)for(let e=0;e<this.soundCollection.length;e++)this.soundCollection[e].switchPanningModelToHRTF()}switchPanningModelToEqualPower(){if(i.audioEngine?.canUseWebAudio)for(let e=0;e<this.soundCollection.length;e++)this.soundCollection[e].switchPanningModelToEqualPower()}connectToAnalyser(e){this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas(),this._connectedAnalyser=e,i.audioEngine?.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.disconnect(),this._connectedAnalyser.connectAudioNodes(this._outputAudioNode,i.audioEngine.masterGain))}}Object.defineProperty(d.prototype,"mainSoundTrack",{get:function(){let e=this._getComponent(l.NAME_AUDIO);return e||(e=new P(this),this._addComponent(e)),this._mainSoundTrack||(this._mainSoundTrack=new T(this,{mainTrack:!0})),this._mainSoundTrack},enumerable:!0,configurable:!0}),d.prototype.getSoundByName=function(e){let t;for(t=0;t<this.mainSoundTrack.soundCollection.length;t++)if(this.mainSoundTrack.soundCollection[t].name===e)return this.mainSoundTrack.soundCollection[t];if(this.soundTracks)for(let i=0;i<this.soundTracks.length;i++)for(t=0;t<this.soundTracks[i].soundCollection.length;t++)if(this.soundTracks[i].soundCollection[t].name===e)return this.soundTracks[i].soundCollection[t];return null},Object.defineProperty(d.prototype,"audioEnabled",{get:function(){let e=this._getComponent(l.NAME_AUDIO);return e||(e=new P(this),this._addComponent(e)),e.audioEnabled},set:function(e){let t=this._getComponent(l.NAME_AUDIO);t||(t=new P(this),this._addComponent(t)),e?t.enableAudio():t.disableAudio()},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"headphone",{get:function(){let e=this._getComponent(l.NAME_AUDIO);return e||(e=new P(this),this._addComponent(e)),e.headphone},set:function(e){let t=this._getComponent(l.NAME_AUDIO);t||(t=new P(this),this._addComponent(t)),e?t.switchAudioModeForHeadphones():t.switchAudioModeForNormalSpeakers()},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"audioListenerPositionProvider",{get:function(){let e=this._getComponent(l.NAME_AUDIO);return e||(e=new P(this),this._addComponent(e)),e.audioListenerPositionProvider},set:function(e){let t=this._getComponent(l.NAME_AUDIO);if(t||(t=new P(this),this._addComponent(t)),e&&"function"!=typeof e)throw new Error("The value passed to [Scene.audioListenerPositionProvider] must be a function that returns a Vector3");t.audioListenerPositionProvider=e},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"audioListenerRotationProvider",{get:function(){let e=this._getComponent(l.NAME_AUDIO);return e||(e=new P(this),this._addComponent(e)),e.audioListenerRotationProvider},set:function(e){let t=this._getComponent(l.NAME_AUDIO);if(t||(t=new P(this),this._addComponent(t)),e&&"function"!=typeof e)throw new Error("The value passed to [Scene.audioListenerRotationProvider] must be a function that returns a Vector3");t.audioListenerRotationProvider=e},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"audioPositioningRefreshRate",{get:function(){let e=this._getComponent(l.NAME_AUDIO);return e||(e=new P(this),this._addComponent(e)),e.audioPositioningRefreshRate},set:function(e){let t=this._getComponent(l.NAME_AUDIO);t||(t=new P(this),this._addComponent(t)),t.audioPositioningRefreshRate=e},enumerable:!0,configurable:!0});class P{get audioEnabled(){return this._audioEnabled}get headphone(){return this._headphone}constructor(e){this.name=l.NAME_AUDIO,this._audioEnabled=!0,this._headphone=!1,this.audioPositioningRefreshRate=500,this.audioListenerPositionProvider=null,this.audioListenerRotationProvider=null,this._cachedCameraDirection=new o,this._cachedCameraPosition=new o,this._lastCheck=0,this._invertMatrixTemp=new h,this._cameraDirectionTemp=new o,(e=e||s.LastCreatedScene)&&(this.scene=e,e.soundTracks=[],e.sounds=[])}register(){this.scene._afterRenderStage.registerStep(l.STEP_AFTERRENDER_AUDIO,this,this._afterRender)}rebuild(){}serialize(e){if(e.sounds=[],this.scene.soundTracks)for(let t=0;t<this.scene.soundTracks.length;t++){const i=this.scene.soundTracks[t];for(let t=0;t<i.soundCollection.length;t++)e.sounds.push(i.soundCollection[t].serialize())}}addFromContainer(e){e.sounds&&e.sounds.forEach((e=>{e.play(),e.autoplay=!0,this.scene.mainSoundTrack.addSound(e)}))}removeFromContainer(e,t=!1){e.sounds&&e.sounds.forEach((e=>{e.stop(),e.autoplay=!1,this.scene.mainSoundTrack.removeSound(e),t&&e.dispose()}))}dispose(){const e=this.scene;if(e._mainSoundTrack&&e.mainSoundTrack.dispose(),e.soundTracks)for(let t=0;t<e.soundTracks.length;t++)e.soundTracks[t].dispose()}disableAudio(){const e=this.scene;let t;for(this._audioEnabled=!1,i.audioEngine&&i.audioEngine.audioContext&&i.audioEngine.audioContext.suspend(),t=0;t<e.mainSoundTrack.soundCollection.length;t++)e.mainSoundTrack.soundCollection[t].pause();if(e.soundTracks)for(t=0;t<e.soundTracks.length;t++)for(let i=0;i<e.soundTracks[t].soundCollection.length;i++)e.soundTracks[t].soundCollection[i].pause()}enableAudio(){const e=this.scene;let t;for(this._audioEnabled=!0,i.audioEngine&&i.audioEngine.audioContext&&i.audioEngine.audioContext.resume(),t=0;t<e.mainSoundTrack.soundCollection.length;t++)e.mainSoundTrack.soundCollection[t].isPaused&&e.mainSoundTrack.soundCollection[t].play();if(e.soundTracks)for(t=0;t<e.soundTracks.length;t++)for(let i=0;i<e.soundTracks[t].soundCollection.length;i++)e.soundTracks[t].soundCollection[i].isPaused&&e.soundTracks[t].soundCollection[i].play()}switchAudioModeForHeadphones(){const e=this.scene;if(this._headphone=!0,e.mainSoundTrack.switchPanningModelToHRTF(),e.soundTracks)for(let t=0;t<e.soundTracks.length;t++)e.soundTracks[t].switchPanningModelToHRTF()}switchAudioModeForNormalSpeakers(){const e=this.scene;if(this._headphone=!1,e.mainSoundTrack.switchPanningModelToEqualPower(),e.soundTracks)for(let t=0;t<e.soundTracks.length;t++)e.soundTracks[t].switchPanningModelToEqualPower()}_afterRender(){const e=c.Now;if(this._lastCheck&&e-this._lastCheck<this.audioPositioningRefreshRate)return;this._lastCheck=e;const t=this.scene;if(!this._audioEnabled||!t._mainSoundTrack||!t.soundTracks||0===t._mainSoundTrack.soundCollection.length&&1===t.soundTracks.length)return;const n=i.audioEngine;if(n&&n.audioContext){let e,i=t.activeCamera;if(t.activeCameras&&t.activeCameras.length>0&&(i=t.activeCameras[0]),this.audioListenerPositionProvider){const e=this.audioListenerPositionProvider();n.audioContext.listener.setPosition(e.x||0,e.y||0,e.z||0)}else i?this._cachedCameraPosition.equals(i.globalPosition)||(this._cachedCameraPosition.copyFrom(i.globalPosition),n.audioContext.listener.setPosition(i.globalPosition.x,i.globalPosition.y,i.globalPosition.z)):n.audioContext.listener.setPosition(0,0,0);if(this.audioListenerRotationProvider){const e=this.audioListenerRotationProvider();n.audioContext.listener.setOrientation(e.x||0,e.y||0,e.z||0,0,1,0)}else i?(i.rigCameras&&i.rigCameras.length>0&&(i=i.rigCameras[0]),i.getViewMatrix().invertToRef(this._invertMatrixTemp),o.TransformNormalToRef(P._CameraDirection,this._invertMatrixTemp,this._cameraDirectionTemp),this._cameraDirectionTemp.normalize(),isNaN(this._cameraDirectionTemp.x)||isNaN(this._cameraDirectionTemp.y)||isNaN(this._cameraDirectionTemp.z)||this._cachedCameraDirection.equals(this._cameraDirectionTemp)||(this._cachedCameraDirection.copyFrom(this._cameraDirectionTemp),n.audioContext.listener.setOrientation(this._cameraDirectionTemp.x,this._cameraDirectionTemp.y,this._cameraDirectionTemp.z,0,1,0))):n.audioContext.listener.setOrientation(0,0,0,0,1,0);for(e=0;e<t.mainSoundTrack.soundCollection.length;e++){const i=t.mainSoundTrack.soundCollection[e];i.useCustomAttenuation&&i.updateDistanceFromListener()}if(t.soundTracks)for(e=0;e<t.soundTracks.length;e++)for(let i=0;i<t.soundTracks[e].soundCollection.length;i++){const n=t.soundTracks[e].soundCollection[i];n.useCustomAttenuation&&n.updateDistanceFromListener()}}}}P._CameraDirection=new o(0,0,-1),A._SceneComponentInitialization=e=>{let t=e._getComponent(l.NAME_AUDIO);t||(t=new P(e),e._addComponent(t))};const b="MSFT_audio_emitter";class C{constructor(e){this.name=b,this._loader=e,this.enabled=this._loader.isExtensionUsed(b)}dispose(){this._loader=null,this._clips=null,this._emitters=null}onLoading(){const e=this._loader.gltf.extensions;if(e&&e[this.name]){const t=e[this.name];this._clips=t.clips,this._emitters=t.emitters,p.Assign(this._clips),p.Assign(this._emitters)}}loadSceneAsync(e,t){return g.LoadExtensionAsync(e,t,this.name,((i,n)=>{const o=new Array;o.push(this._loader.loadSceneAsync(e,t));for(const e of n.emitters){const t=p.Get(`${i}/emitters`,this._emitters,e);if(null!=t.refDistance||null!=t.maxDistance||null!=t.rolloffFactor||null!=t.distanceModel||null!=t.innerAngle||null!=t.outerAngle)throw new Error(`${i}: Direction or Distance properties are not allowed on emitters attached to a scene`);o.push(this._loadEmitterAsync(`${i}/emitters/${t.index}`,t))}return Promise.all(o).then((()=>{}))}))}loadNodeAsync(e,t,i){return g.LoadExtensionAsync(e,t,this.name,((e,n)=>{const s=new Array;return this._loader.loadNodeAsync(e,t,(t=>{for(const i of n.emitters){const n=p.Get(`${e}/emitters`,this._emitters,i);s.push(this._loadEmitterAsync(`${e}/emitters/${n.index}`,n).then((()=>{for(const e of n._babylonSounds)e.attachToMesh(t),null==n.innerAngle&&null==n.outerAngle||(e.setLocalDirectionToMesh(o.Forward()),e.setDirectionalCone(2*r.ToDegrees(null==n.innerAngle?Math.PI:n.innerAngle),2*r.ToDegrees(null==n.outerAngle?Math.PI:n.outerAngle),0))})))}i(t)})).then((e=>Promise.all(s).then((()=>e))))}))}loadAnimationAsync(e,t){return g.LoadExtensionAsync(e,t,this.name,((i,n)=>this._loader.loadAnimationAsync(e,t).then((o=>{const s=new Array;p.Assign(n.events);for(const a of n.events)s.push(this._loadAnimationEventAsync(`${i}/events/${a.index}`,e,t,a,o));return Promise.all(s).then((()=>o))}))))}_loadClipAsync(e,t){if(t._objectURL)return t._objectURL;let i;if(t.uri)i=this._loader.loadUriAsync(e,t,t.uri);else{const n=p.Get(`${e}/bufferView`,this._loader.gltf.bufferViews,t.bufferView);i=this._loader.loadBufferViewAsync(`/bufferViews/${n.index}`,n)}return t._objectURL=i.then((e=>URL.createObjectURL(new Blob([e],{type:t.mimeType})))),t._objectURL}_loadEmitterAsync(e,t){if(t._babylonSounds=t._babylonSounds||[],!t._babylonData){const e=new Array,i=t.name||`emitter${t.index}`,n={loop:!1,autoplay:!1,volume:null==t.volume?1:t.volume};for(let o=0;o<t.clips.length;o++){const s=`/extensions/${this.name}/clips`,a=p.Get(s,this._clips,t.clips[o].clip);e.push(this._loadClipAsync(`${s}/${t.clips[o].clip}`,a).then((e=>{const s=t._babylonSounds[o]=new A(i,e,this._loader.babylonScene,null,n);s.refDistance=t.refDistance||1,s.maxDistance=t.maxDistance||256,s.rolloffFactor=t.rolloffFactor||1,s.distanceModel=t.distanceModel||"exponential"})))}const o=Promise.all(e).then((()=>{const e=t.clips.map((e=>e.weight||1)),i=new y(t.loop||!1,t._babylonSounds,e);t.innerAngle&&(i.directionalConeInnerAngle=2*r.ToDegrees(t.innerAngle)),t.outerAngle&&(i.directionalConeOuterAngle=2*r.ToDegrees(t.outerAngle)),t.volume&&(i.volume=t.volume),t._babylonData.sound=i}));t._babylonData={loaded:o}}return t._babylonData.loaded}_getEventAction(e,t,i,n,o){switch(i){case"play":return e=>{const i=(o||0)+(e-n);t.play(i)};case"stop":return()=>{t.stop()};case"pause":return()=>{t.pause()};default:throw new Error(`${e}: Unsupported action ${i}`)}}_loadAnimationEventAsync(e,t,i,n,o){if(0==o.targetedAnimations.length)return Promise.resolve();const s=o.targetedAnimations[0],a=n.emitter,r=p.Get(`/extensions/${this.name}/emitters`,this._emitters,a);return this._loadEmitterAsync(e,r).then((()=>{const t=r._babylonData.sound;if(t){const i=new f(n.time,this._getEventAction(e,t,n.action,n.time,n.startOffset));s.animation.addEvent(i),o.onAnimationGroupEndObservable.add((()=>{t.stop()})),o.onAnimationGroupPauseObservable.add((()=>{t.pause()}))}}))}}_(b),m(b,!0,(e=>new C(e)));export{C as MSFT_audio_emitter};
|
|
2
|
-
//# sourceMappingURL=MSFT_audio_emitter-5lrNj8-c.esm.min.js.map
|