@babylonjs/viewer 7.40.0-alpha → 7.40.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-CWPYWIWN.esm.min.js +0 -2
- package/dist/chunks/EXT_lights_ies-CWPYWIWN.esm.min.js.map +0 -1
- package/dist/chunks/EXT_lights_ies-DXjx4vS8.esm.js +0 -84
- package/dist/chunks/EXT_lights_ies-DXjx4vS8.esm.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-B-Daha_c.esm.js +0 -171
- package/dist/chunks/EXT_lights_image_based-B-Daha_c.esm.js.map +0 -1
- package/dist/chunks/EXT_lights_image_based-fafIAwHA.esm.min.js +0 -2
- package/dist/chunks/EXT_lights_image_based-fafIAwHA.esm.min.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-CQHNuvea.esm.min.js +0 -2
- package/dist/chunks/EXT_mesh_gpu_instancing-CQHNuvea.esm.min.js.map +0 -1
- package/dist/chunks/EXT_mesh_gpu_instancing-xQzfnk4R.esm.js +0 -86
- package/dist/chunks/EXT_mesh_gpu_instancing-xQzfnk4R.esm.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-B2YW8Jul.esm.min.js +0 -2
- package/dist/chunks/EXT_meshopt_compression-B2YW8Jul.esm.min.js.map +0 -1
- package/dist/chunks/EXT_meshopt_compression-D-WT4x3b.esm.js +0 -134
- package/dist/chunks/EXT_meshopt_compression-D-WT4x3b.esm.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-B3jJQLi_.esm.js +0 -44
- package/dist/chunks/EXT_texture_avif-B3jJQLi_.esm.js.map +0 -1
- package/dist/chunks/EXT_texture_avif-Cdp43X9W.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_avif-Cdp43X9W.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-BnjDmIhh.esm.min.js +0 -2
- package/dist/chunks/EXT_texture_webp-BnjDmIhh.esm.min.js.map +0 -1
- package/dist/chunks/EXT_texture_webp-CJRS8tVF.esm.js +0 -43
- package/dist/chunks/EXT_texture_webp-CJRS8tVF.esm.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-CIJMhaBZ.esm.min.js +0 -2
- package/dist/chunks/ExtrasAsMetadata-CIJMhaBZ.esm.min.js.map +0 -1
- package/dist/chunks/ExtrasAsMetadata-CwbKTcv7.esm.js +0 -64
- package/dist/chunks/ExtrasAsMetadata-CwbKTcv7.esm.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-9iHVi2y-.esm.js +0 -352
- package/dist/chunks/KHR_animation_pointer-9iHVi2y-.esm.js.map +0 -1
- package/dist/chunks/KHR_animation_pointer-CqdJSFtB.esm.min.js +0 -2
- package/dist/chunks/KHR_animation_pointer-CqdJSFtB.esm.min.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-ClL38TL5.esm.min.js +0 -2
- package/dist/chunks/KHR_draco_mesh_compression-ClL38TL5.esm.min.js.map +0 -1
- package/dist/chunks/KHR_draco_mesh_compression-D3dZicO8.esm.js +0 -617
- package/dist/chunks/KHR_draco_mesh_compression-D3dZicO8.esm.js.map +0 -1
- package/dist/chunks/KHR_interactivity-6HrLuIjZ.esm.js +0 -4033
- package/dist/chunks/KHR_interactivity-6HrLuIjZ.esm.js.map +0 -1
- package/dist/chunks/KHR_interactivity-zubZF_6R.esm.min.js +0 -2
- package/dist/chunks/KHR_interactivity-zubZF_6R.esm.min.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-ClmFHdd7.esm.js +0 -581
- package/dist/chunks/KHR_lights_punctual-ClmFHdd7.esm.js.map +0 -1
- package/dist/chunks/KHR_lights_punctual-Fpwx2lSI.esm.min.js +0 -2
- package/dist/chunks/KHR_lights_punctual-Fpwx2lSI.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-DJzuE8wA.esm.js +0 -65
- package/dist/chunks/KHR_materials_anisotropy-DJzuE8wA.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_anisotropy-DXobrZpb.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_anisotropy-DXobrZpb.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-D0969pHH.esm.js +0 -96
- package/dist/chunks/KHR_materials_clearcoat-D0969pHH.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_clearcoat-IanIfR8B.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_clearcoat-IanIfR8B.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-CswRFXu1.esm.js +0 -97
- package/dist/chunks/KHR_materials_diffuse_transmission-CswRFXu1.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_diffuse_transmission-DOSvTGyA.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_diffuse_transmission-DOSvTGyA.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-N7vSa0nU.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_dispersion-N7vSa0nU.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_dispersion-lcuIAf7T.esm.js +0 -62
- package/dist/chunks/KHR_materials_dispersion-lcuIAf7T.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-CYCr0qYT.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_emissive_strength-CYCr0qYT.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_emissive_strength-Ccj9q0E7.esm.js +0 -55
- package/dist/chunks/KHR_materials_emissive_strength-Ccj9q0E7.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-CMGgp610.esm.js +0 -64
- package/dist/chunks/KHR_materials_ior-CMGgp610.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_ior-DLbZJSfw.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_ior-DLbZJSfw.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-DxhjIyld.esm.js +0 -72
- package/dist/chunks/KHR_materials_iridescence-DxhjIyld.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_iridescence-GKx4iT0n.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_iridescence-GKx4iT0n.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BhSexHVn.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-BhSexHVn.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CaAfu_3f.esm.js +0 -81
- package/dist/chunks/KHR_materials_pbrSpecularGlossiness-CaAfu_3f.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-CN1BYTg2.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_sheen-CN1BYTg2.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_sheen-CTrHpM3p.esm.js +0 -85
- package/dist/chunks/KHR_materials_sheen-CTrHpM3p.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-D_qAmusR.esm.js +0 -75
- package/dist/chunks/KHR_materials_specular-D_qAmusR.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_specular-DpKtpzvK.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_specular-DpKtpzvK.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-CxaJK0KS.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_transmission-CxaJK0KS.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_transmission-jJevhaTD.esm.js +0 -307
- package/dist/chunks/KHR_materials_transmission-jJevhaTD.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-B9NoDbLu.esm.js +0 -74
- package/dist/chunks/KHR_materials_unlit-B9NoDbLu.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_unlit-BV2WFURQ.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_unlit-BV2WFURQ.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-BmH6A7LQ.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_variants-BmH6A7LQ.esm.min.js.map +0 -1
- package/dist/chunks/KHR_materials_variants-BwlvUynB.esm.js +0 -262
- package/dist/chunks/KHR_materials_variants-BwlvUynB.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-BxsuFsjg.esm.js +0 -87
- package/dist/chunks/KHR_materials_volume-BxsuFsjg.esm.js.map +0 -1
- package/dist/chunks/KHR_materials_volume-DgaN4xP_.esm.min.js +0 -2
- package/dist/chunks/KHR_materials_volume-DgaN4xP_.esm.min.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-BiqtT9kx.esm.min.js +0 -2
- package/dist/chunks/KHR_mesh_quantization-BiqtT9kx.esm.min.js.map +0 -1
- package/dist/chunks/KHR_mesh_quantization-Dui9vNiN.esm.js +0 -26
- package/dist/chunks/KHR_mesh_quantization-Dui9vNiN.esm.js.map +0 -1
- package/dist/chunks/KHR_node_hoverability-Bb7NACAZ.esm.js +0 -39
- package/dist/chunks/KHR_node_hoverability-Bb7NACAZ.esm.js.map +0 -1
- package/dist/chunks/KHR_node_hoverability-DO_c3jaM.esm.min.js +0 -2
- package/dist/chunks/KHR_node_hoverability-DO_c3jaM.esm.min.js.map +0 -1
- package/dist/chunks/KHR_node_visibility-B5DLk18h.esm.js +0 -46
- package/dist/chunks/KHR_node_visibility-B5DLk18h.esm.js.map +0 -1
- package/dist/chunks/KHR_node_visibility-Cf7iNP2D.esm.min.js +0 -2
- package/dist/chunks/KHR_node_visibility-Cf7iNP2D.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-DgmXsV7i.esm.js +0 -43
- package/dist/chunks/KHR_texture_basisu-DgmXsV7i.esm.js.map +0 -1
- package/dist/chunks/KHR_texture_basisu-O4WmrcrG.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_basisu-O4WmrcrG.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-C2B03Q6l.esm.min.js +0 -2
- package/dist/chunks/KHR_texture_transform-C2B03Q6l.esm.min.js.map +0 -1
- package/dist/chunks/KHR_texture_transform-DkQQG3PK.esm.js +0 -63
- package/dist/chunks/KHR_texture_transform-DkQQG3PK.esm.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-D9eCYTa2.esm.min.js +0 -2
- package/dist/chunks/KHR_xmp_json_ld-D9eCYTa2.esm.min.js.map +0 -1
- package/dist/chunks/KHR_xmp_json_ld-gs5UzU_o.esm.js +0 -51
- package/dist/chunks/KHR_xmp_json_ld-gs5UzU_o.esm.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-B9fkUjJ0.esm.js +0 -2207
- package/dist/chunks/MSFT_audio_emitter-B9fkUjJ0.esm.js.map +0 -1
- package/dist/chunks/MSFT_audio_emitter-DpJ8OxBw.esm.min.js +0 -2
- package/dist/chunks/MSFT_audio_emitter-DpJ8OxBw.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_lod-DS6_zCB0.esm.js +0 -337
- package/dist/chunks/MSFT_lod-DS6_zCB0.esm.js.map +0 -1
- package/dist/chunks/MSFT_lod-qGdnTg6f.esm.min.js +0 -2
- package/dist/chunks/MSFT_lod-qGdnTg6f.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-99ZDXpdT.esm.min.js +0 -2
- package/dist/chunks/MSFT_minecraftMesh-99ZDXpdT.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_minecraftMesh-B60rmY-O.esm.js +0 -46
- package/dist/chunks/MSFT_minecraftMesh-B60rmY-O.esm.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-Br1RUJsD.esm.min.js +0 -2
- package/dist/chunks/MSFT_sRGBFactors-Br1RUJsD.esm.min.js.map +0 -1
- package/dist/chunks/MSFT_sRGBFactors-DVcyl59-.esm.js +0 -47
- package/dist/chunks/MSFT_sRGBFactors-DVcyl59-.esm.js.map +0 -1
- package/dist/chunks/animationGroup-D80NDoJK.esm.min.js +0 -2
- package/dist/chunks/animationGroup-D80NDoJK.esm.min.js.map +0 -1
- package/dist/chunks/animationGroup-DaKL_xr0.esm.js +0 -2482
- package/dist/chunks/animationGroup-DaKL_xr0.esm.js.map +0 -1
- package/dist/chunks/assetContainer-DUHXkzRR.esm.js +0 -1720
- package/dist/chunks/assetContainer-DUHXkzRR.esm.js.map +0 -1
- package/dist/chunks/assetContainer-DrlGfFUd.esm.min.js +0 -2
- package/dist/chunks/assetContainer-DrlGfFUd.esm.min.js.map +0 -1
- package/dist/chunks/audioEngine-BbaOte04.esm.min.js +0 -2
- package/dist/chunks/audioEngine-BbaOte04.esm.min.js.map +0 -1
- package/dist/chunks/audioEngine-Cl77hj6S.esm.js +0 -305
- package/dist/chunks/audioEngine-Cl77hj6S.esm.js.map +0 -1
- package/dist/chunks/bakedVertexAnimation-1Je9P1Wr.esm.js +0 -114
- package/dist/chunks/bakedVertexAnimation-1Je9P1Wr.esm.js.map +0 -1
- package/dist/chunks/bakedVertexAnimation-CqAC8NlK.esm.min.js +0 -2
- package/dist/chunks/bakedVertexAnimation-CqAC8NlK.esm.min.js.map +0 -1
- package/dist/chunks/basisTextureLoader-D6HL2Z1j.esm.js +0 -600
- package/dist/chunks/basisTextureLoader-D6HL2Z1j.esm.js.map +0 -1
- package/dist/chunks/basisTextureLoader-r7SDsKh7.esm.min.js +0 -2
- package/dist/chunks/basisTextureLoader-r7SDsKh7.esm.min.js.map +0 -1
- package/dist/chunks/dds-B3q7zTkZ.esm.js +0 -540
- package/dist/chunks/dds-B3q7zTkZ.esm.js.map +0 -1
- package/dist/chunks/dds-BBiaQw-Y.esm.min.js +0 -2
- package/dist/chunks/dds-BBiaQw-Y.esm.min.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-C4PtTvoL.esm.js +0 -88
- package/dist/chunks/ddsTextureLoader-C4PtTvoL.esm.js.map +0 -1
- package/dist/chunks/ddsTextureLoader-CGA8DF-Z.esm.min.js +0 -2
- package/dist/chunks/ddsTextureLoader-CGA8DF-Z.esm.min.js.map +0 -1
- package/dist/chunks/decalFragment-BTxhBHbp.esm.js +0 -18
- package/dist/chunks/decalFragment-BTxhBHbp.esm.js.map +0 -1
- package/dist/chunks/decalFragment-n8HEgits.esm.min.js +0 -2
- package/dist/chunks/decalFragment-n8HEgits.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-CUJQb4Ds.esm.min.js +0 -2
- package/dist/chunks/default.fragment-CUJQb4Ds.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-CkvRouhO.esm.min.js +0 -2
- package/dist/chunks/default.fragment-CkvRouhO.esm.min.js.map +0 -1
- package/dist/chunks/default.fragment-D3CHq-x9.esm.js +0 -515
- package/dist/chunks/default.fragment-D3CHq-x9.esm.js.map +0 -1
- package/dist/chunks/default.fragment-DIWDeOi3.esm.js +0 -446
- package/dist/chunks/default.fragment-DIWDeOi3.esm.js.map +0 -1
- package/dist/chunks/default.vertex-7EvlstiX.esm.js +0 -181
- package/dist/chunks/default.vertex-7EvlstiX.esm.js.map +0 -1
- package/dist/chunks/default.vertex-DNVWc7Pt.esm.min.js +0 -2
- package/dist/chunks/default.vertex-DNVWc7Pt.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-DRUHVqKs.esm.min.js +0 -2
- package/dist/chunks/default.vertex-DRUHVqKs.esm.min.js.map +0 -1
- package/dist/chunks/default.vertex-Vc6tOJMI.esm.js +0 -202
- package/dist/chunks/default.vertex-Vc6tOJMI.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-Bf-6awzG.esm.js +0 -15
- package/dist/chunks/defaultUboDeclaration-Bf-6awzG.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-DDhQ3CTy.esm.js +0 -13
- package/dist/chunks/defaultUboDeclaration-DDhQ3CTy.esm.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-DYX0y14N.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-DYX0y14N.esm.min.js.map +0 -1
- package/dist/chunks/defaultUboDeclaration-DcdUryhi.esm.min.js +0 -2
- package/dist/chunks/defaultUboDeclaration-DcdUryhi.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-BWNjR_G6.esm.min.js +0 -2
- package/dist/chunks/dumpTools-BWNjR_G6.esm.min.js.map +0 -1
- package/dist/chunks/dumpTools-hegDCvBc.esm.js +0 -200
- package/dist/chunks/dumpTools-hegDCvBc.esm.js.map +0 -1
- package/dist/chunks/engine-CZGy-n30.esm.js +0 -2216
- package/dist/chunks/engine-CZGy-n30.esm.js.map +0 -1
- package/dist/chunks/engine-iddO2T22.esm.min.js +0 -2
- package/dist/chunks/engine-iddO2T22.esm.min.js.map +0 -1
- package/dist/chunks/engine.common-CGXs9MDG.esm.min.js +0 -2
- package/dist/chunks/engine.common-CGXs9MDG.esm.min.js.map +0 -1
- package/dist/chunks/engine.common-Cqb8HjxX.esm.js +0 -1162
- package/dist/chunks/engine.common-Cqb8HjxX.esm.js.map +0 -1
- package/dist/chunks/envTextureLoader-Czm9uAXM.esm.js +0 -64
- package/dist/chunks/envTextureLoader-Czm9uAXM.esm.js.map +0 -1
- package/dist/chunks/envTextureLoader-D-YagZnu.esm.min.js +0 -2
- package/dist/chunks/envTextureLoader-D-YagZnu.esm.min.js.map +0 -1
- package/dist/chunks/environmentTextureTools-B5WZowyO.esm.min.js +0 -2
- package/dist/chunks/environmentTextureTools-B5WZowyO.esm.min.js.map +0 -1
- package/dist/chunks/environmentTextureTools-BrdD2X7A.esm.js +0 -382
- package/dist/chunks/environmentTextureTools-BrdD2X7A.esm.js.map +0 -1
- package/dist/chunks/exrTextureLoader-ClJnk3E3.esm.js +0 -1683
- package/dist/chunks/exrTextureLoader-ClJnk3E3.esm.js.map +0 -1
- package/dist/chunks/exrTextureLoader-s-Mog8_s.esm.min.js +0 -2
- package/dist/chunks/exrTextureLoader-s-Mog8_s.esm.min.js.map +0 -1
- package/dist/chunks/fogFragment-C2vW2rrh.esm.js +0 -102
- package/dist/chunks/fogFragment-C2vW2rrh.esm.js.map +0 -1
- package/dist/chunks/fogFragment-CAmhx99G.esm.min.js +0 -2
- package/dist/chunks/fogFragment-CAmhx99G.esm.min.js.map +0 -1
- package/dist/chunks/fogFragment-VhCT_edc.esm.min.js +0 -2
- package/dist/chunks/fogFragment-VhCT_edc.esm.min.js.map +0 -1
- package/dist/chunks/fogFragment-weVZWTdd.esm.js +0 -101
- package/dist/chunks/fogFragment-weVZWTdd.esm.js.map +0 -1
- package/dist/chunks/fresnelFunction-4cImVcNT.esm.js +0 -12
- package/dist/chunks/fresnelFunction-4cImVcNT.esm.js.map +0 -1
- package/dist/chunks/fresnelFunction-Da1sPcvo.esm.min.js +0 -2
- package/dist/chunks/fresnelFunction-Da1sPcvo.esm.min.js.map +0 -1
- package/dist/chunks/glTFLoader-7uvFneFt.esm.js +0 -7586
- package/dist/chunks/glTFLoader-7uvFneFt.esm.js.map +0 -1
- package/dist/chunks/glTFLoader-ChTng_Ew.esm.min.js +0 -2
- package/dist/chunks/glTFLoader-ChTng_Ew.esm.min.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-BeBTAsWq.esm.js +0 -77
- package/dist/chunks/glTFLoaderAnimation-BeBTAsWq.esm.js.map +0 -1
- package/dist/chunks/glTFLoaderAnimation-CCHLAoRK.esm.min.js +0 -2
- package/dist/chunks/glTFLoaderAnimation-CCHLAoRK.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-CIez3XpU.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-CIez3XpU.esm.min.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-CjYmCnUh.esm.min.js +0 -2
- package/dist/chunks/harmonicsFunctions-CjYmCnUh.esm.min.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-D8X6XkcB.esm.js +0 -35
- package/dist/chunks/harmonicsFunctions-D8X6XkcB.esm.js.map +0 -1
- package/dist/chunks/harmonicsFunctions-i7q2aWAO.esm.js +0 -34
- package/dist/chunks/harmonicsFunctions-i7q2aWAO.esm.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-C6WR9qDu.esm.min.js +0 -2
- package/dist/chunks/hdrTextureLoader-C6WR9qDu.esm.min.js.map +0 -1
- package/dist/chunks/hdrTextureLoader-DdEmyqh5.esm.js +0 -253
- package/dist/chunks/hdrTextureLoader-DdEmyqh5.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-B8W8JpaI.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-B8W8JpaI.esm.min.js.map +0 -1
- package/dist/chunks/helperFunctions-CV2C3XEf.esm.js +0 -108
- package/dist/chunks/helperFunctions-CV2C3XEf.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-CgUf8pyk.esm.js +0 -80
- package/dist/chunks/helperFunctions-CgUf8pyk.esm.js.map +0 -1
- package/dist/chunks/helperFunctions-VM--MJVI.esm.min.js +0 -2
- package/dist/chunks/helperFunctions-VM--MJVI.esm.min.js.map +0 -1
- package/dist/chunks/iesTextureLoader-BuScKRlS.esm.js +0 -189
- package/dist/chunks/iesTextureLoader-BuScKRlS.esm.js.map +0 -1
- package/dist/chunks/iesTextureLoader-if1ntALJ.esm.min.js +0 -2
- package/dist/chunks/iesTextureLoader-if1ntALJ.esm.min.js.map +0 -1
- package/dist/chunks/index-7pOUdivR.esm.js +0 -74709
- package/dist/chunks/index-7pOUdivR.esm.js.map +0 -1
- package/dist/chunks/index-CHb7NKRY.esm.min.js +0 -57
- package/dist/chunks/index-CHb7NKRY.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-9L7lCOMk.esm.min.js +0 -2
- package/dist/chunks/ktxTextureLoader-9L7lCOMk.esm.min.js.map +0 -1
- package/dist/chunks/ktxTextureLoader-Ct-9NIcu.esm.js +0 -814
- package/dist/chunks/ktxTextureLoader-Ct-9NIcu.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-CFHaSiET.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-CFHaSiET.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-Cqb_Zo_s.esm.js +0 -11
- package/dist/chunks/logDepthDeclaration-Cqb_Zo_s.esm.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-DCW2NExX.esm.min.js +0 -2
- package/dist/chunks/logDepthDeclaration-DCW2NExX.esm.min.js.map +0 -1
- package/dist/chunks/logDepthDeclaration-oJ9tNQ3q.esm.js +0 -35
- package/dist/chunks/logDepthDeclaration-oJ9tNQ3q.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-BCP-KTtt.esm.js +0 -81
- package/dist/chunks/logDepthVertex-BCP-KTtt.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-BwYkGLpu.esm.js +0 -77
- package/dist/chunks/logDepthVertex-BwYkGLpu.esm.js.map +0 -1
- package/dist/chunks/logDepthVertex-DoyGVTWA.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-DoyGVTWA.esm.min.js.map +0 -1
- package/dist/chunks/logDepthVertex-WdJWwsLV.esm.min.js +0 -2
- package/dist/chunks/logDepthVertex-WdJWwsLV.esm.min.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-B_ziE3K3.esm.min.js +0 -2
- package/dist/chunks/mainUVVaryingDeclaration-B_ziE3K3.esm.min.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-CRWcERPP.esm.js +0 -11
- package/dist/chunks/mainUVVaryingDeclaration-CRWcERPP.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-NuhfZTP4.esm.js +0 -11
- package/dist/chunks/mainUVVaryingDeclaration-NuhfZTP4.esm.js.map +0 -1
- package/dist/chunks/mainUVVaryingDeclaration-_WOgDBUD.esm.min.js +0 -2
- package/dist/chunks/mainUVVaryingDeclaration-_WOgDBUD.esm.min.js.map +0 -1
- package/dist/chunks/meshUboDeclaration-BkKdZCAL.esm.min.js +0 -2
- package/dist/chunks/meshUboDeclaration-BkKdZCAL.esm.min.js.map +0 -1
- package/dist/chunks/meshUboDeclaration-VO75rv0M.esm.js +0 -26
- package/dist/chunks/meshUboDeclaration-VO75rv0M.esm.js.map +0 -1
- package/dist/chunks/objFileLoader-BcUlaMO0.esm.min.js +0 -2
- package/dist/chunks/objFileLoader-BcUlaMO0.esm.min.js.map +0 -1
- package/dist/chunks/objFileLoader-CrSk62pN.esm.js +0 -1338
- package/dist/chunks/objFileLoader-CrSk62pN.esm.js.map +0 -1
- package/dist/chunks/oitFragment-9xHvc1pY.esm.min.js +0 -2
- package/dist/chunks/oitFragment-9xHvc1pY.esm.min.js.map +0 -1
- package/dist/chunks/oitFragment-BedTygSm.esm.js +0 -1240
- package/dist/chunks/oitFragment-BedTygSm.esm.js.map +0 -1
- package/dist/chunks/oitFragment-Dx3jhb-Y.esm.js +0 -1078
- package/dist/chunks/oitFragment-Dx3jhb-Y.esm.js.map +0 -1
- package/dist/chunks/oitFragment-wsShal2z.esm.min.js +0 -2
- package/dist/chunks/oitFragment-wsShal2z.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-BAFAqEd3.esm.js +0 -15
- package/dist/chunks/pass.fragment-BAFAqEd3.esm.js.map +0 -1
- package/dist/chunks/pass.fragment-BCDgjoaP.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-BCDgjoaP.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-Cw2vMur1.esm.min.js +0 -2
- package/dist/chunks/pass.fragment-Cw2vMur1.esm.min.js.map +0 -1
- package/dist/chunks/pass.fragment-DvVPDD3q.esm.js +0 -15
- package/dist/chunks/pass.fragment-DvVPDD3q.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-BEgWbv9s.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-BEgWbv9s.esm.min.js.map +0 -1
- package/dist/chunks/pbr.fragment-CR8wXt2w.esm.js +0 -3232
- package/dist/chunks/pbr.fragment-CR8wXt2w.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-CmVN3-cU.esm.js +0 -3273
- package/dist/chunks/pbr.fragment-CmVN3-cU.esm.js.map +0 -1
- package/dist/chunks/pbr.fragment-DXqzm4Ha.esm.min.js +0 -2
- package/dist/chunks/pbr.fragment-DXqzm4Ha.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-B7DptLQs.esm.js +0 -214
- package/dist/chunks/pbr.vertex-B7DptLQs.esm.js.map +0 -1
- package/dist/chunks/pbr.vertex-BNDn-K_8.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-BNDn-K_8.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-Cp8jkMaM.esm.min.js +0 -2
- package/dist/chunks/pbr.vertex-Cp8jkMaM.esm.min.js.map +0 -1
- package/dist/chunks/pbr.vertex-rvNW4KDh.esm.js +0 -339
- package/dist/chunks/pbr.vertex-rvNW4KDh.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-BRHkF-uK.esm.js +0 -20
- package/dist/chunks/postprocess.vertex-BRHkF-uK.esm.js.map +0 -1
- package/dist/chunks/postprocess.vertex-QT9kbb4b.esm.min.js +0 -2
- package/dist/chunks/postprocess.vertex-QT9kbb4b.esm.min.js.map +0 -1
- package/dist/chunks/rawTexture-CS3J_QPB.esm.min.js +0 -2
- package/dist/chunks/rawTexture-CS3J_QPB.esm.min.js.map +0 -1
- package/dist/chunks/rawTexture-CTQXP4lW.esm.js +0 -191
- package/dist/chunks/rawTexture-CTQXP4lW.esm.js.map +0 -1
- package/dist/chunks/ray-D1I6_i0K.esm.js +0 -946
- package/dist/chunks/ray-D1I6_i0K.esm.js.map +0 -1
- package/dist/chunks/ray-ffMmFIRM.esm.min.js +0 -2
- package/dist/chunks/ray-ffMmFIRM.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-BuXAGpKo.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-BuXAGpKo.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-Uqqwk9hd.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-Uqqwk9hd.esm.min.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-iifwD2Tq.esm.js +0 -17
- package/dist/chunks/rgbdDecode.fragment-iifwD2Tq.esm.js.map +0 -1
- package/dist/chunks/rgbdDecode.fragment-ykJ6BacZ.esm.min.js +0 -2
- package/dist/chunks/rgbdDecode.fragment-ykJ6BacZ.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-B8trM95E.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-B8trM95E.esm.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-Dk50Ggfr.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-Dk50Ggfr.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-OfZ629fV.esm.min.js +0 -2
- package/dist/chunks/rgbdEncode.fragment-OfZ629fV.esm.min.js.map +0 -1
- package/dist/chunks/rgbdEncode.fragment-S4QKY6JX.esm.js +0 -17
- package/dist/chunks/rgbdEncode.fragment-S4QKY6JX.esm.js.map +0 -1
- package/dist/chunks/splatFileLoader-BKRNi0Kz.esm.js +0 -3379
- package/dist/chunks/splatFileLoader-BKRNi0Kz.esm.js.map +0 -1
- package/dist/chunks/splatFileLoader-Bii2polh.esm.min.js +0 -2
- package/dist/chunks/splatFileLoader-Bii2polh.esm.min.js.map +0 -1
- package/dist/chunks/spotLight-Bx97rCpk.esm.js +0 -701
- package/dist/chunks/spotLight-Bx97rCpk.esm.js.map +0 -1
- package/dist/chunks/spotLight-WYJhdyXT.esm.min.js +0 -2
- package/dist/chunks/spotLight-WYJhdyXT.esm.min.js.map +0 -1
- package/dist/chunks/standardMaterial-B2COaxO7.esm.min.js +0 -2
- package/dist/chunks/standardMaterial-B2COaxO7.esm.min.js.map +0 -1
- package/dist/chunks/standardMaterial-DobO9sHt.esm.js +0 -1805
- package/dist/chunks/standardMaterial-DobO9sHt.esm.js.map +0 -1
- package/dist/chunks/stlFileLoader-BA8gtxRg.esm.js +0 -238
- package/dist/chunks/stlFileLoader-BA8gtxRg.esm.js.map +0 -1
- package/dist/chunks/stlFileLoader-hIvh4jC_.esm.min.js +0 -2
- package/dist/chunks/stlFileLoader-hIvh4jC_.esm.min.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-BVKXLe7s.esm.js +0 -349
- package/dist/chunks/tgaTextureLoader-BVKXLe7s.esm.js.map +0 -1
- package/dist/chunks/tgaTextureLoader-autBbrGZ.esm.min.js +0 -2
- package/dist/chunks/tgaTextureLoader-autBbrGZ.esm.min.js.map +0 -1
- package/dist/chunks/thinEngine-BPspbumB.esm.min.js +0 -2
- package/dist/chunks/thinEngine-BPspbumB.esm.min.js.map +0 -1
- package/dist/chunks/thinEngine-wr-z1XFG.esm.js +0 -3848
- package/dist/chunks/thinEngine-wr-z1XFG.esm.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-D2RBwifP.esm.min.js +0 -2
- package/dist/chunks/thinInstanceMesh-D2RBwifP.esm.min.js.map +0 -1
- package/dist/chunks/thinInstanceMesh-DVy1Ya49.esm.js +0 -314
- package/dist/chunks/thinInstanceMesh-DVy1Ya49.esm.js.map +0 -1
- package/dist/chunks/vertexColorMixing-B_-b5IVj.esm.js +0 -522
- package/dist/chunks/vertexColorMixing-B_-b5IVj.esm.js.map +0 -1
- package/dist/chunks/vertexColorMixing-Bd53icV7.esm.min.js +0 -2
- package/dist/chunks/vertexColorMixing-Bd53icV7.esm.min.js.map +0 -1
- package/dist/chunks/vertexColorMixing-Bm_nb2CS.esm.js +0 -412
- package/dist/chunks/vertexColorMixing-Bm_nb2CS.esm.js.map +0 -1
- package/dist/chunks/vertexColorMixing-DogY4EnF.esm.min.js +0 -2
- package/dist/chunks/vertexColorMixing-DogY4EnF.esm.min.js.map +0 -1
- package/dist/chunks/webgpuEngine-CZnjGjDY.esm.min.js +0 -2
- package/dist/chunks/webgpuEngine-CZnjGjDY.esm.min.js.map +0 -1
- package/dist/chunks/webgpuEngine-DQcXBSQC.esm.js +0 -11533
- package/dist/chunks/webgpuEngine-DQcXBSQC.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 -559
- package/lib/index.js +0 -2083
- package/lib/index.js.map +0 -1
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { a_ as PBRMaterial, s as Color3, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-7pOUdivR.esm.js';
|
|
2
|
-
import { G as GLTFLoader } from './glTFLoader-7uvFneFt.esm.js';
|
|
3
|
-
import './rawTexture-CTQXP4lW.esm.js';
|
|
4
|
-
import './assetContainer-DUHXkzRR.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-BeBTAsWq.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-CTrHpM3p.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_sheen-CTrHpM3p.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;AAClC;AACA;AACA;AACA;AACA;AACO,MAAM,mBAAmB,CAAC;AACjC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AAC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BAAkB,CAAC;AAC1E,gBAAgB,eAAe,CAAC,KAAK,CAAC,gBAAgB,GAAG,OAAO;AAChE,aAAa,CAAC,CAAC;AACf;AACA,QAAQ,eAAe,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI;AAClD,QAAQ,eAAe,CAAC,KAAK,CAAC,2BAA2B,GAAG,KAAK;AACjE,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;AACpD;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { a_ as PBRMaterial, s as Color3, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-7pOUdivR.esm.js';
|
|
2
|
-
import { G as GLTFLoader } from './glTFLoader-7uvFneFt.esm.js';
|
|
3
|
-
import './rawTexture-CTQXP4lW.esm.js';
|
|
4
|
-
import './assetContainer-DUHXkzRR.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-BeBTAsWq.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-D_qAmusR.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_specular-D_qAmusR.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;AACrC;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;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,QAA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e,CAAC,YAAY,GAAG,IAAI;AAC1D,YAAY,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC,eAAe,EAAE,CAAC,OAAO,KAAK;AACnI,gBAAgB,OAAO,CAAC,IAAI,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC;AACnE,gBAAgB,eAAe,CAAC,0BAA0B,GAAG,OAAO;AACpE,gBAAgB,eAAe,CAAC,6CAA6C,GAAG,IAAI;AACpF,aAAa,CAAC,CAAC;AACf;AACA,QAAQ,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;AACzE,gBAAgB,eAAe,CAAC,kBAAkB,GAAG,OAAO;AAC5D,aAAa,CAAC,CAAC;AACf;AACA,QAAQ,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;AACpD;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,sBAAsB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a_ as e,s as r,aP as a,aQ as s}from"./index-CHb7NKRY.esm.min.js";import{G as o}from"./glTFLoader-ChTng_Ew.esm.min.js";import"./rawTexture-CS3J_QPB.esm.min.js";import"./assetContainer-DrlGfFUd.esm.min.js";import"./glTFLoaderAnimation-CCHLAoRK.esm.min.js";const t="KHR_materials_specular";class l{constructor(e){this.name=t,this.order=190,this._loader=e,this.enabled=this._loader.isExtensionUsed(t)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,r,a){return o.LoadExtensionAsync(e,r,this.name,((s,o)=>{const t=new Array;return t.push(this._loader.loadMaterialPropertiesAsync(e,r,a)),t.push(this._loadSpecularPropertiesAsync(s,o,a)),Promise.all(t).then((()=>{}))}))}_loadSpecularPropertiesAsync(a,s,o){if(!(o instanceof e))throw new Error(`${a}: Material type not supported`);const t=new Array;return void 0!==s.specularFactor&&(o.metallicF0Factor=s.specularFactor),void 0!==s.specularColorFactor&&(o.metallicReflectanceColor=r.FromArray(s.specularColorFactor)),s.specularTexture&&(s.specularTexture.nonColorData=!0,t.push(this._loader.loadTextureInfoAsync(`${a}/specularTexture`,s.specularTexture,(e=>{e.name=`${o.name} (Specular)`,o.metallicReflectanceTexture=e,o.useOnlyMetallicFromMetallicReflectanceTexture=!0})))),s.specularColorTexture&&t.push(this._loader.loadTextureInfoAsync(`${a}/specularColorTexture`,s.specularColorTexture,(e=>{e.name=`${o.name} (Specular Color)`,o.reflectanceTexture=e}))),Promise.all(t).then((()=>{}))}}a(t),s(t,!0,(e=>new l(e)));export{l as KHR_materials_specular};
|
|
2
|
-
//# sourceMappingURL=KHR_materials_specular-DpKtpzvK.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_specular-DpKtpzvK.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","registerGLTFExtension"],"mappings":"qQAIA,MAAMA,EAAO,yBAKN,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,2BAAAI,CAA4BC,EAASC,EAAUC,GAC3C,OAAOC,EAAWC,mBAAmBJ,EAASC,EAAUT,KAAKC,MAAM,CAACY,EAAkBC,KAClF,MAAMC,EAAW,IAAIC,MAGrB,OAFAD,EAASE,KAAKjB,KAAKG,QAAQI,4BAA4BC,EAASC,EAAUC,IAC1EK,EAASE,KAAKjB,KAAKkB,6BAA6BL,EAAkBC,EAAWJ,IACtES,QAAQC,IAAIL,GAAUM,MAAK,QAAU,GAExD,CACI,4BAAAH,CAA6BV,EAASc,EAAYZ,GAC9C,KAAMA,aAA2Ba,GAC7B,MAAM,IAAIC,MAAM,GAAGhB,kCAEvB,MAAMO,EAAW,IAAIC,MAqBrB,YApBkCS,IAA9BH,EAAWI,iBACXhB,EAAgBiB,iBAAmBL,EAAWI,qBAEXD,IAAnCH,EAAWM,sBACXlB,EAAgBmB,yBAA2BC,EAAOC,UAAUT,EAAWM,sBAEvEN,EAAWU,kBACXV,EAAWU,gBAAgBC,cAAe,EAC1ClB,EAASE,KAAKjB,KAAKG,QAAQ+B,qBAAqB,GAAG1B,oBAA2Bc,EAAWU,iBAAkBG,IACvGA,EAAQlC,KAAO,GAAGS,EAAgBT,kBAClCS,EAAgB0B,2BAA6BD,EAC7CzB,EAAgB2B,+CAAgD,CAAI,MAGxEf,EAAWgB,sBACXvB,EAASE,KAAKjB,KAAKG,QAAQ+B,qBAAqB,GAAG1B,yBAAgCc,EAAWgB,sBAAuBH,IACjHA,EAAQlC,KAAO,GAAGS,EAAgBT,wBAClCS,EAAgB6B,mBAAqBJ,CAAO,KAG7ChB,QAAQC,IAAIL,GAAUM,MAAK,QAC1C,EAEAmB,EAAwB5C,GACxB6C,EAAsB7C,GAAM,GAAOG,GAAW,IAAIF,EAAuBE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a_ as e,aP as s,aQ as t,C as r,aU as a,T as n,bB as i}from"./index-CHb7NKRY.esm.min.js";import{G as o}from"./glTFLoader-ChTng_Ew.esm.min.js";import"./rawTexture-CS3J_QPB.esm.min.js";import"./assetContainer-DrlGfFUd.esm.min.js";import"./glTFLoaderAnimation-CCHLAoRK.esm.min.js";class h{static _GetDefaultOptions(){return{renderSize:1024,samples:4,lodGenerationScale:1,lodGenerationOffset:-4,renderTargetTextureType:r.TEXTURETYPE_HALF_FLOAT,generateMipmaps:!0}}constructor(e,s){this._opaqueRenderTarget=null,this._opaqueMeshesCache=[],this._transparentMeshesCache=[],this._materialObservers={},this._options={...h._GetDefaultOptions(),...e},this._scene=s,this._scene._transmissionHelper=this,this.onErrorObservable=new a,this._scene.onDisposeObservable.addOnce((()=>{this.dispose()})),this._parseScene(),this._setupRenderTargets()}updateOptions(e){if(!Object.keys(e).filter((s=>this._options[s]!==e[s])).length)return;const s={...this._options,...e},t=this._options;this._options=s,s.renderSize===t.renderSize&&s.renderTargetTextureType===t.renderTargetTextureType&&s.generateMipmaps===t.generateMipmaps&&this._opaqueRenderTarget?(this._opaqueRenderTarget.samples=s.samples,this._opaqueRenderTarget.lodGenerationScale=s.lodGenerationScale,this._opaqueRenderTarget.lodGenerationOffset=s.lodGenerationOffset):this._setupRenderTargets()}getOpaqueTarget(){return this._opaqueRenderTarget}_shouldRenderAsTransmission(s){return!!s&&!!(s instanceof e&&s.subSurface.isRefractionEnabled)}_addMesh(e){this._materialObservers[e.uniqueId]=e.onMaterialChangedObservable.add(this._onMeshMaterialChanged.bind(this)),n.SetImmediate((()=>{this._shouldRenderAsTransmission(e.material)?(e.material.refractionTexture=this._opaqueRenderTarget,-1===this._transparentMeshesCache.indexOf(e)&&this._transparentMeshesCache.push(e)):-1===this._opaqueMeshesCache.indexOf(e)&&this._opaqueMeshesCache.push(e)}))}_removeMesh(e){e.onMaterialChangedObservable.remove(this._materialObservers[e.uniqueId]),delete this._materialObservers[e.uniqueId];let s=this._transparentMeshesCache.indexOf(e);-1!==s&&this._transparentMeshesCache.splice(s,1),s=this._opaqueMeshesCache.indexOf(e),-1!==s&&this._opaqueMeshesCache.splice(s,1)}_parseScene(){this._scene.meshes.forEach(this._addMesh.bind(this)),this._scene.onNewMeshAddedObservable.add(this._addMesh.bind(this)),this._scene.onMeshRemovedObservable.add(this._removeMesh.bind(this))}_onMeshMaterialChanged(s){const t=this._transparentMeshesCache.indexOf(s),r=this._opaqueMeshesCache.indexOf(s);this._shouldRenderAsTransmission(s.material)?(s.material instanceof e&&(s.material.subSurface.refractionTexture=this._opaqueRenderTarget),-1!==r?(this._opaqueMeshesCache.splice(r,1),this._transparentMeshesCache.push(s)):-1===t&&this._transparentMeshesCache.push(s)):-1!==t?(this._transparentMeshesCache.splice(t,1),this._opaqueMeshesCache.push(s)):-1===r&&this._opaqueMeshesCache.push(s)}_isRenderTargetValid(){return null!==this._opaqueRenderTarget?.getInternalTexture()}_setupRenderTargets(){let e,s;this._opaqueRenderTarget&&this._opaqueRenderTarget.dispose(),this._opaqueRenderTarget=new i("opaqueSceneTexture",this._options.renderSize,this._scene,this._options.generateMipmaps,void 0,this._options.renderTargetTextureType),this._opaqueRenderTarget.ignoreCameraViewport=!0,this._opaqueRenderTarget.renderList=this._opaqueMeshesCache,this._opaqueRenderTarget.clearColor=this._options.clearColor?.clone()??this._scene.clearColor.clone(),this._opaqueRenderTarget.gammaSpace=!1,this._opaqueRenderTarget.lodGenerationScale=this._options.lodGenerationScale,this._opaqueRenderTarget.lodGenerationOffset=this._options.lodGenerationOffset,this._opaqueRenderTarget.samples=this._options.samples,this._opaqueRenderTarget.renderSprites=!0,this._opaqueRenderTarget.renderParticles=!0,this._opaqueRenderTarget.onBeforeBindObservable.add((t=>{s=this._scene.environmentIntensity,this._scene.environmentIntensity=1,e=this._scene.imageProcessingConfiguration.applyByPostProcess,this._options.clearColor?t.clearColor.copyFrom(this._options.clearColor):this._scene.clearColor.toLinearSpaceToRef(t.clearColor,this._scene.getEngine().useExactSrgbConversions),this._scene.imageProcessingConfiguration._applyByPostProcess=!0})),this._opaqueRenderTarget.onAfterUnbindObservable.add((()=>{this._scene.environmentIntensity=s,this._scene.imageProcessingConfiguration._applyByPostProcess=e})),this._transparentMeshesCache.forEach((e=>{this._shouldRenderAsTransmission(e.material)&&(e.material.refractionTexture=this._opaqueRenderTarget)}))}dispose(){this._scene._transmissionHelper=void 0,this._opaqueRenderTarget&&(this._opaqueRenderTarget.dispose(),this._opaqueRenderTarget=null),this._transparentMeshesCache=[],this._opaqueMeshesCache=[]}}const p="KHR_materials_transmission";class d{constructor(e){this.name=p,this.order=175,this._loader=e,this.enabled=this._loader.isExtensionUsed(p),this.enabled&&(e.parent.transparencyAsCoverage=!0)}dispose(){this._loader=null}loadMaterialPropertiesAsync(e,s,t){return o.LoadExtensionAsync(e,s,this.name,((r,a)=>{const n=new Array;return n.push(this._loader.loadMaterialPropertiesAsync(e,s,t)),n.push(this._loadTransparentPropertiesAsync(r,s,t,a)),Promise.all(n).then((()=>{}))}))}_loadTransparentPropertiesAsync(s,t,r,a){if(!(r instanceof e))throw new Error(`${s}: Material type not supported`);const n=r;if(n.subSurface.isRefractionEnabled=!0,n.subSurface.volumeIndexOfRefraction=1,n.subSurface.useAlbedoToTintRefraction=!0,void 0===a.transmissionFactor)return n.subSurface.refractionIntensity=0,n.subSurface.isRefractionEnabled=!1,Promise.resolve();{n.subSurface.refractionIntensity=a.transmissionFactor;const e=n.getScene();n.subSurface.refractionIntensity&&!e._transmissionHelper?new h({},n.getScene()):n.subSurface.refractionIntensity&&!e._transmissionHelper?._isRenderTargetValid()&&e._transmissionHelper?._setupRenderTargets()}return n.subSurface.minimumThickness=0,n.subSurface.maximumThickness=0,a.transmissionTexture?(a.transmissionTexture.nonColorData=!0,this._loader.loadTextureInfoAsync(`${s}/transmissionTexture`,a.transmissionTexture,void 0).then((e=>{e.name=`${r.name} (Transmission)`,n.subSurface.refractionIntensityTexture=e,n.subSurface.useGltfStyleTextures=!0}))):Promise.resolve()}}s(p),t(p,!0,(e=>new d(e)));export{d as KHR_materials_transmission};
|
|
2
|
-
//# sourceMappingURL=KHR_materials_transmission-CxaJK0KS.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KHR_materials_transmission-CxaJK0KS.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/KHR_materials_transmission.js"],"sourcesContent":["import { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\nimport { GLTFLoader } from \"../glTFLoader\";\nimport { RenderTargetTexture } from \"core/Materials/Textures/renderTargetTexture\";\nimport { Observable } from \"core/Misc/observable\";\nimport { Constants } from \"core/Engines/constants\";\nimport { Tools } from \"core/Misc/tools\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\n/**\n * A class to handle setting up the rendering of opaque objects to be shown through transmissive objects.\n */\nclass TransmissionHelper {\n /**\n * Creates the default options for the helper.\n * @returns the default options\n */\n static _GetDefaultOptions() {\n return {\n renderSize: 1024,\n samples: 4,\n lodGenerationScale: 1,\n lodGenerationOffset: -4,\n renderTargetTextureType: Constants.TEXTURETYPE_HALF_FLOAT,\n generateMipmaps: true,\n };\n }\n /**\n * constructor\n * @param options Defines the options we want to customize the helper\n * @param scene The scene to add the material to\n */\n constructor(options, scene) {\n this._opaqueRenderTarget = null;\n this._opaqueMeshesCache = [];\n this._transparentMeshesCache = [];\n this._materialObservers = {};\n this._options = {\n ...TransmissionHelper._GetDefaultOptions(),\n ...options,\n };\n this._scene = scene;\n this._scene._transmissionHelper = this;\n this.onErrorObservable = new Observable();\n this._scene.onDisposeObservable.addOnce(() => {\n this.dispose();\n });\n this._parseScene();\n this._setupRenderTargets();\n }\n /**\n * Updates the background according to the new options\n * @param options\n */\n updateOptions(options) {\n // First check if any options are actually being changed. If not, exit.\n const newValues = Object.keys(options).filter((key) => this._options[key] !== options[key]);\n if (!newValues.length) {\n return;\n }\n const newOptions = {\n ...this._options,\n ...options,\n };\n const oldOptions = this._options;\n this._options = newOptions;\n // If size changes, recreate everything\n if (newOptions.renderSize !== oldOptions.renderSize ||\n newOptions.renderTargetTextureType !== oldOptions.renderTargetTextureType ||\n newOptions.generateMipmaps !== oldOptions.generateMipmaps ||\n !this._opaqueRenderTarget) {\n this._setupRenderTargets();\n }\n else {\n this._opaqueRenderTarget.samples = newOptions.samples;\n this._opaqueRenderTarget.lodGenerationScale = newOptions.lodGenerationScale;\n this._opaqueRenderTarget.lodGenerationOffset = newOptions.lodGenerationOffset;\n }\n }\n /**\n * @returns the opaque render target texture or null if not available.\n */\n getOpaqueTarget() {\n return this._opaqueRenderTarget;\n }\n _shouldRenderAsTransmission(material) {\n if (!material) {\n return false;\n }\n if (material instanceof PBRMaterial && material.subSurface.isRefractionEnabled) {\n return true;\n }\n return false;\n }\n _addMesh(mesh) {\n this._materialObservers[mesh.uniqueId] = mesh.onMaterialChangedObservable.add(this._onMeshMaterialChanged.bind(this));\n // we need to defer the processing because _addMesh may be called as part as an instance mesh creation, in which case some\n // internal properties are not setup yet, like _sourceMesh (needed when doing mesh.material below)\n Tools.SetImmediate(() => {\n if (this._shouldRenderAsTransmission(mesh.material)) {\n mesh.material.refractionTexture = this._opaqueRenderTarget;\n if (this._transparentMeshesCache.indexOf(mesh) === -1) {\n this._transparentMeshesCache.push(mesh);\n }\n }\n else {\n if (this._opaqueMeshesCache.indexOf(mesh) === -1) {\n this._opaqueMeshesCache.push(mesh);\n }\n }\n });\n }\n _removeMesh(mesh) {\n mesh.onMaterialChangedObservable.remove(this._materialObservers[mesh.uniqueId]);\n delete this._materialObservers[mesh.uniqueId];\n let idx = this._transparentMeshesCache.indexOf(mesh);\n if (idx !== -1) {\n this._transparentMeshesCache.splice(idx, 1);\n }\n idx = this._opaqueMeshesCache.indexOf(mesh);\n if (idx !== -1) {\n this._opaqueMeshesCache.splice(idx, 1);\n }\n }\n _parseScene() {\n this._scene.meshes.forEach(this._addMesh.bind(this));\n // Listen for when a mesh is added to the scene and add it to our cache lists.\n this._scene.onNewMeshAddedObservable.add(this._addMesh.bind(this));\n // Listen for when a mesh is removed from to the scene and remove it from our cache lists.\n this._scene.onMeshRemovedObservable.add(this._removeMesh.bind(this));\n }\n // When one of the meshes in the scene has its material changed, make sure that it's in the correct cache list.\n _onMeshMaterialChanged(mesh) {\n const transparentIdx = this._transparentMeshesCache.indexOf(mesh);\n const opaqueIdx = this._opaqueMeshesCache.indexOf(mesh);\n // If the material is transparent, make sure that it's added to the transparent list and removed from the opaque list\n const useTransmission = this._shouldRenderAsTransmission(mesh.material);\n if (useTransmission) {\n if (mesh.material instanceof PBRMaterial) {\n mesh.material.subSurface.refractionTexture = this._opaqueRenderTarget;\n }\n if (opaqueIdx !== -1) {\n this._opaqueMeshesCache.splice(opaqueIdx, 1);\n this._transparentMeshesCache.push(mesh);\n }\n else if (transparentIdx === -1) {\n this._transparentMeshesCache.push(mesh);\n }\n // If the material is opaque, make sure that it's added to the opaque list and removed from the transparent list\n }\n else {\n if (transparentIdx !== -1) {\n this._transparentMeshesCache.splice(transparentIdx, 1);\n this._opaqueMeshesCache.push(mesh);\n }\n else if (opaqueIdx === -1) {\n this._opaqueMeshesCache.push(mesh);\n }\n }\n }\n /**\n * @internal\n * Check if the opaque render target has not been disposed and can still be used.\n * @returns\n */\n _isRenderTargetValid() {\n return this._opaqueRenderTarget?.getInternalTexture() !== null;\n }\n /**\n * @internal\n * Setup the render targets according to the specified options.\n */\n _setupRenderTargets() {\n if (this._opaqueRenderTarget) {\n this._opaqueRenderTarget.dispose();\n }\n this._opaqueRenderTarget = new RenderTargetTexture(\"opaqueSceneTexture\", this._options.renderSize, this._scene, this._options.generateMipmaps, undefined, this._options.renderTargetTextureType);\n this._opaqueRenderTarget.ignoreCameraViewport = true;\n this._opaqueRenderTarget.renderList = this._opaqueMeshesCache;\n this._opaqueRenderTarget.clearColor = this._options.clearColor?.clone() ?? this._scene.clearColor.clone();\n this._opaqueRenderTarget.gammaSpace = false;\n this._opaqueRenderTarget.lodGenerationScale = this._options.lodGenerationScale;\n this._opaqueRenderTarget.lodGenerationOffset = this._options.lodGenerationOffset;\n this._opaqueRenderTarget.samples = this._options.samples;\n this._opaqueRenderTarget.renderSprites = true;\n this._opaqueRenderTarget.renderParticles = true;\n let sceneImageProcessingapplyByPostProcess;\n let saveSceneEnvIntensity;\n this._opaqueRenderTarget.onBeforeBindObservable.add((opaqueRenderTarget) => {\n saveSceneEnvIntensity = this._scene.environmentIntensity;\n this._scene.environmentIntensity = 1.0;\n sceneImageProcessingapplyByPostProcess = this._scene.imageProcessingConfiguration.applyByPostProcess;\n if (!this._options.clearColor) {\n this._scene.clearColor.toLinearSpaceToRef(opaqueRenderTarget.clearColor, this._scene.getEngine().useExactSrgbConversions);\n }\n else {\n opaqueRenderTarget.clearColor.copyFrom(this._options.clearColor);\n }\n // we do not use the applyByPostProcess setter to avoid flagging all the materials as \"image processing dirty\"!\n this._scene.imageProcessingConfiguration._applyByPostProcess = true;\n });\n this._opaqueRenderTarget.onAfterUnbindObservable.add(() => {\n this._scene.environmentIntensity = saveSceneEnvIntensity;\n this._scene.imageProcessingConfiguration._applyByPostProcess = sceneImageProcessingapplyByPostProcess;\n });\n this._transparentMeshesCache.forEach((mesh) => {\n if (this._shouldRenderAsTransmission(mesh.material)) {\n mesh.material.refractionTexture = this._opaqueRenderTarget;\n }\n });\n }\n /**\n * Dispose all the elements created by the Helper.\n */\n dispose() {\n this._scene._transmissionHelper = undefined;\n if (this._opaqueRenderTarget) {\n this._opaqueRenderTarget.dispose();\n this._opaqueRenderTarget = null;\n }\n this._transparentMeshesCache = [];\n this._opaqueMeshesCache = [];\n }\n}\nconst NAME = \"KHR_materials_transmission\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_transmission/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class KHR_materials_transmission {\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 = 175;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n if (this.enabled) {\n loader.parent.transparencyAsCoverage = true;\n }\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._loadTransparentPropertiesAsync(extensionContext, material, babylonMaterial, extension));\n return Promise.all(promises).then(() => { });\n });\n }\n _loadTransparentPropertiesAsync(context, material, babylonMaterial, extension) {\n if (!(babylonMaterial instanceof PBRMaterial)) {\n throw new Error(`${context}: Material type not supported`);\n }\n const pbrMaterial = babylonMaterial;\n // Enables \"refraction\" texture which represents transmitted light.\n pbrMaterial.subSurface.isRefractionEnabled = true;\n // Since this extension models thin-surface transmission only, we must make IOR = 1.0\n pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;\n // Albedo colour will tint transmission.\n pbrMaterial.subSurface.useAlbedoToTintRefraction = true;\n if (extension.transmissionFactor !== undefined) {\n pbrMaterial.subSurface.refractionIntensity = extension.transmissionFactor;\n const scene = pbrMaterial.getScene();\n if (pbrMaterial.subSurface.refractionIntensity && !scene._transmissionHelper) {\n new TransmissionHelper({}, pbrMaterial.getScene());\n }\n else if (pbrMaterial.subSurface.refractionIntensity && !scene._transmissionHelper?._isRenderTargetValid()) {\n // If the render target is not valid, recreate it.\n scene._transmissionHelper?._setupRenderTargets();\n }\n }\n else {\n pbrMaterial.subSurface.refractionIntensity = 0.0;\n pbrMaterial.subSurface.isRefractionEnabled = false;\n return Promise.resolve();\n }\n pbrMaterial.subSurface.minimumThickness = 0.0;\n pbrMaterial.subSurface.maximumThickness = 0.0;\n if (extension.transmissionTexture) {\n extension.transmissionTexture.nonColorData = true;\n return this._loader.loadTextureInfoAsync(`${context}/transmissionTexture`, extension.transmissionTexture, undefined).then((texture) => {\n texture.name = `${babylonMaterial.name} (Transmission)`;\n pbrMaterial.subSurface.refractionIntensityTexture = texture;\n pbrMaterial.subSurface.useGltfStyleTextures = true;\n });\n }\n else {\n return Promise.resolve();\n }\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new KHR_materials_transmission(loader));\n//# sourceMappingURL=KHR_materials_transmission.js.map"],"names":["TransmissionHelper","_GetDefaultOptions","renderSize","samples","lodGenerationScale","lodGenerationOffset","renderTargetTextureType","Constants","TEXTURETYPE_HALF_FLOAT","generateMipmaps","constructor","options","scene","this","_opaqueRenderTarget","_opaqueMeshesCache","_transparentMeshesCache","_materialObservers","_options","_scene","_transmissionHelper","onErrorObservable","Observable","onDisposeObservable","addOnce","dispose","_parseScene","_setupRenderTargets","updateOptions","Object","keys","filter","key","length","newOptions","oldOptions","getOpaqueTarget","_shouldRenderAsTransmission","material","PBRMaterial","subSurface","isRefractionEnabled","_addMesh","mesh","uniqueId","onMaterialChangedObservable","add","_onMeshMaterialChanged","bind","Tools","SetImmediate","refractionTexture","indexOf","push","_removeMesh","remove","idx","splice","meshes","forEach","onNewMeshAddedObservable","onMeshRemovedObservable","transparentIdx","opaqueIdx","_isRenderTargetValid","getInternalTexture","sceneImageProcessingapplyByPostProcess","saveSceneEnvIntensity","RenderTargetTexture","undefined","ignoreCameraViewport","renderList","clearColor","clone","gammaSpace","renderSprites","renderParticles","onBeforeBindObservable","opaqueRenderTarget","environmentIntensity","imageProcessingConfiguration","applyByPostProcess","copyFrom","toLinearSpaceToRef","getEngine","useExactSrgbConversions","_applyByPostProcess","onAfterUnbindObservable","NAME","KHR_materials_transmission","loader","name","order","_loader","enabled","isExtensionUsed","parent","transparencyAsCoverage","loadMaterialPropertiesAsync","context","babylonMaterial","GLTFLoader","LoadExtensionAsync","extensionContext","extension","promises","Array","_loadTransparentPropertiesAsync","Promise","all","then","Error","pbrMaterial","volumeIndexOfRefraction","useAlbedoToTintRefraction","transmissionFactor","refractionIntensity","resolve","getScene","minimumThickness","maximumThickness","transmissionTexture","nonColorData","loadTextureInfoAsync","texture","refractionIntensityTexture","useGltfStyleTextures","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"4RAUA,MAAMA,EAKF,yBAAOC,GACH,MAAO,CACHC,WAAY,KACZC,QAAS,EACTC,mBAAoB,EACpBC,qBAAsB,EACtBC,wBAAyBC,EAAUC,uBACnCC,iBAAiB,EAE7B,CAMI,WAAAC,CAAYC,EAASC,GACjBC,KAAKC,oBAAsB,KAC3BD,KAAKE,mBAAqB,GAC1BF,KAAKG,wBAA0B,GAC/BH,KAAKI,mBAAqB,CAAE,EAC5BJ,KAAKK,SAAW,IACTlB,EAAmBC,wBACnBU,GAEPE,KAAKM,OAASP,EACdC,KAAKM,OAAOC,oBAAsBP,KAClCA,KAAKQ,kBAAoB,IAAIC,EAC7BT,KAAKM,OAAOI,oBAAoBC,SAAQ,KACpCX,KAAKY,SAAS,IAElBZ,KAAKa,cACLb,KAAKc,qBACb,CAKI,aAAAC,CAAcjB,GAGV,IADkBkB,OAAOC,KAAKnB,GAASo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ClB,QAAQS,SAE3B,EAEAU,EAAwBvC,GACxBwC,EAAsBxC,GAAM,GAAOE,GAAW,IAAID,EAA2BC"}
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import { a_ as PBRMaterial, aP as unregisterGLTFExtension, aQ as registerGLTFExtension, C as Constants, aU as Observable, T as Tools, bB as RenderTargetTexture } from './index-7pOUdivR.esm.js';
|
|
2
|
-
import { G as GLTFLoader } from './glTFLoader-7uvFneFt.esm.js';
|
|
3
|
-
import './rawTexture-CTQXP4lW.esm.js';
|
|
4
|
-
import './assetContainer-DUHXkzRR.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-BeBTAsWq.esm.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* A class to handle setting up the rendering of opaque objects to be shown through transmissive objects.
|
|
9
|
-
*/
|
|
10
|
-
class TransmissionHelper {
|
|
11
|
-
/**
|
|
12
|
-
* Creates the default options for the helper.
|
|
13
|
-
* @returns the default options
|
|
14
|
-
*/
|
|
15
|
-
static _GetDefaultOptions() {
|
|
16
|
-
return {
|
|
17
|
-
renderSize: 1024,
|
|
18
|
-
samples: 4,
|
|
19
|
-
lodGenerationScale: 1,
|
|
20
|
-
lodGenerationOffset: -4,
|
|
21
|
-
renderTargetTextureType: Constants.TEXTURETYPE_HALF_FLOAT,
|
|
22
|
-
generateMipmaps: true,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* constructor
|
|
27
|
-
* @param options Defines the options we want to customize the helper
|
|
28
|
-
* @param scene The scene to add the material to
|
|
29
|
-
*/
|
|
30
|
-
constructor(options, scene) {
|
|
31
|
-
this._opaqueRenderTarget = null;
|
|
32
|
-
this._opaqueMeshesCache = [];
|
|
33
|
-
this._transparentMeshesCache = [];
|
|
34
|
-
this._materialObservers = {};
|
|
35
|
-
this._options = {
|
|
36
|
-
...TransmissionHelper._GetDefaultOptions(),
|
|
37
|
-
...options,
|
|
38
|
-
};
|
|
39
|
-
this._scene = scene;
|
|
40
|
-
this._scene._transmissionHelper = this;
|
|
41
|
-
this.onErrorObservable = new Observable();
|
|
42
|
-
this._scene.onDisposeObservable.addOnce(() => {
|
|
43
|
-
this.dispose();
|
|
44
|
-
});
|
|
45
|
-
this._parseScene();
|
|
46
|
-
this._setupRenderTargets();
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Updates the background according to the new options
|
|
50
|
-
* @param options
|
|
51
|
-
*/
|
|
52
|
-
updateOptions(options) {
|
|
53
|
-
// First check if any options are actually being changed. If not, exit.
|
|
54
|
-
const newValues = Object.keys(options).filter((key) => this._options[key] !== options[key]);
|
|
55
|
-
if (!newValues.length) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const newOptions = {
|
|
59
|
-
...this._options,
|
|
60
|
-
...options,
|
|
61
|
-
};
|
|
62
|
-
const oldOptions = this._options;
|
|
63
|
-
this._options = newOptions;
|
|
64
|
-
// If size changes, recreate everything
|
|
65
|
-
if (newOptions.renderSize !== oldOptions.renderSize ||
|
|
66
|
-
newOptions.renderTargetTextureType !== oldOptions.renderTargetTextureType ||
|
|
67
|
-
newOptions.generateMipmaps !== oldOptions.generateMipmaps ||
|
|
68
|
-
!this._opaqueRenderTarget) {
|
|
69
|
-
this._setupRenderTargets();
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
this._opaqueRenderTarget.samples = newOptions.samples;
|
|
73
|
-
this._opaqueRenderTarget.lodGenerationScale = newOptions.lodGenerationScale;
|
|
74
|
-
this._opaqueRenderTarget.lodGenerationOffset = newOptions.lodGenerationOffset;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @returns the opaque render target texture or null if not available.
|
|
79
|
-
*/
|
|
80
|
-
getOpaqueTarget() {
|
|
81
|
-
return this._opaqueRenderTarget;
|
|
82
|
-
}
|
|
83
|
-
_shouldRenderAsTransmission(material) {
|
|
84
|
-
if (!material) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
if (material instanceof PBRMaterial && material.subSurface.isRefractionEnabled) {
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
_addMesh(mesh) {
|
|
93
|
-
this._materialObservers[mesh.uniqueId] = mesh.onMaterialChangedObservable.add(this._onMeshMaterialChanged.bind(this));
|
|
94
|
-
// we need to defer the processing because _addMesh may be called as part as an instance mesh creation, in which case some
|
|
95
|
-
// internal properties are not setup yet, like _sourceMesh (needed when doing mesh.material below)
|
|
96
|
-
Tools.SetImmediate(() => {
|
|
97
|
-
if (this._shouldRenderAsTransmission(mesh.material)) {
|
|
98
|
-
mesh.material.refractionTexture = this._opaqueRenderTarget;
|
|
99
|
-
if (this._transparentMeshesCache.indexOf(mesh) === -1) {
|
|
100
|
-
this._transparentMeshesCache.push(mesh);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
if (this._opaqueMeshesCache.indexOf(mesh) === -1) {
|
|
105
|
-
this._opaqueMeshesCache.push(mesh);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
_removeMesh(mesh) {
|
|
111
|
-
mesh.onMaterialChangedObservable.remove(this._materialObservers[mesh.uniqueId]);
|
|
112
|
-
delete this._materialObservers[mesh.uniqueId];
|
|
113
|
-
let idx = this._transparentMeshesCache.indexOf(mesh);
|
|
114
|
-
if (idx !== -1) {
|
|
115
|
-
this._transparentMeshesCache.splice(idx, 1);
|
|
116
|
-
}
|
|
117
|
-
idx = this._opaqueMeshesCache.indexOf(mesh);
|
|
118
|
-
if (idx !== -1) {
|
|
119
|
-
this._opaqueMeshesCache.splice(idx, 1);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
_parseScene() {
|
|
123
|
-
this._scene.meshes.forEach(this._addMesh.bind(this));
|
|
124
|
-
// Listen for when a mesh is added to the scene and add it to our cache lists.
|
|
125
|
-
this._scene.onNewMeshAddedObservable.add(this._addMesh.bind(this));
|
|
126
|
-
// Listen for when a mesh is removed from to the scene and remove it from our cache lists.
|
|
127
|
-
this._scene.onMeshRemovedObservable.add(this._removeMesh.bind(this));
|
|
128
|
-
}
|
|
129
|
-
// When one of the meshes in the scene has its material changed, make sure that it's in the correct cache list.
|
|
130
|
-
_onMeshMaterialChanged(mesh) {
|
|
131
|
-
const transparentIdx = this._transparentMeshesCache.indexOf(mesh);
|
|
132
|
-
const opaqueIdx = this._opaqueMeshesCache.indexOf(mesh);
|
|
133
|
-
// If the material is transparent, make sure that it's added to the transparent list and removed from the opaque list
|
|
134
|
-
const useTransmission = this._shouldRenderAsTransmission(mesh.material);
|
|
135
|
-
if (useTransmission) {
|
|
136
|
-
if (mesh.material instanceof PBRMaterial) {
|
|
137
|
-
mesh.material.subSurface.refractionTexture = this._opaqueRenderTarget;
|
|
138
|
-
}
|
|
139
|
-
if (opaqueIdx !== -1) {
|
|
140
|
-
this._opaqueMeshesCache.splice(opaqueIdx, 1);
|
|
141
|
-
this._transparentMeshesCache.push(mesh);
|
|
142
|
-
}
|
|
143
|
-
else if (transparentIdx === -1) {
|
|
144
|
-
this._transparentMeshesCache.push(mesh);
|
|
145
|
-
}
|
|
146
|
-
// If the material is opaque, make sure that it's added to the opaque list and removed from the transparent list
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
if (transparentIdx !== -1) {
|
|
150
|
-
this._transparentMeshesCache.splice(transparentIdx, 1);
|
|
151
|
-
this._opaqueMeshesCache.push(mesh);
|
|
152
|
-
}
|
|
153
|
-
else if (opaqueIdx === -1) {
|
|
154
|
-
this._opaqueMeshesCache.push(mesh);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* @internal
|
|
160
|
-
* Check if the opaque render target has not been disposed and can still be used.
|
|
161
|
-
* @returns
|
|
162
|
-
*/
|
|
163
|
-
_isRenderTargetValid() {
|
|
164
|
-
return this._opaqueRenderTarget?.getInternalTexture() !== null;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* @internal
|
|
168
|
-
* Setup the render targets according to the specified options.
|
|
169
|
-
*/
|
|
170
|
-
_setupRenderTargets() {
|
|
171
|
-
if (this._opaqueRenderTarget) {
|
|
172
|
-
this._opaqueRenderTarget.dispose();
|
|
173
|
-
}
|
|
174
|
-
this._opaqueRenderTarget = new RenderTargetTexture("opaqueSceneTexture", this._options.renderSize, this._scene, this._options.generateMipmaps, undefined, this._options.renderTargetTextureType);
|
|
175
|
-
this._opaqueRenderTarget.ignoreCameraViewport = true;
|
|
176
|
-
this._opaqueRenderTarget.renderList = this._opaqueMeshesCache;
|
|
177
|
-
this._opaqueRenderTarget.clearColor = this._options.clearColor?.clone() ?? this._scene.clearColor.clone();
|
|
178
|
-
this._opaqueRenderTarget.gammaSpace = false;
|
|
179
|
-
this._opaqueRenderTarget.lodGenerationScale = this._options.lodGenerationScale;
|
|
180
|
-
this._opaqueRenderTarget.lodGenerationOffset = this._options.lodGenerationOffset;
|
|
181
|
-
this._opaqueRenderTarget.samples = this._options.samples;
|
|
182
|
-
this._opaqueRenderTarget.renderSprites = true;
|
|
183
|
-
this._opaqueRenderTarget.renderParticles = true;
|
|
184
|
-
let sceneImageProcessingapplyByPostProcess;
|
|
185
|
-
let saveSceneEnvIntensity;
|
|
186
|
-
this._opaqueRenderTarget.onBeforeBindObservable.add((opaqueRenderTarget) => {
|
|
187
|
-
saveSceneEnvIntensity = this._scene.environmentIntensity;
|
|
188
|
-
this._scene.environmentIntensity = 1.0;
|
|
189
|
-
sceneImageProcessingapplyByPostProcess = this._scene.imageProcessingConfiguration.applyByPostProcess;
|
|
190
|
-
if (!this._options.clearColor) {
|
|
191
|
-
this._scene.clearColor.toLinearSpaceToRef(opaqueRenderTarget.clearColor, this._scene.getEngine().useExactSrgbConversions);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
opaqueRenderTarget.clearColor.copyFrom(this._options.clearColor);
|
|
195
|
-
}
|
|
196
|
-
// we do not use the applyByPostProcess setter to avoid flagging all the materials as "image processing dirty"!
|
|
197
|
-
this._scene.imageProcessingConfiguration._applyByPostProcess = true;
|
|
198
|
-
});
|
|
199
|
-
this._opaqueRenderTarget.onAfterUnbindObservable.add(() => {
|
|
200
|
-
this._scene.environmentIntensity = saveSceneEnvIntensity;
|
|
201
|
-
this._scene.imageProcessingConfiguration._applyByPostProcess = sceneImageProcessingapplyByPostProcess;
|
|
202
|
-
});
|
|
203
|
-
this._transparentMeshesCache.forEach((mesh) => {
|
|
204
|
-
if (this._shouldRenderAsTransmission(mesh.material)) {
|
|
205
|
-
mesh.material.refractionTexture = this._opaqueRenderTarget;
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Dispose all the elements created by the Helper.
|
|
211
|
-
*/
|
|
212
|
-
dispose() {
|
|
213
|
-
this._scene._transmissionHelper = undefined;
|
|
214
|
-
if (this._opaqueRenderTarget) {
|
|
215
|
-
this._opaqueRenderTarget.dispose();
|
|
216
|
-
this._opaqueRenderTarget = null;
|
|
217
|
-
}
|
|
218
|
-
this._transparentMeshesCache = [];
|
|
219
|
-
this._opaqueMeshesCache = [];
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
const NAME = "KHR_materials_transmission";
|
|
223
|
-
/**
|
|
224
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_transmission/README.md)
|
|
225
|
-
*/
|
|
226
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
227
|
-
class KHR_materials_transmission {
|
|
228
|
-
/**
|
|
229
|
-
* @internal
|
|
230
|
-
*/
|
|
231
|
-
constructor(loader) {
|
|
232
|
-
/**
|
|
233
|
-
* The name of this extension.
|
|
234
|
-
*/
|
|
235
|
-
this.name = NAME;
|
|
236
|
-
/**
|
|
237
|
-
* Defines a number that determines the order the extensions are applied.
|
|
238
|
-
*/
|
|
239
|
-
this.order = 175;
|
|
240
|
-
this._loader = loader;
|
|
241
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
242
|
-
if (this.enabled) {
|
|
243
|
-
loader.parent.transparencyAsCoverage = true;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
/** @internal */
|
|
247
|
-
dispose() {
|
|
248
|
-
this._loader = null;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* @internal
|
|
252
|
-
*/
|
|
253
|
-
loadMaterialPropertiesAsync(context, material, babylonMaterial) {
|
|
254
|
-
return GLTFLoader.LoadExtensionAsync(context, material, this.name, (extensionContext, extension) => {
|
|
255
|
-
const promises = new Array();
|
|
256
|
-
promises.push(this._loader.loadMaterialPropertiesAsync(context, material, babylonMaterial));
|
|
257
|
-
promises.push(this._loadTransparentPropertiesAsync(extensionContext, material, babylonMaterial, extension));
|
|
258
|
-
return Promise.all(promises).then(() => { });
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
_loadTransparentPropertiesAsync(context, material, babylonMaterial, extension) {
|
|
262
|
-
if (!(babylonMaterial instanceof PBRMaterial)) {
|
|
263
|
-
throw new Error(`${context}: Material type not supported`);
|
|
264
|
-
}
|
|
265
|
-
const pbrMaterial = babylonMaterial;
|
|
266
|
-
// Enables "refraction" texture which represents transmitted light.
|
|
267
|
-
pbrMaterial.subSurface.isRefractionEnabled = true;
|
|
268
|
-
// Since this extension models thin-surface transmission only, we must make IOR = 1.0
|
|
269
|
-
pbrMaterial.subSurface.volumeIndexOfRefraction = 1.0;
|
|
270
|
-
// Albedo colour will tint transmission.
|
|
271
|
-
pbrMaterial.subSurface.useAlbedoToTintRefraction = true;
|
|
272
|
-
if (extension.transmissionFactor !== undefined) {
|
|
273
|
-
pbrMaterial.subSurface.refractionIntensity = extension.transmissionFactor;
|
|
274
|
-
const scene = pbrMaterial.getScene();
|
|
275
|
-
if (pbrMaterial.subSurface.refractionIntensity && !scene._transmissionHelper) {
|
|
276
|
-
new TransmissionHelper({}, pbrMaterial.getScene());
|
|
277
|
-
}
|
|
278
|
-
else if (pbrMaterial.subSurface.refractionIntensity && !scene._transmissionHelper?._isRenderTargetValid()) {
|
|
279
|
-
// If the render target is not valid, recreate it.
|
|
280
|
-
scene._transmissionHelper?._setupRenderTargets();
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
pbrMaterial.subSurface.refractionIntensity = 0.0;
|
|
285
|
-
pbrMaterial.subSurface.isRefractionEnabled = false;
|
|
286
|
-
return Promise.resolve();
|
|
287
|
-
}
|
|
288
|
-
pbrMaterial.subSurface.minimumThickness = 0.0;
|
|
289
|
-
pbrMaterial.subSurface.maximumThickness = 0.0;
|
|
290
|
-
if (extension.transmissionTexture) {
|
|
291
|
-
extension.transmissionTexture.nonColorData = true;
|
|
292
|
-
return this._loader.loadTextureInfoAsync(`${context}/transmissionTexture`, extension.transmissionTexture, undefined).then((texture) => {
|
|
293
|
-
texture.name = `${babylonMaterial.name} (Transmission)`;
|
|
294
|
-
pbrMaterial.subSurface.refractionIntensityTexture = texture;
|
|
295
|
-
pbrMaterial.subSurface.useGltfStyleTextures = true;
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
return Promise.resolve();
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
unregisterGLTFExtension(NAME);
|
|
304
|
-
registerGLTFExtension(NAME, true, (loader) => new KHR_materials_transmission(loader));
|
|
305
|
-
|
|
306
|
-
export { KHR_materials_transmission };
|
|
307
|
-
//# sourceMappingURL=KHR_materials_transmission-jJevhaTD.esm.js.map
|