@roomle/web-sdk 2.44.0-alpha.1 → 2.44.0-alpha.10

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 (268) hide show
  1. package/.releaserc.json +55 -58
  2. package/README.md +3 -0
  3. package/lib/{banana-for-scale-1f350acc.js → banana-for-scale-16fc7bf1.js} +2 -2
  4. package/lib/{banana-for-scale-1f350acc.js.map → banana-for-scale-16fc7bf1.js.map} +1 -1
  5. package/lib/{banana-for-scale-c9b91436.nomodule.js → banana-for-scale-70da31de.nomodule.js} +2 -2
  6. package/lib/{banana-for-scale-c9b91436.nomodule.js.map → banana-for-scale-70da31de.nomodule.js.map} +1 -1
  7. package/lib/{budgeteer-measure-1e85a5b9.js → budgeteer-measure-23a42ba1.js} +2 -2
  8. package/lib/budgeteer-measure-23a42ba1.js.map +1 -0
  9. package/lib/budgeteer-measure.nomodule.js +1 -1
  10. package/lib/budgeteer-measure.nomodule.js.map +1 -1
  11. package/lib/{component-dimensioning-11e334e6.nomodule.js → component-dimensioning-446c9c1a.nomodule.js} +2 -2
  12. package/lib/component-dimensioning-446c9c1a.nomodule.js.map +1 -0
  13. package/lib/{component-dimensioning-8b90144f.js → component-dimensioning-c2cacd33.js} +2 -2
  14. package/lib/component-dimensioning-c2cacd33.js.map +1 -0
  15. package/lib/{component-raycast-helper-d34cf336.js → component-raycast-helper-b8631dbc.js} +2 -2
  16. package/lib/component-raycast-helper-b8631dbc.js.map +1 -0
  17. package/lib/{component-raycast-helper-917c5fce.nomodule.js → component-raycast-helper-ff1b8652.nomodule.js} +2 -2
  18. package/lib/component-raycast-helper-ff1b8652.nomodule.js.map +1 -0
  19. package/lib/{configurator-fb2e05ef.js → configurator-06abffbe.js} +2 -2
  20. package/lib/configurator-06abffbe.js.map +1 -0
  21. package/lib/{configurator-74c366d0.nomodule.js → configurator-3c1b167e.nomodule.js} +2 -2
  22. package/lib/configurator-3c1b167e.nomodule.js.map +1 -0
  23. package/lib/configurator-dummy-app.js.map +1 -1
  24. package/lib/configurator-dummy.html +167 -79
  25. package/lib/configurator-main-44252ec4.js +2 -0
  26. package/lib/configurator-main-44252ec4.js.map +1 -0
  27. package/lib/configurator-main.nomodule.js +1 -1
  28. package/lib/{default-light-setting-43be6138.js → default-light-setting-4e394343.js} +2 -2
  29. package/lib/default-light-setting-4e394343.js.map +1 -0
  30. package/lib/{default-light-setting-e2fe40ee.nomodule.js → default-light-setting-e0f480e2.nomodule.js} +2 -2
  31. package/lib/default-light-setting-e0f480e2.nomodule.js.map +1 -0
  32. package/lib/definitions/common-core/src/lightsetting/dynamic-light-setting-loader.d.ts +1 -1
  33. package/lib/definitions/common-core/src/main.d.ts +3 -4
  34. package/lib/definitions/common-core/src/utils/shims.d.ts +2 -2
  35. package/lib/definitions/configurator-core/src/roomle-configurator.d.ts +73 -72
  36. package/lib/definitions/configurator-core/src/services/configurator-ui-callback.d.ts +5 -5
  37. package/lib/definitions/glb-viewer-core/src/roomle-glb-viewer.d.ts +2 -2
  38. package/lib/definitions/material-viewer/src/roomle-material-viewer.d.ts +2 -2
  39. package/lib/definitions/planner-core/src/roomle-planner-ui-callback.d.ts +2 -0
  40. package/lib/definitions/planner-core/src/services/planner-kernel-access.d.ts +3 -1
  41. package/lib/definitions/planner-core/src/webgl/planner-scene-event-handler.d.ts +0 -1
  42. package/lib/definitions/typings/planner.d.ts +13 -1
  43. package/lib/{dimensioning-helper-5d68f7b8.nomodule.js → dimensioning-helper-2a9d5edb.nomodule.js} +2 -2
  44. package/lib/dimensioning-helper-2a9d5edb.nomodule.js.map +1 -0
  45. package/lib/{dimensioning-helper-439a1eab.js → dimensioning-helper-5c7de8bd.js} +2 -2
  46. package/lib/{dimensioning-helper-439a1eab.js.map → dimensioning-helper-5c7de8bd.js.map} +1 -1
  47. package/lib/embedding-dummy.html +122 -94
  48. package/lib/{glb-viewer-185f0c5b.nomodule.js → glb-viewer-29f445fa.nomodule.js} +2 -2
  49. package/lib/{glb-viewer-185f0c5b.nomodule.js.map → glb-viewer-29f445fa.nomodule.js.map} +1 -1
  50. package/lib/{glb-viewer-d2d45ce4.js → glb-viewer-d2c43802.js} +2 -2
  51. package/lib/{glb-viewer-d2d45ce4.js.map → glb-viewer-d2c43802.js.map} +1 -1
  52. package/lib/glb-viewer-dummy-app.js.map +1 -1
  53. package/lib/glb-viewer-dummy.html +44 -30
  54. package/lib/glb-viewer-main-80f305b5.js +2 -0
  55. package/lib/glb-viewer-main-80f305b5.js.map +1 -0
  56. package/lib/glb-viewer-main.nomodule.js +1 -1
  57. package/lib/legacy/{banana-for-scale-35cca9b6.legacy.js → banana-for-scale-32f3ef14.legacy.js} +2 -2
  58. package/lib/legacy/{banana-for-scale-35cca9b6.legacy.js.map → banana-for-scale-32f3ef14.legacy.js.map} +1 -1
  59. package/lib/legacy/budgeteer-measure.legacy.js +1 -1
  60. package/lib/legacy/budgeteer-measure.legacy.js.map +1 -1
  61. package/lib/legacy/{component-dimensioning-9aeb85f3.legacy.js → component-dimensioning-c27962b5.legacy.js} +2 -2
  62. package/lib/legacy/component-dimensioning-c27962b5.legacy.js.map +1 -0
  63. package/lib/legacy/{component-raycast-helper-c9e6fa8a.legacy.js → component-raycast-helper-2cadc05c.legacy.js} +2 -2
  64. package/lib/legacy/component-raycast-helper-2cadc05c.legacy.js.map +1 -0
  65. package/lib/legacy/{configurator-0dc9d32c.legacy.js → configurator-540b0dac.legacy.js} +2 -2
  66. package/lib/legacy/configurator-540b0dac.legacy.js.map +1 -0
  67. package/lib/legacy/configurator-main.legacy.js +1 -1
  68. package/lib/legacy/{default-light-setting-bb797007.legacy.js → default-light-setting-1298b04e.legacy.js} +2 -2
  69. package/lib/legacy/default-light-setting-1298b04e.legacy.js.map +1 -0
  70. package/lib/legacy/{dimensioning-helper-9d5a7b3c.legacy.js → dimensioning-helper-efd935e4.legacy.js} +2 -2
  71. package/lib/legacy/dimensioning-helper-efd935e4.legacy.js.map +1 -0
  72. package/lib/legacy/{glb-viewer-069756aa.legacy.js → glb-viewer-f883fb9d.legacy.js} +2 -2
  73. package/lib/legacy/{glb-viewer-069756aa.legacy.js.map → glb-viewer-f883fb9d.legacy.js.map} +1 -1
  74. package/lib/legacy/glb-viewer-main.legacy.js +1 -1
  75. package/lib/legacy/{main-thread-to-worker-f535fe2c.legacy.js → main-thread-to-worker-cc24f989.legacy.js} +1 -1
  76. package/lib/legacy/main-thread-to-worker-cc24f989.legacy.js.map +1 -0
  77. package/lib/legacy/{material-viewer-a96582f6.legacy.js → material-viewer-a0dbcdf8.legacy.js} +2 -2
  78. package/lib/legacy/material-viewer-a0dbcdf8.legacy.js.map +1 -0
  79. package/lib/legacy/material-viewer-main.legacy.js +1 -1
  80. package/lib/legacy/{pixotron-4d1c8db2.legacy.js → pixotron-297d02c7.legacy.js} +2 -2
  81. package/lib/legacy/{pixotron-4d1c8db2.legacy.js.map → pixotron-297d02c7.legacy.js.map} +1 -1
  82. package/lib/legacy/planner-9bd552e1.legacy.js +2 -0
  83. package/lib/legacy/{planner-3334d9c4.legacy.js.map → planner-9bd552e1.legacy.js.map} +1 -1
  84. package/lib/legacy/planner-main.legacy.js +1 -1
  85. package/lib/legacy/{roomle-configurator-cd107a29.legacy.js → roomle-configurator-992c944b.legacy.js} +2 -2
  86. package/lib/legacy/{roomle-configurator-cd107a29.legacy.js.map → roomle-configurator-992c944b.legacy.js.map} +1 -1
  87. package/lib/legacy/roomle-dependency-injection-1f8e983a.legacy.js +16 -0
  88. package/lib/legacy/{roomle-dependency-injection-aa414f84.legacy.js.map → roomle-dependency-injection-1f8e983a.legacy.js.map} +1 -1
  89. package/lib/legacy/roomle-sdk.legacy.js +1 -1
  90. package/lib/legacy/{script-loader-37d724e7.legacy.js → script-loader-55d2097a.legacy.js} +2 -2
  91. package/lib/legacy/script-loader-55d2097a.legacy.js.map +1 -0
  92. package/lib/legacy/static/ConfiguratorKernel-20501a284bc8fc51.wasm +0 -0
  93. package/lib/legacy/static/{ConfiguratorKernel-0f003a2d53bdb498.js → ConfiguratorKernel-66acc90d734be73f.js} +32 -32
  94. package/lib/legacy/static/ConfiguratorKernelJs-191430a6a5695255.mem +0 -0
  95. package/lib/legacy/static/ConfiguratorKernelJs-959d98f479f267ec.js +146 -0
  96. package/lib/legacy/static/DepthShadowGenerator-a3a9d85ff2c3d24c.js +266 -0
  97. package/lib/legacy/static/{RoomleCore-4eb435620392fcc4.js → RoomleCore-2050e58329a960b4.js} +23 -23
  98. package/lib/legacy/static/RoomleCore-4000ede83dfd263f.wasm +0 -0
  99. package/lib/legacy/static/RoomleCoreJs-10c954e4de8fc356.mem +0 -0
  100. package/lib/legacy/static/RoomleCoreJs-a3caeb0e833c684f.js +155 -0
  101. package/lib/legacy/static/RoomleToolsCore-1d5812a538afe16c.wasm +0 -0
  102. package/lib/legacy/static/{RoomleToolsCore-2ec3c50f245db642.js → RoomleToolsCore-fbef1640a2d95a32.js} +15 -15
  103. package/lib/legacy/static/Tween-5ebfb82307807fdc.js +767 -0
  104. package/lib/legacy/static/{asset-loader.worker-7fdd71efd75f50d4.js → asset-loader.worker-caa87aba0f76ce49.js} +1 -1
  105. package/lib/legacy/static/{budgeteer.sw-6e3fb7e14289ed96.js → budgeteer.sw-0a8d4e36e18346a5.js} +1 -1
  106. package/lib/legacy/static/camera-05824b47cdb951e4.json +39 -0
  107. package/lib/legacy/static/dat.gui.min-24a0d861d5534d62.js +2447 -0
  108. package/lib/legacy/static/rubik_regular-bc008a7de2daee79.json +3535 -0
  109. package/lib/legacy/static/rubik_regular_sub-2dd2d5cca49018c5.json +168 -0
  110. package/lib/legacy/static/shaders-19a79e0f29545f5c.json +1 -0
  111. package/lib/legacy/{stats-helper-358f1fcc.legacy.js → stats-helper-9017c70f.legacy.js} +2 -2
  112. package/lib/legacy/{stats-helper-358f1fcc.legacy.js.map → stats-helper-9017c70f.legacy.js.map} +1 -1
  113. package/lib/legacy/{tools-core-f3b4d22c.legacy.js → tools-core-b4630ddb.legacy.js} +2 -2
  114. package/lib/legacy/tools-core-b4630ddb.legacy.js.map +1 -0
  115. package/lib/{main-thread-to-worker-31ec8d3a.nomodule.js → main-thread-to-worker-6a4eb1ee.nomodule.js} +1 -1
  116. package/lib/main-thread-to-worker-6a4eb1ee.nomodule.js.map +1 -0
  117. package/lib/{main-thread-to-worker-e9986fa8.js → main-thread-to-worker-88f74244.js} +1 -1
  118. package/lib/main-thread-to-worker-88f74244.js.map +1 -0
  119. package/lib/{material-viewer-2db93afe.nomodule.js → material-viewer-30d96e23.nomodule.js} +2 -2
  120. package/lib/material-viewer-30d96e23.nomodule.js.map +1 -0
  121. package/lib/{material-viewer-e7514f95.js → material-viewer-8d7f78ab.js} +2 -2
  122. package/lib/material-viewer-8d7f78ab.js.map +1 -0
  123. package/lib/material-viewer-dummy-app.js.map +1 -1
  124. package/lib/material-viewer-dummy.html +39 -22
  125. package/lib/material-viewer-main-fdc889b4.js +2 -0
  126. package/lib/material-viewer-main-fdc889b4.js.map +1 -0
  127. package/lib/material-viewer-main.nomodule.js +1 -1
  128. package/lib/measure.html +27 -34
  129. package/lib/{pixotron-e1f44e21.js → pixotron-049d7801.js} +2 -2
  130. package/lib/{pixotron-e1f44e21.js.map → pixotron-049d7801.js.map} +1 -1
  131. package/lib/{pixotron-11d8ecf1.nomodule.js → pixotron-0caad1bb.nomodule.js} +2 -2
  132. package/lib/{pixotron-11d8ecf1.nomodule.js.map → pixotron-0caad1bb.nomodule.js.map} +1 -1
  133. package/lib/planner-0991d6e8.nomodule.js +2 -0
  134. package/lib/{planner-2fb083b9.nomodule.js.map → planner-0991d6e8.nomodule.js.map} +1 -1
  135. package/lib/planner-41669774.js +2 -0
  136. package/lib/{planner-b9697b33.js.map → planner-41669774.js.map} +1 -1
  137. package/lib/planner-dummy-app.js.map +1 -1
  138. package/lib/planner-dummy.html +64 -43
  139. package/lib/planner-main-6a38eaf2.js +2 -0
  140. package/lib/planner-main-6a38eaf2.js.map +1 -0
  141. package/lib/planner-main.nomodule.js +1 -1
  142. package/lib/{roomle-configurator-e2cafe97.nomodule.js → roomle-configurator-16ae12a6.nomodule.js} +2 -2
  143. package/lib/{roomle-configurator-e2cafe97.nomodule.js.map → roomle-configurator-16ae12a6.nomodule.js.map} +1 -1
  144. package/lib/{roomle-configurator-3bc0f646.js → roomle-configurator-9e2577d9.js} +2 -2
  145. package/lib/{roomle-configurator-3bc0f646.js.map → roomle-configurator-9e2577d9.js.map} +1 -1
  146. package/lib/roomle-dependency-injection-2d75f745.nomodule.js +16 -0
  147. package/lib/{roomle-dependency-injection-4c51790a.nomodule.js.map → roomle-dependency-injection-2d75f745.nomodule.js.map} +1 -1
  148. package/lib/roomle-dependency-injection-35a8005e.js +16 -0
  149. package/lib/{roomle-dependency-injection-244ed68c.js.map → roomle-dependency-injection-35a8005e.js.map} +1 -1
  150. package/lib/{roomle-sdk-9cc773d7.js → roomle-sdk-3b698381.js} +2 -2
  151. package/lib/roomle-sdk-3b698381.js.map +1 -0
  152. package/lib/roomle-sdk.nomodule.js +1 -1
  153. package/lib/{script-loader-ff5cfb68.nomodule.js → script-loader-2abd03bb.nomodule.js} +2 -2
  154. package/lib/script-loader-2abd03bb.nomodule.js.map +1 -0
  155. package/lib/{script-loader-584a0480.js → script-loader-6ebae90e.js} +2 -2
  156. package/lib/script-loader-6ebae90e.js.map +1 -0
  157. package/lib/static/ConfiguratorKernel-20501a284bc8fc51.wasm +0 -0
  158. package/lib/static/{ConfiguratorKernel-0f003a2d53bdb498.js → ConfiguratorKernel-66acc90d734be73f.js} +1 -1
  159. package/lib/static/ConfiguratorKernel-66acc90d734be73f.js.map +1 -0
  160. package/lib/static/ConfiguratorKernelJs-191430a6a5695255.mem +0 -0
  161. package/lib/static/ConfiguratorKernelJs-959d98f479f267ec.js +146 -0
  162. package/lib/static/{DepthShadowGenerator-4c4b06f0801c4034.js → DepthShadowGenerator-a3a9d85ff2c3d24c.js} +0 -0
  163. package/lib/static/DepthShadowGenerator-a3a9d85ff2c3d24c.js.map +1 -0
  164. package/lib/static/{RoomleCore-4eb435620392fcc4.js → RoomleCore-2050e58329a960b4.js} +1 -1
  165. package/lib/static/{RoomleCore-4eb435620392fcc4.js.map → RoomleCore-2050e58329a960b4.js.map} +1 -1
  166. package/lib/static/RoomleCore-4000ede83dfd263f.wasm +0 -0
  167. package/lib/static/RoomleCoreJs-10c954e4de8fc356.mem +0 -0
  168. package/lib/static/RoomleCoreJs-a3caeb0e833c684f.js +155 -0
  169. package/lib/static/RoomleToolsCore-1d5812a538afe16c.wasm +0 -0
  170. package/lib/static/{RoomleToolsCore-2ec3c50f245db642.js → RoomleToolsCore-fbef1640a2d95a32.js} +1 -1
  171. package/lib/static/{RoomleToolsCore-2ec3c50f245db642.js.map → RoomleToolsCore-fbef1640a2d95a32.js.map} +1 -1
  172. package/lib/static/{Tween-d024b02fe34f25ab.js → Tween-5ebfb82307807fdc.js} +0 -0
  173. package/lib/static/Tween-5ebfb82307807fdc.js.map +1 -0
  174. package/lib/static/{asset-loader.worker-7fdd71efd75f50d4.js → asset-loader.worker-caa87aba0f76ce49.js} +1 -1
  175. package/lib/static/{asset-loader.worker-7fdd71efd75f50d4.js.map → asset-loader.worker-caa87aba0f76ce49.js.map} +0 -0
  176. package/lib/static/asset-loader.worker.js +1 -1
  177. package/lib/static/{budgeteer.sw-6e3fb7e14289ed96.js → budgeteer.sw-0a8d4e36e18346a5.js} +1 -1
  178. package/lib/static/{budgeteer.sw-6e3fb7e14289ed96.js.map → budgeteer.sw-0a8d4e36e18346a5.js.map} +0 -0
  179. package/lib/static/budgeteer.sw.js +1 -1
  180. package/lib/static/camera-05824b47cdb951e4.json +39 -0
  181. package/lib/static/{dat.gui.min-b5cbb61e5c62f0bf.js → dat.gui.min-24a0d861d5534d62.js} +0 -0
  182. package/lib/static/dat.gui.min-24a0d861d5534d62.js.map +1 -0
  183. package/lib/static/rubik_regular-bc008a7de2daee79.json +3535 -0
  184. package/lib/static/rubik_regular_sub-2dd2d5cca49018c5.json +168 -0
  185. package/lib/static/shaders-19a79e0f29545f5c.json +1 -0
  186. package/lib/static/worker-to-main-thread-3ad1cee7.js +1 -0
  187. package/lib/static/worker-to-main-thread-3ad1cee7.js.map +1 -0
  188. package/lib/{stats-helper-bd19ced2.nomodule.js → stats-helper-74462911.nomodule.js} +2 -2
  189. package/lib/{stats-helper-bd19ced2.nomodule.js.map → stats-helper-74462911.nomodule.js.map} +1 -1
  190. package/lib/{stats-helper-a6263360.js → stats-helper-b1889276.js} +2 -2
  191. package/lib/{stats-helper-a6263360.js.map → stats-helper-b1889276.js.map} +1 -1
  192. package/lib/{tools-core-f609446a.nomodule.js → tools-core-32285336.nomodule.js} +2 -2
  193. package/lib/tools-core-32285336.nomodule.js.map +1 -0
  194. package/lib/{tools-core-4f0c9377.js → tools-core-476d3e24.js} +2 -2
  195. package/lib/tools-core-476d3e24.js.map +1 -0
  196. package/package.json +2 -2
  197. package/scripts/copy-assets-sdk.js +66 -54
  198. package/lib/budgeteer-measure-1e85a5b9.js.map +0 -1
  199. package/lib/component-dimensioning-11e334e6.nomodule.js.map +0 -1
  200. package/lib/component-dimensioning-8b90144f.js.map +0 -1
  201. package/lib/component-raycast-helper-917c5fce.nomodule.js.map +0 -1
  202. package/lib/component-raycast-helper-d34cf336.js.map +0 -1
  203. package/lib/configurator-74c366d0.nomodule.js.map +0 -1
  204. package/lib/configurator-fb2e05ef.js.map +0 -1
  205. package/lib/configurator-main-082f03f0.js +0 -2
  206. package/lib/configurator-main-082f03f0.js.map +0 -1
  207. package/lib/default-light-setting-43be6138.js.map +0 -1
  208. package/lib/default-light-setting-e2fe40ee.nomodule.js.map +0 -1
  209. package/lib/dimensioning-helper-5d68f7b8.nomodule.js.map +0 -1
  210. package/lib/glb-viewer-main-e2508ced.js +0 -2
  211. package/lib/glb-viewer-main-e2508ced.js.map +0 -1
  212. package/lib/legacy/component-dimensioning-9aeb85f3.legacy.js.map +0 -1
  213. package/lib/legacy/component-raycast-helper-c9e6fa8a.legacy.js.map +0 -1
  214. package/lib/legacy/configurator-0dc9d32c.legacy.js.map +0 -1
  215. package/lib/legacy/default-light-setting-bb797007.legacy.js.map +0 -1
  216. package/lib/legacy/dimensioning-helper-9d5a7b3c.legacy.js.map +0 -1
  217. package/lib/legacy/main-thread-to-worker-f535fe2c.legacy.js.map +0 -1
  218. package/lib/legacy/material-viewer-a96582f6.legacy.js.map +0 -1
  219. package/lib/legacy/planner-3334d9c4.legacy.js +0 -2
  220. package/lib/legacy/roomle-dependency-injection-aa414f84.legacy.js +0 -16
  221. package/lib/legacy/script-loader-37d724e7.legacy.js.map +0 -1
  222. package/lib/legacy/static/ConfiguratorKernel-fee68dd17368f9c8.wasm +0 -0
  223. package/lib/legacy/static/ConfiguratorKernelJs-397177488117675e.js +0 -146
  224. package/lib/legacy/static/ConfiguratorKernelJs-6735c733ccd66361.mem +0 -0
  225. package/lib/legacy/static/DepthShadowGenerator-4c4b06f0801c4034.js +0 -262
  226. package/lib/legacy/static/RoomleCore-83f9a9bf9e4d7f73.wasm +0 -0
  227. package/lib/legacy/static/RoomleCoreJs-46a5e90adbb12d0c.js +0 -154
  228. package/lib/legacy/static/RoomleCoreJs-8bc350683d3c35ae.mem +0 -0
  229. package/lib/legacy/static/RoomleToolsCore-e949cc1f9026c61f.wasm +0 -0
  230. package/lib/legacy/static/Tween-d024b02fe34f25ab.js +0 -913
  231. package/lib/legacy/static/camera-f4cef679615485dc.json +0 -39
  232. package/lib/legacy/static/dat.gui.min-b5cbb61e5c62f0bf.js +0 -13
  233. package/lib/legacy/static/rubik_regular-75bd7bb699e9e39d.json +0 -1
  234. package/lib/legacy/static/rubik_regular_sub-eb3f3b61078695cc.json +0 -1
  235. package/lib/legacy/static/shaders-af852933f81878aa.json +0 -1
  236. package/lib/legacy/tools-core-f3b4d22c.legacy.js.map +0 -1
  237. package/lib/main-thread-to-worker-31ec8d3a.nomodule.js.map +0 -1
  238. package/lib/main-thread-to-worker-e9986fa8.js.map +0 -1
  239. package/lib/material-viewer-2db93afe.nomodule.js.map +0 -1
  240. package/lib/material-viewer-e7514f95.js.map +0 -1
  241. package/lib/material-viewer-main-50c85f10.js +0 -2
  242. package/lib/material-viewer-main-50c85f10.js.map +0 -1
  243. package/lib/planner-2fb083b9.nomodule.js +0 -2
  244. package/lib/planner-b9697b33.js +0 -2
  245. package/lib/planner-main-ac348208.js +0 -2
  246. package/lib/planner-main-ac348208.js.map +0 -1
  247. package/lib/roomle-dependency-injection-244ed68c.js +0 -16
  248. package/lib/roomle-dependency-injection-4c51790a.nomodule.js +0 -16
  249. package/lib/roomle-sdk-9cc773d7.js.map +0 -1
  250. package/lib/script-loader-584a0480.js.map +0 -1
  251. package/lib/script-loader-ff5cfb68.nomodule.js.map +0 -1
  252. package/lib/static/ConfiguratorKernel-0f003a2d53bdb498.js.map +0 -1
  253. package/lib/static/ConfiguratorKernel-fee68dd17368f9c8.wasm +0 -0
  254. package/lib/static/ConfiguratorKernelJs-397177488117675e.js +0 -146
  255. package/lib/static/ConfiguratorKernelJs-6735c733ccd66361.mem +0 -0
  256. package/lib/static/DepthShadowGenerator-4c4b06f0801c4034.js.map +0 -1
  257. package/lib/static/RoomleCore-83f9a9bf9e4d7f73.wasm +0 -0
  258. package/lib/static/RoomleCoreJs-46a5e90adbb12d0c.js +0 -154
  259. package/lib/static/RoomleCoreJs-8bc350683d3c35ae.mem +0 -0
  260. package/lib/static/RoomleToolsCore-e949cc1f9026c61f.wasm +0 -0
  261. package/lib/static/Tween-d024b02fe34f25ab.js.map +0 -1
  262. package/lib/static/camera-f4cef679615485dc.json +0 -39
  263. package/lib/static/dat.gui.min-b5cbb61e5c62f0bf.js.map +0 -1
  264. package/lib/static/rubik_regular-75bd7bb699e9e39d.json +0 -1
  265. package/lib/static/rubik_regular_sub-eb3f3b61078695cc.json +0 -1
  266. package/lib/static/shaders-af852933f81878aa.json +0 -1
  267. package/lib/tools-core-4f0c9377.js.map +0 -1
  268. package/lib/tools-core-f609446a.nomodule.js.map +0 -1
@@ -87,6 +87,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
87
87
  private _reloadConfiguration;
88
88
  private _performLoadConfiguration;
89
89
  private _changeHDGeometry;
90
+ private _callOnPartListUpdate;
90
91
  /**
91
92
  * Set general configuration parameter
92
93
  * @param initData
@@ -113,7 +114,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
113
114
  */
114
115
  disableHDGeometry(): Promise<void | ConfigurationLoadedResponse>;
115
116
  /**
116
- * Change the camera offset, see {@link CanvasOffset} for more details
117
+ * Change the camera offset
117
118
  * @param offset
118
119
  */
119
120
  changeOffset(offset: CanvasOffset): void;
@@ -219,7 +220,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
219
220
  /**
220
221
  * Sets the parameter of the selected component. If nothing is selected the parameters of the
221
222
  * parameters of the plan object are set
222
- * @param parameter an instance of the kernel parameter we want to set, use {key: "your-key"} if
223
+ * @param parameter an instance of the kernel parameter we want to set, use 'key: "your-key"' if
223
224
  * you do not have a kernel instance and do not need validation of the input
224
225
  * @param value the value we want to set on the parameter as string
225
226
  * @param isRaw turn this to true if you dont want the kernel to parse the value string, e.g. convert 100cm to 1000
@@ -227,7 +228,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
227
228
  setParameter(parameter: KernelParameter, value: string, isRaw?: boolean): Promise<void>;
228
229
  /**
229
230
  * Method to set a parameter on the plan object. This is used by embedding as well
230
- * @param parameter an instance of the kernel parameter we want to set, use {key: "your-key"} if
231
+ * @param parameter an instance of the kernel parameter we want to set, use 'key: "your-key"' if
231
232
  * you do not have a kernel instance and do not need validation of the input
232
233
  * @param value the value we want to set on the parameter as string
233
234
  */
@@ -238,7 +239,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
238
239
  getParametersOfPlanObject(): Promise<KernelParameter[]>;
239
240
  /**
240
241
  * Method to set a parameter on the root component. This is used by embedding as well
241
- * @param parameter an instance of the kernel parameter we want to set, use {key: "your-key"} if
242
+ * @param parameter an instance of the kernel parameter we want to set, use 'key: "your-key"' if
242
243
  * you do not have a kernel instance and do not need validation of the input
243
244
  * @param value the value we want to set on the parameter as string
244
245
  */
@@ -294,7 +295,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
294
295
  */
295
296
  requestAsset(url: string): AssetUrl;
296
297
  /**
297
- * Sets the material of the floor to the given {@link RapiMaterial}.
298
+ * Sets the material of the floor to the given RapiMaterial.
298
299
  * If the current environment is not floor environment it will be changed
299
300
  *
300
301
  * @param material
@@ -347,7 +348,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
347
348
  */
348
349
  changeTypeChangeTag(rapiId: RapiId): void;
349
350
  /**
350
- * Just calls {@link onRemoveTypeChangeTag} on {@link ConfiguratorUiCallbacks}
351
+ * After calling this method the UiCallback removeTypeChangeTag is triggered (see: {@link @roomle/web-sdk/configurator-core/src/services/configurator-ui-callback#ConfiguratorUiCallbacks.onRemoveTypeChangeTag})
351
352
  * @param rapiId
352
353
  */
353
354
  removeTypeChangeTag(rapiId: RapiId): void;
@@ -365,14 +366,14 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
365
366
  /**
366
367
  * Show dimensions (width, height, depth) of object
367
368
  *
368
- * See {@link onDimensionsVisibilityChange} to get notified when dimension visibility changes
369
+ * See {@link @roomle/web-sdk/configurator-core/src/services/configurator-ui-callback#ConfiguratorUiCallbacks.onDimensionsVisibilityChange} to get notified when dimension visibility changes
369
370
  */
370
371
  showDimensions(): void;
371
372
  /**
372
373
  * Hides dimensions when they are shown (see {@link showDimensions}).
373
374
  * Calling hideDimensions does not force dimensions to be always hidden.
374
375
  *
375
- * See {@link onDimensionsVisibilityChange} to get notified when dimension visibility changes
376
+ * See {@link @roomle/web-sdk/configurator-core/src/services/configurator-ui-callback#ConfiguratorUiCallbacks.onDimensionsVisibilityChange} to get notified when dimension visibility changes
376
377
  */
377
378
  hideDimensions(): void;
378
379
  /**
@@ -391,67 +392,67 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
391
392
  */
392
393
  syncTypeChangeTag(tagId: RapiId): Promise<void>;
393
394
  /**
394
- * Loads a dynamic light settings into the scene. The dynamic light setting source can be an
395
- * object (js), json, or an url (url to json). See {@link SceneSettings} how to define it.
396
- *
397
- * Exampe:
398
- * ```
399
- {
400
- "lights": [
401
- {
402
- "type": "rectarea",
403
- "name": "main",
404
- "intensity": 240,
405
- "color": "#ffffff",
406
- "position": {
407
- "x": -0.5,
408
- "y": 6,
409
- "z": 3
410
- },
411
- "target": {
412
- "x": 0,
413
- "y": 0,
414
- "z": 0
395
+ * Loads a dynamic light settings into the scene. The dynamic light setting source can be an
396
+ * object (js), json, or an url (url to json). See {@link @roomle/web-sdk/common-core/src/scene-settings-loader#SceneSettings} how to define it.
397
+ *
398
+ * Exampe:
399
+ * ```
400
+ {
401
+ "lights": [
402
+ {
403
+ "type": "rectarea",
404
+ "name": "main",
405
+ "intensity": 240,
406
+ "color": "#ffffff",
407
+ "position": {
408
+ "x": -0.5,
409
+ "y": 6,
410
+ "z": 3
411
+ },
412
+ "target": {
413
+ "x": 0,
414
+ "y": 0,
415
+ "z": 0
416
+ },
417
+ "castShadow": true,
418
+ "width": 0.8,
419
+ "height": 0.8
415
420
  },
416
- "castShadow": true,
417
- "width": 0.8,
418
- "height": 0.8
419
- },
420
- {
421
- "type": "spot",
422
- "name": "side",
423
- "intensity": 0.3,
424
- "color": "#ffffff",
425
- "position": {
426
- "x": 2,
427
- "y": 3,
428
- "z": 1.5
421
+ {
422
+ "type": "spot",
423
+ "name": "side",
424
+ "intensity": 0.3,
425
+ "color": "#ffffff",
426
+ "position": {
427
+ "x": 2,
428
+ "y": 3,
429
+ "z": 1.5
430
+ },
431
+ "target": {
432
+ "x": 0,
433
+ "y": 0.1,
434
+ "z": 0
435
+ },
436
+ "castShadow": false,
437
+ "angle": 50,
438
+ "penumbra": 0.5
429
439
  },
430
- "target": {
431
- "x": 0,
432
- "y": 0.1,
433
- "z": 0
434
- },
435
- "castShadow": false,
436
- "angle": 50,
437
- "penumbra": 0.5
438
- },
439
- {
440
- "type": "ambient",
441
- "name": "ambient",
442
- "intensity": 0.3,
443
- "color": "#ffffff",
444
- "position": {
445
- "x": 0,
446
- "y": 0,
447
- "z": 0
440
+ {
441
+ "type": "ambient",
442
+ "name": "ambient",
443
+ "intensity": 0.3,
444
+ "color": "#ffffff",
445
+ "position": {
446
+ "x": 0,
447
+ "y": 0,
448
+ "z": 0
449
+ }
448
450
  }
449
- }
450
- ]
451
- }
452
- ```
453
- * @param source
454
- */
451
+ ]
452
+ }
453
+ ```
454
+ * @param source
455
+ */
455
456
  loadDynamicLightSetting(source: DynamicLightSettingSource): Promise<void>;
456
457
  /**
457
458
  * Used for test puprose only
@@ -474,7 +475,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
474
475
  setBakedShadow(hex: string, url: string): void;
475
476
  /**
476
477
  * Loads a SceneSettings object, currently it can can contain a light setting definition
477
- * (see {@link loadDynamicLightSetting}) and an environment definition (see {@link EnvironmentSetting}).
478
+ * (see {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.loadDynamicLightSetting}) and an environment definition (see {@link @roomle/web-sdk/common-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}).
478
479
  * @param sceneSettings
479
480
  */
480
481
  loadSceneSetting(sceneSettings: SceneSettings): Promise<void>;
@@ -530,12 +531,12 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
530
531
  */
531
532
  zoomOut(value?: number): void;
532
533
  /**
533
- * Return {@link ConfiguratorUiCallbacks} to override
534
+ * Use this callbacks to hook in your functionality
534
535
  */
535
536
  get callbacks(): ConfiguratorUiCallbacks;
536
537
  /**
537
538
  * @internal
538
- * Return {@link GlobalCallback} to override
539
+ * Use this callbacks to hook in your functionality
539
540
  */
540
541
  get globalCallbacks(): GlobalCallback;
541
542
  /**
@@ -580,7 +581,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
580
581
  * Sets the parameter of the component by it's runtime id
581
582
  * parameters of the plan object are set
582
583
  * @param runtimeId number, the runtime id of the component. You can retrieve this ID from partlist etc
583
- * @param parameter an instance of the kernel parameter we want to set, use {key: "your-key"} if
584
+ * @param parameter an instance of the kernel parameter we want to set, use 'key: "your-key"' if
584
585
  * you do not have a kernel instance and do not need validation of the input
585
586
  * @param value the value we want to set on the parameter as string
586
587
  */
@@ -595,13 +596,13 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
595
596
  * Undo last action
596
597
  * calls configuratorHistory.undo where array of last configuration are stored
597
598
  */
598
- undo(): void;
599
+ undo(): Promise<void>;
599
600
  /**
600
601
  * Redo last action
601
602
  * calls configuratorHistory.redo where array of last configuration are stored
602
603
  * only possible if undo was called before
603
604
  */
604
- redo(): void;
605
+ redo(): Promise<void>;
605
606
  /**
606
607
  * clears current configurator history
607
608
  */
@@ -89,7 +89,7 @@ export default class ConfiguratorUiCallbacks extends UiCallback {
89
89
  */
90
90
  onConfigurationReady: (partList: KernelPartList, hash: ConfigurationHash, rootComponentLabel: string) => void;
91
91
  /**
92
- * When UI should show the overlay based on the selected tag. Gets triggered when {@link CommonInitData.startTag} is set
92
+ * When UI should show the overlay based on the selected tag. Gets triggered when {@link @roomle/web-sdk/common-core/src/utils/shims#CommonInitData.startTag} is set
93
93
  * @param tag
94
94
  */
95
95
  onOpenTag: (tag: RapiTagForUi) => void;
@@ -102,11 +102,11 @@ export default class ConfiguratorUiCallbacks extends UiCallback {
102
102
  */
103
103
  onClickOutside: () => void;
104
104
  /**
105
- * When {@link previewDockings} has no available dockings
105
+ * Is triggered when {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.previewDockings} has no available dockings
106
106
  */
107
107
  onNoDockingsAvailable: () => void;
108
108
  /**
109
- * When the configuration overlaps the UI (defined by {@link CanvasOffset})
109
+ * When the configuration overlaps the UI (defined by {@link @roomle/web-sdk/common-core/src/common-interfaces#CanvasOffset})
110
110
  * @param intersections
111
111
  */
112
112
  onUiIntersectionChange: (intersections: UIIntersection[]) => void;
@@ -211,12 +211,12 @@ export default class ConfiguratorUiCallbacks extends UiCallback {
211
211
  */
212
212
  onConfigurationLoadError: () => void;
213
213
  /**
214
- * When {@link changeTypeChangeTag} as been called and the sync has been started
214
+ * When {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.changeTypeChangeTag} as been called and the sync has been started
215
215
  * @param rapiId
216
216
  */
217
217
  onChangeTypeChangeTag: (rapiId: RapiId) => void;
218
218
  /**
219
- * When {@link removeTypeChangeTag} as been called
219
+ * When {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.removeTypeChangeTag} as been called
220
220
  * @param rapiId
221
221
  */
222
222
  onRemoveTypeChangeTag: (rapiId: RapiId) => void;
@@ -57,12 +57,12 @@ export default class RoomleGLBViewer implements GlobalAPI, Context, ExternalEmbe
57
57
  getCurrentId(): string;
58
58
  /**
59
59
  * Loads a SceneSettings object, currently it can can contain a light setting definition
60
- * (see {@link loadDynamicLightSetting}) and an environment definition (see {@link EnvironmentSetting}).
60
+ * (see {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.loadDynamicLightSetting}) and an environment definition (see {@link @roomle/web-sdk/common-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}).
61
61
  * @param sceneSettings
62
62
  */
63
63
  loadSceneSetting(sceneSettings: SceneSettings): Promise<void>;
64
64
  /**
65
- * Loads a QualitySetting object (see {@link QualitySetting}).
65
+ * Loads a QualitySetting object (see {@link @roomle/web-sdk/common-core/src/dynamic-quality-setting-loader#QualitySetting}).
66
66
  * @param qualitySetting
67
67
  */
68
68
  loadQualitySetting(qualitySetting: QualitySetting): void;
@@ -37,12 +37,12 @@ export default class RoomleMaterialViewer implements GlobalAPI, Context, Externa
37
37
  getMaterialShading(): RapiMaterialShading;
38
38
  /**
39
39
  * Loads a SceneSettings object, currently it can can contain a light setting definition
40
- * (see {@link loadDynamicLightSetting}) and an environment definition (see {@link EnvironmentSetting}).
40
+ * (see {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.loadDynamicLightSetting}) and an environment definition (see {@link @roomle/web-sdk/common-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}).
41
41
  * @param sceneSettings
42
42
  */
43
43
  loadSceneSetting(sceneSettings: SceneSettings): Promise<void>;
44
44
  /**
45
- * Loads a QualitySetting object (see {@link QualitySetting}).
45
+ * Loads a QualitySetting object.
46
46
  * @param qualitySetting
47
47
  */
48
48
  loadQualitySetting(qualitySetting: QualitySetting): void;
@@ -12,7 +12,9 @@ export interface SelectionPayload {
12
12
  configuration?: RapiConfiguration;
13
13
  component?: RapiComponent;
14
14
  configurationRuntimeId?: number;
15
+ planElementId?: number;
15
16
  wall?: WallDimension;
17
+ staticItemRuntimeId?: number;
16
18
  }
17
19
  export default class RoomlePlannerUiCallback extends UiCallback {
18
20
  constructor(creator: string);
@@ -51,7 +51,9 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
51
51
  planCleared(): void;
52
52
  planCompletelyLoaded(plan: Plan): void;
53
53
  planElement3dMeshChanged(plan: Plan, element: PlanElement): void;
54
- planElementAdded(plan: Plan, element: PlanElement): void;
54
+ private _onStaticItemAdded;
55
+ private _onConfigurableItemAdded;
56
+ planElementAdded(plan: Plan, element: PlanElement): Promise<void>;
55
57
  planElementChanged(plan: Plan, element: KernelObject): void;
56
58
  planHistoryStateChanged(): void;
57
59
  planObjectConfigurationCreated(_plan: Plan, _element: PlanObject): void;
@@ -54,7 +54,6 @@ export default class PlannerSceneEventHandler extends SceneEventHandler<SceneEve
54
54
  private _isCurrentlyDrawing;
55
55
  private _state;
56
56
  private _point;
57
- private isSnappingActive;
58
57
  private _floorDrawingPlane;
59
58
  constructor(creator: string, scene: THREE.Scene, camera: THREE.Camera, inputManager: InputManager);
60
59
  disable(): void;
@@ -9,7 +9,7 @@ export interface KernelObject {
9
9
  clone(): KernelObject;
10
10
  delete(): void;
11
11
  }
12
- export declare const SNAP_DISTANCE = 100;
12
+ export declare const INITIAL_SNAP_DISTANCE = 40;
13
13
  export interface Plan extends KernelObject {
14
14
  defaultParapetHeight: number;
15
15
  defaultWallHeight: number;
@@ -51,6 +51,16 @@ export interface NodePlanObject extends PlanObject {
51
51
  getNumberOfConnectedWalls(): number;
52
52
  getMaxWallHeight(): number;
53
53
  }
54
+ export interface ContinuousDrawingManager {
55
+ getStartPoint(): KernelVector3;
56
+ getDrawingAngle(): number;
57
+ getCircleRotation(): number;
58
+ shouldShowCircle(): boolean;
59
+ isCorridorValid(): boolean;
60
+ getCorridor(): any;
61
+ getDrawnPoints(): KernelObjectPtrList;
62
+ CIRCLE_RADIUS: number;
63
+ }
54
64
  export interface PlanInteractionHandler {
55
65
  init(reference: PlanInteractionHandler, zoomFactor: number, viewSnapDist: number, snapObjectsToWalls: boolean, shouldSnap: boolean, drawingType: any): PlanInteractionHandler;
56
66
  getConfiguratorKernel(): ConfiguratorKernelClass;
@@ -113,7 +123,9 @@ export interface PlanInteractionHandler {
113
123
  setDefaultParapetHeight(parapetHeight: number, applyToAll: boolean): void;
114
124
  setWallLeftMaterial(wall: KernelWall, material: KernelWallMaterial): void;
115
125
  setWallRightMaterial(wall: KernelWall, material: KernelWallMaterial): void;
126
+ getContinuousDrawingManager(): ContinuousDrawingManager;
116
127
  unit: string;
128
+ snapObjectsToWalls: boolean;
117
129
  }
118
130
  export interface PlanOverview {
119
131
  area: number;
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-4c51790a.nomodule.js","./main-thread-to-worker-31ec8d3a.nomodule.js"],(function(e){var i,t,s,n,h;return{setters:[function(e){i=e.p,t=e._,s=e.i,n=e.O,h=e.ai},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";class _ extends THREE.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 THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(o)?this._planeMaterial=this._cacheHolder.materialCache.get(o):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(o,this._planeMaterial)),this._cacheHolder.materialCache.has(a)?this._textMaterial=this._cacheHolder.materialCache.get(a):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(a,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){i(this)}}t([s],_.prototype,"_cacheHolder",void 0);class d{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-eb3f3b61078695cc.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new _(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new _(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new _(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,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.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_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 THREE.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._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.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()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}e("default",d),t([s],d.prototype,"_unitFormatter",void 0)}}}));
2
- //# sourceMappingURL=dimensioning-helper-5d68f7b8.nomodule.js.map
1
+ System.register(["./roomle-dependency-injection-2d75f745.nomodule.js","./main-thread-to-worker-6a4eb1ee.nomodule.js"],(function(e){var i,t,s,n,h;return{setters:[function(e){i=e.p,t=e._,s=e.i,n=e.O,h=e.ai},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";class _ extends THREE.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 THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(o)?this._planeMaterial=this._cacheHolder.materialCache.get(o):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(o,this._planeMaterial)),this._cacheHolder.materialCache.has(a)?this._textMaterial=this._cacheHolder.materialCache.get(a):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(a,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){i(this)}}t([s],_.prototype,"_cacheHolder",void 0);class d{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new _(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new _(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new _(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,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.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_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 THREE.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._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.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()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}e("default",d),t([s],d.prototype,"_unitFormatter",void 0)}}}));
2
+ //# sourceMappingURL=dimensioning-helper-2a9d5edb.nomodule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dimensioning-helper-2a9d5edb.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"slHAAe"}
@@ -1,2 +1,2 @@
1
- import{p as dispose,_ as __decorate,i as inject,O as AsyncGuard,ai as AsyncDependencyLoader}from"./roomle-dependency-injection-244ed68c.js";import"./main-thread-to-worker-e9986fa8.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends THREE.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 THREE.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 THREE.MeshBasicMaterial({color:16777215,side:THREE.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 THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_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._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-eb3f3b61078695cc.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,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.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_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 THREE.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._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.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()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export default DimensioningHelper;
2
- //# sourceMappingURL=dimensioning-helper-439a1eab.js.map
1
+ import{p as dispose,_ as __decorate,i as inject,O as AsyncGuard,ai as AsyncDependencyLoader}from"./roomle-dependency-injection-35a8005e.js";import"./main-thread-to-worker-88f74244.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends THREE.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 THREE.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 THREE.MeshBasicMaterial({color:16777215,side:THREE.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 THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_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._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,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.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_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 THREE.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._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.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()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export default DimensioningHelper;
2
+ //# sourceMappingURL=dimensioning-helper-5c7de8bd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-439a1eab.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"wuHAAe"}
1
+ {"version":3,"file":"dimensioning-helper-5c7de8bd.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"wuHAAe"}