@babylonjs/viewer 5.34.0 → 5.35.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.
Files changed (64) hide show
  1. package/configuration/configuration.js.map +1 -1
  2. package/configuration/configurationCompatibility.js.map +1 -1
  3. package/configuration/configurationContainer.js.map +1 -1
  4. package/configuration/globals.js.map +1 -1
  5. package/configuration/index.js.map +1 -1
  6. package/configuration/interfaces/cameraConfiguration.js.map +1 -1
  7. package/configuration/interfaces/colorGradingConfiguration.js.map +1 -1
  8. package/configuration/interfaces/defaultRenderingPipelineConfiguration.js.map +1 -1
  9. package/configuration/interfaces/environmentMapConfiguration.js.map +1 -1
  10. package/configuration/interfaces/groundConfiguration.js.map +1 -1
  11. package/configuration/interfaces/imageProcessingConfiguration.js.map +1 -1
  12. package/configuration/interfaces/index.js.map +1 -1
  13. package/configuration/interfaces/lightConfiguration.js.map +1 -1
  14. package/configuration/interfaces/modelAnimationConfiguration.js.map +1 -1
  15. package/configuration/interfaces/modelConfiguration.js.map +1 -1
  16. package/configuration/interfaces/observersConfiguration.js.map +1 -1
  17. package/configuration/interfaces/sceneConfiguration.js.map +1 -1
  18. package/configuration/interfaces/sceneOptimizerConfiguration.js.map +1 -1
  19. package/configuration/interfaces/skyboxConfiguration.js.map +1 -1
  20. package/configuration/interfaces/templateConfiguration.js.map +1 -1
  21. package/configuration/interfaces/vrConfiguration.js.map +1 -1
  22. package/configuration/loader.js.map +1 -1
  23. package/configuration/mappers.js.map +1 -1
  24. package/configuration/renderOnlyLoader.js.map +1 -1
  25. package/configuration/types/default.js.map +1 -1
  26. package/configuration/types/environmentMap.js.map +1 -1
  27. package/configuration/types/extended.js.map +1 -1
  28. package/configuration/types/index.js.map +1 -1
  29. package/configuration/types/minimal.js.map +1 -1
  30. package/configuration/types/renderOnlyDefault.js.map +1 -1
  31. package/configuration/types/shadowLight.js.map +1 -1
  32. package/helper/index.js.map +1 -1
  33. package/index.js.map +1 -1
  34. package/initializer.js.map +1 -1
  35. package/interfaces.js.map +1 -1
  36. package/labs/environmentSerializer.js.map +1 -1
  37. package/labs/texture.js.map +1 -1
  38. package/labs/viewerLabs.js.map +1 -1
  39. package/loader/modelLoader.js.map +1 -1
  40. package/loader/plugins/applyMaterialConfig.js.map +1 -1
  41. package/loader/plugins/extendedMaterialLoaderPlugin.js.map +1 -1
  42. package/loader/plugins/index.js.map +1 -1
  43. package/loader/plugins/loaderPlugin.js.map +1 -1
  44. package/loader/plugins/msftLodLoaderPlugin.js.map +1 -1
  45. package/loader/plugins/telemetryLoaderPlugin.js.map +1 -1
  46. package/managers/observablesManager.js.map +1 -1
  47. package/managers/sceneManager.js.map +1 -1
  48. package/managers/telemetryManager.js.map +1 -1
  49. package/model/modelAnimation.js.map +1 -1
  50. package/model/viewerModel.js.map +1 -1
  51. package/optimizer/custom/extended.js.map +1 -1
  52. package/optimizer/custom/index.js.map +1 -1
  53. package/package.json +6 -7
  54. package/renderOnlyIndex.js.map +1 -1
  55. package/templating/eventManager.js.map +1 -1
  56. package/templating/plugins/hdButtonPlugin.js.map +1 -1
  57. package/templating/plugins/printButton.js.map +1 -1
  58. package/templating/templateManager.js.map +1 -1
  59. package/templating/viewerTemplatePlugin.js.map +1 -1
  60. package/viewer/defaultViewer.js.map +1 -1
  61. package/viewer/renderOnlyViewer.js.map +1 -1
  62. package/viewer/viewer.js.map +1 -1
  63. package/viewer/viewerManager.js.map +1 -1
  64. package/viewer/viewerWithTemplate.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/configuration.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,mBAAmB,CAAC,GAAW,EAAE,YAAiB;IAC9D,IAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE;QACtC,OAAO;KACV;SAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,IAAI,YAAY,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YACjC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;SAC5B;KACJ;SAAM;QACH,IAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,OAAO,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,QAAS,CAAC,CAAC,CAAC;KACzE;AACL,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { IEnvironmentMapConfiguration } from \"./interfaces/environmentMapConfiguration\";\r\nimport type { EngineOptions } from \"core/Engines/thinEngine\";\r\nimport type { IObserversConfiguration } from \"./interfaces/observersConfiguration\";\r\nimport type { IModelConfiguration } from \"./interfaces/modelConfiguration\";\r\nimport type { ISceneConfiguration } from \"./interfaces/sceneConfiguration\";\r\nimport type { ISceneOptimizerConfiguration } from \"./interfaces/sceneOptimizerConfiguration\";\r\nimport type { ICameraConfiguration } from \"./interfaces/cameraConfiguration\";\r\nimport type { ISkyboxConfiguration } from \"./interfaces/skyboxConfiguration\";\r\nimport type { IGroundConfiguration } from \"./interfaces/groundConfiguration\";\r\nimport type { ILightConfiguration } from \"./interfaces/lightConfiguration\";\r\nimport type { ITemplateConfiguration } from \"./interfaces/templateConfiguration\";\r\nimport type { IVRConfiguration } from \"./interfaces/vrConfiguration\";\r\nimport type { IDefaultRenderingPipelineConfiguration } from \"./interfaces/defaultRenderingPipelineConfiguration\";\r\n\r\nexport function getConfigurationKey(key: string, configObject: any): any {\r\n const splits = key.split(\".\");\r\n\r\n if (splits.length === 0 || !configObject) {\r\n return;\r\n } else if (splits.length === 1) {\r\n if (configObject[key] !== undefined) {\r\n return configObject[key];\r\n }\r\n } else {\r\n const firstKey = splits.shift();\r\n return getConfigurationKey(splits.join(\".\"), configObject[firstKey!]);\r\n }\r\n}\r\n\r\nexport interface ViewerConfiguration {\r\n // configuration version\r\n version?: string;\r\n extends?: string; // is this configuration extending an existing configuration?\r\n\r\n pageUrl?: string; // will be used for sharing and other fun stuff. This is the page showing the model (not the model's url!)\r\n\r\n configuration?:\r\n | string\r\n | {\r\n url?: string;\r\n payload?: any;\r\n mapper?: string; // json (default), html, yaml, xml, etc'. if not provided, file extension will be used.\r\n };\r\n\r\n // names of functions in the window context.\r\n observers?: IObserversConfiguration;\r\n\r\n canvasElement?: string; // if there is a need to override the standard implementation - ID of HTMLCanvasElement\r\n\r\n model?: IModelConfiguration | string;\r\n\r\n scene?: ISceneConfiguration;\r\n optimizer?: ISceneOptimizerConfiguration | boolean;\r\n // at the moment, support only a single camera.\r\n camera?: ICameraConfiguration;\r\n skybox?: boolean | ISkyboxConfiguration;\r\n\r\n ground?: boolean | IGroundConfiguration;\r\n lights?: {\r\n //globalRotation: number,\r\n [name: string]: number | boolean | ILightConfiguration;\r\n };\r\n // engine configuration. optional!\r\n engine?: {\r\n renderInBackground?: boolean;\r\n antialiasing?: boolean;\r\n disableResize?: boolean;\r\n engineOptions?: EngineOptions;\r\n adaptiveQuality?: boolean;\r\n hdEnabled?: boolean;\r\n };\r\n //templateStructure?: ITemplateStructure,\r\n templates?: {\r\n main: ITemplateConfiguration;\r\n [key: string]: ITemplateConfiguration;\r\n };\r\n\r\n customShaders?: {\r\n shaders?: {\r\n [key: string]: string;\r\n };\r\n includes?: {\r\n [key: string]: string;\r\n };\r\n };\r\n\r\n loaderPlugins?: {\r\n extendedMaterial?: boolean;\r\n msftLod?: boolean;\r\n telemetry?: boolean;\r\n minecraft?: boolean;\r\n\r\n [propName: string]: boolean | undefined;\r\n };\r\n\r\n environmentMap?: IEnvironmentMapConfiguration;\r\n\r\n vr?: IVRConfiguration;\r\n \"3dCommerceCertified\"?: boolean;\r\n\r\n // features that are being tested.\r\n // those features' syntax will change and move out!\r\n // Don't use in production (or be ready to make the changes :) )\r\n lab?: {\r\n flashlight?:\r\n | boolean\r\n | {\r\n exponent?: number;\r\n angle?: number;\r\n intensity?: number;\r\n diffuse?: { r: number; g: number; b: number };\r\n specular?: { r: number; g: number; b: number };\r\n };\r\n hideLoadingDelay?: number;\r\n /** @deprecated */\r\n assetsRootURL?: string;\r\n environmentMainColor?: { r: number; g: number; b: number };\r\n /** @deprecated */\r\n environmentMap?: {\r\n /**\r\n * Environment map texture path in relative to the asset folder.\r\n */\r\n texture: string;\r\n\r\n /**\r\n * Default rotation to apply to the environment map.\r\n */\r\n rotationY: number;\r\n\r\n /**\r\n * Tint level of the main color on the environment map.\r\n */\r\n tintLevel: number;\r\n };\r\n defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;\r\n globalLightRotation?: number;\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/configuration.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,mBAAmB,CAAC,GAAW,EAAE,YAAiB;IAC9D,IAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE;QACtC,OAAO;KACV;SAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;QAC5B,IAAI,YAAY,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;YACjC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;SAC5B;KACJ;SAAM;QACH,IAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;QAChC,OAAO,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,YAAY,CAAC,QAAS,CAAC,CAAC,CAAC;KACzE;AACL,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { IEnvironmentMapConfiguration } from \"./interfaces/environmentMapConfiguration\";\r\nimport type { EngineOptions } from \"core/Engines/thinEngine\";\r\nimport type { IObserversConfiguration } from \"./interfaces/observersConfiguration\";\r\nimport type { IModelConfiguration } from \"./interfaces/modelConfiguration\";\r\nimport type { ISceneConfiguration } from \"./interfaces/sceneConfiguration\";\r\nimport type { ISceneOptimizerConfiguration } from \"./interfaces/sceneOptimizerConfiguration\";\r\nimport type { ICameraConfiguration } from \"./interfaces/cameraConfiguration\";\r\nimport type { ISkyboxConfiguration } from \"./interfaces/skyboxConfiguration\";\r\nimport type { IGroundConfiguration } from \"./interfaces/groundConfiguration\";\r\nimport type { ILightConfiguration } from \"./interfaces/lightConfiguration\";\r\nimport type { ITemplateConfiguration } from \"./interfaces/templateConfiguration\";\r\nimport type { IVRConfiguration } from \"./interfaces/vrConfiguration\";\r\nimport type { IDefaultRenderingPipelineConfiguration } from \"./interfaces/defaultRenderingPipelineConfiguration\";\r\n\r\nexport function getConfigurationKey(key: string, configObject: any): any {\r\n const splits = key.split(\".\");\r\n\r\n if (splits.length === 0 || !configObject) {\r\n return;\r\n } else if (splits.length === 1) {\r\n if (configObject[key] !== undefined) {\r\n return configObject[key];\r\n }\r\n } else {\r\n const firstKey = splits.shift();\r\n return getConfigurationKey(splits.join(\".\"), configObject[firstKey!]);\r\n }\r\n}\r\n\r\nexport interface ViewerConfiguration {\r\n // configuration version\r\n version?: string;\r\n extends?: string; // is this configuration extending an existing configuration?\r\n\r\n pageUrl?: string; // will be used for sharing and other fun stuff. This is the page showing the model (not the model's url!)\r\n\r\n configuration?:\r\n | string\r\n | {\r\n url?: string;\r\n payload?: any;\r\n mapper?: string; // json (default), html, yaml, xml, etc'. if not provided, file extension will be used.\r\n };\r\n\r\n // names of functions in the window context.\r\n observers?: IObserversConfiguration;\r\n\r\n canvasElement?: string; // if there is a need to override the standard implementation - ID of HTMLCanvasElement\r\n\r\n model?: IModelConfiguration | string;\r\n\r\n scene?: ISceneConfiguration;\r\n optimizer?: ISceneOptimizerConfiguration | boolean;\r\n // at the moment, support only a single camera.\r\n camera?: ICameraConfiguration;\r\n skybox?: boolean | ISkyboxConfiguration;\r\n\r\n ground?: boolean | IGroundConfiguration;\r\n lights?: {\r\n //globalRotation: number,\r\n [name: string]: number | boolean | ILightConfiguration;\r\n };\r\n // engine configuration. optional!\r\n engine?: {\r\n renderInBackground?: boolean;\r\n antialiasing?: boolean;\r\n disableResize?: boolean;\r\n engineOptions?: EngineOptions;\r\n adaptiveQuality?: boolean;\r\n hdEnabled?: boolean;\r\n };\r\n //templateStructure?: ITemplateStructure,\r\n templates?: {\r\n main: ITemplateConfiguration;\r\n [key: string]: ITemplateConfiguration;\r\n };\r\n\r\n customShaders?: {\r\n shaders?: {\r\n [key: string]: string;\r\n };\r\n includes?: {\r\n [key: string]: string;\r\n };\r\n };\r\n\r\n loaderPlugins?: {\r\n extendedMaterial?: boolean;\r\n msftLod?: boolean;\r\n telemetry?: boolean;\r\n minecraft?: boolean;\r\n\r\n [propName: string]: boolean | undefined;\r\n };\r\n\r\n environmentMap?: IEnvironmentMapConfiguration;\r\n\r\n vr?: IVRConfiguration;\r\n \"3dCommerceCertified\"?: boolean;\r\n\r\n // features that are being tested.\r\n // those features' syntax will change and move out!\r\n // Don't use in production (or be ready to make the changes :) )\r\n lab?: {\r\n flashlight?:\r\n | boolean\r\n | {\r\n exponent?: number;\r\n angle?: number;\r\n intensity?: number;\r\n diffuse?: { r: number; g: number; b: number };\r\n specular?: { r: number; g: number; b: number };\r\n };\r\n hideLoadingDelay?: number;\r\n /** @deprecated */\r\n assetsRootURL?: string;\r\n environmentMainColor?: { r: number; g: number; b: number };\r\n /** @deprecated */\r\n environmentMap?: {\r\n /**\r\n * Environment map texture path in relative to the asset folder.\r\n */\r\n texture: string;\r\n\r\n /**\r\n * Default rotation to apply to the environment map.\r\n */\r\n rotationY: number;\r\n\r\n /**\r\n * Tint level of the main color on the environment map.\r\n */\r\n tintLevel: number;\r\n };\r\n defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;\r\n globalLightRotation?: number;\r\n };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"configurationCompatibility.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/configurationCompatibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAAC,aAAkC;IAChF,IAAI,aAAa,CAAC,MAAM,EAAE;QACtB,+CAA+C;QAC/C,IAAI,aAAa,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC7C,cAAc,CAAC,aAAa,EAAE,6CAA6C,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC/G;QAED,+CAA+C;QAC/C,IAAI,aAAa,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC7C,cAAc,CAAC,aAAa,EAAE,6CAA6C,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC/G;KACJ;IAED,IAAI,aAAa,CAAC,KAAK,EAAE;QACrB,MAAM;QACN,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE;YAC1B,cAAc,CAAC,aAAa,EAAE,gDAAgD,EAAE,IAAI,CAAC,CAAC;YACtF,IAAM,iBAAiB,GAAG,mBAAmB,CAAC,8CAA8C,EAAE,aAAa,CAAC,CAAC;YAC7G,IAAI,iBAAiB,KAAK,KAAK,EAAE;gBAC7B,cAAc,CAAC,aAAa,EAAE,8CAA8C,EAAE,IAAI,CAAC,CAAC;aACvF;SACJ;QAED,IAAI,aAAa,CAAC,KAAK,CAAC,SAAS,EAAE;YAC/B,cAAc,CAAC,aAAa,EAAE,0BAA0B,EAAE,aAAa,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;SAClG;KACJ;IAED,IAAI,aAAa,CAAC,KAAK,IAAI,OAAO,aAAa,CAAC,KAAK,KAAK,QAAQ,EAAE;QAChE,6BAA6B;QAC7B,IAAU,aAAa,CAAC,KAAM,CAA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configuration\";\r\nimport { getConfigurationKey } from \"./configuration\";\r\n/**\r\n * This function will make sure the configuration file is taking deprecated fields into account\r\n * and is setting them to the correct keys and values.\r\n *\r\n * @param configuration The configuration to process. Mutable!\r\n */\r\nexport function processConfigurationCompatibility(configuration: ViewerConfiguration) {\r\n if (configuration.camera) {\r\n // camera contrast -> image processing contrast\r\n if (configuration.camera.contrast !== undefined) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.contrast\", configuration.camera.contrast);\r\n }\r\n\r\n // camera exposure -> image processing exposure\r\n if (configuration.camera.exposure !== undefined) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.exposure\", configuration.camera.exposure);\r\n }\r\n }\r\n\r\n if (configuration.scene) {\r\n //glow\r\n if (configuration.scene.glow) {\r\n setKeyInObject(configuration, \"lab.defaultRenderingPipelines.glowLayerEnabled\", true);\r\n const enabledProcessing = getConfigurationKey(\"scene.imageProcessingConfiguration.isEnabled\", configuration);\r\n if (enabledProcessing !== false) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.isEnabled\", true);\r\n }\r\n }\r\n\r\n if (configuration.scene.mainColor) {\r\n setKeyInObject(configuration, \"environmentMap.mainColor\", configuration.scene.mainColor, true);\r\n }\r\n }\r\n\r\n if (configuration.model && typeof configuration.model === \"object\") {\r\n // castShadows === castShadow\r\n if ((<any>configuration.model).castShadows !== undefined && configuration.model.castShadow === undefined) {\r\n configuration.model.castShadow = (<any>configuration.model).castShadows;\r\n }\r\n }\r\n\r\n if (configuration.lab) {\r\n if (configuration.lab.assetsRootURL) {\r\n setKeyInObject(configuration, \"scene.assetsRootURL\", configuration.lab.assetsRootURL, true);\r\n }\r\n if (configuration.lab.environmentMap) {\r\n setKeyInObject(configuration, \"environmentMap\", configuration.lab.environmentMap, true);\r\n }\r\n }\r\n}\r\n\r\nfunction setKeyInObject(object: any, keys: string, value: any, shouldOverwrite?: boolean) {\r\n const keySplit = keys.split(\".\");\r\n if (keySplit.length === 0) {\r\n return;\r\n }\r\n const lastKey = keySplit.pop();\r\n if (!lastKey) {\r\n return;\r\n }\r\n let curObj = object;\r\n keySplit.forEach((key) => {\r\n curObj[key] = curObj[key] || {};\r\n curObj = curObj[key];\r\n });\r\n if (curObj[lastKey] !== undefined && !shouldOverwrite) {\r\n return;\r\n }\r\n curObj[lastKey] = value;\r\n}\r\n"]}
1
+ {"version":3,"file":"configurationCompatibility.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/configurationCompatibility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAAC,aAAkC;IAChF,IAAI,aAAa,CAAC,MAAM,EAAE;QACtB,+CAA+C;QAC/C,IAAI,aAAa,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC7C,cAAc,CAAC,aAAa,EAAE,6CAA6C,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC/G;QAED,+CAA+C;QAC/C,IAAI,aAAa,CAAC,MAAM,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC7C,cAAc,CAAC,aAAa,EAAE,6CAA6C,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;SAC/G;KACJ;IAED,IAAI,aAAa,CAAC,KAAK,EAAE;QACrB,MAAM;QACN,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE;YAC1B,cAAc,CAAC,aAAa,EAAE,gDAAgD,EAAE,IAAI,CAAC,CAAC;YACtF,IAAM,iBAAiB,GAAG,mBAAmB,CAAC,8CAA8C,EAAE,aAAa,CAAC,CAAC;YAC7G,IAAI,iBAAiB,KAAK,KAAK,EAAE;gBAC7B,cAAc,CAAC,aAAa,EAAE,8CAA8C,EAAE,IAAI,CAAC,CAAC;aACvF;SACJ;QAED,IAAI,aAAa,CAAC,KAAK,CAAC,SAAS,EAAE;YAC/B,cAAc,CAAC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,GAAG,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,eAAe,EAAE;QACnD,OAAO;KACV;IACD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;AAC5B,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./configuration\";\r\nimport { getConfigurationKey } from \"./configuration\";\r\n/**\r\n * This function will make sure the configuration file is taking deprecated fields into account\r\n * and is setting them to the correct keys and values.\r\n *\r\n * @param configuration The configuration to process. Mutable!\r\n */\r\nexport function processConfigurationCompatibility(configuration: ViewerConfiguration) {\r\n if (configuration.camera) {\r\n // camera contrast -> image processing contrast\r\n if (configuration.camera.contrast !== undefined) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.contrast\", configuration.camera.contrast);\r\n }\r\n\r\n // camera exposure -> image processing exposure\r\n if (configuration.camera.exposure !== undefined) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.exposure\", configuration.camera.exposure);\r\n }\r\n }\r\n\r\n if (configuration.scene) {\r\n //glow\r\n if (configuration.scene.glow) {\r\n setKeyInObject(configuration, \"lab.defaultRenderingPipelines.glowLayerEnabled\", true);\r\n const enabledProcessing = getConfigurationKey(\"scene.imageProcessingConfiguration.isEnabled\", configuration);\r\n if (enabledProcessing !== false) {\r\n setKeyInObject(configuration, \"scene.imageProcessingConfiguration.isEnabled\", true);\r\n }\r\n }\r\n\r\n if (configuration.scene.mainColor) {\r\n setKeyInObject(configuration, \"environmentMap.mainColor\", configuration.scene.mainColor, true);\r\n }\r\n }\r\n\r\n if (configuration.model && typeof configuration.model === \"object\") {\r\n // castShadows === castShadow\r\n if ((<any>configuration.model).castShadows !== undefined && configuration.model.castShadow === undefined) {\r\n configuration.model.castShadow = (<any>configuration.model).castShadows;\r\n }\r\n }\r\n\r\n if (configuration.lab) {\r\n if (configuration.lab.assetsRootURL) {\r\n setKeyInObject(configuration, \"scene.assetsRootURL\", configuration.lab.assetsRootURL, true);\r\n }\r\n if (configuration.lab.environmentMap) {\r\n setKeyInObject(configuration, \"environmentMap\", configuration.lab.environmentMap, true);\r\n }\r\n }\r\n}\r\n\r\nfunction setKeyInObject(object: any, keys: string, value: any, shouldOverwrite?: boolean) {\r\n const keySplit = keys.split(\".\");\r\n if (keySplit.length === 0) {\r\n return;\r\n }\r\n const lastKey = keySplit.pop();\r\n if (!lastKey) {\r\n return;\r\n }\r\n let curObj = object;\r\n keySplit.forEach((key) => {\r\n curObj[key] = curObj[key] || {};\r\n curObj = curObj[key];\r\n });\r\n if (curObj[lastKey] !== undefined && !shouldOverwrite) {\r\n return;\r\n }\r\n curObj[lastKey] = value;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"configurationContainer.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/configurationContainer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,sCAAwB;AAGzC;IAAA;QAKW,cAAS,GAAW,MAAM,CAAC,KAAK,EAAE,CAAC;QACnC,oBAAe,GAAW,MAAM,CAAC,KAAK,EAAE,CAAC;IAEpD,CAAC;IAAD,6BAAC;AAAD,CAAC,AARD,IAQC","sourcesContent":["import type { ViewerConfiguration } from \"./configuration\";\r\nimport { Color3 } from \"core/Maths/math\";\r\nimport type { Scene } from \"core/scene\";\r\n\r\nexport class ConfigurationContainer {\r\n public configuration: ViewerConfiguration;\r\n\r\n public viewerId: string;\r\n\r\n public mainColor: Color3 = Color3.White();\r\n public reflectionColor: Color3 = Color3.White();\r\n public scene?: Scene;\r\n}\r\n"]}
1
+ {"version":3,"file":"configurationContainer.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/configurationContainer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,sCAAwB;AAGzC;IAAA;QAKW,cAAS,GAAW,MAAM,CAAC,KAAK,EAAE,CAAC;QACnC,oBAAe,GAAW,MAAM,CAAC,KAAK,EAAE,CAAC;IAEpD,CAAC;IAAD,6BAAC;AAAD,CAAC,AARD,IAQC","sourcesContent":["import type { ViewerConfiguration } from \"./configuration\";\r\nimport { Color3 } from \"core/Maths/math\";\r\nimport type { Scene } from \"core/scene\";\r\n\r\nexport class ConfigurationContainer {\r\n public configuration: ViewerConfiguration;\r\n\r\n public viewerId: string;\r\n\r\n public mainColor: Color3 = Color3.White();\r\n public reflectionColor: Color3 = Color3.White();\r\n public scene?: Scene;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"globals.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/globals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,0CAA4B;AAE7C;IAAA;QACW,gBAAW,GAAY,KAAK,CAAC;QAC7B,yBAAoB,GAAY,KAAK,CAAC;IAKjD,CAAC;IAHG,sBAAW,kCAAO;aAAlB;YACI,OAAO,MAAM,CAAC,OAAO,CAAC;QAC1B,CAAC;;;OAAA;IACL,oBAAC;AAAD,CAAC,AAPD,IAOC;;AAED,MAAM,CAAC,IAAM,aAAa,GAAkB,IAAI,aAAa,EAAE,CAAC","sourcesContent":["import { Engine } from \"core/Engines/engine\";\r\n\r\nexport class ViewerGlobals {\r\n public disableInit: boolean = false;\r\n public disableWebGL2Support: boolean = false;\r\n\r\n public get version(): string {\r\n return Engine.Version;\r\n }\r\n}\r\n\r\nexport const viewerGlobals: ViewerGlobals = new ViewerGlobals();\r\n"]}
1
+ {"version":3,"file":"globals.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/globals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,0CAA4B;AAE7C;IAAA;QACW,gBAAW,GAAY,KAAK,CAAC;QAC7B,yBAAoB,GAAY,KAAK,CAAC;IAKjD,CAAC;IAHG,sBAAW,kCAAO;aAAlB;YACI,OAAO,MAAM,CAAC,OAAO,CAAC;QAC1B,CAAC;;;OAAA;IACL,oBAAC;AAAD,CAAC,AAPD,IAOC;;AAED,MAAM,CAAC,IAAM,aAAa,GAAkB,IAAI,aAAa,EAAE,CAAC","sourcesContent":["import { Engine } from \"core/Engines/engine\";\r\n\r\nexport class ViewerGlobals {\r\n public disableInit: boolean = false;\r\n public disableWebGL2Support: boolean = false;\r\n\r\n public get version(): string {\r\n return Engine.Version;\r\n }\r\n}\r\n\r\nexport const viewerGlobals: ViewerGlobals = new ViewerGlobals();\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./configuration\";\r\nexport * from \"./interfaces/index\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./configuration\";\r\nexport * from \"./interfaces/index\";\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"cameraConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/cameraConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface ICameraConfiguration {\r\n position?: { x: number; y: number; z: number };\r\n rotation?: { x: number; y: number; z: number; w: number };\r\n fov?: number;\r\n fovMode?: number;\r\n minZ?: number;\r\n maxZ?: number;\r\n inertia?: number;\r\n exposure?: number;\r\n pinchPrecision?: number;\r\n behaviors?: {\r\n [name: string]: boolean | number | ICameraBehaviorConfiguration;\r\n };\r\n disableCameraControl?: boolean;\r\n disableCtrlForPanning?: boolean;\r\n disableAutoFocus?: boolean;\r\n\r\n [propName: string]: any;\r\n}\r\n\r\nexport interface ICameraBehaviorConfiguration {\r\n type: number;\r\n [propName: string]: any;\r\n}\r\n"]}
1
+ {"version":3,"file":"cameraConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/cameraConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface ICameraConfiguration {\r\n position?: { x: number; y: number; z: number };\r\n rotation?: { x: number; y: number; z: number; w: number };\r\n fov?: number;\r\n fovMode?: number;\r\n minZ?: number;\r\n maxZ?: number;\r\n inertia?: number;\r\n exposure?: number;\r\n pinchPrecision?: number;\r\n behaviors?: {\r\n [name: string]: boolean | number | ICameraBehaviorConfiguration;\r\n };\r\n disableCameraControl?: boolean;\r\n disableCtrlForPanning?: boolean;\r\n disableAutoFocus?: boolean;\r\n\r\n [propName: string]: any;\r\n}\r\n\r\nexport interface ICameraBehaviorConfiguration {\r\n type: number;\r\n [propName: string]: any;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"colorGradingConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/colorGradingConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * The Color Grading Configuration groups the different settings used to define the color grading used in the viewer.\r\n */\r\nexport interface IColorGradingConfiguration {\r\n /**\r\n * Transform data string, encoded as determined by transformDataFormat.\r\n */\r\n transformData: string;\r\n\r\n /**\r\n * The encoding format of TransformData (currently only raw-base16 is supported).\r\n */\r\n transformDataFormat: string;\r\n\r\n /**\r\n * The weight of the transform\r\n */\r\n transformWeight: number;\r\n\r\n /**\r\n * Color curve colorFilterHueGlobal value\r\n */\r\n colorFilterHueGlobal: number;\r\n\r\n /**\r\n * Color curve colorFilterHueShadows value\r\n */\r\n colorFilterHueShadows: number;\r\n\r\n /**\r\n * Color curve colorFilterHueMidtones value\r\n */\r\n colorFilterHueMidtones: number;\r\n\r\n /**\r\n * Color curve colorFilterHueHighlights value\r\n */\r\n colorFilterHueHighlights: number;\r\n\r\n /**\r\n * Color curve colorFilterDensityGlobal value\r\n */\r\n colorFilterDensityGlobal: number;\r\n\r\n /**\r\n * Color curve colorFilterDensityShadows value\r\n */\r\n colorFilterDensityShadows: number;\r\n\r\n /**\r\n * Color curve colorFilterDensityMidtones value\r\n */\r\n colorFilterDensityMidtones: number;\r\n\r\n /**\r\n * Color curve colorFilterDensityHighlights value\r\n */\r\n colorFilterDensityHighlights: number;\r\n\r\n /**\r\n * Color curve saturationGlobal value\r\n */\r\n saturationGlobal: number;\r\n\r\n /**\r\n * Color curve saturationShadows value\r\n */\r\n saturationShadows: number;\r\n\r\n /**\r\n * Color curve saturationMidtones value\r\n */\r\n saturationMidtones: number;\r\n\r\n /**\r\n * Color curve saturationHighlights value\r\n */\r\n saturationHighlights: number;\r\n\r\n /**\r\n * Color curve exposureGlobal value\r\n */\r\n exposureGlobal: number;\r\n\r\n /**\r\n * Color curve exposureShadows value\r\n */\r\n exposureShadows: number;\r\n\r\n /**\r\n * Color curve exposureMidtones value\r\n */\r\n exposureMidtones: number;\r\n\r\n /**\r\n * Color curve exposureHighlights value\r\n */\r\n exposureHighlights: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"colorGradingConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/colorGradingConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * The Color Grading Configuration groups the different settings used to define the color grading used in the viewer.\r\n */\r\nexport interface IColorGradingConfiguration {\r\n /**\r\n * Transform data string, encoded as determined by transformDataFormat.\r\n */\r\n transformData: string;\r\n\r\n /**\r\n * The encoding format of TransformData (currently only raw-base16 is supported).\r\n */\r\n transformDataFormat: string;\r\n\r\n /**\r\n * The weight of the transform\r\n */\r\n transformWeight: number;\r\n\r\n /**\r\n * Color curve colorFilterHueGlobal value\r\n */\r\n colorFilterHueGlobal: number;\r\n\r\n /**\r\n * Color curve colorFilterHueShadows value\r\n */\r\n colorFilterHueShadows: number;\r\n\r\n /**\r\n * Color curve colorFilterHueMidtones value\r\n */\r\n colorFilterHueMidtones: number;\r\n\r\n /**\r\n * Color curve colorFilterHueHighlights value\r\n */\r\n colorFilterHueHighlights: number;\r\n\r\n /**\r\n * Color curve colorFilterDensityGlobal value\r\n */\r\n colorFilterDensityGlobal: number;\r\n\r\n /**\r\n * Color curve colorFilterDensityShadows value\r\n */\r\n colorFilterDensityShadows: number;\r\n\r\n /**\r\n * Color curve colorFilterDensityMidtones value\r\n */\r\n colorFilterDensityMidtones: number;\r\n\r\n /**\r\n * Color curve colorFilterDensityHighlights value\r\n */\r\n colorFilterDensityHighlights: number;\r\n\r\n /**\r\n * Color curve saturationGlobal value\r\n */\r\n saturationGlobal: number;\r\n\r\n /**\r\n * Color curve saturationShadows value\r\n */\r\n saturationShadows: number;\r\n\r\n /**\r\n * Color curve saturationMidtones value\r\n */\r\n saturationMidtones: number;\r\n\r\n /**\r\n * Color curve saturationHighlights value\r\n */\r\n saturationHighlights: number;\r\n\r\n /**\r\n * Color curve exposureGlobal value\r\n */\r\n exposureGlobal: number;\r\n\r\n /**\r\n * Color curve exposureShadows value\r\n */\r\n exposureShadows: number;\r\n\r\n /**\r\n * Color curve exposureMidtones value\r\n */\r\n exposureMidtones: number;\r\n\r\n /**\r\n * Color curve exposureHighlights value\r\n */\r\n exposureHighlights: number;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultRenderingPipelineConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/defaultRenderingPipelineConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { DepthOfFieldEffectBlurLevel } from \"core/PostProcesses/depthOfFieldEffect\";\r\n\r\nexport interface IDefaultRenderingPipelineConfiguration {\r\n sharpenEnabled?: boolean;\r\n bloomEnabled?: boolean;\r\n bloomThreshold?: number;\r\n depthOfFieldEnabled?: boolean;\r\n depthOfFieldBlurLevel?: DepthOfFieldEffectBlurLevel;\r\n fxaaEnabled?: boolean;\r\n imageProcessingEnabled?: boolean;\r\n defaultPipelineTextureType?: number;\r\n bloomScale?: number;\r\n chromaticAberrationEnabled?: boolean;\r\n grainEnabled?: boolean;\r\n bloomKernel?: number;\r\n hardwareScaleLevel?: number;\r\n bloomWeight?: number;\r\n hdr?: boolean;\r\n samples?: number;\r\n glowLayerEnabled?: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"defaultRenderingPipelineConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/defaultRenderingPipelineConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { DepthOfFieldEffectBlurLevel } from \"core/PostProcesses/depthOfFieldEffect\";\r\n\r\nexport interface IDefaultRenderingPipelineConfiguration {\r\n sharpenEnabled?: boolean;\r\n bloomEnabled?: boolean;\r\n bloomThreshold?: number;\r\n depthOfFieldEnabled?: boolean;\r\n depthOfFieldBlurLevel?: DepthOfFieldEffectBlurLevel;\r\n fxaaEnabled?: boolean;\r\n imageProcessingEnabled?: boolean;\r\n defaultPipelineTextureType?: number;\r\n bloomScale?: number;\r\n chromaticAberrationEnabled?: boolean;\r\n grainEnabled?: boolean;\r\n bloomKernel?: number;\r\n hardwareScaleLevel?: number;\r\n bloomWeight?: number;\r\n hdr?: boolean;\r\n samples?: number;\r\n glowLayerEnabled?: boolean;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"environmentMapConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/environmentMapConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IEnvironmentMapConfiguration {\r\n /**\r\n * Environment map texture path in relative to the asset folder.\r\n */\r\n texture: string;\r\n\r\n /**\r\n * Default rotation to apply to the environment map.\r\n */\r\n rotationY: number;\r\n\r\n /**\r\n * Tint level of the main color on the environment map.\r\n */\r\n tintLevel: number;\r\n\r\n /**\r\n * The environment's main color.\r\n */\r\n mainColor?: { r?: number; g?: number; b?: number };\r\n}\r\n"]}
1
+ {"version":3,"file":"environmentMapConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/environmentMapConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IEnvironmentMapConfiguration {\r\n /**\r\n * Environment map texture path in relative to the asset folder.\r\n */\r\n texture: string;\r\n\r\n /**\r\n * Default rotation to apply to the environment map.\r\n */\r\n rotationY: number;\r\n\r\n /**\r\n * Tint level of the main color on the environment map.\r\n */\r\n tintLevel: number;\r\n\r\n /**\r\n * The environment's main color.\r\n */\r\n mainColor?: { r?: number; g?: number; b?: number };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"groundConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/groundConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IGroundConfiguration {\r\n size?: number;\r\n receiveShadows?: boolean;\r\n shadowLevel?: number;\r\n /** @deprecated */ shadowOnly?: boolean;\r\n mirror?:\r\n | boolean\r\n | {\r\n sizeRatio?: number;\r\n blurKernel?: number;\r\n amount?: number;\r\n fresnelWeight?: number;\r\n fallOffDistance?: number;\r\n textureType?: number;\r\n };\r\n texture?: string;\r\n color?: { r: number; g: number; b: number };\r\n opacity?: number;\r\n material?: {\r\n [propName: string]: any;\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"groundConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/groundConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IGroundConfiguration {\r\n size?: number;\r\n receiveShadows?: boolean;\r\n shadowLevel?: number;\r\n /** @deprecated */ shadowOnly?: boolean;\r\n mirror?:\r\n | boolean\r\n | {\r\n sizeRatio?: number;\r\n blurKernel?: number;\r\n amount?: number;\r\n fresnelWeight?: number;\r\n fallOffDistance?: number;\r\n textureType?: number;\r\n };\r\n texture?: string;\r\n color?: { r: number; g: number; b: number };\r\n opacity?: number;\r\n material?: {\r\n [propName: string]: any;\r\n };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"imageProcessingConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/imageProcessingConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IImageProcessingConfiguration {\r\n colorGradingEnabled?: boolean;\r\n colorCurvesEnabled?: boolean;\r\n colorCurves?: {\r\n globalHue?: number;\r\n globalDensity?: number;\r\n globalSaturation?: number;\r\n globalExposure?: number;\r\n highlightsHue?: number;\r\n highlightsDensity?: number;\r\n highlightsSaturation?: number;\r\n highlightsExposure?: number;\r\n midtonesHue?: number;\r\n midtonesDensity?: number;\r\n midtonesSaturation?: number;\r\n midtonesExposure?: number;\r\n shadowsHue?: number;\r\n shadowsDensity?: number;\r\n shadowsSaturation?: number;\r\n shadowsExposure?: number;\r\n };\r\n colorGradingWithGreenDepth?: boolean;\r\n colorGradingBGR?: boolean;\r\n exposure?: number;\r\n toneMappingEnabled?: boolean;\r\n contrast?: number;\r\n vignetteEnabled?: boolean;\r\n vignetteStretch?: number;\r\n vignetteCentreX?: number;\r\n vignetteCentreY?: number;\r\n vignetteCenterX?: number;\r\n vignetteCenterY?: number;\r\n vignetteWeight?: number;\r\n vignetteColor?: { r: number; g: number; b: number; a?: number };\r\n vignetteCameraFov?: number;\r\n vignetteBlendMode?: number;\r\n vignetteM?: boolean;\r\n applyByPostProcess?: boolean;\r\n isEnabled?: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"imageProcessingConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/imageProcessingConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IImageProcessingConfiguration {\r\n colorGradingEnabled?: boolean;\r\n colorCurvesEnabled?: boolean;\r\n colorCurves?: {\r\n globalHue?: number;\r\n globalDensity?: number;\r\n globalSaturation?: number;\r\n globalExposure?: number;\r\n highlightsHue?: number;\r\n highlightsDensity?: number;\r\n highlightsSaturation?: number;\r\n highlightsExposure?: number;\r\n midtonesHue?: number;\r\n midtonesDensity?: number;\r\n midtonesSaturation?: number;\r\n midtonesExposure?: number;\r\n shadowsHue?: number;\r\n shadowsDensity?: number;\r\n shadowsSaturation?: number;\r\n shadowsExposure?: number;\r\n };\r\n colorGradingWithGreenDepth?: boolean;\r\n colorGradingBGR?: boolean;\r\n exposure?: number;\r\n toneMappingEnabled?: boolean;\r\n contrast?: number;\r\n vignetteEnabled?: boolean;\r\n vignetteStretch?: number;\r\n vignetteCentreX?: number;\r\n vignetteCentreY?: number;\r\n vignetteCenterX?: number;\r\n vignetteCenterY?: number;\r\n vignetteWeight?: number;\r\n vignetteColor?: { r: number; g: number; b: number; a?: number };\r\n vignetteCameraFov?: number;\r\n vignetteBlendMode?: number;\r\n vignetteM?: boolean;\r\n applyByPostProcess?: boolean;\r\n isEnabled?: boolean;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC","sourcesContent":["export * from \"./cameraConfiguration\";\r\nexport * from \"./colorGradingConfiguration\";\r\nexport * from \"./defaultRenderingPipelineConfiguration\";\r\nexport * from \"./groundConfiguration\";\r\nexport * from \"./imageProcessingConfiguration\";\r\nexport * from \"./lightConfiguration\";\r\nexport * from \"./modelAnimationConfiguration\";\r\nexport * from \"./modelConfiguration\";\r\nexport * from \"./observersConfiguration\";\r\nexport * from \"./sceneConfiguration\";\r\nexport * from \"./sceneOptimizerConfiguration\";\r\nexport * from \"./skyboxConfiguration\";\r\nexport * from \"./templateConfiguration\";\r\nexport * from \"./vrConfiguration\";\r\nexport * from \"./environmentMapConfiguration\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC;AACxD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC","sourcesContent":["export * from \"./cameraConfiguration\";\r\nexport * from \"./colorGradingConfiguration\";\r\nexport * from \"./defaultRenderingPipelineConfiguration\";\r\nexport * from \"./groundConfiguration\";\r\nexport * from \"./imageProcessingConfiguration\";\r\nexport * from \"./lightConfiguration\";\r\nexport * from \"./modelAnimationConfiguration\";\r\nexport * from \"./modelConfiguration\";\r\nexport * from \"./observersConfiguration\";\r\nexport * from \"./sceneConfiguration\";\r\nexport * from \"./sceneOptimizerConfiguration\";\r\nexport * from \"./skyboxConfiguration\";\r\nexport * from \"./templateConfiguration\";\r\nexport * from \"./vrConfiguration\";\r\nexport * from \"./environmentMapConfiguration\";\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"lightConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/lightConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface ILightConfiguration {\r\n type: number;\r\n name?: string;\r\n disabled?: boolean;\r\n position?: { x: number; y: number; z: number };\r\n target?: { x: number; y: number; z: number };\r\n direction?: { x: number; y: number; z: number };\r\n diffuse?: { r: number; g: number; b: number };\r\n specular?: { r: number; g: number; b: number };\r\n intensity?: number;\r\n intensityMode?: number;\r\n radius?: number;\r\n shadownEnabled?: boolean; // only on specific lights!\r\n shadowConfig?: {\r\n useBlurExponentialShadowMap?: boolean;\r\n useBlurCloseExponentialShadowMap?: boolean;\r\n useKernelBlur?: boolean;\r\n blurKernel?: number;\r\n blurScale?: number;\r\n minZ?: number;\r\n maxZ?: number;\r\n frustumSize?: number;\r\n angleScale?: number;\r\n frustumEdgeFalloff?: number;\r\n [propName: string]: any;\r\n };\r\n spotAngle?: number;\r\n shadowFieldOfView?: number;\r\n shadowBufferSize?: number;\r\n shadowFrustumSize?: number;\r\n shadowMinZ?: number;\r\n shadowMaxZ?: number;\r\n [propName: string]: any;\r\n\r\n // no behaviors for light at the moment, but allowing configuration for future reference.\r\n behaviors?: {\r\n [name: string]:\r\n | number\r\n | {\r\n type: number;\r\n [propName: string]: any;\r\n };\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"lightConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/lightConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface ILightConfiguration {\r\n type: number;\r\n name?: string;\r\n disabled?: boolean;\r\n position?: { x: number; y: number; z: number };\r\n target?: { x: number; y: number; z: number };\r\n direction?: { x: number; y: number; z: number };\r\n diffuse?: { r: number; g: number; b: number };\r\n specular?: { r: number; g: number; b: number };\r\n intensity?: number;\r\n intensityMode?: number;\r\n radius?: number;\r\n shadownEnabled?: boolean; // only on specific lights!\r\n shadowConfig?: {\r\n useBlurExponentialShadowMap?: boolean;\r\n useBlurCloseExponentialShadowMap?: boolean;\r\n useKernelBlur?: boolean;\r\n blurKernel?: number;\r\n blurScale?: number;\r\n minZ?: number;\r\n maxZ?: number;\r\n frustumSize?: number;\r\n angleScale?: number;\r\n frustumEdgeFalloff?: number;\r\n [propName: string]: any;\r\n };\r\n spotAngle?: number;\r\n shadowFieldOfView?: number;\r\n shadowBufferSize?: number;\r\n shadowFrustumSize?: number;\r\n shadowMinZ?: number;\r\n shadowMaxZ?: number;\r\n [propName: string]: any;\r\n\r\n // no behaviors for light at the moment, but allowing configuration for future reference.\r\n behaviors?: {\r\n [name: string]:\r\n | number\r\n | {\r\n type: number;\r\n [propName: string]: any;\r\n };\r\n };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"modelAnimationConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/modelAnimationConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Defines an animation to be applied to a model (translation, scale or rotation).\r\n */\r\nexport interface IModelAnimationConfiguration {\r\n /**\r\n * Time of animation, in seconds\r\n */\r\n time?: number;\r\n\r\n /**\r\n * Scale to apply\r\n */\r\n scaling?: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n\r\n /**\r\n * Easing function to apply\r\n */\r\n easingFunction?: number;\r\n\r\n /**\r\n * An Easing mode to apply to the easing function\r\n * See BABYLON.EasingFunction\r\n */\r\n easingMode?: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"modelAnimationConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/modelAnimationConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Defines an animation to be applied to a model (translation, scale or rotation).\r\n */\r\nexport interface IModelAnimationConfiguration {\r\n /**\r\n * Time of animation, in seconds\r\n */\r\n time?: number;\r\n\r\n /**\r\n * Scale to apply\r\n */\r\n scaling?: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n\r\n /**\r\n * Easing function to apply\r\n */\r\n easingFunction?: number;\r\n\r\n /**\r\n * An Easing mode to apply to the easing function\r\n * See BABYLON.EasingFunction\r\n */\r\n easingMode?: number;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"modelConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/modelConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IModelAnimationConfiguration } from \"./modelAnimationConfiguration\";\r\n\r\nexport interface IModelConfiguration {\r\n id?: string;\r\n url?: string;\r\n root?: string; //optional\r\n file?: string | File; // is a file being loaded? root and url ignored\r\n loader?: string; // obj, gltf?\r\n position?: { x: number; y: number; z: number };\r\n rotation?: { x: number; y: number; z: number; w?: number };\r\n scaling?: { x: number; y: number; z: number };\r\n parentObjectIndex?: number; // the index of the parent object of the model in the loaded meshes array.\r\n\r\n castShadow?: boolean;\r\n receiveShadows?: boolean;\r\n normalize?:\r\n | boolean\r\n | {\r\n center?: boolean;\r\n unitSize?: boolean;\r\n parentIndex?: number;\r\n }; // should the model be scaled to unit-size\r\n\r\n title?: string;\r\n subtitle?: string;\r\n thumbnail?: string; // URL or data-url\r\n\r\n animation?: {\r\n autoStart?: boolean | string;\r\n playOnce?: boolean;\r\n autoStartIndex?: number;\r\n };\r\n\r\n entryAnimation?: IModelAnimationConfiguration;\r\n exitAnimation?: IModelAnimationConfiguration;\r\n\r\n material?: {\r\n directEnabled?: boolean;\r\n directIntensity?: number;\r\n emissiveIntensity?: number;\r\n environmentIntensity?: number;\r\n [propName: string]: any;\r\n };\r\n\r\n /**\r\n * Rotation offset axis definition\r\n */\r\n rotationOffsetAxis?: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n\r\n /**\r\n * the offset angle\r\n */\r\n rotationOffsetAngle?: number;\r\n\r\n loaderConfiguration?: {\r\n maxLODsToLoad?: number;\r\n progressiveLoading?: boolean;\r\n };\r\n\r\n // [propName: string]: any; // further configuration, like title and creator\r\n}\r\n"]}
1
+ {"version":3,"file":"modelConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/modelConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IModelAnimationConfiguration } from \"./modelAnimationConfiguration\";\r\n\r\nexport interface IModelConfiguration {\r\n id?: string;\r\n url?: string;\r\n root?: string; //optional\r\n file?: string | File; // is a file being loaded? root and url ignored\r\n loader?: string; // obj, gltf?\r\n position?: { x: number; y: number; z: number };\r\n rotation?: { x: number; y: number; z: number; w?: number };\r\n scaling?: { x: number; y: number; z: number };\r\n parentObjectIndex?: number; // the index of the parent object of the model in the loaded meshes array.\r\n\r\n castShadow?: boolean;\r\n receiveShadows?: boolean;\r\n normalize?:\r\n | boolean\r\n | {\r\n center?: boolean;\r\n unitSize?: boolean;\r\n parentIndex?: number;\r\n }; // should the model be scaled to unit-size\r\n\r\n title?: string;\r\n subtitle?: string;\r\n thumbnail?: string; // URL or data-url\r\n\r\n animation?: {\r\n autoStart?: boolean | string;\r\n playOnce?: boolean;\r\n autoStartIndex?: number;\r\n };\r\n\r\n entryAnimation?: IModelAnimationConfiguration;\r\n exitAnimation?: IModelAnimationConfiguration;\r\n\r\n material?: {\r\n directEnabled?: boolean;\r\n directIntensity?: number;\r\n emissiveIntensity?: number;\r\n environmentIntensity?: number;\r\n [propName: string]: any;\r\n };\r\n\r\n /**\r\n * Rotation offset axis definition\r\n */\r\n rotationOffsetAxis?: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n\r\n /**\r\n * the offset angle\r\n */\r\n rotationOffsetAngle?: number;\r\n\r\n loaderConfiguration?: {\r\n maxLODsToLoad?: number;\r\n progressiveLoading?: boolean;\r\n };\r\n\r\n // [propName: string]: any; // further configuration, like title and creator\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"observersConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/observersConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IObserversConfiguration {\r\n onEngineInit?: string;\r\n onSceneInit?: string;\r\n onModelLoaded?: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"observersConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/observersConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface IObserversConfiguration {\r\n onEngineInit?: string;\r\n onSceneInit?: string;\r\n onModelLoaded?: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"sceneConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/sceneConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IImageProcessingConfiguration } from \"./imageProcessingConfiguration\";\r\nimport type { IColorGradingConfiguration } from \"./colorGradingConfiguration\";\r\nimport type { IGlowLayerOptions } from \"core/Layers/glowLayer\";\r\n\r\nexport interface ISceneConfiguration {\r\n debug?: boolean;\r\n clearColor?: { r: number; g: number; b: number; a: number };\r\n /** @deprecated Please use environmentMap.mainColor instead. */\r\n mainColor?: { r?: number; g?: number; b?: number };\r\n imageProcessingConfiguration?: IImageProcessingConfiguration;\r\n environmentTexture?: string;\r\n colorGrading?: IColorGradingConfiguration;\r\n environmentRotationY?: number;\r\n /** @deprecated Please use default rendering pipeline. */\r\n glow?: boolean | IGlowLayerOptions;\r\n disableHdr?: boolean;\r\n renderInBackground?: boolean;\r\n disableCameraControl?: boolean;\r\n animationPropertiesOverride?: {\r\n [propName: string]: any;\r\n };\r\n defaultMaterial?: {\r\n materialType: \"standard\" | \"pbr\";\r\n [propName: string]: any;\r\n };\r\n flags?: {\r\n shadowsEnabled?: boolean;\r\n particlesEnabled?: boolean;\r\n collisionsEnabled?: boolean;\r\n lightsEnabled?: boolean;\r\n texturesEnabled?: boolean;\r\n lensFlaresEnabled?: boolean;\r\n proceduralTexturesEnabled?: boolean;\r\n renderTargetsEnabled?: boolean;\r\n spritesEnabled?: boolean;\r\n skeletonsEnabled?: boolean;\r\n audioEnabled?: boolean;\r\n };\r\n assetsRootURL?: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"sceneConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/sceneConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IImageProcessingConfiguration } from \"./imageProcessingConfiguration\";\r\nimport type { IColorGradingConfiguration } from \"./colorGradingConfiguration\";\r\nimport type { IGlowLayerOptions } from \"core/Layers/glowLayer\";\r\n\r\nexport interface ISceneConfiguration {\r\n debug?: boolean;\r\n clearColor?: { r: number; g: number; b: number; a: number };\r\n /** @deprecated Please use environmentMap.mainColor instead. */\r\n mainColor?: { r?: number; g?: number; b?: number };\r\n imageProcessingConfiguration?: IImageProcessingConfiguration;\r\n environmentTexture?: string;\r\n colorGrading?: IColorGradingConfiguration;\r\n environmentRotationY?: number;\r\n /** @deprecated Please use default rendering pipeline. */\r\n glow?: boolean | IGlowLayerOptions;\r\n disableHdr?: boolean;\r\n renderInBackground?: boolean;\r\n disableCameraControl?: boolean;\r\n animationPropertiesOverride?: {\r\n [propName: string]: any;\r\n };\r\n defaultMaterial?: {\r\n materialType: \"standard\" | \"pbr\";\r\n [propName: string]: any;\r\n };\r\n flags?: {\r\n shadowsEnabled?: boolean;\r\n particlesEnabled?: boolean;\r\n collisionsEnabled?: boolean;\r\n lightsEnabled?: boolean;\r\n texturesEnabled?: boolean;\r\n lensFlaresEnabled?: boolean;\r\n proceduralTexturesEnabled?: boolean;\r\n renderTargetsEnabled?: boolean;\r\n spritesEnabled?: boolean;\r\n skeletonsEnabled?: boolean;\r\n audioEnabled?: boolean;\r\n };\r\n assetsRootURL?: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"sceneOptimizerConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/sceneOptimizerConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface ISceneOptimizerConfiguration {\r\n targetFrameRate?: number;\r\n trackerDuration?: number;\r\n autoGeneratePriorities?: boolean;\r\n improvementMode?: boolean;\r\n degradation?: string; // low, moderate, high\r\n types?: {\r\n texture?: ISceneOptimizerParameters;\r\n hardwareScaling?: ISceneOptimizerParameters;\r\n shadow?: ISceneOptimizerParameters;\r\n postProcess?: ISceneOptimizerParameters;\r\n lensFlare?: ISceneOptimizerParameters;\r\n particles?: ISceneOptimizerParameters;\r\n renderTarget?: ISceneOptimizerParameters;\r\n mergeMeshes?: ISceneOptimizerParameters;\r\n };\r\n custom?: string;\r\n}\r\n\r\nexport interface ISceneOptimizerParameters {\r\n priority?: number;\r\n maximumSize?: number;\r\n step?: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"sceneOptimizerConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/sceneOptimizerConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["export interface ISceneOptimizerConfiguration {\r\n targetFrameRate?: number;\r\n trackerDuration?: number;\r\n autoGeneratePriorities?: boolean;\r\n improvementMode?: boolean;\r\n degradation?: string; // low, moderate, high\r\n types?: {\r\n texture?: ISceneOptimizerParameters;\r\n hardwareScaling?: ISceneOptimizerParameters;\r\n shadow?: ISceneOptimizerParameters;\r\n postProcess?: ISceneOptimizerParameters;\r\n lensFlare?: ISceneOptimizerParameters;\r\n particles?: ISceneOptimizerParameters;\r\n renderTarget?: ISceneOptimizerParameters;\r\n mergeMeshes?: ISceneOptimizerParameters;\r\n };\r\n custom?: string;\r\n}\r\n\r\nexport interface ISceneOptimizerParameters {\r\n priority?: number;\r\n maximumSize?: number;\r\n step?: number;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"skyboxConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/skyboxConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IImageProcessingConfiguration } from \"./imageProcessingConfiguration\";\r\n\r\nexport interface ISkyboxConfiguration {\r\n cubeTexture?: {\r\n noMipMap?: boolean;\r\n gammaSpace?: boolean;\r\n url?: string | Array<string>;\r\n };\r\n color?: { r: number; g: number; b: number };\r\n /** @deprecated */ pbr?: boolean;\r\n scale?: number;\r\n /** @deprecated */ blur?: number;\r\n material?: {\r\n imageProcessingConfiguration?: IImageProcessingConfiguration;\r\n [propName: string]: any;\r\n };\r\n infiniteDistance?: boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"skyboxConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/skyboxConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { IImageProcessingConfiguration } from \"./imageProcessingConfiguration\";\r\n\r\nexport interface ISkyboxConfiguration {\r\n cubeTexture?: {\r\n noMipMap?: boolean;\r\n gammaSpace?: boolean;\r\n url?: string | Array<string>;\r\n };\r\n color?: { r: number; g: number; b: number };\r\n /** @deprecated */ pbr?: boolean;\r\n scale?: number;\r\n /** @deprecated */ blur?: number;\r\n material?: {\r\n imageProcessingConfiguration?: IImageProcessingConfiguration;\r\n [propName: string]: any;\r\n };\r\n infiniteDistance?: boolean;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"templateConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/templateConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * A single template configuration object\r\n */\r\nexport interface ITemplateConfiguration {\r\n /**\r\n * can be either the id of the template's html element or a URL.\r\n * See - https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#location-vs-html\r\n */\r\n location?: string; // #template-id OR http://example.com/loading.html\r\n /**\r\n * If no location is provided you can provide here the raw html of this template.\r\n * See https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#location-vs-html\r\n */\r\n html?: string; // raw html string\r\n id?: string;\r\n /**\r\n * Parameters that will be delivered to the template and will render it accordingly.\r\n */\r\n params?: { [key: string]: string | number | boolean | object };\r\n /**\r\n * Events to attach to this template.\r\n * event name is the key. the value can either be a boolean (attach to the parent element)\r\n * or a map of html id elements.\r\n *\r\n * See - https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#event-binding\r\n */\r\n events?: {\r\n // pointer events\r\n pointerdown?: boolean | { [id: string]: boolean };\r\n pointerup?: boolean | { [id: string]: boolean };\r\n pointermove?: boolean | { [id: string]: boolean };\r\n pointerover?: boolean | { [id: string]: boolean };\r\n pointerout?: boolean | { [id: string]: boolean };\r\n pointerenter?: boolean | { [id: string]: boolean };\r\n pointerleave?: boolean | { [id: string]: boolean };\r\n pointercancel?: boolean | { [id: string]: boolean };\r\n //click, just in case\r\n click?: boolean | { [id: string]: boolean };\r\n // drag and drop\r\n dragstart?: boolean | { [id: string]: boolean };\r\n drop?: boolean | { [id: string]: boolean };\r\n\r\n [key: string]: boolean | { [id: string]: boolean } | undefined;\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"templateConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/templateConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * A single template configuration object\r\n */\r\nexport interface ITemplateConfiguration {\r\n /**\r\n * can be either the id of the template's html element or a URL.\r\n * See - https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#location-vs-html\r\n */\r\n location?: string; // #template-id OR http://example.com/loading.html\r\n /**\r\n * If no location is provided you can provide here the raw html of this template.\r\n * See https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#location-vs-html\r\n */\r\n html?: string; // raw html string\r\n id?: string;\r\n /**\r\n * Parameters that will be delivered to the template and will render it accordingly.\r\n */\r\n params?: { [key: string]: string | number | boolean | object };\r\n /**\r\n * Events to attach to this template.\r\n * event name is the key. the value can either be a boolean (attach to the parent element)\r\n * or a map of html id elements.\r\n *\r\n * See - https://doc.babylonjs.com/features/featuresDeepDive/babylonViewer/viewerTemplatingSystem#event-binding\r\n */\r\n events?: {\r\n // pointer events\r\n pointerdown?: boolean | { [id: string]: boolean };\r\n pointerup?: boolean | { [id: string]: boolean };\r\n pointermove?: boolean | { [id: string]: boolean };\r\n pointerover?: boolean | { [id: string]: boolean };\r\n pointerout?: boolean | { [id: string]: boolean };\r\n pointerenter?: boolean | { [id: string]: boolean };\r\n pointerleave?: boolean | { [id: string]: boolean };\r\n pointercancel?: boolean | { [id: string]: boolean };\r\n //click, just in case\r\n click?: boolean | { [id: string]: boolean };\r\n // drag and drop\r\n dragstart?: boolean | { [id: string]: boolean };\r\n drop?: boolean | { [id: string]: boolean };\r\n\r\n [key: string]: boolean | { [id: string]: boolean } | undefined;\r\n };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"vrConfiguration.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/interfaces/vrConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { VRExperienceHelperOptions } from \"core/Cameras/VR/vrExperienceHelper\";\r\n\r\nexport interface IVRConfiguration {\r\n disabled?: boolean;\r\n objectScaleFactor?: number;\r\n disableInteractions?: boolean;\r\n disableTeleportation?: boolean;\r\n overrideFloorMeshName?: string;\r\n vrOptions?: VRExperienceHelperOptions;\r\n modelHeightCorrection?: number | boolean;\r\n rotateUsingControllers?: boolean; // experimental feature\r\n cameraPosition?: { x: number; y: number; z: number };\r\n}\r\n"]}
1
+ {"version":3,"file":"vrConfiguration.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/interfaces/vrConfiguration.ts"],"names":[],"mappings":"","sourcesContent":["import type { VRExperienceHelperOptions } from \"core/Cameras/VR/vrExperienceHelper\";\r\n\r\nexport interface IVRConfiguration {\r\n disabled?: boolean;\r\n objectScaleFactor?: number;\r\n disableInteractions?: boolean;\r\n disableTeleportation?: boolean;\r\n overrideFloorMeshName?: string;\r\n vrOptions?: VRExperienceHelperOptions;\r\n modelHeightCorrection?: number | boolean;\r\n rotateUsingControllers?: boolean; // experimental feature\r\n cameraPosition?: { x: number; y: number; z: number };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/loader.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,sDAAsD;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD;IAAyC,uCAA6B;IAAtE;;IAKA,CAAC;IAJG,gEAAgE;IACtD,+CAAiB,GAA3B,UAA4B,IAAwB;QAChD,OAAO,oBAAoB,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC;IACpD,CAAC;IACL,0BAAC;AAAD,CAAC,AALD,CAAyC,6BAA6B,GAKrE","sourcesContent":["import { RenderOnlyConfigurationLoader } from \"./renderOnlyLoader\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { getConfigurationType } from \"./types/index\";\r\n\r\nexport class ConfigurationLoader extends RenderOnlyConfigurationLoader {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected getExtendedConfig(type: string | undefined) {\r\n return getConfigurationType(type || \"extended\");\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/loader.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,sDAAsD;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD;IAAyC,uCAA6B;IAAtE;;IAKA,CAAC;IAJG,gEAAgE;IACtD,+CAAiB,GAA3B,UAA4B,IAAwB;QAChD,OAAO,oBAAoB,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC;IACpD,CAAC;IACL,0BAAC;AAAD,CAAC,AALD,CAAyC,6BAA6B,GAKrE","sourcesContent":["import { RenderOnlyConfigurationLoader } from \"./renderOnlyLoader\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { getConfigurationType } from \"./types/index\";\r\n\r\nexport class ConfigurationLoader extends RenderOnlyConfigurationLoader {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected getExtendedConfig(type: string | undefined) {\r\n return getConfigurationType(type || \"extended\");\r\n }\r\n}\r\n"]}
@@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AA1CD,IA0CC;AAED;;;GAGG;AACH;IAOI;QACI,IAAI,CAAC,QAAQ,GAAG;YACZ,IAAI,EAAE,IAAI,UAAU,EAAE;YACtB,IAAI,EAAE,IAAI,UAAU,EAAE;YACtB,GAAG,EAAE,IAAI,SAAS,EAAE;SACvB,CAAC;IACN,CAAC;IAED;;;;OAIG;IACI,iCAAS,GAAhB,UAAiB,IAAY;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACtB,KAAK,CAAC,KAAK,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;SAChD;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACI,sCAAc,GAArB,UAAsB,IAAY,EAAE,MAAe;QAC/C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,+BAAO,GAAd;QACI,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IAxCD;;OAEG;IACW,2BAAa,GAAG,MAAM,CAAC;IAsCzC,oBAAC;CAAA,AA3CD,IA2CC;SA3CY,aAAa;AA6C1B;;;;GAIG;AACH,MAAM,CAAC,IAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC","sourcesContent":["import { Tools } from \"core/Misc/tools\";\r\nimport type { ViewerConfiguration } from \"./configuration\";\r\n\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { kebabToCamel } from \"../helper/index\";\r\n\r\n/**\r\n * This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager\r\n */\r\nexport interface IMapper {\r\n map(rawSource: any): ViewerConfiguration;\r\n}\r\n\r\n/**\r\n * This is a simple HTML mapper.\r\n * This mapper parses a single HTML element and returns the configuration from its attributes.\r\n * it parses numbers and boolean values to the corresponding variable types.\r\n * The following HTML element:\r\n * <div test=\"1\" random-flag=\"true\" a.string.object=\"test\"> will result in the following configuration:\r\n *\r\n * {\r\n * test: 1, //a number!\r\n * randomFlag: boolean, //camelCase and boolean\r\n * a: {\r\n * string: {\r\n * object: \"test\" //dot-separated object levels\r\n * }\r\n * }\r\n * }\r\n */\r\nclass HTMLMapper implements IMapper {\r\n /**\r\n * Map a specific element and get configuration from it\r\n * @param element the HTML element to analyze.\r\n */\r\n map(element: HTMLElement): ViewerConfiguration {\r\n const config = {};\r\n for (let attrIdx = 0; attrIdx < element.attributes.length; ++attrIdx) {\r\n const attr = element.attributes.item(attrIdx);\r\n if (!attr) {\r\n continue;\r\n }\r\n // map \"object.property\" to the right configuration place.\r\n const split = attr.nodeName.split(\".\");\r\n split.reduce((currentConfig: { [key: string]: any }, key, idx) => {\r\n //convert html-style to json-style\r\n const camelKey = kebabToCamel(key);\r\n if (idx === split.length - 1) {\r\n let val: any = attr!.nodeValue; // firefox warns nodeValue is deprecated, but I found no sign of it anywhere.\r\n if (val === \"true\") {\r\n val = true;\r\n } else if (val === \"false\") {\r\n val = false;\r\n } else if (val === \"undefined\") {\r\n val = undefined;\r\n } else if (val === \"null\") {\r\n val = null;\r\n } else {\r\n const isnum = !isNaN(parseFloat(val)) && isFinite(val); ///^\\d+$/.test(val);\r\n if (isnum) {\r\n const number = parseFloat(val);\r\n if (!isNaN(number)) {\r\n val = number;\r\n }\r\n }\r\n }\r\n currentConfig[camelKey] = val;\r\n } else {\r\n currentConfig[camelKey] = currentConfig[camelKey] || {};\r\n }\r\n return currentConfig[camelKey];\r\n }, config);\r\n }\r\n\r\n return config;\r\n }\r\n}\r\n\r\n/**\r\n * A simple string-to-JSON mapper.\r\n * This is the main mapper, used to analyze downloaded JSON-Configuration or JSON payload\r\n */\r\nclass JSONMapper implements IMapper {\r\n map(rawSource: string) {\r\n return JSON.parse(rawSource);\r\n }\r\n}\r\n\r\n/**\r\n * The DOM Mapper will traverse an entire DOM Tree and will load the configuration from the\r\n * DOM elements and attributes.\r\n */\r\nclass DOMMapper implements IMapper {\r\n /**\r\n * The mapping function that will convert HTML data to a viewer configuration object\r\n * @param baseElement the baseElement from which to start traversing\r\n * @returns a ViewerConfiguration object from the provided HTML Element\r\n */\r\n map(baseElement: HTMLElement): ViewerConfiguration {\r\n const htmlMapper = new HTMLMapper();\r\n const config = htmlMapper.map(baseElement);\r\n\r\n const traverseChildren = function (element: HTMLElement, partConfig: any) {\r\n const children = element.children;\r\n if (children.length) {\r\n for (let i = 0; i < children.length; ++i) {\r\n const item = <HTMLElement>children.item(i);\r\n // use the HTML Mapper to read configuration from a single element\r\n const configMapped = htmlMapper.map(item);\r\n const key = kebabToCamel(item.nodeName.toLowerCase());\r\n if (item.attributes.getNamedItem(\"array\") && item.attributes.getNamedItem(\"array\")!.nodeValue === \"true\") {\r\n partConfig[key] = [];\r\n } else {\r\n if (element.attributes.getNamedItem(\"array\") && element.attributes.getNamedItem(\"array\")!.nodeValue === \"true\") {\r\n partConfig.push(configMapped);\r\n } else if (partConfig[key]) {\r\n //exists already! probably an array\r\n element.setAttribute(\"array\", \"true\");\r\n const oldItem = partConfig[key];\r\n partConfig = [oldItem, configMapped];\r\n } else {\r\n partConfig[key] = configMapped;\r\n }\r\n }\r\n traverseChildren(item, partConfig[key] || configMapped);\r\n }\r\n }\r\n return partConfig;\r\n };\r\n\r\n traverseChildren(baseElement, config);\r\n\r\n return config;\r\n }\r\n}\r\n\r\n/**\r\n * The MapperManager manages the different implemented mappers.\r\n * It allows the user to register new mappers as well and use them to parse their own configuration data\r\n */\r\nexport class MapperManager {\r\n private _mappers: { [key: string]: IMapper };\r\n /**\r\n * The default mapper is the JSON mapper.\r\n */\r\n public static DefaultMapper = \"json\";\r\n\r\n constructor() {\r\n this._mappers = {\r\n html: new HTMLMapper(),\r\n json: new JSONMapper(),\r\n dom: new DOMMapper(),\r\n };\r\n }\r\n\r\n /**\r\n * Get a specific configuration mapper.\r\n *\r\n * @param type the name of the mapper to load\r\n */\r\n public getMapper(type: string) {\r\n if (!this._mappers[type]) {\r\n Tools.Error(\"No mapper defined for \" + type);\r\n }\r\n return this._mappers[type];\r\n }\r\n\r\n /**\r\n * Use this function to register your own configuration mapper.\r\n * After a mapper is registered, it can be used to parse the specific type fo configuration to the standard ViewerConfiguration.\r\n * @param type the name of the mapper. This will be used to define the configuration type and/or to get the mapper\r\n * @param mapper The implemented mapper\r\n */\r\n public registerMapper(type: string, mapper: IMapper) {\r\n this._mappers[type] = mapper;\r\n }\r\n\r\n /**\r\n * Dispose the mapper manager and all of its mappers.\r\n */\r\n public dispose() {\r\n this._mappers = {};\r\n }\r\n}\r\n\r\n/**\r\n * mapperManager is a singleton of the type MapperManager.\r\n * The mapperManager can be disposed directly with calling mapperManager.dispose()\r\n * or indirectly with using BabylonViewer.disposeAll()\r\n */\r\nexport const mapperManager = new MapperManager();\r\n"]}
1
+ {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,sCAAwB;AAGxC,sDAAsD;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAS/C;;;;;;;;;;;;;;;;GAgBG;AACH;IAAA;IA8CA,CAAC;IA7CG;;;OAGG;IACH,wBAAG,GAAH,UAAI,OAAoB;QACpB,IAAM,MAAM,GAAG,EAAE,CAAC;gCACT,OAAO;YACZ,IAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC9C,IAAI,CAAC,IAAI,EAAE;;aAEV;YACD,0DAA0D;YAC1D,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACvC,KAAK,CAAC,MAAM,CAAC,UAAC,aAAqC,EAAE,GAAG,EAAE,GAAG;gBACzD,kCAAkC;gBAClC,IAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;gBACnC,IAAI,GAAG,KAAK,KAAK,CAAC,MAAM,GAAG,C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AAa;AA6C1B;;;;GAIG;AACH,MAAM,CAAC,IAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC","sourcesContent":["import { Tools } from \"core/Misc/tools\";\r\nimport type { ViewerConfiguration } from \"./configuration\";\r\n\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { kebabToCamel } from \"../helper/index\";\r\n\r\n/**\r\n * This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager\r\n */\r\nexport interface IMapper {\r\n map(rawSource: any): ViewerConfiguration;\r\n}\r\n\r\n/**\r\n * This is a simple HTML mapper.\r\n * This mapper parses a single HTML element and returns the configuration from its attributes.\r\n * it parses numbers and boolean values to the corresponding variable types.\r\n * The following HTML element:\r\n * <div test=\"1\" random-flag=\"true\" a.string.object=\"test\"> will result in the following configuration:\r\n *\r\n * {\r\n * test: 1, //a number!\r\n * randomFlag: boolean, //camelCase and boolean\r\n * a: {\r\n * string: {\r\n * object: \"test\" //dot-separated object levels\r\n * }\r\n * }\r\n * }\r\n */\r\nclass HTMLMapper implements IMapper {\r\n /**\r\n * Map a specific element and get configuration from it\r\n * @param element the HTML element to analyze.\r\n */\r\n map(element: HTMLElement): ViewerConfiguration {\r\n const config = {};\r\n for (let attrIdx = 0; attrIdx < element.attributes.length; ++attrIdx) {\r\n const attr = element.attributes.item(attrIdx);\r\n if (!attr) {\r\n continue;\r\n }\r\n // map \"object.property\" to the right configuration place.\r\n const split = attr.nodeName.split(\".\");\r\n split.reduce((currentConfig: { [key: string]: any }, key, idx) => {\r\n //convert html-style to json-style\r\n const camelKey = kebabToCamel(key);\r\n if (idx === split.length - 1) {\r\n let val: any = attr!.nodeValue; // firefox warns nodeValue is deprecated, but I found no sign of it anywhere.\r\n if (val === \"true\") {\r\n val = true;\r\n } else if (val === \"false\") {\r\n val = false;\r\n } else if (val === \"undefined\") {\r\n val = undefined;\r\n } else if (val === \"null\") {\r\n val = null;\r\n } else {\r\n const isnum = !isNaN(parseFloat(val)) && isFinite(val); ///^\\d+$/.test(val);\r\n if (isnum) {\r\n const number = parseFloat(val);\r\n if (!isNaN(number)) {\r\n val = number;\r\n }\r\n }\r\n }\r\n currentConfig[camelKey] = val;\r\n } else {\r\n currentConfig[camelKey] = currentConfig[camelKey] || {};\r\n }\r\n return currentConfig[camelKey];\r\n }, config);\r\n }\r\n\r\n return config;\r\n }\r\n}\r\n\r\n/**\r\n * A simple string-to-JSON mapper.\r\n * This is the main mapper, used to analyze downloaded JSON-Configuration or JSON payload\r\n */\r\nclass JSONMapper implements IMapper {\r\n map(rawSource: string) {\r\n return JSON.parse(rawSource);\r\n }\r\n}\r\n\r\n/**\r\n * The DOM Mapper will traverse an entire DOM Tree and will load the configuration from the\r\n * DOM elements and attributes.\r\n */\r\nclass DOMMapper implements IMapper {\r\n /**\r\n * The mapping function that will convert HTML data to a viewer configuration object\r\n * @param baseElement the baseElement from which to start traversing\r\n * @returns a ViewerConfiguration object from the provided HTML Element\r\n */\r\n map(baseElement: HTMLElement): ViewerConfiguration {\r\n const htmlMapper = new HTMLMapper();\r\n const config = htmlMapper.map(baseElement);\r\n\r\n const traverseChildren = function (element: HTMLElement, partConfig: any) {\r\n const children = element.children;\r\n if (children.length) {\r\n for (let i = 0; i < children.length; ++i) {\r\n const item = <HTMLElement>children.item(i);\r\n // use the HTML Mapper to read configuration from a single element\r\n const configMapped = htmlMapper.map(item);\r\n const key = kebabToCamel(item.nodeName.toLowerCase());\r\n if (item.attributes.getNamedItem(\"array\") && item.attributes.getNamedItem(\"array\")!.nodeValue === \"true\") {\r\n partConfig[key] = [];\r\n } else {\r\n if (element.attributes.getNamedItem(\"array\") && element.attributes.getNamedItem(\"array\")!.nodeValue === \"true\") {\r\n partConfig.push(configMapped);\r\n } else if (partConfig[key]) {\r\n //exists already! probably an array\r\n element.setAttribute(\"array\", \"true\");\r\n const oldItem = partConfig[key];\r\n partConfig = [oldItem, configMapped];\r\n } else {\r\n partConfig[key] = configMapped;\r\n }\r\n }\r\n traverseChildren(item, partConfig[key] || configMapped);\r\n }\r\n }\r\n return partConfig;\r\n };\r\n\r\n traverseChildren(baseElement, config);\r\n\r\n return config;\r\n }\r\n}\r\n\r\n/**\r\n * The MapperManager manages the different implemented mappers.\r\n * It allows the user to register new mappers as well and use them to parse their own configuration data\r\n */\r\nexport class MapperManager {\r\n private _mappers: { [key: string]: IMapper };\r\n /**\r\n * The default mapper is the JSON mapper.\r\n */\r\n public static DefaultMapper = \"json\";\r\n\r\n constructor() {\r\n this._mappers = {\r\n html: new HTMLMapper(),\r\n json: new JSONMapper(),\r\n dom: new DOMMapper(),\r\n };\r\n }\r\n\r\n /**\r\n * Get a specific configuration mapper.\r\n *\r\n * @param type the name of the mapper to load\r\n */\r\n public getMapper(type: string) {\r\n if (!this._mappers[type]) {\r\n Tools.Error(\"No mapper defined for \" + type);\r\n }\r\n return this._mappers[type];\r\n }\r\n\r\n /**\r\n * Use this function to register your own configuration mapper.\r\n * After a mapper is registered, it can be used to parse the specific type fo configuration to the standard ViewerConfiguration.\r\n * @param type the name of the mapper. This will be used to define the configuration type and/or to get the mapper\r\n * @param mapper The implemented mapper\r\n */\r\n public registerMapper(type: string, mapper: IMapper) {\r\n this._mappers[type] = mapper;\r\n }\r\n\r\n /**\r\n * Dispose the mapper manager and all of its mappers.\r\n */\r\n public dispose() {\r\n this._mappers = {};\r\n }\r\n}\r\n\r\n/**\r\n * mapperManager is a singleton of the type MapperManager.\r\n * The mapperManager can be disposed directly with calling mapperManager.dispose()\r\n * or indirectly with using BabylonViewer.disposeAll()\r\n */\r\nexport const mapperManager = new MapperManager();\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"renderOnlyLoader.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/renderOnlyLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAEjF,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE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C;IACP,CAAC;IACL,oCAAC;AAAD,CAAC,AAhKD,IAgKC","sourcesContent":["import { mapperManager } from \"./mappers\";\r\nimport type { ViewerConfiguration } from \"./configuration\";\r\nimport { processConfigurationCompatibility } from \"./configurationCompatibility\";\r\n\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../helper/index\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { extendedConfiguration } from \"./types/extended\";\r\nimport { renderOnlyDefaultConfiguration } from \"./types/renderOnlyDefault\";\r\nimport type { IFileRequest } from \"core/Misc/fileRequest\";\r\n\r\n/**\r\n * The configuration loader will load the configuration object from any source and will use the defined mapper to\r\n * parse the object and return a conform ViewerConfiguration.\r\n * It is a private member of the scene.\r\n */\r\nexport class RenderOnlyConfigurationLoader {\r\n private _configurationCache: { [url: string]: any };\r\n\r\n private _loadRequests: Array<IFileRequest>;\r\n\r\n constructor(private _enableCache: boolean = false) {\r\n this._configurationCache = {};\r\n this._loadRequests = [];\r\n }\r\n\r\n private _getConfigurationTypeExcludeTemplate(types: string): ViewerConfiguration {\r\n let config: ViewerConfiguration = {};\r\n const typesSeparated = types.split(\",\");\r\n typesSeparated.forEach((type) => {\r\n switch (type.trim()) {\r\n case \"default\":\r\n config = deepmerge(config, renderOnlyDefaultConfiguration);\r\n break;\r\n case \"none\":\r\n break;\r\n case \"extended\":\r\n default:\r\n config = deepmerge(config, extendedConfiguration);\r\n break;\r\n }\r\n if (config.extends) {\r\n config = deepmerge(config, this._getConfigurationTypeExcludeTemplate(config.extends));\r\n }\r\n });\r\n return config;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected getExtendedConfig(type: string | undefined) {\r\n return this._getConfigurationTypeExcludeTemplate(type || \"extended\");\r\n }\r\n\r\n /**\r\n * load a configuration object that is defined in the initial configuration provided.\r\n * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.\r\n *\r\n * @param initConfig the initial configuration that has the definitions of further configuration to load.\r\n * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only\r\n * @returns A promise that delivers the extended viewer configuration, when done.\r\n */\r\n public loadConfiguration(initConfig: ViewerConfiguration = {}, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration> {\r\n let loadedConfig: ViewerConfiguration = deepmerge({}, initConfig);\r\n this._processInitialConfiguration(loadedConfig);\r\n\r\n const extendedConfiguration = this.getExtendedConfig(loadedConfig.extends);\r\n\r\n if (loadedConfig.configuration) {\r\n let mapperType = \"json\";\r\n return Promise.resolve()\r\n .then(() => {\r\n if (typeof loadedConfig.configuration === \"string\" || (loadedConfig.configuration && loadedConfig.configuration.url)) {\r\n // a file to load\r\n\r\n let url: string = \"\";\r\n if (typeof loadedConfig.configuration === \"string\") {\r\n url = loadedConfig.configuration;\r\n }\r\n\r\n // if configuration is an object\r\n if (typeof loadedConfig.configuration === \"object\" && loadedConfig.configuration.url) {\r\n url = loadedConfig.configuration.url;\r\n let type = loadedConfig.configuration.mapper;\r\n // empty string?\r\n if (!type) {\r\n // load mapper type from filename / url\r\n type = loadedConfig.configuration.url.split(\".\").pop();\r\n }\r\n mapperType = type || mapperType;\r\n }\r\n return this._loadFile(url);\r\n } else {\r\n if (typeof loadedConfig.configuration === \"object\") {\r\n mapperType = loadedConfig.configuration.mapper || mapperType;\r\n return loadedConfig.configuration.payload || {};\r\n }\r\n return {};\r\n }\r\n })\r\n .then((data: any) => {\r\n const mapper = mapperManager.getMapper(mapperType);\r\n const parsed = deepmerge(mapper.map(data), loadedConfig);\r\n const merged = deepmerge(extendedConfiguration, parsed);\r\n processConfigurationCompatibility(merged);\r\n if (callback) {\r\n callback(merged);\r\n }\r\n return merged;\r\n });\r\n } else {\r\n loadedConfig = deepmerge(extendedConfiguration, loadedConfig);\r\n processConfigurationCompatibility(loadedConfig);\r\n if (callback) {\r\n callback(loadedConfig);\r\n }\r\n return Promise.resolve(loadedConfig);\r\n }\r\n }\r\n\r\n /**\r\n * Dispose the configuration loader. This will cancel file requests, if active.\r\n */\r\n public dispose() {\r\n this._loadRequests.forEach((request) => {\r\n request.abort();\r\n });\r\n this._loadRequests.length = 0;\r\n }\r\n\r\n /**\r\n * This function will process the initial configuration and make needed changes for the viewer to work.\r\n * @param config the mutable(!) initial configuration to process\r\n */\r\n private _processInitialConfiguration(config: ViewerConfiguration) {\r\n if (config.model) {\r\n if (typeof config.model === \"string\") {\r\n config.model = {\r\n url: config.model,\r\n };\r\n }\r\n }\r\n }\r\n\r\n private _loadFile(url: string): Promise<any> {\r\n const cacheReference = this._configurationCache;\r\n if (this._enableCache && cacheReference[url]) {\r\n return Promise.resolve(cacheReference[url]);\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const fileRequest = Tools.LoadFile(\r\n url,\r\n (result) => {\r\n const idx = this._loadRequests.indexOf(fileRequest);\r\n if (idx !== -1) {\r\n this._loadRequests.splice(idx, 1);\r\n }\r\n if (this._enableCache) {\r\n cacheReference[url] = result;\r\n }\r\n resolve(result);\r\n },\r\n undefined,\r\n undefined,\r\n false,\r\n (request, error: any) => {\r\n const idx = this._loadRequests.indexOf(fileRequest);\r\n if (idx !== -1) {\r\n this._loadRequests.splice(idx, 1);\r\n }\r\n reject(error);\r\n }\r\n );\r\n this._loadRequests.push(fileRequest);\r\n });\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"renderOnlyLoader.js","sourceRoot":"","sources":["../../../../tools/viewer/src/configuration/renderOnlyLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAEjF,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,sCAAwB;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAG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cAAc,GAAG,IAAI,CAAC,mBAAmB,CAAC;QAChD,IAAI,IAAI,CAAC,YAAY,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE;YAC1C,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;SAC/C;QAED,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,IAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAC9B,GAAG,EACH,UAAC,MAAM;gBACH,IAAM,GAAG,GAAG,KAAI,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBACpD,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE;oBACZ,KAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;iBACrC;gBACD,IAAI,KAAI,CAAC,YAAY,EAAE;oBACnB,cAAc,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;iBAChC;gBACD,OAAO,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC,EACD,SAAS,EACT,SAAS,EACT,KAAK,EACL,UAAC,OAAO,EAAE,KAAU;gBAChB,IAAM,GAAG,GAAG,KAAI,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;gBACpD,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE;oBACZ,KAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;iBACrC;gBACD,MAAM,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC,CACJ,CAAC;YACF,KAAI,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACP,CAAC;IACL,oCAAC;AAAD,CAAC,AAhKD,IAgKC","sourcesContent":["import { mapperManager } from \"./mappers\";\r\nimport type { ViewerConfiguration } from \"./configuration\";\r\nimport { processConfigurationCompatibility } from \"./configurationCompatibility\";\r\n\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../helper/index\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { extendedConfiguration } from \"./types/extended\";\r\nimport { renderOnlyDefaultConfiguration } from \"./types/renderOnlyDefault\";\r\nimport type { IFileRequest } from \"core/Misc/fileRequest\";\r\n\r\n/**\r\n * The configuration loader will load the configuration object from any source and will use the defined mapper to\r\n * parse the object and return a conform ViewerConfiguration.\r\n * It is a private member of the scene.\r\n */\r\nexport class RenderOnlyConfigurationLoader {\r\n private _configurationCache: { [url: string]: any };\r\n\r\n private _loadRequests: Array<IFileRequest>;\r\n\r\n constructor(private _enableCache: boolean = false) {\r\n this._configurationCache = {};\r\n this._loadRequests = [];\r\n }\r\n\r\n private _getConfigurationTypeExcludeTemplate(types: string): ViewerConfiguration {\r\n let config: ViewerConfiguration = {};\r\n const typesSeparated = types.split(\",\");\r\n typesSeparated.forEach((type) => {\r\n switch (type.trim()) {\r\n case \"default\":\r\n config = deepmerge(config, renderOnlyDefaultConfiguration);\r\n break;\r\n case \"none\":\r\n break;\r\n case \"extended\":\r\n default:\r\n config = deepmerge(config, extendedConfiguration);\r\n break;\r\n }\r\n if (config.extends) {\r\n config = deepmerge(config, this._getConfigurationTypeExcludeTemplate(config.extends));\r\n }\r\n });\r\n return config;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected getExtendedConfig(type: string | undefined) {\r\n return this._getConfigurationTypeExcludeTemplate(type || \"extended\");\r\n }\r\n\r\n /**\r\n * load a configuration object that is defined in the initial configuration provided.\r\n * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.\r\n *\r\n * @param initConfig the initial configuration that has the definitions of further configuration to load.\r\n * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only\r\n * @returns A promise that delivers the extended viewer configuration, when done.\r\n */\r\n public loadConfiguration(initConfig: ViewerConfiguration = {}, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration> {\r\n let loadedConfig: ViewerConfiguration = deepmerge({}, initConfig);\r\n this._processInitialConfiguration(loadedConfig);\r\n\r\n const extendedConfiguration = this.getExtendedConfig(loadedConfig.extends);\r\n\r\n if (loadedConfig.configuration) {\r\n let mapperType = \"json\";\r\n return Promise.resolve()\r\n .then(() => {\r\n if (typeof loadedConfig.configuration === \"string\" || (loadedConfig.configuration && loadedConfig.configuration.url)) {\r\n // a file to load\r\n\r\n let url: string = \"\";\r\n if (typeof loadedConfig.configuration === \"string\") {\r\n url = loadedConfig.configuration;\r\n }\r\n\r\n // if configuration is an object\r\n if (typeof loadedConfig.configuration === \"object\" && loadedConfig.configuration.url) {\r\n url = loadedConfig.configuration.url;\r\n let type = loadedConfig.configuration.mapper;\r\n // empty string?\r\n if (!type) {\r\n // load mapper type from filename / url\r\n type = loadedConfig.configuration.url.split(\".\").pop();\r\n }\r\n mapperType = type || mapperType;\r\n }\r\n return this._loadFile(url);\r\n } else {\r\n if (typeof loadedConfig.configuration === \"object\") {\r\n mapperType = loadedConfig.configuration.mapper || mapperType;\r\n return loadedConfig.configuration.payload || {};\r\n }\r\n return {};\r\n }\r\n })\r\n .then((data: any) => {\r\n const mapper = mapperManager.getMapper(mapperType);\r\n const parsed = deepmerge(mapper.map(data), loadedConfig);\r\n const merged = deepmerge(extendedConfiguration, parsed);\r\n processConfigurationCompatibility(merged);\r\n if (callback) {\r\n callback(merged);\r\n }\r\n return merged;\r\n });\r\n } else {\r\n loadedConfig = deepmerge(extendedConfiguration, loadedConfig);\r\n processConfigurationCompatibility(loadedConfig);\r\n if (callback) {\r\n callback(loadedConfig);\r\n }\r\n return Promise.resolve(loadedConfig);\r\n }\r\n }\r\n\r\n /**\r\n * Dispose the configuration loader. This will cancel file requests, if active.\r\n */\r\n public dispose() {\r\n this._loadRequests.forEach((request) => {\r\n request.abort();\r\n });\r\n this._loadRequests.length = 0;\r\n }\r\n\r\n /**\r\n * This function will process the initial configuration and make needed changes for the viewer to work.\r\n * @param config the mutable(!) initial configuration to process\r\n */\r\n private _processInitialConfiguration(config: ViewerConfiguration) {\r\n if (config.model) {\r\n if (typeof config.model === \"string\") {\r\n config.model = {\r\n url: config.model,\r\n };\r\n }\r\n }\r\n }\r\n\r\n private _loadFile(url: string): Promise<any> {\r\n const cacheReference = this._configurationCache;\r\n if (this._enableCache && cacheReference[url]) {\r\n return Promise.resolve(cacheReference[url]);\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n const fileRequest = Tools.LoadFile(\r\n url,\r\n (result) => {\r\n const idx = this._loadRequests.indexOf(fileRequest);\r\n if (idx !== -1) {\r\n this._loadRequests.splice(idx, 1);\r\n }\r\n if (this._enableCache) {\r\n cacheReference[url] = result;\r\n }\r\n resolve(result);\r\n },\r\n undefined,\r\n undefined,\r\n false,\r\n (request, error: any) => {\r\n const idx = this._loadRequests.indexOf(fileRequest);\r\n if (idx !== -1) {\r\n this._loadRequests.splice(idx, 1);\r\n }\r\n reject(error);\r\n }\r\n );\r\n this._loadRequests.push(fileRequest);\r\n });\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/types/default.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACzJ,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAwB,SAAS,CAAC,8BAA8B,EAAE;IAC/F,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE;QACP,IAAI,EAAE;YACF,IAAI,EAAE,eAAe;YACr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AAI;iBAC5B;aACJ;SACJ;QACD,OAAO,EAAE;YACL,IAAI,EAAE,OAAO;YACb,MAAM,EAAE;gBACJ,UAAU,EAAE,MAAM,CAAC,KAAK;gBACxB,SAAS,EAAE,OAAO;aACrB;SACJ;QACD,IAAI,EAAE;YACF,IAAI,EAAE,IAAI;SACb;QACD,KAAK,EAAE;YACH,IAAI,EAAE,KAAK;SACd;QACD,KAAK,EAAE;YACH,IAAI,EAAE,KAAK;SACd;KACJ;IACD,MAAM,EAAE;QACJ,SAAS,EAAE;YACP,UAAU,EAAE;gBACR,IAAI,EAAE,CAAC;aACV;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,CAAC;gBACP,kBAAkB,EAAE,IAAI;gBACxB,kBAAkB,EAAE,KAAK;aAC5B;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,CAAC;aACV;SACJ;KACJ;IACD,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACJ,cAAc,EAAE,IAAI;KACvB;IACD,MAAM,EAAE;QACJ,YAAY,EAAE,IAAI;KACrB;IACD,KAAK,EAAE,EAAE;CACZ,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { ViewerConfiguration } from \"../configuration\";\r\nimport { babylonFont, defaultTemplate, fillContainer, loadingScreen, defaultViewer, navbar, overlay, help, share, error } from \"babylonjs-viewer-assets\";\r\nimport * as images from \"babylonjs-viewer-assets\";\r\nimport { renderOnlyDefaultConfiguration } from \"./renderOnlyDefault\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../../helper/index\";\r\n\r\n/**\r\n * The default configuration of the viewer, including templates (canvas, overly, loading screen)\r\n * This configuration doesn't hold specific parameters, and only defines objects that are needed for the viewer to fully work correctly.\r\n */\r\nexport const defaultConfiguration: ViewerConfiguration = deepmerge(renderOnlyDefaultConfiguration, {\r\n version: \"3.2.0-alpha4\",\r\n templates: {\r\n main: {\r\n html: defaultTemplate,\r\n params: {\r\n babylonFont: babylonFont,\r\n noEscape: true,\r\n },\r\n },\r\n fillContainer: {\r\n html: fillContainer,\r\n params: {\r\n disable: false,\r\n },\r\n },\r\n loadingScreen: {\r\n html: loadingScreen,\r\n params: {\r\n backgroundColor: \"#000000\",\r\n loadingImage: images.loading,\r\n staticLoadingImage: images.staticLoading,\r\n },\r\n },\r\n viewer: {\r\n html: defaultViewer,\r\n params: {\r\n enableDragAndDrop: false,\r\n },\r\n },\r\n navBar: {\r\n html: navbar,\r\n params: {\r\n speedList: {\r\n \"0.5x\": \"0.5\",\r\n \"1.0x\": \"1.0\",\r\n \"1.5x\": \"1.5\",\r\n \"2.0x\": \"2.0\",\r\n },\r\n logoImage: images.babylonLogo,\r\n logoText: \"BabylonJS\",\r\n logoLink: \"https://babylonjs.com\",\r\n hideHelp: true,\r\n hideHd: true,\r\n hideVr: true,\r\n hidePrint: true,\r\n disableOnFullscreen: false,\r\n text: {\r\n hdButton: \"Toggle HD\",\r\n fullscreenButton: \"Toggle Fullscreen\",\r\n helpButton: \"Help\",\r\n vrButton: \"Toggle VR\",\r\n printButton: \"3D Print Object\",\r\n },\r\n },\r\n events: {\r\n click: {\r\n \".navbar-control\": true,\r\n },\r\n pointerdown: {\r\n \".help-button\": true,\r\n },\r\n input: {\r\n \".progress-wrapper\": true,\r\n },\r\n pointerup: {\r\n \".progress-wrapper\": true,\r\n },\r\n },\r\n },\r\n overlay: {\r\n html: overlay,\r\n params: {\r\n closeImage: images.close,\r\n closeText: \"Close\",\r\n },\r\n },\r\n help: {\r\n html: help,\r\n },\r\n share: {\r\n html: share,\r\n },\r\n error: {\r\n html: error,\r\n },\r\n },\r\n camera: {\r\n behaviors: {\r\n autoRotate: {\r\n type: 0,\r\n },\r\n framing: {\r\n type: 2,\r\n zoomOnBoundingInfo: true,\r\n zoomStopsAnimation: false,\r\n },\r\n bouncing: {\r\n type: 1,\r\n },\r\n },\r\n },\r\n skybox: {},\r\n ground: {\r\n receiveShadows: true,\r\n },\r\n engine: {\r\n antialiasing: true,\r\n },\r\n scene: {},\r\n});\r\n"]}
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/default.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACzJ,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAwB,SAAS,CAAC,8BAA8B,EAAE;IAC/F,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE;QACP,IAAI,EAAE;YACF,IAAI,EAAE,eAAe;YACrB,MAAM,EAAE;gBACJ,WAAW,EAAE,WAAW;gBACxB,QAAQ,EAAE,IAAI;aACjB;SACJ;QACD,aAAa,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,OAAO,EAAE,KAAK;aACjB;SACJ;QACD,aAAa,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,eAAe,EAAE,SAAS;gBAC1B,YAAY,EAAE,MAAM,CAAC,OAAO;gBAC5B,kBAAkB,EAAE,MAAM,CAAC,aAAa;aAC3C;SACJ;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,iBAAiB,EAAE,KAAK;aAC3B;SACJ;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE;gBACJ,SAAS,EAAE;oBACP,MAAM,EAAE,KAAK;oBACb,MAAM,EAAE,KAAK;oBACb,MAAM,EAAE,KAAK;oBACb,MAAM,EAAE,K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EAAE;QACJ,YAAY,EAAE,IAAI;KACrB;IACD,KAAK,EAAE,EAAE;CACZ,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { ViewerConfiguration } from \"../configuration\";\r\nimport { babylonFont, defaultTemplate, fillContainer, loadingScreen, defaultViewer, navbar, overlay, help, share, error } from \"babylonjs-viewer-assets\";\r\nimport * as images from \"babylonjs-viewer-assets\";\r\nimport { renderOnlyDefaultConfiguration } from \"./renderOnlyDefault\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../../helper/index\";\r\n\r\n/**\r\n * The default configuration of the viewer, including templates (canvas, overly, loading screen)\r\n * This configuration doesn't hold specific parameters, and only defines objects that are needed for the viewer to fully work correctly.\r\n */\r\nexport const defaultConfiguration: ViewerConfiguration = deepmerge(renderOnlyDefaultConfiguration, {\r\n version: \"3.2.0-alpha4\",\r\n templates: {\r\n main: {\r\n html: defaultTemplate,\r\n params: {\r\n babylonFont: babylonFont,\r\n noEscape: true,\r\n },\r\n },\r\n fillContainer: {\r\n html: fillContainer,\r\n params: {\r\n disable: false,\r\n },\r\n },\r\n loadingScreen: {\r\n html: loadingScreen,\r\n params: {\r\n backgroundColor: \"#000000\",\r\n loadingImage: images.loading,\r\n staticLoadingImage: images.staticLoading,\r\n },\r\n },\r\n viewer: {\r\n html: defaultViewer,\r\n params: {\r\n enableDragAndDrop: false,\r\n },\r\n },\r\n navBar: {\r\n html: navbar,\r\n params: {\r\n speedList: {\r\n \"0.5x\": \"0.5\",\r\n \"1.0x\": \"1.0\",\r\n \"1.5x\": \"1.5\",\r\n \"2.0x\": \"2.0\",\r\n },\r\n logoImage: images.babylonLogo,\r\n logoText: \"BabylonJS\",\r\n logoLink: \"https://babylonjs.com\",\r\n hideHelp: true,\r\n hideHd: true,\r\n hideVr: true,\r\n hidePrint: true,\r\n disableOnFullscreen: false,\r\n text: {\r\n hdButton: \"Toggle HD\",\r\n fullscreenButton: \"Toggle Fullscreen\",\r\n helpButton: \"Help\",\r\n vrButton: \"Toggle VR\",\r\n printButton: \"3D Print Object\",\r\n },\r\n },\r\n events: {\r\n click: {\r\n \".navbar-control\": true,\r\n },\r\n pointerdown: {\r\n \".help-button\": true,\r\n },\r\n input: {\r\n \".progress-wrapper\": true,\r\n },\r\n pointerup: {\r\n \".progress-wrapper\": true,\r\n },\r\n },\r\n },\r\n overlay: {\r\n html: overlay,\r\n params: {\r\n closeImage: images.close,\r\n closeText: \"Close\",\r\n },\r\n },\r\n help: {\r\n html: help,\r\n },\r\n share: {\r\n html: share,\r\n },\r\n error: {\r\n html: error,\r\n },\r\n },\r\n camera: {\r\n behaviors: {\r\n autoRotate: {\r\n type: 0,\r\n },\r\n framing: {\r\n type: 2,\r\n zoomOnBoundingInfo: true,\r\n zoomStopsAnimation: false,\r\n },\r\n bouncing: {\r\n type: 1,\r\n },\r\n },\r\n },\r\n skybox: {},\r\n ground: {\r\n receiveShadows: true,\r\n },\r\n engine: {\r\n antialiasing: true,\r\n },\r\n scene: {},\r\n});\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"environmentMap.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/types/environmentMap.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAAwB;IAC5D,GAAG,EAAE;QACD,aAAa,EAAE,sBAAsB;QACrC,cAAc,EAAE;YACZ,OAAO,EAAE,oBAAoB;YAC7B,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,GAAG;SACjB;KACJ;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\n\r\n/**\r\n * Lab-oriented default .env support\r\n */\r\nexport const environmentMapConfiguration: ViewerConfiguration = {\r\n lab: {\r\n assetsRootURL: \"/assets/environment/\",\r\n environmentMap: {\r\n texture: \"EnvMap_3.0-256.env\",\r\n rotationY: 0,\r\n tintLevel: 0.4,\r\n },\r\n },\r\n};\r\n"]}
1
+ {"version":3,"file":"environmentMap.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/environmentMap.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAAwB;IAC5D,GAAG,EAAE;QACD,aAAa,EAAE,sBAAsB;QACrC,cAAc,EAAE;YACZ,OAAO,EAAE,oBAAoB;YAC7B,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,GAAG;SACjB;KACJ;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\n\r\n/**\r\n * Lab-oriented default .env support\r\n */\r\nexport const environmentMapConfiguration: ViewerConfiguration = {\r\n lab: {\r\n assetsRootURL: \"/assets/environment/\",\r\n environmentMap: {\r\n texture: \"EnvMap_3.0-256.env\",\r\n rotationY: 0,\r\n tintLevel: 0.4,\r\n },\r\n },\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"extended.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/types/extended.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,sCAAwB;AAExC;;;GAGG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAwB;IACtD,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE;QACJ,QAAQ,EAAE,QAAQ;QAClB,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,GAAG;QACb,kBAAkB,EAAE,IAAI;QACxB,cAAc,EAAE,kBAAkB,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;QAChD,cAAc,EAAE,CAAC,kBAAkB,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;QACjD,SAAS,EAAE;YACP,OAAO,EAAE;gBACL,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,CAAC;gBACP,aAAa,EAAE,GAAG;gBAClB,gBAAgB,EAAE,kBAAkB;gBACpC,uBAAuB,EAAE,IAAI;gBAC7B,mBAAmB,EAAE,IAAI;g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;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\nimport { Tools } from \"core/Misc/tools\";\r\n\r\n/**\r\n * The viewer's \"extended\" configuration.\r\n * This configuration defines specific objects and parameters that we think make any model look good.\r\n */\r\nexport const extendedConfiguration: ViewerConfiguration = {\r\n version: \"3.2.0\",\r\n extends: \"default\",\r\n camera: {\r\n exposure: 3.034578,\r\n fov: 0.7853981633974483,\r\n contrast: 1.6,\r\n toneMappingEnabled: true,\r\n upperBetaLimit: 1.3962634015954636 + Math.PI / 2,\r\n lowerBetaLimit: -1.4835298641951802 + Math.PI / 2,\r\n behaviors: {\r\n framing: {\r\n type: 2,\r\n mode: 0,\r\n positionScale: 0.5,\r\n defaultElevation: 0.2617993877991494,\r\n elevationReturnWaitTime: 3000,\r\n elevationReturnTime: 2000,\r\n framingTime: 500,\r\n zoomStopsAnimation: false,\r\n radiusScale: 0.866,\r\n },\r\n autoRotate: {\r\n type: 0,\r\n idleRotationWaitTime: 4000,\r\n idleRotationSpeed: 0.17453292519943295,\r\n idleRotationSpinupTime: 2500,\r\n zoomStopsAnimation: false,\r\n },\r\n bouncing: {\r\n type: 1,\r\n lowerRadiusTransitionRange: 0.05,\r\n upperRadiusTransitionRange: -0.2,\r\n },\r\n },\r\n upperRadiusLimit: 5,\r\n lowerRadiusLimit: 0.5,\r\n frameOnModelLoad: true,\r\n framingElevation: 0.2617993877991494,\r\n framingRotation: 1.5707963267948966,\r\n radius: 2,\r\n alpha: 1.5708,\r\n beta: Math.PI * 0.5 - 0.2618,\r\n wheelPrecision: 300,\r\n minZ: 0.1,\r\n maxZ: 50,\r\n fovMode: 0,\r\n pinchPrecision: 1500,\r\n panningSensibility: 3000,\r\n },\r\n lights: {\r\n light0: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 7,\r\n intensityMode: 0,\r\n radius: 0.6,\r\n range: 4.4,\r\n spotAngle: 60,\r\n diffuse: {\r\n r: 1,\r\n g: 1,\r\n b: 1,\r\n },\r\n position: {\r\n x: -2,\r\n y: 2.5,\r\n z: 2,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: true,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 1,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 60,\r\n shadowFrustumSize: 2,\r\n shadowConfig: {\r\n useBlurCloseExponentialShadowMap: true,\r\n useKernelBlur: true,\r\n blurScale: 1.0,\r\n bias: 0.001,\r\n depthScale: 50 * (10 - 1),\r\n frustumEdgeFalloff: 0,\r\n },\r\n },\r\n light1: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 7,\r\n intensityMode: 0,\r\n radius: 0.4,\r\n range: 5.8,\r\n spotAngle: 57,\r\n diffuse: {\r\n r: 1,\r\n g: 1,\r\n b: 1,\r\n },\r\n position: {\r\n x: 4,\r\n y: 3,\r\n z: -0.5,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: false,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 0.2,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 28,\r\n shadowFrustumSize: 2,\r\n },\r\n light2: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 1,\r\n intensityMode: 0,\r\n radius: 0.5,\r\n range: 6,\r\n spotAngle: 42.85,\r\n diffuse: {\r\n r: 0.8,\r\n g: 0.8,\r\n b: 0.8,\r\n },\r\n position: {\r\n x: -1,\r\n y: 3,\r\n z: -3,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: false,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 0.2,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 45,\r\n shadowFrustumSize: 2,\r\n },\r\n },\r\n ground: {\r\n shadowLevel: 0.9,\r\n texture: \"Ground_2.0-1024.png\",\r\n material: {\r\n primaryColorHighlightLevel: 0.035,\r\n primaryColorShadowLevel: 0,\r\n enableNoise: true,\r\n useRGBColor: false,\r\n maxSimultaneousLights: 1,\r\n diffuseTexture: {\r\n gammaSpace: true,\r\n },\r\n },\r\n opacity: 1,\r\n mirror: false,\r\n receiveShadows: true,\r\n size: 5,\r\n },\r\n skybox: {\r\n scale: 11,\r\n cubeTexture: {\r\n url: \"Skybox_2.0-256.dds\",\r\n },\r\n material: {\r\n primaryColorHighlightLevel: 0.03,\r\n primaryColorShadowLevel: 0.03,\r\n enableNoise: true,\r\n useRGBColor: false,\r\n reflectionTexture: {\r\n gammaSpace: true,\r\n },\r\n },\r\n },\r\n engine: {\r\n renderInBackground: true,\r\n },\r\n scene: {\r\n flags: {\r\n shadowsEnabled: true,\r\n particlesEnabled: false,\r\n collisionsEnabled: false,\r\n lightsEnabled: true,\r\n texturesEnabled: true,\r\n lensFlaresEnabled: false,\r\n proceduralTexturesEnabled: false,\r\n renderTargetsEnabled: true,\r\n spritesEnabled: false,\r\n skeletonsEnabled: true,\r\n audioEnabled: false,\r\n },\r\n defaultMaterial: {\r\n materialType: \"pbr\",\r\n reflectivityColor: {\r\n r: 0.1,\r\n g: 0.1,\r\n b: 0.1,\r\n },\r\n microSurface: 0.6,\r\n },\r\n clearColor: {\r\n r: 0.9,\r\n g: 0.9,\r\n b: 0.9,\r\n a: 1.0,\r\n },\r\n imageProcessingConfiguration: {\r\n vignetteCenterX: 0,\r\n vignetteCenterY: 0,\r\n vignetteColor: {\r\n r: 0.086,\r\n g: 0.184,\r\n b: 0.259,\r\n a: 1,\r\n },\r\n vignetteWeight: 0.855,\r\n vignetteStretch: 0.5,\r\n vignetteBlendMode: 0,\r\n vignetteCameraFov: 0.7853981633974483,\r\n isEnabled: true,\r\n colorCurves: {\r\n shadowsHue: 0,\r\n shadowsDensity: 0,\r\n shadowsSaturation: 0,\r\n shadowsExposure: 0,\r\n midtonesHue: 0,\r\n midtonesDensity: 0,\r\n midtonesExposure: 0,\r\n midtonesSaturation: 0,\r\n highlightsHue: 0,\r\n highlightsDensity: 0,\r\n highlightsExposure: 0,\r\n highlightsSaturation: 0,\r\n },\r\n },\r\n assetsRootURL: \"https://viewer.babylonjs.com/assets/environment/\",\r\n },\r\n loaderPlugins: {\r\n extendedMaterial: true,\r\n applyMaterialConfig: true,\r\n msftLod: true,\r\n telemetry: true,\r\n },\r\n model: {\r\n rotationOffsetAxis: {\r\n x: 0,\r\n y: -1,\r\n z: 0,\r\n },\r\n rotationOffsetAngle: Tools.ToRadians(210),\r\n material: {\r\n directEnabled: true,\r\n directIntensity: 0.884,\r\n emissiveIntensity: 1.04,\r\n environmentIntensity: 0.6,\r\n },\r\n entryAnimation: {\r\n scaling: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n time: 0.5,\r\n easingFunction: 4,\r\n easingMode: 1,\r\n },\r\n exitAnimation: {\r\n scaling: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n time: 0.5,\r\n easingFunction: 4,\r\n easingMode: 1,\r\n },\r\n normalize: true,\r\n castShadow: true,\r\n receiveShadows: true,\r\n },\r\n environmentMap: {\r\n texture: \"EnvMap_3.0-256.env\",\r\n rotationY: 3,\r\n tintLevel: 0.4,\r\n mainColor: {\r\n r: 0.8823529411764706,\r\n g: 0.8823529411764706,\r\n b: 0.8823529411764706,\r\n },\r\n },\r\n lab: {\r\n defaultRenderingPipelines: {\r\n bloomEnabled: true,\r\n bloomThreshold: 1.0,\r\n fxaaEnabled: true,\r\n bloomWeight: 0.05,\r\n },\r\n },\r\n};\r\n"]}
1
+ {"version":3,"file":"extended.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/extended.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,sCAAwB;AAExC;;;GAGG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAwB;IACtD,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,SAAS;IACl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,UAAU,EAAE,CAAC;SAChB;QACD,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,IAAI;KACvB;IACD,cAAc,EAAE;QACZ,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,GAAG;QACd,SAAS,EAAE;YACP,CAAC,EAAE,kBAAkB;YACrB,CAAC,EAAE,kBAAkB;YACrB,CAAC,EAAE,kBAAkB;SACxB;KACJ;IACD,GAAG,EAAE;QACD,yBAAyB,EAAE;YACvB,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,GAAG;YACnB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,IAAI;SACpB;KACJ;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\nimport { Tools } from \"core/Misc/tools\";\r\n\r\n/**\r\n * The viewer's \"extended\" configuration.\r\n * This configuration defines specific objects and parameters that we think make any model look good.\r\n */\r\nexport const extendedConfiguration: ViewerConfiguration = {\r\n version: \"3.2.0\",\r\n extends: \"default\",\r\n camera: {\r\n exposure: 3.034578,\r\n fov: 0.7853981633974483,\r\n contrast: 1.6,\r\n toneMappingEnabled: true,\r\n upperBetaLimit: 1.3962634015954636 + Math.PI / 2,\r\n lowerBetaLimit: -1.4835298641951802 + Math.PI / 2,\r\n behaviors: {\r\n framing: {\r\n type: 2,\r\n mode: 0,\r\n positionScale: 0.5,\r\n defaultElevation: 0.2617993877991494,\r\n elevationReturnWaitTime: 3000,\r\n elevationReturnTime: 2000,\r\n framingTime: 500,\r\n zoomStopsAnimation: false,\r\n radiusScale: 0.866,\r\n },\r\n autoRotate: {\r\n type: 0,\r\n idleRotationWaitTime: 4000,\r\n idleRotationSpeed: 0.17453292519943295,\r\n idleRotationSpinupTime: 2500,\r\n zoomStopsAnimation: false,\r\n },\r\n bouncing: {\r\n type: 1,\r\n lowerRadiusTransitionRange: 0.05,\r\n upperRadiusTransitionRange: -0.2,\r\n },\r\n },\r\n upperRadiusLimit: 5,\r\n lowerRadiusLimit: 0.5,\r\n frameOnModelLoad: true,\r\n framingElevation: 0.2617993877991494,\r\n framingRotation: 1.5707963267948966,\r\n radius: 2,\r\n alpha: 1.5708,\r\n beta: Math.PI * 0.5 - 0.2618,\r\n wheelPrecision: 300,\r\n minZ: 0.1,\r\n maxZ: 50,\r\n fovMode: 0,\r\n pinchPrecision: 1500,\r\n panningSensibility: 3000,\r\n },\r\n lights: {\r\n light0: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 7,\r\n intensityMode: 0,\r\n radius: 0.6,\r\n range: 4.4,\r\n spotAngle: 60,\r\n diffuse: {\r\n r: 1,\r\n g: 1,\r\n b: 1,\r\n },\r\n position: {\r\n x: -2,\r\n y: 2.5,\r\n z: 2,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: true,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 1,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 60,\r\n shadowFrustumSize: 2,\r\n shadowConfig: {\r\n useBlurCloseExponentialShadowMap: true,\r\n useKernelBlur: true,\r\n blurScale: 1.0,\r\n bias: 0.001,\r\n depthScale: 50 * (10 - 1),\r\n frustumEdgeFalloff: 0,\r\n },\r\n },\r\n light1: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 7,\r\n intensityMode: 0,\r\n radius: 0.4,\r\n range: 5.8,\r\n spotAngle: 57,\r\n diffuse: {\r\n r: 1,\r\n g: 1,\r\n b: 1,\r\n },\r\n position: {\r\n x: 4,\r\n y: 3,\r\n z: -0.5,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: false,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 0.2,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 28,\r\n shadowFrustumSize: 2,\r\n },\r\n light2: {\r\n type: 0,\r\n frustumEdgeFalloff: 0,\r\n intensity: 1,\r\n intensityMode: 0,\r\n radius: 0.5,\r\n range: 6,\r\n spotAngle: 42.85,\r\n diffuse: {\r\n r: 0.8,\r\n g: 0.8,\r\n b: 0.8,\r\n },\r\n position: {\r\n x: -1,\r\n y: 3,\r\n z: -3,\r\n },\r\n target: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n enabled: true,\r\n shadowEnabled: false,\r\n shadowBufferSize: 512,\r\n shadowMinZ: 0.2,\r\n shadowMaxZ: 10,\r\n shadowFieldOfView: 45,\r\n shadowFrustumSize: 2,\r\n },\r\n },\r\n ground: {\r\n shadowLevel: 0.9,\r\n texture: \"Ground_2.0-1024.png\",\r\n material: {\r\n primaryColorHighlightLevel: 0.035,\r\n primaryColorShadowLevel: 0,\r\n enableNoise: true,\r\n useRGBColor: false,\r\n maxSimultaneousLights: 1,\r\n diffuseTexture: {\r\n gammaSpace: true,\r\n },\r\n },\r\n opacity: 1,\r\n mirror: false,\r\n receiveShadows: true,\r\n size: 5,\r\n },\r\n skybox: {\r\n scale: 11,\r\n cubeTexture: {\r\n url: \"Skybox_2.0-256.dds\",\r\n },\r\n material: {\r\n primaryColorHighlightLevel: 0.03,\r\n primaryColorShadowLevel: 0.03,\r\n enableNoise: true,\r\n useRGBColor: false,\r\n reflectionTexture: {\r\n gammaSpace: true,\r\n },\r\n },\r\n },\r\n engine: {\r\n renderInBackground: true,\r\n },\r\n scene: {\r\n flags: {\r\n shadowsEnabled: true,\r\n particlesEnabled: false,\r\n collisionsEnabled: false,\r\n lightsEnabled: true,\r\n texturesEnabled: true,\r\n lensFlaresEnabled: false,\r\n proceduralTexturesEnabled: false,\r\n renderTargetsEnabled: true,\r\n spritesEnabled: false,\r\n skeletonsEnabled: true,\r\n audioEnabled: false,\r\n },\r\n defaultMaterial: {\r\n materialType: \"pbr\",\r\n reflectivityColor: {\r\n r: 0.1,\r\n g: 0.1,\r\n b: 0.1,\r\n },\r\n microSurface: 0.6,\r\n },\r\n clearColor: {\r\n r: 0.9,\r\n g: 0.9,\r\n b: 0.9,\r\n a: 1.0,\r\n },\r\n imageProcessingConfiguration: {\r\n vignetteCenterX: 0,\r\n vignetteCenterY: 0,\r\n vignetteColor: {\r\n r: 0.086,\r\n g: 0.184,\r\n b: 0.259,\r\n a: 1,\r\n },\r\n vignetteWeight: 0.855,\r\n vignetteStretch: 0.5,\r\n vignetteBlendMode: 0,\r\n vignetteCameraFov: 0.7853981633974483,\r\n isEnabled: true,\r\n colorCurves: {\r\n shadowsHue: 0,\r\n shadowsDensity: 0,\r\n shadowsSaturation: 0,\r\n shadowsExposure: 0,\r\n midtonesHue: 0,\r\n midtonesDensity: 0,\r\n midtonesExposure: 0,\r\n midtonesSaturation: 0,\r\n highlightsHue: 0,\r\n highlightsDensity: 0,\r\n highlightsExposure: 0,\r\n highlightsSaturation: 0,\r\n },\r\n },\r\n assetsRootURL: \"https://viewer.babylonjs.com/assets/environment/\",\r\n },\r\n loaderPlugins: {\r\n extendedMaterial: true,\r\n applyMaterialConfig: true,\r\n msftLod: true,\r\n telemetry: true,\r\n },\r\n model: {\r\n rotationOffsetAxis: {\r\n x: 0,\r\n y: -1,\r\n z: 0,\r\n },\r\n rotationOffsetAngle: Tools.ToRadians(210),\r\n material: {\r\n directEnabled: true,\r\n directIntensity: 0.884,\r\n emissiveIntensity: 1.04,\r\n environmentIntensity: 0.6,\r\n },\r\n entryAnimation: {\r\n scaling: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n time: 0.5,\r\n easingFunction: 4,\r\n easingMode: 1,\r\n },\r\n exitAnimation: {\r\n scaling: {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n },\r\n time: 0.5,\r\n easingFunction: 4,\r\n easingMode: 1,\r\n },\r\n normalize: true,\r\n castShadow: true,\r\n receiveShadows: true,\r\n },\r\n environmentMap: {\r\n texture: \"EnvMap_3.0-256.env\",\r\n rotationY: 3,\r\n tintLevel: 0.4,\r\n mainColor: {\r\n r: 0.8823529411764706,\r\n g: 0.8823529411764706,\r\n b: 0.8823529411764706,\r\n },\r\n },\r\n lab: {\r\n defaultRenderingPipelines: {\r\n bloomEnabled: true,\r\n bloomThreshold: 1.0,\r\n fxaaEnabled: true,\r\n bloomWeight: 0.05,\r\n },\r\n },\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,mCAAmC,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;;GAOG;AACH,IAAM,oBAAoB,GAAG,UAAU,KAAa;IAChD,IAAI,MAAM,GAAwB,EAAE,CAAC;IACrC,IAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,cAAc,CAAC,OAAO,CAAC,UAAC,IAAI;QACxB,QAAQ,IAAI,CAAC,IAAI,EAAE,EAAE;YACjB,KAAK,gBAAgB;gBACjB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;gBACxD,MAAM;YACV,KAAK,wBAAwB;gBACzB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,mCAAmC,CAAC,CAAC;gBAChE,MAAM;YACV,KAAK,iBAAiB;gBAClB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;gBAC1D,MAAM;YACV,KAAK,SAAS;gBACV,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,SAAS;gBACV,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,MAAM;gBACP,MAAM;YACV,KAAK,UAAU,CAAC;YAChB;gBACI,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;gBAClD,MAAM;SACb;QAED,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;SACpE;IACL,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["import { minimalConfiguration } from \"./minimal\";\r\nimport { defaultConfiguration } from \"./default\";\r\nimport { extendedConfiguration } from \"./extended\";\r\nimport type { ViewerConfiguration } from \"../configuration\";\r\nimport { shadowDirectionalLightConfiguration, shadowSpotlLightConfiguration } from \"./shadowLight\";\r\nimport { environmentMapConfiguration } from \"./environmentMap\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../../helper/index\";\r\n\r\n/**\r\n * Get the configuration type you need to use as the base for your viewer.\r\n * The types can either be a single string, or comma separated types that will extend each other. for example:\r\n *\r\n * \"default, environmentMap\" will first load the default configuration and will extend it using the environmentMap configuration.\r\n *\r\n * @param types a comma-separated string of the type(s) or configuration to load.\r\n */\r\nconst getConfigurationType = function (types: string): ViewerConfiguration {\r\n let config: ViewerConfiguration = {};\r\n const typesSeparated = types.split(\",\");\r\n typesSeparated.forEach((type) => {\r\n switch (type.trim()) {\r\n case \"environmentMap\":\r\n config = deepmerge(config, environmentMapConfiguration);\r\n break;\r\n case \"shadowDirectionalLight\":\r\n config = deepmerge(config, shadowDirectionalLightConfiguration);\r\n break;\r\n case \"shadowSpotLight\":\r\n config = deepmerge(config, shadowSpotlLightConfiguration);\r\n break;\r\n case \"default\":\r\n config = deepmerge(config, defaultConfiguration);\r\n break;\r\n case \"minimal\":\r\n config = deepmerge(config, minimalConfiguration);\r\n break;\r\n case \"none\":\r\n break;\r\n case \"extended\":\r\n default:\r\n config = deepmerge(config, extendedConfiguration);\r\n break;\r\n }\r\n\r\n if (config.extends) {\r\n config = deepmerge(config, getConfigurationType(config.extends));\r\n }\r\n });\r\n return config;\r\n};\r\n\r\nexport { getConfigurationType, defaultConfiguration, minimalConfiguration };\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,mCAAmC,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;;GAOG;AACH,IAAM,oBAAoB,GAAG,UAAU,KAAa;IAChD,IAAI,MAAM,GAAwB,EAAE,CAAC;IACrC,IAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,cAAc,CAAC,OAAO,CAAC,UAAC,IAAI;QACxB,QAAQ,IAAI,CAAC,IAAI,EAAE,EAAE;YACjB,KAAK,gBAAgB;gBACjB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;gBACxD,MAAM;YACV,KAAK,wBAAwB;gBACzB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,mCAAmC,CAAC,CAAC;gBAChE,MAAM;YACV,KAAK,iBAAiB;gBAClB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;gBAC1D,MAAM;YACV,KAAK,SAAS;gBACV,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,SAAS;gBACV,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,MAAM;gBACP,MAAM;YACV,KAAK,UAAU,CAAC;YAChB;gBACI,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;gBAClD,MAAM;SACb;QAED,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;SACpE;IACL,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["import { minimalConfiguration } from \"./minimal\";\r\nimport { defaultConfiguration } from \"./default\";\r\nimport { extendedConfiguration } from \"./extended\";\r\nimport type { ViewerConfiguration } from \"../configuration\";\r\nimport { shadowDirectionalLightConfiguration, shadowSpotlLightConfiguration } from \"./shadowLight\";\r\nimport { environmentMapConfiguration } from \"./environmentMap\";\r\n// eslint-disable-next-line import/no-internal-modules\r\nimport { deepmerge } from \"../../helper/index\";\r\n\r\n/**\r\n * Get the configuration type you need to use as the base for your viewer.\r\n * The types can either be a single string, or comma separated types that will extend each other. for example:\r\n *\r\n * \"default, environmentMap\" will first load the default configuration and will extend it using the environmentMap configuration.\r\n *\r\n * @param types a comma-separated string of the type(s) or configuration to load.\r\n */\r\nconst getConfigurationType = function (types: string): ViewerConfiguration {\r\n let config: ViewerConfiguration = {};\r\n const typesSeparated = types.split(\",\");\r\n typesSeparated.forEach((type) => {\r\n switch (type.trim()) {\r\n case \"environmentMap\":\r\n config = deepmerge(config, environmentMapConfiguration);\r\n break;\r\n case \"shadowDirectionalLight\":\r\n config = deepmerge(config, shadowDirectionalLightConfiguration);\r\n break;\r\n case \"shadowSpotLight\":\r\n config = deepmerge(config, shadowSpotlLightConfiguration);\r\n break;\r\n case \"default\":\r\n config = deepmerge(config, defaultConfiguration);\r\n break;\r\n case \"minimal\":\r\n config = deepmerge(config, minimalConfiguration);\r\n break;\r\n case \"none\":\r\n break;\r\n case \"extended\":\r\n default:\r\n config = deepmerge(config, extendedConfiguration);\r\n break;\r\n }\r\n\r\n if (config.extends) {\r\n config = deepmerge(config, getConfigurationType(config.extends));\r\n }\r\n });\r\n return config;\r\n};\r\n\r\nexport { getConfigurationType, defaultConfiguration, minimalConfiguration };\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"minimal.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/types/minimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEvI;;;GAGG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAwB;IACrD,OAAO,EAAE,KAAK;IACd,SAAS,EAAE;QACP,IAAI,EAAE;YACF,IAAI,EAAE,eAAe;SACxB;QACD,aAAa,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,OAAO,EAAE,KAAK;aACjB;SACJ;QACD,aAAa,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,eAAe,EAAE,SAAS;gBAC1B,YAAY,EAAE,OAAO;aACxB;SACJ;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,aAAa;SACtB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,OAAO;YACb,MAAM,EAAE;gBACJ,UAAU,EAAE,KAAK;gBACjB,SAAS,EAAE,OAAO;aACrB;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,KAAK;SACd;KACJ;IACD,MAAM,EAAE;QACJ,YAAY,EAAE,IAAI;KACrB;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\nimport { defaultTemplate, fillContainer, loadingScreen, defaultViewer, overlay, error, loading, close } from \"babylonjs-viewer-assets\";\r\n\r\n/**\r\n * The minimal configuration needed to make the viewer work.\r\n * Some functionalities might not work correctly (like fill-screen)\r\n */\r\nexport const minimalConfiguration: ViewerConfiguration = {\r\n version: \"0.1\",\r\n templates: {\r\n main: {\r\n html: defaultTemplate,\r\n },\r\n fillContainer: {\r\n html: fillContainer,\r\n params: {\r\n disable: false,\r\n },\r\n },\r\n loadingScreen: {\r\n html: loadingScreen,\r\n params: {\r\n backgroundColor: \"#000000\",\r\n loadingImage: loading,\r\n },\r\n },\r\n viewer: {\r\n html: defaultViewer,\r\n },\r\n overlay: {\r\n html: overlay,\r\n params: {\r\n closeImage: close,\r\n closeText: \"Close\",\r\n },\r\n },\r\n error: {\r\n html: error,\r\n },\r\n },\r\n engine: {\r\n antialiasing: true,\r\n },\r\n};\r\n"]}
1
+ {"version":3,"file":"minimal.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/minimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEvI;;;GAGG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAwB;IACrD,OAAO,EAAE,KAAK;IACd,SAAS,EAAE;QACP,IAAI,EAAE;YACF,IAAI,EAAE,eAAe;SACxB;QACD,aAAa,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,OAAO,EAAE,KAAK;aACjB;SACJ;QACD,aAAa,EAAE;YACX,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACJ,eAAe,EAAE,SAAS;gBAC1B,YAAY,EAAE,OAAO;aACxB;SACJ;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,aAAa;SACtB;QACD,OAAO,EAAE;YACL,IAAI,EAAE,OAAO;YACb,MAAM,EAAE;gBACJ,UAAU,EAAE,KAAK;gBACjB,SAAS,EAAE,OAAO;aACrB;SACJ;QACD,KAAK,EAAE;YACH,IAAI,EAAE,KAAK;SACd;KACJ;IACD,MAAM,EAAE;QACJ,YAAY,EAAE,IAAI;KACrB;CACJ,CAAC","sourcesContent":["import type { ViewerConfiguration } from \"./../configuration\";\r\nimport { defaultTemplate, fillContainer, loadingScreen, defaultViewer, overlay, error, loading, close } from \"babylonjs-viewer-assets\";\r\n\r\n/**\r\n * The minimal configuration needed to make the viewer work.\r\n * Some functionalities might not work correctly (like fill-screen)\r\n */\r\nexport const minimalConfiguration: ViewerConfiguration = {\r\n version: \"0.1\",\r\n templates: {\r\n main: {\r\n html: defaultTemplate,\r\n },\r\n fillContainer: {\r\n html: fillContainer,\r\n params: {\r\n disable: false,\r\n },\r\n },\r\n loadingScreen: {\r\n html: loadingScreen,\r\n params: {\r\n backgroundColor: \"#000000\",\r\n loadingImage: loading,\r\n },\r\n },\r\n viewer: {\r\n html: defaultViewer,\r\n },\r\n overlay: {\r\n html: overlay,\r\n params: {\r\n closeImage: close,\r\n closeText: \"Close\",\r\n },\r\n },\r\n error: {\r\n html: error,\r\n },\r\n },\r\n engine: {\r\n antialiasing: true,\r\n },\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"renderOnlyDefault.js","sourceRoot":"","sources":["../../../../../../tools/viewer/src/configuration/types/renderOnlyDefault.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,IAAM,8BAA8B,GAAG;IAC1C,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE;QACJ,SAAS,EAAE;YACP,UAAU,EAAE;gBACR,IAAI,EAAE,CAAC;aACV;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,CAAC;gBACP,kBAAkB,EAAE,IAAI;gBACxB,kBAAkB,EAAE,KAAK;aAC5B;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,CAAC;aACV;SACJ;KACJ;IACD,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACJ,cAAc,EAAE,IAAI;KACvB;IACD,MAAM,EAAE;QACJ,YAAY,EAAE,IAAI;KACrB;IACD,KAAK,EAAE,EAAE;CACZ,CAAC","sourcesContent":["/**\r\n * The render only default configuration of the viewer, including templates (canvas, overly, loading screen)\r\n * This configuration doesn't hold specific parameters, and only defines objects that are needed for the render only viewer viewer to fully work correctly.\r\n */\r\nexport const renderOnlyDefaultConfiguration = {\r\n version: \"3.2.0-alpha4\",\r\n camera: {\r\n behaviors: {\r\n autoRotate: {\r\n type: 0,\r\n },\r\n framing: {\r\n type: 2,\r\n zoomOnBoundingInfo: true,\r\n zoomStopsAnimation: false,\r\n },\r\n bouncing: {\r\n type: 1,\r\n },\r\n },\r\n },\r\n skybox: {},\r\n ground: {\r\n receiveShadows: true,\r\n },\r\n engine: {\r\n antialiasing: true,\r\n },\r\n scene: {},\r\n};\r\n"]}
1
+ {"version":3,"file":"renderOnlyDefault.js","sourceRoot":"","sources":["../../../../../tools/viewer/src/configuration/types/renderOnlyDefault.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,IAAM,8BAA8B,GAAG;IAC1C,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE;QACJ,SAAS,EAAE;YACP,UAAU,EAAE;gBACR,IAAI,EAAE,CAAC;aACV;YACD,OAAO,EAAE;gBACL,IAAI,EAAE,CAAC;gBACP,kBAAkB,EAAE,IAAI;gBACxB,kBAAkB,EAAE,KAAK;aAC5B;YACD,QAAQ,EAAE;gBACN,IAAI,EAAE,CAAC;aACV;SACJ;KACJ;IACD,MAAM,EAAE,EAAE;IACV,MAAM,EAAE;QACJ,cAAc,EAAE,IAAI;KACvB;IACD,MAAM,EAAE;QACJ,YAAY,EAAE,IAAI;KACrB;IACD,KAAK,EAAE,EAAE;CACZ,CAAC","sourcesContent":["/**\r\n * The render only default configuration of the viewer, including templates (canvas, overly, loading screen)\r\n * This configuration doesn't hold specific parameters, and only defines objects that are needed for the render only viewer viewer to fully work correctly.\r\n */\r\nexport const renderOnlyDefaultConfiguration = {\r\n version: \"3.2.0-alpha4\",\r\n camera: {\r\n behaviors: {\r\n autoRotate: {\r\n type: 0,\r\n },\r\n framing: {\r\n type: 2,\r\n zoomOnBoundingInfo: true,\r\n zoomStopsAnimation: false,\r\n },\r\n bouncing: {\r\n type: 1,\r\n },\r\n },\r\n },\r\n skybox: {},\r\n ground: {\r\n receiveShadows: true,\r\n },\r\n engine: {\r\n antialiasing: true,\r\n },\r\n scene: {},\r\n};\r\n"]}