@roomle/web-sdk 3.9.0-alpha.1 → 3.9.0-alpha.2

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 (109) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/{GLTFExporter-BqjC9LhS.mjs → GLTFExporter-yfYOtLdk.mjs} +2 -2
  3. package/lib/{GLTFExporter-BqjC9LhS.mjs.map → GLTFExporter-yfYOtLdk.mjs.map} +1 -1
  4. package/lib/RoomleCore.js +3 -3
  5. package/lib/RoomleCore.wasm +0 -0
  6. package/lib/RoomleToolsCore.wasm +0 -0
  7. package/lib/{USDZExporter-qUD2VgwK.mjs → USDZExporter-DFJQYX8l.mjs} +2 -2
  8. package/lib/{USDZExporter-qUD2VgwK.mjs.map → USDZExporter-DFJQYX8l.mjs.map} +1 -1
  9. package/lib/{api-ByHTYrQ_.mjs → api-s0Yey2rD.mjs} +12 -12
  10. package/lib/api-s0Yey2rD.mjs.map +1 -0
  11. package/lib/asset-loader.worker-A7nEeQB4.mjs.map +1 -1
  12. package/lib/{banana-for-scale-DiBCpVNM.mjs → banana-for-scale-CFY_5rk1.mjs} +4 -4
  13. package/lib/{banana-for-scale-DiBCpVNM.mjs.map → banana-for-scale-CFY_5rk1.mjs.map} +1 -1
  14. package/lib/budgeteer.sw-CQWYbQSc.mjs.map +1 -1
  15. package/lib/{common-utils-AB4Lnet3.mjs → common-utils-L3DF6Ey5.mjs} +2 -2
  16. package/lib/{common-utils-AB4Lnet3.mjs.map → common-utils-L3DF6Ey5.mjs.map} +1 -1
  17. package/lib/{component-dimensioning-LUnZnpqG.mjs → component-dimensioning-DmcHgmpq.mjs} +44 -38
  18. package/lib/component-dimensioning-DmcHgmpq.mjs.map +1 -0
  19. package/lib/{component-raycast-helper-Bl0mWPcj.mjs → component-raycast-helper-cJxdYLXm.mjs} +28 -28
  20. package/lib/{component-raycast-helper-Bl0mWPcj.mjs.map → component-raycast-helper-cJxdYLXm.mjs.map} +1 -1
  21. package/lib/configurator-CC0uDa2i.mjs +2 -0
  22. package/lib/configurator-CxsFgHxg.mjs +45 -0
  23. package/lib/{configurator-Cf6J4eOF.mjs.map → configurator-CxsFgHxg.mjs.map} +1 -1
  24. package/lib/{continuous-drawing-helper-BlRy7u2t.mjs → continuous-drawing-helper-DEmx54k_.mjs} +3 -3
  25. package/lib/{continuous-drawing-helper-BlRy7u2t.mjs.map → continuous-drawing-helper-DEmx54k_.mjs.map} +1 -1
  26. package/lib/{decorate-Bck1_lG8.mjs → decorate-C9r0zXzz.mjs} +1 -1
  27. package/lib/{decorate-Bck1_lG8.mjs.map → decorate-C9r0zXzz.mjs.map} +1 -1
  28. package/lib/{dimensioning-helper-vPhGfHd-.mjs → dimensioning-helper-BXD6AEqL.mjs} +28 -21
  29. package/lib/dimensioning-helper-BXD6AEqL.mjs.map +1 -0
  30. package/lib/dimensioning-helper-Do9jwg8T.mjs +2 -0
  31. package/lib/glb-viewer-DyHnMYi0.mjs +2 -0
  32. package/lib/{glb-viewer-B95ZWAO-.mjs → glb-viewer-I86nXb0A.mjs} +69 -69
  33. package/lib/{glb-viewer-B95ZWAO-.mjs.map → glb-viewer-I86nXb0A.mjs.map} +1 -1
  34. package/lib/{highlight-coordinator-DeB46jQq.mjs → highlight-coordinator-DvgAfvb2.mjs} +3 -3
  35. package/lib/{highlight-coordinator-DeB46jQq.mjs.map → highlight-coordinator-DvgAfvb2.mjs.map} +1 -1
  36. package/lib/{homag-intelligence-ByOCaAFW.mjs → homag-intelligence-Bt--x6_f.mjs} +17 -7
  37. package/lib/homag-intelligence-Bt--x6_f.mjs.map +1 -0
  38. package/lib/{imos-ix-poc-export-helper-Vyv-uuNs.mjs → imos-ix-poc-export-helper-C9wPB6fl.mjs} +3 -3
  39. package/lib/{imos-ix-poc-export-helper-Vyv-uuNs.mjs.map → imos-ix-poc-export-helper-C9wPB6fl.mjs.map} +1 -1
  40. package/lib/kernel-C7YDLxq8.mjs.map +1 -1
  41. package/lib/{kernel-utils-BG1uqfT_.mjs → kernel-utils-B5QlsCwn.mjs} +15 -7
  42. package/lib/kernel-utils-B5QlsCwn.mjs.map +1 -0
  43. package/lib/{layer-BfckfWZz.mjs → layer-C_JtkhdO.mjs} +1 -1
  44. package/lib/{layer-BfckfWZz.mjs.map → layer-C_JtkhdO.mjs.map} +1 -1
  45. package/lib/{main-TlUQxOeW.mjs → main-DeOPstVA.mjs} +36481 -3268
  46. package/lib/main-DeOPstVA.mjs.map +1 -0
  47. package/lib/{material-viewer-37JiZSuS.mjs → material-viewer-D8Qdq6-m.mjs} +55 -55
  48. package/lib/material-viewer-D8Qdq6-m.mjs.map +1 -0
  49. package/lib/packages-eckwotTn.mjs +4 -0
  50. package/lib/{planner-DBhjeG6D.mjs → planner-BWZr-Th2.mjs} +14 -14
  51. package/lib/{planner-DBhjeG6D.mjs.map → planner-BWZr-Th2.mjs.map} +1 -1
  52. package/lib/planner-D3jvWraY.mjs +2 -0
  53. package/lib/{plugin-system-BEZnFUyT.mjs → plugin-system-BBgoIai2.mjs} +3 -3
  54. package/lib/{plugin-system-BEZnFUyT.mjs.map → plugin-system-BBgoIai2.mjs.map} +1 -1
  55. package/lib/roomle-headless-setup-CMK-quZI.mjs.map +1 -1
  56. package/lib/roomle-headless.d.ts +212 -32
  57. package/lib/roomle-headless.js +42 -41
  58. package/lib/roomle-headless.js.map +1 -1
  59. package/lib/{roomle-renderer-BgT28pfp.mjs → roomle-renderer-CkSFbpmg.mjs} +2 -2
  60. package/lib/{roomle-renderer-BgT28pfp.mjs.map → roomle-renderer-CkSFbpmg.mjs.map} +1 -1
  61. package/lib/roomle-sdk.d.ts +212 -32
  62. package/lib/roomle-sdk.js +8 -7
  63. package/lib/{roomle-webgpu-renderer-CdD3cYxN.mjs → roomle-webgpu-renderer-Cs4eLEwf.mjs} +426 -393
  64. package/lib/roomle-webgpu-renderer-Cs4eLEwf.mjs.map +1 -0
  65. package/lib/{scene-renderer-Bdl7umAf.mjs → scene-renderer-4zk6BXsR.mjs} +228 -228
  66. package/lib/{scene-renderer-Bdl7umAf.mjs.map → scene-renderer-4zk6BXsR.mjs.map} +1 -1
  67. package/lib/{script-loader-D3Cbc5BY.mjs → script-loader-DSL6zJat.mjs} +9 -9
  68. package/lib/{script-loader-D3Cbc5BY.mjs.map → script-loader-DSL6zJat.mjs.map} +1 -1
  69. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  70. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +7 -3
  71. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js +2 -1
  72. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +1 -1
  73. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +35 -2
  74. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js +12 -1
  75. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  77. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +3 -3
  78. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  79. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  80. package/lib/{stats-helper-BvDfWWfq.mjs → stats-helper-DyRFKnMs.mjs} +3 -3
  81. package/lib/{stats-helper-BvDfWWfq.mjs.map → stats-helper-DyRFKnMs.mjs.map} +1 -1
  82. package/lib/{three.core-K1JzUaep.mjs → three.core-DNErG1F6.mjs} +1 -1
  83. package/lib/{three.core-K1JzUaep.mjs.map → three.core-DNErG1F6.mjs.map} +1 -1
  84. package/lib/{three.module-Q2K9uyhi.mjs → three.module-BZkESKo3.mjs} +2 -2
  85. package/lib/{three.module-Q2K9uyhi.mjs.map → three.module-BZkESKo3.mjs.map} +1 -1
  86. package/lib/{three.webgpu-7v7o6Pxs.mjs → three.webgpu-C8myBXe1.mjs} +2 -2
  87. package/lib/{three.webgpu-7v7o6Pxs.mjs.map → three.webgpu-C8myBXe1.mjs.map} +1 -1
  88. package/lib/three.webgpu-WIkDzwXU.mjs +3 -0
  89. package/lib/{threejs-utils-BzXU2M3w.mjs → threejs-utils-fEhH05zP.mjs} +103 -87
  90. package/lib/threejs-utils-fEhH05zP.mjs.map +1 -0
  91. package/lib/{tools-core-CUTTHUku.mjs → tools-core-Bf4_WCg8.mjs} +5 -5
  92. package/lib/{tools-core-CUTTHUku.mjs.map → tools-core-Bf4_WCg8.mjs.map} +1 -1
  93. package/package.json +5 -2
  94. package/lib/api-ByHTYrQ_.mjs.map +0 -1
  95. package/lib/component-dimensioning-LUnZnpqG.mjs.map +0 -1
  96. package/lib/configurator-Cf6J4eOF.mjs +0 -45
  97. package/lib/configurator-D5FuWg5f.mjs +0 -2
  98. package/lib/dimensioning-helper-5xsc6I7Y.mjs +0 -2
  99. package/lib/dimensioning-helper-vPhGfHd-.mjs.map +0 -1
  100. package/lib/glb-viewer-C-IBj6p6.mjs +0 -2
  101. package/lib/homag-intelligence-ByOCaAFW.mjs.map +0 -1
  102. package/lib/kernel-utils-BG1uqfT_.mjs.map +0 -1
  103. package/lib/main-TlUQxOeW.mjs.map +0 -1
  104. package/lib/material-viewer-37JiZSuS.mjs.map +0 -1
  105. package/lib/packages-BPyzoYeC.mjs +0 -4
  106. package/lib/planner-BBUr8xHt.mjs +0 -2
  107. package/lib/roomle-webgpu-renderer-CdD3cYxN.mjs.map +0 -1
  108. package/lib/three.webgpu-ChguPx4k.mjs +0 -3
  109. package/lib/threejs-utils-BzXU2M3w.mjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./configurator-CxsFgHxg.mjs";
2
+ export { e as Configurator };
@@ -0,0 +1,45 @@
1
+ import { E as e, O as t, S as n, X as r, Y as i, Z as a, at as o, d as s, k as c, n as l, nt as u, ot as d, r as f, rt as p, t as m, w as h } from "./main-DeOPstVA.mjs";
2
+ import { t as g } from "./script-loader-DSL6zJat.mjs";
3
+ import { t as _ } from "./component-raycast-helper-cJxdYLXm.mjs";
4
+ //#region packages/configurator-core/src/utils/injectables.ts
5
+ var v = [
6
+ new p("logger", a),
7
+ new p("rapi-access", o),
8
+ new p("script-loader", g),
9
+ new p("camera-control-3d", h),
10
+ new p("camera-control", e),
11
+ new p("global-init-data", i),
12
+ new p("data-syncer", r),
13
+ new p("configurator-scene-manager", s, u.CONTEXT),
14
+ new p("configurator-view-model", n, u.CONTEXT),
15
+ new p("component-raycast-helper", _, u.GLOBAL)
16
+ ], y = class extends l {
17
+ setupDependencies() {
18
+ f.setup(v), this.lookup("planner-kernel-access", this._context).init(c.CONFIGURATOR), this.lookup("rapi-access", this._context), this.lookup("script-loader", this._context), this.lookup("logger", this._context);
19
+ }
20
+ cleanUpGlobals() {
21
+ delete window.RoomleConfigurator;
22
+ }
23
+ cleanUpDependencies() {
24
+ let e = this.lookup("script-loader"), t = this.lookup("rapi-access");
25
+ this.lookup("dom-helper");
26
+ let n = this.lookup("configurator-scene-manager");
27
+ e && e.cleanUp(), t && t.cleanUp(), n && n.cleanUp();
28
+ }
29
+ setupGlobals(e) {
30
+ d.init(e ?? {});
31
+ }
32
+ getApi() {
33
+ return this._configurator;
34
+ }
35
+ async bootFinished() {
36
+ this._configurator = new t(this._context), this._configurator.getMain = () => this, window.RoomleConfigurator || (window.RoomleConfigurator = this._configurator);
37
+ }
38
+ getContextName() {
39
+ return m.CONFIGURATOR;
40
+ }
41
+ };
42
+ //#endregion
43
+ export { y as t };
44
+
45
+ //# sourceMappingURL=configurator-CxsFgHxg.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"configurator-Cf6J4eOF.mjs","names":[],"sources":["../../packages/configurator-core/src/utils/injectables.ts","../../packages/configurator-core/src/configurator.ts"],"sourcesContent":["import CameraControl from '../../../common-core/src/cameracontrol/camera-control';\nimport CameraControl3D from '../../../common-core/src/cameracontrol/camera-control-3d';\nimport ScriptLoader from '../../../common-core/src/script-loader';\nimport { RapiAccess } from '../../../common-core/src/rapi-access';\nimport Logger from '../../../common-core/src/logger';\nimport DataSyncer from '../../../common-core/src/services/data-syncer';\nimport {\n DependencyInjectionAssignment,\n DI_TYPE,\n} from '../../../common-core/src/di/container';\nimport ComponentRaycastHelper from './component-raycast-helper';\nimport ConfiguratorSceneManager from '../webgl/configurator-scene-manager';\nimport ConfiguratorViewModel from '../../../common-core/src/view-model/configurator-view-model';\nimport GlobalInitData from '../../../common-core/src/utils/global-init-data';\n\nexport const INJECTABLES: DependencyInjectionAssignment[] = [\n new DependencyInjectionAssignment('logger', Logger),\n new DependencyInjectionAssignment('rapi-access', RapiAccess),\n new DependencyInjectionAssignment('script-loader', ScriptLoader),\n new DependencyInjectionAssignment('camera-control-3d', CameraControl3D),\n new DependencyInjectionAssignment('camera-control', CameraControl),\n new DependencyInjectionAssignment('global-init-data', GlobalInitData),\n new DependencyInjectionAssignment('data-syncer', DataSyncer),\n new DependencyInjectionAssignment(\n 'configurator-scene-manager',\n ConfiguratorSceneManager,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment(\n 'configurator-view-model',\n ConfiguratorViewModel,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment(\n 'component-raycast-helper',\n ComponentRaycastHelper,\n DI_TYPE.GLOBAL,\n ),\n];\n","import './utils/global-definitions';\nimport { Main, BASE_CONTEXT } from '../../common-core/src/main';\nimport type { AppState } from '../../common-core/src/utils/app-context';\nimport ConfiguratorAppContext from '../../common-core/src/utils/app-context';\nimport { INJECTABLES } from './utils/injectables';\nimport RoomleDependencyInjection from '../../common-core/src/di/roomle-dependency-injection';\nimport type ScriptLoader from '../../common-core/src/script-loader';\nimport { type RapiAccess } from '../../common-core/src/rapi-access';\nimport type Logger from '../../common-core/src/logger';\nimport type DomHelper from '../../common-core/src/utils/dom-helper';\nimport type ConfiguratorSceneManager from './webgl/configurator-scene-manager';\nimport { RoomleConfigurator } from './roomle-configurator';\nimport type PlannerKernelAccess from '../../planner-core/src/services/planner-kernel-access';\nimport { KERNEL_TYPE } from '../../common-core/src/services/common-kernel-access';\n\nexport class Configurator extends Main {\n private _configurator: RoomleConfigurator;\n\n protected setupDependencies(): void {\n RoomleDependencyInjection.setup(INJECTABLES);\n // This needs to be done so that subscribe to events is done\n const plannerKernelAccess = this.lookup<PlannerKernelAccess>(\n 'planner-kernel-access',\n this._context,\n );\n plannerKernelAccess.init(KERNEL_TYPE.CONFIGURATOR);\n this.lookup<RapiAccess>('rapi-access', this._context);\n this.lookup<ScriptLoader>('script-loader', this._context);\n this.lookup<Logger>('logger', this._context);\n }\n\n protected cleanUpGlobals(): void {\n delete window.RoomleConfigurator;\n }\n\n protected cleanUpDependencies(): void {\n const scriptLoader = this.lookup<ScriptLoader>('script-loader');\n const rapiAccess = this.lookup<RapiAccess>('rapi-access');\n const domHelper = this.lookup<DomHelper>('dom-helper');\n const sceneManager = this.lookup<ConfiguratorSceneManager>(\n 'configurator-scene-manager',\n );\n\n if (scriptLoader) {\n scriptLoader.cleanUp();\n }\n\n if (rapiAccess) {\n rapiAccess.cleanUp();\n }\n\n if (domHelper) {\n //domHelper.cleanUp();\n }\n\n if (sceneManager) {\n sceneManager.cleanUp();\n }\n }\n\n /** Currently the only module that uses AppState — all others ignore the parameter. */\n protected setupGlobals(appState?: AppState): void {\n ConfiguratorAppContext.init(appState ?? {});\n }\n\n public getApi(): RoomleConfigurator {\n return this._configurator;\n }\n\n protected async bootFinished(): Promise<void> {\n this._configurator = new RoomleConfigurator(this._context);\n this._configurator.getMain = () => {\n return this;\n };\n\n if (!window.RoomleConfigurator) {\n window.RoomleConfigurator = this._configurator;\n }\n }\n\n protected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"configurator-CxsFgHxg.mjs","names":[],"sources":["../../packages/configurator-core/src/utils/injectables.ts","../../packages/configurator-core/src/configurator.ts"],"sourcesContent":["import CameraControl from '../../../common-core/src/cameracontrol/camera-control';\nimport CameraControl3D from '../../../common-core/src/cameracontrol/camera-control-3d';\nimport ScriptLoader from '../../../common-core/src/script-loader';\nimport { RapiAccess } from '../../../common-core/src/rapi-access';\nimport Logger from '../../../common-core/src/logger';\nimport DataSyncer from '../../../common-core/src/services/data-syncer';\nimport {\n DependencyInjectionAssignment,\n DI_TYPE,\n} from '../../../common-core/src/di/container';\nimport ComponentRaycastHelper from './component-raycast-helper';\nimport ConfiguratorSceneManager from '../webgl/configurator-scene-manager';\nimport ConfiguratorViewModel from '../../../common-core/src/view-model/configurator-view-model';\nimport GlobalInitData from '../../../common-core/src/utils/global-init-data';\n\nexport const INJECTABLES: DependencyInjectionAssignment[] = [\n new DependencyInjectionAssignment('logger', Logger),\n new DependencyInjectionAssignment('rapi-access', RapiAccess),\n new DependencyInjectionAssignment('script-loader', ScriptLoader),\n new DependencyInjectionAssignment('camera-control-3d', CameraControl3D),\n new DependencyInjectionAssignment('camera-control', CameraControl),\n new DependencyInjectionAssignment('global-init-data', GlobalInitData),\n new DependencyInjectionAssignment('data-syncer', DataSyncer),\n new DependencyInjectionAssignment(\n 'configurator-scene-manager',\n ConfiguratorSceneManager,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment(\n 'configurator-view-model',\n ConfiguratorViewModel,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment(\n 'component-raycast-helper',\n ComponentRaycastHelper,\n DI_TYPE.GLOBAL,\n ),\n];\n","import './utils/global-definitions';\nimport { Main, BASE_CONTEXT } from '../../common-core/src/main';\nimport type { AppState } from '../../common-core/src/utils/app-context';\nimport ConfiguratorAppContext from '../../common-core/src/utils/app-context';\nimport { INJECTABLES } from './utils/injectables';\nimport RoomleDependencyInjection from '../../common-core/src/di/roomle-dependency-injection';\nimport type ScriptLoader from '../../common-core/src/script-loader';\nimport { type RapiAccess } from '../../common-core/src/rapi-access';\nimport type Logger from '../../common-core/src/logger';\nimport type DomHelper from '../../common-core/src/utils/dom-helper';\nimport type ConfiguratorSceneManager from './webgl/configurator-scene-manager';\nimport { RoomleConfigurator } from './roomle-configurator';\nimport type PlannerKernelAccess from '../../planner-core/src/services/planner-kernel-access';\nimport { KERNEL_TYPE } from '../../common-core/src/services/common-kernel-access';\n\nexport class Configurator extends Main {\n private _configurator: RoomleConfigurator;\n\n protected setupDependencies(): void {\n RoomleDependencyInjection.setup(INJECTABLES);\n // This needs to be done so that subscribe to events is done\n const plannerKernelAccess = this.lookup<PlannerKernelAccess>(\n 'planner-kernel-access',\n this._context,\n );\n plannerKernelAccess.init(KERNEL_TYPE.CONFIGURATOR);\n this.lookup<RapiAccess>('rapi-access', this._context);\n this.lookup<ScriptLoader>('script-loader', this._context);\n this.lookup<Logger>('logger', this._context);\n }\n\n protected cleanUpGlobals(): void {\n delete window.RoomleConfigurator;\n }\n\n protected cleanUpDependencies(): void {\n const scriptLoader = this.lookup<ScriptLoader>('script-loader');\n const rapiAccess = this.lookup<RapiAccess>('rapi-access');\n const domHelper = this.lookup<DomHelper>('dom-helper');\n const sceneManager = this.lookup<ConfiguratorSceneManager>(\n 'configurator-scene-manager',\n );\n\n if (scriptLoader) {\n scriptLoader.cleanUp();\n }\n\n if (rapiAccess) {\n rapiAccess.cleanUp();\n }\n\n if (domHelper) {\n //domHelper.cleanUp();\n }\n\n if (sceneManager) {\n sceneManager.cleanUp();\n }\n }\n\n /** Currently the only module that uses AppState — all others ignore the parameter. */\n protected setupGlobals(appState?: AppState): void {\n ConfiguratorAppContext.init(appState ?? {});\n }\n\n public getApi(): RoomleConfigurator {\n return this._configurator;\n }\n\n protected async bootFinished(): Promise<void> {\n this._configurator = new RoomleConfigurator(this._context);\n this._configurator.getMain = () => {\n return this;\n };\n\n if (!window.RoomleConfigurator) {\n window.RoomleConfigurator = this._configurator;\n }\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,5 +1,5 @@
1
- import { Pr as e, cn as t, sn as n } from "./three.core-K1JzUaep.mjs";
2
- import { a as r } from "./kernel-utils-BG1uqfT_.mjs";
1
+ import { Pr as e, cn as t, sn as n } from "./three.core-DNErG1F6.mjs";
2
+ import { a as r } from "./kernel-utils-B5QlsCwn.mjs";
3
3
  //#region packages/planner-core/src/webgl/continuous-drawing-helper.ts
4
4
  var i = class {
5
5
  constructor() {
@@ -39,4 +39,4 @@ var i = class {
39
39
  //#endregion
40
40
  export { i as default };
41
41
 
42
- //# sourceMappingURL=continuous-drawing-helper-BlRy7u2t.mjs.map
42
+ //# sourceMappingURL=continuous-drawing-helper-DEmx54k_.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"continuous-drawing-helper-BlRy7u2t.mjs","names":[],"sources":["../../packages/planner-core/src/webgl/continuous-drawing-helper.ts"],"sourcesContent":["import type { ContinuousDrawingManager } from '../../../typings/planner';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport type { Group } from 'three';\nimport { DoubleSide, Mesh, MeshBasicMaterial, RingGeometry } from 'three';\n\nexport default class ContinuousDrawingHelper {\n private _drawingGroup: Group;\n private _continuousDrawingManager: ContinuousDrawingManager;\n\n private _circleMesh: Mesh | null = null;\n\n private _kernelZoomFactor: number;\n\n private _currentInnerRadius: number = 0;\n\n init(\n drawingGroup: Group,\n continuousDrawingManager: ContinuousDrawingManager,\n kernelZoomFactor: number,\n ) {\n this._drawingGroup = drawingGroup;\n this._continuousDrawingManager = continuousDrawingManager;\n this._kernelZoomFactor = kernelZoomFactor;\n this.update();\n }\n\n public update() {\n this._initCircle();\n this._updateCircle();\n }\n\n private _initCircle() {\n if (this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n const outerRadius = innerRadius + innerRadius / 50;\n\n const innerRingGeometry = new RingGeometry(innerRadius, outerRadius, 32);\n const innerRingMaterial = new MeshBasicMaterial({\n color: 0x999999,\n side: DoubleSide,\n });\n this._circleMesh = new Mesh(innerRingGeometry, innerRingMaterial);\n this._circleMesh.name = 'Circle';\n this._circleMesh.rotation.set(Math.PI / 2, 0, 0);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._drawingGroup.add(this._circleMesh);\n }\n\n private _updateCircle() {\n if (!this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n if (innerRadius !== this._currentInnerRadius) {\n const outerRadius = innerRadius + innerRadius / 50;\n\n this._circleMesh.geometry = new RingGeometry(\n innerRadius,\n outerRadius,\n 32,\n );\n }\n\n const position = convertToTHREE(\n this._continuousDrawingManager.getStartPoint(),\n );\n position.y = 5;\n\n this._circleMesh.position.copy(position);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._currentInnerRadius = innerRadius;\n }\n\n public setKernelZoomFactor(kernelZoomFactor: number) {\n this._kernelZoomFactor = kernelZoomFactor;\n }\n\n public endDrawing() {\n if (this._circleMesh) {\n this._drawingGroup.remove(this._circleMesh);\n }\n this._circleMesh = null;\n }\n}\n"],"mappings":";;;AAKA,IAAqB,IAArB,MAA6C;;qBAIR,iCAIG;;CAEtC,KACE,GACA,GACA,GACA;AAIA,EAHA,KAAK,gBAAgB,GACrB,KAAK,4BAA4B,GACjC,KAAK,oBAAoB,GACzB,KAAK,QAAQ;;CAGf,SAAgB;AAEd,EADA,KAAK,aAAa,EAClB,KAAK,eAAe;;CAGtB,cAAsB;AACpB,MAAI,KAAK,YACP;EAGF,IAAM,IAAc,KAAK,KAAK,oBAAoB;AAclD,EANA,KAAK,cAAc,IAAI,EALG,IAAI,EAAa,GAFvB,IAAc,IAAc,IAEqB,GAAG,EAC9C,IAAI,EAAkB;GAC9C,OAAO;GACP,MAAA;GACD,CAAC,CAC+D,EACjE,KAAK,YAAY,OAAO,UACxB,KAAK,YAAY,SAAS,IAAI,KAAK,KAAK,GAAG,GAAG,EAAE,EAChD,KAAK,YAAY,UACf,KAAK,0BAA0B,kBAAkB,EAEnD,KAAK,cAAc,IAAI,KAAK,YAAY;;CAG1C,gBAAwB;AACtB,MAAI,CAAC,KAAK,YACR;EAGF,IAAM,IAAc,KAAK,KAAK,oBAAoB;AAClD,MAAI,MAAgB,KAAK,qBAAqB;GAC5C,IAAM,IAAc,IAAc,IAAc;AAEhD,QAAK,YAAY,WAAW,IAAI,EAC9B,GACA,GACA,GACD;;EAGH,IAAM,IAAW,EACf,KAAK,0BAA0B,eAAe,CAC/C;AAOD,EANA,EAAS,IAAI,GAEb,KAAK,YAAY,SAAS,KAAK,EAAS,EACxC,KAAK,YAAY,UACf,KAAK,0BAA0B,kBAAkB,EAEnD,KAAK,sBAAsB;;CAG7B,oBAA2B,GAA0B;AACnD,OAAK,oBAAoB;;CAG3B,aAAoB;AAIlB,EAHI,KAAK,eACP,KAAK,cAAc,OAAO,KAAK,YAAY,EAE7C,KAAK,cAAc"}
1
+ {"version":3,"file":"continuous-drawing-helper-DEmx54k_.mjs","names":[],"sources":["../../packages/planner-core/src/webgl/continuous-drawing-helper.ts"],"sourcesContent":["import type { ContinuousDrawingManager } from '../../../typings/planner';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport type { Group } from 'three';\nimport { DoubleSide, Mesh, MeshBasicMaterial, RingGeometry } from 'three';\n\nexport default class ContinuousDrawingHelper {\n private _drawingGroup: Group;\n private _continuousDrawingManager: ContinuousDrawingManager;\n\n private _circleMesh: Mesh | null = null;\n\n private _kernelZoomFactor: number;\n\n private _currentInnerRadius: number = 0;\n\n init(\n drawingGroup: Group,\n continuousDrawingManager: ContinuousDrawingManager,\n kernelZoomFactor: number,\n ) {\n this._drawingGroup = drawingGroup;\n this._continuousDrawingManager = continuousDrawingManager;\n this._kernelZoomFactor = kernelZoomFactor;\n this.update();\n }\n\n public update() {\n this._initCircle();\n this._updateCircle();\n }\n\n private _initCircle() {\n if (this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n const outerRadius = innerRadius + innerRadius / 50;\n\n const innerRingGeometry = new RingGeometry(innerRadius, outerRadius, 32);\n const innerRingMaterial = new MeshBasicMaterial({\n color: 0x999999,\n side: DoubleSide,\n });\n this._circleMesh = new Mesh(innerRingGeometry, innerRingMaterial);\n this._circleMesh.name = 'Circle';\n this._circleMesh.rotation.set(Math.PI / 2, 0, 0);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._drawingGroup.add(this._circleMesh);\n }\n\n private _updateCircle() {\n if (!this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n if (innerRadius !== this._currentInnerRadius) {\n const outerRadius = innerRadius + innerRadius / 50;\n\n this._circleMesh.geometry = new RingGeometry(\n innerRadius,\n outerRadius,\n 32,\n );\n }\n\n const position = convertToTHREE(\n this._continuousDrawingManager.getStartPoint(),\n );\n position.y = 5;\n\n this._circleMesh.position.copy(position);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._currentInnerRadius = innerRadius;\n }\n\n public setKernelZoomFactor(kernelZoomFactor: number) {\n this._kernelZoomFactor = kernelZoomFactor;\n }\n\n public endDrawing() {\n if (this._circleMesh) {\n this._drawingGroup.remove(this._circleMesh);\n }\n this._circleMesh = null;\n }\n}\n"],"mappings":";;;AAKA,IAAqB,IAArB,MAA6C;;qBAIR,iCAIG;;CAEtC,KACE,GACA,GACA,GACA;AAIA,EAHA,KAAK,gBAAgB,GACrB,KAAK,4BAA4B,GACjC,KAAK,oBAAoB,GACzB,KAAK,QAAQ;;CAGf,SAAgB;AAEd,EADA,KAAK,aAAa,EAClB,KAAK,eAAe;;CAGtB,cAAsB;AACpB,MAAI,KAAK,YACP;EAGF,IAAM,IAAc,KAAK,KAAK,oBAAoB;AAclD,EANA,KAAK,cAAc,IAAI,EALG,IAAI,EAAa,GAFvB,IAAc,IAAc,IAEqB,GAAG,EAC9C,IAAI,EAAkB;GAC9C,OAAO;GACP,MAAA;GACD,CAAC,CAC+D,EACjE,KAAK,YAAY,OAAO,UACxB,KAAK,YAAY,SAAS,IAAI,KAAK,KAAK,GAAG,GAAG,EAAE,EAChD,KAAK,YAAY,UACf,KAAK,0BAA0B,kBAAkB,EAEnD,KAAK,cAAc,IAAI,KAAK,YAAY;;CAG1C,gBAAwB;AACtB,MAAI,CAAC,KAAK,YACR;EAGF,IAAM,IAAc,KAAK,KAAK,oBAAoB;AAClD,MAAI,MAAgB,KAAK,qBAAqB;GAC5C,IAAM,IAAc,IAAc,IAAc;AAEhD,QAAK,YAAY,WAAW,IAAI,EAC9B,GACA,GACA,GACD;;EAGH,IAAM,IAAW,EACf,KAAK,0BAA0B,eAAe,CAC/C;AAOD,EANA,EAAS,IAAI,GAEb,KAAK,YAAY,SAAS,KAAK,EAAS,EACxC,KAAK,YAAY,UACf,KAAK,0BAA0B,kBAAkB,EAEnD,KAAK,sBAAsB;;CAG7B,oBAA2B,GAA0B;AACnD,OAAK,oBAAoB;;CAG3B,aAAoB;AAIlB,EAHI,KAAK,eACP,KAAK,cAAc,OAAO,KAAK,YAAY,EAE7C,KAAK,cAAc"}
@@ -32,4 +32,4 @@ function r(e, t, n, r) {
32
32
  //#endregion
33
33
  export { n, t as r, r as t };
34
34
 
35
- //# sourceMappingURL=decorate-Bck1_lG8.mjs.map
35
+ //# sourceMappingURL=decorate-C9r0zXzz.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorate-Bck1_lG8.mjs","names":[],"sources":["../../packages/common-core/src/utils/string-utils.ts","../../packages/common-core/src/di/inject.ts"],"sourcesContent":["/*\n * Lifted from https://github.com/shahata/dasherize/blob/master/index.js\n */\nexport const dashCase = function (str: string) {\n if (str.startsWith('_')) {\n str = str.substr(1);\n }\n return str.replace(\n /[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,\n function (s: string, i: number) {\n return (i > 0 ? '-' : '') + s.toLowerCase();\n },\n );\n};\n","import './global-definitions';\nimport { dashCase } from '../utils/string-utils';\n\nexport default function inject(target: any, propertyName: string): void {\n const propertyCache = Symbol('property-cache');\n const warnedCache = Symbol('warned-cache');\n Object.defineProperty(target, propertyName, {\n get(this: any) {\n if (!this[propertyCache]) {\n // eslint-disable-next-line\n const instance = window.__RML__DI__?.lookup(\n dashCase(propertyName),\n this._creator_,\n );\n if (!instance) {\n // Only warn once per instance to avoid repeated errors from render loops\n // or other recurring access patterns (e.g. after test teardown).\n if (!this[warnedCache]) {\n this[warnedCache] = true;\n console.error(\n 'Dependency ' +\n dashCase(propertyName) +\n ' not found! Add dependency to /utils/injectables.ts',\n );\n }\n } else {\n this[propertyCache] = instance;\n }\n }\n return this[propertyCache];\n },\n });\n}\n"],"mappings":";AAGA,IAAa,IAAW,SAAU,GAAa;AAI7C,QAHI,EAAI,WAAW,IAAI,KACrB,IAAM,EAAI,OAAO,EAAE,GAEd,EAAI,QACT,gDACA,SAAU,GAAW,GAAW;AAC9B,UAAQ,IAAI,IAAI,MAAM,MAAM,EAAE,aAAa;GAE9C;;;;ACTH,SAAwB,EAAO,GAAa,GAA4B;CACtE,IAAM,IAAgB,OAAO,iBAAiB,EACxC,IAAc,OAAO,eAAe;AAC1C,QAAO,eAAe,GAAQ,GAAc,EAC1C,MAAe;AACb,MAAI,CAAC,KAAK,IAAgB;GAExB,IAAM,IAAW,OAAO,aAAa,OACnC,EAAS,EAAa,EACtB,KAAK,UACN;AACD,GAAK,IAYH,KAAK,KAAiB,IATjB,KAAK,OACR,KAAK,KAAe,IACpB,QAAQ,MACN,gBACE,EAAS,EAAa,GACtB,sDACH;;AAMP,SAAO,KAAK;IAEf,CAAC"}
1
+ {"version":3,"file":"decorate-C9r0zXzz.mjs","names":[],"sources":["../../packages/common-core/src/utils/string-utils.ts","../../packages/common-core/src/di/inject.ts"],"sourcesContent":["/*\n * Lifted from https://github.com/shahata/dasherize/blob/master/index.js\n */\nexport const dashCase = function (str: string) {\n if (str.startsWith('_')) {\n str = str.substr(1);\n }\n return str.replace(\n /[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,\n function (s: string, i: number) {\n return (i > 0 ? '-' : '') + s.toLowerCase();\n },\n );\n};\n","import './global-definitions';\nimport { dashCase } from '../utils/string-utils';\n\nexport default function inject(target: any, propertyName: string): void {\n const propertyCache = Symbol('property-cache');\n const warnedCache = Symbol('warned-cache');\n Object.defineProperty(target, propertyName, {\n get(this: any) {\n if (!this[propertyCache]) {\n // eslint-disable-next-line\n const instance = window.__RML__DI__?.lookup(\n dashCase(propertyName),\n this._creator_,\n );\n if (!instance) {\n // Only warn once per instance to avoid repeated errors from render loops\n // or other recurring access patterns (e.g. after test teardown).\n if (!this[warnedCache]) {\n this[warnedCache] = true;\n console.error(\n 'Dependency ' +\n dashCase(propertyName) +\n ' not found! Add dependency to /utils/injectables.ts',\n );\n }\n } else {\n this[propertyCache] = instance;\n }\n }\n return this[propertyCache];\n },\n });\n}\n"],"mappings":";AAGA,IAAa,IAAW,SAAU,GAAa;AAI7C,QAHI,EAAI,WAAW,IAAI,KACrB,IAAM,EAAI,OAAO,EAAE,GAEd,EAAI,QACT,gDACA,SAAU,GAAW,GAAW;AAC9B,UAAQ,IAAI,IAAI,MAAM,MAAM,EAAE,aAAa;GAE9C;;;;ACTH,SAAwB,EAAO,GAAa,GAA4B;CACtE,IAAM,IAAgB,OAAO,iBAAiB,EACxC,IAAc,OAAO,eAAe;AAC1C,QAAO,eAAe,GAAQ,GAAc,EAC1C,MAAe;AACb,MAAI,CAAC,KAAK,IAAgB;GAExB,IAAM,IAAW,OAAO,aAAa,OACnC,EAAS,EAAa,EACtB,KAAK,UACN;AACD,GAAK,IAYH,KAAK,KAAiB,IATjB,KAAK,OACR,KAAK,KAAe,IACpB,QAAQ,MACN,gBACE,EAAS,EAAa,GACtB,sDACH;;AAMP,SAAO,KAAK;IAEf,CAAC"}
@@ -1,7 +1,7 @@
1
- import { Bt as e, Rt as t, bi as n, d as r, m as i, on as a, p as o, pt as s, wn as c, xi as l, zt as u } from "./three.core-K1JzUaep.mjs";
2
- import { n as d, r as f, t as p } from "./decorate-Bck1_lG8.mjs";
3
- import { a as m } from "./kernel-utils-BG1uqfT_.mjs";
4
- import { t as h } from "./layer-BfckfWZz.mjs";
1
+ import { Bt as e, Rt as t, bi as n, d as r, m as i, on as a, p as o, pt as s, wn as c, xi as l, zt as u } from "./three.core-DNErG1F6.mjs";
2
+ import { n as d, r as f, t as p } from "./decorate-C9r0zXzz.mjs";
3
+ import { a as m } from "./kernel-utils-B5QlsCwn.mjs";
4
+ import { t as h } from "./layer-C_JtkhdO.mjs";
5
5
  //#region packages/common-core/src/async-guard.ts
6
6
  var g = class {
7
7
  constructor(e) {
@@ -82,17 +82,17 @@ var g = class {
82
82
  for (let e = 0, r = t.length; e < r; e++) t[e].element.style.zIndex = n - e;
83
83
  }
84
84
  }
85
- }, w = "dimensioning", T = .08, E = 1.2, D = .03, O = 3618615;
86
- function k(e) {
87
- return new A(e);
85
+ }, w = "dimensioning", T = .08, E = 1.2, D = .03, O = (e, t) => (e = Math.abs(e), e < t * .05 && t > 3), k = 3618615;
86
+ function A(e) {
87
+ return new j(e);
88
88
  }
89
- var A = class {
89
+ var j = class {
90
90
  constructor(t) {
91
91
  this._cameraPosition = new l(), this._initialized = new g(), this._enabled = !1, this._dimensionsVisible = !1, this._dimensionLineGroup = new s(), this._creator_ = t, this._lineMaterial = new e({
92
- color: O,
92
+ color: k,
93
93
  linewidth: 2
94
94
  }), this._mainLineMaterial = new e({
95
- color: O,
95
+ color: k,
96
96
  linewidth: .001,
97
97
  transparent: !0,
98
98
  opacity: 1
@@ -132,7 +132,7 @@ var A = class {
132
132
  let i = document.createElement("span");
133
133
  i.classList.add("dimension-label__value"), i.innerHTML = t, r.appendChild(i);
134
134
  let a = new _(r), o = this._dimensionLineGroup.worldToLocal(n);
135
- a.position.copy(o), e.add(a);
135
+ return a.position.copy(o), e.add(a), a;
136
136
  }
137
137
  _getWidthLineConfig() {
138
138
  let e = T, t = D, n = this._dimensions.y + e, r = this._getLocalCameraPosition().z < this._dimensions.z / 2 ? 0 : this._dimensions.z;
@@ -187,6 +187,16 @@ var A = class {
187
187
  _visibilityChangedCallback() {
188
188
  this._onVisibilityChange && this._onVisibilityChange(this._dimensionsVisible);
189
189
  }
190
+ updateDimensionLabelVisibility(e) {
191
+ let t = new l();
192
+ e.getWorldPosition(t), this._cameraPosition = t, this.update();
193
+ let n = (e, n) => {
194
+ if (!e) return;
195
+ let r = e.getWorldPosition(new l());
196
+ e.visible = !O(n, t.distanceTo(r));
197
+ };
198
+ n(this._widthLabel, this._dimensions.x), n(this._heightLabel, this._dimensions.y), n(this._depthLabel, this._dimensions.z);
199
+ }
190
200
  update(e = !1) {
191
201
  this._enabled && !this._dimensionsVisible && (this._dimensionsVisible = !0, this._visibilityChangedCallback()), this._performUpdate(e);
192
202
  }
@@ -230,10 +240,7 @@ var A = class {
230
240
  let e = new r();
231
241
  return e.expandByObject(this._dimensionLineGroup), e;
232
242
  }
233
- moveCameraStart(e) {
234
- this._cameraPosition = e, this.update();
235
- }
236
- moveCameraEnd(e) {
243
+ setCameraPosition(e) {
237
244
  this._cameraPosition = e, this.update();
238
245
  }
239
246
  _performUpdate(e) {
@@ -245,11 +252,11 @@ var A = class {
245
252
  }
246
253
  this._dimensionLineGroup.updateMatrixWorld(!0);
247
254
  let n = this._getWidthLineConfig(), r = this._unitFormatter.formatMMValueToUnitString(this._dimensions.x * 1e3), i = this._dimensionLineGroup.localToWorld(n.mainLine.getCenter(new l()));
248
- this.clearLineGroup(this._widthLineGroup), this.addLinesToLineGroup(this._widthLineGroup, n, this._mainLineMaterial, this._mainLineMaterial), r !== null && this.addLabelToLineGroup(this._widthLineGroup, r, i);
255
+ this.clearLineGroup(this._widthLineGroup), this.addLinesToLineGroup(this._widthLineGroup, n, this._mainLineMaterial, this._mainLineMaterial), r !== null && (this._widthLabel = this.addLabelToLineGroup(this._widthLineGroup, r, i));
249
256
  let a = this._getHeightLineConfig(), o = this._unitFormatter.formatMMValueToUnitString(this._dimensions.y * 1e3), s = this._dimensionLineGroup.localToWorld(a.mainLine.getCenter(new l()));
250
- this.clearLineGroup(this._heightLineGroup), this.addLinesToLineGroup(this._heightLineGroup, a, this._mainLineMaterial, this._mainLineMaterial), o !== null && this.addLabelToLineGroup(this._heightLineGroup, o, s);
257
+ this.clearLineGroup(this._heightLineGroup), this.addLinesToLineGroup(this._heightLineGroup, a, this._mainLineMaterial, this._mainLineMaterial), o !== null && (this._heightLabel = this.addLabelToLineGroup(this._heightLineGroup, o, s));
251
258
  let c = this._getDepthLineConfig(), u = this._unitFormatter.formatMMValueToUnitString(this._dimensions.z * -1e3), d = this._dimensionLineGroup.localToWorld(c.mainLine.getCenter(new l()));
252
- this.clearLineGroup(this._depthLineGroup), this.addLinesToLineGroup(this._depthLineGroup, c, this._mainLineMaterial, this._mainLineMaterial), u !== null && this.addLabelToLineGroup(this._depthLineGroup, u, d);
259
+ this.clearLineGroup(this._depthLineGroup), this.addLinesToLineGroup(this._depthLineGroup, c, this._mainLineMaterial, this._mainLineMaterial), u !== null && (this._depthLabel = this.addLabelToLineGroup(this._depthLineGroup, u, d));
253
260
  }
254
261
  _clear() {
255
262
  this._lineMaterial.dispose(), this._mainLineMaterial.dispose(), [
@@ -261,8 +268,8 @@ var A = class {
261
268
  });
262
269
  }
263
270
  };
264
- p([f, d("design:type", Object)], A.prototype, "_unitFormatter", void 0);
271
+ p([f, d("design:type", Object)], j.prototype, "_unitFormatter", void 0);
265
272
  //#endregion
266
- export { E as a, C as c, D as i, g as l, T as n, k as o, A as r, _ as s, w as t };
273
+ export { E as a, _ as c, D as i, C as l, T as n, A as o, j as r, O as s, w as t, g as u };
267
274
 
268
- //# sourceMappingURL=dimensioning-helper-vPhGfHd-.mjs.map
275
+ //# sourceMappingURL=dimensioning-helper-BXD6AEqL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dimensioning-helper-BXD6AEqL.mjs","names":[],"sources":["../../packages/common-core/src/async-guard.ts","../../../../node_modules/three/examples/jsm/renderers/CSS2DRenderer.js","../../packages/configurator-core/src/utils/dimensioning-helper.ts"],"sourcesContent":["export default class AsyncGuard<T> {\n public info: any;\n private _promise: Promise<T>;\n private _resolve: (value?: T | PromiseLike<T>) => void;\n private _reject: (error: Error) => void;\n\n constructor(info?: any) {\n this.info = info;\n this._init();\n }\n\n private _init() {\n this._promise = new Promise<T>((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n\n public resolve(value?: any): void {\n if (value) {\n this._resolve(value);\n }\n this._resolve();\n }\n\n public reject(e: Error): void {\n this._reject(e);\n }\n\n public wait(): Promise<T> {\n return this._promise;\n }\n\n public reset() {\n this._init();\n }\n}\n","import {\n\tMatrix4,\n\tObject3D,\n\tVector2,\n\tVector3\n} from 'three';\n\n/**\n * The only type of 3D object that is supported by {@link CSS2DRenderer}.\n *\n * @augments Object3D\n * @three_import import { CSS2DObject } from 'three/addons/renderers/CSS2DRenderer.js';\n */\nclass CSS2DObject extends Object3D {\n\n\t/**\n\t * Constructs a new CSS2D object.\n\t *\n\t * @param {HTMLElement} [element] - The DOM element.\n\t */\n\tconstructor( element = document.createElement( 'div' ) ) {\n\n\t\tsuper();\n\n\t\t/**\n\t\t * This flag can be used for type testing.\n\t\t *\n\t\t * @type {boolean}\n\t\t * @readonly\n\t\t * @default true\n\t\t */\n\t\tthis.isCSS2DObject = true;\n\n\t\t/**\n\t\t * The DOM element which defines the appearance of this 3D object.\n\t\t *\n\t\t * @type {HTMLElement}\n\t\t * @readonly\n\t\t * @default true\n\t\t */\n\t\tthis.element = element;\n\n\t\tthis.element.style.position = 'absolute';\n\t\tthis.element.style.userSelect = 'none';\n\n\t\tthis.element.setAttribute( 'draggable', false );\n\n\t\t/**\n\t\t * The 3D objects center point.\n\t\t * `( 0, 0 )` is the lower left, `( 1, 1 )` is the top right.\n\t\t *\n\t\t * @type {Vector2}\n\t\t * @default (0.5,0.5)\n\t\t */\n\t\tthis.center = new Vector2( 0.5, 0.5 );\n\n\t\tthis.addEventListener( 'removed', function () {\n\n\t\t\tthis.traverse( function ( object ) {\n\n\t\t\t\tif (\n\t\t\t\t\tobject.element &&\n\t\t\t\t\tobject.element instanceof object.element.ownerDocument.defaultView.Element &&\n\t\t\t\t\tobject.element.parentNode !== null\n\t\t\t\t) {\n\n\t\t\t\t\tobject.element.remove();\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t} );\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.element = source.element.cloneNode( true );\n\n\t\tthis.center = source.center;\n\n\t\treturn this;\n\n\t}\n\n}\n\n//\n\nconst _vector = new Vector3();\nconst _viewMatrix = new Matrix4();\nconst _viewProjectionMatrix = new Matrix4();\nconst _a = new Vector3();\nconst _b = new Vector3();\n\n/**\n * This renderer is a simplified version of {@link CSS3DRenderer}. The only transformation that is\n * supported is translation.\n *\n * The renderer is very useful if you want to combine HTML based labels with 3D objects. Here too,\n * the respective DOM elements are wrapped into an instance of {@link CSS2DObject} and added to the\n * scene graph. All other types of renderable 3D objects (like meshes or point clouds) are ignored.\n *\n * `CSS2DRenderer` only supports 100% browser and display zoom.\n *\n * @three_import import { CSS2DRenderer } from 'three/addons/renderers/CSS2DRenderer.js';\n */\nclass CSS2DRenderer {\n\n\t/**\n\t * Constructs a new CSS2D renderer.\n\t *\n\t * @param {CSS2DRenderer~Parameters} [parameters] - The parameters.\n\t */\n\tconstructor( parameters = {} ) {\n\n\t\tconst _this = this;\n\n\t\tlet _width, _height;\n\t\tlet _widthHalf, _heightHalf;\n\n\t\tconst cache = {\n\t\t\tobjects: new WeakMap()\n\t\t};\n\n\t\tconst domElement = parameters.element !== undefined ? parameters.element : document.createElement( 'div' );\n\n\t\tdomElement.style.overflow = 'hidden';\n\n\t\t/**\n\t\t * The DOM where the renderer appends its child-elements.\n\t\t *\n\t\t * @type {HTMLElement}\n\t\t */\n\t\tthis.domElement = domElement;\n\n\t\t/**\n\t\t * Controls whether the renderer assigns `z-index` values to CSS2DObject DOM elements.\n\t\t * If set to `true`, z-index values are assigned first based on the `renderOrder`\n\t\t * and secondly - the distance to the camera. If set to `false`, no z-index values are assigned.\n\t\t *\n\t\t * @type {boolean}\n\t\t * @default true\n\t\t */\n\t\tthis.sortObjects = true;\n\n\t\t/**\n\t\t * Returns an object containing the width and height of the renderer.\n\t\t *\n\t\t * @return {{width:number,height:number}} The size of the renderer.\n\t\t */\n\t\tthis.getSize = function () {\n\n\t\t\treturn {\n\t\t\t\twidth: _width,\n\t\t\t\theight: _height\n\t\t\t};\n\n\t\t};\n\n\t\t/**\n\t\t * Renders the given scene using the given camera.\n\t\t *\n\t\t * @param {Object3D} scene - A scene or any other type of 3D object.\n\t\t * @param {Camera} camera - The camera.\n\t\t */\n\t\tthis.render = function ( scene, camera ) {\n\n\t\t\tif ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld();\n\t\t\tif ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld();\n\n\t\t\t_viewMatrix.copy( camera.matrixWorldInverse );\n\t\t\t_viewProjectionMatrix.multiplyMatrices( camera.projectionMatrix, _viewMatrix );\n\n\t\t\trenderObject( scene, scene, camera );\n\t\t\tif ( this.sortObjects ) zOrder( scene );\n\n\t\t};\n\n\t\t/**\n\t\t * Resizes the renderer to the given width and height.\n\t\t *\n\t\t * @param {number} width - The width of the renderer.\n\t\t * @param {number} height - The height of the renderer.\n\t\t */\n\t\tthis.setSize = function ( width, height ) {\n\n\t\t\t_width = width;\n\t\t\t_height = height;\n\n\t\t\t_widthHalf = _width / 2;\n\t\t\t_heightHalf = _height / 2;\n\n\t\t\tdomElement.style.width = width + 'px';\n\t\t\tdomElement.style.height = height + 'px';\n\n\t\t};\n\n\t\tfunction hideObject( object ) {\n\n\t\t\tif ( object.isCSS2DObject ) object.element.style.display = 'none';\n\n\t\t\tfor ( let i = 0, l = object.children.length; i < l; i ++ ) {\n\n\t\t\t\thideObject( object.children[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction renderObject( object, scene, camera ) {\n\n\t\t\tif ( object.visible === false ) {\n\n\t\t\t\thideObject( object );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif ( object.isCSS2DObject ) {\n\n\t\t\t\t_vector.setFromMatrixPosition( object.matrixWorld );\n\t\t\t\t_vector.applyMatrix4( _viewProjectionMatrix );\n\n\t\t\t\tconst visible = ( _vector.z >= - 1 && _vector.z <= 1 ) && ( object.layers.test( camera.layers ) === true );\n\n\t\t\t\tconst element = object.element;\n\t\t\t\telement.style.display = visible === true ? '' : 'none';\n\n\t\t\t\tif ( visible === true ) {\n\n\t\t\t\t\tobject.onBeforeRender( _this, scene, camera );\n\n\t\t\t\t\telement.style.transform = 'translate(' + ( - 100 * object.center.x ) + '%,' + ( - 100 * object.center.y ) + '%)' + 'translate(' + ( _vector.x * _widthHalf + _widthHalf ) + 'px,' + ( - _vector.y * _heightHalf + _heightHalf ) + 'px)';\n\n\t\t\t\t\tif ( element.parentNode !== domElement ) {\n\n\t\t\t\t\t\tdomElement.appendChild( element );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tobject.onAfterRender( _this, scene, camera );\n\n\t\t\t\t}\n\n\t\t\t\tconst objectData = {\n\t\t\t\t\tdistanceToCameraSquared: getDistanceToSquared( camera, object )\n\t\t\t\t};\n\n\t\t\t\tcache.objects.set( object, objectData );\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0, l = object.children.length; i < l; i ++ ) {\n\n\t\t\t\trenderObject( object.children[ i ], scene, camera );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction getDistanceToSquared( object1, object2 ) {\n\n\t\t\t_a.setFromMatrixPosition( object1.matrixWorld );\n\t\t\t_b.setFromMatrixPosition( object2.matrixWorld );\n\n\t\t\treturn _a.distanceToSquared( _b );\n\n\t\t}\n\n\t\tfunction filterAndFlatten( scene ) {\n\n\t\t\tconst result = [];\n\n\t\t\tscene.traverseVisible( function ( object ) {\n\n\t\t\t\tif ( object.isCSS2DObject ) result.push( object );\n\n\t\t\t} );\n\n\t\t\treturn result;\n\n\t\t}\n\n\t\tfunction zOrder( scene ) {\n\n\t\t\tconst sorted = filterAndFlatten( scene ).sort( function ( a, b ) {\n\n\t\t\t\tif ( a.renderOrder !== b.renderOrder ) {\n\n\t\t\t\t\treturn b.renderOrder - a.renderOrder;\n\n\t\t\t\t}\n\n\t\t\t\tconst distanceA = cache.objects.get( a ).distanceToCameraSquared;\n\t\t\t\tconst distanceB = cache.objects.get( b ).distanceToCameraSquared;\n\n\t\t\t\treturn distanceA - distanceB;\n\n\t\t\t} );\n\n\t\t\tconst zMax = sorted.length;\n\n\t\t\tfor ( let i = 0, l = sorted.length; i < l; i ++ ) {\n\n\t\t\t\tsorted[ i ].element.style.zIndex = zMax - i;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\n/**\n * Constructor parameters of `CSS2DRenderer`.\n *\n * @typedef {Object} CSS2DRenderer~Parameters\n * @property {HTMLElement} [element] - A DOM element where the renderer appends its child-elements.\n * If not passed in here, a new div element will be created.\n **/\n\nexport { CSS2DObject, CSS2DRenderer };\n","import inject from '../../../common-core/src/di/inject';\nimport AsyncGuard from '../../../common-core/src/async-guard';\nimport type { Object3D, Camera } from 'three';\nimport { Group, type Scene } from 'three';\nimport { Box3 } from 'three';\nimport {\n BufferAttribute,\n BufferGeometry,\n Line,\n Line3,\n LineBasicMaterial,\n Vector3,\n} from 'three';\nimport { type KernelCube } from '../../../typings/kernel';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport type UnitFormatter from '../services/unit-formatter';\nimport { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer.js';\nimport { LAYER } from '../../../common-core/src/webgl/layer';\n\nexport const DIMENSIONING_GEOMETRY = 'dimensioning';\nexport const DIMENSION_LINE_OFFSET = 0.08;\nexport const MIN_CAMERA_DISTANCE_RATIO = 1.2;\nexport const FADE_DISTANCE_RATIO = 2.0;\nexport const EXTENSION_LINE_LENGTH_RATIO = 0.03;\n\nexport const shouldHideDimensionLabel = (\n labelValueInMeters: number,\n distance: number,\n): boolean => {\n labelValueInMeters = Math.abs(labelValueInMeters);\n return labelValueInMeters < distance * 0.05 && distance > 3;\n};\n\nexport interface DimensionLineConfig {\n mainLine: Line3;\n extensionLines: Line3[];\n}\n\nconst LINE_COLOR = 0x373737;\n\nexport function createDimensioningHelper(creator: string): DimensioningHelper {\n return new DimensioningHelper(creator);\n}\n\nexport default class DimensioningHelper {\n public _creator_: string;\n\n @inject\n private _unitFormatter: UnitFormatter;\n\n private _object: Object3D;\n private _cameraPosition: Vector3 = new Vector3();\n private _onVisibilityChange: (visible: boolean) => void;\n private _initialized: AsyncGuard<void> = new AsyncGuard();\n\n private _origin: Vector3;\n private _dimensions: Vector3;\n\n private _lineMaterial: LineBasicMaterial;\n private readonly _mainLineMaterial: LineBasicMaterial;\n\n private readonly _widthLineGroup: Group;\n private readonly _heightLineGroup: Group;\n private readonly _depthLineGroup: Group;\n\n private _widthLabel: CSS2DObject;\n private _heightLabel: CSS2DObject;\n private _depthLabel: CSS2DObject;\n\n private _enabled: boolean = false;\n private _dimensionsVisible = false;\n\n private _dimensionLineGroup = new Group();\n\n constructor(creator: string) {\n this._creator_ = creator;\n\n this._lineMaterial = new LineBasicMaterial({\n color: LINE_COLOR,\n linewidth: 2,\n });\n\n this._mainLineMaterial = new LineBasicMaterial({\n color: LINE_COLOR,\n linewidth: 0.001,\n transparent: true,\n opacity: 1.0,\n });\n\n this._dimensionLineGroup.name = DIMENSIONING_GEOMETRY;\n\n this._widthLineGroup = this._createLineGroup('width');\n this._heightLineGroup = this._createLineGroup('height');\n this._depthLineGroup = this._createLineGroup('depth');\n\n this._dimensionLineGroup.add(this._widthLineGroup);\n this._dimensionLineGroup.add(this._heightLineGroup);\n this._dimensionLineGroup.add(this._depthLineGroup);\n\n this.update(false);\n this._initialized.resolve();\n }\n\n private _createLineGroup(_name: string): Group {\n const group = new Group();\n group.name = DIMENSIONING_GEOMETRY;\n group.userData.ignoreComponentRaycast = true;\n return group;\n }\n\n private _createLineFromConfig(\n config: Line3,\n material: LineBasicMaterial,\n ): Line {\n const geometry = new BufferGeometry();\n const vertices = [\n config.start.x,\n config.start.y,\n config.start.z,\n config.end.x,\n config.end.y,\n config.end.z,\n ];\n geometry.setAttribute(\n 'position',\n new BufferAttribute(new Float32Array(vertices), 3),\n );\n const line = new Line(geometry, material);\n line.name = DIMENSIONING_GEOMETRY;\n line.userData.ignoreComponentRaycast = true;\n line.layers.set(LAYER.DIMENSIONS);\n return line;\n }\n\n private addLinesToLineGroup(\n group: Group,\n config: DimensionLineConfig,\n mainMaterial: LineBasicMaterial,\n extMaterial: LineBasicMaterial,\n ) {\n config.extensionLines.forEach((extLine) => {\n group.add(this._createLineFromConfig(extLine, extMaterial));\n });\n\n group.add(this._createLineFromConfig(config.mainLine, mainMaterial));\n }\n\n private clearLineGroup(group: Group) {\n while (group.children.length > 0) {\n const child = group.children[0];\n if (child instanceof Line) {\n child.geometry.dispose();\n }\n group.remove(child);\n }\n }\n\n private addLabelToLineGroup(\n group: Group,\n labelText: string,\n labelWorldPosition: Vector3,\n ): CSS2DObject {\n const labelHtmlDiv = document.createElement('div');\n labelHtmlDiv.classList.add(\n 'dimension-label',\n 'dimension-label--primary',\n 'dimension-label--disabled',\n );\n const labelHtmlSpan = document.createElement('span');\n labelHtmlSpan.classList.add('dimension-label__value');\n labelHtmlSpan.innerHTML = labelText;\n labelHtmlDiv.appendChild(labelHtmlSpan);\n\n const label = new CSS2DObject(labelHtmlDiv);\n const labelLocalPosition =\n this._dimensionLineGroup.worldToLocal(labelWorldPosition);\n label.position.copy(labelLocalPosition);\n\n group.add(label);\n return label;\n }\n\n private _getWidthLineConfig(): DimensionLineConfig {\n const offset = DIMENSION_LINE_OFFSET;\n const extLength = EXTENSION_LINE_LENGTH_RATIO;\n const y = this._dimensions.y + offset;\n const localCam = this._getLocalCameraPosition();\n const z = localCam.z < this._dimensions.z / 2 ? 0 : this._dimensions.z;\n\n return {\n mainLine: new Line3(\n new Vector3(0, y, z),\n new Vector3(this._dimensions.x, y, z),\n ),\n extensionLines: [\n new Line3(\n new Vector3(0, y - extLength, z),\n new Vector3(0, y + extLength, z),\n ),\n new Line3(\n new Vector3(this._dimensions.x, y - extLength, z),\n new Vector3(this._dimensions.x, y + extLength, z),\n ),\n ],\n };\n }\n\n private _getDepthLineConfig(): DimensionLineConfig {\n const offset = DIMENSION_LINE_OFFSET;\n const extLength = EXTENSION_LINE_LENGTH_RATIO;\n const y = 0;\n const localCam = this._getLocalCameraPosition();\n const x =\n localCam.x < this._dimensions.x / 2\n ? -offset\n : this._dimensions.x + offset;\n\n return {\n mainLine: new Line3(\n new Vector3(x, y, this._dimensions.z),\n new Vector3(x, y, 0),\n ),\n extensionLines: [\n new Line3(\n new Vector3(x - extLength, y, 0),\n new Vector3(x + extLength, y, 0),\n ),\n new Line3(\n new Vector3(x - extLength, y, this._dimensions.z),\n new Vector3(x + extLength, y, this._dimensions.z),\n ),\n ],\n };\n }\n\n private _getHeightLineConfig(): DimensionLineConfig {\n const offset = DIMENSION_LINE_OFFSET;\n const extLength = EXTENSION_LINE_LENGTH_RATIO;\n const localCam = this._getLocalCameraPosition();\n const x =\n localCam.x < this._dimensions.x / 2\n ? -offset\n : this._dimensions.x + offset;\n const z = localCam.z < this._dimensions.z / 2 ? 0 : this._dimensions.z;\n\n return {\n mainLine: new Line3(\n new Vector3(x, 0, z),\n new Vector3(x, this._dimensions.y, z),\n ),\n extensionLines: [\n new Line3(\n new Vector3(x - extLength, 0, z),\n new Vector3(x + extLength, 0, z),\n ),\n new Line3(\n new Vector3(x - extLength, this._dimensions.y, z),\n new Vector3(x + extLength, this._dimensions.y, z),\n ),\n ],\n };\n }\n\n private _getLocalCameraPosition(): Vector3 {\n if (\n !this._cameraPosition ||\n !this._dimensionLineGroup ||\n !this._dimensions\n ) {\n return new Vector3(0, 0, 0);\n }\n return this._dimensionLineGroup.worldToLocal(this._cameraPosition.clone());\n }\n\n private _getCameraDistanceInfo(): {\n tooClose: boolean;\n opacity: number;\n distance: number;\n } {\n if (!this._object || !this._cameraPosition || !this._dimensions) {\n return { tooClose: false, opacity: 1.0, distance: Infinity };\n }\n const objPos = this._object.getWorldPosition(new Vector3());\n const distance = this._cameraPosition.distanceTo(objPos);\n const objectRadius =\n Math.max(this._dimensions.x, this._dimensions.y, this._dimensions.z) / 2;\n const minThreshold = objectRadius * MIN_CAMERA_DISTANCE_RATIO;\n const fadeThreshold = objectRadius * FADE_DISTANCE_RATIO;\n\n if (distance < minThreshold) {\n return { tooClose: true, opacity: 0, distance };\n }\n if (distance < fadeThreshold) {\n const opacity =\n (distance - minThreshold) / (fadeThreshold - minThreshold);\n return {\n tooClose: false,\n opacity: Math.max(0, Math.min(1, opacity)),\n distance,\n };\n }\n return { tooClose: false, opacity: 1.0, distance };\n }\n\n private _visibilityChangedCallback() {\n if (this._onVisibilityChange) {\n this._onVisibilityChange(this._dimensionsVisible);\n }\n }\n\n public updateDimensionLabelVisibility(camera: Camera) {\n const cameraPosition = new Vector3();\n camera.getWorldPosition(cameraPosition);\n\n this._cameraPosition = cameraPosition;\n this.update();\n\n const checkVisibility = (\n label: CSS2DObject,\n labelValueInMeters: number,\n ) => {\n if (!label) {\n return;\n }\n const labelPosition = label.getWorldPosition(new Vector3());\n const cameraDistanceToLabel = cameraPosition.distanceTo(labelPosition);\n label.visible = !shouldHideDimensionLabel(\n labelValueInMeters,\n cameraDistanceToLabel,\n );\n };\n\n checkVisibility(this._widthLabel, this._dimensions.x);\n checkVisibility(this._heightLabel, this._dimensions.y);\n checkVisibility(this._depthLabel, this._dimensions.z);\n }\n\n public update(force: boolean = false) {\n if (this._enabled && !this._dimensionsVisible) {\n this._dimensionsVisible = true;\n this._visibilityChangedCallback();\n }\n this._performUpdate(force);\n }\n\n public updateSize(boxForMeasurement: KernelCube) {\n this._origin = convertToTHREE(boxForMeasurement.origin);\n this._dimensionLineGroup.position.x =\n this._origin.x - this._object.position.x;\n this._dimensionLineGroup.position.y =\n this._origin.y - this._object.position.y;\n this._dimensionLineGroup.position.z =\n this._origin.z - this._object.position.z;\n this._dimensions = convertToTHREE(boxForMeasurement.size);\n this.update();\n }\n\n public removeFromObject(object: Object3D) {\n if (object) {\n object.remove(this._dimensionLineGroup);\n }\n }\n\n public onDimensionsVisibilityChanged(handler: (visible: boolean) => void) {\n this._onVisibilityChange = handler;\n }\n\n public setObject(object: Object3D): void {\n this._object = object;\n }\n\n public isInitialized(): Promise<void> {\n return this._initialized.wait();\n }\n\n public areDimensionsEnabled(): boolean {\n return this._enabled;\n }\n\n public clearScene(_scene: Scene): void {\n this._clear();\n }\n\n public addToObject(object: Object3D): void {\n if (!object || !this._dimensionLineGroup) {\n return;\n }\n object.add(this._dimensionLineGroup);\n }\n\n public enableDimensions(): void {\n this._enabled = true;\n this.addToObject(this._object);\n this.update(true);\n }\n\n public disableDimensions(): void {\n this._enabled = false;\n if (this._dimensionsVisible) {\n this._dimensionsVisible = false;\n this._visibilityChangedCallback();\n }\n this._clear();\n this.removeFromObject(this._object);\n }\n\n public enableTopDimensions(): void {\n this.enableDimensions();\n this._heightLineGroup.visible = false;\n this.update(true);\n }\n\n public disableTopDimensions(): void {\n this._heightLineGroup.visible = true;\n this.disableDimensions();\n }\n\n public getBoundingBox(): Box3 {\n const bbox = new Box3();\n bbox.expandByObject(this._dimensionLineGroup);\n return bbox;\n }\n\n public setCameraPosition(position: Vector3): void {\n this._cameraPosition = position;\n this.update();\n }\n\n private _performUpdate(force: boolean): void {\n if (!this._enabled && !force) {\n return;\n }\n if (!this._dimensions) {\n return;\n }\n\n let opacity = 1.0;\n\n if (\n this._object &&\n this._cameraPosition &&\n !this._cameraPosition.equals(new Vector3(0, 0, 0))\n ) {\n const distanceCheck = this._getCameraDistanceInfo();\n if (distanceCheck.tooClose) {\n this._dimensionLineGroup.visible = false;\n } else {\n this._dimensionLineGroup.visible = true;\n opacity = distanceCheck.opacity;\n this._mainLineMaterial.opacity = opacity;\n }\n }\n\n this._dimensionLineGroup.updateMatrixWorld(true);\n\n const widthConfig = this._getWidthLineConfig();\n const widthLabelText = this._unitFormatter.formatMMValueToUnitString(\n this._dimensions.x * 1000,\n );\n const widthPos = this._dimensionLineGroup.localToWorld(\n widthConfig.mainLine.getCenter(new Vector3()),\n );\n this.clearLineGroup(this._widthLineGroup);\n this.addLinesToLineGroup(\n this._widthLineGroup,\n widthConfig,\n this._mainLineMaterial,\n this._mainLineMaterial,\n );\n if (widthLabelText !== null) {\n this._widthLabel = this.addLabelToLineGroup(\n this._widthLineGroup,\n widthLabelText,\n widthPos,\n );\n }\n\n const heightConfig = this._getHeightLineConfig();\n const heightLabelText = this._unitFormatter.formatMMValueToUnitString(\n this._dimensions.y * 1000,\n );\n const heightPos = this._dimensionLineGroup.localToWorld(\n heightConfig.mainLine.getCenter(new Vector3()),\n );\n this.clearLineGroup(this._heightLineGroup);\n this.addLinesToLineGroup(\n this._heightLineGroup,\n heightConfig,\n this._mainLineMaterial,\n this._mainLineMaterial,\n );\n if (heightLabelText !== null) {\n this._heightLabel = this.addLabelToLineGroup(\n this._heightLineGroup,\n heightLabelText,\n heightPos,\n );\n }\n\n const depthConfig = this._getDepthLineConfig();\n const depthLabelText = this._unitFormatter.formatMMValueToUnitString(\n this._dimensions.z * -1000,\n );\n const depthPos = this._dimensionLineGroup.localToWorld(\n depthConfig.mainLine.getCenter(new Vector3()),\n );\n this.clearLineGroup(this._depthLineGroup);\n this.addLinesToLineGroup(\n this._depthLineGroup,\n depthConfig,\n this._mainLineMaterial,\n this._mainLineMaterial,\n );\n if (depthLabelText !== null) {\n this._depthLabel = this.addLabelToLineGroup(\n this._depthLineGroup,\n depthLabelText,\n depthPos,\n );\n }\n }\n\n private _clear(): void {\n this._lineMaterial.dispose();\n this._mainLineMaterial.dispose();\n [this._widthLineGroup, this._heightLineGroup, this._depthLineGroup].forEach(\n (group) => {\n this.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;EAGH,IAAM,IAAc,KAAK,qBAAqB,EACxC,IAAiB,KAAK,eAAe,0BACzC,KAAK,YAAY,IAAI,KACtB,EACK,IAAW,KAAK,oBAAoB,aACxC,EAAY,SAAS,UAAU,IAAI,GAAS,CAAC,CAC9C;AAQD,EAPA,KAAK,eAAe,KAAK,gBAAgB,EACzC,KAAK,oBACH,KAAK,iBACL,GACA,KAAK,mBACL,KAAK,kBACN,EACG,MAAmB,SACrB,KAAK,cAAc,KAAK,oBACtB,KAAK,iBACL,GACA,EACD;;CAIL,SAAuB;AAGrB,EAFA,KAAK,cAAc,SAAS,EAC5B,KAAK,kBAAkB,SAAS,EAChC;GAAC,KAAK;GAAiB,KAAK;GAAkB,KAAK;GAAgB,CAAC,SACjE,MAAU;AACT,QAAK,eAAe,EAAM;IAE7B;;;GAleF,GAAA,EAAA,eAAA,OAAA,CAAA,EAAA,EAAA,WAAA,kBAAA,KAAA,EAAA"}
@@ -0,0 +1,2 @@
1
+ import { o as e } from "./dimensioning-helper-BXD6AEqL.mjs";
2
+ export { e as createDimensioningHelper };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./glb-viewer-I86nXb0A.mjs";
2
+ export { e as GlbViewer };
@@ -1,18 +1,18 @@
1
- import { C as e, Dn as t, In as n, d as r, n as i, tt as a, xi as o, zr as s } from "./three.core-K1JzUaep.mjs";
2
- import { r as c } from "./three.module-Q2K9uyhi.mjs";
3
- import { n as l, r as u, t as d } from "./decorate-Bck1_lG8.mjs";
4
- import { g as f, v as p } from "./common-utils-AB4Lnet3.mjs";
5
- import { h as m, mt as h } from "./threejs-utils-BzXU2M3w.mjs";
6
- import { D as g, G as _, I as v, Q as y, T as b, X as x, Z as S, h as C, it as w, m as T, n as E, nt as D, p as O, r as k, rt as A, t as j, tt as M, u as N, w as P } from "./main-TlUQxOeW.mjs";
7
- import { t as F } from "./script-loader-D3Cbc5BY.mjs";
1
+ import { dt as e, h as t } from "./threejs-utils-fEhH05zP.mjs";
2
+ import { C as n, Dn as r, In as i, d as a, n as o, tt as s, xi as c, zr as l } from "./three.core-DNErG1F6.mjs";
3
+ import { r as u } from "./three.module-BZkESKo3.mjs";
4
+ import { n as d, r as f, t as p } from "./decorate-C9r0zXzz.mjs";
5
+ import { g as m, v as h } from "./common-utils-L3DF6Ey5.mjs";
6
+ import { $ as g, D as _, I as v, K as y, Q as b, T as x, Z as S, at as C, h as w, it as T, m as E, n as D, nt as O, p as k, r as A, rt as j, t as M, u as N, w as P } from "./main-DeOPstVA.mjs";
7
+ import { t as F } from "./script-loader-DSL6zJat.mjs";
8
8
  //#region packages/glb-viewer-core/src/camera-control/adjustable-camera-control-3d.ts
9
9
  var I = class extends P {
10
10
  constructor(...e) {
11
11
  super(...e), this.shouldIgnoreStandardBehavior = !1;
12
12
  }
13
- adjust(e, t, i, s, c) {
14
- this._boundingBox = new r(new o(-e.x / 2, 0, -e.z / 2), new o(e.x / 2, e.y, e.z / 2));
15
- let l = new a(-Math.PI / 2 + s, i, 0, "ZYX"), u = new n().setFromEuler(l);
13
+ adjust(e, t, n, r, o) {
14
+ this._boundingBox = new a(new c(-e.x / 2, 0, -e.z / 2), new c(e.x / 2, e.y, e.z / 2));
15
+ let l = new s(-Math.PI / 2 + r, n, 0, "ZYX"), u = new i().setFromEuler(l);
16
16
  this._camera.updateProjectionMatrix(), this._camera.quaternion.copy(u), this._camera.position.copy(t);
17
17
  }
18
18
  _update(e) {
@@ -21,9 +21,9 @@ var I = class extends P {
21
21
  animateCamera(e) {
22
22
  return this.shouldIgnoreStandardBehavior ? !0 : super.animateCamera(e);
23
23
  }
24
- }, L = class extends g {
25
- constructor(t, n) {
26
- super(t, n), this._params = { ambientLight: { color: "#ffffff" } }, this._ambientLight = new i(new e(this._params.ambientLight.color), .5), this.addToScene();
24
+ }, L = class extends _ {
25
+ constructor(e, t) {
26
+ super(e, t), this._params = { ambientLight: { color: "#ffffff" } }, this._ambientLight = new o(new n(this._params.ambientLight.color), .5), this.addToScene();
27
27
  }
28
28
  addToScene() {
29
29
  this._scene.add(this._ambientLight);
@@ -34,18 +34,18 @@ var I = class extends P {
34
34
  reload() {
35
35
  this.removeFromScene(), this.addToScene();
36
36
  }
37
- showGUI(t) {
37
+ showGUI(e) {
38
38
  if (this._ambientLight) {
39
- let n = t.addFolder("Ambient Light");
40
- n.add(this._ambientLight, "visible"), n.add(this._ambientLight, "intensity").min(0).max(5).step(.1), n.addColor(this._params.ambientLight, "color").onChange((t) => {
41
- this._ambientLight.color = new e(t);
39
+ let t = e.addFolder("Ambient Light");
40
+ t.add(this._ambientLight, "visible"), t.add(this._ambientLight, "intensity").min(0).max(5).step(.1), t.addColor(this._params.ambientLight, "color").onChange((e) => {
41
+ this._ambientLight.color = new n(e);
42
42
  });
43
43
  }
44
44
  }
45
- }, R = class extends C {
45
+ }, R = class extends w {
46
46
  constructor(e, t) {
47
- if (super(e, t, _.GLB, A.CAMERA_3D), this._itemsCount = 0, this._standardSceneBackgroundColor = this._scene.background, this._initData.legacyLight && this._renderer instanceof c) if (this._renderer.capabilities.maxTextures > 8) {
48
- let e = S.createDynamicLightSettingSource(null, y.CAMERA);
47
+ if (super(e, t, y.GLB, T.CAMERA_3D), this._itemsCount = 0, this._standardSceneBackgroundColor = this._scene.background, this._initData.legacyLight && this._renderer instanceof u) if (this._renderer.capabilities.maxTextures > 8) {
48
+ let e = b.createDynamicLightSettingSource(null, g.CAMERA);
49
49
  e && this.loadDynamicLightSetting(e);
50
50
  } else console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"), this._lightSetting = new L(this._scene);
51
51
  }
@@ -58,58 +58,58 @@ var I = class extends P {
58
58
  async loadStaticItem(e, t) {
59
59
  let n = await this._rapiAccess.getItem(e);
60
60
  if (n.configuration) return Promise.reject();
61
- let r = p(n);
61
+ let r = h(n);
62
62
  return r ? this.loadGLB(r, !0, void 0, t) : Promise.reject(/* @__PURE__ */ Error("GLB Url not detected"));
63
63
  }
64
- loadGLB(e, t = !0, n = new o(1, 1, 1), i) {
65
- return this.clearScene(), new Promise((a, s) => {
66
- this._loadGLB(e, new o(0, 0, 0), 0, void 0, n, void 0, void 0, i).then((e) => {
64
+ loadGLB(e, t = !0, n = new c(1, 1, 1), r) {
65
+ return this.clearScene(), new Promise((i, o) => {
66
+ this._loadGLB(e, new c(0, 0, 0), 0, void 0, n, void 0, void 0, r).then((e) => {
67
67
  this._currentGLB = e, this._scene.add(this._currentGLB);
68
- let n = new r().setFromObject(this._currentGLB);
69
- t && this.cameraBehaviour.cameraControl instanceof I && this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(n), this._updateBounds(n, void 0, !0), this._readyForRender(), a();
70
- }, s);
68
+ let n = new a().setFromObject(this._currentGLB);
69
+ t && this.cameraBehaviour.cameraControl instanceof I && this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(n), this._updateBounds(n, void 0, !0), this._readyForRender(), i();
70
+ }, o);
71
71
  });
72
72
  }
73
- preparePerspectiveImage(e = {}, n) {
74
- let r, i, a;
75
- if (n) r = n, i = r.domElement.width, a = r.domElement.height;
73
+ preparePerspectiveImage(t = {}, n) {
74
+ let i, a, o;
75
+ if (n) i = n, a = i.domElement.width, o = i.domElement.height;
76
76
  else {
77
- let t = e.size ?? 1e3;
78
- i = t, a = t, r = new c({ antialias: !0 }), r.setSize(i, a), r.outputColorSpace = s, r.autoClear = !1, r.shadowMap.enabled = !0, r.shadowMap.type = 0;
77
+ let e = t.size ?? 1e3;
78
+ a = e, o = e, i = new u({ antialias: !0 }), i.setSize(a, o), i.outputColorSpace = l, i.autoClear = !1, i.shadowMap.enabled = !0, i.shadowMap.type = 0;
79
79
  }
80
- return new Promise((n, o) => {
81
- let s = this.cameraBehaviour.cameraControl.getCamera().clone();
82
- s instanceof t && (s.aspect = i / a, s.updateProjectionMatrix());
83
- let c = this.getBounds();
84
- if (c && s instanceof t) {
85
- let t = O.getCameraTargetForBBox(c), n = -30 + h(e.rotationY ?? 0);
86
- O.placeCameraForPerspectiveImage(s, t, -20, n);
80
+ return new Promise((n, s) => {
81
+ let c = this.cameraBehaviour.cameraControl.getCamera().clone();
82
+ c instanceof r && (c.aspect = a / o, c.updateProjectionMatrix());
83
+ let l = this.getBounds();
84
+ if (l && c instanceof r) {
85
+ let n = k.getCameraTargetForBBox(l), r = -30 + e(t.rotationY ?? 0);
86
+ k.placeCameraForPerspectiveImage(c, n, -20, r);
87
87
  }
88
88
  this._lightSetting?.removeFromScene();
89
- let l = new T(this._scene), u = e.preserveSceneBackground ?? !0, d = this._scene.fog, f = this._scene.background, p;
89
+ let u = new E(this._scene), d = t.preserveSceneBackground ?? !0, f = this._scene.fog, p = this._scene.background, m;
90
90
  try {
91
- u || (this._scene.background = null, this._scene.fog = null), r.render(this._scene, s), p = r.domElement.toDataURL();
91
+ d || (this._scene.background = null, this._scene.fog = null), i.render(this._scene, c), m = i.domElement.toDataURL();
92
92
  } finally {
93
- u || (this._scene.background = f, this._scene.fog = d), l.removeFromScene(), this._lightSetting?.addToScene();
93
+ d || (this._scene.background = p, this._scene.fog = f), u.removeFromScene(), this._lightSetting?.addToScene();
94
94
  }
95
- r.domElement.toBlob((e) => {
95
+ i.domElement.toBlob((e) => {
96
96
  if (e === null) {
97
- o(/* @__PURE__ */ Error("Failed to create blob from canvas"));
97
+ s(/* @__PURE__ */ Error("Failed to create blob from canvas"));
98
98
  return;
99
99
  }
100
100
  n({
101
- image: p,
102
- width: i,
103
- height: a,
101
+ image: m,
102
+ width: a,
103
+ height: o,
104
104
  blob: e
105
105
  });
106
106
  }, "image/png");
107
107
  });
108
108
  }
109
- adjustCamera(e, t, n, i) {
109
+ adjustCamera(e, t, n, r) {
110
110
  if (this.cameraBehaviour.cameraControl instanceof I) {
111
- let a = new r().setFromObject(this._scene).getSize(new o());
112
- this.cameraBehaviour.cameraControl.adjust(a, e, t, n, i), this._requestRender();
111
+ let i = new a().setFromObject(this._scene).getSize(new c());
112
+ this.cameraBehaviour.cameraControl.adjust(i, e, t, n, r), this._requestRender();
113
113
  }
114
114
  }
115
115
  onStart(e) {
@@ -122,14 +122,14 @@ var I = class extends P {
122
122
  this._scene.background = this._standardSceneBackgroundColor, this.cameraBehaviour.cameraControl instanceof I && (this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior = !1);
123
123
  }
124
124
  clearScene() {
125
- this._currentGLB &&= (this._scene.remove(this._currentGLB), m(this._currentGLB), null), super.clearScene();
125
+ this._currentGLB &&= (this._scene.remove(this._currentGLB), t(this._currentGLB), null), super.clearScene();
126
126
  }
127
127
  enableHD() {
128
128
  super.enableHD();
129
129
  }
130
130
  sceneChanged() {}
131
131
  getBounds() {
132
- return this._currentGLB ? new r().setFromObject(this._currentGLB) : null;
132
+ return this._currentGLB ? new a().setFromObject(this._currentGLB) : null;
133
133
  }
134
134
  get glbViewerCameraBehaviour() {
135
135
  return this.cameraBehaviour;
@@ -138,9 +138,9 @@ var I = class extends P {
138
138
  return null;
139
139
  }
140
140
  cameraBehaviourChanged(e = !0) {
141
- super.cameraBehaviourChanged(e), this.cameraBehaviour.cameraControl.addEventListener(b.ZOOM_IN, () => {
141
+ super.cameraBehaviourChanged(e), this.cameraBehaviour.cameraControl.addEventListener(x.ZOOM_IN, () => {
142
142
  this._requestRender();
143
- }, this), this.cameraBehaviour.cameraControl.addEventListener(b.ZOOM_OUT, () => {
143
+ }, this), this.cameraBehaviour.cameraControl.addEventListener(x.ZOOM_OUT, () => {
144
144
  this._requestRender();
145
145
  }, this);
146
146
  }
@@ -151,15 +151,15 @@ var I = class extends P {
151
151
  console.log("ready_for_render"), this._globalCallback.onReadyForRender();
152
152
  }
153
153
  };
154
- d([u, l("design:type", Object)], R.prototype, "_glbInputManager", void 0), d([u, l("design:type", Object)], R.prototype, "_rapiAccess", void 0);
154
+ p([f, d("design:type", Object)], R.prototype, "_glbInputManager", void 0), p([f, d("design:type", Object)], R.prototype, "_rapiAccess", void 0);
155
155
  //#endregion
156
156
  //#region packages/glb-viewer-core/src/services/glb-render-worker.ts
157
157
  var z = class {
158
158
  constructor(e, t, n) {
159
- this._prefix = "https://furniture.roomle.com/3d/glb/", this._listeners = /* @__PURE__ */ new Set(), this._finishedItems = 0, this._sceneManager = e, this._renderer = new c({
159
+ this._prefix = "https://furniture.roomle.com/3d/glb/", this._listeners = /* @__PURE__ */ new Set(), this._finishedItems = 0, this._sceneManager = e, this._renderer = new u({
160
160
  antialias: !0,
161
161
  alpha: !0
162
- }), this._width = t, this._height = n, this._renderer.setSize(t, n), this._renderer.setClearColor(16777215, 0), this._renderer.outputColorSpace = s;
162
+ }), this._width = t, this._height = n, this._renderer.setSize(t, n), this._renderer.setClearColor(16777215, 0), this._renderer.outputColorSpace = l;
163
163
  }
164
164
  addListener(e) {
165
165
  this._listeners.add(e);
@@ -178,7 +178,7 @@ var z = class {
178
178
  return {
179
179
  name: e.path.replace(".glb", ".png"),
180
180
  url: this._prefix + e.path,
181
- position: new o(e.camera.position.x, e.camera.position.z, -e.camera.position.y),
181
+ position: new c(e.camera.position.x, e.camera.position.z, -e.camera.position.y),
182
182
  fov: e.camera.fieldOfView * 2,
183
183
  yaw: e.camera.rotation.z,
184
184
  pitch: e.camera.rotation.x
@@ -226,7 +226,7 @@ var z = class {
226
226
  this._sceneManager.clearScene();
227
227
  }
228
228
  loadGLB(e, t = 1, n) {
229
- return this._currentIdOrUrl = e, this._rapiAccess.trackView(e), this._sceneManager.loadGLB(e, !0, new o(t, t, t), n);
229
+ return this._currentIdOrUrl = e, this._rapiAccess.trackView(e), this._sceneManager.loadGLB(e, !0, new c(t, t, t), n);
230
230
  }
231
231
  loadStaticItem(e, t) {
232
232
  return this._currentIdOrUrl = e, this._rapiAccess.trackView(e), this._sceneManager.loadStaticItem(e, t);
@@ -246,7 +246,7 @@ var z = class {
246
246
  let e = new z(this._sceneManager, t, n);
247
247
  e.addListener(this._sceneManager), e.start(r.items).then((t) => {
248
248
  t.generateAsync({ type: "blob" }).then((t) => {
249
- f("content.zip", URL.createObjectURL(t)), e.removeListener(this._sceneManager);
249
+ m("content.zip", URL.createObjectURL(t)), e.removeListener(this._sceneManager);
250
250
  });
251
251
  });
252
252
  });
@@ -296,18 +296,18 @@ var z = class {
296
296
  return this._globalCallback;
297
297
  }
298
298
  };
299
- d([u, l("design:type", Object)], V.prototype, "_rapiAccess", void 0), d([u, l("design:type", Object)], V.prototype, "_domHelper", void 0), d([u, l("design:type", Object)], V.prototype, "_scriptLoader", void 0), d([u, l("design:type", Object)], V.prototype, "_lifeCycleManager", void 0), d([u, l("design:type", Object)], V.prototype, "_initData", void 0), d([u, l("design:type", Object)], V.prototype, "_globalInitData", void 0), d([u, l("design:type", Object)], V.prototype, "_globalCallback", void 0), d([u, l("design:type", Object)], V.prototype, "_unitFormatter", void 0), d([u, l("design:type", Object)], V.prototype, "_idbManager", void 0);
299
+ p([f, d("design:type", Object)], V.prototype, "_rapiAccess", void 0), p([f, d("design:type", Object)], V.prototype, "_domHelper", void 0), p([f, d("design:type", Object)], V.prototype, "_scriptLoader", void 0), p([f, d("design:type", Object)], V.prototype, "_lifeCycleManager", void 0), p([f, d("design:type", Object)], V.prototype, "_initData", void 0), p([f, d("design:type", Object)], V.prototype, "_globalInitData", void 0), p([f, d("design:type", Object)], V.prototype, "_globalCallback", void 0), p([f, d("design:type", Object)], V.prototype, "_unitFormatter", void 0), p([f, d("design:type", Object)], V.prototype, "_idbManager", void 0);
300
300
  //#endregion
301
301
  //#region packages/glb-viewer-core/src/input/glb-input-manager.ts
302
302
  var H = class extends v {}, U = [
303
- new D("script-loader", F),
304
- new D("glb-input-manager", H, M.CONTEXT),
305
- new D("logger", x),
306
- new D("rapi-access", w)
307
- ], W = class extends E {
303
+ new j("script-loader", F),
304
+ new j("glb-input-manager", H, O.CONTEXT),
305
+ new j("logger", S),
306
+ new j("rapi-access", C)
307
+ ], W = class extends D {
308
308
  setupGlobals() {}
309
309
  setupDependencies() {
310
- k.setup(U), this.lookup("logger", this._context);
310
+ A.setup(U), this.lookup("logger", this._context);
311
311
  }
312
312
  cleanUpGlobals() {
313
313
  throw Error("Method not implemented.");
@@ -322,10 +322,10 @@ var H = class extends v {}, U = [
322
322
  return this._viewer;
323
323
  }
324
324
  getContextName() {
325
- return j.GLB_VIEWER;
325
+ return M.GLB_VIEWER;
326
326
  }
327
327
  };
328
328
  //#endregion
329
329
  export { V as n, W as t };
330
330
 
331
- //# sourceMappingURL=glb-viewer-B95ZWAO-.mjs.map
331
+ //# sourceMappingURL=glb-viewer-I86nXb0A.mjs.map