@roomle/web-sdk 2.78.0 → 2.79.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 (214) hide show
  1. package/lib/{banana-for-scale-c95b873f.js → banana-for-scale-36656578.js} +2 -2
  2. package/lib/{banana-for-scale-c95b873f.js.map → banana-for-scale-36656578.js.map} +1 -1
  3. package/lib/{banana-for-scale-e73b850b.nomodule.js → banana-for-scale-6a8ca6ac.nomodule.js} +2 -2
  4. package/lib/{banana-for-scale-e73b850b.nomodule.js.map → banana-for-scale-6a8ca6ac.nomodule.js.map} +1 -1
  5. package/lib/{camera-behaviour-16071d66.nomodule.js → camera-behaviour-16d3217d.nomodule.js} +2 -2
  6. package/lib/{camera-behaviour-16071d66.nomodule.js.map → camera-behaviour-16d3217d.nomodule.js.map} +1 -1
  7. package/lib/{camera-behaviour-91dbb5e1.js → camera-behaviour-bce0d3d0.js} +2 -2
  8. package/lib/{camera-behaviour-91dbb5e1.js.map → camera-behaviour-bce0d3d0.js.map} +1 -1
  9. package/lib/{component-dimensioning-1d5d6c2a.js → component-dimensioning-7981e67a.js} +2 -2
  10. package/lib/component-dimensioning-7981e67a.js.map +1 -0
  11. package/lib/{component-dimensioning-699ff5f4.nomodule.js → component-dimensioning-c88b0054.nomodule.js} +2 -2
  12. package/lib/component-dimensioning-c88b0054.nomodule.js.map +1 -0
  13. package/lib/{component-raycast-helper-a1081b27.nomodule.js → component-raycast-helper-a4153060.nomodule.js} +2 -2
  14. package/lib/component-raycast-helper-a4153060.nomodule.js.map +1 -0
  15. package/lib/{component-raycast-helper-089ff155.js → component-raycast-helper-f8a0910d.js} +2 -2
  16. package/lib/component-raycast-helper-f8a0910d.js.map +1 -0
  17. package/lib/{configurator-d49d0d97.nomodule.js → configurator-a79ca31e.nomodule.js} +2 -2
  18. package/lib/configurator-a79ca31e.nomodule.js.map +1 -0
  19. package/lib/{configurator-1e8746db.js → configurator-dbacfd97.js} +2 -2
  20. package/lib/configurator-dbacfd97.js.map +1 -0
  21. package/lib/configurator-main-bac27883.js +2 -0
  22. package/lib/configurator-main-bac27883.js.map +1 -0
  23. package/lib/configurator-main.nomodule.js +1 -1
  24. package/lib/{continuous-drawing-helper-be5b90da.nomodule.js → continuous-drawing-helper-bddc9922.nomodule.js} +2 -2
  25. package/lib/continuous-drawing-helper-bddc9922.nomodule.js.map +1 -0
  26. package/lib/{continuous-drawing-helper-405799dc.js → continuous-drawing-helper-e770877b.js} +2 -2
  27. package/lib/continuous-drawing-helper-e770877b.js.map +1 -0
  28. package/lib/{default-light-setting-6d7a06b0.js → default-light-setting-66a1043d.js} +2 -2
  29. package/lib/default-light-setting-66a1043d.js.map +1 -0
  30. package/lib/{default-light-setting-75db4ea9.nomodule.js → default-light-setting-9e3971b7.nomodule.js} +2 -2
  31. package/lib/default-light-setting-9e3971b7.nomodule.js.map +1 -0
  32. package/lib/definitions/common-core/src/common-configurator-kernel-callback.d.ts +4 -5
  33. package/lib/definitions/common-core/src/configurator-kernel-access.d.ts +0 -1
  34. package/lib/definitions/common-core/src/services/common-kernel-access.d.ts +4 -5
  35. package/lib/definitions/common-core/src/utils/init-data.d.ts +1 -0
  36. package/lib/definitions/common-core/src/utils/shims.d.ts +6 -0
  37. package/lib/definitions/common-core/src/view-model/configurator-view-model.d.ts +5 -6
  38. package/lib/definitions/common-core/src/webgl/mesh-generator.d.ts +1 -1
  39. package/lib/definitions/common-core/src/webgl/renderer/materials/blend-ao-and-shadow-material.d.ts +2 -1
  40. package/lib/definitions/common-core/src/webgl/renderer/materials/blend-ao-pass-depth-material.d.ts +12 -0
  41. package/lib/definitions/common-core/src/webgl/renderer/pass/debug-pass.d.ts +3 -0
  42. package/lib/definitions/common-core/src/webgl/renderer/pass/poisson-denoise-pass.d.ts +2 -0
  43. package/lib/definitions/common-core/src/webgl/renderer/shaders/poisson-denoise-shader.d.ts +7 -3
  44. package/lib/definitions/common-core/src/webgl/roomle-component-factory.d.ts +2 -2
  45. package/lib/definitions/configurator-core/src/webgl/configurator-mesh-generator.d.ts +1 -1
  46. package/lib/definitions/planner-core/mock/planner-mock-helper.d.ts +1 -1
  47. package/lib/definitions/planner-core/src/services/planner-kernel-access.d.ts +4 -4
  48. package/lib/definitions/planner-core/src/view-model/plan-view-model.d.ts +3 -3
  49. package/lib/definitions/planner-core/src/webgl/planner-mesh-generator.d.ts +2 -2
  50. package/lib/definitions/planner-core/src/webgl/planner-scene-manager.d.ts +2 -2
  51. package/lib/definitions/typings/kernel.d.ts +36 -0
  52. package/lib/definitions/typings/planner.d.ts +1 -1
  53. package/lib/{dimensioning-helper-bfc2ecfd.js → dimensioning-helper-0450da4a.js} +2 -2
  54. package/lib/{dimensioning-helper-bfc2ecfd.js.map → dimensioning-helper-0450da4a.js.map} +1 -1
  55. package/lib/{dimensioning-helper-b97db7f1.nomodule.js → dimensioning-helper-ea197c48.nomodule.js} +2 -2
  56. package/lib/{dimensioning-helper-b97db7f1.nomodule.js.map → dimensioning-helper-ea197c48.nomodule.js.map} +1 -1
  57. package/lib/{glb-viewer-d9ef7e5a.nomodule.js → glb-viewer-07de8dd5.nomodule.js} +2 -2
  58. package/lib/{glb-viewer-d9ef7e5a.nomodule.js.map → glb-viewer-07de8dd5.nomodule.js.map} +1 -1
  59. package/lib/{glb-viewer-camera-behaviour-6a62b9d6.nomodule.js → glb-viewer-camera-behaviour-ce14403c.nomodule.js} +2 -2
  60. package/lib/glb-viewer-camera-behaviour-ce14403c.nomodule.js.map +1 -0
  61. package/lib/{glb-viewer-camera-behaviour-c1f17cee.js → glb-viewer-camera-behaviour-d9751ea1.js} +2 -2
  62. package/lib/glb-viewer-camera-behaviour-d9751ea1.js.map +1 -0
  63. package/lib/{glb-viewer-4140645d.js → glb-viewer-e1e65ce1.js} +2 -2
  64. package/lib/{glb-viewer-4140645d.js.map → glb-viewer-e1e65ce1.js.map} +1 -1
  65. package/lib/glb-viewer-main-a4b08972.js +2 -0
  66. package/lib/glb-viewer-main-a4b08972.js.map +1 -0
  67. package/lib/glb-viewer-main.nomodule.js +1 -1
  68. package/lib/legacy/{banana-for-scale-c781ea6f.legacy.js → banana-for-scale-50621736.legacy.js} +2 -2
  69. package/lib/legacy/{banana-for-scale-c781ea6f.legacy.js.map → banana-for-scale-50621736.legacy.js.map} +1 -1
  70. package/lib/legacy/{camera-behaviour-b7f0e8bb.legacy.js → camera-behaviour-7f5f209e.legacy.js} +2 -2
  71. package/lib/legacy/{camera-behaviour-b7f0e8bb.legacy.js.map → camera-behaviour-7f5f209e.legacy.js.map} +1 -1
  72. package/lib/legacy/{component-dimensioning-83421f26.legacy.js → component-dimensioning-47eef954.legacy.js} +2 -2
  73. package/lib/legacy/component-dimensioning-47eef954.legacy.js.map +1 -0
  74. package/lib/legacy/{component-raycast-helper-219671db.legacy.js → component-raycast-helper-73a8912a.legacy.js} +2 -2
  75. package/lib/legacy/component-raycast-helper-73a8912a.legacy.js.map +1 -0
  76. package/lib/legacy/{configurator-c37f4fb2.legacy.js → configurator-08fb7ce5.legacy.js} +2 -2
  77. package/lib/legacy/configurator-08fb7ce5.legacy.js.map +1 -0
  78. package/lib/legacy/configurator-main.legacy.js +1 -1
  79. package/lib/legacy/{continuous-drawing-helper-50004cd8.legacy.js → continuous-drawing-helper-cbde694b.legacy.js} +2 -2
  80. package/lib/legacy/continuous-drawing-helper-cbde694b.legacy.js.map +1 -0
  81. package/lib/legacy/{default-light-setting-f6ff60a7.legacy.js → default-light-setting-8f6ba964.legacy.js} +2 -2
  82. package/lib/legacy/default-light-setting-8f6ba964.legacy.js.map +1 -0
  83. package/lib/legacy/{dimensioning-helper-f3e2c400.legacy.js → dimensioning-helper-8ec4d2c6.legacy.js} +2 -2
  84. package/lib/legacy/{dimensioning-helper-f3e2c400.legacy.js.map → dimensioning-helper-8ec4d2c6.legacy.js.map} +1 -1
  85. package/lib/legacy/{glb-viewer-ee85e06c.legacy.js → glb-viewer-6924834a.legacy.js} +2 -2
  86. package/lib/legacy/{glb-viewer-ee85e06c.legacy.js.map → glb-viewer-6924834a.legacy.js.map} +1 -1
  87. package/lib/legacy/{glb-viewer-camera-behaviour-bd64faee.legacy.js → glb-viewer-camera-behaviour-bc7ded2b.legacy.js} +2 -2
  88. package/lib/legacy/glb-viewer-camera-behaviour-bc7ded2b.legacy.js.map +1 -0
  89. package/lib/legacy/glb-viewer-main.legacy.js +1 -1
  90. package/lib/legacy/{material-viewer-a598aa5d.legacy.js → material-viewer-25c3df20.legacy.js} +2 -2
  91. package/lib/legacy/material-viewer-25c3df20.legacy.js.map +1 -0
  92. package/lib/legacy/material-viewer-main.legacy.js +1 -1
  93. package/lib/legacy/planner-f4d76df9.legacy.js +2 -0
  94. package/lib/legacy/{planner-e96c0f6d.legacy.js.map → planner-f4d76df9.legacy.js.map} +1 -1
  95. package/lib/legacy/planner-main.legacy.js +1 -1
  96. package/lib/legacy/roomle-configurator-98d4110d.legacy.js +2 -0
  97. package/lib/legacy/roomle-configurator-98d4110d.legacy.js.map +1 -0
  98. package/lib/legacy/roomle-dependency-injection-2a76a0f8.legacy.js +9 -0
  99. package/lib/legacy/{roomle-dependency-injection-34548f97.legacy.js.map → roomle-dependency-injection-2a76a0f8.legacy.js.map} +1 -1
  100. package/lib/legacy/roomle-sdk.legacy.js +1 -1
  101. package/lib/legacy/{script-loader-7681709a.legacy.js → script-loader-176c7de8.legacy.js} +2 -2
  102. package/lib/legacy/script-loader-176c7de8.legacy.js.map +1 -0
  103. package/lib/legacy/static/{ConfiguratorKernel-82e5093feef1b077.js → ConfiguratorKernel-177b506cdd3711c9.js} +13 -13
  104. package/lib/legacy/static/ConfiguratorKernel-85781bb41f4ad73b.wasm +0 -0
  105. package/lib/legacy/static/{RoomleCore-e517dbd10f96e64e.js → RoomleCore-554c790f636abde3.js} +12 -12
  106. package/lib/legacy/static/RoomleCore-72d11772d69ee987.wasm +0 -0
  107. package/lib/legacy/static/RoomleToolsCore-785e6369dca13d78.wasm +0 -0
  108. package/lib/legacy/{stats-helper-f13ad189.legacy.js → stats-helper-2160e3c7.legacy.js} +2 -2
  109. package/lib/legacy/stats-helper-2160e3c7.legacy.js.map +1 -0
  110. package/lib/legacy/{tools-core-9c783318.legacy.js → tools-core-47f1ddbe.legacy.js} +2 -2
  111. package/lib/legacy/tools-core-47f1ddbe.legacy.js.map +1 -0
  112. package/lib/{material-viewer-3854d44d.nomodule.js → material-viewer-1f1579af.nomodule.js} +2 -2
  113. package/lib/material-viewer-1f1579af.nomodule.js.map +1 -0
  114. package/lib/{material-viewer-dc9f969b.js → material-viewer-1ff2695c.js} +2 -2
  115. package/lib/material-viewer-1ff2695c.js.map +1 -0
  116. package/lib/material-viewer-main-90f369e3.js +2 -0
  117. package/lib/material-viewer-main-90f369e3.js.map +1 -0
  118. package/lib/material-viewer-main.nomodule.js +1 -1
  119. package/lib/planner-21207b1d.nomodule.js +2 -0
  120. package/lib/{planner-cda072ed.nomodule.js.map → planner-21207b1d.nomodule.js.map} +1 -1
  121. package/lib/planner-ed9cfcb6.js +2 -0
  122. package/lib/{planner-9471338a.js.map → planner-ed9cfcb6.js.map} +1 -1
  123. package/lib/planner-main-422b0a5c.js +2 -0
  124. package/lib/planner-main-422b0a5c.js.map +1 -0
  125. package/lib/planner-main.nomodule.js +1 -1
  126. package/lib/roomle-configurator-2d7f1bf4.js +2 -0
  127. package/lib/roomle-configurator-2d7f1bf4.js.map +1 -0
  128. package/lib/roomle-configurator-fa479dc1.nomodule.js +2 -0
  129. package/lib/roomle-configurator-fa479dc1.nomodule.js.map +1 -0
  130. package/lib/roomle-dependency-injection-75ddade3.js +9 -0
  131. package/lib/{roomle-dependency-injection-def49531.js.map → roomle-dependency-injection-75ddade3.js.map} +1 -1
  132. package/lib/roomle-dependency-injection-fccf8262.nomodule.js +9 -0
  133. package/lib/{roomle-dependency-injection-6f5dd527.nomodule.js.map → roomle-dependency-injection-fccf8262.nomodule.js.map} +1 -1
  134. package/lib/{roomle-sdk-44379ded.js → roomle-sdk-4b3e4810.js} +2 -2
  135. package/lib/roomle-sdk-4b3e4810.js.map +1 -0
  136. package/lib/roomle-sdk.nomodule.js +1 -1
  137. package/lib/{script-loader-0a279923.js → script-loader-4c8fdeb7.js} +2 -2
  138. package/lib/script-loader-4c8fdeb7.js.map +1 -0
  139. package/lib/{script-loader-6922a4b3.nomodule.js → script-loader-db460d49.nomodule.js} +2 -2
  140. package/lib/script-loader-db460d49.nomodule.js.map +1 -0
  141. package/lib/static/{ConfiguratorKernel-82e5093feef1b077.js → ConfiguratorKernel-177b506cdd3711c9.js} +1 -1
  142. package/lib/static/{ConfiguratorKernel-82e5093feef1b077.js.map → ConfiguratorKernel-177b506cdd3711c9.js.map} +1 -1
  143. package/lib/static/ConfiguratorKernel-85781bb41f4ad73b.wasm +0 -0
  144. package/lib/static/{RoomleCore-e517dbd10f96e64e.js → RoomleCore-554c790f636abde3.js} +1 -1
  145. package/lib/static/{RoomleCore-e517dbd10f96e64e.js.map → RoomleCore-554c790f636abde3.js.map} +1 -1
  146. package/lib/static/RoomleCore-72d11772d69ee987.wasm +0 -0
  147. package/lib/static/RoomleToolsCore-785e6369dca13d78.wasm +0 -0
  148. package/lib/{stats-helper-129e9375.nomodule.js → stats-helper-46e2942f.nomodule.js} +2 -2
  149. package/lib/stats-helper-46e2942f.nomodule.js.map +1 -0
  150. package/lib/{stats-helper-9b71e77c.js → stats-helper-f84d4332.js} +2 -2
  151. package/lib/stats-helper-f84d4332.js.map +1 -0
  152. package/lib/{tools-core-9d202d80.js → tools-core-35f0ec77.js} +2 -2
  153. package/lib/tools-core-35f0ec77.js.map +1 -0
  154. package/lib/{tools-core-c086d292.nomodule.js → tools-core-8b78ccb7.nomodule.js} +2 -2
  155. package/lib/tools-core-8b78ccb7.nomodule.js.map +1 -0
  156. package/lib/transparency.html +755 -0
  157. package/package.json +2 -2
  158. package/lib/component-dimensioning-1d5d6c2a.js.map +0 -1
  159. package/lib/component-dimensioning-699ff5f4.nomodule.js.map +0 -1
  160. package/lib/component-raycast-helper-089ff155.js.map +0 -1
  161. package/lib/component-raycast-helper-a1081b27.nomodule.js.map +0 -1
  162. package/lib/configurator-1e8746db.js.map +0 -1
  163. package/lib/configurator-d49d0d97.nomodule.js.map +0 -1
  164. package/lib/configurator-main-0cac7801.js +0 -2
  165. package/lib/configurator-main-0cac7801.js.map +0 -1
  166. package/lib/continuous-drawing-helper-405799dc.js.map +0 -1
  167. package/lib/continuous-drawing-helper-be5b90da.nomodule.js.map +0 -1
  168. package/lib/default-light-setting-6d7a06b0.js.map +0 -1
  169. package/lib/default-light-setting-75db4ea9.nomodule.js.map +0 -1
  170. package/lib/glb-viewer-camera-behaviour-6a62b9d6.nomodule.js.map +0 -1
  171. package/lib/glb-viewer-camera-behaviour-c1f17cee.js.map +0 -1
  172. package/lib/glb-viewer-main-fbc14d95.js +0 -2
  173. package/lib/glb-viewer-main-fbc14d95.js.map +0 -1
  174. package/lib/legacy/component-dimensioning-83421f26.legacy.js.map +0 -1
  175. package/lib/legacy/component-raycast-helper-219671db.legacy.js.map +0 -1
  176. package/lib/legacy/configurator-c37f4fb2.legacy.js.map +0 -1
  177. package/lib/legacy/continuous-drawing-helper-50004cd8.legacy.js.map +0 -1
  178. package/lib/legacy/default-light-setting-f6ff60a7.legacy.js.map +0 -1
  179. package/lib/legacy/glb-viewer-camera-behaviour-bd64faee.legacy.js.map +0 -1
  180. package/lib/legacy/material-viewer-a598aa5d.legacy.js.map +0 -1
  181. package/lib/legacy/planner-e96c0f6d.legacy.js +0 -2
  182. package/lib/legacy/roomle-configurator-c895e5d6.legacy.js +0 -2
  183. package/lib/legacy/roomle-configurator-c895e5d6.legacy.js.map +0 -1
  184. package/lib/legacy/roomle-dependency-injection-34548f97.legacy.js +0 -9
  185. package/lib/legacy/script-loader-7681709a.legacy.js.map +0 -1
  186. package/lib/legacy/static/ConfiguratorKernel-025cb5368fa7ca69.wasm +0 -0
  187. package/lib/legacy/static/RoomleCore-ec7bfba8f01e519b.wasm +0 -0
  188. package/lib/legacy/static/RoomleToolsCore-a15e153c7f5a203b.wasm +0 -0
  189. package/lib/legacy/stats-helper-f13ad189.legacy.js.map +0 -1
  190. package/lib/legacy/tools-core-9c783318.legacy.js.map +0 -1
  191. package/lib/material-viewer-3854d44d.nomodule.js.map +0 -1
  192. package/lib/material-viewer-dc9f969b.js.map +0 -1
  193. package/lib/material-viewer-main-298aa4d5.js +0 -2
  194. package/lib/material-viewer-main-298aa4d5.js.map +0 -1
  195. package/lib/planner-9471338a.js +0 -2
  196. package/lib/planner-cda072ed.nomodule.js +0 -2
  197. package/lib/planner-main-e649ff08.js +0 -2
  198. package/lib/planner-main-e649ff08.js.map +0 -1
  199. package/lib/roomle-configurator-314109db.nomodule.js +0 -2
  200. package/lib/roomle-configurator-314109db.nomodule.js.map +0 -1
  201. package/lib/roomle-configurator-7e70db06.js +0 -2
  202. package/lib/roomle-configurator-7e70db06.js.map +0 -1
  203. package/lib/roomle-dependency-injection-6f5dd527.nomodule.js +0 -9
  204. package/lib/roomle-dependency-injection-def49531.js +0 -9
  205. package/lib/roomle-sdk-44379ded.js.map +0 -1
  206. package/lib/script-loader-0a279923.js.map +0 -1
  207. package/lib/script-loader-6922a4b3.nomodule.js.map +0 -1
  208. package/lib/static/ConfiguratorKernel-025cb5368fa7ca69.wasm +0 -0
  209. package/lib/static/RoomleCore-ec7bfba8f01e519b.wasm +0 -0
  210. package/lib/static/RoomleToolsCore-a15e153c7f5a203b.wasm +0 -0
  211. package/lib/stats-helper-129e9375.nomodule.js.map +0 -1
  212. package/lib/stats-helper-9b71e77c.js.map +0 -1
  213. package/lib/tools-core-9d202d80.js.map +0 -1
  214. package/lib/tools-core-c086d292.nomodule.js.map +0 -1
@@ -1,2 +1,2 @@
1
- System.register(["./configurator-c37f4fb2.legacy.js","./script-loader-7681709a.legacy.js","./query-params-helper-a1e70858.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./roomle-dependency-injection-34548f97.legacy.js","./camera-behaviour-b7f0e8bb.legacy.js","./component-raycast-helper-219671db.legacy.js","./roomle-configurator-c895e5d6.legacy.js","./default-light-setting-f6ff60a7.legacy.js"],(function(){var e;return{setters:[function(n){e=n.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let n=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
1
+ System.register(["./configurator-08fb7ce5.legacy.js","./script-loader-176c7de8.legacy.js","./query-params-helper-a1e70858.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./roomle-dependency-injection-2a76a0f8.legacy.js","./camera-behaviour-7f5f209e.legacy.js","./component-raycast-helper-73a8912a.legacy.js","./roomle-configurator-98d4110d.legacy.js","./default-light-setting-8f6ba964.legacy.js"],(function(){var e;return{setters:[function(a){e=a.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let a=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-a))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
2
2
  //# sourceMappingURL=configurator-main.legacy.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-34548f97.legacy.js","./main-thread-to-worker-63c62382.legacy.js"],(function(e){var i,t,r,s,n;return{setters:[function(e){i=e.ad},function(e){t=e.bc,r=e.k,s=e.E,n=e.J}],execute:function(){e("default",class{constructor(){this._currentInnerRadius=0}init(e,i,t){this._drawingGroup=e,this._continuousDrawingManager=i,this._kernelZoomFactor=t,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3,i=new t(e,e+e/50,32),c=new r({color:10066329,side:s});this._circleMesh=new n(i,c),this._circleMesh.name="Circle",this._circleMesh.rotation.set(Math.PI/2,0,0),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._drawingGroup.add(this._circleMesh)}_updateCircle(){if(!this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3;if(e!==this._currentInnerRadius){const i=e+e/50;this._circleMesh.geometry=new t(e,i,32)}const r=i(this._continuousDrawingManager.getStartPoint());r.y=5,this._circleMesh.position.copy(r),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=e}setKernelZoomFactor(e){this._kernelZoomFactor=e}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}})}}}));
2
- //# sourceMappingURL=continuous-drawing-helper-50004cd8.legacy.js.map
1
+ System.register(["./roomle-dependency-injection-2a76a0f8.legacy.js","./main-thread-to-worker-63c62382.legacy.js"],(function(e){var i,t,r,s,n;return{setters:[function(e){i=e.ad},function(e){t=e.bc,r=e.k,s=e.E,n=e.J}],execute:function(){e("default",class{constructor(){this._currentInnerRadius=0}init(e,i,t){this._drawingGroup=e,this._continuousDrawingManager=i,this._kernelZoomFactor=t,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3,i=new t(e,e+e/50,32),c=new r({color:10066329,side:s});this._circleMesh=new n(i,c),this._circleMesh.name="Circle",this._circleMesh.rotation.set(Math.PI/2,0,0),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._drawingGroup.add(this._circleMesh)}_updateCircle(){if(!this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3;if(e!==this._currentInnerRadius){const i=e+e/50;this._circleMesh.geometry=new t(e,i,32)}const r=i(this._continuousDrawingManager.getStartPoint());r.y=5,this._circleMesh.position.copy(r),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=e}setKernelZoomFactor(e){this._kernelZoomFactor=e}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}})}}}));
2
+ //# sourceMappingURL=continuous-drawing-helper-cbde694b.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continuous-drawing-helper-cbde694b.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./camera-behaviour-b7f0e8bb.legacy.js","./roomle-dependency-injection-34548f97.legacy.js","./main-thread-to-worker-63c62382.legacy.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.a1},function(i){e=i.D,n=i.C,o=i.V,s=i.a,h=i.A}],execute:function(){i("D",class extends t{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new e(new n(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new o(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new s(0,0,0)),this._secondDirectionalLight=new e(new n(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new o(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new s(0,0,0)),this._ambientLight=new h(new n(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new s),a=Math.max(Math.max(t.x,t.y),t.z)+1,e=a/2;this._mainDirectionalLight.shadow.camera.top=e,this._mainDirectionalLight.shadow.camera.bottom=-e,this._mainDirectionalLight.shadow.camera.left=-e,this._mainDirectionalLight.shadow.camera.right=e,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=e,this._secondDirectionalLight.shadow.camera.bottom=-e,this._secondDirectionalLight.shadow.camera.left=-e,this._secondDirectionalLight.shadow.camera.right=e,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=a();if(i){if(this._ambientLight){let t=i.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(i=>this._ambientLight.color=new n(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}}}})}}}));
2
- //# sourceMappingURL=default-light-setting-f6ff60a7.legacy.js.map
1
+ System.register(["./camera-behaviour-7f5f209e.legacy.js","./roomle-dependency-injection-2a76a0f8.legacy.js","./main-thread-to-worker-63c62382.legacy.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.a1},function(i){e=i.D,n=i.C,o=i.V,s=i.a,h=i.A}],execute:function(){i("D",class extends t{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new e(new n(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new o(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new s(0,0,0)),this._secondDirectionalLight=new e(new n(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new o(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new s(0,0,0)),this._ambientLight=new h(new n(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new s),a=Math.max(Math.max(t.x,t.y),t.z)+1,e=a/2;this._mainDirectionalLight.shadow.camera.top=e,this._mainDirectionalLight.shadow.camera.bottom=-e,this._mainDirectionalLight.shadow.camera.left=-e,this._mainDirectionalLight.shadow.camera.right=e,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=e,this._secondDirectionalLight.shadow.camera.bottom=-e,this._secondDirectionalLight.shadow.camera.left=-e,this._secondDirectionalLight.shadow.camera.right=e,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=a();if(i){if(this._ambientLight){let t=i.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(i=>this._ambientLight.color=new n(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}}}})}}}));
2
+ //# sourceMappingURL=default-light-setting-8f6ba964.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-light-setting-8f6ba964.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-34548f97.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./TextGeometry-8862f872.legacy.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,x,g,u,w,b,y,T,L,G;return{setters:[function(t){i=t.aG,e=t.w,s=t._,n=t.i,h=t.ah,o=t.aH,a=t.ad},function(t){_=t.O,d=t.a,r=t.k,p=t.E,m=t.bx,l=t.B,c=t.J,x=t.Q,g=t.bm,u=t.X,w=t.y,b=t.N,y=t.b,T=t.ba,L=t.ak},function(t){G=t.T}],execute:function(){const z="component_dimensioning_plane_material",M="component_dimensioning_text_material";class j extends _{constructor(t){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=t,this._position=new d,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(z)?this._planeMaterial=this._cacheHolder.materialCache.get(z):(this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(z,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new m({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){let t=new l;this._text=new c(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new c(t,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(t,i,e){this._position.copy(t),this._cameraPosition=e,this._label=i;const s=this.getWorldPosition(new d),n=this._cameraPosition.distanceTo(s),h=Math.max(.01,n/150),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new x;t.setFromAxisAngle(new d(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new d)}else if(this._updateText(this._textGeometry,new x,new d),this._cameraPosition){const t=this.getWorldPosition(new d),e=i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this.parent.rotation.y);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(t,i,e){let s=new d;s.copy(this._position),e.x*=this._getXSign(),s.add(e);let n=t.boundingBox.getSize(new d);t.center(),this._text.position.copy(s),i&&this._text.quaternion.copy(i);let h=new g(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),i&&this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}s([n],j.prototype,"_cacheHolder",void 0);class D{constructor(t){this._objectRotation=0,this._cameraPosition=new d,this._topDimensions=!1,this._initialized=new h,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new u,this._dimensionTextGroup=new _,this._creator_=t,this._lineMaterial=new w({color:3618615,linewidth:2});let i=new l;this._widthLine=new b(i,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new b(i,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new b(i,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),o.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(t=>{this._font=t,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(t){this._enabled&&(this._dimensions||t)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let t=new l,i=this._getWidthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=t;let s=i.getCenter(new d);this._widthText||(this._widthText=new j(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let t=new l,i=this._getHeightEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=t;let s=i.getCenter(new d);this._heightText||(this._heightText=new j(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let t=new l,i=this._getDepthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=t;let s=i.getCenter(new d);this._depthText||(this._depthText=new j(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(t){this._origin=a(t.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=a(t.size);const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this.update()}update(t=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(t)}addToObject(t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&t.add(this._dimensionLineGroup)}removeFromObject(t){t.remove(this._dimensionLineGroup),this.update()}addToUiScene(t){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this._dimensionTextGroup.rotation.y=this._objectRotation,t.add(this._dimensionTextGroup),this.update()}removeFromUiScene(t){t.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const t=this._getRotation();return t>Math.PI/2||t<-Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(this._dimensions.x+.05,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const t=this._getRotation();return t>0&&t<Math.PI/2?new T(new d(-.05,0,.05),new d(-.05,this._dimensions.y+.05,.05)):t>Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):t<-Math.PI/2?new T(new d(.05+this._dimensions.x,0,this._dimensions.z-.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(t){this._onChange=t}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const t=new L;return t.expandByObject(this._widthLine),t.expandByObject(this._widthText),t.expandByObject(this._heightLine),t.expandByObject(this._heightText),t.expandByObject(this._depthLine),t.expandByObject(this._depthText),t}setVisibility(t){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=t,this._dimensionTextGroup.visible=t)}moveCameraStart(t){this.setVisibility(!1),this._cameraPosition=t,this.update()}moveCameraEnd(t){this.setVisibility(!0),this._cameraPosition=t,this.update()}clearScene(t){this._clear()}setObject(t,i=0){this._object=t,this._objectRotation=i}setUiScene(t){this._uiScene=t}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const t=this._object.getWorldPosition(new d);return i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this._objectRotation)}}t("default",D),s([n],D.prototype,"_unitFormatter",void 0)}}}));
2
- //# sourceMappingURL=dimensioning-helper-f3e2c400.legacy.js.map
1
+ System.register(["./roomle-dependency-injection-2a76a0f8.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./TextGeometry-8862f872.legacy.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,x,g,u,w,b,y,T,L,G;return{setters:[function(t){i=t.aG,e=t.w,s=t._,n=t.i,h=t.ah,o=t.aH,a=t.ad},function(t){_=t.O,d=t.a,r=t.k,p=t.E,m=t.bx,l=t.B,c=t.J,x=t.Q,g=t.bm,u=t.X,w=t.y,b=t.N,y=t.b,T=t.ba,L=t.ak},function(t){G=t.T}],execute:function(){const z="component_dimensioning_plane_material",M="component_dimensioning_text_material";class j extends _{constructor(t){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=t,this._position=new d,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(z)?this._planeMaterial=this._cacheHolder.materialCache.get(z):(this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(z,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new m({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){let t=new l;this._text=new c(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new c(t,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(t,i,e){this._position.copy(t),this._cameraPosition=e,this._label=i;const s=this.getWorldPosition(new d),n=this._cameraPosition.distanceTo(s),h=Math.max(.01,n/150),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new x;t.setFromAxisAngle(new d(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new d)}else if(this._updateText(this._textGeometry,new x,new d),this._cameraPosition){const t=this.getWorldPosition(new d),e=i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this.parent.rotation.y);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(t,i,e){let s=new d;s.copy(this._position),e.x*=this._getXSign(),s.add(e);let n=t.boundingBox.getSize(new d);t.center(),this._text.position.copy(s),i&&this._text.quaternion.copy(i);let h=new g(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),i&&this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}s([n],j.prototype,"_cacheHolder",void 0);class D{constructor(t){this._objectRotation=0,this._cameraPosition=new d,this._topDimensions=!1,this._initialized=new h,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new u,this._dimensionTextGroup=new _,this._creator_=t,this._lineMaterial=new w({color:3618615,linewidth:2});let i=new l;this._widthLine=new b(i,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new b(i,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new b(i,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),o.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(t=>{this._font=t,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(t){this._enabled&&(this._dimensions||t)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let t=new l,i=this._getWidthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=t;let s=i.getCenter(new d);this._widthText||(this._widthText=new j(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let t=new l,i=this._getHeightEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=t;let s=i.getCenter(new d);this._heightText||(this._heightText=new j(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let t=new l,i=this._getDepthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=t;let s=i.getCenter(new d);this._depthText||(this._depthText=new j(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(t){this._origin=a(t.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=a(t.size);const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this.update()}update(t=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(t)}addToObject(t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&t.add(this._dimensionLineGroup)}removeFromObject(t){t.remove(this._dimensionLineGroup),this.update()}addToUiScene(t){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this._dimensionTextGroup.rotation.y=this._objectRotation,t.add(this._dimensionTextGroup),this.update()}removeFromUiScene(t){t.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const t=this._getRotation();return t>Math.PI/2||t<-Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(this._dimensions.x+.05,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const t=this._getRotation();return t>0&&t<Math.PI/2?new T(new d(-.05,0,.05),new d(-.05,this._dimensions.y+.05,.05)):t>Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):t<-Math.PI/2?new T(new d(.05+this._dimensions.x,0,this._dimensions.z-.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(t){this._onChange=t}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const t=new L;return t.expandByObject(this._widthLine),t.expandByObject(this._widthText),t.expandByObject(this._heightLine),t.expandByObject(this._heightText),t.expandByObject(this._depthLine),t.expandByObject(this._depthText),t}setVisibility(t){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=t,this._dimensionTextGroup.visible=t)}moveCameraStart(t){this.setVisibility(!1),this._cameraPosition=t,this.update()}moveCameraEnd(t){this.setVisibility(!0),this._cameraPosition=t,this.update()}clearScene(t){this._clear()}setObject(t,i=0){this._object=t,this._objectRotation=i}setUiScene(t){this._uiScene=t}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const t=this._object.getWorldPosition(new d);return i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this._objectRotation)}}t("default",D),s([n],D.prototype,"_unitFormatter",void 0)}}}));
2
+ //# sourceMappingURL=dimensioning-helper-8ec4d2c6.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-f3e2c400.legacy.js","sources":["../../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"m4HAAe"}
1
+ {"version":3,"file":"dimensioning-helper-8ec4d2c6.legacy.js","sources":["../../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"m4HAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./script-loader-7681709a.legacy.js","./roomle-dependency-injection-34548f97.legacy.js","./camera-behaviour-b7f0e8bb.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./default-light-setting-f6ff60a7.legacy.js","./glb-viewer-camera-behaviour-bd64faee.legacy.js","./query-params-helper-a1e70858.legacy.js"],(function(e){var t,r,i,a,n,s,o,h,c,l,d,u,_,m,g,p,w,v,f,b,C,S,L,B,y,M,I,x,G,j,E,O,F;return{setters:[function(e){t=e.S,r=e.M},function(e){i=e.aw,a=e.D,n=e.L,s=e.R,o=e.a1,h=e._,c=e.i,l=e.m,d=e.q,u=e.r,_=e.w,m=e.b},function(e){g=e.C,p=e.L,w=e.S,v=e.T},function(e){f=e.a,b=e.ak,C=e.ap,S=e.Q,L=e.A,B=e.C,y=e.aN,M=e.a$,I=e.bJ,x=e.l,G=e.bz,j=e.Y,E=e.bW},function(e){O=e.D},function(e){F=e.G},function(){}],execute:function(){const D=[new a("script-loader",t),new a("glb-input-manager",class extends i{},1),new a("logger",n),new a("rapi-access",s)];class P extends g{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,i,a){let n=new f(-e.x/2,0,-e.z/2),s=new f(e.x/2,e.y,e.z/2);this._boundingBox=new b(n,s);let o=new C(-Math.PI/2+i,r,0,"ZYX"),h=(new S).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class z extends p{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new L(new B(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=o();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new B(e)})}}}class A extends w{constructor(e,t){super(e,t,l.GLB,y.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(d.createDynamicLightSettingSource(null,u.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new z(this._scene)))}createCameraControl(e,t){this._changeCameraBehaviour(new F(new P(this._creator_,this._getInputManager(),new f(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const i=M(r);return i?this.loadGLB(i,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new f(1,1,1),i){return this.clearScene(),new Promise((a,n)=>{this._loadGLB(e,new f(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 b).setFromObject(this._currentGLB);t&&this.cameraBehaviour.cameraControl instanceof P&&this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(r),this._updateBounds(r,null,!0),a()},n)})}preparePerspectiveImage(e,t,r){return new Promise(i=>{var a,n;t||(t=1e3),r||(r=1e3),e||((e=new I({antialias:!0})).setSize(t,r),e.outputColorSpace=x,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=G);let s=this.cameraBehaviour.cameraControl.getCamera().clone();s instanceof j&&(s.aspect=t/r,s.updateProjectionMatrix()),null===(a=this._lightSetting)||void 0===a||a.removeFromScene();let o=new O(this._scene);e.render(this._scene,s);let h=e.domElement.toDataURL();e.domElement.toBlob(e=>{i({image:h,width:t,height:r,blob:e})},"image/png"),o.removeFromScene(),null===(n=this._lightSetting)||void 0===n||n.addToScene()})}adjustCamera(e,t,r,i){if(this.cameraBehaviour.cameraControl instanceof P){let a=(new b).setFromObject(this._scene).getSize(new f);this.cameraBehaviour.cameraControl.adjust(a,e,t,r,i),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),_(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new b).setFromObject(this._currentGLB):null}get glbViewerCameraBehaviour(){return this.cameraBehaviour}getGeometryBounds(){return null}cameraBehaviourChanged(){super.cameraBehaviourChanged(),this.cameraBehaviour.cameraControl.addEventListener(3,()=>{this._requestRender()},this),this.cameraBehaviour.cameraControl.addEventListener(4,()=>{this._requestRender()},this)}}h([c],A.prototype,"_glbInputManager",void 0),h([c],A.prototype,"_rapiAccess",void 0);class U{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new I({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=x}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new f(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 k{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(v,{id:"tween-js"})]).then(()=>{this._sceneManager=new A(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new f(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let i=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new U(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(i.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{E("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:r,rotation:i,maxLightSources:a}=e;this._sceneManager.setEnvironmentMap(t,r,i,a)}}h([c],k.prototype,"_rapiAccess",void 0),h([c],k.prototype,"_domHelper",void 0),h([c],k.prototype,"_scriptLoader",void 0),h([c],k.prototype,"_lifeCycleManager",void 0),h([c],k.prototype,"_initData",void 0),h([c],k.prototype,"_globalInitData",void 0),h([c],k.prototype,"_unitFormatter",void 0),h([c],k.prototype,"_idbManager",void 0),e("GlbViewer",class extends r{setupGlobals(){}setupDependencies(){m.setup(D),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new k(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
- //# sourceMappingURL=glb-viewer-ee85e06c.legacy.js.map
1
+ System.register(["./script-loader-176c7de8.legacy.js","./roomle-dependency-injection-2a76a0f8.legacy.js","./camera-behaviour-7f5f209e.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./default-light-setting-8f6ba964.legacy.js","./glb-viewer-camera-behaviour-bc7ded2b.legacy.js","./query-params-helper-a1e70858.legacy.js"],(function(e){var t,r,i,a,n,s,o,h,c,l,d,u,_,m,g,p,w,v,b,f,C,S,L,B,y,M,I,x,G,j,E,O,F;return{setters:[function(e){t=e.S,r=e.M},function(e){i=e.aw,a=e.D,n=e.L,s=e.R,o=e.a1,h=e._,c=e.i,l=e.m,d=e.q,u=e.r,_=e.w,m=e.b},function(e){g=e.C,p=e.L,w=e.S,v=e.T},function(e){b=e.a,f=e.ak,C=e.ap,S=e.Q,L=e.A,B=e.C,y=e.aN,M=e.a$,I=e.bJ,x=e.l,G=e.bz,j=e.Y,E=e.bW},function(e){O=e.D},function(e){F=e.G},function(){}],execute:function(){const D=[new a("script-loader",t),new a("glb-input-manager",class extends i{},1),new a("logger",n),new a("rapi-access",s)];class P extends g{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,i,a){let n=new b(-e.x/2,0,-e.z/2),s=new b(e.x/2,e.y,e.z/2);this._boundingBox=new f(n,s);let o=new C(-Math.PI/2+i,r,0,"ZYX"),h=(new S).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class z extends p{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new L(new B(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=o();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new B(e)})}}}class A extends w{constructor(e,t){super(e,t,l.GLB,y.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(d.createDynamicLightSettingSource(null,u.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new z(this._scene)))}createCameraControl(e,t){this._changeCameraBehaviour(new F(new P(this._creator_,this._getInputManager(),new b(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const i=M(r);return i?this.loadGLB(i,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new b(1,1,1),i){return this.clearScene(),new Promise((a,n)=>{this._loadGLB(e,new b(0,0,0),0,void 0,r,void 0,void 0,i).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new f).setFromObject(this._currentGLB);t&&this.cameraBehaviour.cameraControl instanceof P&&this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(r),this._updateBounds(r,null,!0),a()},n)})}preparePerspectiveImage(e,t,r){return new Promise(i=>{var a,n;t||(t=1e3),r||(r=1e3),e||((e=new I({antialias:!0})).setSize(t,r),e.outputColorSpace=x,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=G);let s=this.cameraBehaviour.cameraControl.getCamera().clone();s instanceof j&&(s.aspect=t/r,s.updateProjectionMatrix()),null===(a=this._lightSetting)||void 0===a||a.removeFromScene();let o=new O(this._scene);e.render(this._scene,s);let h=e.domElement.toDataURL();e.domElement.toBlob(e=>{i({image:h,width:t,height:r,blob:e})},"image/png"),o.removeFromScene(),null===(n=this._lightSetting)||void 0===n||n.addToScene()})}adjustCamera(e,t,r,i){if(this.cameraBehaviour.cameraControl instanceof P){let a=(new f).setFromObject(this._scene).getSize(new b);this.cameraBehaviour.cameraControl.adjust(a,e,t,r,i),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),_(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new f).setFromObject(this._currentGLB):null}get glbViewerCameraBehaviour(){return this.cameraBehaviour}getGeometryBounds(){return null}cameraBehaviourChanged(){super.cameraBehaviourChanged(),this.cameraBehaviour.cameraControl.addEventListener(3,()=>{this._requestRender()},this),this.cameraBehaviour.cameraControl.addEventListener(4,()=>{this._requestRender()},this)}}h([c],A.prototype,"_glbInputManager",void 0),h([c],A.prototype,"_rapiAccess",void 0);class U{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new I({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=x}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new b(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class k{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(v,{id:"tween-js"})]).then(()=>{this._sceneManager=new A(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new b(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let i=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new U(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(i.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{E("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:r,rotation:i,maxLightSources:a}=e;this._sceneManager.setEnvironmentMap(t,r,i,a)}}h([c],k.prototype,"_rapiAccess",void 0),h([c],k.prototype,"_domHelper",void 0),h([c],k.prototype,"_scriptLoader",void 0),h([c],k.prototype,"_lifeCycleManager",void 0),h([c],k.prototype,"_initData",void 0),h([c],k.prototype,"_globalInitData",void 0),h([c],k.prototype,"_unitFormatter",void 0),h([c],k.prototype,"_idbManager",void 0),e("GlbViewer",class extends r{setupGlobals(){}setupDependencies(){m.setup(D),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new k(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
+ //# sourceMappingURL=glb-viewer-6924834a.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-ee85e06c.legacy.js","sources":["../../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"2pPAAe"}
1
+ {"version":3,"file":"glb-viewer-6924834a.legacy.js","sources":["../../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"2pPAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./camera-behaviour-b7f0e8bb.legacy.js"],(function(e){var t;return{setters:[function(e){t=e.b}],execute:function(){e("G",class extends t{get cameraControl(){return this._cameraControl}updateCameraOnItemLoaded(e){this.cameraControl.updateAndReset(e,!1)}})}}}));
2
- //# sourceMappingURL=glb-viewer-camera-behaviour-bd64faee.legacy.js.map
1
+ System.register(["./camera-behaviour-7f5f209e.legacy.js"],(function(e){var t;return{setters:[function(e){t=e.b}],execute:function(){e("G",class extends t{get cameraControl(){return this._cameraControl}updateCameraOnItemLoaded(e){this.cameraControl.updateAndReset(e,!1)}})}}}));
2
+ //# sourceMappingURL=glb-viewer-camera-behaviour-bc7ded2b.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glb-viewer-camera-behaviour-bc7ded2b.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./glb-viewer-ee85e06c.legacy.js","./script-loader-7681709a.legacy.js","./query-params-helper-a1e70858.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./roomle-dependency-injection-34548f97.legacy.js","./camera-behaviour-b7f0e8bb.legacy.js","./default-light-setting-f6ff60a7.legacy.js","./glb-viewer-camera-behaviour-bd64faee.legacy.js"],(function(){var e;return{setters:[function(n){e=n.GlbViewer},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
1
+ System.register(["./glb-viewer-6924834a.legacy.js","./script-loader-176c7de8.legacy.js","./query-params-helper-a1e70858.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./roomle-dependency-injection-2a76a0f8.legacy.js","./camera-behaviour-7f5f209e.legacy.js","./default-light-setting-8f6ba964.legacy.js","./glb-viewer-camera-behaviour-bc7ded2b.legacy.js"],(function(){var e;return{setters:[function(n){e=n.GlbViewer},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
2
2
  //# sourceMappingURL=glb-viewer-main.legacy.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./script-loader-7681709a.legacy.js","./roomle-dependency-injection-34548f97.legacy.js","./camera-behaviour-b7f0e8bb.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./query-params-helper-a1e70858.legacy.js"],(function(e){var t,a,i,r,s,n,h,o,l,_,m,c,d,g,p,u,M,y,w,C,f,v,b,S,P,x,F,G,I,U,R,A,T,B,k,D,E;return{setters:[function(e){t=e.S,a=e.M},function(e){i=e._,r=e.i,s=e.m,n=e.q,h=e.r,o=e.Z,l=e.ay,_=e.az,m=e.a1,c=e.aA,d=e.a0,g=e.aB,p=e.D,u=e.L,M=e.aw,y=e.aC,w=e.R,C=e.b},function(e){f=e.b,v=e.S,b=e.B,S=e.C,P=e.F,x=e.T},function(e){F=e.aN,G=e.aZ,I=e.J,U=e.C,R=e.ak,A=e.E,T=e.a,B=e.ac,k=e.bb,D=e.bm,E=e.ag},function(){}],execute:function(){class V extends f{get cameraControl(){return this._cameraControl}}class j extends v{constructor(e,t){super(e,t,s.RMV,F.CAMERA_3D),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(n.createDynamicLightSettingSource(null,h.CAMERA)),this._initScene()}_initScene(){const e=new G(1,1,1,100,100,100),t=o.createMeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._setMaterial(t),this._mesh=new I(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:a}=this._initData;if(a?this.changeFloorMaterialById(a):this._environment=new b(this._scene,null,new U(16777215)),this.cameraBehaviour.cameraControl instanceof S){const e=new R;e.setFromObject(this._mesh),console.trace("reset camera"),this.cameraBehaviour.cameraControl.updateAndReset(e)}this.showGUI()}loadMaterialId(e){return new Promise(t=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})})}loadMaterial(e){return new Promise(t=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),t()})}loadMaterialShading(e){return new Promise(t=>{let a={shading:e};this._setMaterial(l(this._material,a)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})}resetMaterial(){this._initScene()}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===A,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(e=1){return _(this._material,e)}createCameraControl(e,t){this._changeCameraBehaviour(new V(new S(this._creator_,this._getInputManager(),new T(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._inputManager}sceneChanged(){}getBounds(){return this._mesh?(new R).setFromObject(this._mesh):null}getGeometryBounds(){return null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=m();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new U(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?A:B,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(_(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new G(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new k(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new D(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new D(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const t=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof P||(this._environment=new P(this._scene,this._environment,!0)),new Promise((e,a)=>{this._environment.changeFloorMaterial(t,this._maxAnisotropy).then(()=>{this._requestRender(),e()},a)})}async addTexture(e,t){const a=100/(0===e.mmWidth?1:e.mmWidth),i=100/(0===e.mmHeight?1:e.mmHeight);if(t){const r=new Image;r.src=t;const s=new E;s.image=r,r.onload=function(){s.needsUpdate=!0},c(s,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures)}else await d(e.image,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}i([r],j.prototype,"_inputManager",void 0),i([r],j.prototype,"_configuratorMeshGenerator",void 0),i([r],j.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],j.prototype,"_rapiAccess",void 0);class O{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(x,{id:"tween-js"})]).then(()=>{this._sceneManager=new j(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}resetMaterial(){this._sceneManager.resetMaterial()}loadMaterial(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(e=1){return this._sceneManager.getMaterialShading(e)}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,t){return this._sceneManager.addTexture(e,t)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:a,rotation:i,maxLightSources:r}=e;this._sceneManager.setEnvironmentMap(t,a,i,r)}}i([r],O.prototype,"_domHelper",void 0),i([r],O.prototype,"_scriptLoader",void 0),i([r],O.prototype,"_lifeCycleManager",void 0),i([r],O.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],O.prototype,"_initData",void 0),i([r],O.prototype,"_rapiAccess",void 0),i([r],O.prototype,"_unitFormatter",void 0),i([r],O.prototype,"_idbManager",void 0);const q=[new p("script-loader",t),new p("logger",u),new p("input-manager",M,1),new p("configurator-mesh-generator",y),new p("rapi-access",w),new p("roomle-material-viewer-ui-callback",class extends g{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];e("MaterialViewer",class extends a{setupGlobals(){}setupDependencies(){C.setup(q),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new O(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
2
- //# sourceMappingURL=material-viewer-a598aa5d.legacy.js.map
1
+ System.register(["./script-loader-176c7de8.legacy.js","./roomle-dependency-injection-2a76a0f8.legacy.js","./camera-behaviour-7f5f209e.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./query-params-helper-a1e70858.legacy.js"],(function(e){var t,a,i,r,s,n,h,o,l,_,m,c,d,g,p,u,M,y,w,C,f,v,S,b,P,x,F,G,I,U,R,A,T,B,k,D,E;return{setters:[function(e){t=e.S,a=e.M},function(e){i=e._,r=e.i,s=e.m,n=e.q,h=e.r,o=e.Z,l=e.ay,_=e.az,m=e.a1,c=e.aA,d=e.a0,g=e.aB,p=e.D,u=e.L,M=e.aw,y=e.aC,w=e.R,C=e.b},function(e){f=e.b,v=e.S,S=e.B,b=e.C,P=e.F,x=e.T},function(e){F=e.aN,G=e.aZ,I=e.J,U=e.C,R=e.ak,A=e.E,T=e.a,B=e.ac,k=e.bb,D=e.bm,E=e.ag},function(){}],execute:function(){class V extends f{get cameraControl(){return this._cameraControl}}class j extends v{constructor(e,t){super(e,t,s.RMV,F.CAMERA_3D),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(n.createDynamicLightSettingSource(null,h.CAMERA)),this._initScene()}_initScene(){const e=new G(1,1,1,100,100,100),t=o.createMeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._setMaterial(t),this._mesh=new I(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:a}=this._initData;if(a?this.changeFloorMaterialById(a):this._environment=new S(this._scene,null,new U(16777215)),this.cameraBehaviour.cameraControl instanceof b){const e=new R;e.setFromObject(this._mesh),console.trace("reset camera"),this.cameraBehaviour.cameraControl.updateAndReset(e)}this.showGUI()}loadMaterialId(e){return new Promise(t=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})})}loadMaterial(e){return new Promise(t=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),t()})}loadMaterialShading(e){return new Promise(t=>{let a={shading:e};this._setMaterial(l(this._material,a)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})}resetMaterial(){this._initScene()}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===A,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(e=1){return _(this._material,e)}createCameraControl(e,t){this._changeCameraBehaviour(new V(new b(this._creator_,this._getInputManager(),new T(-1,1,1)),this._cameraBehaviourState))}_getInputManager(){return this._inputManager}sceneChanged(){}getBounds(){return this._mesh?(new R).setFromObject(this._mesh):null}getGeometryBounds(){return null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=m();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new U(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?A:B,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(_(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new G(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new k(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new D(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new D(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const t=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof P||(this._environment=new P(this._scene,this._environment,!0)),new Promise((e,a)=>{this._environment.changeFloorMaterial(t,this._maxAnisotropy).then(()=>{this._requestRender(),e()},a)})}async addTexture(e,t){const a=100/(0===e.mmWidth?1:e.mmWidth),i=100/(0===e.mmHeight?1:e.mmHeight);if(t){const r=new Image;r.src=t;const s=new E;s.image=r,r.onload=function(){s.needsUpdate=!0},c(s,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures)}else await d(e.image,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}i([r],j.prototype,"_inputManager",void 0),i([r],j.prototype,"_configuratorMeshGenerator",void 0),i([r],j.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],j.prototype,"_rapiAccess",void 0);class O{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(x,{id:"tween-js"})]).then(()=>{this._sceneManager=new j(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}resetMaterial(){this._sceneManager.resetMaterial()}loadMaterial(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(e=1){return this._sceneManager.getMaterialShading(e)}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,t){return this._sceneManager.addTexture(e,t)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:a,rotation:i,maxLightSources:r}=e;this._sceneManager.setEnvironmentMap(t,a,i,r)}}i([r],O.prototype,"_domHelper",void 0),i([r],O.prototype,"_scriptLoader",void 0),i([r],O.prototype,"_lifeCycleManager",void 0),i([r],O.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],O.prototype,"_initData",void 0),i([r],O.prototype,"_rapiAccess",void 0),i([r],O.prototype,"_unitFormatter",void 0),i([r],O.prototype,"_idbManager",void 0);const q=[new p("script-loader",t),new p("logger",u),new p("input-manager",M,1),new p("configurator-mesh-generator",y),new p("rapi-access",w),new p("roomle-material-viewer-ui-callback",class extends g{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];e("MaterialViewer",class extends a{setupGlobals(){}setupDependencies(){C.setup(q),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new O(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
2
+ //# sourceMappingURL=material-viewer-25c3df20.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"material-viewer-25c3df20.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./material-viewer-a598aa5d.legacy.js","./script-loader-7681709a.legacy.js","./query-params-helper-a1e70858.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./roomle-dependency-injection-34548f97.legacy.js","./camera-behaviour-b7f0e8bb.legacy.js"],(function(){var e;return{setters:[function(a){e=a.MaterialViewer},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
1
+ System.register(["./material-viewer-25c3df20.legacy.js","./script-loader-176c7de8.legacy.js","./query-params-helper-a1e70858.legacy.js","./main-thread-to-worker-63c62382.legacy.js","./roomle-dependency-injection-2a76a0f8.legacy.js","./camera-behaviour-7f5f209e.legacy.js"],(function(){var e;return{setters:[function(n){e=n.MaterialViewer},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
2
2
  //# sourceMappingURL=material-viewer-main.legacy.js.map