@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-light-setting-66a1043d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./camera-behaviour-16071d66.nomodule.js","./roomle-dependency-injection-6f5dd527.nomodule.js","./main-thread-to-worker-ff04af1e.nomodule.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-75db4ea9.nomodule.js.map
1
+ System.register(["./camera-behaviour-16d3217d.nomodule.js","./roomle-dependency-injection-fccf8262.nomodule.js","./main-thread-to-worker-ff04af1e.nomodule.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-9e3971b7.nomodule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-light-setting-9e3971b7.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,10 +1,9 @@
1
- import type { KernelComponent, KernelVector3 } from '../../typings/kernel';
1
+ import type { KernelComponent, KernelMeshAttributes, KernelMeshBuffer, KernelVector3 } from '../../typings/kernel';
2
2
  export interface CommonConfiguratorKernelCallbackI {
3
3
  Editor3dComponentCreated(id: number, position: KernelVector3, eulerAngles: KernelVector3, isRootComponent: boolean, parentObjectRuntimeId: number): void;
4
- Editor3dAddBakedMesh(runtimeComponentId: number, materialId: string, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, environmentGeometry: boolean, materialAttributes: Record<string, string>): void;
5
- Editor3dAddNamedMesh(runtimeComponentId: number, meshId: string, geometryId: string, materialId: string, transform: Float32Array, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, environmentGeometry: boolean, uvTransform: Float32Array, materialAttributes: Record<string, string>): void;
6
- Editor3ChangedNamedMesh(runtimeComponentId: number, meshId: string, geometryId: string, materiadlId: string, transform: Float32Array, uvTransform: Float32Array, materialAttributes: Record<string, string>): void;
7
- Editor3dRemoveNamedMesh(runtimeComponentId: number, geometryId: string): void;
4
+ Editor3dAddMesh(runtimeComponentId: number, meshId: number, geometryName: string, environmentGeometry: boolean, meshAttributes: KernelMeshAttributes, meshBuffer: KernelMeshBuffer): void;
5
+ Editor3ChangedMesh(runtimeComponentId: number, meshId: number, geometryName: string, meshAttributes: KernelMeshAttributes): void;
6
+ Editor3dRemoveMesh(runtimeComponentId: number, meshId: number): void;
8
7
  componentMetaUpdated(kernelComponent: KernelComponent): void;
9
8
  componentConfigurationUpdated(runtimeComponentId: number, geometryChanged: boolean): void;
10
9
  Editor3dBeginConstruction(componentId: number, isDeltaUpdate: boolean): void;
@@ -101,7 +101,6 @@ export default class ConfiguratorKernelAccess extends CommonKernelAccess {
101
101
  Editor3dAddSphereUVMod(): void;
102
102
  Editor3dAddRectangle(): void;
103
103
  Editor3dAddRectangleUVMod(): void;
104
- Editor3dAddMesh(): void;
105
104
  Editor3dAddMeshUVMod(): void;
106
105
  Editor3dAddMeshUVCoord(): void;
107
106
  Editor3dAddCylinder(): void;
@@ -5,7 +5,7 @@ import type DataSyncer from './data-syncer';
5
5
  import type { ArticleNumber, ConfigurationHash, RapiConfiguration, RapiId, RapiPrice } from '../../../typings/rapi-types';
6
6
  import type { LifeCycleCallbacks } from '../life-cycle-manager';
7
7
  import type { Context } from '../di/context';
8
- import type { ConfigurationExporter, ConfigurationObject, ConfiguratorKernelClass, KernelPart, KernelPartList, KernelPartListPrice, KernelVector3 } from '../../../typings/kernel';
8
+ import type { ConfigurationExporter, ConfigurationObject, ConfiguratorKernelClass, KernelMeshAttributes, KernelMeshBuffer, KernelPart, KernelPartList, KernelPartListPrice, KernelVector3 } from '../../../typings/kernel';
9
9
  import type ConfiguratorUiCallbacks from '../../../configurator-core/src/services/configurator-ui-callback';
10
10
  import type { GlobalCallback } from './global-callback';
11
11
  import type InitData from '../utils/init-data';
@@ -92,10 +92,9 @@ export default abstract class CommonKernelAccess implements LifeCycleCallbacks,
92
92
  loadItemConfigurations(conversationId: number, itemIds: string[]): Promise<void>;
93
93
  requestDeleteComponent(componentId: number): void;
94
94
  dockComponentWithPosition(parentId: number, parentDockId: number, childId: number, childDockId: number, position: KernelVector3): void;
95
- Editor3dAddBakedMesh(runtimeComponentId: number, materialId: string, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, environmentGeometry: boolean, materialAttributes: Record<string, string>): void;
96
- Editor3dAddNamedMesh(runtimeComponentId: number, meshId: string, geometryId: string, materialId: string, transform: Float32Array, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, environmentGeometry: boolean, uvTransform: Float32Array, materialAttributes: Record<string, string>): void;
97
- Editor3ChangedNamedMesh(runtimeComponentId: number, meshId: string, geometryId: string, materialId: string, transform: Float32Array, uvTransform: Float32Array, materialAttributes: Record<string, string>): void;
98
- Editor3dRemoveNamedMesh(runtimeComponentId: number, geometryId: string): void;
95
+ Editor3dAddMesh(runtimeComponentId: number, meshId: number, geometryName: string, environmentGeometry: boolean, meshAttributes: KernelMeshAttributes, meshBuffer: KernelMeshBuffer): void;
96
+ Editor3ChangedMesh(runtimeComponentId: number, meshId: number, geometryName: string, meshAttributes: KernelMeshAttributes): void;
97
+ Editor3dRemoveMesh(runtimeComponentId: number, meshId: number): void;
99
98
  Editor3dBeginConstruction(id: number, isDeltaUpdate: boolean): void;
100
99
  Editor3dEndConstruction(id: number): void;
101
100
  Editor3dComponentCreated(id: number, position: KernelVector3, eulerAngles: KernelVector3, isRootComponent: boolean, parentObjectRuntimeId: number): void;
@@ -58,6 +58,7 @@ export default class InitData implements Context, Omit<InitDataDefinition, 'colo
58
58
  maxHorizontalCameraAngle?: number;
59
59
  bananaForScale?: boolean;
60
60
  transparentHighlighting?: boolean;
61
+ transparentBackground?: boolean;
61
62
  snappingEnabled?: boolean;
62
63
  showInfos?: boolean;
63
64
  showPrice?: boolean;
@@ -367,6 +367,12 @@ export interface ConfiguratorInitData {
367
367
  * @groups scene-settings
368
368
  */
369
369
  transparentHighlighting?: boolean;
370
+ /**
371
+ * @description If set to true, the background is transparent and allows elements behind the configurator to be visible through the scene.
372
+ * usage: transparentBackground=true
373
+ * @groups scene-settings
374
+ */
375
+ transparentBackground?: boolean;
370
376
  /**
371
377
  * @deprecated
372
378
  * @description Shows partlist if there are no prices
@@ -1,6 +1,6 @@
1
1
  import type { PreviewComponent, PreviewLineComponent, RoomleComponent, RoomleComponentFactory } from '../../../common-core/src/webgl/roomle-component-factory';
2
2
  import type { ConfiguratorKernelCallbackI } from '../configurator-kernel-access';
3
- import type { KernelComponent, KernelEnum, KernelVector3, PlanObject } from '../../../typings/kernel';
3
+ import type { KernelComponent, KernelEnum, KernelMeshAttributes, KernelMeshBuffer, KernelVector3, PlanObject } from '../../../typings/kernel';
4
4
  import type { ConfigurationString } from '../../../typings/rapi-types';
5
5
  import type { Context } from '../di/context';
6
6
  import type ConfiguratorContext from '../webgl/configurator-context';
@@ -64,11 +64,10 @@ export default class ConfiguratorViewModel implements ConfiguratorKernelCallback
64
64
  dockComponentWithPosition(previewComponent: PreviewLineComponent, component?: RoomleComponent): void;
65
65
  removePreviews(): void;
66
66
  private _updatePlanObject;
67
- Editor3dAddBakedMesh(runtimeComponentId: number, materialId: string, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, environmentGeometry: boolean, materialAttributes: Record<string, string>): void;
68
67
  Editor3dAddDockPreview(componentId: number, previewId: number): void;
69
- Editor3dAddNamedMesh(runtimeComponentId: number, meshId: string, geometryId: string, materialId: string, transform: Float32Array, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, environmentGeometry: boolean, uvTransform: Float32Array, materialAttributes: Record<string, string>): void;
70
- Editor3ChangedNamedMesh(runtimeComponentId: number, meshId: string, geometryId: string, materialId: string, transform: Float32Array, uvTransform: Float32Array, materialAttributes?: Record<string, string>): void;
71
- Editor3dRemoveNamedMesh(runtimeComponentId: number, meshId: string): void;
68
+ Editor3dAddMesh(runtimeComponentId: number, meshId: number, geometryName: string, environmentGeometry: boolean, meshAttributes: KernelMeshAttributes, meshBuffer: KernelMeshBuffer): void;
69
+ Editor3ChangedMesh(runtimeComponentId: number, meshId: number, geometryName: string, meshAttributes: KernelMeshAttributes): void;
70
+ Editor3dRemoveMesh(runtimeComponentId: number, meshId: number): void;
72
71
  Editor3dBeginConstruction(componentId: number, isDeltaUpdate: boolean): void;
73
72
  Editor3dComponentCreated(id: number, position: KernelVector3, eulerAngles: KernelVector3, isRootComponent: boolean, parentObjectRuntimeId: number): void;
74
73
  Editor3dComponentDocked(componentId: number, isRootComponent: boolean, parentId: number, componentPosition: KernelVector3, componentRotation: KernelVector3): void;
@@ -105,7 +104,7 @@ export default class ConfiguratorViewModel implements ConfiguratorKernelCallback
105
104
  setGeometriesMergedListener(fun: () => void): void;
106
105
  removeGeometriesMergedListener(): void;
107
106
  setMergeThreshold(threshold: number): void;
108
- protected _generateMesh(runtimeComponentId: number, geometryId: string, materialId: string, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, _type?: KernelEnum, _newGeometryInstance?: boolean, materialAttributes?: Record<string, string>): Mesh;
107
+ protected _generateMesh(runtimeComponentId: number, geometryId: string, materialId: string, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, _type?: KernelEnum, _newGeometryInstance?: boolean, materialAttributes?: Record<string, string>): Mesh;
109
108
  protected _setMaterial(mesh: Mesh, material: any, _type?: KernelEnum): void;
110
109
  constructComponents(planObjectId: number): void;
111
110
  requestSubPartConstruction(partId: number): Promise<Mesh>;
@@ -25,7 +25,7 @@ export default class MeshGenerator implements Context {
25
25
  protected _configuratorPreviewMaterial: MeshStandardMaterial;
26
26
  constructor(creator: string);
27
27
  getGeometry(meshId: string): BufferGeometry;
28
- protected _generateGeometry(meshId: string, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): BufferGeometry;
28
+ protected _generateGeometry(meshId: string, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): BufferGeometry;
29
29
  changeMaterialOfMesh(mesh: Mesh, material: Material, materialAttributes?: Record<string, string>): void;
30
30
  private _updateMaterialProperties;
31
31
  private _updateStandardMaterialProperties;
@@ -1,7 +1,8 @@
1
1
  import type { Blending, Texture } from 'three';
2
2
  import { ShaderMaterial } from 'three';
3
+ import type { Nullable } from '../../../../../typings/helper';
3
4
  export interface BlendAoAndAShadowMaterialParameters {
4
- texture?: Texture | null;
5
+ texture?: Nullable<Texture>;
5
6
  blending?: Blending;
6
7
  aoIntensity?: number;
7
8
  shadowIntensity?: number;
@@ -0,0 +1,12 @@
1
+ import type { Blending, Texture } from 'three';
2
+ import { ShaderMaterial } from 'three';
3
+ import type { Nullable } from '../../../../../typings/helper';
4
+ export interface BlendAoPassDepthMaterialParameters {
5
+ texture?: Nullable<Texture>;
6
+ blending?: Blending;
7
+ }
8
+ export declare class BlendAoPassDepthMaterial extends ShaderMaterial {
9
+ private _intensity;
10
+ constructor(parameters?: BlendAoPassDepthMaterialParameters);
11
+ update(parameters?: BlendAoPassDepthMaterialParameters): BlendAoPassDepthMaterial;
12
+ }
@@ -2,11 +2,13 @@ import { RenderPass } from './render-pass';
2
2
  import type { RenderPassManager } from '../render-pass-manager';
3
3
  import type { CopyTransformMaterialParameters } from '../shader-utility';
4
4
  import type { BlendAoAndAShadowMaterialParameters } from '../materials/blend-ao-and-shadow-material';
5
+ import type { BlendAoPassDepthMaterialParameters } from '../materials/blend-ao-pass-depth-material';
5
6
  import type { ShaderMaterial, WebGLRenderer } from 'three';
6
7
  export declare class DebugPass extends RenderPass {
7
8
  private _environmentMapDecodeMaterial;
8
9
  private _copyMaterial?;
9
10
  private _blendAoAndShadowMaterial?;
11
+ private _blendAoPassDepthMaterial?;
10
12
  private _srgbToLinearCopyMaterial?;
11
13
  private _depthRenderMaterial?;
12
14
  debugOutput: string;
@@ -14,6 +16,7 @@ export declare class DebugPass extends RenderPass {
14
16
  dispose(): void;
15
17
  protected getCopyMaterial(parameters?: CopyTransformMaterialParameters): ShaderMaterial;
16
18
  protected getBlendAoAndShadowMaterial(parameters?: BlendAoAndAShadowMaterialParameters): ShaderMaterial;
19
+ protected getBlendAoPassDepthMaterial(parameters?: BlendAoPassDepthMaterialParameters): ShaderMaterial;
17
20
  protected getSrgbToLinearCopyMaterial(parameters?: CopyTransformMaterialParameters): ShaderMaterial;
18
21
  private _getDepthRenderMaterial;
19
22
  renderPass(renderer: WebGLRenderer): void;
@@ -20,6 +20,7 @@ export interface PoissonDenoiseParameters {
20
20
  normalVectorSourceType?: NormalVectorSourceType;
21
21
  depthValueSourceType?: DepthValueSourceType;
22
22
  rgInputTexture?: boolean;
23
+ luminanceWeighted?: boolean;
23
24
  luminanceType?: string;
24
25
  sampleLuminance?: string;
25
26
  fragmentOutput?: string;
@@ -45,6 +46,7 @@ export declare class PoissonDenoiseRenderPass implements DenoisePass {
45
46
  private _passRenderer;
46
47
  private _sceneClipBox;
47
48
  private _rgInputTexture;
49
+ private _luminanceWeighted;
48
50
  private _luminanceType;
49
51
  private _sampleLuminance;
50
52
  private _fragmentOutput;
@@ -1,7 +1,7 @@
1
1
  import type { Texture } from 'three';
2
2
  import { Matrix4, Vector3, Vector2 } from 'three';
3
- export declare const generatePdSamplePointInitializer: (samples: number, rings: number, radiusExponent: number) => string;
4
- export declare const generateDenoiseSamples: (numSamples: number, numRings: number, radiusExponent: number) => Vector3[];
3
+ export declare const generatePdSamplePointInitializer: (samples: number, rings: number, radius: number, radiusExponent: number) => string;
4
+ export declare const generateDenoiseSamples: (numSamples: number, numRings: number, radius: number, radiusExponent: number) => Vector3[];
5
5
  export declare const poissonDenoiseShader: {
6
6
  name: string;
7
7
  defines: {
@@ -10,6 +10,7 @@ export declare const poissonDenoiseShader: {
10
10
  NV_ALIGNED_SAMPLES: number;
11
11
  SAMPLE_DISTRIBUTION: number;
12
12
  DEPTH_VALUE_SOURCE: number;
13
+ LUMINANCE_WEIGHTED: number;
13
14
  LUMINANCE_TYPE: string;
14
15
  SAMPLE_LUMINANCE: string;
15
16
  SCENE_CLIP_BOX: number;
@@ -55,7 +56,10 @@ export declare const poissonDenoiseShader: {
55
56
  radiusExponent: {
56
57
  value: number;
57
58
  };
58
- index: {
59
+ iteration: {
60
+ value: number;
61
+ };
62
+ noOfIterations: {
59
63
  value: number;
60
64
  };
61
65
  sceneBoxMin: {
@@ -21,8 +21,8 @@ export interface RoomleComponent extends RoomleEventedObject3D {
21
21
  replaceMeshes(meshes: Mesh[]): void;
22
22
  addMesh(mesh: Mesh, transform?: Float32Array): void;
23
23
  removeMesh(mesh: Mesh): void;
24
- removeMeshById(meshId: string): void;
25
- getMeshById(meshId: string): Mesh;
24
+ removeMeshById(meshId: number): void;
25
+ getMeshById(meshId: number): Mesh;
26
26
  removeAllMeshes(): void;
27
27
  select(): void;
28
28
  deselect(): void;
@@ -4,7 +4,7 @@ import type { RapiMaterial } from '../../../typings/rapi-types';
4
4
  import type { Material, Mesh, MeshPhysicalMaterial } from 'three';
5
5
  export default class ConfiguratorMeshGenerator extends MeshGenerator {
6
6
  constructor(creator: string);
7
- generateMesh(runtimeComponentId: number, geometryId: string, materialId: string, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, newGeometryInstance?: boolean, materialAttributes?: Record<string, string>): Mesh;
7
+ generateMesh(runtimeComponentId: number, geometryId: string, materialId: string, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, newGeometryInstance?: boolean, materialAttributes?: Record<string, string>): Mesh;
8
8
  setMaterial(mesh: Mesh, materialId: string, _type?: KernelEnum, materialAttributes?: Record<string, string>): Promise<void>;
9
9
  loadMaterial(materialId: string, width?: number, height?: number): Promise<Material>;
10
10
  loadTextures(rapiMaterial: RapiMaterial, material: MeshPhysicalMaterial, width?: number, height?: number): Promise<void>;
@@ -14,7 +14,7 @@ export declare const MOCK_GEOMETRY_ID = "#asdfjaksdklfasd";
14
14
  export declare const MOCK_MATERIALID = "adidas:Metal";
15
15
  export declare const MOCK_TRANSFORM: Float32Array;
16
16
  export declare const MOCK_UVTRANSFORM: Float32Array;
17
- export declare const MOCK_VERTICES: Int32Array;
17
+ export declare const MOCK_VERTICES: Float32Array;
18
18
  export declare const MOCK_INDICES: Int32Array;
19
19
  export declare const MOCK_UVCOORDS: Float32Array;
20
20
  export declare const MOCK_NORMALS: Float32Array;
@@ -10,8 +10,8 @@ export interface PlannerKernelCallbackI {
10
10
  handlerSwitchedPlans(fromPlan: Plan, toPlan: Plan): void;
11
11
  planCompletelyLoaded(plan: Plan): void;
12
12
  beginPlanConstruction(plan: Plan): void;
13
- addMesh(planElement: PlanElement, material: any, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): void;
14
- addPlanMesh(plan: Plan, material: any, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, type: KernelEnum): void;
13
+ addMesh(planElement: PlanElement, material: any, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): void;
14
+ addPlanMesh(plan: Plan, material: any, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, type: KernelEnum): void;
15
15
  endPlanConstruction(plan: Plan): void;
16
16
  addPlanObjectToScene(planElementViewModel: PlanObjectViewModel): void;
17
17
  removePlanObjectFromScene(planElementViewModel: PlanObjectViewModel): void;
@@ -68,10 +68,10 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
68
68
  stoppedDrawing(): void;
69
69
  updateMesh2d(): void;
70
70
  beginConstruction(): void;
71
- addMesh(planElement: PlanElement, material: any, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): void;
71
+ addMesh(planElement: PlanElement, material: any, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): void;
72
72
  endConstruction(): void;
73
73
  beginPlanConstruction(plan: Plan): void;
74
- addPlanMesh(plan: Plan, material: any, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, type: KernelEnum): void;
74
+ addPlanMesh(plan: Plan, material: any, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, type: KernelEnum): void;
75
75
  endPlanConstruction(plan: Plan): void;
76
76
  addPlanObjectFromItem(rapiElement: RapiItem | RapiConfiguration, position?: Position3, rotation?: number): Promise<RuntimeId>;
77
77
  coupleReferences(jsObject: any, coreReference: KernelObject): void;
@@ -101,18 +101,18 @@ export default class PlanViewModel extends ConfiguratorViewModel implements Plan
101
101
  getNodePlanObjectViewModels(): NodePlanElementViewModel[];
102
102
  getFloorPlanObjectViewModels(): FloorPlanElementViewModel[];
103
103
  getMeasurementLineObjectViewModels(): MeasurementLinePlanElementViewModel[];
104
- protected _generateMesh(runtimeComponentId: number, geometryId: string, material: any, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, type?: KernelEnum, newGeometryInstance?: boolean, materialAttributes?: Record<string, string>): Mesh;
104
+ protected _generateMesh(runtimeComponentId: number, geometryId: string, material: any, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, type?: KernelEnum, newGeometryInstance?: boolean, materialAttributes?: Record<string, string>): Mesh;
105
105
  protected _setMaterial(mesh: Mesh, material: any, _type?: KernelEnum, materialAttributes?: Record<string, string>): void;
106
106
  Editor3dComponentCreated(id: number, position: KernelVector3, eulerAngles: KernelVector3, isRootComponent: boolean, parentObjectRuntimeId: number): void;
107
107
  addPlanObjectToScene(_planViewModel: PlanElementViewModel): void;
108
108
  handlerSwitchedPlans(_fromPlan: Plan, _toPlan: Plan): void;
109
109
  planCompletelyLoaded(_plan: Plan): void;
110
110
  beginPlanConstruction(_plan: Plan): void;
111
- addPlanMesh(_plan: Plan, _material: any, _vertices: Int32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array, _type: KernelEnum): void;
111
+ addPlanMesh(_plan: Plan, _material: any, _vertices: Float32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array, _type: KernelEnum): void;
112
112
  endPlanConstruction(_plan: Plan): void;
113
113
  planElementChanged(_plan: Plan, _planObject: PlanElementViewModel): void;
114
114
  planObjectConfigurationLoaded(_plan: Plan, planElement: PlanElement, success: boolean): void;
115
- addMesh(planElement: PlanElement, material: any, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): void;
115
+ addMesh(planElement: PlanElement, material: any, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): void;
116
116
  removePlanObjectFromScene(planElementViewModel: PlanElementViewModel): void;
117
117
  private _isConstructionType;
118
118
  planElementRemoved(element: PlanElement): void;
@@ -10,8 +10,8 @@ export default class PlannerMeshGenerator extends MeshGenerator {
10
10
  private _defaultMaterial;
11
11
  private _defaultMaterialFloor;
12
12
  constructor(creator: string);
13
- generateGeometry(meshId: string, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, newGeometryInstance?: boolean): BufferGeometry;
14
- generateMesh(runtimeComponentId: number, geometryId: string, materialId: BaseMaterial | string, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, type?: KernelEnum, newGeometryInstance?: boolean, materialAttributes?: Record<string, string>): Mesh;
13
+ generateGeometry(meshId: string, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, newGeometryInstance?: boolean): BufferGeometry;
14
+ generateMesh(runtimeComponentId: number, geometryId: string, materialId: BaseMaterial | string, vertices: Float32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array, type?: KernelEnum, newGeometryInstance?: boolean, materialAttributes?: Record<string, string>): Mesh;
15
15
  setMaterial(mesh: Mesh, material: BaseMaterial | string, type?: KernelEnum, materialAttributes?: Record<string, string>): Promise<void>;
16
16
  private _getDefaultMaterial;
17
17
  set maxAnisotropy(maxAnisotropy: number);
@@ -77,7 +77,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
77
77
  handlerSwitchedPlans(fromPlan: Plan, toPlan: Plan): void;
78
78
  private _itemsLoaded;
79
79
  beginPlanConstruction(_plan: Plan): void;
80
- addPlanMesh(_plan: Plan, _material: any, _vertices: Int32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array, _type: KernelEnum): void;
80
+ addPlanMesh(_plan: Plan, _material: any, _vertices: Float32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array, _type: KernelEnum): void;
81
81
  endPlanConstruction(_plan: Plan): void;
82
82
  addPlanObjectToScene(planViewModel: PlanObjectViewModel): Promise<void>;
83
83
  removePlanObjectFromScene(planViewModel: PlanElementViewModel): void;
@@ -104,7 +104,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
104
104
  private _highlightPlanElement;
105
105
  destroy(): void;
106
106
  planObjectConfigurationLoaded(plan: Plan, element: PlanElement, _success: boolean): void;
107
- addMesh(_planElement: PlanElement, _material: any, _vertices: Int32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array): void;
107
+ addMesh(_planElement: PlanElement, _material: any, _vertices: Float32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array): void;
108
108
  updateCameraOnDrawWalls(): void;
109
109
  getBounds(): Box3;
110
110
  getGeometryBounds(): Box3;
@@ -19,6 +19,11 @@ export interface KernelValue {
19
19
  label: string;
20
20
  thumbnail: string;
21
21
  }
22
+ export interface KernelActionValue extends KernelValue {
23
+ value: string;
24
+ label: string;
25
+ type: string;
26
+ }
22
27
  export interface KernelRange {
23
28
  valueFrom: number;
24
29
  valueTo: number;
@@ -163,6 +168,18 @@ export interface KernelCube {
163
168
  origin: KernelVector3;
164
169
  size: KernelVector3;
165
170
  }
171
+ export interface KernelAnimation {
172
+ actions: KernelAnimationAction[];
173
+ enabled: boolean;
174
+ key: string;
175
+ label: string;
176
+ visibleInPlanner: boolean;
177
+ }
178
+ export interface KernelAnimationAction {
179
+ key: string;
180
+ label: string;
181
+ type: string;
182
+ }
166
183
  export interface PlanObject {
167
184
  bounds: KernelVector3;
168
185
  boxForMeasurement: KernelCube;
@@ -171,6 +188,7 @@ export interface PlanObject {
171
188
  rootPlanComponentId: number;
172
189
  externalId: string;
173
190
  externalObject: boolean;
191
+ animations?: KernelAnimation[];
174
192
  [key: string]: any;
175
193
  }
176
194
  export declare const CONFIGURATION_TYPE: {
@@ -197,6 +215,7 @@ export interface KernelPlanObjectBase {
197
215
  export interface KernelPlanObject extends KernelPlanObjectBase {
198
216
  parts: KernelPartList;
199
217
  parameters: KernelParameter[];
218
+ animations?: KernelAnimation[];
200
219
  }
201
220
  export interface KernelPlanObjectComponent extends KernelPlanObjectBase {
202
221
  planComponentRuntimeId: number;
@@ -229,6 +248,7 @@ export interface KernelComponent {
229
248
  parameterGroups: KernelParameterGroup[];
230
249
  dimensionings: Dimensioning[];
231
250
  externalComponent: boolean;
251
+ animations?: KernelAnimation[];
232
252
  [key: string]: any;
233
253
  }
234
254
  export declare const enum DIMENSIONING_TYPE {
@@ -379,11 +399,13 @@ export interface ConfiguratorKernelClass {
379
399
  requestPreviewGeometryForExternalObject(componentId: string, planObjectId: number, allowInsertInBetween: boolean): void;
380
400
  cancelDocking(componentId: number, undoDrag: boolean): void;
381
401
  getComponentParameters(componentId: number): KernelParameter[];
402
+ getPlanComponentAnimations(planComponentId: number): KernelAnimation[];
382
403
  setComponentParameter(componentId: number, parameterKey: string, value: string): void;
383
404
  setPlanComponentParameters(componentIds: any, parameterKey: string, value: string): void;
384
405
  setEnvironmentVariable(key: string, value: any): void;
385
406
  setLevel(restrictionLevel: number): void;
386
407
  getPlanObjectParameters(planObjectId: number): KernelParameter[];
408
+ getPlanObjectAnimations(planObjectId: number): KernelAnimation[];
387
409
  setPlanObjectParameter(planObjectId: number, parameterKey: string, value: string): void;
388
410
  dockComponent(childId: number, childDockId: number, parentId: number, parentDockId: number): void;
389
411
  dockComponentWithPosition(childId: number, childDockId: number, parentId: number, parentDockId: number, position: KernelVector3): void;
@@ -408,6 +430,7 @@ export interface ConfiguratorKernelClass {
408
430
  getCommonPlanComponentParameters(componentIds: any): {
409
431
  parameters: KernelParameter[];
410
432
  parameterGroups: KernelParameterGroup[];
433
+ animations: KernelAnimation[];
411
434
  };
412
435
  loadComponentDefinition(conversationId: number, component: string): void;
413
436
  syncPlanObjectToView(conversationId: number, planObjectId: number): void;
@@ -450,4 +473,17 @@ export interface KernelConfigurationLoadedData {
450
473
  errors: string[];
451
474
  }
452
475
  export type RuntimeId = number;
476
+ export interface KernelMeshBuffer {
477
+ indices: Int32Array;
478
+ vertices: Float32Array;
479
+ normals: Float32Array;
480
+ uvCoords: Float32Array;
481
+ }
482
+ export interface KernelMeshAttributes {
483
+ materialId: string;
484
+ materialAttributes: Record<string, string> | null;
485
+ transform: Float32Array;
486
+ uvTransform: Float32Array | null;
487
+ animations: Record<string, Float32Array> | null;
488
+ }
453
489
  export {};
@@ -286,5 +286,5 @@ export interface PlanObjectPosition {
286
286
  runtimeId: RuntimeId;
287
287
  position2d: Position2;
288
288
  }
289
- export type CancelSelectionReasons = 'swap_object' | 'click_outside' | 'select_other' | 'double_click_wall' | 'unknown' | 'delete_object';
289
+ export type CancelSelectionReasons = 'swap_object' | 'click_outside' | 'select_other' | 'double_click_wall' | 'unknown' | 'dock_component' | 'delete_object';
290
290
  export {};
@@ -1,2 +1,2 @@
1
- import{aG as normalizeRotation,w as dispose,_ as __decorate,i as inject,ah as AsyncGuard,aH as AsyncDependencyLoader,ad as convertToTHREE}from"./roomle-dependency-injection-def49531.js";import{O as Object3D,a as Vector3,h as MeshBasicMaterial,w as DoubleSide,br as MeshPhongMaterial,B as BufferGeometry,z as Mesh,Q as Quaternion,bc as PlaneGeometry,K as Group,u as LineBasicMaterial,G as Line,b as BufferAttribute,b0 as Line3,ad as Box3}from"./main-thread-to-worker-82b32425.js";import{T as TextGeometry}from"./TextGeometry-f0a85d6a.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new BufferGeometry;this._text=new Mesh(e,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new Mesh(e,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i){this._position.copy(e),this._cameraPosition=i,this._label=t;const s=this.getWorldPosition(new Vector3),n=this._cameraPosition.distanceTo(s),o=Math.max(.01,n/150),h=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=h,this._parameters.bevelSize=h,this._parameters.size=o,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new Quaternion;e.setFromAxisAngle(new Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new Vector3)}else if(this._updateText(this._textGeometry,new Quaternion,new Vector3),this._cameraPosition){const e=this.getWorldPosition(new Vector3),t=normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this.parent.rotation.y);this._text.rotation.y=t,this._plane.rotation.y=t}}_updateText(e,t,i){let s=new Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new Vector3);e.center(),this._text.position.copy(s),t&&this._text.quaternion.copy(t);let o=new PlaneGeometry(n.x+.02,n.y+.02,32);o.center(),this._plane.geometry=o,this._plane.position.copy(s),t&&this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._objectRotation=0,this._cameraPosition=new Vector3,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new Group,this._dimensionTextGroup=new Object3D,this._creator_=e,this._lineMaterial=new LineBasicMaterial({color:3618615,linewidth:2});let t=new BufferGeometry;this._widthLine=new Line(t,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new Line(t,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new Line(t,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._dimensions||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new BufferGeometry,t=this._getWidthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let s=t.getCenter(new Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let e=new BufferGeometry,t=this._getHeightEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let s=t.getCenter(new Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let e=new BufferGeometry,t=this._getDepthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let s=t.getCenter(new Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(e){this._origin=convertToTHREE(e.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=convertToTHREE(e.size);const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToObject(e){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&e.add(this._dimensionLineGroup)}removeFromObject(e){e.remove(this._dimensionLineGroup),this.update()}addToUiScene(e){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this._dimensionTextGroup.rotation.y=this._objectRotation,e.add(this._dimensionTextGroup),this.update()}removeFromUiScene(e){e.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const e=this._getRotation();return e>Math.PI/2||e<-Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(this._dimensions.x+.05,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const e=this._getRotation();return e>0&&e<Math.PI/2?new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,this._dimensions.y+.05,.05)):e>Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):e<-Math.PI/2?new Line3(new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=e,this._dimensionTextGroup.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setObject(e,t=0){this._object=e,this._objectRotation=t}setUiScene(e){this._uiScene=e}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const e=this._object.getWorldPosition(new Vector3);return normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this._objectRotation)}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export{DimensioningHelper as default};
2
- //# sourceMappingURL=dimensioning-helper-bfc2ecfd.js.map
1
+ import{aG as normalizeRotation,w as dispose,_ as __decorate,i as inject,ah as AsyncGuard,aH as AsyncDependencyLoader,ad as convertToTHREE}from"./roomle-dependency-injection-75ddade3.js";import{O as Object3D,a as Vector3,h as MeshBasicMaterial,w as DoubleSide,br as MeshPhongMaterial,B as BufferGeometry,z as Mesh,Q as Quaternion,bc as PlaneGeometry,K as Group,u as LineBasicMaterial,G as Line,b as BufferAttribute,b0 as Line3,ad as Box3}from"./main-thread-to-worker-82b32425.js";import{T as TextGeometry}from"./TextGeometry-f0a85d6a.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new BufferGeometry;this._text=new Mesh(e,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new Mesh(e,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i){this._position.copy(e),this._cameraPosition=i,this._label=t;const s=this.getWorldPosition(new Vector3),n=this._cameraPosition.distanceTo(s),o=Math.max(.01,n/150),h=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=h,this._parameters.bevelSize=h,this._parameters.size=o,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new Quaternion;e.setFromAxisAngle(new Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new Vector3)}else if(this._updateText(this._textGeometry,new Quaternion,new Vector3),this._cameraPosition){const e=this.getWorldPosition(new Vector3),t=normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this.parent.rotation.y);this._text.rotation.y=t,this._plane.rotation.y=t}}_updateText(e,t,i){let s=new Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new Vector3);e.center(),this._text.position.copy(s),t&&this._text.quaternion.copy(t);let o=new PlaneGeometry(n.x+.02,n.y+.02,32);o.center(),this._plane.geometry=o,this._plane.position.copy(s),t&&this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._objectRotation=0,this._cameraPosition=new Vector3,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new Group,this._dimensionTextGroup=new Object3D,this._creator_=e,this._lineMaterial=new LineBasicMaterial({color:3618615,linewidth:2});let t=new BufferGeometry;this._widthLine=new Line(t,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new Line(t,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new Line(t,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._dimensions||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new BufferGeometry,t=this._getWidthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let s=t.getCenter(new Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let e=new BufferGeometry,t=this._getHeightEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let s=t.getCenter(new Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let e=new BufferGeometry,t=this._getDepthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let s=t.getCenter(new Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(e){this._origin=convertToTHREE(e.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=convertToTHREE(e.size);const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToObject(e){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&e.add(this._dimensionLineGroup)}removeFromObject(e){e.remove(this._dimensionLineGroup),this.update()}addToUiScene(e){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this._dimensionTextGroup.rotation.y=this._objectRotation,e.add(this._dimensionTextGroup),this.update()}removeFromUiScene(e){e.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const e=this._getRotation();return e>Math.PI/2||e<-Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(this._dimensions.x+.05,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const e=this._getRotation();return e>0&&e<Math.PI/2?new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,this._dimensions.y+.05,.05)):e>Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):e<-Math.PI/2?new Line3(new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=e,this._dimensionTextGroup.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setObject(e,t=0){this._object=e,this._objectRotation=t}setUiScene(e){this._uiScene=e}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const e=this._object.getWorldPosition(new Vector3);return normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this._objectRotation)}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export{DimensioningHelper as default};
2
+ //# sourceMappingURL=dimensioning-helper-0450da4a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-bfc2ecfd.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"y7IAAe"}
1
+ {"version":3,"file":"dimensioning-helper-0450da4a.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"y7IAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-6f5dd527.nomodule.js","./main-thread-to-worker-ff04af1e.nomodule.js","./TextGeometry-b57a793b.nomodule.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,u,x,g,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.h,p=t.w,m=t.br,l=t.B,c=t.z,u=t.Q,x=t.bc,g=t.K,w=t.u,b=t.G,y=t.b,T=t.b0,L=t.ad},function(t){G=t.T}],execute:function(){const z="component_dimensioning_plane_material",M="component_dimensioning_text_material";class j extends _{constructor(t){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=t,this._position=new d,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(z)?this._planeMaterial=this._cacheHolder.materialCache.get(z):(this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(z,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new m({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){let t=new l;this._text=new c(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new c(t,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(t,i,e){this._position.copy(t),this._cameraPosition=e,this._label=i;const s=this.getWorldPosition(new d),n=this._cameraPosition.distanceTo(s),h=Math.max(.01,n/150),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new u;t.setFromAxisAngle(new d(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new d)}else if(this._updateText(this._textGeometry,new u,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 x(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),i&&this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}s([n],j.prototype,"_cacheHolder",void 0);class D{constructor(t){this._objectRotation=0,this._cameraPosition=new d,this._topDimensions=!1,this._initialized=new h,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new g,this._dimensionTextGroup=new _,this._creator_=t,this._lineMaterial=new w({color:3618615,linewidth:2});let i=new l;this._widthLine=new b(i,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new b(i,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new b(i,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),o.loadFont("static/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-b97db7f1.nomodule.js.map
1
+ System.register(["./roomle-dependency-injection-fccf8262.nomodule.js","./main-thread-to-worker-ff04af1e.nomodule.js","./TextGeometry-b57a793b.nomodule.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,u,x,g,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.h,p=t.w,m=t.br,l=t.B,c=t.z,u=t.Q,x=t.bc,g=t.K,w=t.u,b=t.G,y=t.b,T=t.b0,L=t.ad},function(t){G=t.T}],execute:function(){const z="component_dimensioning_plane_material",M="component_dimensioning_text_material";class j extends _{constructor(t){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=t,this._position=new d,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(z)?this._planeMaterial=this._cacheHolder.materialCache.get(z):(this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(z,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new m({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){let t=new l;this._text=new c(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new c(t,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(t,i,e){this._position.copy(t),this._cameraPosition=e,this._label=i;const s=this.getWorldPosition(new d),n=this._cameraPosition.distanceTo(s),h=Math.max(.01,n/150),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new G(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new u;t.setFromAxisAngle(new d(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new d)}else if(this._updateText(this._textGeometry,new u,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 x(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),i&&this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}s([n],j.prototype,"_cacheHolder",void 0);class D{constructor(t){this._objectRotation=0,this._cameraPosition=new d,this._topDimensions=!1,this._initialized=new h,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new g,this._dimensionTextGroup=new _,this._creator_=t,this._lineMaterial=new w({color:3618615,linewidth:2});let i=new l;this._widthLine=new b(i,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new b(i,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new b(i,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),o.loadFont("static/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-ea197c48.nomodule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-b97db7f1.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"y4HAAe"}
1
+ {"version":3,"file":"dimensioning-helper-ea197c48.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"y4HAAe"}