@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
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
import { Observable } from "@babylonjs/core/Misc/observable.js";
|
|
2
|
+
import "@babylonjs/core/Misc/observable.extensions.js";
|
|
3
|
+
import { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
|
4
|
+
import { Animation, CircleEase, BackEase, BounceEase, CubicEase, ElasticEase, ExponentialEase, PowerEase, QuadraticEase, QuarticEase, QuinticEase, SineEase, } from "@babylonjs/core/Animations/index.js";
|
|
5
|
+
import { Quaternion, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
|
|
6
|
+
import { Tags } from "@babylonjs/core/Misc/tags.js";
|
|
7
|
+
import { PBRMaterial } from "@babylonjs/core/Materials/PBR/pbrMaterial.js";
|
|
8
|
+
import { MultiMaterial } from "@babylonjs/core/Materials/multiMaterial.js";
|
|
9
|
+
import { Tools } from "@babylonjs/core/Misc/tools.js";
|
|
10
|
+
import { GroupModelAnimation, AnimationPlayMode, EasingFunction, AnimationState } from "./modelAnimation.js";
|
|
11
|
+
import { deepmerge, extendClassWithConfig } from "../helper/index.js";
|
|
12
|
+
import { TransformNode } from "@babylonjs/core/Meshes/transformNode.js";
|
|
13
|
+
import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
|
|
14
|
+
/**
|
|
15
|
+
* The current state of the model
|
|
16
|
+
*/
|
|
17
|
+
export var ModelState;
|
|
18
|
+
(function (ModelState) {
|
|
19
|
+
ModelState[ModelState["INIT"] = 0] = "INIT";
|
|
20
|
+
ModelState[ModelState["LOADING"] = 1] = "LOADING";
|
|
21
|
+
ModelState[ModelState["LOADED"] = 2] = "LOADED";
|
|
22
|
+
ModelState[ModelState["ENTRY"] = 3] = "ENTRY";
|
|
23
|
+
ModelState[ModelState["ENTRYDONE"] = 4] = "ENTRYDONE";
|
|
24
|
+
ModelState[ModelState["COMPLETE"] = 5] = "COMPLETE";
|
|
25
|
+
ModelState[ModelState["CANCELED"] = 6] = "CANCELED";
|
|
26
|
+
ModelState[ModelState["ERROR"] = 7] = "ERROR";
|
|
27
|
+
})(ModelState || (ModelState = {}));
|
|
28
|
+
/**
|
|
29
|
+
* The viewer model is a container for all assets representing a sngle loaded model.
|
|
30
|
+
*/
|
|
31
|
+
var ViewerModel = /** @class */ (function () {
|
|
32
|
+
function ViewerModel(_observablesManager, modelConfiguration, _configurationContainer) {
|
|
33
|
+
var _this = this;
|
|
34
|
+
this._observablesManager = _observablesManager;
|
|
35
|
+
this._configurationContainer = _configurationContainer;
|
|
36
|
+
/**
|
|
37
|
+
* the list of meshes that are a part of this model
|
|
38
|
+
*/
|
|
39
|
+
this._meshes = [];
|
|
40
|
+
/**
|
|
41
|
+
* ParticleSystems connected to this model
|
|
42
|
+
*/
|
|
43
|
+
this.particleSystems = [];
|
|
44
|
+
/**
|
|
45
|
+
* Skeletons defined in this model
|
|
46
|
+
*/
|
|
47
|
+
this.skeletons = [];
|
|
48
|
+
this._loaderDone = false;
|
|
49
|
+
this._animatables = [];
|
|
50
|
+
this._frameRate = 60;
|
|
51
|
+
this._shadowsRenderedAfterLoad = false;
|
|
52
|
+
this.onLoadedObservable = new Observable();
|
|
53
|
+
this.onLoadErrorObservable = new Observable();
|
|
54
|
+
this.onLoadProgressObservable = new Observable();
|
|
55
|
+
this.onCompleteObservable = new Observable();
|
|
56
|
+
this.onAfterConfigure = new Observable();
|
|
57
|
+
this.state = ModelState.INIT;
|
|
58
|
+
var scene = this._configurationContainer && this._configurationContainer.scene;
|
|
59
|
+
this.rootMesh = new Mesh("modelRootMesh", scene);
|
|
60
|
+
this._pivotMesh = new TransformNode("pivotMesh", scene);
|
|
61
|
+
this._pivotMesh.parent = this.rootMesh;
|
|
62
|
+
// rotate 180, gltf fun
|
|
63
|
+
this._pivotMesh.rotation.y += Math.PI;
|
|
64
|
+
this._scaleTransition = new Animation("scaleAnimation", "scaling", this._frameRate, Animation.ANIMATIONTYPE_VECTOR3, Animation.ANIMATIONLOOPMODE_CONSTANT);
|
|
65
|
+
this._animations = [];
|
|
66
|
+
//create a copy of the configuration to make sure it doesn't change even after it is changed in the viewer
|
|
67
|
+
this._modelConfiguration = deepmerge((this._configurationContainer && this._configurationContainer.configuration.model) || {}, modelConfiguration);
|
|
68
|
+
if (this._observablesManager) {
|
|
69
|
+
this._observablesManager.onModelAddedObservable.notifyObservers(this);
|
|
70
|
+
}
|
|
71
|
+
if (this._modelConfiguration.entryAnimation) {
|
|
72
|
+
this.rootMesh.setEnabled(false);
|
|
73
|
+
}
|
|
74
|
+
this.onLoadedObservable.add(function () {
|
|
75
|
+
_this.updateConfiguration(_this._modelConfiguration);
|
|
76
|
+
if (_this._observablesManager) {
|
|
77
|
+
_this._observablesManager.onModelLoadedObservable.notifyObservers(_this);
|
|
78
|
+
}
|
|
79
|
+
_this._initAnimations();
|
|
80
|
+
});
|
|
81
|
+
this.onCompleteObservable.add(function () {
|
|
82
|
+
_this.state = ModelState.COMPLETE;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
Object.defineProperty(ViewerModel.prototype, "shadowsRenderedAfterLoad", {
|
|
86
|
+
get: function () {
|
|
87
|
+
return this._shadowsRenderedAfterLoad;
|
|
88
|
+
},
|
|
89
|
+
set: function (rendered) {
|
|
90
|
+
if (!rendered) {
|
|
91
|
+
throw new Error("can only be enabled");
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
this._shadowsRenderedAfterLoad = rendered;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
enumerable: false,
|
|
98
|
+
configurable: true
|
|
99
|
+
});
|
|
100
|
+
ViewerModel.prototype.getViewerId = function () {
|
|
101
|
+
return this._configurationContainer && this._configurationContainer.viewerId;
|
|
102
|
+
};
|
|
103
|
+
Object.defineProperty(ViewerModel.prototype, "enabled", {
|
|
104
|
+
/**
|
|
105
|
+
* Is this model enabled?
|
|
106
|
+
*/
|
|
107
|
+
get: function () {
|
|
108
|
+
return this.rootMesh.isEnabled();
|
|
109
|
+
},
|
|
110
|
+
/**
|
|
111
|
+
* Set whether this model is enabled or not.
|
|
112
|
+
*/
|
|
113
|
+
set: function (enable) {
|
|
114
|
+
this.rootMesh.setEnabled(enable);
|
|
115
|
+
},
|
|
116
|
+
enumerable: false,
|
|
117
|
+
configurable: true
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(ViewerModel.prototype, "loaderDone", {
|
|
120
|
+
set: function (done) {
|
|
121
|
+
this._loaderDone = done;
|
|
122
|
+
this._checkCompleteState();
|
|
123
|
+
},
|
|
124
|
+
enumerable: false,
|
|
125
|
+
configurable: true
|
|
126
|
+
});
|
|
127
|
+
ViewerModel.prototype._checkCompleteState = function () {
|
|
128
|
+
if (this._loaderDone && this.state === ModelState.ENTRYDONE) {
|
|
129
|
+
this._modelComplete();
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Add a mesh to this model.
|
|
134
|
+
* Any mesh that has no parent will be provided with the root mesh as its new parent.
|
|
135
|
+
*
|
|
136
|
+
* @param mesh the new mesh to add
|
|
137
|
+
* @param triggerLoaded should this mesh trigger the onLoaded observable. Used when adding meshes manually.
|
|
138
|
+
* @returns a promise that will resolve when the model is done loading
|
|
139
|
+
*/
|
|
140
|
+
ViewerModel.prototype.addMesh = function (mesh, triggerLoaded) {
|
|
141
|
+
if (!mesh.parent) {
|
|
142
|
+
mesh.parent = this._pivotMesh;
|
|
143
|
+
}
|
|
144
|
+
if (mesh.getClassName() !== "InstancedMesh") {
|
|
145
|
+
mesh.receiveShadows = !!this.configuration.receiveShadows;
|
|
146
|
+
}
|
|
147
|
+
this._meshes.push(mesh);
|
|
148
|
+
if (triggerLoaded) {
|
|
149
|
+
return this.onLoadedObservable.notifyObserversWithPromise(this);
|
|
150
|
+
}
|
|
151
|
+
return Promise.resolve(this);
|
|
152
|
+
};
|
|
153
|
+
Object.defineProperty(ViewerModel.prototype, "meshes", {
|
|
154
|
+
/**
|
|
155
|
+
* get the list of meshes (excluding the root mesh)
|
|
156
|
+
*/
|
|
157
|
+
get: function () {
|
|
158
|
+
return this._meshes;
|
|
159
|
+
},
|
|
160
|
+
enumerable: false,
|
|
161
|
+
configurable: true
|
|
162
|
+
});
|
|
163
|
+
Object.defineProperty(ViewerModel.prototype, "configuration", {
|
|
164
|
+
/**
|
|
165
|
+
* Get the model's configuration
|
|
166
|
+
*/
|
|
167
|
+
get: function () {
|
|
168
|
+
return this._modelConfiguration;
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
* (Re-)set the model's entire configuration
|
|
172
|
+
* @param newConfiguration the new configuration to replace the new one
|
|
173
|
+
*/
|
|
174
|
+
set: function (newConfiguration) {
|
|
175
|
+
this._modelConfiguration = newConfiguration;
|
|
176
|
+
this._configureModel();
|
|
177
|
+
},
|
|
178
|
+
enumerable: false,
|
|
179
|
+
configurable: true
|
|
180
|
+
});
|
|
181
|
+
/**
|
|
182
|
+
* Update the current configuration with new values.
|
|
183
|
+
* Configuration will not be overwritten, but merged with the new configuration.
|
|
184
|
+
* Priority is to the new configuration
|
|
185
|
+
* @param newConfiguration the configuration to be merged into the current configuration;
|
|
186
|
+
*/
|
|
187
|
+
ViewerModel.prototype.updateConfiguration = function (newConfiguration) {
|
|
188
|
+
this._modelConfiguration = deepmerge(this._modelConfiguration, newConfiguration);
|
|
189
|
+
this._configureModel();
|
|
190
|
+
};
|
|
191
|
+
ViewerModel.prototype._initAnimations = function () {
|
|
192
|
+
var _this = this;
|
|
193
|
+
// check if this is not a gltf loader and init the animations
|
|
194
|
+
if (this.skeletons.length) {
|
|
195
|
+
this.skeletons.forEach(function (skeleton, idx) {
|
|
196
|
+
var ag = new AnimationGroup("animation-" + idx, _this._configurationContainer && _this._configurationContainer.scene);
|
|
197
|
+
var add = false;
|
|
198
|
+
skeleton.getAnimatables().forEach(function (a) {
|
|
199
|
+
if (a.animations && a.animations[0]) {
|
|
200
|
+
ag.addTargetedAnimation(a.animations[0], a);
|
|
201
|
+
add = true;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
if (add) {
|
|
205
|
+
_this.addAnimationGroup(ag);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
var completeCallback = function () { };
|
|
210
|
+
if (this._modelConfiguration.animation) {
|
|
211
|
+
if (this._modelConfiguration.animation.playOnce) {
|
|
212
|
+
this._animations.forEach(function (a) {
|
|
213
|
+
a.playMode = AnimationPlayMode.ONCE;
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
if (this._modelConfiguration.animation.autoStart && this._animations.length) {
|
|
217
|
+
var animationName_1 = this._modelConfiguration.animation.autoStart === true ? this._animations[0].name : this._modelConfiguration.animation.autoStart;
|
|
218
|
+
completeCallback = function () {
|
|
219
|
+
_this.playAnimation(animationName_1);
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
this._enterScene(completeCallback);
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Animates the model from the current position to the default position
|
|
227
|
+
* @param completeCallback A function to call when the animation has completed
|
|
228
|
+
*/
|
|
229
|
+
ViewerModel.prototype._enterScene = function (completeCallback) {
|
|
230
|
+
var _this = this;
|
|
231
|
+
var scene = this.rootMesh.getScene();
|
|
232
|
+
var previousValue = scene.animationPropertiesOverride.enableBlending;
|
|
233
|
+
var callback = function () {
|
|
234
|
+
_this.state = ModelState.ENTRYDONE;
|
|
235
|
+
scene.animationPropertiesOverride.enableBlending = previousValue;
|
|
236
|
+
_this._checkCompleteState();
|
|
237
|
+
if (completeCallback) {
|
|
238
|
+
completeCallback();
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
if (!this._entryAnimation) {
|
|
242
|
+
callback();
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
this.rootMesh.setEnabled(true);
|
|
246
|
+
// disable blending for the sake of the entry animation;
|
|
247
|
+
scene.animationPropertiesOverride.enableBlending = false;
|
|
248
|
+
this._applyAnimation(this._entryAnimation, true, callback);
|
|
249
|
+
};
|
|
250
|
+
// /**
|
|
251
|
+
// * Animates the model from the current position to the exit-screen position
|
|
252
|
+
// * @param completeCallback A function to call when the animation has completed
|
|
253
|
+
// */
|
|
254
|
+
// private _exitScene(completeCallback: () => void): void {
|
|
255
|
+
// if (!this._exitAnimation) {
|
|
256
|
+
// completeCallback();
|
|
257
|
+
// return;
|
|
258
|
+
// }
|
|
259
|
+
// this._applyAnimation(this._exitAnimation, false, completeCallback);
|
|
260
|
+
// }
|
|
261
|
+
ViewerModel.prototype._modelComplete = function () {
|
|
262
|
+
var _this = this;
|
|
263
|
+
//reapply material defines to be sure:
|
|
264
|
+
var meshes = this._pivotMesh.getChildMeshes(false);
|
|
265
|
+
meshes
|
|
266
|
+
.filter(function (m) { return m.material; })
|
|
267
|
+
.forEach(function (mesh) {
|
|
268
|
+
_this._applyModelMaterialConfiguration(mesh.material);
|
|
269
|
+
});
|
|
270
|
+
this.state = ModelState.COMPLETE;
|
|
271
|
+
this.onCompleteObservable.notifyObservers(this);
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Add a new animation group to this model.
|
|
275
|
+
* @param animationGroup the new animation group to be added
|
|
276
|
+
*/
|
|
277
|
+
ViewerModel.prototype.addAnimationGroup = function (animationGroup) {
|
|
278
|
+
this._animations.push(new GroupModelAnimation(animationGroup));
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Get the ModelAnimation array
|
|
282
|
+
* @returns the array of ModelAnimations
|
|
283
|
+
*/
|
|
284
|
+
ViewerModel.prototype.getAnimations = function () {
|
|
285
|
+
return this._animations;
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Get the animations' names. Using the names you can play a specific animation.
|
|
289
|
+
* @returns the array of ModelAnimations
|
|
290
|
+
*/
|
|
291
|
+
ViewerModel.prototype.getAnimationNames = function () {
|
|
292
|
+
return this._animations.map(function (a) { return a.name; });
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Get an animation by the provided name. Used mainly when playing n animation.
|
|
296
|
+
* @param name the name of the animation to find
|
|
297
|
+
* @returns the ModelAnimation object
|
|
298
|
+
*/
|
|
299
|
+
ViewerModel.prototype._getAnimationByName = function (name) {
|
|
300
|
+
// can't use .find, noe available on IE
|
|
301
|
+
var filtered = this._animations.filter(function (a) { return a.name === name.trim(); });
|
|
302
|
+
if (filtered.length >= 1) {
|
|
303
|
+
return filtered[0];
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Choose an initialized animation using its name and start playing it
|
|
311
|
+
* @param name the name of the animation to play
|
|
312
|
+
* @returns The model aniamtion to be played.
|
|
313
|
+
*/
|
|
314
|
+
ViewerModel.prototype.playAnimation = function (name) {
|
|
315
|
+
var animation = this.setCurrentAnimationByName(name);
|
|
316
|
+
if (animation) {
|
|
317
|
+
animation.start();
|
|
318
|
+
}
|
|
319
|
+
return animation;
|
|
320
|
+
};
|
|
321
|
+
ViewerModel.prototype.setCurrentAnimationByName = function (name) {
|
|
322
|
+
var animation = this._getAnimationByName(name.trim());
|
|
323
|
+
if (animation) {
|
|
324
|
+
if (this.currentAnimation && this.currentAnimation.state !== AnimationState.STOPPED) {
|
|
325
|
+
this.currentAnimation.stop();
|
|
326
|
+
}
|
|
327
|
+
this.currentAnimation = animation;
|
|
328
|
+
return animation;
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
throw new Error("animation not found - " + name);
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
ViewerModel.prototype._configureModel = function () {
|
|
335
|
+
var _this = this;
|
|
336
|
+
// this can be changed to the meshes that have rootMesh a parent without breaking anything.
|
|
337
|
+
var meshesWithNoParent = [this.rootMesh]; //this._meshes.filter(m => m.parent === this.rootMesh);
|
|
338
|
+
var updateMeshesWithNoParent = function (variable, value, param) {
|
|
339
|
+
meshesWithNoParent.forEach(function (mesh) {
|
|
340
|
+
if (param) {
|
|
341
|
+
mesh[variable][param] = value;
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
mesh[variable] = value;
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
var updateXYZ = function (variable, configValues) {
|
|
349
|
+
if (configValues.x !== undefined) {
|
|
350
|
+
updateMeshesWithNoParent(variable, configValues.x, "x");
|
|
351
|
+
}
|
|
352
|
+
if (configValues.y !== undefined) {
|
|
353
|
+
updateMeshesWithNoParent(variable, configValues.y, "y");
|
|
354
|
+
}
|
|
355
|
+
if (configValues.z !== undefined) {
|
|
356
|
+
updateMeshesWithNoParent(variable, configValues.z, "z");
|
|
357
|
+
}
|
|
358
|
+
if (configValues.w !== undefined) {
|
|
359
|
+
updateMeshesWithNoParent(variable, configValues.w, "w");
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
if (this._modelConfiguration.normalize) {
|
|
363
|
+
var center = false;
|
|
364
|
+
var unitSize = false;
|
|
365
|
+
var parentIndex = void 0;
|
|
366
|
+
if (this._modelConfiguration.normalize === true) {
|
|
367
|
+
center = true;
|
|
368
|
+
unitSize = true;
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
center = !!this._modelConfiguration.normalize.center;
|
|
372
|
+
unitSize = !!this._modelConfiguration.normalize.unitSize;
|
|
373
|
+
parentIndex = this._modelConfiguration.normalize.parentIndex;
|
|
374
|
+
}
|
|
375
|
+
var meshesToNormalize = [];
|
|
376
|
+
if (parentIndex !== undefined) {
|
|
377
|
+
meshesToNormalize.push(this._meshes[parentIndex]);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
meshesToNormalize = this._pivotMesh.getChildMeshes(true).length === 1 ? [this._pivotMesh] : meshesWithNoParent;
|
|
381
|
+
}
|
|
382
|
+
if (unitSize) {
|
|
383
|
+
meshesToNormalize.forEach(function (mesh) {
|
|
384
|
+
mesh.normalizeToUnitCube(true);
|
|
385
|
+
mesh.computeWorldMatrix(true);
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
if (center) {
|
|
389
|
+
meshesToNormalize.forEach(function (mesh) {
|
|
390
|
+
var boundingInfo = mesh.getHierarchyBoundingVectors(true);
|
|
391
|
+
var sizeVec = boundingInfo.max.subtract(boundingInfo.min);
|
|
392
|
+
var halfSizeVec = sizeVec.scale(0.5);
|
|
393
|
+
var center = boundingInfo.min.add(halfSizeVec);
|
|
394
|
+
mesh.position = center.scale(-1);
|
|
395
|
+
mesh.position.y += halfSizeVec.y;
|
|
396
|
+
// Recompute Info.
|
|
397
|
+
mesh.computeWorldMatrix(true);
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
// if centered, should be done here
|
|
403
|
+
}
|
|
404
|
+
// position?
|
|
405
|
+
if (this._modelConfiguration.position) {
|
|
406
|
+
updateXYZ("position", this._modelConfiguration.position);
|
|
407
|
+
}
|
|
408
|
+
if (this._modelConfiguration.rotation) {
|
|
409
|
+
//quaternion?
|
|
410
|
+
if (this._modelConfiguration.rotation.w) {
|
|
411
|
+
meshesWithNoParent.forEach(function (mesh) {
|
|
412
|
+
if (!mesh.rotationQuaternion) {
|
|
413
|
+
mesh.rotationQuaternion = new Quaternion();
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
updateXYZ("rotationQuaternion", this._modelConfiguration.rotation);
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
updateXYZ("rotation", this._modelConfiguration.rotation);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
if (this._modelConfiguration.rotationOffsetAxis) {
|
|
423
|
+
var rotationAxis_1 = new Vector3(this._modelConfiguration.rotationOffsetAxis.x, this._modelConfiguration.rotationOffsetAxis.y, this._modelConfiguration.rotationOffsetAxis.z);
|
|
424
|
+
meshesWithNoParent.forEach(function (m) {
|
|
425
|
+
if (_this._modelConfiguration.rotationOffsetAngle) {
|
|
426
|
+
m.rotate(rotationAxis_1, _this._modelConfiguration.rotationOffsetAngle);
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
if (this._modelConfiguration.scaling) {
|
|
431
|
+
updateXYZ("scaling", this._modelConfiguration.scaling);
|
|
432
|
+
}
|
|
433
|
+
if (this._modelConfiguration.castShadow) {
|
|
434
|
+
this._meshes.forEach(function (mesh) {
|
|
435
|
+
Tags.AddTagsTo(mesh, "castShadow");
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
var meshes = this._pivotMesh.getChildMeshes(false);
|
|
439
|
+
meshes
|
|
440
|
+
.filter(function (m) { return m.material; })
|
|
441
|
+
.forEach(function (mesh) {
|
|
442
|
+
_this._applyModelMaterialConfiguration(mesh.material);
|
|
443
|
+
});
|
|
444
|
+
if (this._modelConfiguration.entryAnimation) {
|
|
445
|
+
this._entryAnimation = this._modelAnimationConfigurationToObject(this._modelConfiguration.entryAnimation);
|
|
446
|
+
}
|
|
447
|
+
// if (this._modelConfiguration.exitAnimation) {
|
|
448
|
+
// this._exitAnimation = this._modelAnimationConfigurationToObject(this._modelConfiguration.exitAnimation);
|
|
449
|
+
// }
|
|
450
|
+
this.onAfterConfigure.notifyObservers(this);
|
|
451
|
+
};
|
|
452
|
+
ViewerModel.prototype._modelAnimationConfigurationToObject = function (animConfig) {
|
|
453
|
+
var anim = {
|
|
454
|
+
time: 0.5,
|
|
455
|
+
};
|
|
456
|
+
if (animConfig.scaling) {
|
|
457
|
+
anim.scaling = Vector3.Zero();
|
|
458
|
+
}
|
|
459
|
+
if (animConfig.easingFunction !== undefined) {
|
|
460
|
+
anim.easingFunction = animConfig.easingFunction;
|
|
461
|
+
}
|
|
462
|
+
if (animConfig.easingMode !== undefined) {
|
|
463
|
+
anim.easingMode = animConfig.easingMode;
|
|
464
|
+
}
|
|
465
|
+
extendClassWithConfig(anim, animConfig);
|
|
466
|
+
return anim;
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* Apply a material configuration to a material
|
|
470
|
+
* @param material Material to apply configuration to
|
|
471
|
+
* @internal
|
|
472
|
+
*/
|
|
473
|
+
ViewerModel.prototype._applyModelMaterialConfiguration = function (material) {
|
|
474
|
+
if (!this._modelConfiguration.material) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
extendClassWithConfig(material, this._modelConfiguration.material);
|
|
478
|
+
if (material instanceof PBRMaterial) {
|
|
479
|
+
if (this._modelConfiguration.material.directIntensity !== undefined) {
|
|
480
|
+
material.directIntensity = this._modelConfiguration.material.directIntensity;
|
|
481
|
+
}
|
|
482
|
+
if (this._modelConfiguration.material.emissiveIntensity !== undefined) {
|
|
483
|
+
material.emissiveIntensity = this._modelConfiguration.material.emissiveIntensity;
|
|
484
|
+
}
|
|
485
|
+
if (this._modelConfiguration.material.environmentIntensity !== undefined) {
|
|
486
|
+
material.environmentIntensity = this._modelConfiguration.material.environmentIntensity;
|
|
487
|
+
}
|
|
488
|
+
if (this._modelConfiguration.material.directEnabled !== undefined) {
|
|
489
|
+
material.disableLighting = !this._modelConfiguration.material.directEnabled;
|
|
490
|
+
}
|
|
491
|
+
if (this._configurationContainer && this._configurationContainer.reflectionColor) {
|
|
492
|
+
material.reflectionColor = this._configurationContainer.reflectionColor.clone();
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
else if (material instanceof MultiMaterial) {
|
|
496
|
+
for (var i = 0; i < material.subMaterials.length; i++) {
|
|
497
|
+
var subMaterial = material.subMaterials[i];
|
|
498
|
+
if (subMaterial) {
|
|
499
|
+
this._applyModelMaterialConfiguration(subMaterial);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
/**
|
|
505
|
+
* Start entry/exit animation given an animation configuration
|
|
506
|
+
* @param animationConfiguration Entry/Exit animation configuration
|
|
507
|
+
* @param isEntry Pass true if the animation is an entry animation
|
|
508
|
+
* @param completeCallback Callback to execute when the animation completes
|
|
509
|
+
*/
|
|
510
|
+
ViewerModel.prototype._applyAnimation = function (animationConfiguration, isEntry, completeCallback) {
|
|
511
|
+
var animations = [];
|
|
512
|
+
//scale
|
|
513
|
+
if (animationConfiguration.scaling) {
|
|
514
|
+
var scaleStart = isEntry ? animationConfiguration.scaling : new Vector3(1, 1, 1);
|
|
515
|
+
var scaleEnd = isEntry ? new Vector3(1, 1, 1) : animationConfiguration.scaling;
|
|
516
|
+
if (!scaleStart.equals(scaleEnd)) {
|
|
517
|
+
this.rootMesh.scaling = scaleStart;
|
|
518
|
+
this._setLinearKeys(this._scaleTransition, this.rootMesh.scaling, scaleEnd, animationConfiguration.time);
|
|
519
|
+
animations.push(this._scaleTransition);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
//Start the animation(s)
|
|
523
|
+
this.transitionTo(animations, animationConfiguration.time, this._createEasingFunction(animationConfiguration.easingFunction), animationConfiguration.easingMode, function () {
|
|
524
|
+
if (completeCallback) {
|
|
525
|
+
completeCallback();
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
};
|
|
529
|
+
/**
|
|
530
|
+
* Begin @animations with the specified @easingFunction
|
|
531
|
+
* @param animations The BABYLON Animations to begin
|
|
532
|
+
* @param duration of transition, in seconds
|
|
533
|
+
* @param easingFunction An easing function to apply
|
|
534
|
+
* @param easingMode A easing mode to apply to the easingFunction
|
|
535
|
+
* @param onAnimationEnd Call back trigger at the end of the animation.
|
|
536
|
+
*/
|
|
537
|
+
ViewerModel.prototype.transitionTo = function (animations, duration, easingFunction, easingMode, // BABYLON.EasingFunction.EASINGMODE_EASEINOUT,
|
|
538
|
+
onAnimationEnd) {
|
|
539
|
+
if (easingMode === void 0) { easingMode = 2; }
|
|
540
|
+
if (easingFunction) {
|
|
541
|
+
for (var _i = 0, animations_1 = animations; _i < animations_1.length; _i++) {
|
|
542
|
+
var animation = animations_1[_i];
|
|
543
|
+
easingFunction.setEasingMode(easingMode);
|
|
544
|
+
animation.setEasingFunction(easingFunction);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
//Stop any current animations before starting the new one - merging not yet supported.
|
|
548
|
+
this.stopAllAnimations();
|
|
549
|
+
this.rootMesh.animations = animations;
|
|
550
|
+
if (this.rootMesh.getScene().beginAnimation !== undefined) {
|
|
551
|
+
var animatable = this.rootMesh.getScene().beginAnimation(this.rootMesh, 0, this._frameRate * duration, false, 1, function () {
|
|
552
|
+
if (onAnimationEnd) {
|
|
553
|
+
onAnimationEnd();
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
this._animatables.push(animatable);
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Sets key values on an Animation from first to last frame.
|
|
561
|
+
* @param animation The Babylon animation object to set keys on
|
|
562
|
+
* @param startValue The value of the first key
|
|
563
|
+
* @param endValue The value of the last key
|
|
564
|
+
* @param duration The duration of the animation, used to determine the end frame
|
|
565
|
+
*/
|
|
566
|
+
ViewerModel.prototype._setLinearKeys = function (animation, startValue, endValue, duration) {
|
|
567
|
+
animation.setKeys([
|
|
568
|
+
{
|
|
569
|
+
frame: 0,
|
|
570
|
+
value: startValue,
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
frame: this._frameRate * duration,
|
|
574
|
+
value: endValue,
|
|
575
|
+
},
|
|
576
|
+
]);
|
|
577
|
+
};
|
|
578
|
+
/**
|
|
579
|
+
* Creates and returns a Babylon easing funtion object based on a string representing the Easing function
|
|
580
|
+
* @param easingFunctionID The enum of the easing funtion to create
|
|
581
|
+
* @returns The newly created Babylon easing function object
|
|
582
|
+
*/
|
|
583
|
+
ViewerModel.prototype._createEasingFunction = function (easingFunctionID) {
|
|
584
|
+
var easingFunction;
|
|
585
|
+
switch (easingFunctionID) {
|
|
586
|
+
case EasingFunction.CircleEase:
|
|
587
|
+
easingFunction = new CircleEase();
|
|
588
|
+
break;
|
|
589
|
+
case EasingFunction.BackEase:
|
|
590
|
+
easingFunction = new BackEase(0.3);
|
|
591
|
+
break;
|
|
592
|
+
case EasingFunction.BounceEase:
|
|
593
|
+
easingFunction = new BounceEase();
|
|
594
|
+
break;
|
|
595
|
+
case EasingFunction.CubicEase:
|
|
596
|
+
easingFunction = new CubicEase();
|
|
597
|
+
break;
|
|
598
|
+
case EasingFunction.ElasticEase:
|
|
599
|
+
easingFunction = new ElasticEase();
|
|
600
|
+
break;
|
|
601
|
+
case EasingFunction.ExponentialEase:
|
|
602
|
+
easingFunction = new ExponentialEase();
|
|
603
|
+
break;
|
|
604
|
+
case EasingFunction.PowerEase:
|
|
605
|
+
easingFunction = new PowerEase();
|
|
606
|
+
break;
|
|
607
|
+
case EasingFunction.QuadraticEase:
|
|
608
|
+
easingFunction = new QuadraticEase();
|
|
609
|
+
break;
|
|
610
|
+
case EasingFunction.QuarticEase:
|
|
611
|
+
easingFunction = new QuarticEase();
|
|
612
|
+
break;
|
|
613
|
+
case EasingFunction.QuinticEase:
|
|
614
|
+
easingFunction = new QuinticEase();
|
|
615
|
+
break;
|
|
616
|
+
case EasingFunction.SineEase:
|
|
617
|
+
easingFunction = new SineEase();
|
|
618
|
+
break;
|
|
619
|
+
default:
|
|
620
|
+
Tools.Log("No ease function found");
|
|
621
|
+
break;
|
|
622
|
+
}
|
|
623
|
+
return easingFunction;
|
|
624
|
+
};
|
|
625
|
+
/**
|
|
626
|
+
* Stops and removes all animations that have been applied to the model
|
|
627
|
+
*/
|
|
628
|
+
ViewerModel.prototype.stopAllAnimations = function () {
|
|
629
|
+
if (this.rootMesh) {
|
|
630
|
+
this.rootMesh.animations = [];
|
|
631
|
+
}
|
|
632
|
+
if (this.currentAnimation) {
|
|
633
|
+
this.currentAnimation.stop();
|
|
634
|
+
}
|
|
635
|
+
while (this._animatables.length) {
|
|
636
|
+
this._animatables[0].onAnimationEnd = null;
|
|
637
|
+
this._animatables[0].stop();
|
|
638
|
+
this._animatables.shift();
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
/**
|
|
642
|
+
* Will remove this model from the viewer (but NOT dispose it).
|
|
643
|
+
*/
|
|
644
|
+
ViewerModel.prototype.remove = function () {
|
|
645
|
+
this.stopAllAnimations();
|
|
646
|
+
if (this._observablesManager) {
|
|
647
|
+
this._observablesManager.onModelRemovedObservable.notifyObservers(this);
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
/**
|
|
651
|
+
* Dispose this model, including all of its associated assets.
|
|
652
|
+
*/
|
|
653
|
+
ViewerModel.prototype.dispose = function () {
|
|
654
|
+
this.remove();
|
|
655
|
+
this.onAfterConfigure.clear();
|
|
656
|
+
this.onLoadedObservable.clear();
|
|
657
|
+
this.onLoadErrorObservable.clear();
|
|
658
|
+
this.onLoadProgressObservable.clear();
|
|
659
|
+
if (this.loader && this.loader.name === "gltf") {
|
|
660
|
+
this.loader.dispose();
|
|
661
|
+
}
|
|
662
|
+
this.particleSystems.forEach(function (ps) { return ps.dispose(); });
|
|
663
|
+
this.particleSystems.length = 0;
|
|
664
|
+
this.skeletons.forEach(function (s) { return s.dispose(); });
|
|
665
|
+
this.skeletons.length = 0;
|
|
666
|
+
this._animations.forEach(function (ag) { return ag.dispose(); });
|
|
667
|
+
this._animations.length = 0;
|
|
668
|
+
this.rootMesh.dispose(false, true);
|
|
669
|
+
};
|
|
670
|
+
return ViewerModel;
|
|
671
|
+
}());
|
|
672
|
+
export { ViewerModel };
|
|
673
|
+
//# sourceMappingURL=viewerModel.js.map
|