@babylonjs/viewer 7.25.1-alpha → 7.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configuration/configuration.d.ts +107 -0
- package/configuration/configuration.js +16 -0
- package/configuration/configuration.js.map +1 -0
- package/configuration/configurationCompatibility.d.ts +8 -0
- package/configuration/configurationCompatibility.js +66 -0
- package/configuration/configurationCompatibility.js.map +1 -0
- package/configuration/configurationContainer.d.ts +10 -0
- package/configuration/configurationContainer.js +10 -0
- package/configuration/configurationContainer.js.map +1 -0
- package/configuration/globals.d.ts +6 -0
- package/configuration/globals.js +18 -0
- package/configuration/globals.js.map +1 -0
- package/configuration/index.d.ts +2 -0
- package/configuration/index.js +4 -0
- package/configuration/index.js.map +1 -0
- package/configuration/interfaces/cameraConfiguration.d.ts +31 -0
- package/configuration/interfaces/cameraConfiguration.js +2 -0
- package/configuration/interfaces/cameraConfiguration.js.map +1 -0
- package/configuration/interfaces/colorGradingConfiguration.d.ts +81 -0
- package/configuration/interfaces/colorGradingConfiguration.js +2 -0
- package/configuration/interfaces/colorGradingConfiguration.js.map +1 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.d.ts +20 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js +2 -0
- package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -0
- package/configuration/interfaces/environmentMapConfiguration.d.ts +22 -0
- package/configuration/interfaces/environmentMapConfiguration.js +2 -0
- package/configuration/interfaces/environmentMapConfiguration.js.map +1 -0
- package/configuration/interfaces/groundConfiguration.d.ts +24 -0
- package/configuration/interfaces/groundConfiguration.js +2 -0
- package/configuration/interfaces/groundConfiguration.js.map +1 -0
- package/configuration/interfaces/imageProcessingConfiguration.d.ts +45 -0
- package/configuration/interfaces/imageProcessingConfiguration.js +2 -0
- package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -0
- package/configuration/interfaces/index.d.ts +15 -0
- package/configuration/interfaces/index.js +16 -0
- package/configuration/interfaces/index.js.map +1 -0
- package/configuration/interfaces/lightConfiguration.d.ts +60 -0
- package/configuration/interfaces/lightConfiguration.js +2 -0
- package/configuration/interfaces/lightConfiguration.js.map +1 -0
- package/configuration/interfaces/modelAnimationConfiguration.d.ts +26 -0
- package/configuration/interfaces/modelAnimationConfiguration.js +2 -0
- package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -0
- package/configuration/interfaces/modelConfiguration.d.ts +65 -0
- package/configuration/interfaces/modelConfiguration.js +2 -0
- package/configuration/interfaces/modelConfiguration.js.map +1 -0
- package/configuration/interfaces/observersConfiguration.d.ts +5 -0
- package/configuration/interfaces/observersConfiguration.js +2 -0
- package/configuration/interfaces/observersConfiguration.js.map +1 -0
- package/configuration/interfaces/sceneConfiguration.d.ts +48 -0
- package/configuration/interfaces/sceneConfiguration.js +2 -0
- package/configuration/interfaces/sceneConfiguration.js.map +1 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.d.ts +23 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.js +2 -0
- package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -0
- package/configuration/interfaces/skyboxConfiguration.d.ts +21 -0
- package/configuration/interfaces/skyboxConfiguration.js +2 -0
- package/configuration/interfaces/skyboxConfiguration.js.map +1 -0
- package/configuration/interfaces/templateConfiguration.d.ts +67 -0
- package/configuration/interfaces/templateConfiguration.js +2 -0
- package/configuration/interfaces/templateConfiguration.js.map +1 -0
- package/configuration/interfaces/vrConfiguration.d.ts +16 -0
- package/configuration/interfaces/vrConfiguration.js +2 -0
- package/configuration/interfaces/vrConfiguration.js.map +1 -0
- package/configuration/loader.d.ts +4 -0
- package/configuration/loader.js +17 -0
- package/configuration/loader.js.map +1 -0
- package/configuration/mappers.d.ts +43 -0
- package/configuration/mappers.js +192 -0
- package/configuration/mappers.js.map +1 -0
- package/configuration/renderOnlyLoader.d.ts +33 -0
- package/configuration/renderOnlyLoader.js +162 -0
- package/configuration/renderOnlyLoader.js.map +1 -0
- package/configuration/types/default.d.ts +6 -0
- package/configuration/types/default.js +121 -0
- package/configuration/types/default.js.map +1 -0
- package/configuration/types/environmentMap.d.ts +5 -0
- package/configuration/types/environmentMap.js +14 -0
- package/configuration/types/environmentMap.js.map +1 -0
- package/configuration/types/extended.d.ts +6 -0
- package/configuration/types/extended.js +317 -0
- package/configuration/types/extended.js.map +1 -0
- package/configuration/types/index.d.ts +14 -0
- package/configuration/types/index.js +51 -0
- package/configuration/types/index.js.map +1 -0
- package/configuration/types/minimal.d.ts +6 -0
- package/configuration/types/minimal.js +43 -0
- package/configuration/types/minimal.js.map +1 -0
- package/configuration/types/renderOnlyDefault.d.ts +30 -0
- package/configuration/types/renderOnlyDefault.js +31 -0
- package/configuration/types/renderOnlyDefault.js.map +1 -0
- package/configuration/types/shadowLight.d.ts +9 -0
- package/configuration/types/shadowLight.js +64 -0
- package/configuration/types/shadowLight.js.map +1 -0
- package/helper/index.d.ts +29 -0
- package/helper/index.js +66 -0
- package/helper/index.js.map +1 -0
- package/index.d.ts +30 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/initializer.d.ts +11 -0
- package/initializer.js +35 -0
- package/initializer.js.map +1 -0
- package/interfaces.d.ts +5 -0
- package/interfaces.js +7 -0
- package/interfaces.js.map +1 -0
- package/labs/environmentSerializer.d.ts +126 -0
- package/labs/environmentSerializer.js +191 -0
- package/labs/environmentSerializer.js.map +1 -0
- package/labs/texture.d.ts +183 -0
- package/labs/texture.js +350 -0
- package/labs/texture.js.map +1 -0
- package/labs/viewerLabs.d.ts +51 -0
- package/labs/viewerLabs.js +134 -0
- package/labs/viewerLabs.js.map +1 -0
- package/loader/modelLoader.d.ts +56 -0
- package/loader/modelLoader.js +199 -0
- package/loader/modelLoader.js.map +1 -0
- package/loader/plugins/applyMaterialConfig.d.ts +12 -0
- package/loader/plugins/applyMaterialConfig.js +16 -0
- package/loader/plugins/applyMaterialConfig.js.map +1 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.d.ts +9 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.js +16 -0
- package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -0
- package/loader/plugins/index.d.ts +19 -0
- package/loader/plugins/index.js +44 -0
- package/loader/plugins/index.js.map +1 -0
- package/loader/plugins/loaderPlugin.d.ts +24 -0
- package/loader/plugins/loaderPlugin.js +2 -0
- package/loader/plugins/loaderPlugin.js.map +1 -0
- package/loader/plugins/msftLodLoaderPlugin.d.ts +12 -0
- package/loader/plugins/msftLodLoaderPlugin.js +21 -0
- package/loader/plugins/msftLodLoaderPlugin.js.map +1 -0
- package/loader/plugins/telemetryLoaderPlugin.d.ts +12 -0
- package/loader/plugins/telemetryLoaderPlugin.js +36 -0
- package/loader/plugins/telemetryLoaderPlugin.js.map +1 -0
- package/managers/observablesManager.d.ts +66 -0
- package/managers/observablesManager.js +35 -0
- package/managers/observablesManager.js.map +1 -0
- package/managers/sceneManager.d.ts +245 -0
- package/managers/sceneManager.js +1375 -0
- package/managers/sceneManager.js.map +1 -0
- package/managers/telemetryManager.d.ts +78 -0
- package/managers/telemetryManager.js +117 -0
- package/managers/telemetryManager.js.map +1 -0
- package/model/modelAnimation.d.ts +215 -0
- package/model/modelAnimation.js +237 -0
- package/model/modelAnimation.js.map +1 -0
- package/model/viewerModel.d.ts +233 -0
- package/model/viewerModel.js +673 -0
- package/model/viewerModel.js.map +1 -0
- package/optimizer/custom/extended.d.ts +13 -0
- package/optimizer/custom/extended.js +101 -0
- package/optimizer/custom/extended.js.map +1 -0
- package/optimizer/custom/index.d.ts +9 -0
- package/optimizer/custom/index.js +26 -0
- package/optimizer/custom/index.js.map +1 -0
- package/package.json +27 -17
- package/readme.md +21 -35
- package/renderOnlyIndex.d.ts +11 -0
- package/renderOnlyIndex.js +18 -0
- package/renderOnlyIndex.js.map +1 -0
- package/templating/eventManager.d.ts +35 -0
- package/templating/eventManager.js +66 -0
- package/templating/eventManager.js.map +1 -0
- package/templating/plugins/hdButtonPlugin.d.ts +9 -0
- package/templating/plugins/hdButtonPlugin.js +21 -0
- package/templating/plugins/hdButtonPlugin.js.map +1 -0
- package/templating/plugins/printButton.d.ts +9 -0
- package/templating/plugins/printButton.js +40 -0
- package/templating/plugins/printButton.js.map +1 -0
- package/templating/templateManager.d.ts +197 -0
- package/templating/templateManager.js +561 -0
- package/templating/templateManager.js.map +1 -0
- package/templating/viewerTemplatePlugin.d.ts +21 -0
- package/templating/viewerTemplatePlugin.js +69 -0
- package/templating/viewerTemplatePlugin.js.map +1 -0
- package/viewer/defaultViewer.d.ts +130 -0
- package/viewer/defaultViewer.js +675 -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/dist/babylon-viewer.esm.js +0 -2
- package/dist/babylon-viewer.esm.js.map +0 -1
- package/dist/babylon-viewer.esm.min.js +0 -2
- package/dist/babylon-viewer.esm.min.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-DVT9d5PE.esm.min.js +0 -2
- package/dist/chunks/EXT_lights_image_based-DVT9d5PE.esm.min.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-XqDzs68T.esm.js +0 -170
- package/dist/chunks/EXT_lights_image_based-XqDzs68T.esm.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-BDdwYyny.esm.min.js +0 -2
- package/dist/chunks/EXT_mesh_gpu_instancing-BDdwYyny.esm.min.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-DhR2UOBn.esm.js +0 -86
- package/dist/chunks/EXT_mesh_gpu_instancing-DhR2UOBn.esm.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-BqFzh0gY.esm.js +0 -134
- package/dist/chunks/EXT_meshopt_compression-BqFzh0gY.esm.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-SfXDvdUM.esm.min.js +0 -2
- package/dist/chunks/EXT_meshopt_compression-SfXDvdUM.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-JBIGyeRc.esm.js +0 -44
- package/dist/chunks/EXT_texture_avif-JBIGyeRc.esm.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-q1TkH_G9.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_avif-q1TkH_G9.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-B1s3FiRS.esm.js +0 -43
- package/dist/chunks/EXT_texture_webp-B1s3FiRS.esm.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-BCI9KAUl.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_webp-BCI9KAUl.esm.min.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-BOD2FG8I.esm.min.js +0 -2
- package/dist/chunks/ExtrasAsMetadata-BOD2FG8I.esm.min.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-ByiJUaSt.esm.js +0 -64
- package/dist/chunks/ExtrasAsMetadata-ByiJUaSt.esm.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-CNYMXY_w.esm.js +0 -343
- package/dist/chunks/KHR_animation_pointer-CNYMXY_w.esm.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-CnLRV_yl.esm.min.js +0 -2
- package/dist/chunks/KHR_animation_pointer-CnLRV_yl.esm.min.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-AZ2o_aLj.esm.min.js +0 -2
- package/dist/chunks/KHR_draco_mesh_compression-AZ2o_aLj.esm.min.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-DFY2Ctvm.esm.js +0 -610
- package/dist/chunks/KHR_draco_mesh_compression-DFY2Ctvm.esm.js.map +0 -1
- package/dist/chunks/KHR_interactivity-3PDcMKr_.esm.js +0 -4033
- package/dist/chunks/KHR_interactivity-3PDcMKr_.esm.js.map +0 -1
- package/dist/chunks/KHR_interactivity-C-cfOaao.esm.min.js +0 -2
- package/dist/chunks/KHR_interactivity-C-cfOaao.esm.min.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-DdpvJMDV.esm.js +0 -1253
- package/dist/chunks/KHR_lights_punctual-DdpvJMDV.esm.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-fnDFOclN.esm.min.js +0 -2
- package/dist/chunks/KHR_lights_punctual-fnDFOclN.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-Cb6X0k3m.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_anisotropy-Cb6X0k3m.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-gNrsYmJY.esm.js +0 -64
- package/dist/chunks/KHR_materials_anisotropy-gNrsYmJY.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-U2HUz3WB.esm.js +0 -96
- package/dist/chunks/KHR_materials_clearcoat-U2HUz3WB.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-joUz7tSd.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_clearcoat-joUz7tSd.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-Cm1IFxmL.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_diffuse_transmission-Cm1IFxmL.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-Cn5gk-q_.esm.js +0 -97
- package/dist/chunks/KHR_materials_diffuse_transmission-Cn5gk-q_.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-Cpc2ME1B.esm.js +0 -62
- package/dist/chunks/KHR_materials_dispersion-Cpc2ME1B.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-Cv7zIL7j.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_dispersion-Cv7zIL7j.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-BYxJ1Qaz.esm.js +0 -55
- package/dist/chunks/KHR_materials_emissive_strength-BYxJ1Qaz.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-DBEC-Pfr.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_emissive_strength-DBEC-Pfr.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-B4HgptNe.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_ior-B4HgptNe.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-CDtowU9f.esm.js +0 -64
- package/dist/chunks/KHR_materials_ior-CDtowU9f.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-CgkruUTk.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_iridescence-CgkruUTk.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-CqmvyPW8.esm.js +0 -72
- package/dist/chunks/KHR_materials_iridescence-CqmvyPW8.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BQV0asO5.esm.js +0 -81
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BQV0asO5.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Bv4SCrwb.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-Bv4SCrwb.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-BQM2Rjmq.esm.js +0 -85
- package/dist/chunks/KHR_materials_sheen-BQM2Rjmq.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-DV5CnbK2.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_sheen-DV5CnbK2.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-4xCkE2rV.esm.js +0 -75
- package/dist/chunks/KHR_materials_specular-4xCkE2rV.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-CoAFRAcm.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_specular-CoAFRAcm.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-DUGtSvRL.esm.js +0 -307
- package/dist/chunks/KHR_materials_transmission-DUGtSvRL.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-dc1ndoxL.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_transmission-dc1ndoxL.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-BNXbHdvw.esm.js +0 -74
- package/dist/chunks/KHR_materials_unlit-BNXbHdvw.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-D9MVjMTN.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_unlit-D9MVjMTN.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-CBW9J72v.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_variants-CBW9J72v.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-Dkur-XMA.esm.js +0 -238
- package/dist/chunks/KHR_materials_variants-Dkur-XMA.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-BSWwp0PI.esm.js +0 -87
- package/dist/chunks/KHR_materials_volume-BSWwp0PI.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-uEEN0xx9.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_volume-uEEN0xx9.esm.min.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization--7YAD1i9.esm.js +0 -26
- package/dist/chunks/KHR_mesh_quantization--7YAD1i9.esm.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-D48i0ooq.esm.min.js +0 -2
- package/dist/chunks/KHR_mesh_quantization-D48i0ooq.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-CJHQOtEz.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_basisu-CJHQOtEz.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-CZJ-szw2.esm.js +0 -43
- package/dist/chunks/KHR_texture_basisu-CZJ-szw2.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-CCGZOtJG.esm.js +0 -63
- package/dist/chunks/KHR_texture_transform-CCGZOtJG.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-Cz_tYWj9.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_transform-Cz_tYWj9.esm.min.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-BWhXh4yX.esm.min.js +0 -2
- package/dist/chunks/KHR_xmp_json_ld-BWhXh4yX.esm.min.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-D8vGUblu.esm.js +0 -51
- package/dist/chunks/KHR_xmp_json_ld-D8vGUblu.esm.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-CABqee9Z.esm.min.js +0 -2
- package/dist/chunks/MSFT_audio_emitter-CABqee9Z.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-CupxtNMJ.esm.js +0 -2236
- package/dist/chunks/MSFT_audio_emitter-CupxtNMJ.esm.js.map +0 -1
- package/dist/chunks/MSFT_lod-BZ6xhN71.esm.min.js +0 -2
- package/dist/chunks/MSFT_lod-BZ6xhN71.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_lod-D6-TVSnT.esm.js +0 -337
- package/dist/chunks/MSFT_lod-D6-TVSnT.esm.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-DXKcYd7c.esm.js +0 -46
- package/dist/chunks/MSFT_minecraftMesh-DXKcYd7c.esm.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-jQGuk0z2.esm.min.js +0 -2
- package/dist/chunks/MSFT_minecraftMesh-jQGuk0z2.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-CMIEJuDa.esm.min.js +0 -2
- package/dist/chunks/MSFT_sRGBFactors-CMIEJuDa.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-D1di9DYd.esm.js +0 -47
- package/dist/chunks/MSFT_sRGBFactors-D1di9DYd.esm.js.map +0 -1
- package/dist/chunks/assetContainer-B4RZAzKO.esm.min.js +0 -2
- package/dist/chunks/assetContainer-B4RZAzKO.esm.min.js.map +0 -1
- package/dist/chunks/assetContainer-B_DdybqS.esm.js +0 -1598
- package/dist/chunks/assetContainer-B_DdybqS.esm.js.map +0 -1
- package/dist/chunks/audioEngine-BNEDnVbO.esm.min.js +0 -2
- package/dist/chunks/audioEngine-BNEDnVbO.esm.min.js.map +0 -1
- package/dist/chunks/audioEngine-CICNJdfP.esm.js +0 -305
- package/dist/chunks/audioEngine-CICNJdfP.esm.js.map +0 -1
- package/dist/chunks/basisTextureLoader-B_8qIBcv.esm.js +0 -600
- package/dist/chunks/basisTextureLoader-B_8qIBcv.esm.js.map +0 -1
- package/dist/chunks/basisTextureLoader-qwPrmlI1.esm.min.js +0 -2
- package/dist/chunks/basisTextureLoader-qwPrmlI1.esm.min.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-Caj9Cn2g.esm.min.js +0 -2
- package/dist/chunks/ddsTextureLoader-Caj9Cn2g.esm.min.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-Dtde5Y_E.esm.js +0 -87
- package/dist/chunks/ddsTextureLoader-Dtde5Y_E.esm.js.map +0 -1
- package/dist/chunks/default.fragment-3-A6Ds5q.esm.js +0 -456
- package/dist/chunks/default.fragment-3-A6Ds5q.esm.js.map +0 -1
- package/dist/chunks/default.fragment-CK_5aPIO.esm.js +0 -515
- package/dist/chunks/default.fragment-CK_5aPIO.esm.js.map +0 -1
- package/dist/chunks/default.fragment-CW6M2CvG.esm.min.js +0 -2
- package/dist/chunks/default.fragment-CW6M2CvG.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-D8IeeUuR.esm.min.js +0 -2
- package/dist/chunks/default.fragment-D8IeeUuR.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-BnmEG9Z3.esm.js +0 -178
- package/dist/chunks/default.vertex-BnmEG9Z3.esm.js.map +0 -1
- package/dist/chunks/default.vertex-CByxmCU_.esm.min.js +0 -2
- package/dist/chunks/default.vertex-CByxmCU_.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-CKXtUMTv.esm.min.js +0 -2
- package/dist/chunks/default.vertex-CKXtUMTv.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-D5kQBg6V.esm.js +0 -199
- package/dist/chunks/default.vertex-D5kQBg6V.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-AgU83OaK.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-AgU83OaK.esm.min.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-BTsCVlsd.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-BTsCVlsd.esm.min.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-bGo0gkae.esm.js +0 -15
- package/dist/chunks/defaultUboDeclaration-bGo0gkae.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-pi1Tffi-.esm.js +0 -13
- package/dist/chunks/defaultUboDeclaration-pi1Tffi-.esm.js.map +0 -1
- package/dist/chunks/engine-DDK673Fr.esm.js +0 -1613
- package/dist/chunks/engine-DDK673Fr.esm.js.map +0 -1
- package/dist/chunks/engine-DdeN2F9N.esm.min.js +0 -2
- package/dist/chunks/engine-DdeN2F9N.esm.min.js.map +0 -1
- package/dist/chunks/envTextureLoader-B_We3UAe.esm.min.js +0 -2
- package/dist/chunks/envTextureLoader-B_We3UAe.esm.min.js.map +0 -1
- package/dist/chunks/envTextureLoader-DeYk_D-u.esm.js +0 -63
- package/dist/chunks/envTextureLoader-DeYk_D-u.esm.js.map +0 -1
- package/dist/chunks/environmentTextureTools-DT_BQR6L.esm.min.js +0 -2
- package/dist/chunks/environmentTextureTools-DT_BQR6L.esm.min.js.map +0 -1
- package/dist/chunks/environmentTextureTools-DZ4GOzAY.esm.js +0 -381
- package/dist/chunks/environmentTextureTools-DZ4GOzAY.esm.js.map +0 -1
- package/dist/chunks/exrTextureLoader-BPFaquLu.esm.min.js +0 -2
- package/dist/chunks/exrTextureLoader-BPFaquLu.esm.min.js.map +0 -1
- package/dist/chunks/exrTextureLoader-DFfYDSvx.esm.js +0 -1682
- package/dist/chunks/exrTextureLoader-DFfYDSvx.esm.js.map +0 -1
- package/dist/chunks/fogFragment-ChBeVMbL.esm.min.js +0 -2
- package/dist/chunks/fogFragment-ChBeVMbL.esm.min.js.map +0 -1
- package/dist/chunks/fogFragment-CnlQ05Rn.esm.js +0 -102
- package/dist/chunks/fogFragment-CnlQ05Rn.esm.js.map +0 -1
- package/dist/chunks/glTFLoader-CfuuZdCb.esm.js +0 -7552
- package/dist/chunks/glTFLoader-CfuuZdCb.esm.js.map +0 -1
- package/dist/chunks/glTFLoader-DOyVt9PU.esm.min.js +0 -2
- package/dist/chunks/glTFLoader-DOyVt9PU.esm.min.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-28_L-pzh.esm.js +0 -77
- package/dist/chunks/glTFLoaderAnimation-28_L-pzh.esm.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-Cueukaay.esm.min.js +0 -2
- package/dist/chunks/glTFLoaderAnimation-Cueukaay.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-5m2TqpP7.esm.js +0 -34
- package/dist/chunks/harmonicsFunctions-5m2TqpP7.esm.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-CZvW5nS2.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-CZvW5nS2.esm.min.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-FoyoVJjx.esm.js +0 -35
- package/dist/chunks/harmonicsFunctions-FoyoVJjx.esm.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-LPFcAay5.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-LPFcAay5.esm.min.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-BF58jeD4.esm.min.js +0 -2
- package/dist/chunks/hdrTextureLoader-BF58jeD4.esm.min.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-CnAlxQ46.esm.js +0 -252
- package/dist/chunks/hdrTextureLoader-CnAlxQ46.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-BHi3ZDnH.esm.js +0 -80
- package/dist/chunks/helperFunctions-BHi3ZDnH.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-D9QX7d8q.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-D9QX7d8q.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-bapbKVVS.esm.js +0 -108
- package/dist/chunks/helperFunctions-bapbKVVS.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-hh2B4qDl.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-hh2B4qDl.esm.min.js.map +0 -1
- package/dist/chunks/index-4QQveomY.esm.js +0 -79813
- package/dist/chunks/index-4QQveomY.esm.js.map +0 -1
- package/dist/chunks/index-D5606AHu.esm.min.js +0 -57
- package/dist/chunks/index-D5606AHu.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-CxAMFjnh.esm.js +0 -814
- package/dist/chunks/ktxTextureLoader-CxAMFjnh.esm.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-s0dUXnt8.esm.min.js +0 -2
- package/dist/chunks/ktxTextureLoader-s0dUXnt8.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-BcnqcXJe.esm.js +0 -35
- package/dist/chunks/logDepthDeclaration-BcnqcXJe.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-CvXtMvcM.esm.js +0 -42
- package/dist/chunks/logDepthDeclaration-CvXtMvcM.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-cPWsL3PG.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-cPWsL3PG.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-unowpoZK.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-unowpoZK.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-BrvDYbCP.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-BrvDYbCP.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-CUUB4BTI.esm.js +0 -605
- package/dist/chunks/logDepthVertex-CUUB4BTI.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-DaNvEIGn.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-DaNvEIGn.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-foN2jGvJ.esm.js +0 -77
- package/dist/chunks/logDepthVertex-foN2jGvJ.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-DHTqc_aH.esm.js +0 -11
- package/dist/chunks/mainUVVaryingDeclaration-DHTqc_aH.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-PFUWfv7o.esm.min.js +0 -2
- package/dist/chunks/mainUVVaryingDeclaration-PFUWfv7o.esm.min.js.map +0 -1
- package/dist/chunks/objFileLoader-B-uLP26U.esm.min.js +0 -2
- package/dist/chunks/objFileLoader-B-uLP26U.esm.min.js.map +0 -1
- package/dist/chunks/objFileLoader-Bl2Pzv0o.esm.js +0 -1280
- package/dist/chunks/objFileLoader-Bl2Pzv0o.esm.js.map +0 -1
- package/dist/chunks/oitFragment-CZShr04f.esm.min.js +0 -2
- package/dist/chunks/oitFragment-CZShr04f.esm.min.js.map +0 -1
- package/dist/chunks/oitFragment-D3c3Lp9a.esm.js +0 -1210
- package/dist/chunks/oitFragment-D3c3Lp9a.esm.js.map +0 -1
- package/dist/chunks/oitFragment-D6uOdl_0.esm.min.js +0 -2
- package/dist/chunks/oitFragment-D6uOdl_0.esm.min.js.map +0 -1
- package/dist/chunks/oitFragment-E27tpA6b.esm.js +0 -1166
- package/dist/chunks/oitFragment-E27tpA6b.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-CGX8gTNY.esm.js +0 -15
- package/dist/chunks/pass.fragment-CGX8gTNY.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-DKqeYsmS.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-DKqeYsmS.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-5XRl6pKm.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-5XRl6pKm.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-Cfsv9tFG.esm.js +0 -3172
- package/dist/chunks/pbr.fragment-Cfsv9tFG.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-DGBodARG.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-DGBodARG.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-IMDXwBnG.esm.js +0 -3228
- package/dist/chunks/pbr.fragment-IMDXwBnG.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-B3JKAxfl.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-B3JKAxfl.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-CZIasM0q.esm.js +0 -335
- package/dist/chunks/pbr.vertex-CZIasM0q.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-CjU0MUM9.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-CjU0MUM9.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-h6JyEpaS.esm.js +0 -208
- package/dist/chunks/pbr.vertex-h6JyEpaS.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-B0ei94Dw.esm.min.js +0 -2
- package/dist/chunks/postprocess.vertex-B0ei94Dw.esm.min.js.map +0 -1
- package/dist/chunks/postprocess.vertex-r5NscKzh.esm.js +0 -20
- package/dist/chunks/postprocess.vertex-r5NscKzh.esm.js.map +0 -1
- package/dist/chunks/rawTexture-Bmw0auoS.esm.min.js +0 -2
- package/dist/chunks/rawTexture-Bmw0auoS.esm.min.js.map +0 -1
- package/dist/chunks/rawTexture-CpYqstLv.esm.js +0 -562
- package/dist/chunks/rawTexture-CpYqstLv.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-BBOPxYJO.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-BBOPxYJO.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-C1mQs3ed.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-C1mQs3ed.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-CaqsSeIW.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-CaqsSeIW.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-MPQ7knvL.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-MPQ7knvL.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-6EdQiINi.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-6EdQiINi.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-C-msuzIz.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-C-msuzIz.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-Wd9cTDxy.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-Wd9cTDxy.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-X-RqQAkc.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-X-RqQAkc.esm.js.map +0 -1
- package/dist/chunks/splatFileLoader-DQ9jOQE9.esm.min.js +0 -2
- package/dist/chunks/splatFileLoader-DQ9jOQE9.esm.min.js.map +0 -1
- package/dist/chunks/splatFileLoader-hdSfXVdE.esm.js +0 -3154
- package/dist/chunks/splatFileLoader-hdSfXVdE.esm.js.map +0 -1
- package/dist/chunks/standardMaterial-Cq-J9fif.esm.min.js +0 -2
- package/dist/chunks/standardMaterial-Cq-J9fif.esm.min.js.map +0 -1
- package/dist/chunks/standardMaterial-GIGkmsd2.esm.js +0 -1809
- package/dist/chunks/standardMaterial-GIGkmsd2.esm.js.map +0 -1
- package/dist/chunks/stlFileLoader--AN8pgtb.esm.min.js +0 -2
- package/dist/chunks/stlFileLoader--AN8pgtb.esm.min.js.map +0 -1
- package/dist/chunks/stlFileLoader-BjJ0Yz5v.esm.js +0 -237
- package/dist/chunks/stlFileLoader-BjJ0Yz5v.esm.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-B3gQ-Dwh.esm.min.js +0 -2
- package/dist/chunks/tgaTextureLoader-B3gQ-Dwh.esm.min.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-BmEYbSF8.esm.js +0 -349
- package/dist/chunks/tgaTextureLoader-BmEYbSF8.esm.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-DLE1cPa9.esm.js +0 -314
- package/dist/chunks/thinInstanceMesh-DLE1cPa9.esm.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-DgJgeFTD.esm.min.js +0 -2
- package/dist/chunks/thinInstanceMesh-DgJgeFTD.esm.min.js.map +0 -1
- package/dist/chunks/vertexColorMixing-Dn7oXj03.esm.js +0 -528
- package/dist/chunks/vertexColorMixing-Dn7oXj03.esm.js.map +0 -1
- package/dist/chunks/vertexColorMixing-cD_XcjBD.esm.min.js +0 -2
- package/dist/chunks/vertexColorMixing-cD_XcjBD.esm.min.js.map +0 -1
- package/dist/chunks/workerPool-BUOov2K1.esm.js +0 -122
- package/dist/chunks/workerPool-BUOov2K1.esm.js.map +0 -1
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js +0 -2
- package/dist/chunks/workerPool-BWHiDmEZ.esm.min.js.map +0 -1
- package/lib/index.d.ts +0 -275
- package/lib/index.js +0 -942
- package/lib/index.js.map +0 -1
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { aG as PBRMaterial, at as unregisterGLTFExtension, au as registerGLTFExtension } from './index-4QQveomY.esm.js';
|
|
2
|
-
import { GLTFLoader } from './glTFLoader-CfuuZdCb.esm.js';
|
|
3
|
-
import './rawTexture-CpYqstLv.esm.js';
|
|
4
|
-
import './assetContainer-B_DdybqS.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-28_L-pzh.esm.js';
|
|
6
|
-
|
|
7
|
-
const NAME = "KHR_materials_iridescence";
|
|
8
|
-
/**
|
|
9
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_iridescence/README.md)
|
|
10
|
-
*/
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
-
class KHR_materials_iridescence {
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
constructor(loader) {
|
|
17
|
-
/**
|
|
18
|
-
* The name of this extension.
|
|
19
|
-
*/
|
|
20
|
-
this.name = NAME;
|
|
21
|
-
/**
|
|
22
|
-
* Defines a number that determines the order the extensions are applied.
|
|
23
|
-
*/
|
|
24
|
-
this.order = 195;
|
|
25
|
-
this._loader = loader;
|
|
26
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
27
|
-
}
|
|
28
|
-
/** @internal */
|
|
29
|
-
dispose() {
|
|
30
|
-
this._loader = null;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
36
|
-
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
37
|
-
const promises = new Array();
|
|
38
|
-
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
39
|
-
promises.push(this._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
40
|
-
return Promise.all(promises).then(() => { });
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
_loadIridescencePropertiesAsync(context, properties, babylonMaterial) {
|
|
44
|
-
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
45
|
-
throw new Error(`${context}: Material type not supported`);
|
|
46
|
-
}
|
|
47
|
-
const promises = new Array();
|
|
48
|
-
babylonMaterial.iridescence.isEnabled = true;
|
|
49
|
-
babylonMaterial.iridescence.intensity = properties.iridescenceFactor ?? 0;
|
|
50
|
-
babylonMaterial.iridescence.indexOfRefraction = properties.iridescenceIor ?? properties.iridescenceIOR ?? 1.3;
|
|
51
|
-
babylonMaterial.iridescence.minimumThickness = properties.iridescenceThicknessMinimum ?? 100;
|
|
52
|
-
babylonMaterial.iridescence.maximumThickness = properties.iridescenceThicknessMaximum ?? 400;
|
|
53
|
-
if (properties.iridescenceTexture) {
|
|
54
|
-
promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {
|
|
55
|
-
texture.name = `${babylonMaterial.name} (Iridescence)`;
|
|
56
|
-
babylonMaterial.iridescence.texture = texture;
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
if (properties.iridescenceThicknessTexture) {
|
|
60
|
-
promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {
|
|
61
|
-
texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;
|
|
62
|
-
babylonMaterial.iridescence.thicknessTexture = texture;
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
return Promise.all(promises).then(() => { });
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
unregisterGLTFExtension(NAME);
|
|
69
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_iridescence(loader));
|
|
70
|
-
|
|
71
|
-
export { KHR_materials_iridescence };
|
|
72
|
-
//# sourceMappingURL=KHR_materials_iridescence-CqmvyPW8.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_iridescence-CqmvyPW8.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_iridescence.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_iridescence\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_iridescence/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_iridescence {\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 = 195;\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 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._loadIridescencePropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadIridescencePropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.iridescence.isEnabled = true;\n babylonMaterial.iridescence.intensity = properties.iridescenceFactor ?? 0;\n babylonMaterial.iridescence.indexOfRefraction = properties.iridescenceIor ?? properties.iridescenceIOR ?? 1.3;\n babylonMaterial.iridescence.minimumThickness = properties.iridescenceThicknessMinimum ?? 100;\n babylonMaterial.iridescence.maximumThickness = properties.iridescenceThicknessMaximum ?? 400;\n if (properties.iridescenceTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceTexture`, properties.iridescenceTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Iridescence)`;\n babylonMaterial.iridescence.texture = texture;\n }));\n }\n if (properties.iridescenceThicknessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/iridescenceThicknessTexture`, properties.iridescenceThicknessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Iridescence Thickness)`;\n babylonMaterial.iridescence.thicknessTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_iridescence(loader));\n//# sourceMappingURL=KHR_materials_iridescence.js.map"],"names":[],"mappings":";;;;;;AAGA,MAAM,IAAI,GAAG,2BAA2B,CAAC;AACzC;AACA;AACA;AACA;AACO,MAAM,yBAAyB,CAAC;AACvC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;AACzB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;AAC9B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1D,KAAK;AACL;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AAC5B,KAAK;AACL;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,CAAC;AACzC,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2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AK;AACzI,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACvE,gBAAgB,eAAe,CAAC,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC;AAC9D,aAAa,CAAC,CAAC,CAAC;AAChB,SAAS;AACT,QAAQ,IAAI,UAAU,CAAC,2BAA2B,EAAE;AACpD,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,EAAE,UAAU,CAAC,2BAA2B,EAAE,CAAC,OAAO,KAAK;AAC3J,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AACjF,gBAAgB,eAAe,CAAC,WAAW,CAAC,gBAAgB,GAAG,OAAO,CAAC;AACvE,aAAa,CAAC,CAAC,CAAC;AAChB,SAAS;AACT,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AACrD,KAAK;AACL,CAAC;AACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { aG as PBRMaterial, e as Color3, at as unregisterGLTFExtension, au as registerGLTFExtension } from './index-4QQveomY.esm.js';
|
|
2
|
-
import { GLTFLoader } from './glTFLoader-CfuuZdCb.esm.js';
|
|
3
|
-
import './rawTexture-CpYqstLv.esm.js';
|
|
4
|
-
import './assetContainer-B_DdybqS.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-28_L-pzh.esm.js';
|
|
6
|
-
|
|
7
|
-
const NAME = "KHR_materials_pbrSpecularGlossiness";
|
|
8
|
-
/**
|
|
9
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/README.md)
|
|
10
|
-
*/
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
-
class KHR_materials_pbrSpecularGlossiness {
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
constructor(loader) {
|
|
17
|
-
/**
|
|
18
|
-
* The name of this extension.
|
|
19
|
-
*/
|
|
20
|
-
this.name = NAME;
|
|
21
|
-
/**
|
|
22
|
-
* Defines a number that determines the order the extensions are applied.
|
|
23
|
-
*/
|
|
24
|
-
this.order = 200;
|
|
25
|
-
this._loader = loader;
|
|
26
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
27
|
-
}
|
|
28
|
-
/** @internal */
|
|
29
|
-
dispose() {
|
|
30
|
-
this._loader = null;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
36
|
-
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
37
|
-
const promises = new Array();
|
|
38
|
-
promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));
|
|
39
|
-
promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
40
|
-
this._loader.loadMaterialAlphaProperties(context, material, babylonMaterial);
|
|
41
|
-
return Promise.all(promises).then(() => { });
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
_loadSpecularGlossinessPropertiesAsync(context, properties, babylonMaterial) {
|
|
45
|
-
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
46
|
-
throw new Error(`${context}: Material type not supported`);
|
|
47
|
-
}
|
|
48
|
-
const promises = new Array();
|
|
49
|
-
babylonMaterial.metallic = null;
|
|
50
|
-
babylonMaterial.roughness = null;
|
|
51
|
-
if (properties.diffuseFactor) {
|
|
52
|
-
babylonMaterial.albedoColor = Color3.FromArray(properties.diffuseFactor);
|
|
53
|
-
babylonMaterial.alpha = properties.diffuseFactor[3];
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
babylonMaterial.albedoColor = Color3.White();
|
|
57
|
-
}
|
|
58
|
-
babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : Color3.White();
|
|
59
|
-
babylonMaterial.microSurface = properties.glossinessFactor == undefined ? 1 : properties.glossinessFactor;
|
|
60
|
-
if (properties.diffuseTexture) {
|
|
61
|
-
promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTexture`, properties.diffuseTexture, (texture) => {
|
|
62
|
-
texture.name = `${babylonMaterial.name} (Diffuse)`;
|
|
63
|
-
babylonMaterial.albedoTexture = texture;
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
if (properties.specularGlossinessTexture) {
|
|
67
|
-
promises.push(this._loader.loadTextureInfoAsync(`${context}/specularGlossinessTexture`, properties.specularGlossinessTexture, (texture) => {
|
|
68
|
-
texture.name = `${babylonMaterial.name} (Specular Glossiness)`;
|
|
69
|
-
babylonMaterial.reflectivityTexture = texture;
|
|
70
|
-
babylonMaterial.reflectivityTexture.hasAlpha = true;
|
|
71
|
-
}));
|
|
72
|
-
babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true;
|
|
73
|
-
}
|
|
74
|
-
return Promise.all(promises).then(() => { });
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
unregisterGLTFExtension(NAME);
|
|
78
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));
|
|
79
|
-
|
|
80
|
-
export { KHR_materials_pbrSpecularGlossiness };
|
|
81
|
-
//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness-BQV0asO5.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_pbrSpecularGlossiness-BQV0asO5.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js"],"sourcesContent":["import { Color3 } from \"core/Maths/math.color\";\nimport { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_pbrSpecularGlossiness\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_pbrSpecularGlossiness {\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 = 200;\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 loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, extension, babylonMaterial));\n this._loader.loadMaterialAlphaProperties(context, material, babylonMaterial);\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularGlossinessPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.metallic = null;\n babylonMaterial.roughness = null;\n if (properties.diffuseFactor) {\n babylonMaterial.albedoColor = Color3.FromArray(properties.diffuseFactor);\n babylonMaterial.alpha = properties.diffuseFactor[3];\n }\n else {\n babylonMaterial.albedoColor = Color3.White();\n }\n babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : Color3.White();\n babylonMaterial.microSurface = properties.glossinessFactor == undefined ? 1 : properties.glossinessFactor;\n if (properties.diffuseTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTexture`, properties.diffuseTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse)`;\n babylonMaterial.albedoTexture = texture;\n }));\n }\n if (properties.specularGlossinessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularGlossinessTexture`, properties.specularGlossinessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Glossiness)`;\n babylonMaterial.reflectivityTexture = texture;\n babylonMaterial.reflectivityTexture.hasAlpha = true;\n }));\n babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true;\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));\n//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,qCAAqC,CAAC;AACnD;AACA;AACA;AACA;AACO,MAAM,mCAAmC,CAAC;AACjD;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;AACzB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;AAC9B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1D,KAAK;AACL;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AAC5B,KAAK;AACL;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,O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CAAC,CAAC;AAChB,YAAY,eAAe,CAAC,uCAAuC,GAAG,IAAI,CAAC;AAC3E,SAAS;AACT,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AACrD,KAAK;AACL,CAAC;AACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,mCAAmC,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aG as e,e as s,at as r,au as a}from"./index-D5606AHu.esm.min.js";import{GLTFLoader as o}from"./glTFLoader-DOyVt9PU.esm.min.js";import"./rawTexture-Bmw0auoS.esm.min.js";import"./assetContainer-B4RZAzKO.esm.min.js";import"./glTFLoaderAnimation-Cueukaay.esm.min.js";const t="KHR_materials_pbrSpecularGlossiness";class i{constructor(e){this.name=t,this.order=200,this._loader=e,this.enabled=this._loader.isExtensionUsed(t)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,s,r){return o.LoadExtensionAsync(e,s,this.name,((a,o)=>{const t=new Array;return t.push(this._loader.loadMaterialBasePropertiesAsync(e,s,r)),t.push(this._loadSpecularGlossinessPropertiesAsync(a,o,r)),this._loader.loadMaterialAlphaProperties(e,s,r),Promise.all(t).then((()=>{}))}))}_loadSpecularGlossinessPropertiesAsync(r,a,o){if(!(o instanceof e))throw new Error(`${r}: Material type not supported`);const t=new Array;return o.metallic=null,o.roughness=null,a.diffuseFactor?(o.albedoColor=s.FromArray(a.diffuseFactor),o.alpha=a.diffuseFactor[3]):o.albedoColor=s.White(),o.reflectivityColor=a.specularFactor?s.FromArray(a.specularFactor):s.White(),o.microSurface=null==a.glossinessFactor?1:a.glossinessFactor,a.diffuseTexture&&t.push(this._loader.loadTextureInfoAsync(`${r}/diffuseTexture`,a.diffuseTexture,(e=>{e.name=`${o.name} (Diffuse)`,o.albedoTexture=e}))),a.specularGlossinessTexture&&(t.push(this._loader.loadTextureInfoAsync(`${r}/specularGlossinessTexture`,a.specularGlossinessTexture,(e=>{e.name=`${o.name} (Specular Glossiness)`,o.reflectivityTexture=e,o.reflectivityTexture.hasAlpha=!0}))),o.useMicroSurfaceFromReflectivityMapAlpha=!0),Promise.all(t).then((()=>{}))}}r(t),a(t,!0,(e=>new i(e)));export{i as KHR_materials_pbrSpecularGlossiness};
|
|
2
|
-
//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness-Bv4SCrwb.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_pbrSpecularGlossiness-Bv4SCrwb.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_pbrSpecularGlossiness.js"],"sourcesContent":["import { Color3 } from \"core/Maths/math.color\";\nimport { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_pbrSpecularGlossiness\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_pbrSpecularGlossiness {\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 = 200;\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 loadMaterialPropertiesAsync(context, material, babylonMaterial) {\n return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {\n const promises = new Array();\n promises.push(this._loader.loadMaterialBasePropertiesAsync(context, material, babylonMaterial));\n promises.push(this._loadSpecularGlossinessPropertiesAsync(extensionContext, extension, babylonMaterial));\n this._loader.loadMaterialAlphaProperties(context, material, babylonMaterial);\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularGlossinessPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.metallic = null;\n babylonMaterial.roughness = null;\n if (properties.diffuseFactor) {\n babylonMaterial.albedoColor = Color3.FromArray(properties.diffuseFactor);\n babylonMaterial.alpha = properties.diffuseFactor[3];\n }\n else {\n babylonMaterial.albedoColor = Color3.White();\n }\n babylonMaterial.reflectivityColor = properties.specularFactor ? Color3.FromArray(properties.specularFactor) : Color3.White();\n babylonMaterial.microSurface = properties.glossinessFactor == undefined ? 1 : properties.glossinessFactor;\n if (properties.diffuseTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/diffuseTexture`, properties.diffuseTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Diffuse)`;\n babylonMaterial.albedoTexture = texture;\n }));\n }\n if (properties.specularGlossinessTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularGlossinessTexture`, properties.specularGlossinessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Glossiness)`;\n babylonMaterial.reflectivityTexture = texture;\n babylonMaterial.reflectivityTexture.hasAlpha = true;\n }));\n babylonMaterial.useMicroSurfaceFromReflectivityMapAlpha = true;\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_pbrSpecularGlossiness(loader));\n//# sourceMappingURL=KHR_materials_pbrSpecularGlossiness.js.map"],"names":["NAME","KHR_materials_pbrSpecularGlossiness","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","loadMaterialBasePropertiesAsync","_loadSpecularGlossinessPropertiesAsync","loadMaterialAlphaProperties","Promise","all","then","properties","PBRMaterial","Error","metallic","roughness","diffuseFactor","albedoColor","Color3","FromArray","alpha","White","reflectivityColor","specularFactor","microSurface","undefined","glossinessFactor","diffuseTexture","loadTextureInfoAsync","texture","albedoTexture","specularGlossinessTexture","reflectivityTexture","hasAlpha","useMicroSurfaceFromReflectivityMapAlpha","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8QAIA,MAAMA,EAAO,sCAKN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EAC/C,CAED,OAAAU,GACIN,KAAKG,QAAU,IAClB,CAID,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAIrB,OAHAD,EAASE,KAAKjB,KAAKG,QAAQe,gCAAgCV,EAASC,EAAUC,IAC9EK,EAASE,KAAKjB,KAAKmB,uCAAuCN,EAAkBC,EAAWJ,IACvFV,KAAKG,QAAQiB,4BAA4BZ,EAASC,EAAUC,GACrDW,QAAQC,IAAIP,GAAUQ,MAAK,QAAU,GAEnD,CACD,sCAAAJ,CAAuCX,EAASgB,EAAYd,GACxD,KAAMA,aAA2Be,GAC7B,MAAM,IAAIC,MAAM,GAAGlB,kCAEvB,MAAMO,EAAW,IAAIC,MA0BrB,OAzBAN,EAAgBiB,SAAW,KAC3BjB,EAAgBkB,UAAY,KACxBJ,EAAWK,eACXnB,EAAgBoB,YAAcC,EAAOC,UAAUR,EAAWK,eAC1DnB,EAAgBuB,MAAQT,EAAWK,cAAc,IAGjDnB,EAAgBoB,YAAcC,EAAOG,QAEzCxB,EAAgByB,kBAAoBX,EAAWY,eAAiBL,EAAOC,UAAUR,EAAWY,gBAAkBL,EAAOG,QACrHxB,EAAgB2B,aAA8CC,MAA/Bd,EAAWe,iBAAgC,EAAIf,EAAWe,iBACrFf,EAAWgB,gBACXzB,EAASE,KAAKjB,KAAKG,QAAQsC,qBAAqB,GAAGjC,mBAA0BgB,EAAWgB,gBAAiBE,IACrGA,EAAQzC,KAAO,GAAGS,EAAgBT,iBAClCS,EAAgBiC,cAAgBD,CAAO,KAG3ClB,EAAWoB,4BACX7B,EAASE,KAAKjB,KAAKG,QAAQsC,qBAAqB,GAAGjC,8BAAqCgB,EAAWoB,2BAA4BF,IAC3HA,EAAQzC,KAAO,GAAGS,EAAgBT,6BAClCS,EAAgBmC,oBAAsBH,EACtChC,EAAgBmC,oBAAoBC,UAAW,CAAI,KAEvDpC,EAAgBqC,yCAA0C,GAEvD1B,QAAQC,IAAIP,GAAUQ,MAAK,QACrC,EAELyB,EAAwBpD,GACxBqD,EAAsBrD,GAAM,GAAOG,GAAW,IAAIF,EAAoCE"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { aG as PBRMaterial, e as Color3, at as unregisterGLTFExtension, au as registerGLTFExtension } from './index-4QQveomY.esm.js';
|
|
2
|
-
import { GLTFLoader } from './glTFLoader-CfuuZdCb.esm.js';
|
|
3
|
-
import './rawTexture-CpYqstLv.esm.js';
|
|
4
|
-
import './assetContainer-B_DdybqS.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-28_L-pzh.esm.js';
|
|
6
|
-
|
|
7
|
-
const NAME = "KHR_materials_sheen";
|
|
8
|
-
/**
|
|
9
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md)
|
|
10
|
-
* [Playground Sample](https://www.babylonjs-playground.com/frame.html#BNIZX6#4)
|
|
11
|
-
*/
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
|
-
class KHR_materials_sheen {
|
|
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 = 190;
|
|
26
|
-
this._loader = loader;
|
|
27
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
28
|
-
}
|
|
29
|
-
/** @internal */
|
|
30
|
-
dispose() {
|
|
31
|
-
this._loader = null;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
36
|
-
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
37
|
-
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
38
|
-
const promises = new Array();
|
|
39
|
-
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
40
|
-
promises.push(this._loadSheenPropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
41
|
-
return Promise.all(promises).then(() => { });
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
_loadSheenPropertiesAsync(context, properties, babylonMaterial) {
|
|
45
|
-
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
46
|
-
throw new Error(`${context}: Material type not supported`);
|
|
47
|
-
}
|
|
48
|
-
const promises = new Array();
|
|
49
|
-
babylonMaterial.sheen.isEnabled = true;
|
|
50
|
-
babylonMaterial.sheen.intensity = 1;
|
|
51
|
-
if (properties.sheenColorFactor != undefined) {
|
|
52
|
-
babylonMaterial.sheen.color = Color3.FromArray(properties.sheenColorFactor);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
babylonMaterial.sheen.color = Color3.Black();
|
|
56
|
-
}
|
|
57
|
-
if (properties.sheenColorTexture) {
|
|
58
|
-
promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenColorTexture`, properties.sheenColorTexture, (texture) => {
|
|
59
|
-
texture.name = `${babylonMaterial.name} (Sheen Color)`;
|
|
60
|
-
babylonMaterial.sheen.texture = texture;
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
if (properties.sheenRoughnessFactor !== undefined) {
|
|
64
|
-
babylonMaterial.sheen.roughness = properties.sheenRoughnessFactor;
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
babylonMaterial.sheen.roughness = 0;
|
|
68
|
-
}
|
|
69
|
-
if (properties.sheenRoughnessTexture) {
|
|
70
|
-
properties.sheenRoughnessTexture.nonColorData = true;
|
|
71
|
-
promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenRoughnessTexture`, properties.sheenRoughnessTexture, (texture) => {
|
|
72
|
-
texture.name = `${babylonMaterial.name} (Sheen Roughness)`;
|
|
73
|
-
babylonMaterial.sheen.textureRoughness = texture;
|
|
74
|
-
}));
|
|
75
|
-
}
|
|
76
|
-
babylonMaterial.sheen.albedoScaling = true;
|
|
77
|
-
babylonMaterial.sheen.useRoughnessFromMainTexture = false;
|
|
78
|
-
return Promise.all(promises).then(() => { });
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
unregisterGLTFExtension(NAME);
|
|
82
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_sheen(loader));
|
|
83
|
-
|
|
84
|
-
export { KHR_materials_sheen };
|
|
85
|
-
//# sourceMappingURL=KHR_materials_sheen-BQM2Rjmq.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_sheen-BQM2Rjmq.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_sheen.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_sheen\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#BNIZX6#4)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_sheen {\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 = 190;\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 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._loadSheenPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSheenPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.sheen.isEnabled = true;\n babylonMaterial.sheen.intensity = 1;\n if (properties.sheenColorFactor != undefined) {\n babylonMaterial.sheen.color = Color3.FromArray(properties.sheenColorFactor);\n }\n else {\n babylonMaterial.sheen.color = Color3.Black();\n }\n if (properties.sheenColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenColorTexture`, properties.sheenColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Color)`;\n babylonMaterial.sheen.texture = texture;\n }));\n }\n if (properties.sheenRoughnessFactor !== undefined) {\n babylonMaterial.sheen.roughness = properties.sheenRoughnessFactor;\n }\n else {\n babylonMaterial.sheen.roughness = 0;\n }\n if (properties.sheenRoughnessTexture) {\n properties.sheenRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenRoughnessTexture`, properties.sheenRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Roughness)`;\n babylonMaterial.sheen.textureRoughness = texture;\n }));\n }\n babylonMaterial.sheen.albedoScaling = true;\n babylonMaterial.sheen.useRoughnessFromMainTexture = false;\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_sheen(loader));\n//# sourceMappingURL=KHR_materials_sheen.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC;AACA;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,CAAC;AACzB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;AACzB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;AAC9B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1D,KAAK;AACL;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AAC5B,KAAK;AACL;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,CAAC;AACzC,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;AACxG,YAAY,QAAQ,C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"./index-D5606AHu.esm.min.js";import{GLTFLoader as r}from"./glTFLoader-DOyVt9PU.esm.min.js";import"./rawTexture-Bmw0auoS.esm.min.js";import"./assetContainer-B4RZAzKO.esm.min.js";import"./glTFLoaderAnimation-Cueukaay.esm.min.js";const t="KHR_materials_sheen";class a{constructor(e){this.name=t,this.order=190,this._loader=e,this.enabled=this._loader.isExtensionUsed(t)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,s,n){return r.LoadExtensionAsync(e,s,this.name,((o,r)=>{const t=new Array;return t.push(this._loader.loadMaterialPropertiesAsync(e,s,n)),t.push(this._loadSheenPropertiesAsync(o,r,n)),Promise.all(t).then((()=>{}))}))}_loadSheenPropertiesAsync(n,o,r){if(!(r instanceof e))throw new Error(`${n}: Material type not supported`);const t=new Array;return r.sheen.isEnabled=!0,r.sheen.intensity=1,null!=o.sheenColorFactor?r.sheen.color=s.FromArray(o.sheenColorFactor):r.sheen.color=s.Black(),o.sheenColorTexture&&t.push(this._loader.loadTextureInfoAsync(`${n}/sheenColorTexture`,o.sheenColorTexture,(e=>{e.name=`${r.name} (Sheen Color)`,r.sheen.texture=e}))),void 0!==o.sheenRoughnessFactor?r.sheen.roughness=o.sheenRoughnessFactor:r.sheen.roughness=0,o.sheenRoughnessTexture&&(o.sheenRoughnessTexture.nonColorData=!0,t.push(this._loader.loadTextureInfoAsync(`${n}/sheenRoughnessTexture`,o.sheenRoughnessTexture,(e=>{e.name=`${r.name} (Sheen Roughness)`,r.sheen.textureRoughness=e})))),r.sheen.albedoScaling=!0,r.sheen.useRoughnessFromMainTexture=!1,Promise.all(t).then((()=>{}))}}n(t),o(t,!0,(e=>new a(e)));export{a as KHR_materials_sheen};
|
|
2
|
-
//# sourceMappingURL=KHR_materials_sheen-DV5CnbK2.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_sheen-DV5CnbK2.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_sheen.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_sheen\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_sheen/README.md)\n * [Playground Sample](https://www.babylonjs-playground.com/frame.html#BNIZX6#4)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_sheen {\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 = 190;\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 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._loadSheenPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSheenPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n babylonMaterial.sheen.isEnabled = true;\n babylonMaterial.sheen.intensity = 1;\n if (properties.sheenColorFactor != undefined) {\n babylonMaterial.sheen.color = Color3.FromArray(properties.sheenColorFactor);\n }\n else {\n babylonMaterial.sheen.color = Color3.Black();\n }\n if (properties.sheenColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenColorTexture`, properties.sheenColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Color)`;\n babylonMaterial.sheen.texture = texture;\n }));\n }\n if (properties.sheenRoughnessFactor !== undefined) {\n babylonMaterial.sheen.roughness = properties.sheenRoughnessFactor;\n }\n else {\n babylonMaterial.sheen.roughness = 0;\n }\n if (properties.sheenRoughnessTexture) {\n properties.sheenRoughnessTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/sheenRoughnessTexture`, properties.sheenRoughnessTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Sheen Roughness)`;\n babylonMaterial.sheen.textureRoughness = texture;\n }));\n }\n babylonMaterial.sheen.albedoScaling = true;\n babylonMaterial.sheen.useRoughnessFromMainTexture = false;\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_sheen(loader));\n//# sourceMappingURL=KHR_materials_sheen.js.map"],"names":["NAME","KHR_materials_sheen","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadSheenPropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","sheen","isEnabled","intensity","undefined","sheenColorFactor","color","Color3","FromArray","Black","sheenColorTexture","loadTextureInfoAsync","texture","sheenRoughnessFactor","roughness","sheenRoughnessTexture","nonColorData","textureRoughness","albedoScaling","useRoughnessFromMainTexture","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"8QAIA,MAAMA,EAAO,sBAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,KAAOL,EAIZI,KAAKE,MAAQ,IACbF,KAAKG,QAAUJ,EACfC,KAAKI,QAAUJ,KAAKG,QAAQE,gBAAgBT,EAC/C,CAED,OAAAU,GACIN,KAAKG,QAAU,IAClB,CAID,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB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Y.esm.js';
|
|
2
|
-
import { GLTFLoader } from './glTFLoader-CfuuZdCb.esm.js';
|
|
3
|
-
import './rawTexture-CpYqstLv.esm.js';
|
|
4
|
-
import './assetContainer-B_DdybqS.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-28_L-pzh.esm.js';
|
|
6
|
-
|
|
7
|
-
const NAME = "KHR_materials_specular";
|
|
8
|
-
/**
|
|
9
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)
|
|
10
|
-
*/
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
-
class KHR_materials_specular {
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
constructor(loader) {
|
|
17
|
-
/**
|
|
18
|
-
* The name of this extension.
|
|
19
|
-
*/
|
|
20
|
-
this.name = NAME;
|
|
21
|
-
/**
|
|
22
|
-
* Defines a number that determines the order the extensions are applied.
|
|
23
|
-
*/
|
|
24
|
-
this.order = 190;
|
|
25
|
-
this._loader = loader;
|
|
26
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
27
|
-
}
|
|
28
|
-
/** @internal */
|
|
29
|
-
dispose() {
|
|
30
|
-
this._loader = null;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
36
|
-
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
37
|
-
const promises = new Array();
|
|
38
|
-
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
39
|
-
promises.push(this._loadSpecularPropertiesAsync(extensionContext, extension, babylonMaterial));
|
|
40
|
-
return Promise.all(promises).then(() => { });
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
_loadSpecularPropertiesAsync(context, properties, babylonMaterial) {
|
|
44
|
-
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
45
|
-
throw new Error(`${context}: Material type not supported`);
|
|
46
|
-
}
|
|
47
|
-
const promises = new Array();
|
|
48
|
-
if (properties.specularFactor !== undefined) {
|
|
49
|
-
babylonMaterial.metallicF0Factor = properties.specularFactor;
|
|
50
|
-
}
|
|
51
|
-
if (properties.specularColorFactor !== undefined) {
|
|
52
|
-
babylonMaterial.metallicReflectanceColor = Color3.FromArray(properties.specularColorFactor);
|
|
53
|
-
}
|
|
54
|
-
if (properties.specularTexture) {
|
|
55
|
-
properties.specularTexture.nonColorData = true;
|
|
56
|
-
promises.push(this._loader.loadTextureInfoAsync(`${context}/specularTexture`, properties.specularTexture, (texture) => {
|
|
57
|
-
texture.name = `${babylonMaterial.name} (Specular)`;
|
|
58
|
-
babylonMaterial.metallicReflectanceTexture = texture;
|
|
59
|
-
babylonMaterial.useOnlyMetallicFromMetallicReflectanceTexture = true;
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
if (properties.specularColorTexture) {
|
|
63
|
-
promises.push(this._loader.loadTextureInfoAsync(`${context}/specularColorTexture`, properties.specularColorTexture, (texture) => {
|
|
64
|
-
texture.name = `${babylonMaterial.name} (Specular Color)`;
|
|
65
|
-
babylonMaterial.reflectanceTexture = texture;
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
return Promise.all(promises).then(() => { });
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
unregisterGLTFExtension(NAME);
|
|
72
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_specular(loader));
|
|
73
|
-
|
|
74
|
-
export { KHR_materials_specular };
|
|
75
|
-
//# sourceMappingURL=KHR_materials_specular-4xCkE2rV.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_specular-4xCkE2rV.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_specular.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_specular\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_specular {\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 = 190;\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 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._loadSpecularPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n if (properties.specularFactor !== undefined) {\n babylonMaterial.metallicF0Factor = properties.specularFactor;\n }\n if (properties.specularColorFactor !== undefined) {\n babylonMaterial.metallicReflectanceColor = Color3.FromArray(properties.specularColorFactor);\n }\n if (properties.specularTexture) {\n properties.specularTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularTexture`, properties.specularTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular)`;\n babylonMaterial.metallicReflectanceTexture = texture;\n babylonMaterial.useOnlyMetallicFromMetallicReflectanceTexture = true;\n }));\n }\n if (properties.specularColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularColorTexture`, properties.specularColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Color)`;\n babylonMaterial.reflectanceTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_specular(loader));\n//# sourceMappingURL=KHR_materials_specular.js.map"],"names":[],"mappings":";;;;;;AAIA,MAAM,IAAI,GAAG,wBAAwB,CAAC;AACtC;AACA;AACA;AACA;AACO,MAAM,sBAAsB,CAAC;AACpC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;AACzB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;AAC9B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1D,KAAK;AACL;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;AAC5B,KAAK;AACL;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,CAAC;AACzC,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;AACxG,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,gBAAgB,EAAE,SAAS,EAAE,eAA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AAQ,IAAI,UAAU,CAAC,oBAAoB,EAAE;AAC7C,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,EAAE,UAAU,CAAC,oBAAoB,EAAE,CAAC,OAAO,KAAK;AAC7I,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAC1E,gBAAgB,eAAe,CAAC,kBAAkB,GAAG,OAAO,CAAC;AAC7D,aAAa,CAAC,CAAC,CAAC;AAChB,SAAS;AACT,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AACrD,KAAK;AACL,CAAC;AACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aG as e,e as r,at as a,au as t}from"./index-D5606AHu.esm.min.js";import{GLTFLoader as o}from"./glTFLoader-DOyVt9PU.esm.min.js";import"./rawTexture-Bmw0auoS.esm.min.js";import"./assetContainer-B4RZAzKO.esm.min.js";import"./glTFLoaderAnimation-Cueukaay.esm.min.js";const s="KHR_materials_specular";class l{constructor(e){this.name=s,this.order=190,this._loader=e,this.enabled=this._loader.isExtensionUsed(s)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,r,a){return o.LoadExtensionAsync(e,r,this.name,((t,o)=>{const s=new Array;return s.push(this._loader.loadMaterialPropertiesAsync(e,r,a)),s.push(this._loadSpecularPropertiesAsync(t,o,a)),Promise.all(s).then((()=>{}))}))}_loadSpecularPropertiesAsync(a,t,o){if(!(o instanceof e))throw new Error(`${a}: Material type not supported`);const s=new Array;return void 0!==t.specularFactor&&(o.metallicF0Factor=t.specularFactor),void 0!==t.specularColorFactor&&(o.metallicReflectanceColor=r.FromArray(t.specularColorFactor)),t.specularTexture&&(t.specularTexture.nonColorData=!0,s.push(this._loader.loadTextureInfoAsync(`${a}/specularTexture`,t.specularTexture,(e=>{e.name=`${o.name} (Specular)`,o.metallicReflectanceTexture=e,o.useOnlyMetallicFromMetallicReflectanceTexture=!0})))),t.specularColorTexture&&s.push(this._loader.loadTextureInfoAsync(`${a}/specularColorTexture`,t.specularColorTexture,(e=>{e.name=`${o.name} (Specular Color)`,o.reflectanceTexture=e}))),Promise.all(s).then((()=>{}))}}a(s),t(s,!0,(e=>new l(e)));export{l as KHR_materials_specular};
|
|
2
|
-
//# sourceMappingURL=KHR_materials_specular-CoAFRAcm.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_specular-CoAFRAcm.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_specular.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { Color3 } from \"core/Maths/math.color\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"KHR_materials_specular\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_specular/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_specular {\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 = 190;\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 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._loadSpecularPropertiesAsync(extensionContext, extension, babylonMaterial));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadSpecularPropertiesAsync(context, properties, babylonMaterial) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const promises = new Array();\n if (properties.specularFactor !== undefined) {\n babylonMaterial.metallicF0Factor = properties.specularFactor;\n }\n if (properties.specularColorFactor !== undefined) {\n babylonMaterial.metallicReflectanceColor = Color3.FromArray(properties.specularColorFactor);\n }\n if (properties.specularTexture) {\n properties.specularTexture.nonColorData = true;\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularTexture`, properties.specularTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular)`;\n babylonMaterial.metallicReflectanceTexture = texture;\n babylonMaterial.useOnlyMetallicFromMetallicReflectanceTexture = true;\n }));\n }\n if (properties.specularColorTexture) {\n promises.push(this._loader.loadTextureInfoAsync(`${context}/specularColorTexture`, properties.specularColorTexture, (texture) => {\n texture.name = `${babylonMaterial.name} (Specular Color)`;\n babylonMaterial.reflectanceTexture = texture;\n }));\n }\n return Promise.all(promises).then(() => { });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_specular(loader));\n//# sourceMappingURL=KHR_materials_specular.js.map"],"names":["NAME","KHR_materials_specular","constructor","loader","this","name","order","_loader","enabled","isExtensionUsed","dispose","loadMaterialPropertiesAsync","context","material","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","push","_loadSpecularPropertiesAsync","Promise","all","then","properties","PBRMaterial","Error","undefined","specularFactor","metallicF0Factor","specularColorFactor","metallicReflectanceColor","Color3","FromArray","specularTexture","nonColorData","loadTextureInfoAsync","texture","metallicReflectanceTexture","useOnlyMetallicFromMetallicReflectanceTexture","specularColorTexture","reflectanceTexture","unregisterGLTFExtension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