@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,171 +0,0 @@
|
|
|
1
|
-
import { aN as CubeTexture, C as Constants, a0 as SerializationHelper, ab as Quaternion, a4 as Matrix, aO as SphericalHarmonics, S as SphericalPolynomial, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-7pOUdivR.esm.js';
|
|
2
|
-
import { _ as _UpdateRGBDAsync } from './environmentTextureTools-BrdD2X7A.esm.js';
|
|
3
|
-
import { G as GLTFLoader, A as ArrayItem } from './glTFLoader-7uvFneFt.esm.js';
|
|
4
|
-
import './dumpTools-hegDCvBc.esm.js';
|
|
5
|
-
import './rawTexture-CTQXP4lW.esm.js';
|
|
6
|
-
import './assetContainer-DUHXkzRR.esm.js';
|
|
7
|
-
import './glTFLoaderAnimation-BeBTAsWq.esm.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Raw cube texture where the raw buffers are passed in
|
|
11
|
-
*/
|
|
12
|
-
class RawCubeTexture extends CubeTexture {
|
|
13
|
-
/**
|
|
14
|
-
* Creates a cube texture where the raw buffers are passed in.
|
|
15
|
-
* @param scene defines the scene the texture is attached to
|
|
16
|
-
* @param data defines the array of data to use to create each face
|
|
17
|
-
* @param size defines the size of the textures
|
|
18
|
-
* @param format defines the format of the data
|
|
19
|
-
* @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)
|
|
20
|
-
* @param generateMipMaps defines if the engine should generate the mip levels
|
|
21
|
-
* @param invertY defines if data must be stored with Y axis inverted
|
|
22
|
-
* @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
23
|
-
* @param compression defines the compression used (null by default)
|
|
24
|
-
*/
|
|
25
|
-
constructor(scene, data, size, format = Constants.TEXTUREFORMAT_RGBA, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, generateMipMaps = false, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, compression = null) {
|
|
26
|
-
super("", scene);
|
|
27
|
-
this._texture = scene.getEngine().createRawCubeTexture(data, size, format, type, generateMipMaps, invertY, samplingMode, compression);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Updates the raw cube texture.
|
|
31
|
-
* @param data defines the data to store
|
|
32
|
-
* @param format defines the data format
|
|
33
|
-
* @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)
|
|
34
|
-
* @param invertY defines if data must be stored with Y axis inverted
|
|
35
|
-
* @param compression defines the compression used (null by default)
|
|
36
|
-
*/
|
|
37
|
-
update(data, format, type, invertY, compression = null) {
|
|
38
|
-
this._texture.getEngine().updateRawCubeTexture(this._texture, data, format, type, invertY, compression);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Updates a raw cube texture with RGBD encoded data.
|
|
42
|
-
* @param data defines the array of data [mipmap][face] to use to create each face
|
|
43
|
-
* @param sphericalPolynomial defines the spherical polynomial for irradiance
|
|
44
|
-
* @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness
|
|
45
|
-
* @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness
|
|
46
|
-
* @returns a promise that resolves when the operation is complete
|
|
47
|
-
*/
|
|
48
|
-
updateRGBDAsync(data, sphericalPolynomial = null, lodScale = 0.8, lodOffset = 0) {
|
|
49
|
-
return _UpdateRGBDAsync(this._texture, data, sphericalPolynomial, lodScale, lodOffset).then(() => { });
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Clones the raw cube texture.
|
|
53
|
-
* @returns a new cube texture
|
|
54
|
-
*/
|
|
55
|
-
clone() {
|
|
56
|
-
return SerializationHelper.Clone(() => {
|
|
57
|
-
const scene = this.getScene();
|
|
58
|
-
const internalTexture = this._texture;
|
|
59
|
-
const texture = new RawCubeTexture(scene, internalTexture._bufferViewArray, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);
|
|
60
|
-
if (internalTexture.source === 13 /* InternalTextureSource.CubeRawRGBD */) {
|
|
61
|
-
texture.updateRGBDAsync(internalTexture._bufferViewArrayArray, internalTexture._sphericalPolynomial, internalTexture._lodGenerationScale, internalTexture._lodGenerationOffset);
|
|
62
|
-
}
|
|
63
|
-
return texture;
|
|
64
|
-
}, this);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const NAME = "EXT_lights_image_based";
|
|
69
|
-
/**
|
|
70
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_lights_image_based/README.md)
|
|
71
|
-
*/
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
73
|
-
class EXT_lights_image_based {
|
|
74
|
-
/**
|
|
75
|
-
* @internal
|
|
76
|
-
*/
|
|
77
|
-
constructor(loader) {
|
|
78
|
-
/**
|
|
79
|
-
* The name of this extension.
|
|
80
|
-
*/
|
|
81
|
-
this.name = NAME;
|
|
82
|
-
this._loader = loader;
|
|
83
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
84
|
-
}
|
|
85
|
-
/** @internal */
|
|
86
|
-
dispose() {
|
|
87
|
-
this._loader = null;
|
|
88
|
-
delete this._lights;
|
|
89
|
-
}
|
|
90
|
-
/** @internal */
|
|
91
|
-
onLoading() {
|
|
92
|
-
const extensions = this._loader.gltf.extensions;
|
|
93
|
-
if (extensions && extensions[this.name]) {
|
|
94
|
-
const extension = extensions[this.name];
|
|
95
|
-
this._lights = extension.lights;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
*/
|
|
101
|
-
loadSceneAsync(context, scene) {
|
|
102
|
-
return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {
|
|
103
|
-
this._loader._allMaterialsDirtyRequired = true;
|
|
104
|
-
const promises = new Array();
|
|
105
|
-
promises.push(this._loader.loadSceneAsync(context, scene));
|
|
106
|
-
this._loader.logOpen(`${extensionContext}`);
|
|
107
|
-
const light = ArrayItem.Get(`${extensionContext}/light`, this._lights, extension.light);
|
|
108
|
-
promises.push(this._loadLightAsync(`/extensions/${this.name}/lights/${extension.light}`, light).then((texture) => {
|
|
109
|
-
this._loader.babylonScene.environmentTexture = texture;
|
|
110
|
-
}));
|
|
111
|
-
this._loader.logClose();
|
|
112
|
-
return Promise.all(promises).then(() => { });
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
_loadLightAsync(context, light) {
|
|
116
|
-
if (!light._loaded) {
|
|
117
|
-
const promises = new Array();
|
|
118
|
-
this._loader.logOpen(`${context}`);
|
|
119
|
-
const imageData = new Array(light.specularImages.length);
|
|
120
|
-
for (let mipmap = 0; mipmap < light.specularImages.length; mipmap++) {
|
|
121
|
-
const faces = light.specularImages[mipmap];
|
|
122
|
-
imageData[mipmap] = new Array(faces.length);
|
|
123
|
-
for (let face = 0; face < faces.length; face++) {
|
|
124
|
-
const specularImageContext = `${context}/specularImages/${mipmap}/${face}`;
|
|
125
|
-
this._loader.logOpen(`${specularImageContext}`);
|
|
126
|
-
const index = faces[face];
|
|
127
|
-
const image = ArrayItem.Get(specularImageContext, this._loader.gltf.images, index);
|
|
128
|
-
promises.push(this._loader.loadImageAsync(`/images/${index}`, image).then((data) => {
|
|
129
|
-
imageData[mipmap][face] = data;
|
|
130
|
-
}));
|
|
131
|
-
this._loader.logClose();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
this._loader.logClose();
|
|
135
|
-
light._loaded = Promise.all(promises).then(() => {
|
|
136
|
-
const babylonTexture = new RawCubeTexture(this._loader.babylonScene, null, light.specularImageSize);
|
|
137
|
-
babylonTexture.name = light.name || "environment";
|
|
138
|
-
light._babylonTexture = babylonTexture;
|
|
139
|
-
if (light.intensity != undefined) {
|
|
140
|
-
babylonTexture.level = light.intensity;
|
|
141
|
-
}
|
|
142
|
-
if (light.rotation) {
|
|
143
|
-
let rotation = Quaternion.FromArray(light.rotation);
|
|
144
|
-
// Invert the rotation so that positive rotation is counter-clockwise.
|
|
145
|
-
if (!this._loader.babylonScene.useRightHandedSystem) {
|
|
146
|
-
rotation = Quaternion.Inverse(rotation);
|
|
147
|
-
}
|
|
148
|
-
Matrix.FromQuaternionToRef(rotation, babylonTexture.getReflectionTextureMatrix());
|
|
149
|
-
}
|
|
150
|
-
if (!light.irradianceCoefficients) {
|
|
151
|
-
throw new Error(`${context}: Irradiance coefficients are missing`);
|
|
152
|
-
}
|
|
153
|
-
const sphericalHarmonics = SphericalHarmonics.FromArray(light.irradianceCoefficients);
|
|
154
|
-
sphericalHarmonics.scaleInPlace(light.intensity);
|
|
155
|
-
sphericalHarmonics.convertIrradianceToLambertianRadiance();
|
|
156
|
-
const sphericalPolynomial = SphericalPolynomial.FromHarmonics(sphericalHarmonics);
|
|
157
|
-
// Compute the lod generation scale to fit exactly to the number of levels available.
|
|
158
|
-
const lodGenerationScale = (imageData.length - 1) / Math.log2(light.specularImageSize);
|
|
159
|
-
return babylonTexture.updateRGBDAsync(imageData, sphericalPolynomial, lodGenerationScale);
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
return light._loaded.then(() => {
|
|
163
|
-
return light._babylonTexture;
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
unregisterGLTFExtension(NAME);
|
|
168
|
-
registerGLTFExtension(NAME, true, (loader) => new EXT_lights_image_based(loader));
|
|
169
|
-
|
|
170
|
-
export { EXT_lights_image_based };
|
|
171
|
-
//# sourceMappingURL=EXT_lights_image_based-B-Daha_c.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EXT_lights_image_based-B-Daha_c.esm.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawCubeTexture.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_lights_image_based.js"],"sourcesContent":["import { SerializationHelper } from \"../../Misc/decorators.serialization\";\nimport { _UpdateRGBDAsync as UpdateRGBDAsyncEnvTools } from \"../../Misc/environmentTextureTools\";\nimport { CubeTexture } from \"./cubeTexture\";\nimport { Constants } from \"../../Engines/constants\";\n/**\n * Raw cube texture where the raw buffers are passed in\n */\nexport class RawCubeTexture extends CubeTexture {\n /**\n * Creates a cube texture where the raw buffers are passed in.\n * @param scene defines the scene the texture is attached to\n * @param data defines the array of data to use to create each face\n * @param size defines the size of the textures\n * @param format defines the format of the data\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)\n * @param generateMipMaps defines if the engine should generate the mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\n * @param compression defines the compression used (null by default)\n */\n constructor(scene, data, size, format = Constants.TEXTUREFORMAT_RGBA, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, generateMipMaps = false, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, compression = null) {\n super(\"\", scene);\n this._texture = scene.getEngine().createRawCubeTexture(data, size, format, type, generateMipMaps, invertY, samplingMode, compression);\n }\n /**\n * Updates the raw cube texture.\n * @param data defines the data to store\n * @param format defines the data format\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\n * @param invertY defines if data must be stored with Y axis inverted\n * @param compression defines the compression used (null by default)\n */\n update(data, format, type, invertY, compression = null) {\n this._texture.getEngine().updateRawCubeTexture(this._texture, data, format, type, invertY, compression);\n }\n /**\n * Updates a raw cube texture with RGBD encoded data.\n * @param data defines the array of data [mipmap][face] to use to create each face\n * @param sphericalPolynomial defines the spherical polynomial for irradiance\n * @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness\n * @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness\n * @returns a promise that resolves when the operation is complete\n */\n updateRGBDAsync(data, sphericalPolynomial = null, lodScale = 0.8, lodOffset = 0) {\n return UpdateRGBDAsyncEnvTools(this._texture, data, sphericalPolynomial, lodScale, lodOffset).then(() => { });\n }\n /**\n * Clones the raw cube texture.\n * @returns a new cube texture\n */\n clone() {\n return SerializationHelper.Clone(() => {\n const scene = this.getScene();\n const internalTexture = this._texture;\n const texture = new RawCubeTexture(scene, internalTexture._bufferViewArray, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);\n if (internalTexture.source === 13 /* InternalTextureSource.CubeRawRGBD */) {\n texture.updateRGBDAsync(internalTexture._bufferViewArrayArray, internalTexture._sphericalPolynomial, internalTexture._lodGenerationScale, internalTexture._lodGenerationOffset);\n }\n return texture;\n }, this);\n }\n}\n//# sourceMappingURL=rawCubeTexture.js.map","import { SphericalHarmonics, SphericalPolynomial } from \"core/Maths/sphericalPolynomial\";\nimport { Quaternion, Matrix } from \"core/Maths/math.vector\";\nimport { RawCubeTexture } from \"core/Materials/Textures/rawCubeTexture\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_lights_image_based\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_lights_image_based/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_lights_image_based {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n delete this._lights;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._lights = extension.lights;\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {\n this._loader._allMaterialsDirtyRequired = true;\n const promises = new Array();\n promises.push(this._loader.loadSceneAsync(context, scene));\n this._loader.logOpen(`${extensionContext}`);\n const light = ArrayItem.Get(`${extensionContext}/light`, this._lights, extension.light);\n promises.push(this._loadLightAsync(`/extensions/${this.name}/lights/${extension.light}`, light).then((texture) => {\n this._loader.babylonScene.environmentTexture = texture;\n }));\n this._loader.logClose();\n return Promise.all(promises).then(() => { });\n });\n }\n _loadLightAsync(context, light) {\n if (!light._loaded) {\n const promises = new Array();\n this._loader.logOpen(`${context}`);\n const imageData = new Array(light.specularImages.length);\n for (let mipmap = 0; mipmap < light.specularImages.length; mipmap++) {\n const faces = light.specularImages[mipmap];\n imageData[mipmap] = new Array(faces.length);\n for (let face = 0; face < faces.length; face++) {\n const specularImageContext = `${context}/specularImages/${mipmap}/${face}`;\n this._loader.logOpen(`${specularImageContext}`);\n const index = faces[face];\n const image = ArrayItem.Get(specularImageContext, this._loader.gltf.images, index);\n promises.push(this._loader.loadImageAsync(`/images/${index}`, image).then((data) => {\n imageData[mipmap][face] = data;\n }));\n this._loader.logClose();\n }\n }\n this._loader.logClose();\n light._loaded = Promise.all(promises).then(() => {\n const babylonTexture = new RawCubeTexture(this._loader.babylonScene, null, light.specularImageSize);\n babylonTexture.name = light.name || \"environment\";\n light._babylonTexture = babylonTexture;\n if (light.intensity != undefined) {\n babylonTexture.level = light.intensity;\n }\n if (light.rotation) {\n let rotation = Quaternion.FromArray(light.rotation);\n // Invert the rotation so that positive rotation is counter-clockwise.\n if (!this._loader.babylonScene.useRightHandedSystem) {\n rotation = Quaternion.Inverse(rotation);\n }\n Matrix.FromQuaternionToRef(rotation, babylonTexture.getReflectionTextureMatrix());\n }\n if (!light.irradianceCoefficients) {\n throw new Error(`${context}: Irradiance coefficients are missing`);\n }\n const sphericalHarmonics = SphericalHarmonics.FromArray(light.irradianceCoefficients);\n sphericalHarmonics.scaleInPlace(light.intensity);\n sphericalHarmonics.convertIrradianceToLambertianRadiance();\n const sphericalPolynomial = SphericalPolynomial.FromHarmonics(sphericalHarmonics);\n // Compute the lod generation scale to fit exactly to the number of levels available.\n const lodGenerationScale = (imageData.length - 1) / Math.log2(light.specularImageSize);\n return babylonTexture.updateRGBDAsync(imageData, sphericalPolynomial, lodGenerationScale);\n });\n }\n return light._loaded.then(() => {\n return light._babylonTexture;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_lights_image_based(loader));\n//# sourceMappingURL=EXT_lights_image_based.js.map"],"names":["UpdateRGBDAsyncEnvTools"],"mappings":";;;;;;;;AAIA;AACA;AACA;AACO,MAAM,cAAc,SAAS,WAAW,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,kBAAkB,EAAE,IAAI,GAAG,SAAS,CAAC,yBAAyB,EAAE,eAAe,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAAE;AAC7O,QAAQ,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC;AACxB,QAAQ,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,CAAC;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,EAAE;AAC5D,QAAQ,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC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C,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aN as e,C as t,a0 as s,ab as n,a4 as a,aO as r,S as i,aP as o,aQ as l}from"./index-CHb7NKRY.esm.min.js";import{_ as h}from"./environmentTextureTools-B5WZowyO.esm.min.js";import{G as c,A as m}from"./glTFLoader-ChTng_Ew.esm.min.js";import"./dumpTools-BWNjR_G6.esm.min.js";import"./rawTexture-CS3J_QPB.esm.min.js";import"./assetContainer-DrlGfFUd.esm.min.js";import"./glTFLoaderAnimation-CCHLAoRK.esm.min.js";class d extends e{constructor(e,s,n,a=t.TEXTUREFORMAT_RGBA,r=t.TEXTURETYPE_UNSIGNED_BYTE,i=!1,o=!1,l=t.TEXTURE_TRILINEAR_SAMPLINGMODE,h=null){super("",e),this._texture=e.getEngine().createRawCubeTexture(s,n,a,r,i,o,l,h)}update(e,t,s,n,a=null){this._texture.getEngine().updateRawCubeTexture(this._texture,e,t,s,n,a)}updateRGBDAsync(e,t=null,s=.8,n=0){return h(this._texture,e,t,s,n).then((()=>{}))}clone(){return s.Clone((()=>{const e=this.getScene(),t=this._texture,s=new d(e,t._bufferViewArray,t.width,t.format,t.type,t.generateMipMaps,t.invertY,t.samplingMode,t._compression);return 13===t.source&&s.updateRGBDAsync(t._bufferViewArrayArray,t._sphericalPolynomial,t._lodGenerationScale,t._lodGenerationOffset),s}),this)}}const u="EXT_lights_image_based";class g{constructor(e){this.name=u,this._loader=e,this.enabled=this._loader.isExtensionUsed(u)}dispose(){this._loader=null,delete this._lights}onLoading(){const e=this._loader.gltf.extensions;if(e&&e[this.name]){const t=e[this.name];this._lights=t.lights}}loadSceneAsync(e,t){return c.LoadExtensionAsync(e,t,this.name,((s,n)=>{this._loader._allMaterialsDirtyRequired=!0;const a=new Array;a.push(this._loader.loadSceneAsync(e,t)),this._loader.logOpen(`${s}`);const r=m.Get(`${s}/light`,this._lights,n.light);return a.push(this._loadLightAsync(`/extensions/${this.name}/lights/${n.light}`,r).then((e=>{this._loader.babylonScene.environmentTexture=e}))),this._loader.logClose(),Promise.all(a).then((()=>{}))}))}_loadLightAsync(e,t){if(!t._loaded){const s=new Array;this._loader.logOpen(`${e}`);const o=new Array(t.specularImages.length);for(let n=0;n<t.specularImages.length;n++){const a=t.specularImages[n];o[n]=new Array(a.length);for(let t=0;t<a.length;t++){const r=`${e}/specularImages/${n}/${t}`;this._loader.logOpen(`${r}`);const i=a[t],l=m.Get(r,this._loader.gltf.images,i);s.push(this._loader.loadImageAsync(`/images/${i}`,l).then((e=>{o[n][t]=e}))),this._loader.logClose()}}this._loader.logClose(),t._loaded=Promise.all(s).then((()=>{const s=new d(this._loader.babylonScene,null,t.specularImageSize);if(s.name=t.name||"environment",t._babylonTexture=s,null!=t.intensity&&(s.level=t.intensity),t.rotation){let e=n.FromArray(t.rotation);this._loader.babylonScene.useRightHandedSystem||(e=n.Inverse(e)),a.FromQuaternionToRef(e,s.getReflectionTextureMatrix())}if(!t.irradianceCoefficients)throw new Error(`${e}: Irradiance coefficients are missing`);const l=r.FromArray(t.irradianceCoefficients);l.scaleInPlace(t.intensity),l.convertIrradianceToLambertianRadiance();const h=i.FromHarmonics(l),c=(o.length-1)/Math.log2(t.specularImageSize);return s.updateRGBDAsync(o,h,c)}))}return t._loaded.then((()=>t._babylonTexture))}}o(u),l(u,!0,(e=>new g(e)));export{g as EXT_lights_image_based};
|
|
2
|
-
//# sourceMappingURL=EXT_lights_image_based-fafIAwHA.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EXT_lights_image_based-fafIAwHA.esm.min.js","sources":["../../../../../dev/core/dist/Materials/Textures/rawCubeTexture.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_lights_image_based.js"],"sourcesContent":["import { SerializationHelper } from \"../../Misc/decorators.serialization\";\nimport { _UpdateRGBDAsync as UpdateRGBDAsyncEnvTools } from \"../../Misc/environmentTextureTools\";\nimport { CubeTexture } from \"./cubeTexture\";\nimport { Constants } from \"../../Engines/constants\";\n/**\n * Raw cube texture where the raw buffers are passed in\n */\nexport class RawCubeTexture extends CubeTexture {\n /**\n * Creates a cube texture where the raw buffers are passed in.\n * @param scene defines the scene the texture is attached to\n * @param data defines the array of data to use to create each face\n * @param size defines the size of the textures\n * @param format defines the format of the data\n * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_BYTE)\n * @param generateMipMaps defines if the engine should generate the mip levels\n * @param invertY defines if data must be stored with Y axis inverted\n * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)\n * @param compression defines the compression used (null by default)\n */\n constructor(scene, data, size, format = Constants.TEXTUREFORMAT_RGBA, type = Constants.TEXTURETYPE_UNSIGNED_BYTE, generateMipMaps = false, invertY = false, samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, compression = null) {\n super(\"\", scene);\n this._texture = scene.getEngine().createRawCubeTexture(data, size, format, type, generateMipMaps, invertY, samplingMode, compression);\n }\n /**\n * Updates the raw cube texture.\n * @param data defines the data to store\n * @param format defines the data format\n * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_BYTE by default)\n * @param invertY defines if data must be stored with Y axis inverted\n * @param compression defines the compression used (null by default)\n */\n update(data, format, type, invertY, compression = null) {\n this._texture.getEngine().updateRawCubeTexture(this._texture, data, format, type, invertY, compression);\n }\n /**\n * Updates a raw cube texture with RGBD encoded data.\n * @param data defines the array of data [mipmap][face] to use to create each face\n * @param sphericalPolynomial defines the spherical polynomial for irradiance\n * @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness\n * @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness\n * @returns a promise that resolves when the operation is complete\n */\n updateRGBDAsync(data, sphericalPolynomial = null, lodScale = 0.8, lodOffset = 0) {\n return UpdateRGBDAsyncEnvTools(this._texture, data, sphericalPolynomial, lodScale, lodOffset).then(() => { });\n }\n /**\n * Clones the raw cube texture.\n * @returns a new cube texture\n */\n clone() {\n return SerializationHelper.Clone(() => {\n const scene = this.getScene();\n const internalTexture = this._texture;\n const texture = new RawCubeTexture(scene, internalTexture._bufferViewArray, internalTexture.width, internalTexture.format, internalTexture.type, internalTexture.generateMipMaps, internalTexture.invertY, internalTexture.samplingMode, internalTexture._compression);\n if (internalTexture.source === 13 /* InternalTextureSource.CubeRawRGBD */) {\n texture.updateRGBDAsync(internalTexture._bufferViewArrayArray, internalTexture._sphericalPolynomial, internalTexture._lodGenerationScale, internalTexture._lodGenerationOffset);\n }\n return texture;\n }, this);\n }\n}\n//# sourceMappingURL=rawCubeTexture.js.map","import { SphericalHarmonics, SphericalPolynomial } from \"core/Maths/sphericalPolynomial\";\nimport { Quaternion, Matrix } from \"core/Maths/math.vector\";\nimport { RawCubeTexture } from \"core/Materials/Textures/rawCubeTexture\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_lights_image_based\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_lights_image_based/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_lights_image_based {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n delete this._lights;\n }\n /** @internal */\n onLoading() {\n const extensions = this._loader.gltf.extensions;\n if (extensions && extensions[this.name]) {\n const extension = extensions[this.name];\n this._lights = extension.lights;\n }\n }\n /**\n * @internal\n */\n loadSceneAsync(context, scene) {\n return GLTFLoader.LoadExtensionAsync(context, scene, this.name, (extensionContext, extension) => {\n this._loader._allMaterialsDirtyRequired = true;\n const promises = new Array();\n promises.push(this._loader.loadSceneAsync(context, scene));\n this._loader.logOpen(`${extensionContext}`);\n const light = ArrayItem.Get(`${extensionContext}/light`, this._lights, extension.light);\n promises.push(this._loadLightAsync(`/extensions/${this.name}/lights/${extension.light}`, light).then((texture) => {\n this._loader.babylonScene.environmentTexture = texture;\n }));\n this._loader.logClose();\n return Promise.all(promises).then(() => { });\n });\n }\n _loadLightAsync(context, light) {\n if (!light._loaded) {\n const promises = new Array();\n this._loader.logOpen(`${context}`);\n const imageData = new Array(light.specularImages.length);\n for (let mipmap = 0; mipmap < light.specularImages.length; mipmap++) {\n const faces = light.specularImages[mipmap];\n imageData[mipmap] = new Array(faces.length);\n for (let face = 0; face < faces.length; face++) {\n const specularImageContext = `${context}/specularImages/${mipmap}/${face}`;\n this._loader.logOpen(`${specularImageContext}`);\n const index = faces[face];\n const image = ArrayItem.Get(specularImageContext, this._loader.gltf.images, index);\n promises.push(this._loader.loadImageAsync(`/images/${index}`, image).then((data) => {\n imageData[mipmap][face] = data;\n }));\n this._loader.logClose();\n }\n }\n this._loader.logClose();\n light._loaded = Promise.all(promises).then(() => {\n const babylonTexture = new RawCubeTexture(this._loader.babylonScene, null, light.specularImageSize);\n babylonTexture.name = light.name || \"environment\";\n light._babylonTexture = babylonTexture;\n if (light.intensity != undefined) {\n babylonTexture.level = light.intensity;\n }\n if (light.rotation) {\n let rotation = Quaternion.FromArray(light.rotation);\n // Invert the rotation so that positive rotation is counter-clockwise.\n if (!this._loader.babylonScene.useRightHandedSystem) {\n rotation = Quaternion.Inverse(rotation);\n }\n Matrix.FromQuaternionToRef(rotation, babylonTexture.getReflectionTextureMatrix());\n }\n if (!light.irradianceCoefficients) {\n throw new Error(`${context}: Irradiance coefficients are missing`);\n }\n const sphericalHarmonics = SphericalHarmonics.FromArray(light.irradianceCoefficients);\n sphericalHarmonics.scaleInPlace(light.intensity);\n sphericalHarmonics.convertIrradianceToLambertianRadiance();\n const sphericalPolynomial = SphericalPolynomial.FromHarmonics(sphericalHarmonics);\n // Compute the lod generation scale to fit exactly to the number of levels available.\n const lodGenerationScale = (imageData.length - 1) / Math.log2(light.specularImageSize);\n return babylonTexture.updateRGBDAsync(imageData, sphericalPolynomial, lodGenerationScale);\n });\n }\n return light._loaded.then(() => {\n return light._babylonTexture;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_lights_image_based(loader));\n//# sourceMappingURL=EXT_lights_image_based.js.map"],"names":["RawCubeTexture","CubeTexture","constructor","scene","data","size","format","Constants","TEXTUREFORMAT_RGBA","type","TEXTURETYPE_UNSIGNED_BYTE","generateMipMaps","invertY","samplingMode","TEXTURE_TRILINEAR_SAMPLINGMODE","compression","super","this","_texture","getEngine","createRawCubeTexture","update","updateRawCubeTexture","updateRGBDAsync","sphericalPolynomial","lodScale","lodOffset","UpdateRGBDAsyncEnvTools","then","clone","SerializationHelper","Clone","getScene","internalTexture","texture","_bufferViewArray","width","_compression","source","_bufferViewArrayArray","_sphericalPolynomial","_lodGenerationScale","_lodGenerationOffset","NAME","EXT_lights_image_based","loader","name","_loader","enabled","isExtensionUsed","dispose","_lights","onLoading","extensions","gltf","extension","lights","loadSceneAsync","context","GLTFLoader","LoadExtensionAsync","extensionContext","_allMaterialsDirtyRequired","promises","Array","push","logOpen","light","ArrayItem","Get","_loadLightAsync","babylonScene","environmentTexture","logClose","Promise","all","_loaded","imageData","specularImages","length","mipmap","faces","face","specularImageContext","index","image","images","loadImageAsync","babylonTexture","specularImageSize","_babylonTexture","undefined","intensity","level","rotation","Quaternion","FromArray","useRightHandedSystem","Inverse","Matrix","FromQuaternionToRef","getReflectionTextureMatrix","irradianceCoefficients","Error","sphericalHarmonics","SphericalHarmonics","scaleInPlace","convertIrradianceToLambertianRadiance","SphericalPolynomial","FromHarmonics","lodGenerationScale","Math","log2","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"6ZAOO,MAAMA,UAAuBC,EAahC,WAAAC,CAAYC,EAAOC,EAAMC,EAAMC,EAASC,EAAUC,mBAAoBC,EAAOF,EAAUG,0BAA2BC,GAAkB,EAAOC,GAAU,EAA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QE,GAAQ9E,CAAI,KAElCa,KAAK8B,QAAQ0B,UACjC,CACA,CACYxD,KAAK8B,QAAQ0B,WACbN,EAAMS,QAAUF,QAAQC,IAAIZ,GAAUnC,MAAK,KACvC,MAAM4D,EAAiB,IAAIxF,EAAeiB,KAAK8B,QAAQwB,aAAc,KAAMJ,EAAMsB,mBAMjF,GALAD,EAAe1C,KAAOqB,EAAMrB,MAAQ,cACpCqB,EAAMuB,gBAAkBF,EACDG,MAAnBxB,EAAMyB,YACNJ,EAAeK,MAAQ1B,EAAMyB,WAE7BzB,EAAM2B,SAAU,CAChB,IAAIA,EAAWC,EAAWC,UAAU7B,EAAM2B,UAErC7E,KAAK8B,QAAQwB,aAAa0B,uBAC3BH,EAAWC,EAAWG,QAAQJ,IAElCK,EAAOC,oBAAoBN,EAAUN,EAAea,6BACxE,CACgB,IAAKlC,EAAMmC,uBACP,MAAM,IAAIC,MAAM,GAAG7C,0CAEvB,MAAM8C,EAAqBC,EAAmBT,UAAU7B,EAAMmC,wBAC9DE,EAAmBE,aAAavC,EAAMyB,WACtCY,EAAmBG,wCACnB,MAAMnF,EAAsBoF,EAAoBC,cAAcL,GAExDM,GAAsBjC,EAAUE,OAAS,GAAKgC,KAAKC,KAAK7C,EAAMsB,mBACpE,OAAOD,EAAejE,gBAAgBsD,EAAWrD,EAAqBsF,EAAmB,GAEzG,CACQ,OAAO3C,EAAMS,QAAQhD,MAAK,IACfuC,EAAMuB,iBAEzB,EAEAuB,EAAwBtE,GACxBuE,EAAsBvE,GAAM,GAAOE,GAAW,IAAID,EAAuBC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a6 as e,v as s,ab as o,a4 as t,aP as r,aQ as a}from"./index-CHb7NKRY.esm.min.js";import{G as n,A as i}from"./glTFLoader-ChTng_Ew.esm.min.js";import"./thinInstanceMesh-D2RBwifP.esm.min.js";import"./rawTexture-CS3J_QPB.esm.min.js";import"./assetContainer-DrlGfFUd.esm.min.js";import"./glTFLoaderAnimation-CCHLAoRK.esm.min.js";const c="EXT_mesh_gpu_instancing";class l{constructor(e){this.name=c,this._loader=e,this.enabled=this._loader.isExtensionUsed(c)}dispose(){this._loader=null}loadNodeAsync(r,a,c){return n.LoadExtensionAsync(r,a,this.name,((r,n)=>{this._loader._disableInstancedMesh++;const l=this._loader.loadNodeAsync(`/nodes/${a.index}`,a,c);if(this._loader._disableInstancedMesh--,!a._primitiveBabylonMeshes)return l;const m=new Array;let d=0;const h=e=>{if(null==n.attributes[e])return void m.push(Promise.resolve(null));const s=i.Get(`${r}/attributes/${e}`,this._loader.gltf.accessors,n.attributes[e]);if(m.push(this._loader._loadFloatAccessorAsync(`/accessors/${s.bufferView}`,s)),0===d)d=s.count;else if(d!==s.count)throw new Error(`${r}/attributes: Instance buffer accessors do not have the same count.`)};return h("TRANSLATION"),h("ROTATION"),h("SCALE"),l.then((r=>Promise.all(m).then((([n,i,c])=>{const l=new Float32Array(16*d);e.Vector3[0].copyFromFloats(0,0,0),e.Quaternion[0].copyFromFloats(0,0,0,1),e.Vector3[1].copyFromFloats(1,1,1);for(let r=0;r<d;++r)n&&s.FromArrayToRef(n,3*r,e.Vector3[0]),i&&o.FromArrayToRef(i,4*r,e.Quaternion[0]),c&&s.FromArrayToRef(c,3*r,e.Vector3[1]),t.ComposeToRef(e.Vector3[1],e.Quaternion[0],e.Vector3[0],e.Matrix[0]),e.Matrix[0].copyToArray(l,16*r);for(const e of a._primitiveBabylonMeshes)e.thinInstanceSetBuffer("matrix",l,16,!0);return r}))))}))}}r(c),a(c,!0,(e=>new l(e)));export{l as EXT_mesh_gpu_instancing};
|
|
2
|
-
//# sourceMappingURL=EXT_mesh_gpu_instancing-CQHNuvea.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EXT_mesh_gpu_instancing-CQHNuvea.esm.min.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js"],"sourcesContent":["import { Vector3, Quaternion, Matrix, TmpVectors } from \"core/Maths/math.vector\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nimport \"core/Meshes/thinInstanceMesh\";\nconst NAME = \"EXT_mesh_gpu_instancing\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md)\n * [Playground Sample](https://playground.babylonjs.com/#QFIGLW#9)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_mesh_gpu_instancing {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n this._loader._disableInstancedMesh++;\n const promise = this._loader.loadNodeAsync(`/nodes/${node.index}`, node, assign);\n this._loader._disableInstancedMesh--;\n if (!node._primitiveBabylonMeshes) {\n return promise;\n }\n const promises = new Array();\n let instanceCount = 0;\n const loadAttribute = (attribute) => {\n if (extension.attributes[attribute] == undefined) {\n promises.push(Promise.resolve(null));\n return;\n }\n const accessor = ArrayItem.Get(`${extensionContext}/attributes/${attribute}`, this._loader.gltf.accessors, extension.attributes[attribute]);\n promises.push(this._loader._loadFloatAccessorAsync(`/accessors/${accessor.bufferView}`, accessor));\n if (instanceCount === 0) {\n instanceCount = accessor.count;\n }\n else if (instanceCount !== accessor.count) {\n throw new Error(`${extensionContext}/attributes: Instance buffer accessors do not have the same count.`);\n }\n };\n loadAttribute(\"TRANSLATION\");\n loadAttribute(\"ROTATION\");\n loadAttribute(\"SCALE\");\n return promise.then((babylonTransformNode) => {\n return Promise.all(promises).then(([translationBuffer, rotationBuffer, scaleBuffer]) => {\n const matrices = new Float32Array(instanceCount * 16);\n TmpVectors.Vector3[0].copyFromFloats(0, 0, 0); // translation\n TmpVectors.Quaternion[0].copyFromFloats(0, 0, 0, 1); // rotation\n TmpVectors.Vector3[1].copyFromFloats(1, 1, 1); // scale\n for (let i = 0; i < instanceCount; ++i) {\n translationBuffer && Vector3.FromArrayToRef(translationBuffer, i * 3, TmpVectors.Vector3[0]);\n rotationBuffer && Quaternion.FromArrayToRef(rotationBuffer, i * 4, TmpVectors.Quaternion[0]);\n scaleBuffer && Vector3.FromArrayToRef(scaleBuffer, i * 3, TmpVectors.Vector3[1]);\n Matrix.ComposeToRef(TmpVectors.Vector3[1], TmpVectors.Quaternion[0], TmpVectors.Vector3[0], TmpVectors.Matrix[0]);\n TmpVectors.Matrix[0].copyToArray(matrices, i * 16);\n }\n for (const babylonMesh of node._primitiveBabylonMeshes) {\n babylonMesh.thinInstanceSetBuffer(\"matrix\", matrices, 16, true);\n }\n return babylonTransformNode;\n });\n });\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_mesh_gpu_instancing(loader));\n//# sourceMappingURL=EXT_mesh_gpu_instancing.js.map"],"names":["NAME","EXT_mesh_gpu_instancing","constructor","loader","this","name","_loader","enabled","isExtensionUsed","dispose","loadNodeAsync","context","node","assign","GLTFLoader","LoadExtensionAsync","extensionContext","extension","_disableInstancedMesh","promise","index","_primitiveBabylonMeshes","promises","Array","instanceCount","loadAttribute","attribute","undefined","attributes","push","Promise","resolve","accessor","ArrayItem","Get","gltf","accessors","_loadFloatAccessorAsync","bufferView","count","Error","then","babylonTransformNode","all","translationBuffer","rotationBuffer","scaleBuffer","matrices","Float32Array","TmpVectors","Vector3","copyFromFloats","Quaternion","i","FromArrayToRef","Matrix","ComposeToRef","copyToArray","babylonMesh","thinInstanceSetBuffer","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"2UAIA,MAAMA,EAAO,0BAMN,MAAMC,EAIT,WAAAC,CAAYC,GAIRC,KAAKC,K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,QAAQ,IACzFL,GAAkBO,EAAWE,eAAeT,EAAoB,EAAJQ,EAAOJ,EAAWG,WAAW,IACzFN,GAAeI,EAAQI,eAAeR,EAAiB,EAAJO,EAAOJ,EAAWC,QAAQ,IAC7EK,EAAOC,aAAaP,EAAWC,QAAQ,GAAID,EAAWG,WAAW,GAAIH,EAAWC,QAAQ,GAAID,EAAWM,OAAO,IAC9GN,EAAWM,OAAO,GAAGE,YAAYV,EAAc,GAAJM,GAE/C,IAAK,MAAMK,KAAe9C,EAAKS,wBAC3BqC,EAAYC,sBAAsB,SAAUZ,EAAU,IAAI,GAE9D,OAAOL,CAAoB,KAEjC,GAEd,EAEAkB,EAAwB5D,GACxB6D,EAAsB7D,GAAM,GAAOG,GAAW,IAAIF,EAAwBE"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { a6 as TmpVectors, v as Vector3, ab as Quaternion, a4 as Matrix, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-7pOUdivR.esm.js';
|
|
2
|
-
import { G as GLTFLoader, A as ArrayItem } from './glTFLoader-7uvFneFt.esm.js';
|
|
3
|
-
import './thinInstanceMesh-DVy1Ya49.esm.js';
|
|
4
|
-
import './rawTexture-CTQXP4lW.esm.js';
|
|
5
|
-
import './assetContainer-DUHXkzRR.esm.js';
|
|
6
|
-
import './glTFLoaderAnimation-BeBTAsWq.esm.js';
|
|
7
|
-
|
|
8
|
-
const NAME = "EXT_mesh_gpu_instancing";
|
|
9
|
-
/**
|
|
10
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md)
|
|
11
|
-
* [Playground Sample](https://playground.babylonjs.com/#QFIGLW#9)
|
|
12
|
-
*/
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14
|
-
class EXT_mesh_gpu_instancing {
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
|
-
constructor(loader) {
|
|
19
|
-
/**
|
|
20
|
-
* The name of this extension.
|
|
21
|
-
*/
|
|
22
|
-
this.name = NAME;
|
|
23
|
-
this._loader = loader;
|
|
24
|
-
this.enabled = this._loader.isExtensionUsed(NAME);
|
|
25
|
-
}
|
|
26
|
-
/** @internal */
|
|
27
|
-
dispose() {
|
|
28
|
-
this._loader = null;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
loadNodeAsync(context, node, assign) {
|
|
34
|
-
return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {
|
|
35
|
-
this._loader._disableInstancedMesh++;
|
|
36
|
-
const promise = this._loader.loadNodeAsync(`/nodes/${node.index}`, node, assign);
|
|
37
|
-
this._loader._disableInstancedMesh--;
|
|
38
|
-
if (!node._primitiveBabylonMeshes) {
|
|
39
|
-
return promise;
|
|
40
|
-
}
|
|
41
|
-
const promises = new Array();
|
|
42
|
-
let instanceCount = 0;
|
|
43
|
-
const loadAttribute = (attribute) => {
|
|
44
|
-
if (extension.attributes[attribute] == undefined) {
|
|
45
|
-
promises.push(Promise.resolve(null));
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const accessor = ArrayItem.Get(`${extensionContext}/attributes/${attribute}`, this._loader.gltf.accessors, extension.attributes[attribute]);
|
|
49
|
-
promises.push(this._loader._loadFloatAccessorAsync(`/accessors/${accessor.bufferView}`, accessor));
|
|
50
|
-
if (instanceCount === 0) {
|
|
51
|
-
instanceCount = accessor.count;
|
|
52
|
-
}
|
|
53
|
-
else if (instanceCount !== accessor.count) {
|
|
54
|
-
throw new Error(`${extensionContext}/attributes: Instance buffer accessors do not have the same count.`);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
loadAttribute("TRANSLATION");
|
|
58
|
-
loadAttribute("ROTATION");
|
|
59
|
-
loadAttribute("SCALE");
|
|
60
|
-
return promise.then((babylonTransformNode) => {
|
|
61
|
-
return Promise.all(promises).then(([translationBuffer, rotationBuffer, scaleBuffer]) => {
|
|
62
|
-
const matrices = new Float32Array(instanceCount * 16);
|
|
63
|
-
TmpVectors.Vector3[0].copyFromFloats(0, 0, 0); // translation
|
|
64
|
-
TmpVectors.Quaternion[0].copyFromFloats(0, 0, 0, 1); // rotation
|
|
65
|
-
TmpVectors.Vector3[1].copyFromFloats(1, 1, 1); // scale
|
|
66
|
-
for (let i = 0; i < instanceCount; ++i) {
|
|
67
|
-
translationBuffer && Vector3.FromArrayToRef(translationBuffer, i * 3, TmpVectors.Vector3[0]);
|
|
68
|
-
rotationBuffer && Quaternion.FromArrayToRef(rotationBuffer, i * 4, TmpVectors.Quaternion[0]);
|
|
69
|
-
scaleBuffer && Vector3.FromArrayToRef(scaleBuffer, i * 3, TmpVectors.Vector3[1]);
|
|
70
|
-
Matrix.ComposeToRef(TmpVectors.Vector3[1], TmpVectors.Quaternion[0], TmpVectors.Vector3[0], TmpVectors.Matrix[0]);
|
|
71
|
-
TmpVectors.Matrix[0].copyToArray(matrices, i * 16);
|
|
72
|
-
}
|
|
73
|
-
for (const babylonMesh of node._primitiveBabylonMeshes) {
|
|
74
|
-
babylonMesh.thinInstanceSetBuffer("matrix", matrices, 16, true);
|
|
75
|
-
}
|
|
76
|
-
return babylonTransformNode;
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
unregisterGLTFExtension(NAME);
|
|
83
|
-
registerGLTFExtension(NAME, true, (loader) => new EXT_mesh_gpu_instancing(loader));
|
|
84
|
-
|
|
85
|
-
export { EXT_mesh_gpu_instancing };
|
|
86
|
-
//# sourceMappingURL=EXT_mesh_gpu_instancing-xQzfnk4R.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EXT_mesh_gpu_instancing-xQzfnk4R.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_mesh_gpu_instancing.js"],"sourcesContent":["import { Vector3, Quaternion, Matrix, TmpVectors } from \"core/Maths/math.vector\";\nimport { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nimport \"core/Meshes/thinInstanceMesh\";\nconst NAME = \"EXT_mesh_gpu_instancing\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing/README.md)\n * [Playground Sample](https://playground.babylonjs.com/#QFIGLW#9)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_mesh_gpu_instancing {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this._loader = loader;\n this.enabled = this._loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadNodeAsync(context, node, assign) {\n return GLTFLoader.LoadExtensionAsync(context, node, this.name, (extensionContext, extension) => {\n this._loader._disableInstancedMesh++;\n const promise = this._loader.loadNodeAsync(`/nodes/${node.index}`, node, assign);\n this._loader._disableInstancedMesh--;\n if (!node._primitiveBabylonMeshes) {\n return promise;\n }\n const promises = new Array();\n let instanceCount = 0;\n const loadAttribute = (attribute) => {\n if (extension.attributes[attribute] == undefined) {\n promises.push(Promise.resolve(null));\n return;\n }\n const accessor = ArrayItem.Get(`${extensionContext}/attributes/${attribute}`, this._loader.gltf.accessors, extension.attributes[attribute]);\n promises.push(this._loader._loadFloatAccessorAsync(`/accessors/${accessor.bufferView}`, accessor));\n if (instanceCount === 0) {\n instanceCount = accessor.count;\n }\n else if (instanceCount !== accessor.count) {\n throw new Error(`${extensionContext}/attributes: Instance buffer accessors do not have the same count.`);\n }\n };\n loadAttribute(\"TRANSLATION\");\n loadAttribute(\"ROTATION\");\n loadAttribute(\"SCALE\");\n return promise.then((babylonTransformNode) => {\n return Promise.all(promises).then(([translationBuffer, rotationBuffer, scaleBuffer]) => {\n const matrices = new Float32Array(instanceCount * 16);\n TmpVectors.Vector3[0].copyFromFloats(0, 0, 0); // translation\n TmpVectors.Quaternion[0].copyFromFloats(0, 0, 0, 1); // rotation\n TmpVectors.Vector3[1].copyFromFloats(1, 1, 1); // scale\n for (let i = 0; i < instanceCount; ++i) {\n translationBuffer && Vector3.FromArrayToRef(translationBuffer, i * 3, TmpVectors.Vector3[0]);\n rotationBuffer && Quaternion.FromArrayToRef(rotationBuffer, i * 4, TmpVectors.Quaternion[0]);\n scaleBuffer && Vector3.FromArrayToRef(scaleBuffer, i * 3, TmpVectors.Vector3[1]);\n Matrix.ComposeToRef(TmpVectors.Vector3[1], TmpVectors.Quaternion[0], TmpVectors.Vector3[0], TmpVectors.Matrix[0]);\n TmpVectors.Matrix[0].copyToArray(matrices, i * 16);\n }\n for (const babylonMesh of node._primitiveBabylonMeshes) {\n babylonMesh.thinInstanceSetBuffer(\"matrix\", matrices, 16, true);\n }\n return babylonTransformNode;\n });\n });\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_mesh_gpu_instancing(loader));\n//# sourceMappingURL=EXT_mesh_gpu_instancing.js.map"],"names":[],"mappings":";;;;;;;AAIA,MAAM,IAAI,GAAG,yBAAyB;AACtC;AACA;AACA;AACA;AACA;AACO,MAAM,uBAAuB,CAAC;AACrC;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA;AACA;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC;AACzD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE;AACzC,Q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H,wBAAwB,WAAW,IAAI,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACxG,wBAAwB,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzI,wBAAwB,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC;AAC1E;AACA,oBAAoB,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,uBAAuB,EAAE;AAC5E,wBAAwB,WAAW,CAAC,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC;AACvF;AACA,oBAAoB,OAAO,oBAAoB;AAC/C,iBAAiB,CAAC;AAClB,aAAa,CAAC;AACd,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{G as e,A as t}from"./glTFLoader-ChTng_Ew.esm.min.js";import{T as s,aP as o,aQ as r}from"./index-CHb7NKRY.esm.min.js";import"./rawTexture-CS3J_QPB.esm.min.js";import"./assetContainer-DrlGfFUd.esm.min.js";import"./glTFLoaderAnimation-CCHLAoRK.esm.min.js";class n{static get Default(){return n._Default||(n._Default=new n),n._Default}constructor(){const e=n.Configuration.decoder;this._decoderModulePromise=s.LoadBabylonScriptAsync(e.url).then((()=>MeshoptDecoder.ready))}dispose(){delete this._decoderModulePromise}decodeGltfBufferAsync(e,t,s,o,r){return this._decoderModulePromise.then((async()=>{MeshoptDecoder.useWorkers(1);const n=await MeshoptDecoder.decodeGltfBufferAsync(t,s,e,o,r);return MeshoptDecoder.useWorkers(0),n}))}}n.Configuration={decoder:{url:`${s._DefaultCdnUrl}/meshopt_decoder.js`}},n._Default=null;const a="EXT_meshopt_compression";class d{constructor(e){this.name=a,this.enabled=e.isExtensionUsed(a),this._loader=e}dispose(){this._loader=null}loadBufferViewAsync(s,o){return e.LoadExtensionAsync(s,o,this.name,((e,r)=>{const a=o;if(a._meshOptData)return a._meshOptData;const d=t.Get(`${s}/buffer`,this._loader.gltf.buffers,r.buffer);return a._meshOptData=this._loader.loadBufferAsync(`/buffers/${d.index}`,d,r.byteOffset||0,r.byteLength).then((e=>n.Default.decodeGltfBufferAsync(e,r.count,r.byteStride,r.mode,r.filter))),a._meshOptData}))}}o(a),r(a,!0,(e=>new d(e)));export{d as EXT_meshopt_compression};
|
|
2
|
-
//# sourceMappingURL=EXT_meshopt_compression-B2YW8Jul.esm.min.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EXT_meshopt_compression-B2YW8Jul.esm.min.js","sources":["../../../../../dev/core/dist/Meshes/Compression/meshoptCompression.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_meshopt_compression.js"],"sourcesContent":["import { Tools } from \"../../Misc/tools\";\n/**\n * Meshopt compression (https://github.com/zeux/meshoptimizer)\n *\n * This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.\n *\n * **Encoder**\n *\n * The encoder is not currently implemented.\n *\n * **Decoder**\n *\n * By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).\n *\n * To update the configuration, use the following code:\n * ```javascript\n * MeshoptCompression.Configuration = {\n * decoder: {\n * url: \"<url to the meshopt decoder library>\"\n * }\n * };\n * ```\n */\nexport class MeshoptCompression {\n /**\n * Default instance for the meshoptimizer object.\n */\n static get Default() {\n if (!MeshoptCompression._Default) {\n MeshoptCompression._Default = new MeshoptCompression();\n }\n return MeshoptCompression._Default;\n }\n /**\n * Constructor\n */\n constructor() {\n const decoder = MeshoptCompression.Configuration.decoder;\n this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {\n // Wait for WebAssembly compilation before resolving promise\n return MeshoptDecoder.ready;\n });\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n delete this._decoderModulePromise;\n }\n /**\n * Decode meshopt data.\n * @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder\n * @param source The input data.\n * @param count The number of elements.\n * @param stride The stride in bytes.\n * @param mode The compression mode.\n * @param filter The compression filter.\n * @returns a Promise<Uint8Array> that resolves to the decoded data\n */\n decodeGltfBufferAsync(source, count, stride, mode, filter) {\n return this._decoderModulePromise.then(async () => {\n MeshoptDecoder.useWorkers(1);\n const result = await MeshoptDecoder.decodeGltfBufferAsync(count, stride, source, mode, filter);\n MeshoptDecoder.useWorkers(0);\n return result;\n });\n }\n}\n/**\n * The configuration. Defaults to the following:\n * ```javascript\n * decoder: {\n * url: \"https://cdn.babylonjs.com/meshopt_decoder.js\"\n * }\n * ```\n */\nMeshoptCompression.Configuration = {\n decoder: {\n url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,\n },\n};\nMeshoptCompression._Default = null;\n//# sourceMappingURL=meshoptCompression.js.map","import { ArrayItem, GLTFLoader } from \"../glTFLoader\";\nimport { MeshoptCompression } from \"core/Meshes/Compression/meshoptCompression\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_meshopt_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md)\n *\n * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_meshopt_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this.enabled = loader.isExtensionUsed(NAME);\n this._loader = loader;\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadBufferViewAsync(context, bufferView) {\n return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, (extensionContext, extension) => {\n const bufferViewMeshopt = bufferView;\n if (bufferViewMeshopt._meshOptData) {\n return bufferViewMeshopt._meshOptData;\n }\n const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);\n bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength).then((buffer) => {\n return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);\n });\n return bufferViewMeshopt._meshOptData;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_meshopt_compression(loader));\n//# sourceMappingURL=EXT_meshopt_compression.js.map"],"names":["MeshoptCompression","Default","_Default","constructor","decoder","Configuration","this","_decoderModulePromise","Tools","LoadBabylonScriptAsync","url","then","MeshoptDecoder","ready","dispose","decodeGltfBufferAsync","source","count","stride","mode","filter","async","useWorkers","result","_DefaultCdnUrl","NAME","EXT_meshopt_compression","loader","name","enabled","isExtensionUsed","_loader","loadBufferViewAsync","context","bufferView","GLTFLoader","LoadExtensionAsync","extensionContext","extension","bufferViewMeshopt","_meshOptData","buffer","ArrayItem","Get","gltf","buffers","loadBufferAsync","index","byteOffset","byteLength","byteStride","unregisterGLTFExtension","registerGLTFExtension"],"mappings":"oQAuBO,MAAMA,EAIT,kBAAWC,GAIP,OAHKD,EAAmBE,WACpBF,EAAmBE,SAAW,IAAIF,GAE/BA,EAAmBE,QAClC,CAII,WAAAC,GACI,MAAMC,EAAUJ,EAAmBK,cAAcD,QACjDE,KAAKC,sBAAwBC,EAAMC,uB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as ArrayItem } from './glTFLoader-7uvFneFt.esm.js';
|
|
2
|
-
import { T as Tools, aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-7pOUdivR.esm.js';
|
|
3
|
-
import './rawTexture-CTQXP4lW.esm.js';
|
|
4
|
-
import './assetContainer-DUHXkzRR.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-BeBTAsWq.esm.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Meshopt compression (https://github.com/zeux/meshoptimizer)
|
|
9
|
-
*
|
|
10
|
-
* This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.
|
|
11
|
-
*
|
|
12
|
-
* **Encoder**
|
|
13
|
-
*
|
|
14
|
-
* The encoder is not currently implemented.
|
|
15
|
-
*
|
|
16
|
-
* **Decoder**
|
|
17
|
-
*
|
|
18
|
-
* By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).
|
|
19
|
-
*
|
|
20
|
-
* To update the configuration, use the following code:
|
|
21
|
-
* ```javascript
|
|
22
|
-
* MeshoptCompression.Configuration = {
|
|
23
|
-
* decoder: {
|
|
24
|
-
* url: "<url to the meshopt decoder library>"
|
|
25
|
-
* }
|
|
26
|
-
* };
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
class MeshoptCompression {
|
|
30
|
-
/**
|
|
31
|
-
* Default instance for the meshoptimizer object.
|
|
32
|
-
*/
|
|
33
|
-
static get Default() {
|
|
34
|
-
if (!MeshoptCompression._Default) {
|
|
35
|
-
MeshoptCompression._Default = new MeshoptCompression();
|
|
36
|
-
}
|
|
37
|
-
return MeshoptCompression._Default;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Constructor
|
|
41
|
-
*/
|
|
42
|
-
constructor() {
|
|
43
|
-
const decoder = MeshoptCompression.Configuration.decoder;
|
|
44
|
-
this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {
|
|
45
|
-
// Wait for WebAssembly compilation before resolving promise
|
|
46
|
-
return MeshoptDecoder.ready;
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Stop all async operations and release resources.
|
|
51
|
-
*/
|
|
52
|
-
dispose() {
|
|
53
|
-
delete this._decoderModulePromise;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Decode meshopt data.
|
|
57
|
-
* @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder
|
|
58
|
-
* @param source The input data.
|
|
59
|
-
* @param count The number of elements.
|
|
60
|
-
* @param stride The stride in bytes.
|
|
61
|
-
* @param mode The compression mode.
|
|
62
|
-
* @param filter The compression filter.
|
|
63
|
-
* @returns a Promise<Uint8Array> that resolves to the decoded data
|
|
64
|
-
*/
|
|
65
|
-
decodeGltfBufferAsync(source, count, stride, mode, filter) {
|
|
66
|
-
return this._decoderModulePromise.then(async () => {
|
|
67
|
-
MeshoptDecoder.useWorkers(1);
|
|
68
|
-
const result = await MeshoptDecoder.decodeGltfBufferAsync(count, stride, source, mode, filter);
|
|
69
|
-
MeshoptDecoder.useWorkers(0);
|
|
70
|
-
return result;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* The configuration. Defaults to the following:
|
|
76
|
-
* ```javascript
|
|
77
|
-
* decoder: {
|
|
78
|
-
* url: "https://cdn.babylonjs.com/meshopt_decoder.js"
|
|
79
|
-
* }
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
MeshoptCompression.Configuration = {
|
|
83
|
-
decoder: {
|
|
84
|
-
url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
MeshoptCompression._Default = null;
|
|
88
|
-
|
|
89
|
-
const NAME = "EXT_meshopt_compression";
|
|
90
|
-
/**
|
|
91
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md)
|
|
92
|
-
*
|
|
93
|
-
* This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js
|
|
94
|
-
* @since 5.0.0
|
|
95
|
-
*/
|
|
96
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
97
|
-
class EXT_meshopt_compression {
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
*/
|
|
101
|
-
constructor(loader) {
|
|
102
|
-
/**
|
|
103
|
-
* The name of this extension.
|
|
104
|
-
*/
|
|
105
|
-
this.name = NAME;
|
|
106
|
-
this.enabled = loader.isExtensionUsed(NAME);
|
|
107
|
-
this._loader = loader;
|
|
108
|
-
}
|
|
109
|
-
/** @internal */
|
|
110
|
-
dispose() {
|
|
111
|
-
this._loader = null;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* @internal
|
|
115
|
-
*/
|
|
116
|
-
loadBufferViewAsync(context, bufferView) {
|
|
117
|
-
return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, (extensionContext, extension) => {
|
|
118
|
-
const bufferViewMeshopt = bufferView;
|
|
119
|
-
if (bufferViewMeshopt._meshOptData) {
|
|
120
|
-
return bufferViewMeshopt._meshOptData;
|
|
121
|
-
}
|
|
122
|
-
const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);
|
|
123
|
-
bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength).then((buffer) => {
|
|
124
|
-
return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);
|
|
125
|
-
});
|
|
126
|
-
return bufferViewMeshopt._meshOptData;
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
unregisterGLTFExtension(NAME);
|
|
131
|
-
registerGLTFExtension(NAME, true, (loader) => new EXT_meshopt_compression(loader));
|
|
132
|
-
|
|
133
|
-
export { EXT_meshopt_compression };
|
|
134
|
-
//# sourceMappingURL=EXT_meshopt_compression-D-WT4x3b.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EXT_meshopt_compression-D-WT4x3b.esm.js","sources":["../../../../../dev/core/dist/Meshes/Compression/meshoptCompression.js","../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_meshopt_compression.js"],"sourcesContent":["import { Tools } from \"../../Misc/tools\";\n/**\n * Meshopt compression (https://github.com/zeux/meshoptimizer)\n *\n * This class wraps the meshopt library from https://github.com/zeux/meshoptimizer/tree/master/js.\n *\n * **Encoder**\n *\n * The encoder is not currently implemented.\n *\n * **Decoder**\n *\n * By default, the configuration points to a copy of the meshopt files on the Babylon.js preview CDN (e.g. https://preview.babylonjs.com/meshopt_decoder.js).\n *\n * To update the configuration, use the following code:\n * ```javascript\n * MeshoptCompression.Configuration = {\n * decoder: {\n * url: \"<url to the meshopt decoder library>\"\n * }\n * };\n * ```\n */\nexport class MeshoptCompression {\n /**\n * Default instance for the meshoptimizer object.\n */\n static get Default() {\n if (!MeshoptCompression._Default) {\n MeshoptCompression._Default = new MeshoptCompression();\n }\n return MeshoptCompression._Default;\n }\n /**\n * Constructor\n */\n constructor() {\n const decoder = MeshoptCompression.Configuration.decoder;\n this._decoderModulePromise = Tools.LoadBabylonScriptAsync(decoder.url).then(() => {\n // Wait for WebAssembly compilation before resolving promise\n return MeshoptDecoder.ready;\n });\n }\n /**\n * Stop all async operations and release resources.\n */\n dispose() {\n delete this._decoderModulePromise;\n }\n /**\n * Decode meshopt data.\n * @see https://github.com/zeux/meshoptimizer/tree/master/js#decoder\n * @param source The input data.\n * @param count The number of elements.\n * @param stride The stride in bytes.\n * @param mode The compression mode.\n * @param filter The compression filter.\n * @returns a Promise<Uint8Array> that resolves to the decoded data\n */\n decodeGltfBufferAsync(source, count, stride, mode, filter) {\n return this._decoderModulePromise.then(async () => {\n MeshoptDecoder.useWorkers(1);\n const result = await MeshoptDecoder.decodeGltfBufferAsync(count, stride, source, mode, filter);\n MeshoptDecoder.useWorkers(0);\n return result;\n });\n }\n}\n/**\n * The configuration. Defaults to the following:\n * ```javascript\n * decoder: {\n * url: \"https://cdn.babylonjs.com/meshopt_decoder.js\"\n * }\n * ```\n */\nMeshoptCompression.Configuration = {\n decoder: {\n url: `${Tools._DefaultCdnUrl}/meshopt_decoder.js`,\n },\n};\nMeshoptCompression._Default = null;\n//# sourceMappingURL=meshoptCompression.js.map","import { ArrayItem, GLTFLoader } from \"../glTFLoader\";\nimport { MeshoptCompression } from \"core/Meshes/Compression/meshoptCompression\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_meshopt_compression\";\n/**\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md)\n *\n * This extension uses a WebAssembly decoder module from https://github.com/zeux/meshoptimizer/tree/master/js\n * @since 5.0.0\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_meshopt_compression {\n /**\n * @internal\n */\n constructor(loader) {\n /**\n * The name of this extension.\n */\n this.name = NAME;\n this.enabled = loader.isExtensionUsed(NAME);\n this._loader = loader;\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n loadBufferViewAsync(context, bufferView) {\n return GLTFLoader.LoadExtensionAsync(context, bufferView, this.name, (extensionContext, extension) => {\n const bufferViewMeshopt = bufferView;\n if (bufferViewMeshopt._meshOptData) {\n return bufferViewMeshopt._meshOptData;\n }\n const buffer = ArrayItem.Get(`${context}/buffer`, this._loader.gltf.buffers, extension.buffer);\n bufferViewMeshopt._meshOptData = this._loader.loadBufferAsync(`/buffers/${buffer.index}`, buffer, extension.byteOffset || 0, extension.byteLength).then((buffer) => {\n return MeshoptCompression.Default.decodeGltfBufferAsync(buffer, extension.count, extension.byteStride, extension.mode, extension.filter);\n });\n return bufferViewMeshopt._meshOptData;\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_meshopt_compression(loader));\n//# sourceMappingURL=EXT_meshopt_compression.js.map"],"names":[],"mappings":";;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,kBAAkB,CAAC;AAChC;AACA;AACA;AACA,IAAI,WAAW,OAAO,GAAG;AACzB,QAAQ,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE;AAC1C,YAAY,kBAAkB,CAAC,QAAQ,GAAG,IAAI,kBAAkB,EAAE;AAClE;AACA,QAAQ,OAAO,kBAAkB,CAAC,QAAQ;AAC1C;AACA;AACA;AACA;AACA,IAAI,WAAW,GAAG;AAClB,QAAQ,MAAM,OAAO,GAAG,kBAAkB,CAAC,aAAa,CAAC,OAAO;AAChE,QAAQ,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM;AAC1F;AACA,YAAY,OAAO,cAAc,CAAC,KAAK;AACvC,SAAS,CAAC;AACV;AACA;AACA;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,OAAO,IAAI,CAAC,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;AAC/D,QAAQ,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,YAAY;AAC3D,YAAY,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;AACxC,YAAY,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC;A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YAAY,iBAAiB,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,UAAU,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK;AAChL,gBAAgB,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC;AACxJ,aAAa,CAAC;AACd,YAAY,OAAO,iBAAiB,CAAC,YAAY;AACjD,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { G as GLTFLoader, A as ArrayItem } from './glTFLoader-7uvFneFt.esm.js';
|
|
2
|
-
import { aP as unregisterGLTFExtension, aQ as registerGLTFExtension } from './index-7pOUdivR.esm.js';
|
|
3
|
-
import './rawTexture-CTQXP4lW.esm.js';
|
|
4
|
-
import './assetContainer-DUHXkzRR.esm.js';
|
|
5
|
-
import './glTFLoaderAnimation-BeBTAsWq.esm.js';
|
|
6
|
-
|
|
7
|
-
const NAME = "EXT_texture_avif";
|
|
8
|
-
/**
|
|
9
|
-
* [glTF PR](https://github.com/KhronosGroup/glTF/pull/2235)
|
|
10
|
-
* [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_avif/README.md)
|
|
11
|
-
*/
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
|
-
class EXT_texture_avif {
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
constructor(loader) {
|
|
18
|
-
/** The name of this extension. */
|
|
19
|
-
this.name = NAME;
|
|
20
|
-
this._loader = loader;
|
|
21
|
-
this.enabled = loader.isExtensionUsed(NAME);
|
|
22
|
-
}
|
|
23
|
-
/** @internal */
|
|
24
|
-
dispose() {
|
|
25
|
-
this._loader = null;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
_loadTextureAsync(context, texture, assign) {
|
|
31
|
-
return GLTFLoader.LoadExtensionAsync(context, texture, this.name, (extensionContext, extension) => {
|
|
32
|
-
const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);
|
|
33
|
-
const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);
|
|
34
|
-
return this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {
|
|
35
|
-
assign(babylonTexture);
|
|
36
|
-
}, undefined, !texture._textureInfo.nonColorData);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
unregisterGLTFExtension(NAME);
|
|
41
|
-
registerGLTFExtension(NAME, true, (loader) => new EXT_texture_avif(loader));
|
|
42
|
-
|
|
43
|
-
export { EXT_texture_avif };
|
|
44
|
-
//# sourceMappingURL=EXT_texture_avif-B3jJQLi_.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EXT_texture_avif-B3jJQLi_.esm.js","sources":["../../../../../dev/loaders/dist/glTF/2.0/Extensions/EXT_texture_avif.js"],"sourcesContent":["import { GLTFLoader, ArrayItem } from \"../glTFLoader\";\nimport { registerGLTFExtension, unregisterGLTFExtension } from \"../glTFLoaderExtensionRegistry\";\nconst NAME = \"EXT_texture_avif\";\n/**\n * [glTF PR](https://github.com/KhronosGroup/glTF/pull/2235)\n * [Specification](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_texture_avif/README.md)\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class EXT_texture_avif {\n /**\n * @internal\n */\n constructor(loader) {\n /** The name of this extension. */\n this.name = NAME;\n this._loader = loader;\n this.enabled = loader.isExtensionUsed(NAME);\n }\n /** @internal */\n dispose() {\n this._loader = null;\n }\n /**\n * @internal\n */\n _loadTextureAsync(context, texture, assign) {\n return GLTFLoader.LoadExtensionAsync(context, texture, this.name, (extensionContext, extension) => {\n const sampler = texture.sampler == undefined ? GLTFLoader.DefaultSampler : ArrayItem.Get(`${context}/sampler`, this._loader.gltf.samplers, texture.sampler);\n const image = ArrayItem.Get(`${extensionContext}/source`, this._loader.gltf.images, extension.source);\n return this._loader._createTextureAsync(context, sampler, image, (babylonTexture) => {\n assign(babylonTexture);\n }, undefined, !texture._textureInfo.nonColorData);\n });\n }\n}\nunregisterGLTFExtension(NAME);\nregisterGLTFExtension(NAME, true, (loader) => new EXT_texture_avif(loader));\n//# sourceMappingURL=EXT_texture_avif.js.map"],"names":[],"mappings":";;;;;;AAEA,MAAM,IAAI,GAAG,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACO,MAAM,gBAAgB,CAAC;AAC9B;AACA;AACA;AACA,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB;AACA,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI;AACxB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;AAC7B,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;AACnD;AACA;AACA,IAAI,OAAO,GAAG;AACd,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA,IAAI,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE;AAChD,QAAQ,OAAO,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,gBAAgB,EAAE,SAAS,KAAK;AAC3G,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,SAAS,GAAG,UAAU,CAAC,cAAc,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC;AACvK,YAAY,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC;AACjH,YAAY,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,cAAc,KAAK;AACjG,gBAAgB,MAAM,CAAC,cAAc,CAAC;AACtC,aAAa,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC;AAC7D,SAAS,CAAC;AACV;AACA;AACA,uBAAuB,CAAC,IAAI,CAAC;AAC7B,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;;;;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{G as e,A as s}from"./glTFLoader-ChTng_Ew.esm.min.js";import{aP as t,aQ as r}from"./index-CHb7NKRY.esm.min.js";import"./rawTexture-CS3J_QPB.esm.min.js";import"./assetContainer-DrlGfFUd.esm.min.js";import"./glTFLoaderAnimation-CCHLAoRK.esm.min.js";const a="EXT_texture_avif";class o{constructor(e){this.name=a,this._loader=e,this.enabled=e.isExtensionUsed(a)}dispose(){this._loader=null}_loadTextureAsync(t,r,a){return e.LoadExtensionAsync(t,r,this.name,((o,n)=>{const i=null==r.sampler?e.DefaultSampler:s.Get(`${t}/sampler`,this._loader.gltf.samplers,r.sampler),m=s.Get(`${o}/source`,this._loader.gltf.images,n.source);return this._loader._createTextureAsync(t,i,m,(e=>{a(e)}),void 0,!r._textureInfo.nonColorData)}))}}t(a),r(a,!0,(e=>new o(e)));export{o as EXT_texture_avif};
|
|
2
|
-
//# sourceMappingURL=EXT_texture_avif-Cdp43X9W.esm.min.js.map
|