@roomle/web-sdk 2.43.0 → 2.44.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 (316) hide show
  1. package/.releaserc.json +55 -58
  2. package/README.md +3 -0
  3. package/lib/banana-for-scale-58aa07e7.nomodule.js +2 -0
  4. package/lib/{banana-for-scale-d4c457d4.nomodule.js.map → banana-for-scale-58aa07e7.nomodule.js.map} +1 -1
  5. package/lib/banana-for-scale-b0cad920.js +2 -0
  6. package/lib/{banana-for-scale-29fe9ece.js.map → banana-for-scale-b0cad920.js.map} +1 -1
  7. package/lib/budgeteer-measure-23a42ba1.js +2 -0
  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-3e2b21b8.nomodule.js +2 -0
  12. package/lib/component-dimensioning-3e2b21b8.nomodule.js.map +1 -0
  13. package/lib/{component-dimensioning-7b9b757c.nomodule.js → component-dimensioning-c2294a31.js} +2 -2
  14. package/lib/component-dimensioning-c2294a31.js.map +1 -0
  15. package/lib/{component-raycast-helper-e2883ebb.nomodule.js → component-raycast-helper-0b429141.nomodule.js} +2 -2
  16. package/lib/component-raycast-helper-0b429141.nomodule.js.map +1 -0
  17. package/lib/{component-raycast-helper-1eac1f65.js → component-raycast-helper-96be30dc.js} +2 -2
  18. package/lib/component-raycast-helper-96be30dc.js.map +1 -0
  19. package/lib/{configurator-df61a67c.js → configurator-1a9502eb.js} +2 -2
  20. package/lib/configurator-1a9502eb.js.map +1 -0
  21. package/lib/{configurator-9b988733.nomodule.js → configurator-ad930002.nomodule.js} +2 -2
  22. package/lib/configurator-ad930002.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-d4d311c0.js +2 -0
  26. package/lib/configurator-main-d4d311c0.js.map +1 -0
  27. package/lib/configurator-main.nomodule.js +1 -1
  28. package/lib/{default-light-setting-004b9cd2.js → default-light-setting-17aeb133.js} +2 -2
  29. package/lib/default-light-setting-17aeb133.js.map +1 -0
  30. package/lib/{default-light-setting-c6c8e1ad.nomodule.js → default-light-setting-917cc079.nomodule.js} +2 -2
  31. package/lib/default-light-setting-917cc079.nomodule.js.map +1 -0
  32. package/lib/definitions/acceptance-tests/src/utils/async-acceptance-test.d.ts +1 -1
  33. package/lib/definitions/common-core/mock/three-mock.d.ts +1 -1
  34. package/lib/definitions/common-core/src/error-handler.d.ts +1 -1
  35. package/lib/definitions/common-core/src/kernel-io.d.ts +1 -1
  36. package/lib/definitions/common-core/src/lightsetting/dynamic-light-setting-loader.d.ts +1 -1
  37. package/lib/definitions/common-core/src/rapi-access.d.ts +3 -3
  38. package/lib/definitions/common-core/src/script-loader.d.ts +1 -1
  39. package/lib/definitions/common-core/src/utils/common-utils.d.ts +1 -1
  40. package/lib/definitions/common-core/src/view-model/configurator-view-model.d.ts +1 -0
  41. package/lib/definitions/common-core/src/webgl/image-renderer.d.ts +1 -1
  42. package/lib/definitions/configurator-core/src/roomle-configurator.d.ts +58 -58
  43. package/lib/definitions/configurator-core/src/services/configurator-ui-callback.d.ts +2 -2
  44. package/lib/definitions/configurator-core/src/utils/event-dispatcher.d.ts +1 -1
  45. package/lib/definitions/configurator-core/src/utils/indexeddb-adapter.d.ts +2 -2
  46. package/lib/definitions/configurator-core/src/utils/test-helpers/interaction-helper.d.ts +2 -2
  47. package/lib/definitions/configurator-core/src/utils/test-helpers/ui-mock.d.ts +3 -3
  48. package/lib/definitions/configurator-core/src/utils/ui-intersection-helper.d.ts +2 -2
  49. package/lib/definitions/planner-core/mock/planner-kernel-access-mock.d.ts +1 -1
  50. package/lib/definitions/planner-core/src/roomle-planner-ui-callback.d.ts +1 -0
  51. package/lib/definitions/tools-core/src/roomle-tools-core.d.ts +1 -1
  52. package/lib/definitions/typings/global-definitions.d.ts +1 -1
  53. package/lib/definitions/typings/helper.d.ts +1 -1
  54. package/lib/definitions/typings/kernel.d.ts +1 -1
  55. package/lib/definitions/typings/rapi-types.d.ts +9 -9
  56. package/lib/definitions/workers/src/budgeteer.sw.d.ts +1 -1
  57. package/lib/dimensioning-helper-0995e4b8.nomodule.js +2 -0
  58. package/lib/dimensioning-helper-0995e4b8.nomodule.js.map +1 -0
  59. package/lib/dimensioning-helper-b166264a.js +2 -0
  60. package/lib/{dimensioning-helper-707197b7.js.map → dimensioning-helper-b166264a.js.map} +1 -1
  61. package/lib/embedding-dummy.html +122 -94
  62. package/lib/glb-viewer-45e04caa.js +2 -0
  63. package/lib/{glb-viewer-a3b1ff73.js.map → glb-viewer-45e04caa.js.map} +1 -1
  64. package/lib/glb-viewer-dummy-app.js.map +1 -1
  65. package/lib/glb-viewer-dummy.html +44 -30
  66. package/lib/glb-viewer-f5f9a050.nomodule.js +2 -0
  67. package/lib/{glb-viewer-23b774e0.nomodule.js.map → glb-viewer-f5f9a050.nomodule.js.map} +1 -1
  68. package/lib/glb-viewer-main-be603c6d.js +2 -0
  69. package/lib/glb-viewer-main-be603c6d.js.map +1 -0
  70. package/lib/glb-viewer-main.nomodule.js +1 -1
  71. package/lib/legacy/banana-for-scale-2021b8ce.legacy.js +2 -0
  72. package/lib/legacy/{banana-for-scale-f8ab137f.legacy.js.map → banana-for-scale-2021b8ce.legacy.js.map} +1 -1
  73. package/lib/legacy/budgeteer-measure.legacy.js +1 -1
  74. package/lib/legacy/budgeteer-measure.legacy.js.map +1 -1
  75. package/lib/legacy/component-dimensioning-f4289533.legacy.js +2 -0
  76. package/lib/legacy/component-dimensioning-f4289533.legacy.js.map +1 -0
  77. package/lib/legacy/{component-raycast-helper-59acc8b8.legacy.js → component-raycast-helper-afb624ed.legacy.js} +2 -2
  78. package/lib/legacy/component-raycast-helper-afb624ed.legacy.js.map +1 -0
  79. package/lib/legacy/{configurator-678bed92.legacy.js → configurator-431855b5.legacy.js} +2 -2
  80. package/lib/legacy/configurator-431855b5.legacy.js.map +1 -0
  81. package/lib/legacy/configurator-main.legacy.js +1 -1
  82. package/lib/legacy/{default-light-setting-0eae7ddf.legacy.js → default-light-setting-29282b63.legacy.js} +2 -2
  83. package/lib/legacy/default-light-setting-29282b63.legacy.js.map +1 -0
  84. package/lib/legacy/dimensioning-helper-b5001288.legacy.js +2 -0
  85. package/lib/legacy/dimensioning-helper-b5001288.legacy.js.map +1 -0
  86. package/lib/legacy/glb-viewer-0020898e.legacy.js +2 -0
  87. package/lib/legacy/{glb-viewer-ddc7a29d.legacy.js.map → glb-viewer-0020898e.legacy.js.map} +1 -1
  88. package/lib/legacy/glb-viewer-main.legacy.js +1 -1
  89. package/lib/legacy/main-thread-to-worker-cc24f989.legacy.js +2 -0
  90. package/lib/legacy/main-thread-to-worker-cc24f989.legacy.js.map +1 -0
  91. package/lib/legacy/material-viewer-51065b97.legacy.js +2 -0
  92. package/lib/legacy/material-viewer-51065b97.legacy.js.map +1 -0
  93. package/lib/legacy/material-viewer-main.legacy.js +1 -1
  94. package/lib/legacy/pixotron-e0f1cf47.legacy.js +2 -0
  95. package/lib/legacy/{pixotron-80fe5913.legacy.js.map → pixotron-e0f1cf47.legacy.js.map} +1 -1
  96. package/lib/legacy/planner-1af4bef2.legacy.js +2 -0
  97. package/lib/legacy/{planner-e41a2569.legacy.js.map → planner-1af4bef2.legacy.js.map} +1 -1
  98. package/lib/legacy/planner-main.legacy.js +1 -1
  99. package/lib/legacy/roomle-configurator-40f860e2.legacy.js +2 -0
  100. package/lib/legacy/{roomle-configurator-6602a267.legacy.js.map → roomle-configurator-40f860e2.legacy.js.map} +1 -1
  101. package/lib/legacy/roomle-dependency-injection-c465c69e.legacy.js +16 -0
  102. package/lib/legacy/{roomle-dependency-injection-e294616d.legacy.js.map → roomle-dependency-injection-c465c69e.legacy.js.map} +1 -1
  103. package/lib/legacy/roomle-sdk.legacy.js +1 -1
  104. package/lib/legacy/{script-loader-9dc48cfd.legacy.js → script-loader-f53b8215.legacy.js} +2 -2
  105. package/lib/legacy/script-loader-f53b8215.legacy.js.map +1 -0
  106. package/lib/legacy/static/{ConfiguratorKernel-e9065c8be4011f61.js → ConfiguratorKernel-0f003a2d53bdb498.js} +74 -73
  107. package/lib/legacy/static/ConfiguratorKernel-fee68dd17368f9c8.wasm +0 -0
  108. package/lib/legacy/static/ConfiguratorKernelJs-397177488117675e.js +146 -0
  109. package/lib/legacy/static/ConfiguratorKernelJs-6735c733ccd66361.mem +0 -0
  110. package/lib/legacy/static/DepthShadowGenerator-a3a9d85ff2c3d24c.js +266 -0
  111. package/lib/legacy/static/RoomleCore-4eb435620392fcc4.js +130 -0
  112. package/lib/legacy/static/RoomleCore-83f9a9bf9e4d7f73.wasm +0 -0
  113. package/lib/legacy/static/RoomleCoreJs-46a5e90adbb12d0c.js +154 -0
  114. package/lib/legacy/static/RoomleCoreJs-8bc350683d3c35ae.mem +0 -0
  115. package/lib/legacy/static/{RoomleToolsCore-eb38af3a8c882dff.js → RoomleToolsCore-2ec3c50f245db642.js} +70 -70
  116. package/lib/legacy/static/RoomleToolsCore-e949cc1f9026c61f.wasm +0 -0
  117. package/lib/legacy/static/Tween-5ebfb82307807fdc.js +767 -0
  118. package/lib/legacy/static/{asset-loader.worker-796c70f59b977071.js → asset-loader.worker-caa87aba0f76ce49.js} +1 -1
  119. package/lib/legacy/static/{budgeteer.sw-e7566da86237bca8.js → budgeteer.sw-0a8d4e36e18346a5.js} +1 -1
  120. package/lib/legacy/static/camera-05824b47cdb951e4.json +39 -0
  121. package/lib/legacy/static/dat.gui.min-24a0d861d5534d62.js +2447 -0
  122. package/lib/legacy/static/rubik_regular-bc008a7de2daee79.json +3535 -0
  123. package/lib/legacy/static/rubik_regular_sub-2dd2d5cca49018c5.json +168 -0
  124. package/lib/legacy/static/shaders-88030e4fbae39928.json +1 -0
  125. package/lib/legacy/stats-helper-951a6039.legacy.js +2 -0
  126. package/lib/legacy/{stats-helper-b0633f63.legacy.js.map → stats-helper-951a6039.legacy.js.map} +1 -1
  127. package/lib/legacy/{tools-core-0b66a05d.legacy.js → tools-core-8e9fd5dd.legacy.js} +2 -2
  128. package/lib/legacy/tools-core-8e9fd5dd.legacy.js.map +1 -0
  129. package/lib/main-thread-to-worker-6a4eb1ee.nomodule.js +2 -0
  130. package/lib/main-thread-to-worker-6a4eb1ee.nomodule.js.map +1 -0
  131. package/lib/main-thread-to-worker-88f74244.js +2 -0
  132. package/lib/main-thread-to-worker-88f74244.js.map +1 -0
  133. package/lib/material-viewer-2df0572f.nomodule.js +2 -0
  134. package/lib/material-viewer-2df0572f.nomodule.js.map +1 -0
  135. package/lib/material-viewer-ca21925a.js +2 -0
  136. package/lib/material-viewer-ca21925a.js.map +1 -0
  137. package/lib/material-viewer-dummy-app.js.map +1 -1
  138. package/lib/material-viewer-dummy.html +39 -22
  139. package/lib/material-viewer-main-5b2d8fb1.js +2 -0
  140. package/lib/material-viewer-main-5b2d8fb1.js.map +1 -0
  141. package/lib/material-viewer-main.nomodule.js +1 -1
  142. package/lib/measure.html +27 -34
  143. package/lib/pixotron-32c4e05d.js +2 -0
  144. package/lib/{pixotron-4eb69a29.js.map → pixotron-32c4e05d.js.map} +1 -1
  145. package/lib/pixotron-3be821e5.nomodule.js +2 -0
  146. package/lib/{pixotron-b8a4128f.nomodule.js.map → pixotron-3be821e5.nomodule.js.map} +1 -1
  147. package/lib/planner-07dfff6d.js +2 -0
  148. package/lib/{planner-05629dc5.js.map → planner-07dfff6d.js.map} +1 -1
  149. package/lib/planner-21a6fccd.nomodule.js +2 -0
  150. package/lib/{planner-0c378c93.nomodule.js.map → planner-21a6fccd.nomodule.js.map} +1 -1
  151. package/lib/planner-dummy-app.js.map +1 -1
  152. package/lib/planner-dummy.html +64 -43
  153. package/lib/planner-main-8a56d68d.js +2 -0
  154. package/lib/planner-main-8a56d68d.js.map +1 -0
  155. package/lib/planner-main.nomodule.js +1 -1
  156. package/lib/roomle-configurator-072f6af1.nomodule.js +2 -0
  157. package/lib/{roomle-configurator-ca8a3f05.nomodule.js.map → roomle-configurator-072f6af1.nomodule.js.map} +1 -1
  158. package/lib/roomle-configurator-21e1c87c.js +2 -0
  159. package/lib/{roomle-configurator-a2354193.js.map → roomle-configurator-21e1c87c.js.map} +1 -1
  160. package/lib/roomle-dependency-injection-8d66ecac.js +16 -0
  161. package/lib/{roomle-dependency-injection-dade8841.js.map → roomle-dependency-injection-8d66ecac.js.map} +1 -1
  162. package/lib/roomle-dependency-injection-f0b933f6.nomodule.js +16 -0
  163. package/lib/{roomle-dependency-injection-4d02aeed.nomodule.js.map → roomle-dependency-injection-f0b933f6.nomodule.js.map} +1 -1
  164. package/lib/{roomle-sdk-acba0c06.js → roomle-sdk-038a1704.js} +2 -2
  165. package/lib/roomle-sdk-038a1704.js.map +1 -0
  166. package/lib/roomle-sdk.nomodule.js +1 -1
  167. package/lib/{script-loader-122c197b.js → script-loader-a1d7afdd.js} +2 -2
  168. package/lib/script-loader-a1d7afdd.js.map +1 -0
  169. package/lib/{script-loader-425dddf6.nomodule.js → script-loader-c56ceed8.nomodule.js} +2 -2
  170. package/lib/script-loader-c56ceed8.nomodule.js.map +1 -0
  171. package/lib/static/ConfiguratorKernel-0f003a2d53bdb498.js +1 -0
  172. package/lib/static/ConfiguratorKernel-0f003a2d53bdb498.js.map +1 -0
  173. package/lib/static/ConfiguratorKernel-fee68dd17368f9c8.wasm +0 -0
  174. package/lib/static/ConfiguratorKernelJs-397177488117675e.js +146 -0
  175. package/lib/static/ConfiguratorKernelJs-6735c733ccd66361.mem +0 -0
  176. package/lib/static/{DepthShadowGenerator-4c4b06f0801c4034.js → DepthShadowGenerator-a3a9d85ff2c3d24c.js} +0 -0
  177. package/lib/static/DepthShadowGenerator-a3a9d85ff2c3d24c.js.map +1 -0
  178. package/lib/static/RoomleCore-4eb435620392fcc4.js +1 -0
  179. package/lib/static/RoomleCore-4eb435620392fcc4.js.map +1 -0
  180. package/lib/static/RoomleCore-83f9a9bf9e4d7f73.wasm +0 -0
  181. package/lib/static/RoomleCoreJs-46a5e90adbb12d0c.js +154 -0
  182. package/lib/static/RoomleCoreJs-8bc350683d3c35ae.mem +0 -0
  183. package/lib/static/RoomleToolsCore-2ec3c50f245db642.js +1 -0
  184. package/lib/static/RoomleToolsCore-2ec3c50f245db642.js.map +1 -0
  185. package/lib/static/RoomleToolsCore-e949cc1f9026c61f.wasm +0 -0
  186. package/lib/static/{Tween-d024b02fe34f25ab.js → Tween-5ebfb82307807fdc.js} +0 -0
  187. package/lib/static/Tween-5ebfb82307807fdc.js.map +1 -0
  188. package/lib/static/{asset-loader.worker-796c70f59b977071.js → asset-loader.worker-caa87aba0f76ce49.js} +1 -1
  189. package/lib/static/{asset-loader.worker-796c70f59b977071.js.map → asset-loader.worker-caa87aba0f76ce49.js.map} +0 -0
  190. package/lib/static/asset-loader.worker.js +1 -1
  191. package/lib/static/{budgeteer.sw-e7566da86237bca8.js → budgeteer.sw-0a8d4e36e18346a5.js} +1 -1
  192. package/lib/static/{budgeteer.sw-e7566da86237bca8.js.map → budgeteer.sw-0a8d4e36e18346a5.js.map} +0 -0
  193. package/lib/static/budgeteer.sw.js +1 -1
  194. package/lib/static/camera-05824b47cdb951e4.json +39 -0
  195. package/lib/static/{dat.gui.min-b5cbb61e5c62f0bf.js → dat.gui.min-24a0d861d5534d62.js} +0 -0
  196. package/lib/static/dat.gui.min-24a0d861d5534d62.js.map +1 -0
  197. package/lib/static/rubik_regular-bc008a7de2daee79.json +3535 -0
  198. package/lib/static/rubik_regular_sub-2dd2d5cca49018c5.json +168 -0
  199. package/lib/static/shaders-88030e4fbae39928.json +1 -0
  200. package/lib/static/worker-to-main-thread-3ad1cee7.js +1 -0
  201. package/lib/static/worker-to-main-thread-3ad1cee7.js.map +1 -0
  202. package/lib/static/worker-to-main-thread-73234f7a.js +1 -0
  203. package/lib/static/worker-to-main-thread-73234f7a.js.map +1 -0
  204. package/lib/stats-helper-53909b17.js +2 -0
  205. package/lib/{stats-helper-c731f63a.js.map → stats-helper-53909b17.js.map} +1 -1
  206. package/lib/{stats-helper-c731f63a.js → stats-helper-a75dc3da.nomodule.js} +2 -2
  207. package/lib/{stats-helper-37c0d77c.nomodule.js.map → stats-helper-a75dc3da.nomodule.js.map} +1 -1
  208. package/lib/{tools-core-4c13977c.js → tools-core-4e24e712.js} +2 -2
  209. package/lib/tools-core-4e24e712.js.map +1 -0
  210. package/lib/{tools-core-89d54f1f.nomodule.js → tools-core-865f89df.nomodule.js} +2 -2
  211. package/lib/tools-core-865f89df.nomodule.js.map +1 -0
  212. package/package.json +2 -2
  213. package/scripts/copy-assets-sdk.js +68 -56
  214. package/lib/banana-for-scale-29fe9ece.js +0 -2
  215. package/lib/banana-for-scale-d4c457d4.nomodule.js +0 -2
  216. package/lib/budgeteer-measure-1377faa9.js +0 -2
  217. package/lib/budgeteer-measure-1377faa9.js.map +0 -1
  218. package/lib/component-dimensioning-7b9b757c.nomodule.js.map +0 -1
  219. package/lib/component-dimensioning-d77dc5fd.js +0 -2
  220. package/lib/component-dimensioning-d77dc5fd.js.map +0 -1
  221. package/lib/component-raycast-helper-1eac1f65.js.map +0 -1
  222. package/lib/component-raycast-helper-e2883ebb.nomodule.js.map +0 -1
  223. package/lib/configurator-9b988733.nomodule.js.map +0 -1
  224. package/lib/configurator-df61a67c.js.map +0 -1
  225. package/lib/configurator-main-c2a9b119.js +0 -2
  226. package/lib/configurator-main-c2a9b119.js.map +0 -1
  227. package/lib/default-light-setting-004b9cd2.js.map +0 -1
  228. package/lib/default-light-setting-c6c8e1ad.nomodule.js.map +0 -1
  229. package/lib/dimensioning-helper-62227f7c.nomodule.js +0 -2
  230. package/lib/dimensioning-helper-62227f7c.nomodule.js.map +0 -1
  231. package/lib/dimensioning-helper-707197b7.js +0 -2
  232. package/lib/glb-viewer-23b774e0.nomodule.js +0 -2
  233. package/lib/glb-viewer-a3b1ff73.js +0 -2
  234. package/lib/glb-viewer-main-b413d64a.js +0 -2
  235. package/lib/glb-viewer-main-b413d64a.js.map +0 -1
  236. package/lib/legacy/banana-for-scale-f8ab137f.legacy.js +0 -2
  237. package/lib/legacy/component-dimensioning-06a6f9ee.legacy.js +0 -2
  238. package/lib/legacy/component-dimensioning-06a6f9ee.legacy.js.map +0 -1
  239. package/lib/legacy/component-raycast-helper-59acc8b8.legacy.js.map +0 -1
  240. package/lib/legacy/configurator-678bed92.legacy.js.map +0 -1
  241. package/lib/legacy/default-light-setting-0eae7ddf.legacy.js.map +0 -1
  242. package/lib/legacy/dimensioning-helper-97e8b9c5.legacy.js +0 -2
  243. package/lib/legacy/dimensioning-helper-97e8b9c5.legacy.js.map +0 -1
  244. package/lib/legacy/glb-viewer-ddc7a29d.legacy.js +0 -2
  245. package/lib/legacy/main-thread-to-worker-e2f2b9cb.legacy.js +0 -2
  246. package/lib/legacy/main-thread-to-worker-e2f2b9cb.legacy.js.map +0 -1
  247. package/lib/legacy/material-viewer-a01fd304.legacy.js +0 -2
  248. package/lib/legacy/material-viewer-a01fd304.legacy.js.map +0 -1
  249. package/lib/legacy/pixotron-80fe5913.legacy.js +0 -2
  250. package/lib/legacy/planner-e41a2569.legacy.js +0 -2
  251. package/lib/legacy/roomle-configurator-6602a267.legacy.js +0 -2
  252. package/lib/legacy/roomle-dependency-injection-e294616d.legacy.js +0 -16
  253. package/lib/legacy/script-loader-9dc48cfd.legacy.js.map +0 -1
  254. package/lib/legacy/static/ConfiguratorKernel-2e859fe27a3c86ed.wasm +0 -0
  255. package/lib/legacy/static/ConfiguratorKernelJs-23e7a53b8a38380c.mem +0 -0
  256. package/lib/legacy/static/ConfiguratorKernelJs-b43dc826821e864e.js +0 -146
  257. package/lib/legacy/static/DepthShadowGenerator-4c4b06f0801c4034.js +0 -262
  258. package/lib/legacy/static/RoomleCore-07c1ebfd847560ef.wasm +0 -0
  259. package/lib/legacy/static/RoomleCore-b08e77d418a3f4a0.js +0 -130
  260. package/lib/legacy/static/RoomleCoreJs-b207f4e5106d5bf5.js +0 -154
  261. package/lib/legacy/static/RoomleCoreJs-f9d0ac5ec78a81f3.mem +0 -0
  262. package/lib/legacy/static/RoomleToolsCore-c33ca3a9cb8ba880.wasm +0 -0
  263. package/lib/legacy/static/Tween-d024b02fe34f25ab.js +0 -913
  264. package/lib/legacy/static/camera-f4cef679615485dc.json +0 -39
  265. package/lib/legacy/static/dat.gui.min-b5cbb61e5c62f0bf.js +0 -13
  266. package/lib/legacy/static/rubik_regular-75bd7bb699e9e39d.json +0 -1
  267. package/lib/legacy/static/rubik_regular_sub-eb3f3b61078695cc.json +0 -1
  268. package/lib/legacy/static/shaders-7bdb2939b2a0d677.json +0 -1
  269. package/lib/legacy/stats-helper-b0633f63.legacy.js +0 -2
  270. package/lib/legacy/tools-core-0b66a05d.legacy.js.map +0 -1
  271. package/lib/main-thread-to-worker-681bab1a.js +0 -2
  272. package/lib/main-thread-to-worker-681bab1a.js.map +0 -1
  273. package/lib/main-thread-to-worker-7283a354.nomodule.js +0 -2
  274. package/lib/main-thread-to-worker-7283a354.nomodule.js.map +0 -1
  275. package/lib/material-viewer-2ca0de10.js +0 -2
  276. package/lib/material-viewer-2ca0de10.js.map +0 -1
  277. package/lib/material-viewer-ba8646c8.nomodule.js +0 -2
  278. package/lib/material-viewer-ba8646c8.nomodule.js.map +0 -1
  279. package/lib/material-viewer-main-dd95bf93.js +0 -2
  280. package/lib/material-viewer-main-dd95bf93.js.map +0 -1
  281. package/lib/pixotron-4eb69a29.js +0 -2
  282. package/lib/pixotron-b8a4128f.nomodule.js +0 -2
  283. package/lib/planner-05629dc5.js +0 -2
  284. package/lib/planner-0c378c93.nomodule.js +0 -2
  285. package/lib/planner-main-117f91e4.js +0 -2
  286. package/lib/planner-main-117f91e4.js.map +0 -1
  287. package/lib/roomle-configurator-a2354193.js +0 -2
  288. package/lib/roomle-configurator-ca8a3f05.nomodule.js +0 -2
  289. package/lib/roomle-dependency-injection-4d02aeed.nomodule.js +0 -16
  290. package/lib/roomle-dependency-injection-dade8841.js +0 -16
  291. package/lib/roomle-sdk-acba0c06.js.map +0 -1
  292. package/lib/script-loader-122c197b.js.map +0 -1
  293. package/lib/script-loader-425dddf6.nomodule.js.map +0 -1
  294. package/lib/static/ConfiguratorKernel-2e859fe27a3c86ed.wasm +0 -0
  295. package/lib/static/ConfiguratorKernel-e9065c8be4011f61.js +0 -1
  296. package/lib/static/ConfiguratorKernel-e9065c8be4011f61.js.map +0 -1
  297. package/lib/static/ConfiguratorKernelJs-23e7a53b8a38380c.mem +0 -0
  298. package/lib/static/ConfiguratorKernelJs-b43dc826821e864e.js +0 -146
  299. package/lib/static/DepthShadowGenerator-4c4b06f0801c4034.js.map +0 -1
  300. package/lib/static/RoomleCore-07c1ebfd847560ef.wasm +0 -0
  301. package/lib/static/RoomleCore-b08e77d418a3f4a0.js +0 -1
  302. package/lib/static/RoomleCore-b08e77d418a3f4a0.js.map +0 -1
  303. package/lib/static/RoomleCoreJs-b207f4e5106d5bf5.js +0 -154
  304. package/lib/static/RoomleCoreJs-f9d0ac5ec78a81f3.mem +0 -0
  305. package/lib/static/RoomleToolsCore-c33ca3a9cb8ba880.wasm +0 -0
  306. package/lib/static/RoomleToolsCore-eb38af3a8c882dff.js +0 -1
  307. package/lib/static/RoomleToolsCore-eb38af3a8c882dff.js.map +0 -1
  308. package/lib/static/Tween-d024b02fe34f25ab.js.map +0 -1
  309. package/lib/static/camera-f4cef679615485dc.json +0 -39
  310. package/lib/static/dat.gui.min-b5cbb61e5c62f0bf.js.map +0 -1
  311. package/lib/static/rubik_regular-75bd7bb699e9e39d.json +0 -1
  312. package/lib/static/rubik_regular_sub-eb3f3b61078695cc.json +0 -1
  313. package/lib/static/shaders-7bdb2939b2a0d677.json +0 -1
  314. package/lib/stats-helper-37c0d77c.nomodule.js +0 -2
  315. package/lib/tools-core-4c13977c.js.map +0 -1
  316. package/lib/tools-core-89d54f1f.nomodule.js.map +0 -1
@@ -4,83 +4,95 @@ const path = require('path');
4
4
  // This ceremony is needed due to:
5
5
  // http://krasimirtsonev.com/blog/article/Fun-playing-with-npm-dependencies-and-postinstall-script
6
6
 
7
- const mkDirByPathSync = (targetDir, {isRelativeToScript = false} = {}) => {
8
- const sep = path.sep;
9
- const initDir = path.isAbsolute(targetDir) ? sep : '';
10
- const baseDir = isRelativeToScript ? __dirname : '.';
7
+ const mkDirByPathSync = (targetDir, { isRelativeToScript = false } = {}) => {
8
+ const sep = path.sep;
9
+ const initDir = path.isAbsolute(targetDir) ? sep : '';
10
+ const baseDir = isRelativeToScript ? __dirname : '.';
11
11
 
12
- return targetDir.split(sep).reduce((parentDir, childDir) => {
13
- const curDir = path.resolve(baseDir, parentDir, childDir);
14
- try {
15
- fs.mkdirSync(curDir);
16
- } catch (err) {
17
- if (err.code === 'EEXIST') {
18
- return curDir;
19
- }
12
+ return targetDir.split(sep).reduce((parentDir, childDir) => {
13
+ const curDir = path.resolve(baseDir, parentDir, childDir);
14
+ try {
15
+ fs.mkdirSync(curDir);
16
+ } catch (err) {
17
+ if (err.code === 'EEXIST') {
18
+ return curDir;
19
+ }
20
20
 
21
- if (err.code === 'ENOENT') {
22
- throw new Error(`EACCES: permission denied, mkdir '${parentDir}'`);
23
- }
21
+ if (err.code === 'ENOENT') {
22
+ throw new Error(`EACCES: permission denied, mkdir '${parentDir}'`);
23
+ }
24
24
 
25
- const caughtErr = ['EACCES', 'EPERM', 'EISDIR'].indexOf(err.code) > -1;
26
- if (!caughtErr || caughtErr && curDir === path.resolve(targetDir)) {
27
- throw err;
28
- }
29
- }
25
+ const caughtErr = ['EACCES', 'EPERM', 'EISDIR'].indexOf(err.code) > -1;
26
+ if (!caughtErr || (caughtErr && curDir === path.resolve(targetDir))) {
27
+ throw err;
28
+ }
29
+ }
30
30
 
31
- return curDir;
32
- }, initDir);
33
- }
31
+ return curDir;
32
+ }, initDir);
33
+ };
34
34
 
35
35
  const copyFileSync = (source, target) => {
36
+ let targetFile = target;
36
37
 
37
- let targetFile = target;
38
-
39
- if (fs.existsSync(target)) {
40
- if (fs.lstatSync(target).isDirectory()) {
41
- targetFile = path.join(target, path.basename(source));
42
- }
38
+ if (fs.existsSync(target)) {
39
+ if (fs.lstatSync(target).isDirectory()) {
40
+ targetFile = path.join(target, path.basename(source));
43
41
  }
42
+ }
44
43
 
45
- fs.writeFileSync(targetFile, fs.readFileSync(source));
44
+ fs.writeFileSync(targetFile, fs.readFileSync(source));
46
45
  };
47
46
 
48
47
  const copyFolderRecursiveSync = (source, target) => {
49
- let files = [];
48
+ let files = [];
50
49
 
51
- const targetFolder = path.join(target, path.basename(source));
52
- if (!fs.existsSync(targetFolder)) {
53
- mkDirByPathSync(targetFolder);
54
- }
50
+ const targetFolder = path.join(target, path.basename(source));
51
+ if (!fs.existsSync(targetFolder)) {
52
+ mkDirByPathSync(targetFolder);
53
+ }
55
54
 
56
- if (fs.lstatSync(source).isDirectory()) {
57
- files = fs.readdirSync(source);
58
- files.forEach(function (file) {
59
- var curSource = path.join(source, file);
60
- if (fs.lstatSync(curSource).isDirectory()) {
61
- copyFolderRecursiveSync(curSource, targetFolder);
62
- } else {
63
- copyFileSync(curSource, targetFolder);
64
- }
65
- });
66
- }
67
- }
55
+ if (fs.lstatSync(source).isDirectory()) {
56
+ files = fs.readdirSync(source);
57
+ files.forEach(function (file) {
58
+ var curSource = path.join(source, file);
59
+ if (fs.lstatSync(curSource).isDirectory()) {
60
+ copyFolderRecursiveSync(curSource, targetFolder);
61
+ } else {
62
+ copyFileSync(curSource, targetFolder);
63
+ }
64
+ });
65
+ }
66
+ };
68
67
 
69
68
  const parentProjectRoot = path.resolve(__dirname, '..', '..', '..', '..');
70
69
  const packagePath = path.resolve(parentProjectRoot, 'package.json');
71
70
  if (!fs.existsSync(packagePath)) {
72
- console.log('package.json does not exist');
73
- return;
71
+ console.log('package.json does not exist');
72
+ return;
74
73
  }
75
74
  const packageJson = require(packagePath);
76
- const roomleAssetTarget = (packageJson.roomle && packageJson.roomle.assetTarget) ? path.resolve(parentProjectRoot, packageJson.roomle.assetTarget) : undefined;
75
+ const roomleAssetTarget =
76
+ packageJson.roomle && packageJson.roomle.assetTarget
77
+ ? path.resolve(parentProjectRoot, packageJson.roomle.assetTarget)
78
+ : undefined;
77
79
  if (!roomleAssetTarget) {
78
- console.log('[Roomle]: You did not provide an asset target in your package.json');
79
- console.log('[Roomle]: please add "roomle": { "assetTarget": "__YOUR__PATH__TO__STORE__ASSETS__" }');
80
- console.log('[Roomle]: or integrate the lib/static folder in your build so that those file are ');
81
- console.log('[Roomle]: accessible from a web server (or something like localhost for your local dev environment)');
82
- return;
80
+ console.log(
81
+ '[Roomle]: You did not provide an asset target in your package.json'
82
+ );
83
+ console.log(
84
+ '[Roomle]: please add "roomle": { "assetTarget": "__YOUR__PATH__TO__STORE__ASSETS__" }'
85
+ );
86
+ console.log(
87
+ '[Roomle]: or integrate the lib/static folder in your build so that those file are '
88
+ );
89
+ console.log(
90
+ '[Roomle]: accessible from a web server (or something like localhost for your local dev environment)'
91
+ );
92
+ return;
83
93
  }
84
94
  const src = path.resolve(__dirname, '..', 'lib', 'static');
85
- console.log('[Roomle]: copy roomle assets from: ' + src + ' to ' + roomleAssetTarget);
95
+ console.log(
96
+ '[Roomle]: copy roomle assets from: ' + src + ' to ' + roomleAssetTarget
97
+ );
86
98
  copyFolderRecursiveSync(src, roomleAssetTarget);
@@ -1,2 +0,0 @@
1
- import{_ as __decorate,i as inject,ai as ScenePluginDefaultImplementation}from"./roomle-dependency-injection-dade8841.js";import{g as getAssetPath}from"./main-thread-to-worker-681bab1a.js";let BananaForScale=(()=>{class e extends ScenePluginDefaultImplementation{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(getAssetPath()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new THREE.Vector3),a=this._bounds.getCenter(new THREE.Vector3).clone();a.x-=e.x/2+.18,a.z+=e.z/2+.05,a.y=0;let t=.03;this._banana.scale.copy(new THREE.Vector3(t,t,t)),this._banana.rotation.y=.6,this._banana.position.copy(a)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,a){super.clearScene(e,a),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}return __decorate([inject],e.prototype,"_staticItemLoader",void 0),e})();export default BananaForScale;
2
- //# sourceMappingURL=banana-for-scale-29fe9ece.js.map
@@ -1,2 +0,0 @@
1
- System.register(["./roomle-dependency-injection-4d02aeed.nomodule.js","./main-thread-to-worker-7283a354.nomodule.js"],(function(e){var n,t,a,s;return{setters:[function(e){n=e._,t=e.i,a=e.ai},function(e){s=e.g}],execute:function(){e("default",(()=>{class e extends a{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(s()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new THREE.Vector3),n=this._bounds.getCenter(new THREE.Vector3).clone();n.x-=e.x/2+.18,n.z+=e.z/2+.05,n.y=0;let t=.03;this._banana.scale.copy(new THREE.Vector3(t,t,t)),this._banana.rotation.y=.6,this._banana.position.copy(n)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,n){super.clearScene(e,n),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}return n([t],e.prototype,"_staticItemLoader",void 0),e})())}}}));
2
- //# sourceMappingURL=banana-for-scale-d4c457d4.nomodule.js.map
@@ -1,2 +0,0 @@
1
- import{g as getAllParameters}from"./query-params-helper-a271f9dc.js";import{M as MainThreadToWorker,g as getAssetPath}from"./main-thread-to-worker-681bab1a.js";new class{constructor(){this._inLimbo=!1,this._alreadyAdded=!1,window.addEventListener("beforeunload",()=>this._inLimbo=!0),this._mainThreadToWorker=new MainThreadToWorker(this,navigator.serviceWorker),this._isAlreadyActive()?this._handleActiveSw():navigator.serviceWorker.register(getAssetPath()+"static/budgeteer.sw-e7566da86237bca8.js",{scope:"../../"}).then(e=>{this._isAlreadyActive()&&this._handleActiveSw()},e=>console.error("Budgeteer registration failed: ",e)),navigator.serviceWorker.addEventListener("controllerchange",()=>this._mainThreadToWorker.setEventPoster(navigator.serviceWorker.controller)),window.BudgeteerMeasure={encodeUrl:this.encodeUrl}}_addIframe(){const e="website-to-measure";if(document.getElementById(e))return void console.error("Iframe already added! Check how this can happen");const r=getAllParameters();if(!r.checkUrl)return void console.error("CAN NOT MEASURE WITHOUT A URL, add checkUrl queryParam. To encode call BudgeteerMeasure.encodeUrl(url: string)");let t=this.decodeUrl(r.checkUrl);const o=window.location.origin;if(!t.startsWith(o))return void console.error("CAN ONLY MEASURE SAME ORIGIN PLEASE CHECK",{origin:o,src:t});const a=getAllParameters(t),i=Object.keys(a).length?"&":"?";a._measureTraffic||(t+=i+"_measureTraffic=true");const s=document.createElement("iframe");s.id=e,s.src=t,document.body.appendChild(s)}_isAlreadyActive(){return navigator.serviceWorker.controller&&-1!==navigator.serviceWorker.controller.scriptURL.indexOf("budgeteer.sw")&&"activated"===navigator.serviceWorker.controller.state}_handleActiveSw(){this._mainThreadToWorker.setEventPoster(navigator.serviceWorker.controller),this._addIframe(),this._alreadyAdded=!0}encodeUrl(e){return encodeURIComponent(e)}decodeUrl(e){return decodeURIComponent(e)}onCommand(e){if(!this._inLimbo)switch(e){case 6:this._alreadyAdded||this._addIframe()}}};
2
- //# sourceMappingURL=budgeteer-measure-1377faa9.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"budgeteer-measure-1377faa9.js","sources":["../../packages/workers/generated/budgeteer.sw.js"],"sourcesContent":["export default \"static/budgeteer.sw-e7566da86237bca8.js\""],"names":[],"mappings":"ycAAe"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-dimensioning-7b9b757c.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import{_ as __decorate,i as inject}from"./roomle-dependency-injection-dade8841.js";import"./main-thread-to-worker-681bab1a.js";const LINE_MATERIAL="component_dimensioning_line_material",PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";let ComponentDimensioning=(()=>{class e extends THREE.Object3D{constructor(e,i,t,n){super(),this._center=i.getCenter(new THREE.Vector3),this._size=i.getSize(new THREE.Vector3),this._origin=this._center.clone().sub(this._size.clone().multiplyScalar(.5)),this._dimensioning=e,this._level=this._dimensioning.maxLevel-this._dimensioning.level,this._font=t,this._cameraPosition=n,this._init()}_initMaterials(){this._cacheHolder.materialCache.has(LINE_MATERIAL)?this._lineMaterial=this._cacheHolder.materialCache.get(LINE_MATERIAL):(this._lineMaterial=new THREE.LineBasicMaterial({color:3618615}),this._cacheHolder.materialCache.set(LINE_MATERIAL,this._lineMaterial)),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(){this._initMaterials();let e=new THREE.Geometry;this._line=new THREE.Line(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.type.value,this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.type.value,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.type.value;let i,t=new THREE.Geometry,n=Math.round(Math.max(this._size.y,this._size.x,this._size.z)),s=Math.abs(this._dimensioning.to-this._dimensioning.from),o=.025+(n<4?0:.005*n);s<.3&&(o*=.5+s);let a={font:this._font,size:o,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},h=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*s),_=new THREE.TextGeometry(h,a);_.computeBoundingBox();let d=_.boundingBox.getSize(new THREE.Vector3).y;if(0===this._dimensioning.type.value&&(i=this._getXEdge(d),this._addXEdgeSideLines(d)),1===this._dimensioning.type.value&&(i=this._getYEdge(d),this._addYEdgeSideLines(d)),2===this._dimensioning.type.value&&(i=this._getZEdge(d),this._addZEdgeSideLines(d)),t.vertices.push(i.start,i.end),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=_,0===this._dimensioning.type.value&&this._addText(i,_,new THREE.Quaternion,new THREE.Vector3(0,.04,0)),1===this._dimensioning.type.value){let e=new THREE.Quaternion,t=this._getXSign()>0?Math.PI/2:Math.PI/2*3;e.setFromAxisAngle(new THREE.Vector3(0,0,1),t),this._addText(i,_,e,new THREE.Vector3(.04,0,0))}if(2===this._dimensioning.type.value){let e=this._getXSign()>0?Math.PI/2:Math.PI/2*3,t=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),n=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,0,1),e);this._addText(i,_,t.multiply(n),new THREE.Vector3(.04,0,0))}}_getXEdge(e){let i=this._size.y+.05+(.06+e)*this._level;const t=new THREE.Vector3(0,this._origin.y,this._origin.z);let n=t.clone().add(new THREE.Vector3(this._dimensioning.from,i,0)),s=t.clone().add(new THREE.Vector3(this._dimensioning.to,i,0));return new THREE.Line3(n,s)}_addXEdgeSideLines(e){let i=this._size.y+.05+(.06+e)*(this._level-.5),t=this._size.y+.05+(.06+e)*this._level;const n=new THREE.Vector3(0,this._origin.y,this._origin.z);let s=n.clone().add(new THREE.Vector3(this._dimensioning.from,i,0)),o=n.clone().add(new THREE.Vector3(this._dimensioning.from,t,0)),a=n.clone().add(new THREE.Vector3(this._dimensioning.to,i,0)),h=n.clone().add(new THREE.Vector3(this._dimensioning.to,t,0));this._addLine(s,o),this._addLine(a,h)}_getZEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new THREE.Vector3(this._origin.x,this._origin.y,0);let n=t.clone().add(new THREE.Vector3(i,0,this._dimensioning.from)),s=t.clone().add(new THREE.Vector3(i,0,this._dimensioning.to));return new THREE.Line3(n,s)}_addZEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const s=new THREE.Vector3(this._origin.x,this._origin.y,0);let o=s.clone().add(new THREE.Vector3(t,0,this._dimensioning.from)),a=s.clone().add(new THREE.Vector3(n,0,this._dimensioning.from)),h=s.clone().add(new THREE.Vector3(t,0,this._dimensioning.to)),_=s.clone().add(new THREE.Vector3(n,0,this._dimensioning.to));this._addLine(o,a),this._addLine(h,_)}_getYEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new THREE.Vector3(this._origin.x,0,this._origin.z);let n=t.clone().add(new THREE.Vector3(i,this._dimensioning.from,0)),s=t.clone().add(new THREE.Vector3(i,this._dimensioning.to,0));return new THREE.Line3(n,s)}_addYEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const s=new THREE.Vector3(this._origin.x,0,this._origin.z);let o=s.clone().add(new THREE.Vector3(t,this._dimensioning.from,0)),a=s.clone().add(new THREE.Vector3(n,this._dimensioning.from,0)),h=s.clone().add(new THREE.Vector3(t,this._dimensioning.to,0)),_=s.clone().add(new THREE.Vector3(n,this._dimensioning.to,0));this._addLine(o,a),this._addLine(h,_)}_addLine(e,i){let t=new THREE.Geometry;t.vertices.push(e,i),this.add(new THREE.Line(t,this._lineMaterial))}_addText(e,i,t,n){let s=e.getCenter(new THREE.Vector3);n.x*=this._getXSign(),s.add(n);let o=i.boundingBox.getSize(new THREE.Vector3);i.center(),this._text.position.copy(s),this._text.quaternion.copy(t),this.add(this._text);let a=new THREE.PlaneGeometry(o.x+.02,o.y+.02,32);a.center(),this._plane.geometry=a,this._plane.position.copy(s),this._plane.quaternion.copy(t),this.add(this._plane)}_getXSign(){return this._cameraPosition.x>=0?1:-1}}return __decorate([inject],e.prototype,"_cacheHolder",void 0),__decorate([inject],e.prototype,"_unitFormatter",void 0),e})();export default ComponentDimensioning;
2
- //# sourceMappingURL=component-dimensioning-d77dc5fd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-dimensioning-d77dc5fd.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-raycast-helper-1eac1f65.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-raycast-helper-e2883ebb.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"configurator-9b988733.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"configurator-df61a67c.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import"./query-params-helper-a271f9dc.js";import"./roomle-dependency-injection-dade8841.js";import"./main-thread-to-worker-681bab1a.js";import"./roomle-configurator-a2354193.js";import"./pixotron-4eb69a29.js";import"./script-loader-122c197b.js";import"./component-raycast-helper-1eac1f65.js";import"./default-light-setting-004b9cd2.js";import{Configurator}from"./configurator-df61a67c.js";(new Configurator).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let o=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)});
2
- //# sourceMappingURL=configurator-main-c2a9b119.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configurator-main-c2a9b119.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"default-light-setting-004b9cd2.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"default-light-setting-c6c8e1ad.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- System.register(["./roomle-dependency-injection-4d02aeed.nomodule.js","./main-thread-to-worker-7283a354.nomodule.js"],(function(e){var t,i,s,n,h;return{setters:[function(e){t=e.p,i=e._,s=e.i,n=e.O,h=e.ah},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";let _=(()=>{class e 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,t,i,s){this._position.copy(e),this._dimensioningType=t,this._cameraPosition=s,this._label=i;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,t,i){let s=new THREE.Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(t);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(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){t(this)}}return i([s],e.prototype,"_cacheHolder",void 0),e})();e("default",(()=>{class e{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 t=new THREE.Geometry;this._widthLine=new THREE.Line(t,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(t,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(t,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,t=this._getWidthEdge();e.vertices.push(t.start,t.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let i=t.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(i,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,t=this._getHeightEdge();e.vertices.push(t.start,t.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let i=t.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(i,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,t=this._getDepthEdge();e.vertices.push(t.start,t.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let i=t.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(i,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let t=this._lineBounds.min.y<0?this._lineBounds.min.y:0;t-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,t,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),t.add(this._widthText),e.add(this._heightLine),t.add(this._heightText),e.add(this._depthLine),t.add(this._depthText))}removeFromScene(e,t){e.remove(this._widthLine),t.remove(this._widthText),e.remove(this._heightLine),t.remove(this._heightText),e.remove(this._depthLine),t.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}}return i([s],e.prototype,"_unitFormatter",void 0),e})())}}}));
2
- //# sourceMappingURL=dimensioning-helper-62227f7c.nomodule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dimensioning-helper-62227f7c.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"ioHAAe"}
@@ -1,2 +0,0 @@
1
- import{p as dispose,_ as __decorate,i as inject,O as AsyncGuard,ah as AsyncDependencyLoader}from"./roomle-dependency-injection-dade8841.js";import"./main-thread-to-worker-681bab1a.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";let TextWithBackground=(()=>{class e 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)}}return __decorate([inject],e.prototype,"_cacheHolder",void 0),e})(),DimensioningHelper=(()=>{class e{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}}return __decorate([inject],e.prototype,"_unitFormatter",void 0),e})();export default DimensioningHelper;
2
- //# sourceMappingURL=dimensioning-helper-707197b7.js.map
@@ -1,2 +0,0 @@
1
- System.register(["./query-params-helper-c231e1b8.nomodule.js","./roomle-dependency-injection-4d02aeed.nomodule.js","./main-thread-to-worker-7283a354.nomodule.js","./pixotron-b8a4128f.nomodule.js","./script-loader-425dddf6.nomodule.js","./default-light-setting-c6c8e1ad.nomodule.js"],(function(e){var t,i,r,n,s,a,o,h,c,d,l,_,m,u,p,g,w,E,f,b,S,v,L,C,M;return{setters:[function(){},function(e){t=e.a6,i=e.D,r=e.L,n=e.R,s=e.h,a=e._,o=e.i,h=e.l,c=e.n,d=e.o,l=e.p,_=e.a4,m=e.a5,u=e.b},function(e){p=e.f},function(e){g=e.C,w=e.L,E=e.S,f=e.B,b=e.T,S=e.P,v=e.c},function(e){L=e.S,C=e.M},function(e){M=e.D}],execute:function(){const y=[new i("script-loader",L),new i("glb-input-manager",class extends t{},1),new i("logger",r),new i("rapi-access",n)];class R extends g{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,i,r,n){let s=new THREE.Vector3(-e.x/2,0,-e.z/2),a=new THREE.Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new THREE.Box3(s,a);let o=new THREE.Euler(-Math.PI/2+r,i,0,"ZYX"),h=(new THREE.Quaternion).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 B extends w{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.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=s();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 THREE.Color(e)})}}}let T=(()=>{class e extends E{constructor(e,t){super(e,t,h.GLB),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(c.createDynamicLightSettingSource(null,d.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new B(this._scene)),this._setEnvironment(new f(this._scene,this._environment))}createCameraControl(e,t){this._cameraControl=new R(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const i=await this._rapiAccess.getItem(e);if(i.configuration)return Promise.reject();const r=p(i);return r?this.loadGLB(r,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,i=new THREE.Vector3(1,1,1),r){return this.clearScene(),new Promise((n,s)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,i,void 0,void 0,r).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let i=(new THREE.Box3).setFromObject(this._currentGLB);if(t){let e=i.getCenter(new THREE.Vector3);this._cameraControl instanceof R&&(this._cameraControl.updateToBounds(i,!1,!0,e),this._cameraControl.reset(i,e,-15,0))}this._updateBounds(i,!0),n()},s)})}preparePerspectiveImage(e,t,i){return new Promise(r=>{t||(t=1e3),i||(i=1e3),e||((e=new THREE.WebGLRenderer({antialias:!0})).setSize(t,i),e.outputEncoding=THREE.sRGBEncoding,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=THREE.BasicShadowMap);let n=this._cameraControl.getCamera().clone();n instanceof THREE.PerspectiveCamera&&(n.aspect=t/i,n.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new M(this._scene);e.render(this._scene,n);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{r({image:a,width:t,height:i,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,i,r){if(this._cameraControl instanceof R){let n=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(n,e,t,i,r),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),l(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD(),this._pixotron.enableAA=!1,this._pixotron.getSAOPass().enabled=!0}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.4,smoothTransition:!0,samplesPerFrame:4,bias:.016,numSamples:200,accumulative:!1,falloff:1.5},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightDirection:new THREE.Vector3(0,1,.5),lightSolidAngle:40}}getBounds(){return this._currentGLB?(new THREE.Box3).setFromObject(this._currentGLB):null}}return a([o],e.prototype,"_glbInputManager",void 0),a([o],e.prototype,"_rapiAccess",void 0),e})();class x{constructor(e,t,i){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=i,this._renderer.setSize(t,i),this._renderer.setClearColor(16777215,0),this._renderer.outputEncoding=THREE.sRGBEncoding}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 THREE.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 i=this._entries.indexOf(e);i>-1&&this._entries.splice(i,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}let H=(()=>{class e{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){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(_,{id:"gltf-loader"}),i=this._scriptLoader.fetch(m,{id:"draco-loader"}),r=this._scriptLoader.fetch(b,{id:"tween-js"});Promise.all([t,i,r]).then(()=>{this._sceneManager=new T(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const i=()=>{this._sceneManager.enableHD(),e()};Promise.all(S.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(v,{id:"pi-js"}).then(i,t)},t)})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,i){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new THREE.Vector3(t,t,t),i)}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)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,i=320){let r=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-dd6c9829408677a1.js",{id:"jszip-js"}).then(()=>{let e=new x(this._sceneManager,t,i);e.addListener(this._sceneManager),e.start(r.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{let i=document.createElement("a");i.href=URL.createObjectURL(t),i.download="content.zip",i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),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}}return a([o],e.prototype,"_rapiAccess",void 0),a([o],e.prototype,"_domHelper",void 0),a([o],e.prototype,"_scriptLoader",void 0),a([o],e.prototype,"_lifeCycleManager",void 0),a([o],e.prototype,"_threeLoader",void 0),a([o],e.prototype,"_initData",void 0),a([o],e.prototype,"_globalInitData",void 0),a([o],e.prototype,"_unitFormatter",void 0),e})();e("GlbViewer",class extends C{setupGlobals(){}setupDependencies(){u.setup(y),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new H(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
- //# sourceMappingURL=glb-viewer-23b774e0.nomodule.js.map
@@ -1,2 +0,0 @@
1
- import"./query-params-helper-a271f9dc.js";import{a6 as InputManager,D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,h as getGUI,_ as __decorate,i as inject,l as CANVAS_ID,n as DynamicLightSettingLoader,o as PREDEFINED_LIGHTSETTING,p as dispose,a4 as GLTF_LOADER_FILE_NAME,a5 as DRACO_LOADER_FILE_NAME,b as RoomleDependencyInjection}from"./roomle-dependency-injection-dade8841.js";import{f as getGlbUrl}from"./main-thread-to-worker-681bab1a.js";import{C as CameraControl3D,L as LightSetting,S as SceneManager,B as BakedShadowEnvironment,T as TWEEN_FILE_NAME,P as PIXOTRON_EFFETCS,c as PIXOTRON_FILE_NAME}from"./pixotron-4eb69a29.js";import{S as ScriptLoader,M as Main}from"./script-loader-122c197b.js";import{D as DefaultLightSetting}from"./default-light-setting-004b9cd2.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,n,i){let s=new THREE.Vector3(-e.x/2,0,-e.z/2),a=new THREE.Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new THREE.Box3(s,a);let o=new THREE.Euler(-Math.PI/2+n,r,0,"ZYX"),c=(new THREE.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 THREE.AmbientLight(new THREE.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 THREE.Color(e)})}}}let GLBViewerSceneManager=(()=>{class e extends SceneManager{constructor(e,t){super(e,t,CANVAS_ID.GLB),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,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)),this._setEnvironment(new BakedShadowEnvironment(this._scene,this._environment))}createCameraControl(e,t){this._cameraControl=new AdjustableCameraControl3D(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const n=getGlbUrl(r);return n?this.loadGLB(n,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new THREE.Vector3(1,1,1),n){return this.clearScene(),new Promise((i,s)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,r,void 0,void 0,n).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new THREE.Box3).setFromObject(this._currentGLB);if(t){let e=r.getCenter(new THREE.Vector3);this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.updateToBounds(r,!1,!0,e),this._cameraControl.reset(r,e,-15,0))}this._updateBounds(r,!0),i()},s)})}preparePerspectiveImage(e,t,r){return new Promise(n=>{t||(t=1e3),r||(r=1e3),e||((e=new THREE.WebGLRenderer({antialias:!0})).setSize(t,r),e.outputEncoding=THREE.sRGBEncoding,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=THREE.BasicShadowMap);let i=this._cameraControl.getCamera().clone();i instanceof THREE.PerspectiveCamera&&(i.aspect=t/r,i.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new DefaultLightSetting(this._scene);e.render(this._scene,i);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{n({image:a,width:t,height:r,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,r,n){if(this._cameraControl instanceof AdjustableCameraControl3D){let i=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(i,e,t,r,n),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),dispose(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD(),this._pixotron.enableAA=!1,this._pixotron.getSAOPass().enabled=!0}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.4,smoothTransition:!0,samplesPerFrame:4,bias:.016,numSamples:200,accumulative:!1,falloff:1.5},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightDirection:new THREE.Vector3(0,1,.5),lightSolidAngle:40}}getBounds(){return this._currentGLB?(new THREE.Box3).setFromObject(this._currentGLB):null}}return __decorate([inject],e.prototype,"_glbInputManager",void 0),__decorate([inject],e.prototype,"_rapiAccess",void 0),e})();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 THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputEncoding=THREE.sRGBEncoding}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 THREE.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()}}let RoomleGLBViewer=(()=>{class e{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){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(GLTF_LOADER_FILE_NAME,{id:"gltf-loader"}),r=this._scriptLoader.fetch(DRACO_LOADER_FILE_NAME,{id:"draco-loader"}),n=this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"});Promise.all([t,r,n]).then(()=>{this._sceneManager=new GLBViewerSceneManager(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const r=()=>{this._sceneManager.enableHD(),e()};Promise.all(PIXOTRON_EFFETCS.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(PIXOTRON_FILE_NAME,{id:"pi-js"}).then(r,t)},t)})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new THREE.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)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let n=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-dd6c9829408677a1.js",{id:"jszip-js"}).then(()=>{let e=new GLBRenderWorker(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(n.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{let r=document.createElement("a");r.href=URL.createObjectURL(t),r.download="content.zip",r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),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}}return __decorate([inject],e.prototype,"_rapiAccess",void 0),__decorate([inject],e.prototype,"_domHelper",void 0),__decorate([inject],e.prototype,"_scriptLoader",void 0),__decorate([inject],e.prototype,"_lifeCycleManager",void 0),__decorate([inject],e.prototype,"_threeLoader",void 0),__decorate([inject],e.prototype,"_initData",void 0),__decorate([inject],e.prototype,"_globalInitData",void 0),__decorate([inject],e.prototype,"_unitFormatter",void 0),e})();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-a3b1ff73.js.map
@@ -1,2 +0,0 @@
1
- import"./query-params-helper-a271f9dc.js";import"./roomle-dependency-injection-dade8841.js";import"./main-thread-to-worker-681bab1a.js";import"./pixotron-4eb69a29.js";import"./script-loader-122c197b.js";import"./default-light-setting-004b9cd2.js";import{GlbViewer}from"./glb-viewer-a3b1ff73.js";(new GlbViewer).boot();
2
- //# sourceMappingURL=glb-viewer-main-b413d64a.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"glb-viewer-main-b413d64a.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- System.register(["./roomle-dependency-injection-e294616d.legacy.js","./main-thread-to-worker-e2f2b9cb.legacy.js"],(function(e){var n,t,a,s;return{setters:[function(e){n=e._,t=e.i,a=e.ai},function(e){s=e.g}],execute:function(){e("default",(()=>{class e extends a{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(s()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new THREE.Vector3),n=this._bounds.getCenter(new THREE.Vector3).clone();n.x-=e.x/2+.18,n.z+=e.z/2+.05,n.y=0;let t=.03;this._banana.scale.copy(new THREE.Vector3(t,t,t)),this._banana.rotation.y=.6,this._banana.position.copy(n)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,n){super.clearScene(e,n),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}return n([t],e.prototype,"_staticItemLoader",void 0),e})())}}}));
2
- //# sourceMappingURL=banana-for-scale-f8ab137f.legacy.js.map
@@ -1,2 +0,0 @@
1
- System.register(["./roomle-dependency-injection-e294616d.legacy.js","./main-thread-to-worker-e2f2b9cb.legacy.js"],(function(e){var i,t;return{setters:[function(e){i=e._,t=e.i},function(){}],execute:function(){const n="component_dimensioning_line_material",s="component_dimensioning_plane_material",o="component_dimensioning_text_material";e("default",(()=>{class e extends THREE.Object3D{constructor(e,i,t,n){super(),this._center=i.getCenter(new THREE.Vector3),this._size=i.getSize(new THREE.Vector3),this._origin=this._center.clone().sub(this._size.clone().multiplyScalar(.5)),this._dimensioning=e,this._level=this._dimensioning.maxLevel-this._dimensioning.level,this._font=t,this._cameraPosition=n,this._init()}_initMaterials(){this._cacheHolder.materialCache.has(n)?this._lineMaterial=this._cacheHolder.materialCache.get(n):(this._lineMaterial=new THREE.LineBasicMaterial({color:3618615}),this._cacheHolder.materialCache.set(n,this._lineMaterial)),this._cacheHolder.materialCache.has(s)?this._planeMaterial=this._cacheHolder.materialCache.get(s):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(s,this._planeMaterial)),this._cacheHolder.materialCache.has(o)?this._textMaterial=this._cacheHolder.materialCache.get(o):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(o,this._textMaterial))}_init(){this._initMaterials();let e=new THREE.Geometry;this._line=new THREE.Line(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.type.value,this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.type.value,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.type.value;let i,t=new THREE.Geometry,n=Math.round(Math.max(this._size.y,this._size.x,this._size.z)),s=Math.abs(this._dimensioning.to-this._dimensioning.from),o=.025+(n<4?0:.005*n);s<.3&&(o*=.5+s);let a={font:this._font,size:o,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},h=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*s),_=new THREE.TextGeometry(h,a);_.computeBoundingBox();let r=_.boundingBox.getSize(new THREE.Vector3).y;if(0===this._dimensioning.type.value&&(i=this._getXEdge(r),this._addXEdgeSideLines(r)),1===this._dimensioning.type.value&&(i=this._getYEdge(r),this._addYEdgeSideLines(r)),2===this._dimensioning.type.value&&(i=this._getZEdge(r),this._addZEdgeSideLines(r)),t.vertices.push(i.start,i.end),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=_,0===this._dimensioning.type.value&&this._addText(i,_,new THREE.Quaternion,new THREE.Vector3(0,.04,0)),1===this._dimensioning.type.value){let e=new THREE.Quaternion,t=this._getXSign()>0?Math.PI/2:Math.PI/2*3;e.setFromAxisAngle(new THREE.Vector3(0,0,1),t),this._addText(i,_,e,new THREE.Vector3(.04,0,0))}if(2===this._dimensioning.type.value){let e=this._getXSign()>0?Math.PI/2:Math.PI/2*3,t=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),n=(new THREE.Quaternion).setFromAxisAngle(new THREE.Vector3(0,0,1),e);this._addText(i,_,t.multiply(n),new THREE.Vector3(.04,0,0))}}_getXEdge(e){let i=this._size.y+.05+(.06+e)*this._level;const t=new THREE.Vector3(0,this._origin.y,this._origin.z);let n=t.clone().add(new THREE.Vector3(this._dimensioning.from,i,0)),s=t.clone().add(new THREE.Vector3(this._dimensioning.to,i,0));return new THREE.Line3(n,s)}_addXEdgeSideLines(e){let i=this._size.y+.05+(.06+e)*(this._level-.5),t=this._size.y+.05+(.06+e)*this._level;const n=new THREE.Vector3(0,this._origin.y,this._origin.z);let s=n.clone().add(new THREE.Vector3(this._dimensioning.from,i,0)),o=n.clone().add(new THREE.Vector3(this._dimensioning.from,t,0)),a=n.clone().add(new THREE.Vector3(this._dimensioning.to,i,0)),h=n.clone().add(new THREE.Vector3(this._dimensioning.to,t,0));this._addLine(s,o),this._addLine(a,h)}_getZEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new THREE.Vector3(this._origin.x,this._origin.y,0);let n=t.clone().add(new THREE.Vector3(i,0,this._dimensioning.from)),s=t.clone().add(new THREE.Vector3(i,0,this._dimensioning.to));return new THREE.Line3(n,s)}_addZEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const s=new THREE.Vector3(this._origin.x,this._origin.y,0);let o=s.clone().add(new THREE.Vector3(t,0,this._dimensioning.from)),a=s.clone().add(new THREE.Vector3(n,0,this._dimensioning.from)),h=s.clone().add(new THREE.Vector3(t,0,this._dimensioning.to)),_=s.clone().add(new THREE.Vector3(n,0,this._dimensioning.to));this._addLine(o,a),this._addLine(h,_)}_getYEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new THREE.Vector3(this._origin.x,0,this._origin.z);let n=t.clone().add(new THREE.Vector3(i,this._dimensioning.from,0)),s=t.clone().add(new THREE.Vector3(i,this._dimensioning.to,0));return new THREE.Line3(n,s)}_addYEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const s=new THREE.Vector3(this._origin.x,0,this._origin.z);let o=s.clone().add(new THREE.Vector3(t,this._dimensioning.from,0)),a=s.clone().add(new THREE.Vector3(n,this._dimensioning.from,0)),h=s.clone().add(new THREE.Vector3(t,this._dimensioning.to,0)),_=s.clone().add(new THREE.Vector3(n,this._dimensioning.to,0));this._addLine(o,a),this._addLine(h,_)}_addLine(e,i){let t=new THREE.Geometry;t.vertices.push(e,i),this.add(new THREE.Line(t,this._lineMaterial))}_addText(e,i,t,n){let s=e.getCenter(new THREE.Vector3);n.x*=this._getXSign(),s.add(n);let o=i.boundingBox.getSize(new THREE.Vector3);i.center(),this._text.position.copy(s),this._text.quaternion.copy(t),this.add(this._text);let a=new THREE.PlaneGeometry(o.x+.02,o.y+.02,32);a.center(),this._plane.geometry=a,this._plane.position.copy(s),this._plane.quaternion.copy(t),this.add(this._plane)}_getXSign(){return this._cameraPosition.x>=0?1:-1}}return i([t],e.prototype,"_cacheHolder",void 0),i([t],e.prototype,"_unitFormatter",void 0),e})())}}}));
2
- //# sourceMappingURL=component-dimensioning-06a6f9ee.legacy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-dimensioning-06a6f9ee.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-raycast-helper-59acc8b8.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"configurator-678bed92.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"default-light-setting-0eae7ddf.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- System.register(["./roomle-dependency-injection-e294616d.legacy.js","./main-thread-to-worker-e2f2b9cb.legacy.js"],(function(e){var t,i,s,n,h;return{setters:[function(e){t=e.p,i=e._,s=e.i,n=e.O,h=e.ah},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";let _=(()=>{class e 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,t,i,s){this._position.copy(e),this._dimensioningType=t,this._cameraPosition=s,this._label=i;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,t,i){let s=new THREE.Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(t);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(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){t(this)}}return i([s],e.prototype,"_cacheHolder",void 0),e})();e("default",(()=>{class e{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 t=new THREE.Geometry;this._widthLine=new THREE.Line(t,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(t,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(t,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,t=this._getWidthEdge();e.vertices.push(t.start,t.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let i=t.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(i,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,t=this._getHeightEdge();e.vertices.push(t.start,t.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let i=t.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(i,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,t=this._getDepthEdge();e.vertices.push(t.start,t.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let i=t.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(i,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let t=this._lineBounds.min.y<0?this._lineBounds.min.y:0;t-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,t,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),t.add(this._widthText),e.add(this._heightLine),t.add(this._heightText),e.add(this._depthLine),t.add(this._depthText))}removeFromScene(e,t){e.remove(this._widthLine),t.remove(this._widthText),e.remove(this._heightLine),t.remove(this._heightText),e.remove(this._depthLine),t.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}}return i([s],e.prototype,"_unitFormatter",void 0),e})())}}}));
2
- //# sourceMappingURL=dimensioning-helper-97e8b9c5.legacy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dimensioning-helper-97e8b9c5.legacy.js","sources":["../../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"6nHAAe"}
@@ -1,2 +0,0 @@
1
- System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-e294616d.legacy.js","./main-thread-to-worker-e2f2b9cb.legacy.js","./pixotron-80fe5913.legacy.js","./script-loader-9dc48cfd.legacy.js","./default-light-setting-0eae7ddf.legacy.js"],(function(e){var t,i,r,n,s,a,o,h,c,l,d,_,m,u,p,g,w,f,E,b,S,v,L,y,C;return{setters:[function(){},function(e){t=e.a6,i=e.D,r=e.L,n=e.R,s=e.h,a=e._,o=e.i,h=e.l,c=e.n,l=e.o,d=e.p,_=e.a4,m=e.a5,u=e.b},function(e){p=e.f},function(e){g=e.C,w=e.L,f=e.S,E=e.B,b=e.T,S=e.P,v=e.c},function(e){L=e.S,y=e.M},function(e){C=e.D}],execute:function(){const M=[new i("script-loader",L),new i("glb-input-manager",class extends t{},1),new i("logger",r),new i("rapi-access",n)];class R extends g{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,i,r,n){let s=new THREE.Vector3(-e.x/2,0,-e.z/2),a=new THREE.Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new THREE.Box3(s,a);let o=new THREE.Euler(-Math.PI/2+r,i,0,"ZYX"),h=(new THREE.Quaternion).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 B extends w{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.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=s();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 THREE.Color(e)})}}}let T=(()=>{class e extends f{constructor(e,t){super(e,t,h.GLB),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(c.createDynamicLightSettingSource(null,l.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new B(this._scene)),this._setEnvironment(new E(this._scene,this._environment))}createCameraControl(e,t){this._cameraControl=new R(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const i=await this._rapiAccess.getItem(e);if(i.configuration)return Promise.reject();const r=p(i);return r?this.loadGLB(r,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,i=new THREE.Vector3(1,1,1),r){return this.clearScene(),new Promise((n,s)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,i,void 0,void 0,r).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let i=(new THREE.Box3).setFromObject(this._currentGLB);if(t){let e=i.getCenter(new THREE.Vector3);this._cameraControl instanceof R&&(this._cameraControl.updateToBounds(i,!1,!0,e),this._cameraControl.reset(i,e,-15,0))}this._updateBounds(i,!0),n()},s)})}preparePerspectiveImage(e,t,i){return new Promise(r=>{t||(t=1e3),i||(i=1e3),e||((e=new THREE.WebGLRenderer({antialias:!0})).setSize(t,i),e.outputEncoding=THREE.sRGBEncoding,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=THREE.BasicShadowMap);let n=this._cameraControl.getCamera().clone();n instanceof THREE.PerspectiveCamera&&(n.aspect=t/i,n.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new C(this._scene);e.render(this._scene,n);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{r({image:a,width:t,height:i,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,i,r){if(this._cameraControl instanceof R){let n=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(n,e,t,i,r),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),d(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD(),this._pixotron.enableAA=!1,this._pixotron.getSAOPass().enabled=!0}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.4,smoothTransition:!0,samplesPerFrame:4,bias:.016,numSamples:200,accumulative:!1,falloff:1.5},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightDirection:new THREE.Vector3(0,1,.5),lightSolidAngle:40}}getBounds(){return this._currentGLB?(new THREE.Box3).setFromObject(this._currentGLB):null}}return a([o],e.prototype,"_glbInputManager",void 0),a([o],e.prototype,"_rapiAccess",void 0),e})();class x{constructor(e,t,i){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=i,this._renderer.setSize(t,i),this._renderer.setClearColor(16777215,0),this._renderer.outputEncoding=THREE.sRGBEncoding}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 THREE.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 i=this._entries.indexOf(e);i>-1&&this._entries.splice(i,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}let H=(()=>{class e{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){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(_,{id:"gltf-loader"}),i=this._scriptLoader.fetch(m,{id:"draco-loader"}),r=this._scriptLoader.fetch(b,{id:"tween-js"});Promise.all([t,i,r]).then(()=>{this._sceneManager=new T(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const i=()=>{this._sceneManager.enableHD(),e()};Promise.all(S.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(v,{id:"pi-js"}).then(i,t)},t)})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,i){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new THREE.Vector3(t,t,t),i)}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)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,i=320){let r=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-dd6c9829408677a1.js",{id:"jszip-js"}).then(()=>{let e=new x(this._sceneManager,t,i);e.addListener(this._sceneManager),e.start(r.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{let i=document.createElement("a");i.href=URL.createObjectURL(t),i.download="content.zip",i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),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}}return a([o],e.prototype,"_rapiAccess",void 0),a([o],e.prototype,"_domHelper",void 0),a([o],e.prototype,"_scriptLoader",void 0),a([o],e.prototype,"_lifeCycleManager",void 0),a([o],e.prototype,"_threeLoader",void 0),a([o],e.prototype,"_initData",void 0),a([o],e.prototype,"_globalInitData",void 0),a([o],e.prototype,"_unitFormatter",void 0),e})();e("GlbViewer",class extends y{setupGlobals(){}setupDependencies(){u.setup(M),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new H(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
- //# sourceMappingURL=glb-viewer-ddc7a29d.legacy.js.map
@@ -1,2 +0,0 @@
1
- System.register([],(function(e){return{execute:function(){e("R",{PRIMARY:"#db0000",ON_PRIMARY:"#ffffff",DEFAULT_BACKGROUND:"#f7f7f7",SELECTION:"#ffffff"}),e("i",e=>{document.body.style.cursor=e}),e("h",e=>{const t=e.headers.get("content-type");if(t&&t.includes("application/json"))return e.json();throw new TypeError("No JSON returned")}),e("g",()=>window.__RML__ENV__&&window.__RML__ENV__.assetPath?window.__RML__ENV__.assetPath:"");const t=e("u",(e=null)=>e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):(1e7.toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)),s=(e("b",(e,t,r)=>{s(e,t,{writable:r})}),e("s",(e,t,s)=>{const r=Object.getOwnPropertyDescriptor(e,t);for(let e in s)s.hasOwnProperty(e)&&(r[e]=s[e]);Object.defineProperty(e,t,r)})),r=(e("c",e=>({id:e,name:e,externalIdentifier:"test-identifier",group:"test-group",groupLabel:"test-group-label",color:"#"+new THREE.Color(.5,.5,.5).getHexString(),thumbnail:r(e,15),label:"test-label",textures:[1,2,3],shading:{alpha:1,metallic:.5,basecolor:{r:.5,g:.5,b:.5},roughness:.5,doubleSided:!1,alphaCutoff:.5},active:!0,tags:[]})),e("e",e=>{const t=e.split("_"),s=parseInt(t[1],10);return{mapping:"RGB",id:e,material:e,image:r(e),url:r(e),height:s,width:s,mmHeight:1,mmWidth:1,tileable:!0}}),(e,t)=>{const s=e.split("_");return t||(t=parseInt(s[1],10)),"https://loremflickr.com/"+t+"/"+t+"?lock="+Math.abs(parseFloat(s[2]))}),n=(e("j",e=>"string"==typeof e||e instanceof String),e("o",(e,t)=>e.reduce((e,s)=>{if("object"!=typeof s)return console.warn("objectArrayToMap only works for arrays of objects"),e;const r=s[t];return r?(e.has(r)||e.set(r,s),e):(console.warn('Object has no key "'+t+'" therefore we do not know where to put it'),e)},new Map)),e("t",(e,t=16)=>{let s,r=!1,n=0,o=null;return function(...a){s||(s=Date.now()),!r||s+t-Date.now()<0?(e.apply(this,[...arguments]),s=Date.now(),r=!0):n++,o||(o=setInterval(()=>{n&&e.apply(this,[...arguments]),n=0,clearInterval(o),o=null},t))}}),e("k",(e,t=16)=>{let s,r=!1;return function(...n){!r||s+t-Date.now()<0?(s=Date.now(),e.apply(this,[...arguments]),r=!0):s=Date.now()}}),e("l",(e,t)=>{let s;return(...r)=>{clearTimeout(s),s=setTimeout(()=>{e(...r)},t)}}),e("w",async e=>new Promise(t=>setTimeout(t,e))),new RegExp(/\/3d\/[0-9]+\//)),o=(e("f",e=>{var t;if(null===(t=e.assets.glb)||void 0===t?void 0:t.url)return e.assets.glb.url;if(e.threeDimensionalAsset)return e.threeDimensionalAsset;const s=e.threeDimensionalAssetWeb;return s&&"string"==typeof s?s.match(n)?s.replace(n,"/3d/glb/").replace(".flash.u3d",".glb"):s:null}),e("d",(e,t)=>{for(const s in t)try{t[s].constructor===Object?e[s]=o(e[s],t[s]):e[s]=t[s]}catch(r){e[s]=t[s]}return e}));e("a",(e,t)=>void 0===e?t:e),e("r",(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)}),e("m",e=>e?JSON.parse(JSON.stringify(e)):e);let a=0;e("M",class extends class{constructor(e,t){this._callbacks=e,this.eventListener=t,this.eventListener.addEventListener("message",this,!1)}get eventPoster(){return this._eventPoster&&this._eventPoster.postMessage?this._eventPoster:this.eventListener&&this.eventListener.postMessage?this.eventListener:{postMessage:()=>{}}}hasEventPoster(){return!!this._eventPoster}nextConversationId(){return a++}setEventPoster(e){this._eventPoster=e}handleEvent(e){if(!e||!e.data)return;const[t,s,r]=JSON.parse(e.data);if(!t||0!==t.indexOf("rml"))return;const[n,o]=t.split("."),a=parseInt(o,10);this._callbacks.onCommand(a,parseInt(s,10),r)}}{constructor(e,t){super(e,t),this._promiseCallbacks=new Map}sendToWorker(e,t=null,s,r){const n=this.nextConversationId(),o=()=>!1;!s&&r&&(s=o),s&&!r&&(r=o),s&&r&&this._promiseCallbacks.set(n,{resolve:s,reject:r}),this.eventPoster.postMessage(JSON.stringify(["rml."+e,n,t]))}resolvePromises(e,t){const s=this._promiseCallbacks.get(e);s&&(s.resolve.apply(s,[t]),this._promiseCallbacks.delete(e))}})}}}));
2
- //# sourceMappingURL=main-thread-to-worker-e2f2b9cb.legacy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"main-thread-to-worker-e2f2b9cb.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-e294616d.legacy.js","./main-thread-to-worker-e2f2b9cb.legacy.js","./pixotron-80fe5913.legacy.js","./script-loader-9dc48cfd.legacy.js"],(function(e){var t,a,i,r,s,n,o,h,l,m,_,d,c,p,u,g,M,w,y,C,f,S,E,P,v,b,x,R,T;return{setters:[function(){},function(e){t=e._,a=e.i,i=e.l,r=e.n,s=e.o,n=e.U,o=e.a8,h=e.a9,l=e.h,m=e.aa,_=e.V,d=e.a4,c=e.ab,p=e.D,u=e.L,g=e.a6,M=e.ac,w=e.ad,y=e.R,C=e.b},function(){},function(e){f=e.S,S=e.b,E=e.C,P=e.F,v=e.T,b=e.P,x=e.c},function(e){R=e.S,T=e.M}],execute:function(){let F=(()=>{class e extends f{constructor(e,t){super(e,t,i.RMV),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(r.createDynamicLightSettingSource(null,s.CAMERA)),this._initScene()}_initScene(){const e=new THREE.BoxGeometry(1,1,1,100,100,100),t=new THREE.MeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._environmentLoader.setEnvMap(t),this._setMaterial(t),this._mesh=new THREE.Mesh(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:a}=this._initData;if(a?this.changeFloorMaterialById(a):this._environment=new S(this._scene,null,new THREE.Color(16777215)),this._cameraControl instanceof E){const e=new THREE.Box3;e.setFromObject(this._mesh),this._cameraControl.updateAndReset(e.getSize(new THREE.Vector3),e.getCenter(new THREE.Vector3))}this.showGUI()}loadMaterialId(e){return new Promise(t=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})})}loadMaterial(e){return new Promise(t=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._setMaterial(n(e,this._environmentLoader)),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),t()})}loadMaterialShading(e){return new Promise(t=>{let a={shading:e};this._setMaterial(o(this._material,a,this._environmentLoader)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===THREE.DoubleSide,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(){return h(this._material)}createCameraControl(e,t){this._cameraControl=new E(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._inputManager}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.6,smoothTransition:!0,samplesPerFrame:4,bias:.02,numSamples:200,accumulative:!0},shadowparams:{shadowMapResolution:1024,shadowRadius:1,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.05,nearPlane:.01,farPlane:50,fov:40,numSamples:50,side:THREE.FrontSide}}}getBakedShadowParams(){return{enable:!1,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4}}getBounds(){return this._mesh?(new THREE.Box3).setFromObject(this._mesh):null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=l();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new THREE.Color(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?THREE.DoubleSide:THREE.FrontSide,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(h(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new THREE.BoxGeometry(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new THREE.SphereGeometry(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new THREE.PlaneGeometry(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new THREE.PlaneGeometry(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const t=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof P||(this._environment=new P(this._scene,this._environment,!0)),this._pixotron&&this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera()),new Promise((e,a)=>{this._environment.changeFloorMaterial(t,this._maxAnisotropy).then(()=>{this._requestRender(),e()},a)})}async addTexture(e,t){const a=100/(0===e.mmWidth?1:e.mmWidth),i=100/(0===e.mmHeight?1:e.mmHeight);if(t){const r=new Image;r.src=t;const s=new THREE.Texture;s.image=r,r.onload=function(){s.needsUpdate=!0},m(s,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures)}else await _(e.image,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}return t([a],e.prototype,"_inputManager",void 0),t([a],e.prototype,"_configuratorMeshGenerator",void 0),t([a],e.prototype,"_roomleMaterialViewerUiCallback",void 0),t([a],e.prototype,"_rapiAccess",void 0),e})(),G=(()=>{class e{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(d,{id:"gltf-loader"}),a=this._scriptLoader.fetch(v,{id:"tween-js"});Promise.all([t,a]).then(()=>{this._sceneManager=new F(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const a=()=>{this._sceneManager.enableHD(),e()};Promise.all(b.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(x,{id:"pi-js"}).then(a,t)},t)})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}loadMaterial(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(){return this._sceneManager.getMaterialShading()}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,t){return this._sceneManager.addTexture(e,t)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}}return t([a],e.prototype,"_domHelper",void 0),t([a],e.prototype,"_scriptLoader",void 0),t([a],e.prototype,"_lifeCycleManager",void 0),t([a],e.prototype,"_threeLoader",void 0),t([a],e.prototype,"_roomleMaterialViewerUiCallback",void 0),t([a],e.prototype,"_initData",void 0),t([a],e.prototype,"_rapiAccess",void 0),t([a],e.prototype,"_unitFormatter",void 0),e})();const H=[new p("script-loader",R),new p("logger",u),new p("input-manager",g,1),new p("environment-loader",M),new p("configurator-mesh-generator",w),new p("rapi-access",y),new p("roomle-material-viewer-ui-callback",class extends c{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];e("MaterialViewer",class extends T{setupGlobals(){}setupDependencies(){C.setup(H),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new G(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
2
- //# sourceMappingURL=material-viewer-a01fd304.legacy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"material-viewer-a01fd304.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}