@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
@@ -1,7 +1,7 @@
1
1
  import EventDispatcher from './event-dispatcher';
2
2
  import { CanvasOffset } from '../../../common-core/src/common-interfaces';
3
- export declare type UIIntersection = 'left' | 'top' | 'right' | 'bottom';
4
- export declare type UIIntersections = UIIntersection[];
3
+ export type UIIntersection = 'left' | 'top' | 'right' | 'bottom';
4
+ export type UIIntersections = UIIntersection[];
5
5
  export declare const enum UI_INTERSECTION_EVENT {
6
6
  CHANGE = 0
7
7
  }
@@ -7,7 +7,7 @@ export default class PlannerKernelAccessMock extends PlannerKernelAccess {
7
7
  registerConfiguratorCallback: () => void;
8
8
  unregisterPlannerCallback: () => void;
9
9
  registerPlannerCallback: () => void;
10
- catalogItemLoaded: (catalogItem: KernelCatalogItem) => void;
10
+ catalogItemLoaded: (_catalogItem: KernelCatalogItem) => void;
11
11
  CatalogItem: {
12
12
  new (): {};
13
13
  };
@@ -13,6 +13,7 @@ export interface SelectionPayload {
13
13
  component?: RapiComponent;
14
14
  configurationRuntimeId?: number;
15
15
  wall?: WallDimension;
16
+ staticItemRuntimeId?: number;
16
17
  }
17
18
  export default class RoomlePlannerUiCallback extends UiCallback {
18
19
  constructor(creator: string);
@@ -20,7 +20,7 @@ export interface ToolsCoreInterface {
20
20
  getVersion(): string;
21
21
  analyzeComponent(componentDefinition: string, componentFilepath: string): void;
22
22
  }
23
- export declare type ToolsCoreCallback = ToolsCoreContextCallback;
23
+ export type ToolsCoreCallback = ToolsCoreContextCallback;
24
24
  export interface RoomleToolsCoreUICallback {
25
25
  }
26
26
  export default class RoomleToolsCore implements Context, ExternalEmbeddable<RoomleToolsCoreUICallback> {
@@ -1,6 +1,6 @@
1
1
  import * as __dat from 'dat.gui';
2
2
  import type * as __THREE from 'three';
3
- declare type ThreeShader = string;
3
+ type ThreeShader = string;
4
4
  declare global {
5
5
  const THREE: typeof __THREE;
6
6
  const dat: typeof __dat;
@@ -1 +1 @@
1
- export declare type Values<T> = T[keyof T];
1
+ export type Values<T> = T[keyof T];
@@ -164,7 +164,7 @@ export interface EmscriptenList {
164
164
  size: () => number;
165
165
  length: number;
166
166
  }
167
- export declare type EmscriptenString = any;
167
+ export type EmscriptenString = any;
168
168
  export interface EmscriptenMap<K, V> {
169
169
  set: (key: K, value: V) => void;
170
170
  size: () => number;
@@ -1,12 +1,12 @@
1
- export declare type RapiId = string;
2
- export declare type AssetUrl = string;
3
- export declare type ConfigurationString = string;
4
- export declare type ConfigurationHash = string;
5
- export declare type Base64String = string;
6
- export declare type RapiServerUrlType = 'live' | 'test';
7
- export declare type HexColorString = string;
8
- export declare type PriceId = string;
9
- export declare type ArticleNumber = string;
1
+ export type RapiId = string;
2
+ export type AssetUrl = string;
3
+ export type ConfigurationString = string;
4
+ export type ConfigurationHash = string;
5
+ export type Base64String = string;
6
+ export type RapiServerUrlType = 'live' | 'test';
7
+ export type HexColorString = string;
8
+ export type PriceId = string;
9
+ export type ArticleNumber = string;
10
10
  export interface LinksCollection {
11
11
  [key: string]: string;
12
12
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference path="../../../../../packages/workers/src/service-worker.d.ts" />
2
2
  import { BUDGETEER_CATEGORY, BudgeteerEntry, BUDGETEER_TYPES, ContentMeta } from './budgeteer/constants';
3
- export declare type BudgeteerOverview = Map<BUDGETEER_CATEGORY, Map<string, BudgeteerEntry>>;
3
+ export type BudgeteerOverview = Map<BUDGETEER_CATEGORY, Map<string, BudgeteerEntry>>;
4
4
  export declare const getCategory: (url: string, contentType: string) => BUDGETEER_CATEGORY.JS | BUDGETEER_CATEGORY.VARIOUS | BUDGETEER_CATEGORY.CONTENT | BUDGETEER_CATEGORY.IMAGES | BUDGETEER_CATEGORY.WASM | BUDGETEER_CATEGORY.ASSETS_3D | BUDGETEER_CATEGORY.JSON;
5
5
  export declare const getType: (url: string, category: BUDGETEER_CATEGORY) => BUDGETEER_TYPES.WASM | BUDGETEER_TYPES.JS | BUDGETEER_TYPES.CSS | BUDGETEER_TYPES.CRT | BUDGETEER_TYPES.JPG | BUDGETEER_TYPES.PNG | BUDGETEER_TYPES.GIF | BUDGETEER_TYPES.UNKNOWN | BUDGETEER_TYPES.GLB;
6
6
  export declare const extractTypeFromFileExtension: (url: string) => BUDGETEER_TYPES.CRT | BUDGETEER_TYPES.JPG | BUDGETEER_TYPES.PNG | BUDGETEER_TYPES.GIF | BUDGETEER_TYPES.UNKNOWN | BUDGETEER_TYPES.GLB;
@@ -0,0 +1,2 @@
1
+ System.register(["./roomle-dependency-injection-f0b933f6.nomodule.js","./main-thread-to-worker-6a4eb1ee.nomodule.js"],(function(e){var i,t,s,n,h;return{setters:[function(e){i=e.p,t=e._,s=e.i,n=e.O,h=e.ai},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";class _ extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(o)?this._planeMaterial=this._cacheHolder.materialCache.get(o):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(o,this._planeMaterial)),this._cacheHolder.materialCache.has(a)?this._textMaterial=this._cacheHolder.materialCache.get(a):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(a,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){i(this)}}t([s],_.prototype,"_cacheHolder",void 0);class d{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new _(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new _(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new _(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}e("default",d),t([s],d.prototype,"_unitFormatter",void 0)}}}));
2
+ //# sourceMappingURL=dimensioning-helper-0995e4b8.nomodule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dimensioning-helper-0995e4b8.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"slHAAe"}
@@ -0,0 +1,2 @@
1
+ import{p as dispose,_ as __decorate,i as inject,O as AsyncGuard,ai as AsyncDependencyLoader}from"./roomle-dependency-injection-8d66ecac.js";import"./main-thread-to-worker-88f74244.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export default DimensioningHelper;
2
+ //# sourceMappingURL=dimensioning-helper-b166264a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-707197b7.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"wvHAAe"}
1
+ {"version":3,"file":"dimensioning-helper-b166264a.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"wuHAAe"}
@@ -1,113 +1,141 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
6
  <title>Embedding Dummy</title>
7
- <meta name="description" content="">
8
- <meta name="viewport" content="width=device-width, initial-scale=1">
9
- </head>
10
- <body>
11
-
12
- <style>
13
- .plan {
7
+ <meta name="description" content="" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
9
+ </head>
10
+ <body>
11
+ <style>
12
+ .plan {
14
13
  border: 1px dotted grey;
15
14
  width: 534px;
16
15
  height: 300px;
17
- }
18
- iframe {
16
+ }
17
+ iframe {
19
18
  width: 100%;
20
19
  height: 100%;
21
20
  border: none;
22
- }
23
- </style>
24
- <p>Interaction</p>
25
- <div>
26
-
27
- <button id="init-plan1">Start Plan 1</button>
28
- <button id="init-plan2">Start Plan 2</button>
29
-
30
- <button id="area-plan1" disabled>Total floor area plan 1</button>
31
- <button id="area-plan2" disabled>Total floor area plan 2</button>
32
-
33
- <button id="overview-plan1" disabled>Plan overview 1</button>
34
- <button id="overview-plan2" disabled>Plan overview 2</button>
35
-
36
-
37
- <button id="planObjects-plan1" disabled>Plan objects plan 1</button>
38
- <button id="planObjects-plan2" disabled>Plan objects plan 2</button>
39
-
40
- <button id="clear">Clear results</button>
41
-
42
- </div>
43
- <p>Result</p>
44
- <div id="result"></div>
45
- <hr>
46
- <p>Plan 1</p>
47
- <div id="plan1" class="plan"></div>
48
- <hr>
49
- <p>Plan 2</p>
50
- <div id="plan2" class="plan"></div>
51
- <hr>
52
-
53
- <script>
54
- var appjsLoaded = async function (event) {
21
+ }
22
+ </style>
23
+ <p>Interaction</p>
24
+ <div>
25
+ <button id="init-plan1">Start Plan 1</button>
26
+ <button id="init-plan2">Start Plan 2</button>
27
+
28
+ <button id="area-plan1" disabled>Total floor area plan 1</button>
29
+ <button id="area-plan2" disabled>Total floor area plan 2</button>
30
+
31
+ <button id="overview-plan1" disabled>Plan overview 1</button>
32
+ <button id="overview-plan2" disabled>Plan overview 2</button>
33
+
34
+ <button id="planObjects-plan1" disabled>Plan objects plan 1</button>
35
+ <button id="planObjects-plan2" disabled>Plan objects plan 2</button>
36
+
37
+ <button id="clear">Clear results</button>
38
+ </div>
39
+ <p>Result</p>
40
+ <div id="result"></div>
41
+ <hr />
42
+ <p>Plan 1</p>
43
+ <div id="plan1" class="plan"></div>
44
+ <hr />
45
+ <p>Plan 2</p>
46
+ <div id="plan2" class="plan"></div>
47
+ <hr />
48
+
49
+ <script>
50
+ var appjsLoaded = async function (event) {
55
51
  console.log('ON LOAD DONE');
56
- const initPlanner = async (id, planId)=> {
57
- document.getElementById('init-' + id).disabled = true;
58
- window[id] = await RoomleEmbedding.initPlanner('embedding_id', document.getElementById(id));
59
- window[id].callbacks.onCompletelyLoaded = async () => {
60
- const planOverview = await window[id].getPlanOverview();
61
- console.log(planOverview);
62
- planOverview.rooms.forEach((room)=> {
63
- room.objects.forEach((object)=> {
64
- if(object.parts.fullList.length) {
65
- console.log('object has part list', {object, room});
66
- }
67
- });
68
- });
69
- }
70
- await window[id].loadPlan(planId);
71
- document.getElementById('area-' + id).disabled = false;
72
- document.getElementById('planObjects-' + id).disabled = false;
73
- document.getElementById('overview-' + id).disabled = false;
74
- document.getElementById('init-' + id).style.display = 'none';
52
+ const initPlanner = async (id, planId) => {
53
+ document.getElementById('init-' + id).disabled = true;
54
+ window[id] = await RoomleEmbedding.initPlanner(
55
+ 'embedding_id',
56
+ document.getElementById(id)
57
+ );
58
+ window[id].callbacks.onCompletelyLoaded = async () => {
59
+ const planOverview = await window[id].getPlanOverview();
60
+ console.log(planOverview);
61
+ planOverview.rooms.forEach((room) => {
62
+ room.objects.forEach((object) => {
63
+ if (object.parts.fullList.length) {
64
+ console.log('object has part list', { object, room });
65
+ }
66
+ });
67
+ });
68
+ };
69
+ await window[id].loadPlan(planId);
70
+ document.getElementById('area-' + id).disabled = false;
71
+ document.getElementById('planObjects-' + id).disabled = false;
72
+ document.getElementById('overview-' + id).disabled = false;
73
+ document.getElementById('init-' + id).style.display = 'none';
75
74
  };
76
75
 
77
- const getTotalFloorArea = async (id)=> {
78
- const area = await window[id].getTotalFloorArea();
79
- document.getElementById('result').innerText = 'Area in mm2: ' + area;
76
+ const getTotalFloorArea = async (id) => {
77
+ const area = await window[id].getTotalFloorArea();
78
+ document.getElementById('result').innerText = 'Area in mm2: ' + area;
80
79
  };
81
80
 
82
- const getPlanObjects = async (id)=> {
83
- const objects = await window[id].getPlanObjects();
84
- let string = '<div>';
85
- objects.forEach((object)=>string += object.id + '<br>');
86
- string += '</div>';
87
- document.getElementById('result').innerHTML = '<strong>Objects</strong>: ' + string;
81
+ const getPlanObjects = async (id) => {
82
+ const objects = await window[id].getPlanObjects();
83
+ let string = '<div>';
84
+ objects.forEach((object) => (string += object.id + '<br>'));
85
+ string += '</div>';
86
+ document.getElementById('result').innerHTML =
87
+ '<strong>Objects</strong>: ' + string;
88
88
  };
89
89
 
90
- const getPlanOverview = async (id)=> {
91
- const objects = await window[id].getPlanOverview();
92
- console.log(objects);
90
+ const getPlanOverview = async (id) => {
91
+ const objects = await window[id].getPlanOverview();
92
+ console.log(objects);
93
93
  };
94
94
 
95
- document.getElementById('init-plan1').addEventListener('click', ()=> initPlanner('plan1', 'fjl0v1agco04478pbt17ajc5huo4oza6'));
96
- document.getElementById('init-plan2').addEventListener('click', ()=> initPlanner('plan2', 'f0tirbdakqokfgabbqtmko2kfusn4me'));
97
-
98
- document.getElementById('area-plan1').addEventListener('click', ()=> getTotalFloorArea('plan1'));
99
- document.getElementById('area-plan2').addEventListener('click', ()=> getTotalFloorArea('plan2'));
100
-
101
- document.getElementById('overview-plan1').addEventListener('click', ()=> getPlanOverview('plan1'));
102
- document.getElementById('overview-plan2').addEventListener('click', ()=> getPlanOverview('plan2'));
103
-
104
-
105
- document.getElementById('planObjects-plan1').addEventListener('click', ()=> getPlanObjects('plan1'));
106
- document.getElementById('planObjects-plan2').addEventListener('click', ()=> getPlanObjects('plan2'));
107
- document.getElementById('clear').addEventListener('click', ()=> document.getElementById('result').innerHTML = '');
108
-
109
- };
110
- </script>
111
- <script src="roomle-embedding.js" id="appjs" type="module" onload="appjsLoaded();"></script>
112
- </body>
95
+ document
96
+ .getElementById('init-plan1')
97
+ .addEventListener('click', () =>
98
+ initPlanner('plan1', 'fjl0v1agco04478pbt17ajc5huo4oza6')
99
+ );
100
+ document
101
+ .getElementById('init-plan2')
102
+ .addEventListener('click', () =>
103
+ initPlanner('plan2', 'f0tirbdakqokfgabbqtmko2kfusn4me')
104
+ );
105
+
106
+ document
107
+ .getElementById('area-plan1')
108
+ .addEventListener('click', () => getTotalFloorArea('plan1'));
109
+ document
110
+ .getElementById('area-plan2')
111
+ .addEventListener('click', () => getTotalFloorArea('plan2'));
112
+
113
+ document
114
+ .getElementById('overview-plan1')
115
+ .addEventListener('click', () => getPlanOverview('plan1'));
116
+ document
117
+ .getElementById('overview-plan2')
118
+ .addEventListener('click', () => getPlanOverview('plan2'));
119
+
120
+ document
121
+ .getElementById('planObjects-plan1')
122
+ .addEventListener('click', () => getPlanObjects('plan1'));
123
+ document
124
+ .getElementById('planObjects-plan2')
125
+ .addEventListener('click', () => getPlanObjects('plan2'));
126
+ document
127
+ .getElementById('clear')
128
+ .addEventListener(
129
+ 'click',
130
+ () => (document.getElementById('result').innerHTML = '')
131
+ );
132
+ };
133
+ </script>
134
+ <script
135
+ src="roomle-embedding.js"
136
+ id="appjs"
137
+ type="module"
138
+ onload="appjsLoaded();"
139
+ ></script>
140
+ </body>
113
141
  </html>
@@ -0,0 +1,2 @@
1
+ import"./query-params-helper-a271f9dc.js";import{a7 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,a5 as GLTF_LOADER_FILE_NAME,a6 as DRACO_LOADER_FILE_NAME,b as RoomleDependencyInjection}from"./roomle-dependency-injection-8d66ecac.js";import{f as getGlbUrl}from"./main-thread-to-worker-88f74244.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-32c4e05d.js";import{S as ScriptLoader,M as Main}from"./script-loader-a1d7afdd.js";import{D as DefaultLightSetting}from"./default-light-setting-17aeb133.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,i,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+i,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)})}}}class GLBViewerSceneManager 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 i=getGlbUrl(r);return i?this.loadGLB(i,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new THREE.Vector3(1,1,1),i){return this.clearScene(),new Promise((n,s)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,r,void 0,void 0,i).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new 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),n()},s)})}preparePerspectiveImage(e,t,r){return new Promise(i=>{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 n=this._cameraControl.getCamera().clone();n instanceof THREE.PerspectiveCamera&&(n.aspect=t/r,n.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new DefaultLightSetting(this._scene);e.render(this._scene,n);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{i({image:a,width:t,height:r,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,r,i){if(this._cameraControl instanceof AdjustableCameraControl3D){let n=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(n,e,t,r,i),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}}__decorate([inject],GLBViewerSceneManager.prototype,"_glbInputManager",void 0),__decorate([inject],GLBViewerSceneManager.prototype,"_rapiAccess",void 0);class GLBRenderWorker{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new 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()}}class RoomleGLBViewer{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){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"}),i=this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"});Promise.all([t,r,i]).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 i=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(i.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}}__decorate([inject],RoomleGLBViewer.prototype,"_rapiAccess",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_domHelper",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_scriptLoader",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_lifeCycleManager",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_threeLoader",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_initData",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_globalInitData",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_unitFormatter",void 0);class GlbViewer extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new RoomleGLBViewer(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}}export{GlbViewer};
2
+ //# sourceMappingURL=glb-viewer-45e04caa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-a3b1ff73.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"kySAAe"}
1
+ {"version":3,"file":"glb-viewer-45e04caa.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"qySAAe"}
@@ -1 +1 @@
1
- {"version":3,"sources":["0"],"names":["changeButtonDisabled","isDisabled","document","querySelectorAll","forEach","button","disabled","getElementById","addEventListener","input","value","window","RoomleGLBViewer","loadGLB","then","loadStaticItem","preparePerspectiveImage","base64Image","imgId","old","body","removeChild","img","createElement","src","image","id","style","width","height","appendChild","processRenderList","glbViewerElement","firstChild","pauseTest","resumeTest","init","success","error"],"mappings":"AAAA,IAAIA,qBAAuB,SAAUC,GACjCC,SAASC,iBAAiB,UAAUC,SAAQ,SAAUC,GAClDA,EAAOC,SAAWL,MAoD1BC,SAASK,eAAe,gBAAgBC,iBAAiB,QAAS,IA5ClD,WACZ,MAAMC,EAAQP,SAASK,eAAe,aAAaG,MAC9CD,GAAmB,KAAVA,IAGdT,sBAAqB,GACrBW,OAAOC,gBAAgBC,QAAQJ,GAAOK,KAAK,IAAMd,sBAAqB,KAsCFa,IACxEX,SAASK,eAAe,oBAAoBC,iBAAiB,QAAS,IApC/C,WACnB,MAAMC,EAAQP,SAASK,eAAe,aAAaG,MAC9CD,GAAmB,KAAVA,IAGdT,sBAAqB,GACrBW,OAAOC,gBAAgBG,eAAeN,GAAOK,KAAK,IAAMd,sBAAqB,KA8BLe,IAC5Eb,SAASK,eAAe,kBAAkBC,iBAAiB,QAAS,KA3BhEG,OAAOC,gBAAgBI,0BAA0BF,KAAMG,IACnD,MAAMC,EAAQ,cACRC,EAAMjB,SAASK,eAAeW,GAChCC,GACAjB,SAASkB,KAAKC,YAAYF,GAE9B,MAAMG,EAAMpB,SAASqB,cAAc,OACnCD,EAAIE,IAAMP,EAAYQ,MACtBH,EAAII,GAAKR,EACTI,EAAIK,MAAQ,UAAYV,EAAYW,MAAQ,aAAeX,EAAYY,OAAS,+DAChF3B,SAASkB,KAAKU,YAAYR,GAC1BA,EAAId,iBAAiB,QAAS,KAC1BN,SAASkB,KAAKC,YAAYnB,SAASK,eAAeW,UAgB9DhB,SAASK,eAAe,gBAAgBC,iBAAiB,QAAS,IAXxC,WACtB,MAAMC,EAAQP,SAASK,eAAe,aAAaG,MAC9CD,GAAmB,KAAVA,GAGdE,OAAOC,gBAAgBmB,kBAAkBtB,GAM2BsB,IAExE7B,SAASK,eAAe,SAASC,iBAAiB,QAAS,KAEvD,IADA,IAAIwB,EAAmB9B,SAASK,eAAe,qBACxCyB,EAAiBC,YACpBD,EAAiBX,YAAYW,EAAiBC,YAElDrB,gBAAgBsB,cAEpBhC,SAASK,eAAe,UAAUC,iBAAiB,QAAS,IAAMI,gBAAgBuB,WAAWjC,SAASK,eAAe,uBAErHI,OAAOC,gBAAgBwB,KAAKlC,SAASK,eAAe,sBAC/CO,KAAMuB,IACHrC,sBAAqB,IACrBsC"}
1
+ {"version":3,"sources":["0"],"names":["changeButtonDisabled","isDisabled","document","querySelectorAll","forEach","button","disabled","getElementById","addEventListener","input","value","window","RoomleGLBViewer","loadGLB","then","loadStaticItem","preparePerspectiveImage","base64Image","imgId","old","body","removeChild","img","createElement","src","image","id","style","width","height","appendChild","processRenderList","glbViewerElement","firstChild","pauseTest","resumeTest","init","success","error"],"mappings":"AAAA,IAAIA,qBAAuB,SAAUC,GACnCC,SAASC,iBAAiB,UAAUC,SAAQ,SAAUC,GACpDA,EAAOC,SAAWL,MA2DtBC,SACGK,eAAe,gBACfC,iBAAiB,QAAS,IArDb,WACd,MAAMC,EAAQP,SAASK,eAAe,aAAaG,MAC9CD,GAAmB,KAAVA,IAGdT,sBAAqB,GACrBW,OAAOC,gBAAgBC,QAAQJ,GAAOK,KAAK,IAAMd,sBAAqB,KA+CrCa,IACnCX,SACGK,eAAe,oBACfC,iBAAiB,QAAS,IA/CN,WACrB,MAAMC,EAAQP,SAASK,eAAe,aAAaG,MAC9CD,GAAmB,KAAVA,IAGdT,sBAAqB,GACrBW,OAAOC,gBAAgBG,eAAeN,GAAOK,KAAK,IAChDd,sBAAqB,KAwCUe,IACnCb,SACGK,eAAe,kBACfC,iBAAiB,QAAS,KAtC3BG,OAAOC,gBAAgBI,0BAA0BF,KAAMG,IACrD,MAAMC,EAAQ,cACRC,EAAMjB,SAASK,eAAeW,GAChCC,GACFjB,SAASkB,KAAKC,YAAYF,GAE5B,MAAMG,EAAMpB,SAASqB,cAAc,OACnCD,EAAIE,IAAMP,EAAYQ,MACtBH,EAAII,GAAKR,EACTI,EAAIK,MACF,UACAV,EAAYW,MACZ,aACAX,EAAYY,OACZ,+DACF3B,SAASkB,KAAKU,YAAYR,GAC1BA,EAAId,iBAAiB,QAAS,KAC5BN,SAASkB,KAAKC,YAAYnB,SAASK,eAAeW,UAsBxDhB,SACGK,eAAe,gBACfC,iBAAiB,QAAS,IAnBH,WACxB,MAAMC,EAAQP,SAASK,eAAe,aAAaG,MAC9CD,GAAmB,KAAVA,GAGdE,OAAOC,gBAAgBmB,kBAAkBtB,GAcRsB,IAEnC7B,SAASK,eAAe,SAASC,iBAAiB,QAAS,KAEzD,IADA,IAAIwB,EAAmB9B,SAASK,eAAe,qBACxCyB,EAAiBC,YACtBD,EAAiBX,YAAYW,EAAiBC,YAEhDrB,gBAAgBsB,cAElBhC,SACGK,eAAe,UACfC,iBAAiB,QAAS,IACzBI,gBAAgBuB,WAAWjC,SAASK,eAAe,uBAGvDI,OAAOC,gBAAgBwB,KAAKlC,SAASK,eAAe,sBAAsBO,KACvEuB,IACCrC,sBAAqB,IAEtBsC"}
@@ -1,41 +1,55 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
6
  <title>GLB Viewer Dummy</title>
7
- <meta name="description" content="">
8
- <meta name="viewport" content="width=device-width, initial-scale=1">
9
- </head>
10
- <body>
11
-
12
- <style>
13
- .loadConfiguration {
7
+ <meta name="description" content="" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
9
+ </head>
10
+ <body>
11
+ <style>
12
+ .loadConfiguration {
14
13
  background-color: lightblue;
15
- }
14
+ }
16
15
 
17
- .loadConfigurableItem {
16
+ .loadConfigurableItem {
18
17
  background-color: lightsalmon;
19
- }
20
- </style>
21
- <div>
22
- <textarea type="text" id="input-url">brands_3:44032500</textarea>
23
- <button id="load-glb-url" disabled="disabled">Load GLB URL</button>
24
- <button id="load-static-item" disabled="disabled">Load Static Item</button>
25
- <button id="generate-image" disabled="disabled">Generate Image</button>
26
- <button id="process-json" disabled="disabled">Process JSON</button>
27
- <button disabled="disabled" id="pause">Pause</button>
28
- <button disabled="disabled" id="resume">Resume</button>
29
- </div>
30
- <script>
31
- var appjsLoaded = function load(event) {
18
+ }
19
+ </style>
20
+ <div>
21
+ <textarea type="text" id="input-url">brands_3:44032500</textarea>
22
+ <button id="load-glb-url" disabled="disabled">Load GLB URL</button>
23
+ <button id="load-static-item" disabled="disabled">
24
+ Load Static Item
25
+ </button>
26
+ <button id="generate-image" disabled="disabled">Generate Image</button>
27
+ <button id="process-json" disabled="disabled">Process JSON</button>
28
+ <button disabled="disabled" id="pause">Pause</button>
29
+ <button disabled="disabled" id="resume">Resume</button>
30
+ </div>
31
+ <script>
32
+ var appjsLoaded = function load(event) {
32
33
  console.log('ON LOAD DONE');
33
34
  const script = document.createElement('script');
34
35
  script.src = 'glb-viewer-dummy-app.js';
35
36
  document.body.appendChild(script);
36
- };
37
- </script>
38
- <div id="roomle-glb-viewer" style="height: 100vh; width: 100%; background-color: white; border: solid 1px gray"></div>
39
- <script src="glb-viewer-main.js" id="appjs" type="module" onload="appjsLoaded();"></script>
40
- </body>
37
+ };
38
+ </script>
39
+ <div
40
+ id="roomle-glb-viewer"
41
+ style="
42
+ height: 100vh;
43
+ width: 100%;
44
+ background-color: white;
45
+ border: solid 1px gray;
46
+ "
47
+ ></div>
48
+ <script
49
+ src="glb-viewer-main.js"
50
+ id="appjs"
51
+ type="module"
52
+ onload="appjsLoaded();"
53
+ ></script>
54
+ </body>
41
55
  </html>
@@ -0,0 +1,2 @@
1
+ System.register(["./query-params-helper-c231e1b8.nomodule.js","./roomle-dependency-injection-f0b933f6.nomodule.js","./main-thread-to-worker-6a4eb1ee.nomodule.js","./pixotron-3be821e5.nomodule.js","./script-loader-c56ceed8.nomodule.js","./default-light-setting-917cc079.nomodule.js"],(function(e){var t,i,r,n,s,a,o,h,c,l,d,_,m,u,p,g,w,E,f,b,S,v,L,C,M;return{setters:[function(){},function(e){t=e.a7,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.a5,m=e.a6,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)})}}}class T 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,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 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),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}}a([o],T.prototype,"_glbInputManager",void 0),a([o],T.prototype,"_rapiAccess",void 0);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()}}class H{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}}a([o],H.prototype,"_rapiAccess",void 0),a([o],H.prototype,"_domHelper",void 0),a([o],H.prototype,"_scriptLoader",void 0),a([o],H.prototype,"_lifeCycleManager",void 0),a([o],H.prototype,"_threeLoader",void 0),a([o],H.prototype,"_initData",void 0),a([o],H.prototype,"_globalInitData",void 0),a([o],H.prototype,"_unitFormatter",void 0),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-f5f9a050.nomodule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-23b774e0.nomodule.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"o9QAAe"}
1
+ {"version":3,"file":"glb-viewer-f5f9a050.nomodule.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"+6QAAe"}
@@ -0,0 +1,2 @@
1
+ import"./query-params-helper-a271f9dc.js";import"./roomle-dependency-injection-8d66ecac.js";import"./main-thread-to-worker-88f74244.js";import"./pixotron-32c4e05d.js";import"./script-loader-a1d7afdd.js";import"./default-light-setting-17aeb133.js";import{GlbViewer}from"./glb-viewer-45e04caa.js";(new GlbViewer).boot();
2
+ //# sourceMappingURL=glb-viewer-main-be603c6d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glb-viewer-main-be603c6d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
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","./glb-viewer-23b774e0.nomodule.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(){},function(n){e=n.GlbViewer}],execute:function(){(new e).boot()}}}));
1
+ System.register(["./query-params-helper-c231e1b8.nomodule.js","./roomle-dependency-injection-f0b933f6.nomodule.js","./main-thread-to-worker-6a4eb1ee.nomodule.js","./pixotron-3be821e5.nomodule.js","./script-loader-c56ceed8.nomodule.js","./default-light-setting-917cc079.nomodule.js","./glb-viewer-f5f9a050.nomodule.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(){},function(n){e=n.GlbViewer}],execute:function(){(new e).boot()}}}));
2
2
  //# sourceMappingURL=glb-viewer-main.nomodule.js.map
@@ -0,0 +1,2 @@
1
+ System.register(["./roomle-dependency-injection-c465c69e.legacy.js","./main-thread-to-worker-cc24f989.legacy.js"],(function(e){var n,t,a,s;return{setters:[function(e){n=e.aj,t=e._,a=e.i},function(e){s=e.g}],execute:function(){class i extends n{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)}}e("default",i),t([a],i.prototype,"_staticItemLoader",void 0)}}}));
2
+ //# sourceMappingURL=banana-for-scale-2021b8ce.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"banana-for-scale-f8ab137f.legacy.js","sources":["../../../packages/configurator-core/public/geometry/banana_div2.glb"],"sourcesContent":["export default \"static/banana_div2-1351c98ec2986be1.glb\""],"names":[],"mappings":"mUAAe"}
1
+ {"version":3,"file":"banana-for-scale-2021b8ce.legacy.js","sources":["../../../packages/configurator-core/public/geometry/banana_div2.glb"],"sourcesContent":["export default \"static/banana_div2-1351c98ec2986be1.glb\""],"names":[],"mappings":"iTAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./query-params-helper-8c00a872.legacy.js","./main-thread-to-worker-e2f2b9cb.legacy.js"],(function(){var e,r,t;return{setters:[function(r){e=r.g},function(e){r=e.M,t=e.g}],execute:function(){new class{constructor(){this._inLimbo=!1,this._alreadyAdded=!1,window.addEventListener("beforeunload",()=>this._inLimbo=!0),this._mainThreadToWorker=new r(this,navigator.serviceWorker),this._isAlreadyActive()?this._handleActiveSw():navigator.serviceWorker.register(t()+"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 r="website-to-measure";if(document.getElementById(r))return void console.error("Iframe already added! Check how this can happen");const t=e();if(!t.checkUrl)return void console.error("CAN NOT MEASURE WITHOUT A URL, add checkUrl queryParam. To encode call BudgeteerMeasure.encodeUrl(url: string)");let o=this.decodeUrl(t.checkUrl);const i=window.location.origin;if(!o.startsWith(i))return void console.error("CAN ONLY MEASURE SAME ORIGIN PLEASE CHECK",{origin:i,src:o});const n=e(o),a=Object.keys(n).length?"&":"?";n._measureTraffic||(o+=a+"_measureTraffic=true");const s=document.createElement("iframe");s.id=r,s.src=o,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()}}}}}}));
1
+ System.register(["./query-params-helper-8c00a872.legacy.js","./main-thread-to-worker-cc24f989.legacy.js"],(function(){var e,r,t;return{setters:[function(r){e=r.g},function(e){r=e.M,t=e.g}],execute:function(){new class{_addIframe(){const r="website-to-measure";if(document.getElementById(r))return void console.error("Iframe already added! Check how this can happen");const t=e();if(!t.checkUrl)return void console.error("CAN NOT MEASURE WITHOUT A URL, add checkUrl queryParam. To encode call BudgeteerMeasure.encodeUrl(url: string)");let o=this.decodeUrl(t.checkUrl);const i=window.location.origin;if(!o.startsWith(i))return void console.error("CAN ONLY MEASURE SAME ORIGIN PLEASE CHECK",{origin:i,src:o});const n=e(o),a=Object.keys(n).length?"&":"?";n._measureTraffic||(o+=a+"_measureTraffic=true");const s=document.createElement("iframe");s.id=r,s.src=o,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}constructor(){this._inLimbo=!1,this._alreadyAdded=!1,window.addEventListener("beforeunload",()=>this._inLimbo=!0),this._mainThreadToWorker=new r(this,navigator.serviceWorker),this._isAlreadyActive()?this._handleActiveSw():navigator.serviceWorker.register(t()+"static/budgeteer.sw-0a8d4e36e18346a5.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}}encodeUrl(e){return encodeURIComponent(e)}decodeUrl(e){return decodeURIComponent(e)}onCommand(e){if(!this._inLimbo)switch(e){case 6:this._alreadyAdded||this._addIframe()}}}}}}));
2
2
  //# sourceMappingURL=budgeteer-measure.legacy.js.map