@roomle/web-sdk 2.89.0 → 2.90.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 (221) hide show
  1. package/lib/{banana-for-scale-7428c6ea.js → banana-for-scale-90e0a2ce.js} +2 -2
  2. package/lib/{banana-for-scale-7428c6ea.js.map → banana-for-scale-90e0a2ce.js.map} +1 -1
  3. package/lib/{banana-for-scale-f86f4987.nomodule.js → banana-for-scale-f5d5b3e7.nomodule.js} +2 -2
  4. package/lib/{banana-for-scale-f86f4987.nomodule.js.map → banana-for-scale-f5d5b3e7.nomodule.js.map} +1 -1
  5. package/lib/camera-behaviour-1595b02e.js +2 -0
  6. package/lib/{camera-behaviour-b9ce9523.js.map → camera-behaviour-1595b02e.js.map} +1 -1
  7. package/lib/camera-behaviour-77566ed2.nomodule.js +2 -0
  8. package/lib/{camera-behaviour-43652f02.nomodule.js.map → camera-behaviour-77566ed2.nomodule.js.map} +1 -1
  9. package/lib/{component-dimensioning-e618f2c4.js → component-dimensioning-37b3bd95.js} +2 -2
  10. package/lib/component-dimensioning-37b3bd95.js.map +1 -0
  11. package/lib/{component-dimensioning-9a4693bd.nomodule.js → component-dimensioning-69c4aa82.nomodule.js} +2 -2
  12. package/lib/component-dimensioning-69c4aa82.nomodule.js.map +1 -0
  13. package/lib/{component-raycast-helper-ac7ab652.nomodule.js → component-raycast-helper-54047ec8.nomodule.js} +2 -2
  14. package/lib/component-raycast-helper-54047ec8.nomodule.js.map +1 -0
  15. package/lib/{component-raycast-helper-2322d2eb.js → component-raycast-helper-5bdcfc67.js} +2 -2
  16. package/lib/component-raycast-helper-5bdcfc67.js.map +1 -0
  17. package/lib/{configurator-41ceddf2.nomodule.js → configurator-992a594a.nomodule.js} +2 -2
  18. package/lib/configurator-992a594a.nomodule.js.map +1 -0
  19. package/lib/{configurator-2d8344bd.js → configurator-ec1316f4.js} +2 -2
  20. package/lib/configurator-ec1316f4.js.map +1 -0
  21. package/lib/configurator-main-da750537.js +2 -0
  22. package/lib/configurator-main-da750537.js.map +1 -0
  23. package/lib/configurator-main.nomodule.js +1 -1
  24. package/lib/{continuous-drawing-helper-ffcc1e62.js → continuous-drawing-helper-21df7761.js} +2 -2
  25. package/lib/continuous-drawing-helper-21df7761.js.map +1 -0
  26. package/lib/{continuous-drawing-helper-405d8b9c.nomodule.js → continuous-drawing-helper-a089c197.nomodule.js} +2 -2
  27. package/lib/continuous-drawing-helper-a089c197.nomodule.js.map +1 -0
  28. package/lib/{default-light-setting-cd1f564d.nomodule.js → default-light-setting-0c472a1c.nomodule.js} +2 -2
  29. package/lib/default-light-setting-0c472a1c.nomodule.js.map +1 -0
  30. package/lib/{default-light-setting-2f58f07d.js → default-light-setting-8195fd6d.js} +2 -2
  31. package/lib/default-light-setting-8195fd6d.js.map +1 -0
  32. package/lib/definitions/common-core/src/cameracontrol/glb-viewer-camera-behaviour.d.ts +2 -0
  33. package/lib/definitions/common-core/src/configurator-kernel-access.d.ts +5 -2
  34. package/lib/definitions/common-core/src/main.d.ts +2 -0
  35. package/lib/definitions/common-core/src/services/global-callback.d.ts +4 -0
  36. package/lib/definitions/common-core/src/utils/init-data.d.ts +1 -0
  37. package/lib/definitions/common-core/src/utils/shims.d.ts +5 -0
  38. package/lib/definitions/common-core/src/utils/ui-callback.d.ts +1 -0
  39. package/lib/definitions/common-core/src/webgl/scene-manager.d.ts +2 -1
  40. package/lib/definitions/configurator-core/src/static-files/settings.d.ts +1 -0
  41. package/lib/definitions/configurator-core/src/webgl/configurator-scene-manager.d.ts +4 -2
  42. package/lib/definitions/glb-viewer-core/src/roomle-glb-viewer.d.ts +10 -0
  43. package/lib/definitions/glb-viewer-core/src/webgl/glb-viewer-scene-manager.d.ts +3 -0
  44. package/lib/definitions/material-viewer/src/roomle-material-viewer.d.ts +7 -0
  45. package/lib/definitions/planner-core/src/external-object-api-callbacks.d.ts +123 -0
  46. package/lib/definitions/planner-core/src/external-object-api.d.ts +91 -0
  47. package/lib/definitions/planner-core/src/roomle-planner-ui-callback.d.ts +71 -1
  48. package/lib/definitions/planner-core/src/roomle-planner.d.ts +25 -3
  49. package/lib/definitions/planner-core/src/services/planner-kernel-access.d.ts +28 -9
  50. package/lib/definitions/planner-core/src/utils/map-to-ui-plan-objects.d.ts +1 -1
  51. package/lib/definitions/planner-core/src/webgl/planner-scene-event-handler.d.ts +1 -0
  52. package/lib/definitions/planner-core/src/webgl/planner-scene-manager.d.ts +3 -1
  53. package/lib/definitions/typings/planner-kernel-container.d.ts +8 -4
  54. package/lib/definitions/typings/planner.d.ts +2 -0
  55. package/lib/definitions/typings/rapi-types.d.ts +1 -0
  56. package/lib/{dimensioning-helper-b94cde35.js → dimensioning-helper-affcf7b8.js} +2 -2
  57. package/lib/{dimensioning-helper-b94cde35.js.map → dimensioning-helper-affcf7b8.js.map} +1 -1
  58. package/lib/{dimensioning-helper-5d9d30f9.nomodule.js → dimensioning-helper-cd9d8f16.nomodule.js} +2 -2
  59. package/lib/{dimensioning-helper-5d9d30f9.nomodule.js.map → dimensioning-helper-cd9d8f16.nomodule.js.map} +1 -1
  60. package/lib/glb-viewer-7e9ea485.js +2 -0
  61. package/lib/{glb-viewer-b8230cd7.js.map → glb-viewer-7e9ea485.js.map} +1 -1
  62. package/lib/glb-viewer-camera-behaviour-652321cd.js +2 -0
  63. package/lib/glb-viewer-camera-behaviour-652321cd.js.map +1 -0
  64. package/lib/glb-viewer-camera-behaviour-6748ae91.nomodule.js +2 -0
  65. package/lib/glb-viewer-camera-behaviour-6748ae91.nomodule.js.map +1 -0
  66. package/lib/glb-viewer-efe6c3a4.nomodule.js +2 -0
  67. package/lib/{glb-viewer-260047bc.nomodule.js.map → glb-viewer-efe6c3a4.nomodule.js.map} +1 -1
  68. package/lib/glb-viewer-main-49259f4e.js +2 -0
  69. package/lib/glb-viewer-main-49259f4e.js.map +1 -0
  70. package/lib/glb-viewer-main.nomodule.js +1 -1
  71. package/lib/legacy/{banana-for-scale-b3f452d8.legacy.js → banana-for-scale-ec631899.legacy.js} +2 -2
  72. package/lib/legacy/{banana-for-scale-b3f452d8.legacy.js.map → banana-for-scale-ec631899.legacy.js.map} +1 -1
  73. package/lib/legacy/camera-behaviour-b1d07dd7.legacy.js +2 -0
  74. package/lib/legacy/{camera-behaviour-9f5b20f1.legacy.js.map → camera-behaviour-b1d07dd7.legacy.js.map} +1 -1
  75. package/lib/legacy/{component-dimensioning-71ecb8d7.legacy.js → component-dimensioning-342f21ed.legacy.js} +2 -2
  76. package/lib/legacy/component-dimensioning-342f21ed.legacy.js.map +1 -0
  77. package/lib/legacy/{component-raycast-helper-f494197b.legacy.js → component-raycast-helper-de2e8c71.legacy.js} +2 -2
  78. package/lib/legacy/component-raycast-helper-de2e8c71.legacy.js.map +1 -0
  79. package/lib/legacy/{configurator-341eac3b.legacy.js → configurator-4cccad7c.legacy.js} +2 -2
  80. package/lib/legacy/configurator-4cccad7c.legacy.js.map +1 -0
  81. package/lib/legacy/configurator-main.legacy.js +1 -1
  82. package/lib/legacy/{continuous-drawing-helper-15c1080c.legacy.js → continuous-drawing-helper-29d8666b.legacy.js} +2 -2
  83. package/lib/legacy/continuous-drawing-helper-29d8666b.legacy.js.map +1 -0
  84. package/lib/legacy/{default-light-setting-a84d4ce3.legacy.js → default-light-setting-07f84971.legacy.js} +2 -2
  85. package/lib/legacy/default-light-setting-07f84971.legacy.js.map +1 -0
  86. package/lib/legacy/{dimensioning-helper-21cd7ec9.legacy.js → dimensioning-helper-05605274.legacy.js} +2 -2
  87. package/lib/legacy/{dimensioning-helper-21cd7ec9.legacy.js.map → dimensioning-helper-05605274.legacy.js.map} +1 -1
  88. package/lib/legacy/glb-viewer-9b0c61ff.legacy.js +2 -0
  89. package/lib/legacy/{glb-viewer-8948dbf1.legacy.js.map → glb-viewer-9b0c61ff.legacy.js.map} +1 -1
  90. package/lib/legacy/glb-viewer-camera-behaviour-5325540e.legacy.js +2 -0
  91. package/lib/legacy/glb-viewer-camera-behaviour-5325540e.legacy.js.map +1 -0
  92. package/lib/legacy/glb-viewer-main.legacy.js +1 -1
  93. package/lib/legacy/{material-viewer-f920cf61.legacy.js → material-viewer-46f4ee5d.legacy.js} +2 -2
  94. package/lib/legacy/material-viewer-46f4ee5d.legacy.js.map +1 -0
  95. package/lib/legacy/material-viewer-main.legacy.js +1 -1
  96. package/lib/{planner-dc46cffa.nomodule.js.map → legacy/planner-f9d430d0.legacy.js} +2 -1
  97. package/lib/legacy/planner-f9d430d0.legacy.js.map +1 -0
  98. package/lib/legacy/planner-main.legacy.js +1 -1
  99. package/lib/legacy/roomle-configurator-5d72943d.legacy.js +2 -0
  100. package/lib/legacy/roomle-configurator-5d72943d.legacy.js.map +1 -0
  101. package/lib/legacy/roomle-dependency-injection-c83bbfef.legacy.js +9 -0
  102. package/lib/legacy/{roomle-dependency-injection-14f08323.legacy.js.map → roomle-dependency-injection-c83bbfef.legacy.js.map} +1 -1
  103. package/lib/legacy/roomle-sdk.legacy.js +1 -1
  104. package/lib/legacy/{script-loader-b290b011.legacy.js → script-loader-4ca359ab.legacy.js} +2 -2
  105. package/lib/legacy/script-loader-4ca359ab.legacy.js.map +1 -0
  106. package/lib/legacy/static/ConfiguratorKernel-fc9719e6e952bf9e.wasm +0 -0
  107. package/lib/legacy/static/RoomleCore-2a0c2fdf670cf8d2.wasm +0 -0
  108. package/lib/legacy/static/RoomleToolsCore-e982954ac18cee54.wasm +0 -0
  109. package/lib/legacy/static/default-external-object-api-configuration-f4223d765ebaf6d6.json +70 -0
  110. package/lib/legacy/{stats-helper-c24a34c6.legacy.js → stats-helper-ef682f94.legacy.js} +2 -2
  111. package/lib/legacy/stats-helper-ef682f94.legacy.js.map +1 -0
  112. package/lib/legacy/{tools-core-661d8607.legacy.js → tools-core-d0583394.legacy.js} +2 -2
  113. package/lib/legacy/tools-core-d0583394.legacy.js.map +1 -0
  114. package/lib/{material-viewer-710e51f0.nomodule.js → material-viewer-01d8adf8.nomodule.js} +2 -2
  115. package/lib/material-viewer-01d8adf8.nomodule.js.map +1 -0
  116. package/lib/{material-viewer-b2bfab43.js → material-viewer-4fa8faae.js} +2 -2
  117. package/lib/material-viewer-4fa8faae.js.map +1 -0
  118. package/lib/material-viewer-main-80fa12ef.js +2 -0
  119. package/lib/material-viewer-main-80fa12ef.js.map +1 -0
  120. package/lib/material-viewer-main.nomodule.js +1 -1
  121. package/lib/planner-98ee73ff.js +2 -0
  122. package/lib/planner-98ee73ff.js.map +1 -0
  123. package/lib/planner-c3d68986.nomodule.js +2 -0
  124. package/lib/planner-c3d68986.nomodule.js.map +1 -0
  125. package/lib/planner-main-5277805f.js +2 -0
  126. package/lib/planner-main-5277805f.js.map +1 -0
  127. package/lib/planner-main.nomodule.js +1 -1
  128. package/lib/roomle-configurator-7e237e93.js +2 -0
  129. package/lib/roomle-configurator-7e237e93.js.map +1 -0
  130. package/lib/roomle-configurator-9f377d31.nomodule.js +2 -0
  131. package/lib/roomle-configurator-9f377d31.nomodule.js.map +1 -0
  132. package/lib/{roomle-dependency-injection-edb9b846.js → roomle-dependency-injection-939ff084.js} +3 -3
  133. package/lib/{roomle-dependency-injection-edb9b846.js.map → roomle-dependency-injection-939ff084.js.map} +1 -1
  134. package/lib/{roomle-dependency-injection-c8484fe9.nomodule.js → roomle-dependency-injection-e9272cf4.nomodule.js} +3 -3
  135. package/lib/{roomle-dependency-injection-c8484fe9.nomodule.js.map → roomle-dependency-injection-e9272cf4.nomodule.js.map} +1 -1
  136. package/lib/{roomle-sdk-592f3c36.js → roomle-sdk-8eb58c7c.js} +2 -2
  137. package/lib/roomle-sdk-8eb58c7c.js.map +1 -0
  138. package/lib/roomle-sdk.nomodule.js +1 -1
  139. package/lib/{script-loader-ecbdc7e4.nomodule.js → script-loader-0744c102.nomodule.js} +2 -2
  140. package/lib/script-loader-0744c102.nomodule.js.map +1 -0
  141. package/lib/{script-loader-afe6afe8.js → script-loader-1ea7c01a.js} +2 -2
  142. package/lib/script-loader-1ea7c01a.js.map +1 -0
  143. package/lib/static/ConfiguratorKernel-fc9719e6e952bf9e.wasm +0 -0
  144. package/lib/static/RoomleCore-2a0c2fdf670cf8d2.wasm +0 -0
  145. package/lib/static/RoomleToolsCore-e982954ac18cee54.wasm +0 -0
  146. package/lib/static/default-external-object-api-configuration-f4223d765ebaf6d6.json +70 -0
  147. package/lib/{stats-helper-9d3fdd3a.nomodule.js → stats-helper-9defa0c3.nomodule.js} +2 -2
  148. package/lib/stats-helper-9defa0c3.nomodule.js.map +1 -0
  149. package/lib/{stats-helper-f99231bd.js → stats-helper-a0984754.js} +2 -2
  150. package/lib/stats-helper-a0984754.js.map +1 -0
  151. package/lib/{tools-core-f49e03a2.nomodule.js → tools-core-0258cde5.nomodule.js} +2 -2
  152. package/lib/tools-core-0258cde5.nomodule.js.map +1 -0
  153. package/lib/{tools-core-013b69d1.js → tools-core-1ed5f2cf.js} +2 -2
  154. package/lib/tools-core-1ed5f2cf.js.map +1 -0
  155. package/package.json +2 -2
  156. package/lib/camera-behaviour-43652f02.nomodule.js +0 -2
  157. package/lib/camera-behaviour-b9ce9523.js +0 -2
  158. package/lib/component-dimensioning-9a4693bd.nomodule.js.map +0 -1
  159. package/lib/component-dimensioning-e618f2c4.js.map +0 -1
  160. package/lib/component-raycast-helper-2322d2eb.js.map +0 -1
  161. package/lib/component-raycast-helper-ac7ab652.nomodule.js.map +0 -1
  162. package/lib/configurator-2d8344bd.js.map +0 -1
  163. package/lib/configurator-41ceddf2.nomodule.js.map +0 -1
  164. package/lib/configurator-main-bf8d09c4.js +0 -2
  165. package/lib/configurator-main-bf8d09c4.js.map +0 -1
  166. package/lib/continuous-drawing-helper-405d8b9c.nomodule.js.map +0 -1
  167. package/lib/continuous-drawing-helper-ffcc1e62.js.map +0 -1
  168. package/lib/default-light-setting-2f58f07d.js.map +0 -1
  169. package/lib/default-light-setting-cd1f564d.nomodule.js.map +0 -1
  170. package/lib/glb-viewer-260047bc.nomodule.js +0 -2
  171. package/lib/glb-viewer-b8230cd7.js +0 -2
  172. package/lib/glb-viewer-camera-behaviour-bb5d665c.nomodule.js +0 -2
  173. package/lib/glb-viewer-camera-behaviour-bb5d665c.nomodule.js.map +0 -1
  174. package/lib/glb-viewer-camera-behaviour-c8770d6f.js +0 -2
  175. package/lib/glb-viewer-camera-behaviour-c8770d6f.js.map +0 -1
  176. package/lib/glb-viewer-main-d2f400c4.js +0 -2
  177. package/lib/glb-viewer-main-d2f400c4.js.map +0 -1
  178. package/lib/legacy/camera-behaviour-9f5b20f1.legacy.js +0 -2
  179. package/lib/legacy/component-dimensioning-71ecb8d7.legacy.js.map +0 -1
  180. package/lib/legacy/component-raycast-helper-f494197b.legacy.js.map +0 -1
  181. package/lib/legacy/configurator-341eac3b.legacy.js.map +0 -1
  182. package/lib/legacy/continuous-drawing-helper-15c1080c.legacy.js.map +0 -1
  183. package/lib/legacy/default-light-setting-a84d4ce3.legacy.js.map +0 -1
  184. package/lib/legacy/glb-viewer-8948dbf1.legacy.js +0 -2
  185. package/lib/legacy/glb-viewer-camera-behaviour-99467597.legacy.js +0 -2
  186. package/lib/legacy/glb-viewer-camera-behaviour-99467597.legacy.js.map +0 -1
  187. package/lib/legacy/material-viewer-f920cf61.legacy.js.map +0 -1
  188. package/lib/legacy/planner-4a0f8e20.legacy.js +0 -2
  189. package/lib/legacy/planner-4a0f8e20.legacy.js.map +0 -1
  190. package/lib/legacy/roomle-configurator-27c46725.legacy.js +0 -2
  191. package/lib/legacy/roomle-configurator-27c46725.legacy.js.map +0 -1
  192. package/lib/legacy/roomle-dependency-injection-14f08323.legacy.js +0 -9
  193. package/lib/legacy/script-loader-b290b011.legacy.js.map +0 -1
  194. package/lib/legacy/static/ConfiguratorKernel-12b6adb96ca3adde.wasm +0 -0
  195. package/lib/legacy/static/RoomleCore-c85533e04f7ad99d.wasm +0 -0
  196. package/lib/legacy/static/RoomleToolsCore-e3f4a53eb148e920.wasm +0 -0
  197. package/lib/legacy/stats-helper-c24a34c6.legacy.js.map +0 -1
  198. package/lib/legacy/tools-core-661d8607.legacy.js.map +0 -1
  199. package/lib/material-viewer-710e51f0.nomodule.js.map +0 -1
  200. package/lib/material-viewer-b2bfab43.js.map +0 -1
  201. package/lib/material-viewer-main-bb293110.js +0 -2
  202. package/lib/material-viewer-main-bb293110.js.map +0 -1
  203. package/lib/planner-79c09fe7.js +0 -2
  204. package/lib/planner-79c09fe7.js.map +0 -1
  205. package/lib/planner-dc46cffa.nomodule.js +0 -2
  206. package/lib/planner-main-3986faa6.js +0 -2
  207. package/lib/planner-main-3986faa6.js.map +0 -1
  208. package/lib/roomle-configurator-4c3e832d.nomodule.js +0 -2
  209. package/lib/roomle-configurator-4c3e832d.nomodule.js.map +0 -1
  210. package/lib/roomle-configurator-6b7c59e8.js +0 -2
  211. package/lib/roomle-configurator-6b7c59e8.js.map +0 -1
  212. package/lib/roomle-sdk-592f3c36.js.map +0 -1
  213. package/lib/script-loader-afe6afe8.js.map +0 -1
  214. package/lib/script-loader-ecbdc7e4.nomodule.js.map +0 -1
  215. package/lib/static/ConfiguratorKernel-12b6adb96ca3adde.wasm +0 -0
  216. package/lib/static/RoomleCore-c85533e04f7ad99d.wasm +0 -0
  217. package/lib/static/RoomleToolsCore-e3f4a53eb148e920.wasm +0 -0
  218. package/lib/stats-helper-9d3fdd3a.nomodule.js.map +0 -1
  219. package/lib/stats-helper-f99231bd.js.map +0 -1
  220. package/lib/tools-core-013b69d1.js.map +0 -1
  221. package/lib/tools-core-f49e03a2.nomodule.js.map +0 -1
@@ -0,0 +1,91 @@
1
+ export interface ExternalObjectUiConfiguration {
2
+ attributeGroupsVisibleInPlanner?: string | string[];
3
+ showPossibleSubModules?: boolean;
4
+ animatedOpenClose?: boolean;
5
+ }
6
+ export interface ExternalObjectMaterialConfiguration {
7
+ defaultMaterial?: string;
8
+ replaceUnmappedMaterialsWithDefault?: boolean;
9
+ materialMapping?: Array<{
10
+ materialName: string;
11
+ materialId: string;
12
+ }>;
13
+ }
14
+ export interface ExternalObjectDebugConfiguration {
15
+ createDebugGeometry?: boolean;
16
+ }
17
+ export interface ExternalObjectApiConfiguration {
18
+ legacyApi?: boolean;
19
+ loadExternalObjectsFromPlan?: boolean;
20
+ uiConfiguration?: ExternalObjectUiConfiguration;
21
+ materialConfiguration?: ExternalObjectMaterialConfiguration;
22
+ debugConfiguration?: ExternalObjectDebugConfiguration;
23
+ }
24
+ export interface ExternalObjectAPI {
25
+ /**
26
+ * With "configureExternalObjectApi" the default representation of the objects and UI and
27
+ * the default behavior when interacting with external objects can be completely or partially overwritten.
28
+ * This configuration should be set prior to loading plans or objects.
29
+ * @param configurationJson The configuration JSON as string or object.
30
+ */
31
+ configureExternalObjectApi(configurationJson: string | ExternalObjectApiConfiguration): Promise<void>;
32
+ /**
33
+ * "loadExternalObjectLibrary" loads the master data of a library.
34
+ * If master data has already been loaded for the library, it is completely replaced by the new master data.
35
+ * @param libraryJson The library JSON as string or object.
36
+ */
37
+ loadExternalObjectLibrary(libraryJson: string | object): void;
38
+ /**
39
+ * "loadExternalObjectGroup" loads a group of modules and places them in the plan.
40
+ * If the group has already been loaded, it is completely replaced by the new group.
41
+ * This function therefore has 2 use cases:
42
+ * 1. Load a new group of modules
43
+ * 2. Update or modify an existing group of modules
44
+ * The initial location of the group and the IDs of the modules are defined in the group JSON.
45
+ * @param groupJson The group JSON as string or object.
46
+ * @param findFreeSpaceInPlan A free space is automatically searched for in the plane.
47
+ */
48
+ loadExternalObjectGroup(groupJson: string | object, findFreeSpaceInPlan: boolean): Promise<void>;
49
+ /**
50
+ * "removeExternalObjectGroup" removes a group and all its modules from the plan.
51
+ * @param groupId The ID of the group of modules.
52
+ */
53
+ removeExternalObjectGroup(groupId: string): Promise<void>;
54
+ /**
55
+ * "removeExternalObjectRootModule" removes a root module from a group and splits the remaining group if the removed root module is located between other root modules.
56
+ * If the group consists of only one root module, the group is removed.
57
+ * @param groupId The ID of the root module.
58
+ */
59
+ removeExternalObjectRootModule(rootModuleId: string): void;
60
+ /**
61
+ * "selectExternalObjectGroup" changes the selected object in the scene.
62
+ * The function selects a complete group of root modules and always switches to planning mode.
63
+ * If the group consists of only one root module, this is equivalent to selecting a single root module.
64
+ * @param groupId The ID of the group of modules.
65
+ */
66
+ selectExternalObjectGroup(groupId: string): Promise<void>;
67
+ /**
68
+ * "selectExternalObjectRootModule" changes the selected object in the scene.
69
+ * The function selects a root module within a group and always switches to planning mode.
70
+ * @param rootModuleId The ID of the root module.
71
+ */
72
+ selectExternalObjectRootModule(rootModuleId: string): Promise<void>;
73
+ /**
74
+ * "selectExternalObjectSubModule" changes the selected object in the scene.
75
+ * The function selects a sub module a root module and always switches to configuration mode.
76
+ * @param rootModuleId The ID of the root module.
77
+ * @param subModuleId The ID of the sub module.
78
+ */
79
+ selectExternalObjectSubModule(rootModuleId: string, subModuleId: string): Promise<void>;
80
+ /**
81
+ * "openOrCloseGeometryOfExternalObject" switches the geometry of the modules between closed and open representation.
82
+ * The function can switch the geometry of the group or the singe root module with the ID "groupIdOrRootModuleId".
83
+ * If "groupIdOrRootModuleId" is the ID of a root module and the "subModuleId" is also specified, only this one sub-module is opened or closed.
84
+ * @param groupIdOrRootModuleId The ID of the group of modules or the ID of the root module.
85
+ * @param subModuleId The ID of the sub module.
86
+ * @param open If true, the modules are opened, if false, they are closed, if the geometry is already in the desired state, nothing happens.
87
+ * @param animate If true the opening or closing is animated else the geometry is switched instantly.
88
+ */
89
+ openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean): Promise<void>;
90
+ }
91
+ export declare const getDefaultExternalObjectApiConfiguration: () => Promise<ExternalObjectApiConfiguration>;
@@ -14,6 +14,7 @@ import type { MeasurementLineDimension, MeasurementLineDimensionTransferable } f
14
14
  import type { ConstructionMeasurementsTransferable } from './utils/measurements';
15
15
  import type { FloorAreaDataTransferable } from './view-model/floor-plan-element-view-model';
16
16
  import { type BASE_CONTEXT } from '../../common-core/src/main';
17
+ import type { ExternalObjectGroup, ExternalObjectGroupAndModules, ExternalObjectGroupPosition, ExternalObjectUiCallback } from './external-object-api-callbacks';
17
18
  export interface SelectionPayload {
18
19
  item?: RapiItem;
19
20
  configuration?: RapiConfiguration;
@@ -29,7 +30,7 @@ export declare const PLAN_ELEMENT_CHANGE_TYPES: {
29
30
  readonly CHANGED: "changed";
30
31
  readonly REMOVED: "removed";
31
32
  };
32
- export default class RoomlePlannerUiCallback extends UiCallback {
33
+ export default class RoomlePlannerUiCallback extends UiCallback implements ExternalObjectUiCallback {
33
34
  constructor(creator: string);
34
35
  onItemsLoaded: () => void;
35
36
  onCameraChanged: (type: Enumify<typeof CAMERA_TYPE>) => void;
@@ -150,10 +151,79 @@ export default class RoomlePlannerUiCallback extends UiCallback {
150
151
  * @param floorAreasData An array of objects, each representing the area and related data for each room within the floor plan.
151
152
  */
152
153
  onFloorPlanAreasUpdated: (floorAreasData: FloorAreaDataTransferable[]) => void;
154
+ /**
155
+ * Callback invoked when the selection of a component has been canceled.
156
+ */
157
+ onComponentSelectionCancel: () => void;
158
+ /**
159
+ * Callback invoked when a plan snapshot is saved.
160
+ * @param planId The ID of the plan snapshot.
161
+ */
162
+ onPlanSnapshotCreated: (planId: string) => void;
163
+ /**
164
+ * Callback invoked when an object is started to be configured.
165
+ */
166
+ onStartConfiguring: () => Promise<void>;
167
+ /**
168
+ * Callback invoked when configuration is finished.
169
+ */
170
+ onBackToPlanner: () => Promise<void>;
153
171
  /**
154
172
  * This callback is invoked when the context of the planner changes
155
173
  * For example when it switches from planner to configurator, or from planner to viewer
156
174
  * @param context
157
175
  */
158
176
  onContextChanged: (context: BASE_CONTEXT) => void;
177
+ /**
178
+ * documented in interface ExternalObjectUiCallback
179
+ */
180
+ onMergeExternalObjectGroup: (targetGroup: ExternalObjectGroupAndModules, sourceGroupId: string) => void;
181
+ /**
182
+ * documented in interface ExternalObjectUiCallback
183
+ */
184
+ onSplitExternalObjectGroup: (originalGroup: ExternalObjectGroupAndModules, newGroupedRootModules: ExternalObjectGroupAndModules | ExternalObjectGroupAndModules[]) => void;
185
+ /**
186
+ * documented in interface ExternalObjectUiCallback
187
+ */
188
+ onDeleteExternalObjectGroup: (groupIdToDelete: string) => void;
189
+ /**
190
+ * documented in interface ExternalObjectUiCallback
191
+ */
192
+ onDeleteExternalObjectRootModule: (_remainingGroup: ExternalObjectGroupAndModules, _rootModuleIdToDelete: string, _splitOffGroups?: ExternalObjectGroupAndModules[]) => void;
193
+ /**
194
+ * documented in interface ExternalObjectUiCallback
195
+ */
196
+ onDeleteExternalObjectSubModule: (rootModuleId: string, subModuleIdToDelete: string) => void;
197
+ /**
198
+ * documented in interface ExternalObjectUiCallback
199
+ */
200
+ onDuplicateExternalObjectGroup: (sourceGroupId: string, newGroupPosition: ExternalObjectGroupPosition) => void;
201
+ /**
202
+ * documented in interface ExternalObjectUiCallback
203
+ */
204
+ onMovedExternalObjectGroup: (group: ExternalObjectGroup) => void;
205
+ /**
206
+ * documented in interface ExternalObjectUiCallback
207
+ */
208
+ onExternalObjectEnvironmentChanged: (affectedGroupIds: string[]) => void;
209
+ /**
210
+ * documented in interface ExternalObjectUiCallback
211
+ */
212
+ onExternalObjectGroupChanged: (stringifiedGroupData: string) => void;
213
+ /**
214
+ * documented in interface ExternalObjectUiCallback
215
+ */
216
+ onExternalObjectGroupLoaded: (stringifiedGroupData: string) => void;
217
+ /**
218
+ * documented in interface ExternalObjectUiCallback
219
+ */
220
+ onExternalObjectAttributeChanged: (rootModuleId: string, subModuleId: string | null, attributeId: string, value: string) => void;
221
+ /**
222
+ * documented in interface ExternalObjectUiCallback
223
+ */
224
+ onExternalObjectModuleSelected: (groupId: string, rootModuleId: string | null, subModuleId: string | null) => void;
225
+ /**
226
+ * documented in interface ExternalObjectUiCallback
227
+ */
228
+ onExternalObjectSelectionCancel: () => void;
159
229
  }
@@ -22,6 +22,9 @@ import type WallPlanElementViewModel from './view-model/wall-plan-element-view-m
22
22
  import type ConfiguratorContext from '../../common-core/src/webgl/configurator-context';
23
23
  import type { PlanObject } from '../../typings/planner';
24
24
  import type IdbManager from '../../common-core/src/services/idb-manager';
25
+ import type { ExternalObjectAPI, ExternalObjectApiConfiguration } from './external-object-api';
26
+ import type { GlobalCallback } from '../../common-core/src/services/global-callback';
27
+ export type ID_TYPE = 'rml_id' | 'tc_id' | 'rml_serialized' | 'tc_serialized';
25
28
  export interface RoomlePlannerCallback {
26
29
  switchToConfigurator: () => Promise<Configurator>;
27
30
  switchToViewer: () => Promise<GlbViewer>;
@@ -57,7 +60,7 @@ export interface BatchPaintMaterial {
57
60
  rgbValue?: number;
58
61
  catalogItemId?: RapiId;
59
62
  }
60
- export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlannerCallback, GlobalAPI, Context, KernelUtilityForUi, ExternalEmbeddable<RoomlePlannerUiCallback>, RubensAPI {
63
+ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlannerCallback, GlobalAPI, Context, KernelUtilityForUi, ExternalEmbeddable<RoomlePlannerUiCallback>, RubensAPI, ExternalObjectAPI {
61
64
  _creator_: string;
62
65
  private _configuratorContext;
63
66
  private _domHelper;
@@ -72,6 +75,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
72
75
  protected _initData: InitData;
73
76
  protected _idbManager: IdbManager;
74
77
  private _globalInitData;
78
+ private _globalCallback;
75
79
  private _unitFormatter;
76
80
  private _planInteractionHandler;
77
81
  private _sceneManager;
@@ -222,7 +226,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
222
226
  * Disable the selection of multiple elements.
223
227
  */
224
228
  disableMultiselect(): void;
225
- dragInObject(id: RapiId, dragEvent: DragEvent): Promise<RuntimeId>;
229
+ dragInObject(idOrSerializedConfigString: string, dragEvent: DragEvent, type?: ID_TYPE): Promise<RuntimeId>;
226
230
  /**
227
231
  * enable snapping of object to object and object to wall
228
232
  */
@@ -295,7 +299,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
295
299
  * @param sceneEvents
296
300
  */
297
301
  setSceneEvents(sceneEvents: SceneEvents): void;
298
- saveCurrentPlanSnapshot(parentPlanId?: RapiId): Promise<RapiPlanSnapshotGetData>;
302
+ saveCurrentPlanSnapshot(parentPlanId?: RapiId, configurationHashOrGroupId?: string): Promise<RapiPlanSnapshotGetData>;
299
303
  getPlanXmlFrom(plan: RapiPlan | RapiPlanSnapshotGetData): any;
300
304
  moveCamera(cameraParameter: CameraParameter): Promise<void>;
301
305
  createNewSerializedConfiguration(configurationRuntimeId: number): Promise<ConfigurationString>;
@@ -355,4 +359,22 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
355
359
  resolveShortUrl(shortUrl: string): Promise<string>;
356
360
  enableEvents(): void;
357
361
  disableEvents(): void;
362
+ configureExternalObjectApi(configurationJson: string | ExternalObjectApiConfiguration): Promise<void>;
363
+ loadExternalObjectLibrary(libraryJson: string | object): void;
364
+ loadExternalObjectGroup(groupJson: string | object, findFreeSpaceInPlan: boolean): Promise<void>;
365
+ private _loadExternalObjectGroup;
366
+ removeExternalObjectGroup(groupId: string): Promise<void>;
367
+ removeExternalObjectRootModule(rootModuleId: string): void;
368
+ selectExternalObjectGroup(groupId: string): Promise<void>;
369
+ selectExternalObjectRootModule(rootModuleId: string): Promise<void>;
370
+ selectExternalObjectSubModule(rootModuleId: string, subModuleId: string): Promise<void>;
371
+ openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean): Promise<void>;
372
+ private _selectKernelComponent;
373
+ _selectExternalObjectGroup(groupId: string, switchToPlanner: boolean): Promise<void>;
374
+ _selectExternalObjectModule(rootModuleId: string, subModuleId: string | null, selectPlanObject: boolean, switchToConfigurator: boolean): Promise<void>;
375
+ /**
376
+ * @internal
377
+ * Use this callbacks to hook in your functionality
378
+ */
379
+ get globalCallbacks(): GlobalCallback;
358
380
  }
@@ -1,11 +1,12 @@
1
- import type { KernelEnum, RuntimeId } from '../../../typings/kernel';
1
+ import type { KernelComponent, KernelEnum, RuntimeId, PlanObject as ConfiguratorPlanObject } from '../../../typings/kernel';
2
2
  import type PlanObjectViewModel from '../../../common-core/src/view-model/plan-object-view-model';
3
3
  import type { KernelObject, Plan, PlanElement, PlanInteractionHandler, PlanModelViewHelper, PlanObject } from '../../../typings/planner';
4
- import type { RapiConfiguration, RapiItem } from '../../../typings/rapi-types';
4
+ import type { RapiConfiguration, RapiItem, RapiPlanSnapshotPostData } from '../../../typings/rapi-types';
5
5
  import type RoomlePlannerUiCallback from '../roomle-planner-ui-callback';
6
6
  import type PlanElementViewModel from '../../../common-core/src/view-model/plan-element-view-model';
7
7
  import type { Position3 } from '../../../common-core/src/common-interfaces';
8
8
  import ConfiguratorKernelAccess from '../../../common-core/src/configurator-kernel-access';
9
+ import type { ExternalObjectGroup, ExternalObjectGroupAndModules, ExternalObjectGroupPosition } from '../external-object-api-callbacks';
9
10
  export interface PlannerKernelCallbackI {
10
11
  handlerSwitchedPlans(fromPlan: Plan, toPlan: Plan): void;
11
12
  planCompletelyLoaded(plan: Plan): void;
@@ -62,14 +63,15 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
62
63
  planElementChanged(plan: Plan, element: KernelObject): void;
63
64
  planHistoryStateChanged(): void;
64
65
  planObjectConfigurationCreated(_plan: Plan, _element: PlanObject): void;
66
+ externalObjectConfigurationChanged(plan: Plan, planObject: PlanObject, configuration: string): void;
67
+ externalObjectConfigurationLoaded(plan: Plan, planObject: PlanObject, configuration: string): void;
68
+ externalObjectConfigurationDeleted(plan: Plan, planObject: PlanObject, uniqueId: string): void;
69
+ externalObjectComponentDeleted(plan: Plan, planObject: PlanObject, remainingGroupOrGroups: ExternalObjectGroupAndModules | ExternalObjectGroupAndModules[], deletedRootModuleId: string): void;
70
+ externalObjectConfigurationDuplicated(plan: Plan, planObject: PlanObject, sourceGroupId: string, newGroupPosition: ExternalObjectGroupPosition): void;
71
+ externalObjectConfigurationMoved(plan: Plan, planObject: PlanObject, movedGroup: ExternalObjectGroup): void;
72
+ externalObjectConfigurationsMerged(plan: Plan, planObject: PlanObject, mergedGroup: ExternalObjectGroupAndModules, sourceGroupId: string): void;
73
+ externalObjectComponentSplitOff(plan: Plan, planObject: PlanObject, splitGroups: ExternalObjectGroupAndModules[]): void;
65
74
  planObjectConfigurationLoaded(plan: Plan, element: PlanElement, success: boolean): void;
66
- externalObjectConfigurationChanged(_plan: Plan, _planObject: PlanObject, _configuration: string): void;
67
- externalObjectConfigurationLoaded(_plan: Plan, _planObject: PlanObject, _configuration: string): void;
68
- externalObjectConfigurationDeleted(_plan: Plan, _planObject: PlanObject, _uniqueId: string): void;
69
- externalObjectComponentDeleted(_plan: Plan, _planObject: PlanObject, _remainingGroup: object, _rootModuleId: string): void;
70
- externalObjectConfigurationDuplicated(_plan: Plan, _planObject: PlanObject, _sourceGroupId: string, _newGroupPosition: object): void;
71
- externalObjectConfigurationsMerged(_plan: Plan, _planObject: PlanObject, _mergedGroup: object, _sourceGroupId: string): void;
72
- externalObjectComponentSplitOff(_plan: Plan, _planObject: PlanObject, _splitGroup: object): void;
73
75
  requestCatalogItem(_catalogItemId: string): void;
74
76
  startedDrawing(): void;
75
77
  stoppedDrawing(): void;
@@ -84,4 +86,21 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
84
86
  coupleReferences(jsObject: any, coreReference: KernelObject): void;
85
87
  private _decoupleReferences;
86
88
  isConstructionPlanElement(planElement: PlanElement): boolean;
89
+ planObjectSelectionChanged(configurationRuntimeId: number, elementRuntimeId: number): void;
90
+ protected _componentSelectionChanged(planObject: ConfiguratorPlanObject, component: KernelComponent, planComponentSelection: boolean): void;
91
+ protected _externalObjectParameterChanged(objectOrComponentId: number, parameterKey: string, value: string): void;
92
+ protected _externalObjectConfigurationChanged(objectId: number, configuration: string): void;
93
+ protected _externalObjectConfigurationLoaded(objectId: number, configuration: string): void;
94
+ protected _externalObjectConfigurationDeleted(groupId: string): void;
95
+ protected _externalObjectComponentDeleted(remainingGroupOrGroups: ExternalObjectGroupAndModules | ExternalObjectGroupAndModules[], deletedRootModuleId: string): void;
96
+ _externalObjectConfigurationDuplicated(sourceGroupId: string, newGroupPosition: ExternalObjectGroupPosition): void;
97
+ _externalObjectConfigurationsMoved(movedGroup: ExternalObjectGroup): void;
98
+ _externalObjectConfigurationsMerged(mergedGroup: ExternalObjectGroupAndModules, sourceGroupId: string): void;
99
+ _externalObjectComponentSplitOff(splitGroups: ExternalObjectGroupAndModules[]): void;
100
+ planSnapshotCreated(planSnapshot: RapiPlanSnapshotPostData): void;
101
+ requestDeleteComponents(componentIds: number[]): void;
102
+ requestDeleteComponent(componentId: number): void;
103
+ requestDeletePlanComponent(componentId: number): void;
104
+ private _externalPlanComponentDeleted;
105
+ dockExternalObjectComponent(parentId: number, parentDockId: number, childId: number, childDockId: number): void;
87
106
  }
@@ -1,4 +1,4 @@
1
- import type { UiPlanObject } from '../../../typings/kernel';
1
+ import { type UiPlanObject } from '../../../typings/kernel';
2
2
  import type PlannerKernelAccess from '../services/planner-kernel-access';
3
3
  import type RapiAccess from '../../../common-core/src/rapi-access';
4
4
  export declare const mapToUiPlanObjects: (planObjects: any, plannerKernelAccess: PlannerKernelAccess, rapiAccess: RapiAccess) => Promise<UiPlanObject[]>;
@@ -69,6 +69,7 @@ export default class PlannerSceneEventHandler extends SceneEventHandler<SceneEve
69
69
  protected _initData: InitData;
70
70
  private _planViewModel;
71
71
  private _draggedObject;
72
+ private _lastDragPosition;
72
73
  private _hoveredObject;
73
74
  private _position;
74
75
  private _isDrawingEnabled;
@@ -1,7 +1,7 @@
1
1
  import type { Base64Image, CanvasOffset } from '../../../common-core/src/common-interfaces';
2
2
  import type { PlannerKernelCallbackI } from '../services/planner-kernel-access';
3
3
  import type { CancelSelectionReasons, Plan, PlanElement } from '../../../typings/planner';
4
- import type { KernelEnum, KernelPlanObject, KernelVector3, RuntimeId } from '../../../typings/kernel';
4
+ import { type KernelEnum, type KernelPlanObject, type KernelVector3, type RuntimeId } from '../../../typings/kernel';
5
5
  import PlannerSceneEventHandler from './planner-scene-event-handler';
6
6
  import type { BatchPaintMaterial, RoomlePlannerCallback, SceneEvents } from '../roomle-planner';
7
7
  import type PlanObjectViewModel from '../../../common-core/src/view-model/plan-object-view-model';
@@ -53,6 +53,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
53
53
  private _paperBackground;
54
54
  private _debugSpheres;
55
55
  constructor(creator: string, offset: CanvasOffset, plannerCallback: RoomlePlannerCallback, mode: Enumify<typeof CAMERA_TYPE>);
56
+ get configuratorContext(): import("../../../common-core/src/webgl/configurator-context").default;
56
57
  private _activateElement;
57
58
  planCleared(): void;
58
59
  planHistoryStateChanged(): void;
@@ -194,5 +195,6 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
194
195
  setMeasurementLineLength(measurementId: number, length: number, wallDirection: string): void;
195
196
  protected setEventHandlerObject(object: Object3D): void;
196
197
  protected _readyForRender(): void;
198
+ protected notifyPlannerOnComponentSelectionCancel(isExternalObject: boolean): void;
197
199
  }
198
200
  export {};
@@ -98,10 +98,12 @@ declare abstract class ConstructionObject extends PlanObjectPtr {
98
98
  getAttachedWall(): Wall;
99
99
  }
100
100
  declare class Wall extends PlanObjectPtr {
101
- thickness: number;
102
- height: number;
103
- leftMaterial: WallMaterial;
104
- rightMaterial: WallMaterial;
101
+ readonly thickness: number;
102
+ readonly height: number;
103
+ readonly minimumHeight: number;
104
+ readonly maximumHeight: number;
105
+ readonly leftMaterial: WallMaterial;
106
+ readonly rightMaterial: WallMaterial;
105
107
  getFrom(): Node;
106
108
  getTo(): Node;
107
109
  getCornerFromLeft(): KernelVector3f;
@@ -115,6 +117,8 @@ declare class Wall extends PlanObjectPtr {
115
117
  };
116
118
  getAttachedObjects(): PlanObjectObjectSet;
117
119
  getCenter(): KernelVector3f;
120
+ getHeightAt(aPoint: KernelVector3f): number;
121
+ getPointWithHeight(aHeight: number): KernelVector3f;
118
122
  }
119
123
  declare abstract class Floor extends PlanElement {
120
124
  area: number;
@@ -26,6 +26,7 @@ export interface Plan extends KernelObject {
26
26
  getPlanXML(includeRuntimeId: boolean, xmlVersion: number /** current version is 2 */): string;
27
27
  createPlanXmlWithSingleObject(object: PlanObject, includeRuntimeId: boolean, version: number): string;
28
28
  createPlanXmlWithSingleObjectFromId(objectId: string, includeRuntimeId: boolean, version: number): string;
29
+ createObjWithPlanContours(levels: number[]): string;
29
30
  getWallCount(): number;
30
31
  getId(): number;
31
32
  }
@@ -232,6 +233,7 @@ export interface PlanInteractionHandler {
232
233
  setMeasurePoint1(measure: PlanMeasure, point: KernelVector3f, snapToWalls: boolean, snapToObjects: boolean): void;
233
234
  setMeasurePoint2(measure: PlanMeasure, point: KernelVector3f, snapToWalls: boolean, snapToObjects: boolean): void;
234
235
  addMeasure(startPosition: KernelVector3f, endPosition: KernelVector3f): PlanMeasure;
236
+ setDiscardExternalObjectsOnLoad(discard: boolean): void;
235
237
  unit: string;
236
238
  enableRaster: boolean;
237
239
  customRaster: number;
@@ -340,6 +340,7 @@ export interface RapiConfiguration extends RapiJson {
340
340
  }
341
341
  export interface RapiConfigurationEnhanced extends RapiConfiguration {
342
342
  label: string;
343
+ externalObject: boolean;
343
344
  }
344
345
  export interface RapiElement extends RapiJson, RoomleSortable {
345
346
  id: RapiId;
@@ -1,2 +1,2 @@
1
- import{aV as normalizeRotation,H as dispose,_ as __decorate,i as inject,j as AsyncGuard,aW as AsyncDependencyLoader,ac as convertToTHREE}from"./roomle-dependency-injection-edb9b846.js";import{O as Object3D,a as Vector3,h as MeshBasicMaterial,w as DoubleSide,bn as MeshPhongMaterial,B as BufferGeometry,z as Mesh,Q as Quaternion,b8 as PlaneGeometry,K as Group,u as LineBasicMaterial,G as Line,b as BufferAttribute,bG as Line3,ad as Box3}from"./main-thread-to-worker-554053aa.js";import{T as TextGeometry}from"./TextGeometry-def07ca8.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new BufferGeometry;this._text=new Mesh(e,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new Mesh(e,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i){this._position.copy(e),this._cameraPosition=i,this._label=t;const s=this.getWorldPosition(new Vector3),n=this._cameraPosition.distanceTo(s),o=Math.max(.01,n/150),h=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=h,this._parameters.bevelSize=h,this._parameters.size=o,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new Quaternion;e.setFromAxisAngle(new Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new Vector3)}else if(this._updateText(this._textGeometry,new Quaternion,new Vector3),this._cameraPosition){const e=this.getWorldPosition(new Vector3),t=normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this.parent.rotation.y);this._text.rotation.y=t,this._plane.rotation.y=t}}_updateText(e,t,i){let s=new Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new Vector3);e.center(),this._text.position.copy(s),t&&this._text.quaternion.copy(t);let o=new PlaneGeometry(n.x+.02,n.y+.02,32);o.center(),this._plane.geometry=o,this._plane.position.copy(s),t&&this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._objectRotation=0,this._cameraPosition=new Vector3,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new Group,this._dimensionTextGroup=new Object3D,this._creator_=e,this._lineMaterial=new LineBasicMaterial({color:3618615,linewidth:2});let t=new BufferGeometry;this._widthLine=new Line(t,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new Line(t,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new Line(t,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/lato_regular_sub-d4b30187185acc59.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._dimensions||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new BufferGeometry,t=this._getWidthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let s=t.getCenter(new Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let e=new BufferGeometry,t=this._getHeightEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let s=t.getCenter(new Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let e=new BufferGeometry,t=this._getDepthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let s=t.getCenter(new Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(e){this._origin=convertToTHREE(e.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=convertToTHREE(e.size);const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToObject(e){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&e.add(this._dimensionLineGroup)}removeFromObject(e){e.remove(this._dimensionLineGroup),this.update()}addToUiScene(e){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this._dimensionTextGroup.rotation.y=this._objectRotation,e.add(this._dimensionTextGroup),this.update()}removeFromUiScene(e){e.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const e=this._getRotation();return e>Math.PI/2||e<-Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(this._dimensions.x+.05,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const e=this._getRotation();return e>0&&e<Math.PI/2?new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,this._dimensions.y+.05,.05)):e>Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):e<-Math.PI/2?new Line3(new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=e,this._dimensionTextGroup.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setObject(e,t=0){this._object=e,this._objectRotation=t}setUiScene(e){this._uiScene=e}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const e=this._object.getWorldPosition(new Vector3);return normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this._objectRotation)}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export{DimensioningHelper as default};
2
- //# sourceMappingURL=dimensioning-helper-b94cde35.js.map
1
+ import{aW as normalizeRotation,H as dispose,_ as __decorate,i as inject,j as AsyncGuard,aX as AsyncDependencyLoader,ac as convertToTHREE}from"./roomle-dependency-injection-939ff084.js";import{O as Object3D,a as Vector3,h as MeshBasicMaterial,w as DoubleSide,bn as MeshPhongMaterial,B as BufferGeometry,z as Mesh,Q as Quaternion,b8 as PlaneGeometry,K as Group,u as LineBasicMaterial,G as Line,b as BufferAttribute,bG as Line3,ad as Box3}from"./main-thread-to-worker-554053aa.js";import{T as TextGeometry}from"./TextGeometry-def07ca8.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new BufferGeometry;this._text=new Mesh(e,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new Mesh(e,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i){this._position.copy(e),this._cameraPosition=i,this._label=t;const s=this.getWorldPosition(new Vector3),n=this._cameraPosition.distanceTo(s),o=Math.max(.01,n/150),h=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=h,this._parameters.bevelSize=h,this._parameters.size=o,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new Quaternion;e.setFromAxisAngle(new Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new Vector3)}else if(this._updateText(this._textGeometry,new Quaternion,new Vector3),this._cameraPosition){const e=this.getWorldPosition(new Vector3),t=normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this.parent.rotation.y);this._text.rotation.y=t,this._plane.rotation.y=t}}_updateText(e,t,i){let s=new Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new Vector3);e.center(),this._text.position.copy(s),t&&this._text.quaternion.copy(t);let o=new PlaneGeometry(n.x+.02,n.y+.02,32);o.center(),this._plane.geometry=o,this._plane.position.copy(s),t&&this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._objectRotation=0,this._cameraPosition=new Vector3,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new Group,this._dimensionTextGroup=new Object3D,this._creator_=e,this._lineMaterial=new LineBasicMaterial({color:3618615,linewidth:2});let t=new BufferGeometry;this._widthLine=new Line(t,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new Line(t,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new Line(t,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/lato_regular_sub-d4b30187185acc59.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._dimensions||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new BufferGeometry,t=this._getWidthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let s=t.getCenter(new Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let e=new BufferGeometry,t=this._getHeightEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let s=t.getCenter(new Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let e=new BufferGeometry,t=this._getDepthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let s=t.getCenter(new Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(e){this._origin=convertToTHREE(e.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=convertToTHREE(e.size);const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToObject(e){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&e.add(this._dimensionLineGroup)}removeFromObject(e){e.remove(this._dimensionLineGroup),this.update()}addToUiScene(e){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this._dimensionTextGroup.rotation.y=this._objectRotation,e.add(this._dimensionTextGroup),this.update()}removeFromUiScene(e){e.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const e=this._getRotation();return e>Math.PI/2||e<-Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(this._dimensions.x+.05,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const e=this._getRotation();return e>0&&e<Math.PI/2?new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,this._dimensions.y+.05,.05)):e>Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):e<-Math.PI/2?new Line3(new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=e,this._dimensionTextGroup.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setObject(e,t=0){this._object=e,this._objectRotation=t}setUiScene(e){this._uiScene=e}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const e=this._object.getWorldPosition(new Vector3);return normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this._objectRotation)}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export{DimensioningHelper as default};
2
+ //# sourceMappingURL=dimensioning-helper-affcf7b8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-b94cde35.js","sources":["../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-d4b30187185acc59.json\""],"names":[],"mappings":"w7IAAe"}
1
+ {"version":3,"file":"dimensioning-helper-affcf7b8.js","sources":["../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-d4b30187185acc59.json\""],"names":[],"mappings":"w7IAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-c8484fe9.nomodule.js","./main-thread-to-worker-1a58abb6.nomodule.js","./TextGeometry-028ef3cf.nomodule.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,x,u,g,w,b,y,T,L,G;return{setters:[function(t){i=t.aV,e=t.H,s=t._,n=t.i,h=t.j,o=t.aW,a=t.ac},function(t){_=t.O,d=t.a,r=t.h,p=t.w,m=t.bn,l=t.B,c=t.z,x=t.Q,u=t.b8,g=t.K,w=t.u,b=t.G,y=t.b,T=t.bG,L=t.ad},function(t){G=t.T}],execute:function(){const z="component_dimensioning_plane_material",M="component_dimensioning_text_material";class j extends _{constructor(t){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=t,this._position=new d,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(z)?this._planeMaterial=this._cacheHolder.materialCache.get(z):(this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(z,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new m({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){let t=new l;this._text=new c(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new c(t,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(t,i,e){this._position.copy(t),this._cameraPosition=e,this._label=i;const s=this.getWorldPosition(new d),n=this._cameraPosition.distanceTo(s),h=Math.max(.01,n/150),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new x;t.setFromAxisAngle(new d(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new d)}else if(this._updateText(this._textGeometry,new x,new d),this._cameraPosition){const t=this.getWorldPosition(new d),e=i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this.parent.rotation.y);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(t,i,e){let s=new d;s.copy(this._position),e.x*=this._getXSign(),s.add(e);let n=t.boundingBox.getSize(new d);t.center(),this._text.position.copy(s),i&&this._text.quaternion.copy(i);let h=new u(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),i&&this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}s([n],j.prototype,"_cacheHolder",void 0);class D{constructor(t){this._objectRotation=0,this._cameraPosition=new d,this._topDimensions=!1,this._initialized=new h,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new g,this._dimensionTextGroup=new _,this._creator_=t,this._lineMaterial=new w({color:3618615,linewidth:2});let i=new l;this._widthLine=new b(i,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new b(i,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new b(i,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),o.loadFont("static/lato_regular_sub-d4b30187185acc59.json").then(t=>{this._font=t,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(t){this._enabled&&(this._dimensions||t)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let t=new l,i=this._getWidthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=t;let s=i.getCenter(new d);this._widthText||(this._widthText=new j(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let t=new l,i=this._getHeightEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=t;let s=i.getCenter(new d);this._heightText||(this._heightText=new j(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let t=new l,i=this._getDepthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=t;let s=i.getCenter(new d);this._depthText||(this._depthText=new j(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(t){this._origin=a(t.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=a(t.size);const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this.update()}update(t=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(t)}addToObject(t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&t.add(this._dimensionLineGroup)}removeFromObject(t){t.remove(this._dimensionLineGroup),this.update()}addToUiScene(t){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this._dimensionTextGroup.rotation.y=this._objectRotation,t.add(this._dimensionTextGroup),this.update()}removeFromUiScene(t){t.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const t=this._getRotation();return t>Math.PI/2||t<-Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(this._dimensions.x+.05,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const t=this._getRotation();return t>0&&t<Math.PI/2?new T(new d(-.05,0,.05),new d(-.05,this._dimensions.y+.05,.05)):t>Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):t<-Math.PI/2?new T(new d(.05+this._dimensions.x,0,this._dimensions.z-.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(t){this._onChange=t}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const t=new L;return t.expandByObject(this._widthLine),t.expandByObject(this._widthText),t.expandByObject(this._heightLine),t.expandByObject(this._heightText),t.expandByObject(this._depthLine),t.expandByObject(this._depthText),t}setVisibility(t){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=t,this._dimensionTextGroup.visible=t)}moveCameraStart(t){this.setVisibility(!1),this._cameraPosition=t,this.update()}moveCameraEnd(t){this.setVisibility(!0),this._cameraPosition=t,this.update()}clearScene(t){this._clear()}setObject(t,i=0){this._object=t,this._objectRotation=i}setUiScene(t){this._uiScene=t}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const t=this._object.getWorldPosition(new d);return i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this._objectRotation)}}t("default",D),s([n],D.prototype,"_unitFormatter",void 0)}}}));
2
- //# sourceMappingURL=dimensioning-helper-5d9d30f9.nomodule.js.map
1
+ System.register(["./roomle-dependency-injection-e9272cf4.nomodule.js","./main-thread-to-worker-1a58abb6.nomodule.js","./TextGeometry-028ef3cf.nomodule.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,x,u,g,w,b,y,T,L,G;return{setters:[function(t){i=t.aW,e=t.H,s=t._,n=t.i,h=t.j,o=t.aX,a=t.ac},function(t){_=t.O,d=t.a,r=t.h,p=t.w,m=t.bn,l=t.B,c=t.z,x=t.Q,u=t.b8,g=t.K,w=t.u,b=t.G,y=t.b,T=t.bG,L=t.ad},function(t){G=t.T}],execute:function(){const z="component_dimensioning_plane_material",M="component_dimensioning_text_material";class j extends _{constructor(t){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=t,this._position=new d,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(z)?this._planeMaterial=this._cacheHolder.materialCache.get(z):(this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(z,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new m({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){let t=new l;this._text=new c(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new c(t,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(t,i,e){this._position.copy(t),this._cameraPosition=e,this._label=i;const s=this.getWorldPosition(new d),n=this._cameraPosition.distanceTo(s),h=Math.max(.01,n/150),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new x;t.setFromAxisAngle(new d(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new d)}else if(this._updateText(this._textGeometry,new x,new d),this._cameraPosition){const t=this.getWorldPosition(new d),e=i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this.parent.rotation.y);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(t,i,e){let s=new d;s.copy(this._position),e.x*=this._getXSign(),s.add(e);let n=t.boundingBox.getSize(new d);t.center(),this._text.position.copy(s),i&&this._text.quaternion.copy(i);let h=new u(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),i&&this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}s([n],j.prototype,"_cacheHolder",void 0);class D{constructor(t){this._objectRotation=0,this._cameraPosition=new d,this._topDimensions=!1,this._initialized=new h,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new g,this._dimensionTextGroup=new _,this._creator_=t,this._lineMaterial=new w({color:3618615,linewidth:2});let i=new l;this._widthLine=new b(i,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new b(i,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new b(i,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),o.loadFont("static/lato_regular_sub-d4b30187185acc59.json").then(t=>{this._font=t,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(t){this._enabled&&(this._dimensions||t)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let t=new l,i=this._getWidthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=t;let s=i.getCenter(new d);this._widthText||(this._widthText=new j(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let t=new l,i=this._getHeightEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=t;let s=i.getCenter(new d);this._heightText||(this._heightText=new j(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let t=new l,i=this._getDepthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=t;let s=i.getCenter(new d);this._depthText||(this._depthText=new j(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(t){this._origin=a(t.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=a(t.size);const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this.update()}update(t=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(t)}addToObject(t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&t.add(this._dimensionLineGroup)}removeFromObject(t){t.remove(this._dimensionLineGroup),this.update()}addToUiScene(t){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this._dimensionTextGroup.rotation.y=this._objectRotation,t.add(this._dimensionTextGroup),this.update()}removeFromUiScene(t){t.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const t=this._getRotation();return t>Math.PI/2||t<-Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(this._dimensions.x+.05,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const t=this._getRotation();return t>0&&t<Math.PI/2?new T(new d(-.05,0,.05),new d(-.05,this._dimensions.y+.05,.05)):t>Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):t<-Math.PI/2?new T(new d(.05+this._dimensions.x,0,this._dimensions.z-.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(t){this._onChange=t}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const t=new L;return t.expandByObject(this._widthLine),t.expandByObject(this._widthText),t.expandByObject(this._heightLine),t.expandByObject(this._heightText),t.expandByObject(this._depthLine),t.expandByObject(this._depthText),t}setVisibility(t){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=t,this._dimensionTextGroup.visible=t)}moveCameraStart(t){this.setVisibility(!1),this._cameraPosition=t,this.update()}moveCameraEnd(t){this.setVisibility(!0),this._cameraPosition=t,this.update()}clearScene(t){this._clear()}setObject(t,i=0){this._object=t,this._objectRotation=i}setUiScene(t){this._uiScene=t}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const t=this._object.getWorldPosition(new d);return i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this._objectRotation)}}t("default",D),s([n],D.prototype,"_unitFormatter",void 0)}}}));
2
+ //# sourceMappingURL=dimensioning-helper-cd9d8f16.nomodule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-5d9d30f9.nomodule.js","sources":["../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-d4b30187185acc59.json\""],"names":[],"mappings":"w4HAAe"}
1
+ {"version":3,"file":"dimensioning-helper-cd9d8f16.nomodule.js","sources":["../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-d4b30187185acc59.json\""],"names":[],"mappings":"w4HAAe"}
@@ -0,0 +1,2 @@
1
+ import{S as ScriptLoader,M as Main}from"./script-loader-1ea7c01a.js";import{aM as InputManager,D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,ag as getGUI,_ as __decorate,i as inject,u as CANVAS_ID,x as DynamicLightSettingLoader,y as PREDEFINED_LIGHTSETTING,H as dispose,b as RoomleDependencyInjection}from"./roomle-dependency-injection-939ff084.js";import{C as CameraControl3D,L as LightSetting,S as SceneManager,T as TWEEN_FILE_NAME}from"./camera-behaviour-1595b02e.js";import{a as Vector3,ad as Box3,ag as Euler,Q as Quaternion,A as AmbientLight,C as Color,aE as CAMERA_TYPE,aR as getGlbUrl,bv as WebGLRenderer,i as SRGBColorSpace,bj as BasicShadowMap,N as PerspectiveCamera,bN as download}from"./main-thread-to-worker-554053aa.js";import{D as DefaultLightSetting}from"./default-light-setting-8195fd6d.js";import{G as GlbViewerCameraBehaviour}from"./glb-viewer-camera-behaviour-652321cd.js";import"./query-params-helper-a5a14aba.js";const INJECTABLES=[new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("glb-input-manager",class extends InputManager{},1),new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("rapi-access",RapiAccess)];class AdjustableCameraControl3D extends CameraControl3D{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,a,i){let n=new Vector3(-e.x/2,0,-e.z/2),s=new Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new Box3(n,s);let o=new Euler(-Math.PI/2+a,r,0,"ZYX"),c=(new Quaternion).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(c),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class GLBViewerLightSetting extends LightSetting{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new AmbientLight(new Color(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=getGUI();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new Color(e)})}}}class GLBViewerSceneManager extends SceneManager{constructor(e,t){super(e,t,CANVAS_ID.GLB,CAMERA_TYPE.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(DynamicLightSettingLoader.createDynamicLightSettingSource(null,PREDEFINED_LIGHTSETTING.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new GLBViewerLightSetting(this._scene)))}createCameraControl(e,t){this._changeCameraBehaviour(new GlbViewerCameraBehaviour(new AdjustableCameraControl3D(this._creator_,this._getInputManager(),new Vector3(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const a=getGlbUrl(r);return a?this.loadGLB(a,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new Vector3(1,1,1),a){return this.clearScene(),new Promise((i,n)=>{this._loadGLB(e,new Vector3(0,0,0),0,void 0,r,void 0,void 0,a).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new Box3).setFromObject(this._currentGLB);t&&this.cameraBehaviour.cameraControl instanceof AdjustableCameraControl3D&&this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(r),this._updateBounds(r,null,!0),this._readyForRender(),i()},n)})}preparePerspectiveImage(e,t,r){return new Promise(a=>{var i,n;t||(t=1e3),r||(r=1e3),e||((e=new WebGLRenderer({antialias:!0})).setSize(t,r),e.outputColorSpace=SRGBColorSpace,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=BasicShadowMap);let s=this.cameraBehaviour.cameraControl.getCamera().clone();s instanceof PerspectiveCamera&&(s.aspect=t/r,s.updateProjectionMatrix()),null===(i=this._lightSetting)||void 0===i||i.removeFromScene();let o=new DefaultLightSetting(this._scene);e.render(this._scene,s);let c=e.domElement.toDataURL();e.domElement.toBlob(e=>{a({image:c,width:t,height:r,blob:e})},"image/png"),o.removeFromScene(),null===(n=this._lightSetting)||void 0===n||n.addToScene()})}adjustCamera(e,t,r,a){if(this.cameraBehaviour.cameraControl instanceof AdjustableCameraControl3D){let i=(new Box3).setFromObject(this._scene).getSize(new Vector3);this.cameraBehaviour.cameraControl.adjust(i,e,t,r,a),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this.cameraBehaviour.cameraControl instanceof AdjustableCameraControl3D&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this.cameraBehaviour.cameraControl instanceof AdjustableCameraControl3D&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),dispose(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new Box3).setFromObject(this._currentGLB):null}get glbViewerCameraBehaviour(){return this.cameraBehaviour}getGeometryBounds(){return null}cameraBehaviourChanged(){super.cameraBehaviourChanged(),this.cameraBehaviour.cameraControl.addEventListener(3,()=>{this._requestRender()},this),this.cameraBehaviour.cameraControl.addEventListener(4,()=>{this._requestRender()},this)}async moveCamera(e){return this.glbViewerCameraBehaviour.externalApiMoveCamera(e)}_readyForRender(){this._globalCallback.onReadyForRender()}}__decorate([inject],GLBViewerSceneManager.prototype,"_glbInputManager",void 0),__decorate([inject],GLBViewerSceneManager.prototype,"_rapiAccess",void 0);class GLBRenderWorker{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=SRGBColorSpace}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new Vector3(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class RoomleGLBViewer{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"})]).then(()=>{this._sceneManager=new GLBViewerSceneManager(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new Vector3(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let a=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new GLBRenderWorker(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(a.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{download("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:r,rotation:a,maxLightSources:i}=e;this._sceneManager.setEnvironmentMap(t,r,a,i)}exportCanvasScreenshot(e){return this._sceneManager.exportCanvasScreenshot(e)}async moveCamera(e){return this._sceneManager.moveCamera(e)}get globalCallbacks(){return this._globalCallback}}__decorate([inject],RoomleGLBViewer.prototype,"_rapiAccess",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_domHelper",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_scriptLoader",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_lifeCycleManager",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_initData",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_globalInitData",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_globalCallback",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_unitFormatter",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_idbManager",void 0);class GlbViewer extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new RoomleGLBViewer(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}}export{GlbViewer};
2
+ //# sourceMappingURL=glb-viewer-7e9ea485.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-b8230cd7.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"+pRAAe"}
1
+ {"version":3,"file":"glb-viewer-7e9ea485.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"k0RAAe"}
@@ -0,0 +1,2 @@
1
+ import{b as CameraBehaviour}from"./camera-behaviour-1595b02e.js";class GlbViewerCameraBehaviour extends CameraBehaviour{get cameraControl(){return this._cameraControl}updateCameraOnItemLoaded(a){this.cameraControl.updateAndReset(a,!1)}async externalApiMoveCamera(a){await this.cameraControl.moveCamera(a),this._onCameraChanged()}}export{GlbViewerCameraBehaviour as G};
2
+ //# sourceMappingURL=glb-viewer-camera-behaviour-652321cd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glb-viewer-camera-behaviour-652321cd.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ System.register(["./camera-behaviour-77566ed2.nomodule.js"],(function(e){var a;return{setters:[function(e){a=e.b}],execute:function(){e("G",class extends a{get cameraControl(){return this._cameraControl}updateCameraOnItemLoaded(e){this.cameraControl.updateAndReset(e,!1)}async externalApiMoveCamera(e){await this.cameraControl.moveCamera(e),this._onCameraChanged()}})}}}));
2
+ //# sourceMappingURL=glb-viewer-camera-behaviour-6748ae91.nomodule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glb-viewer-camera-behaviour-6748ae91.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ System.register(["./script-loader-0744c102.nomodule.js","./roomle-dependency-injection-e9272cf4.nomodule.js","./camera-behaviour-77566ed2.nomodule.js","./main-thread-to-worker-1a58abb6.nomodule.js","./default-light-setting-0c472a1c.nomodule.js","./glb-viewer-camera-behaviour-6748ae91.nomodule.js","./query-params-helper-a2901800.nomodule.js"],(function(e){var t,r,i,a,n,s,o,h,c,l,d,m,u,_,g,p,v,w,b,C,f,S,L,M,B,y,I,x,G,j,E,F,O;return{setters:[function(e){t=e.S,r=e.M},function(e){i=e.aM,a=e.D,n=e.L,s=e.R,o=e.ag,h=e._,c=e.i,l=e.u,d=e.x,m=e.y,u=e.H,_=e.b},function(e){g=e.C,p=e.L,v=e.S,w=e.T},function(e){b=e.a,C=e.ad,f=e.ag,S=e.Q,L=e.A,M=e.C,B=e.aE,y=e.aR,I=e.bv,x=e.i,G=e.bj,j=e.N,E=e.bN},function(e){F=e.D},function(e){O=e.G},function(){}],execute:function(){const D=[new a("script-loader",t),new a("glb-input-manager",class extends i{},1),new a("logger",n),new a("rapi-access",s)];class P extends g{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,i,a){let n=new b(-e.x/2,0,-e.z/2),s=new b(e.x/2,e.y,e.z/2);this._boundingBox=new C(n,s);let o=new f(-Math.PI/2+i,r,0,"ZYX"),h=(new S).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class R extends p{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new L(new M(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=o();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new M(e)})}}}class k extends v{constructor(e,t){super(e,t,l.GLB,B.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(d.createDynamicLightSettingSource(null,m.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new R(this._scene)))}createCameraControl(e,t){this._changeCameraBehaviour(new O(new P(this._creator_,this._getInputManager(),new b(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const i=y(r);return i?this.loadGLB(i,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new b(1,1,1),i){return this.clearScene(),new Promise((a,n)=>{this._loadGLB(e,new b(0,0,0),0,void 0,r,void 0,void 0,i).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new C).setFromObject(this._currentGLB);t&&this.cameraBehaviour.cameraControl instanceof P&&this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(r),this._updateBounds(r,null,!0),this._readyForRender(),a()},n)})}preparePerspectiveImage(e,t,r){return new Promise(i=>{var a,n;t||(t=1e3),r||(r=1e3),e||((e=new I({antialias:!0})).setSize(t,r),e.outputColorSpace=x,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=G);let s=this.cameraBehaviour.cameraControl.getCamera().clone();s instanceof j&&(s.aspect=t/r,s.updateProjectionMatrix()),null===(a=this._lightSetting)||void 0===a||a.removeFromScene();let o=new F(this._scene);e.render(this._scene,s);let h=e.domElement.toDataURL();e.domElement.toBlob(e=>{i({image:h,width:t,height:r,blob:e})},"image/png"),o.removeFromScene(),null===(n=this._lightSetting)||void 0===n||n.addToScene()})}adjustCamera(e,t,r,i){if(this.cameraBehaviour.cameraControl instanceof P){let a=(new C).setFromObject(this._scene).getSize(new b);this.cameraBehaviour.cameraControl.adjust(a,e,t,r,i),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),u(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new C).setFromObject(this._currentGLB):null}get glbViewerCameraBehaviour(){return this.cameraBehaviour}getGeometryBounds(){return null}cameraBehaviourChanged(){super.cameraBehaviourChanged(),this.cameraBehaviour.cameraControl.addEventListener(3,()=>{this._requestRender()},this),this.cameraBehaviour.cameraControl.addEventListener(4,()=>{this._requestRender()},this)}async moveCamera(e){return this.glbViewerCameraBehaviour.externalApiMoveCamera(e)}_readyForRender(){this._globalCallback.onReadyForRender()}}h([c],k.prototype,"_glbInputManager",void 0),h([c],k.prototype,"_rapiAccess",void 0);class z{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new I({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=x}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new b(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class A{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(w,{id:"tween-js"})]).then(()=>{this._sceneManager=new k(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new b(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let i=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new z(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(i.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{E("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:r,rotation:i,maxLightSources:a}=e;this._sceneManager.setEnvironmentMap(t,r,i,a)}exportCanvasScreenshot(e){return this._sceneManager.exportCanvasScreenshot(e)}async moveCamera(e){return this._sceneManager.moveCamera(e)}get globalCallbacks(){return this._globalCallback}}h([c],A.prototype,"_rapiAccess",void 0),h([c],A.prototype,"_domHelper",void 0),h([c],A.prototype,"_scriptLoader",void 0),h([c],A.prototype,"_lifeCycleManager",void 0),h([c],A.prototype,"_initData",void 0),h([c],A.prototype,"_globalInitData",void 0),h([c],A.prototype,"_globalCallback",void 0),h([c],A.prototype,"_unitFormatter",void 0),h([c],A.prototype,"_idbManager",void 0),e("GlbViewer",class extends r{setupGlobals(){}setupDependencies(){_.setup(D),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new A(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
+ //# sourceMappingURL=glb-viewer-efe6c3a4.nomodule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-260047bc.nomodule.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"yqPAAe"}
1
+ {"version":3,"file":"glb-viewer-efe6c3a4.nomodule.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"40PAAe"}
@@ -0,0 +1,2 @@
1
+ import{GlbViewer}from"./glb-viewer-7e9ea485.js";import"./script-loader-1ea7c01a.js";import"./query-params-helper-a5a14aba.js";import"./main-thread-to-worker-554053aa.js";import"./roomle-dependency-injection-939ff084.js";import"./camera-behaviour-1595b02e.js";import"./default-light-setting-8195fd6d.js";import"./glb-viewer-camera-behaviour-652321cd.js";(new GlbViewer).boot();
2
+ //# sourceMappingURL=glb-viewer-main-49259f4e.js.map