@roomle/web-sdk 3.6.0-alpha.2 → 3.6.0-alpha.4

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 (341) hide show
  1. package/lib/BufferGeometry-DLEagG41.mjs +1022 -0
  2. package/lib/BufferGeometry-DLEagG41.mjs.map +1 -0
  3. package/lib/ConfiguratorKernel.js +2 -2
  4. package/lib/ConfiguratorKernel.wasm +0 -0
  5. package/lib/GLTFExporter-D8qsdwDK.mjs +1092 -0
  6. package/lib/GLTFExporter-D8qsdwDK.mjs.map +1 -0
  7. package/lib/Object3D-DSjIOhON.mjs +1713 -0
  8. package/lib/Object3D-DSjIOhON.mjs.map +1 -0
  9. package/lib/PointLightHelper-BnjxGaOG.mjs +257 -0
  10. package/lib/PointLightHelper-BnjxGaOG.mjs.map +1 -0
  11. package/lib/RoomleCore.js +4 -4
  12. package/lib/RoomleCore.wasm +0 -0
  13. package/lib/RoomleToolsCore.wasm +0 -0
  14. package/lib/SpotLightHelper-DqsfqCrs.mjs +154 -0
  15. package/lib/SpotLightHelper-DqsfqCrs.mjs.map +1 -0
  16. package/lib/USDZExporter-DxIqi8St.mjs +296 -0
  17. package/lib/USDZExporter-DxIqi8St.mjs.map +1 -0
  18. package/lib/Vector4-DGmBYfpK.mjs +204 -0
  19. package/lib/Vector4-DGmBYfpK.mjs.map +1 -0
  20. package/lib/api-CNoIBuvr.mjs +55 -0
  21. package/lib/api-CNoIBuvr.mjs.map +1 -0
  22. package/lib/asset-loader.worker.js +1 -1
  23. package/lib/banana-for-scale-C_iNmlCT.mjs +36 -0
  24. package/lib/banana-for-scale-C_iNmlCT.mjs.map +1 -0
  25. package/lib/common-utils-DMSTohiS.mjs +187 -0
  26. package/lib/common-utils-DMSTohiS.mjs.map +1 -0
  27. package/lib/component-dimensioning-CvRmUja4.mjs +162 -0
  28. package/lib/component-dimensioning-CvRmUja4.mjs.map +1 -0
  29. package/lib/component-raycast-helper-CEp7wy9c.mjs +97 -0
  30. package/lib/component-raycast-helper-CEp7wy9c.mjs.map +1 -0
  31. package/lib/configurator-B_5XVG2O.mjs +45 -0
  32. package/lib/configurator-B_5XVG2O.mjs.map +1 -0
  33. package/lib/configurator-DCdvMM0o.mjs +2 -0
  34. package/lib/continuous-drawing-helper-v_5UAM9A.mjs +42 -0
  35. package/lib/continuous-drawing-helper-v_5UAM9A.mjs.map +1 -0
  36. package/lib/decorate-C1QnXPYw.mjs +35 -0
  37. package/lib/decorate-C1QnXPYw.mjs.map +1 -0
  38. package/lib/dimensioning-helper-DTcW85Oq.mjs +2 -0
  39. package/lib/dimensioning-helper-Fwpt1HTT.mjs +268 -0
  40. package/lib/dimensioning-helper-Fwpt1HTT.mjs.map +1 -0
  41. package/lib/fflate.module-dFNj5UPI.mjs +536 -0
  42. package/lib/fflate.module-dFNj5UPI.mjs.map +1 -0
  43. package/lib/glb-viewer-cP8g6bcm.mjs +315 -0
  44. package/lib/glb-viewer-cP8g6bcm.mjs.map +1 -0
  45. package/lib/glb-viewer-dZThmlwM.mjs +2 -0
  46. package/lib/homag-intelligence-LoOJ7roM.mjs +381 -0
  47. package/lib/homag-intelligence-LoOJ7roM.mjs.map +1 -0
  48. package/lib/imos-ix-poc-export-helper-CQh94HsO.mjs +161 -0
  49. package/lib/imos-ix-poc-export-helper-CQh94HsO.mjs.map +1 -0
  50. package/lib/kernel-BAQSG9r5.mjs +46 -0
  51. package/lib/kernel-BAQSG9r5.mjs.map +1 -0
  52. package/lib/kernel-utils-H74uNY1h.mjs +44 -0
  53. package/lib/kernel-utils-H74uNY1h.mjs.map +1 -0
  54. package/lib/layer-C_JtkhdO.mjs +8 -0
  55. package/lib/layer-C_JtkhdO.mjs.map +1 -0
  56. package/lib/main-BxEZ11ag.mjs +20461 -0
  57. package/lib/main-BxEZ11ag.mjs.map +1 -0
  58. package/lib/material-viewer-njBFF0Zg.mjs +292 -0
  59. package/lib/material-viewer-njBFF0Zg.mjs.map +1 -0
  60. package/lib/planner-Cr495Cyn.mjs +2 -0
  61. package/lib/planner-DY73rplC.mjs +44 -0
  62. package/lib/planner-DY73rplC.mjs.map +1 -0
  63. package/lib/plugin-system-D9K46xJk.mjs +55 -0
  64. package/lib/plugin-system-D9K46xJk.mjs.map +1 -0
  65. package/lib/roomle-sdk.d.ts +302 -134
  66. package/lib/roomle-sdk.js +7 -36
  67. package/lib/scene-renderer-D8HkTFeZ.mjs +3826 -0
  68. package/lib/scene-renderer-D8HkTFeZ.mjs.map +1 -0
  69. package/lib/script-loader-KBq8SjP6.mjs +45 -0
  70. package/lib/script-loader-KBq8SjP6.mjs.map +1 -0
  71. package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_decoder.js +34 -0
  72. package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_decoder.wasm +0 -0
  73. package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_encoder.js +33 -0
  74. package/lib/static/draco/node_modules/three/examples/jsm/libs/draco/draco_wasm_wrapper.js +117 -0
  75. package/lib/static/packages/workers/generated/asset-loader.worker.js +1 -0
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -0
  77. package/lib/static/roomle-core-hsc/{configuratorCore.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCore.d.ts} +1 -2
  78. package/lib/static/roomle-core-hsc/{configuratorCoreInterface.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts} +22 -29
  79. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/embind/plannerCore.d.ts +1 -2
  80. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/embind/plannerCoreCallback.d.ts +1 -1
  81. package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreCallback.js +1 -1
  82. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreCallback.js.map +1 -0
  83. package/lib/static/roomle-core-hsc/{plannerCoreInterface.d.ts → node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts} +76 -81
  84. package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCoreInterface.js +1 -6
  85. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -0
  86. package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurableObject.d.ts +2 -2
  87. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/configurableObject.js +6 -6
  88. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurableObject.js.map +1 -0
  89. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/configurationLoader.js +1 -5
  90. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurationLoader.js.map +1 -0
  91. package/lib/static/roomle-core-hsc/{configurationManager.d.ts → node_modules/roomle-core-hsc/src/loader/configurationManager.d.ts} +1 -0
  92. package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/configurationManager.js +6 -0
  93. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/configurationManager.js.map +1 -0
  94. package/lib/static/roomle-core-hsc/{src → node_modules/roomle-core-hsc/src}/loader/planElementManager.d.ts +2 -2
  95. package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/planElementManager.js.map +1 -1
  96. package/lib/static/roomle-core-hsc/{wasm_modern → node_modules/roomle-core-hsc/wasm_modern}/ConfiguratorKernel.js +2 -2
  97. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  98. package/lib/static/roomle-core-hsc/{wasm_modern → node_modules/roomle-core-hsc/wasm_modern}/RoomleCore.js +4 -4
  99. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  100. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  101. package/lib/stats-helper-HM0TaIM5.mjs +95 -0
  102. package/lib/stats-helper-HM0TaIM5.mjs.map +1 -0
  103. package/lib/three.core-CLIofecG.mjs +7629 -0
  104. package/lib/three.core-CLIofecG.mjs.map +1 -0
  105. package/lib/three.module-C4Q1skJQ.mjs +5795 -0
  106. package/lib/three.module-C4Q1skJQ.mjs.map +1 -0
  107. package/lib/three.webgpu-dFspy2yF.mjs +16057 -0
  108. package/lib/three.webgpu-dFspy2yF.mjs.map +1 -0
  109. package/lib/threejs-utils-jEzvlJF1.mjs +2233 -0
  110. package/lib/threejs-utils-jEzvlJF1.mjs.map +1 -0
  111. package/lib/tools-core-CZbPygRC.mjs +30 -0
  112. package/lib/tools-core-CZbPygRC.mjs.map +1 -0
  113. package/package.json +3 -3
  114. package/lib/BufferGeometry-BZdSmtHt.mjs +0 -2064
  115. package/lib/BufferGeometry-BZdSmtHt.mjs.map +0 -1
  116. package/lib/GLTFExporter-DiE_HuI6.mjs +0 -1286
  117. package/lib/GLTFExporter-DiE_HuI6.mjs.map +0 -1
  118. package/lib/PointLightHelper-BvRpTX7D.mjs +0 -522
  119. package/lib/PointLightHelper-BvRpTX7D.mjs.map +0 -1
  120. package/lib/SpotLightHelper-Byg39thi.mjs +0 -222
  121. package/lib/SpotLightHelper-Byg39thi.mjs.map +0 -1
  122. package/lib/USDZExporter-VBx9xybH.mjs +0 -545
  123. package/lib/USDZExporter-VBx9xybH.mjs.map +0 -1
  124. package/lib/banana-for-scale-C9_AyZkI.mjs +0 -50
  125. package/lib/banana-for-scale-C9_AyZkI.mjs.map +0 -1
  126. package/lib/component-dimensioning-DHTSa-If.mjs +0 -229
  127. package/lib/component-dimensioning-DHTSa-If.mjs.map +0 -1
  128. package/lib/continuous-drawing-helper-BNHRsd4B.mjs +0 -48
  129. package/lib/continuous-drawing-helper-BNHRsd4B.mjs.map +0 -1
  130. package/lib/homag-intelligence-BraN723F.mjs +0 -545
  131. package/lib/homag-intelligence-BraN723F.mjs.map +0 -1
  132. package/lib/imos-ix-poc-export-helper-D7ubISCJ.mjs +0 -180
  133. package/lib/imos-ix-poc-export-helper-D7ubISCJ.mjs.map +0 -1
  134. package/lib/index-C-Prfui2.mjs +0 -73502
  135. package/lib/index-C-Prfui2.mjs.map +0 -1
  136. package/lib/material-viewer-DyVGp6Xm.mjs +0 -450
  137. package/lib/material-viewer-DyVGp6Xm.mjs.map +0 -1
  138. package/lib/roomle-sdk.js.map +0 -1
  139. package/lib/static/asset-loader.worker.js +0 -1
  140. package/lib/static/draco/gltf/draco_decoder.js +0 -33
  141. package/lib/static/draco/gltf/draco_decoder.wasm +0 -0
  142. package/lib/static/draco/gltf/draco_encoder.js +0 -33
  143. package/lib/static/draco/gltf/draco_wasm_wrapper.js +0 -116
  144. package/lib/static/roomle-core-hsc/ConfiguratorKernel.js +0 -74
  145. package/lib/static/roomle-core-hsc/ConfiguratorKernel.wasm +0 -0
  146. package/lib/static/roomle-core-hsc/RoomleCore.js +0 -79
  147. package/lib/static/roomle-core-hsc/RoomleCore.wasm +0 -0
  148. package/lib/static/roomle-core-hsc/RoomleToolsCore.wasm +0 -0
  149. package/lib/static/roomle-core-hsc/configurableObject.d.ts +0 -30
  150. package/lib/static/roomle-core-hsc/configurableObject.js +0 -111
  151. package/lib/static/roomle-core-hsc/configurableObject.js.map +0 -1
  152. package/lib/static/roomle-core-hsc/configurationLoader.js +0 -349
  153. package/lib/static/roomle-core-hsc/configurationLoader.js.map +0 -1
  154. package/lib/static/roomle-core-hsc/configurationManager.js +0 -141
  155. package/lib/static/roomle-core-hsc/configurationManager.js.map +0 -1
  156. package/lib/static/roomle-core-hsc/embind/configuratorCallback.d.ts +0 -82
  157. package/lib/static/roomle-core-hsc/embind/configuratorCallback.js +0 -355
  158. package/lib/static/roomle-core-hsc/embind/configuratorCallback.js.map +0 -1
  159. package/lib/static/roomle-core-hsc/embind/configuratorCore.d.ts +0 -20
  160. package/lib/static/roomle-core-hsc/embind/configuratorCore.js +0 -50
  161. package/lib/static/roomle-core-hsc/embind/configuratorCore.js.map +0 -1
  162. package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.d.ts +0 -753
  163. package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.js +0 -99
  164. package/lib/static/roomle-core-hsc/embind/configuratorCoreInterface.js.map +0 -1
  165. package/lib/static/roomle-core-hsc/embind/configuratorUtils.d.ts +0 -3
  166. package/lib/static/roomle-core-hsc/embind/configuratorUtils.js +0 -52
  167. package/lib/static/roomle-core-hsc/embind/configuratorUtils.js.map +0 -1
  168. package/lib/static/roomle-core-hsc/embind/coreModue.d.ts +0 -4
  169. package/lib/static/roomle-core-hsc/embind/coreModue.js +0 -3
  170. package/lib/static/roomle-core-hsc/embind/coreModue.js.map +0 -1
  171. package/lib/static/roomle-core-hsc/embind/coreModule.d.ts +0 -11
  172. package/lib/static/roomle-core-hsc/embind/coreModule.js +0 -19
  173. package/lib/static/roomle-core-hsc/embind/coreModule.js.map +0 -1
  174. package/lib/static/roomle-core-hsc/embind/plannerCore.d.ts +0 -32
  175. package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.d.ts +0 -39
  176. package/lib/static/roomle-core-hsc/embind/plannerCoreCallback.js.map +0 -1
  177. package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.d.ts +0 -858
  178. package/lib/static/roomle-core-hsc/embind/plannerCoreInterface.js.map +0 -1
  179. package/lib/static/roomle-core-hsc/loader/configurableObject.js +0 -111
  180. package/lib/static/roomle-core-hsc/loader/configurableObject.js.map +0 -1
  181. package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.d.ts +0 -21
  182. package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.js +0 -90
  183. package/lib/static/roomle-core-hsc/loader/configurationGeometryConstructor.js.map +0 -1
  184. package/lib/static/roomle-core-hsc/loader/configurationLoader.d.ts +0 -116
  185. package/lib/static/roomle-core-hsc/loader/configurationLoader.js +0 -349
  186. package/lib/static/roomle-core-hsc/loader/configurationLoader.js.map +0 -1
  187. package/lib/static/roomle-core-hsc/loader/configurationManager.d.ts +0 -40
  188. package/lib/static/roomle-core-hsc/loader/configurationManager.js.map +0 -1
  189. package/lib/static/roomle-core-hsc/loader/planElementManager.d.ts +0 -96
  190. package/lib/static/roomle-core-hsc/loaderUtility.d.ts +0 -81
  191. package/lib/static/roomle-core-hsc/loaderUtility.js +0 -141
  192. package/lib/static/roomle-core-hsc/loaderUtility.js.map +0 -1
  193. package/lib/static/roomle-core-hsc/logger.d.ts +0 -29
  194. package/lib/static/roomle-core-hsc/logger.js +0 -61
  195. package/lib/static/roomle-core-hsc/logger.js.map +0 -1
  196. package/lib/static/roomle-core-hsc/package.json +0 -1
  197. package/lib/static/roomle-core-hsc/planElementManager.d.ts +0 -96
  198. package/lib/static/roomle-core-hsc/planElementManager.js +0 -300
  199. package/lib/static/roomle-core-hsc/planElementManager.js.map +0 -1
  200. package/lib/static/roomle-core-hsc/plannerCore.d.ts +0 -32
  201. package/lib/static/roomle-core-hsc/plannerCore.js +0 -111
  202. package/lib/static/roomle-core-hsc/plannerCore.js.map +0 -1
  203. package/lib/static/roomle-core-hsc/plannerCoreCallback.d.ts +0 -39
  204. package/lib/static/roomle-core-hsc/plannerCoreCallback.js +0 -116
  205. package/lib/static/roomle-core-hsc/plannerCoreCallback.js.map +0 -1
  206. package/lib/static/roomle-core-hsc/plannerCoreInterface.js +0 -98
  207. package/lib/static/roomle-core-hsc/plannerCoreInterface.js.map +0 -1
  208. package/lib/static/roomle-core-hsc/rapiAccess.d.ts +0 -70
  209. package/lib/static/roomle-core-hsc/rapiAccess.js +0 -227
  210. package/lib/static/roomle-core-hsc/rapiAccess.js.map +0 -1
  211. package/lib/static/roomle-core-hsc/serviceCore.d.ts +0 -20
  212. package/lib/static/roomle-core-hsc/serviceCore.js +0 -54
  213. package/lib/static/roomle-core-hsc/serviceCore.js.map +0 -1
  214. package/lib/static/roomle-core-hsc/serviceCoreInterface.d.ts +0 -13
  215. package/lib/static/roomle-core-hsc/serviceCoreInterface.js +0 -3
  216. package/lib/static/roomle-core-hsc/serviceCoreInterface.js.map +0 -1
  217. package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.d.ts +0 -82
  218. package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.js +0 -355
  219. package/lib/static/roomle-core-hsc/src/embind/configuratorCallback.js.map +0 -1
  220. package/lib/static/roomle-core-hsc/src/embind/configuratorCore.d.ts +0 -20
  221. package/lib/static/roomle-core-hsc/src/embind/configuratorCore.js +0 -50
  222. package/lib/static/roomle-core-hsc/src/embind/configuratorCore.js.map +0 -1
  223. package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +0 -753
  224. package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.js +0 -99
  225. package/lib/static/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +0 -1
  226. package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.d.ts +0 -3
  227. package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.js +0 -52
  228. package/lib/static/roomle-core-hsc/src/embind/configuratorUtils.js.map +0 -1
  229. package/lib/static/roomle-core-hsc/src/embind/coreModue.d.ts +0 -4
  230. package/lib/static/roomle-core-hsc/src/embind/coreModue.js +0 -3
  231. package/lib/static/roomle-core-hsc/src/embind/coreModue.js.map +0 -1
  232. package/lib/static/roomle-core-hsc/src/embind/coreModule.d.ts +0 -11
  233. package/lib/static/roomle-core-hsc/src/embind/coreModule.js +0 -19
  234. package/lib/static/roomle-core-hsc/src/embind/coreModule.js.map +0 -1
  235. package/lib/static/roomle-core-hsc/src/embind/plannerCore.js +0 -111
  236. package/lib/static/roomle-core-hsc/src/embind/plannerCore.js.map +0 -1
  237. package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.js +0 -116
  238. package/lib/static/roomle-core-hsc/src/embind/plannerCoreCallback.js.map +0 -1
  239. package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +0 -858
  240. package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js +0 -98
  241. package/lib/static/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +0 -1
  242. package/lib/static/roomle-core-hsc/src/embind/serviceCore.d.ts +0 -20
  243. package/lib/static/roomle-core-hsc/src/embind/serviceCore.js +0 -54
  244. package/lib/static/roomle-core-hsc/src/embind/serviceCore.js.map +0 -1
  245. package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.d.ts +0 -13
  246. package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.js +0 -3
  247. package/lib/static/roomle-core-hsc/src/embind/serviceCoreInterface.js.map +0 -1
  248. package/lib/static/roomle-core-hsc/src/embind/toolsCore.d.ts +0 -17
  249. package/lib/static/roomle-core-hsc/src/embind/toolsCore.js +0 -75
  250. package/lib/static/roomle-core-hsc/src/embind/toolsCore.js.map +0 -1
  251. package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.d.ts +0 -40
  252. package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.js +0 -8
  253. package/lib/static/roomle-core-hsc/src/embind/toolsCoreInterface.js.map +0 -1
  254. package/lib/static/roomle-core-hsc/src/loader/configurableObject.d.ts +0 -30
  255. package/lib/static/roomle-core-hsc/src/loader/configurableObject.js.map +0 -1
  256. package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.d.ts +0 -21
  257. package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.js +0 -90
  258. package/lib/static/roomle-core-hsc/src/loader/configurationGeometryConstructor.js.map +0 -1
  259. package/lib/static/roomle-core-hsc/src/loader/configurationLoader.d.ts +0 -116
  260. package/lib/static/roomle-core-hsc/src/loader/configurationLoader.js.map +0 -1
  261. package/lib/static/roomle-core-hsc/src/loader/configurationManager.d.ts +0 -40
  262. package/lib/static/roomle-core-hsc/src/loader/configurationManager.js +0 -141
  263. package/lib/static/roomle-core-hsc/src/loader/configurationManager.js.map +0 -1
  264. package/lib/static/roomle-core-hsc/src/loader/loaderUtility.d.ts +0 -81
  265. package/lib/static/roomle-core-hsc/src/loader/loaderUtility.js +0 -141
  266. package/lib/static/roomle-core-hsc/src/loader/loaderUtility.js.map +0 -1
  267. package/lib/static/roomle-core-hsc/src/loader/logger.d.ts +0 -29
  268. package/lib/static/roomle-core-hsc/src/loader/logger.js +0 -61
  269. package/lib/static/roomle-core-hsc/src/loader/logger.js.map +0 -1
  270. package/lib/static/roomle-core-hsc/src/loader/planElementManager.js +0 -300
  271. package/lib/static/roomle-core-hsc/src/loader/planElementManager.js.map +0 -1
  272. package/lib/static/roomle-core-hsc/src/loader/rapiAccess.d.ts +0 -70
  273. package/lib/static/roomle-core-hsc/src/loader/rapiAccess.js +0 -227
  274. package/lib/static/roomle-core-hsc/src/loader/rapiAccess.js.map +0 -1
  275. package/lib/static/roomle-core-hsc/toolsCore.d.ts +0 -17
  276. package/lib/static/roomle-core-hsc/toolsCore.js +0 -75
  277. package/lib/static/roomle-core-hsc/toolsCore.js.map +0 -1
  278. package/lib/static/roomle-core-hsc/toolsCoreInterface.d.ts +0 -40
  279. package/lib/static/roomle-core-hsc/toolsCoreInterface.js +0 -8
  280. package/lib/static/roomle-core-hsc/toolsCoreInterface.js.map +0 -1
  281. package/lib/static/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  282. package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  283. package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.js +0 -74
  284. package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  285. package/lib/stats-helper-UQlUyOTj.mjs +0 -108
  286. package/lib/stats-helper-UQlUyOTj.mjs.map +0 -1
  287. package/lib/three.webgpu-sHJcp001.mjs +0 -27625
  288. package/lib/three.webgpu-sHJcp001.mjs.map +0 -1
  289. package/lib/tools-core-wkPFRdnH.mjs +0 -36
  290. package/lib/tools-core-wkPFRdnH.mjs.map +0 -1
  291. /package/lib/static/draco/{README.md → node_modules/three/examples/jsm/libs/draco/README.md} +0 -0
  292. /package/lib/static/draco/{draco_decoder.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.js} +0 -0
  293. /package/lib/static/draco/{draco_decoder.wasm → node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.wasm} +0 -0
  294. /package/lib/static/draco/{draco_encoder.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_encoder.js} +0 -0
  295. /package/lib/static/draco/{draco_wasm_wrapper.js → node_modules/three/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.js} +0 -0
  296. /package/lib/static/{budgeteer.sw.js → packages/workers/generated/budgeteer.sw.js} +0 -0
  297. /package/lib/static/roomle-core-hsc/{configuratorCallback.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorCallback.d.ts} +0 -0
  298. /package/lib/static/roomle-core-hsc/{configuratorCallback.js → node_modules/roomle-core-hsc/src/embind/configuratorCallback.js} +0 -0
  299. /package/lib/static/roomle-core-hsc/{configuratorCallback.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCallback.js.map} +0 -0
  300. /package/lib/static/roomle-core-hsc/{configuratorCore.js → node_modules/roomle-core-hsc/src/embind/configuratorCore.js} +0 -0
  301. /package/lib/static/roomle-core-hsc/{configuratorCore.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCore.js.map} +0 -0
  302. /package/lib/static/roomle-core-hsc/{configuratorCoreInterface.js → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js} +0 -0
  303. /package/lib/static/roomle-core-hsc/{configuratorCoreInterface.js.map → node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map} +0 -0
  304. /package/lib/static/roomle-core-hsc/{configuratorUtils.d.ts → node_modules/roomle-core-hsc/src/embind/configuratorUtils.d.ts} +0 -0
  305. /package/lib/static/roomle-core-hsc/{configuratorUtils.js → node_modules/roomle-core-hsc/src/embind/configuratorUtils.js} +0 -0
  306. /package/lib/static/roomle-core-hsc/{configuratorUtils.js.map → node_modules/roomle-core-hsc/src/embind/configuratorUtils.js.map} +0 -0
  307. /package/lib/static/roomle-core-hsc/{coreModue.d.ts → node_modules/roomle-core-hsc/src/embind/coreModue.d.ts} +0 -0
  308. /package/lib/static/roomle-core-hsc/{coreModue.js → node_modules/roomle-core-hsc/src/embind/coreModue.js} +0 -0
  309. /package/lib/static/roomle-core-hsc/{coreModue.js.map → node_modules/roomle-core-hsc/src/embind/coreModue.js.map} +0 -0
  310. /package/lib/static/roomle-core-hsc/{coreModule.d.ts → node_modules/roomle-core-hsc/src/embind/coreModule.d.ts} +0 -0
  311. /package/lib/static/roomle-core-hsc/{coreModule.js → node_modules/roomle-core-hsc/src/embind/coreModule.js} +0 -0
  312. /package/lib/static/roomle-core-hsc/{coreModule.js.map → node_modules/roomle-core-hsc/src/embind/coreModule.js.map} +0 -0
  313. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCore.js +0 -0
  314. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/plannerCore.js.map +0 -0
  315. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.d.ts +0 -0
  316. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.js +0 -0
  317. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCore.js.map +0 -0
  318. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.d.ts +0 -0
  319. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.js +0 -0
  320. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/serviceCoreInterface.js.map +0 -0
  321. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.d.ts +0 -0
  322. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.js +0 -0
  323. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCore.js.map +0 -0
  324. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.d.ts +0 -0
  325. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.js +0 -0
  326. /package/lib/static/roomle-core-hsc/{embind → node_modules/roomle-core-hsc/src/embind}/toolsCoreInterface.js.map +0 -0
  327. /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.d.ts → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.d.ts} +0 -0
  328. /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.js → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.js} +0 -0
  329. /package/lib/static/roomle-core-hsc/{configurationGeometryConstructor.js.map → node_modules/roomle-core-hsc/src/loader/configurationGeometryConstructor.js.map} +0 -0
  330. /package/lib/static/roomle-core-hsc/{configurationLoader.d.ts → node_modules/roomle-core-hsc/src/loader/configurationLoader.d.ts} +0 -0
  331. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.d.ts +0 -0
  332. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.js +0 -0
  333. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/loaderUtility.js.map +0 -0
  334. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.d.ts +0 -0
  335. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.js +0 -0
  336. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/logger.js.map +0 -0
  337. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/planElementManager.js +0 -0
  338. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.d.ts +0 -0
  339. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.js +0 -0
  340. /package/lib/static/roomle-core-hsc/{loader → node_modules/roomle-core-hsc/src/loader}/rapiAccess.js.map +0 -0
  341. /package/lib/static/roomle-core-hsc/{RoomleToolsCore.js → node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.js} +0 -0
@@ -1,50 +0,0 @@
1
- import { ar as r, as as o, r as l } from "./index-C-Prfui2.mjs";
2
- const h = "" + new URL("banana.glb", import.meta.url).href;
3
- var d = Object.defineProperty, f = (s, n, a, i) => {
4
- for (var e = void 0, t = s.length - 1, c; t >= 0; t--)
5
- (c = s[t]) && (e = c(n, a, e) || e);
6
- return e && d(n, a, e), e;
7
- };
8
- class _ extends r {
9
- setScene(n) {
10
- this._scene = n, this._staticItemLoader.loadGLB(h).then((a) => {
11
- this._banana = a.scene, this.updateBounds(null);
12
- }), console.log(
13
- "%cBanana 3D model by https://sketchfab.com/daniel132",
14
- "color: #ffe135"
15
- ), console.log(
16
- "%cBanana source: https://sketchfab.com/3d-models/banana-mark-2-a7fef734bf4544cb8a780a858fa6af97",
17
- "color: #ffe135"
18
- ), console.log(
19
- "%cLicensed under Creative Commons 4.0: https://creativecommons.org/licenses/by/4.0/",
20
- "color: #ffe135"
21
- );
22
- }
23
- updateBounds(n) {
24
- if (n && (this._bounds = n), !!this._bounds) {
25
- if (this._banana) {
26
- const a = this._bounds.getSize(new o()), e = this._bounds.getCenter(new o()).clone();
27
- e.x -= a.x / 2 + 0.18, e.z += a.z / 2 + 0.05, e.y = 0;
28
- let t = 0.1;
29
- this._banana.scale.copy(new o(t, t, t)), this._banana.rotation.y = 0.6, this._banana.position.copy(e);
30
- }
31
- this._scene.children.includes(this._banana) || this.addToScene();
32
- }
33
- }
34
- clearScene(n, a) {
35
- super.clearScene(n, a), this.removeFromScene();
36
- }
37
- addToScene() {
38
- !this._scene || !this._banana || this._scene.add(this._banana);
39
- }
40
- removeFromScene() {
41
- !this._scene || !this._banana || this._scene.remove(this._banana);
42
- }
43
- }
44
- f([
45
- l
46
- ], _.prototype, "_staticItemLoader");
47
- export {
48
- _ as default
49
- };
50
- //# sourceMappingURL=banana-for-scale-C9_AyZkI.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"banana-for-scale-C9_AyZkI.mjs","sources":["../../packages/configurator-core/public/geometry/banana.glb?no-inline?url","../../packages/configurator-core/src/webgl/banana-for-scale.ts"],"sourcesContent":["export default \"__VITE_ASSET__CEZkpbOl__\"","import inject from '../../../common-core/src/di/inject';\nimport type StaticItemLoader from '../../../common-core/src/webgl/static-item-loader';\nimport { ScenePluginDefaultImplementation } from './plugin-system';\nimport { BANANA_FILE_NAME } from '../static-files/geometries';\nimport type { Box3, Object3D, Scene } from 'three';\nimport { Vector3 } from 'three';\n\nexport default class BananaForScale extends ScenePluginDefaultImplementation {\n private _scene: Scene;\n private _bounds: Box3;\n private _banana: Object3D;\n\n @inject\n private _staticItemLoader: StaticItemLoader;\n\n public setScene(scene: Scene) {\n this._scene = scene;\n\n this._staticItemLoader.loadGLB(BANANA_FILE_NAME).then((glb) => {\n this._banana = glb.scene;\n this.updateBounds(null);\n });\n\n console.log(\n '%c' + 'Banana 3D model by https://sketchfab.com/daniel132',\n 'color: #ffe135',\n );\n console.log(\n '%c' +\n 'Banana source: https://sketchfab.com/3d-models/banana-mark-2-a7fef734bf4544cb8a780a858fa6af97',\n 'color: #ffe135',\n );\n console.log(\n '%c' +\n 'Licensed under Creative Commons 4.0: https://creativecommons.org/licenses/by/4.0/',\n 'color: #ffe135',\n );\n }\n\n public updateBounds(bounds: Box3) {\n if (bounds) {\n this._bounds = bounds;\n }\n if (!this._bounds) {\n return;\n }\n if (this._banana) {\n const size = this._bounds.getSize(new Vector3());\n const center = this._bounds.getCenter(new Vector3());\n const position = center.clone();\n position.x -= size.x / 2 + 0.18;\n position.z += size.z / 2 + 0.05;\n position.y = 0;\n let scale = 0.1;\n this._banana.scale.copy(new Vector3(scale, scale, scale));\n this._banana.rotation.y = 0.6;\n this._banana.position.copy(position);\n }\n if (!this._scene.children.includes(this._banana)) {\n this.addToScene();\n }\n }\n\n public clearScene(scene: Scene, uiScene: Scene): void {\n super.clearScene(scene, uiScene);\n\n this.removeFromScene();\n }\n\n public addToScene(): void {\n if (!this._scene || !this._banana) {\n return;\n }\n this._scene.add(this._banana);\n }\n\n public removeFromScene(): void {\n if (!this._scene || !this._banana) {\n return;\n }\n this._scene.remove(this._banana);\n }\n}\n"],"names":["BANANA_FILE_NAME","BananaForScale","ScenePluginDefaultImplementation","scene","glb","bounds","size","Vector3","position","scale","uiScene","__decorateClass","inject"],"mappings":";AAAA,MAAAA,IAAe;;;;;;ACOf,MAAqBC,UAAuBC,EAAiC;AAAA,EAQpE,SAASC,GAAc;AAC5B,SAAK,SAASA,GAEd,KAAK,kBAAkB,QAAQH,CAAgB,EAAE,KAAK,CAACI,MAAQ;AAC7D,WAAK,UAAUA,EAAI,OACnB,KAAK,aAAa,IAAI;AAAA,IACxB,CAAC,GAED,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,IAAA,GAEF,QAAQ;AAAA,MACN;AAAA,MAEA;AAAA,IAAA,GAEF,QAAQ;AAAA,MACN;AAAA,MAEA;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEO,aAAaC,GAAc;AAIhC,QAHIA,MACF,KAAK,UAAUA,IAEb,EAAC,KAAK,SAGV;AAAA,UAAI,KAAK,SAAS;AAChB,cAAMC,IAAO,KAAK,QAAQ,QAAQ,IAAIC,GAAS,GAEzCC,IADS,KAAK,QAAQ,UAAU,IAAID,GAAS,EAC3B,MAAA;AACxB,QAAAC,EAAS,KAAKF,EAAK,IAAI,IAAI,MAC3BE,EAAS,KAAKF,EAAK,IAAI,IAAI,MAC3BE,EAAS,IAAI;AACb,YAAIC,IAAQ;AACZ,aAAK,QAAQ,MAAM,KAAK,IAAIF,EAAQE,GAAOA,GAAOA,CAAK,CAAC,GACxD,KAAK,QAAQ,SAAS,IAAI,KAC1B,KAAK,QAAQ,SAAS,KAAKD,CAAQ;AAAA,MACrC;AACA,MAAK,KAAK,OAAO,SAAS,SAAS,KAAK,OAAO,KAC7C,KAAK,WAAA;AAAA;AAAA,EAET;AAAA,EAEO,WAAWL,GAAcO,GAAsB;AACpD,UAAM,WAAWP,GAAOO,CAAO,GAE/B,KAAK,gBAAA;AAAA,EACP;AAAA,EAEO,aAAmB;AACxB,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,WAG1B,KAAK,OAAO,IAAI,KAAK,OAAO;AAAA,EAC9B;AAAA,EAEO,kBAAwB;AAC7B,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,WAG1B,KAAK,OAAO,OAAO,KAAK,OAAO;AAAA,EACjC;AACF;AArEUC,EAAA;AAAA,EADPC;AAAA,GALkBX,EAMX,WAAA,mBAAA;"}
@@ -1,229 +0,0 @@
1
- import { at as M, au as S, as as n, av as W, aw as v, ax as C, ay as x, az as p, aA as y, aB as w, aC as E, aD as P, aE as u, r as g } from "./index-C-Prfui2.mjs";
2
- var j = Object.defineProperty, T = (m, t, e, i) => {
3
- for (var a = void 0, l = m.length - 1, s; l >= 0; l--)
4
- (s = m[l]) && (a = s(t, e, a) || a);
5
- return a && j(t, e, a), a;
6
- };
7
- const L = "component_dimensioning_line_material", F = 0.025, I = 0.05;
8
- class c {
9
- constructor(t, e, i) {
10
- this._direction = c._getDirection(t);
11
- const a = c._getDefaultLabelDirection(
12
- t,
13
- this._direction
14
- ), l = i.dot(a) >= 0;
15
- this._labelDirection = c._calculateActualLabelDirection(
16
- t,
17
- l,
18
- a
19
- ), this._origin = c._calculateOrigin(
20
- t,
21
- e,
22
- l
23
- );
24
- }
25
- get direction() {
26
- return this._direction;
27
- }
28
- get labelDirection() {
29
- return this._labelDirection;
30
- }
31
- getEdge(t, e, i) {
32
- const a = this._origin.clone().add(this._direction.clone().multiplyScalar(t)).add(this._labelDirection.clone().multiplyScalar(i)), l = this._origin.clone().add(this._direction.clone().multiplyScalar(e)).add(this._labelDirection.clone().multiplyScalar(i));
33
- return new P(a, l);
34
- }
35
- static _getDirection(t) {
36
- return t.axis ? u(t.axis.direction).normalize() : t.dimensioning.axis === "x" ? new n(1, 0, 0) : t.dimensioning.axis === "y" ? new n(0, 0, 1) : new n(0, 1, 0);
37
- }
38
- static _getDefaultLabelDirection(t, e) {
39
- if (t.axis) {
40
- const i = u(
41
- t.axis.labelDirection
42
- );
43
- return e.clone().cross(i).cross(e).normalize();
44
- } else {
45
- if (t.dimensioning.axis === "x")
46
- return new n(0, 1, 0);
47
- if (t.dimensioning.axis === "y")
48
- return new n(-1, 0, 0);
49
- }
50
- return new n(-1, 0, 0);
51
- }
52
- static _calculateActualLabelDirection(t, e, i) {
53
- if (e) {
54
- if (t.axis) {
55
- if (t.axis.alternativeOrigin)
56
- return i.clone().multiplyScalar(-1);
57
- } else if (t.dimensioning.axis === "y" || t.dimensioning.axis === "z")
58
- return i.clone().multiplyScalar(-1);
59
- }
60
- return i;
61
- }
62
- static _calculateOrigin(t, e, i) {
63
- const a = e.getCenter(new n()), l = e.getSize(new n());
64
- return t.axis ? i && t.axis.alternativeOrigin ? u(t.axis.alternativeOrigin) : u(t.axis.origin) : t.dimensioning.axis === "x" ? new n(0, a.y + l.y * 0.5, a.z - l.z * 0.5) : t.dimensioning.axis === "y" ? new n(
65
- a.x + l.x * (i ? 0.5 : -0.5),
66
- a.y - l.y * 0.5,
67
- 0
68
- ) : new n(
69
- a.x + l.x * (i ? 0.5 : -0.5),
70
- 0,
71
- a.z - l.z * 0.5
72
- );
73
- }
74
- }
75
- class z extends M {
76
- constructor(t, e, i, a) {
77
- super(), this._camera = null, this._mainLineObject = null, this._labelText = null, this.name = S, this._font = a || null, this._size = e.getSize(new n()), this._dimensioning = W(
78
- t.dimensioning
79
- ), this._axis = new c(
80
- t,
81
- e,
82
- i
83
- ), this._level = this._dimensioning.maxLevel - this._dimensioning.level, this._init();
84
- }
85
- clone() {
86
- console.warn("Will not clone ComponentDimensioning");
87
- }
88
- setCamera(t) {
89
- this._camera = t, this._textLabel && this._updateLabelOrientation();
90
- }
91
- _initMaterials() {
92
- this._cacheHolder.materialCache && (this._cacheHolder.materialCache.has(L) ? this._lineMaterial = this._cacheHolder.materialCache.get(
93
- L
94
- ) : (this._lineMaterial = new v({
95
- color: C
96
- }), this._cacheHolder.materialCache.set(L, this._lineMaterial)));
97
- }
98
- _init() {
99
- this._initMaterials();
100
- const t = Math.round(
101
- Math.max(this._size.y, this._size.x, this._size.z)
102
- ), e = Math.abs(this._dimensioning.to - this._dimensioning.from);
103
- let i = F + (t < 4 ? 0 : t * 5e-3);
104
- e < 0.3 && (i *= 0.5 + e);
105
- const a = i * 1.4, l = I + (3 * x + a) * this._level, s = this._axis.getEdge(
106
- this._dimensioning.from,
107
- this._dimensioning.to,
108
- l
109
- );
110
- this._addEdgeSideLines(
111
- a,
112
- s,
113
- this._axis.labelDirection.clone()
114
- );
115
- const r = new p(), h = [
116
- s.start.x,
117
- s.start.y,
118
- s.start.z,
119
- s.end.x,
120
- s.end.y,
121
- s.end.z
122
- ];
123
- r.setAttribute(
124
- "position",
125
- new y(new Float32Array(h), 3)
126
- );
127
- const o = new w(r, this._lineMaterial);
128
- if (o.name = "component dimension line " + this._dimensioning.axis, o.renderOrder = 0, this._mainLineObject = o, this.add(o), this._font) {
129
- const d = Math.abs(this._dimensioning.to - this._dimensioning.from);
130
- this._labelText = this._unitFormatter.formatMMValueToUnitString(
131
- d * 1e3
132
- ), this._textLabel = new E(this._font), this._textLabel.userData.isLabel = !0, this._textLabel.renderOrder = 1, this.add(this._textLabel);
133
- }
134
- }
135
- // Get the world position center of the main dimension line (same logic as getDimensionLineCenter)
136
- _getMainLineCenterWorldPosition() {
137
- if (!this._mainLineObject)
138
- return null;
139
- this.updateMatrixWorld(!0), this._mainLineObject.updateMatrixWorld(!0);
140
- const t = this._mainLineObject.geometry.attributes.position.array;
141
- if (t.length < 6)
142
- return null;
143
- const e = new n(t[0], t[1], t[2]), i = new n(t[3], t[4], t[5]);
144
- return e.applyMatrix4(this._mainLineObject.matrixWorld), i.applyMatrix4(this._mainLineObject.matrixWorld), e.clone().add(i).multiplyScalar(0.5);
145
- }
146
- _updateLabelOrientation() {
147
- if (!this._textLabel || !this._camera || !this._labelText)
148
- return;
149
- const t = new n();
150
- this._camera.getWorldDirection(t);
151
- const e = new n();
152
- this._camera.getWorldPosition(e);
153
- const i = this._mainLineObject.geometry.attributes.position.array, a = new n(i[0], i[1], i[2]), l = new n(i[3], i[4], i[5]), s = a.clone().add(l).multiplyScalar(0.5), r = this.localToWorld(s.clone()), h = e.clone().sub(r).normalize(), o = this.worldToLocal(
154
- this.localToWorld(new n()).add(h)
155
- ).sub(this.worldToLocal(this.localToWorld(new n()))), d = s.clone().add(o.multiplyScalar(2e-3));
156
- if (Math.abs(t.y) > 0.95) {
157
- const O = l.clone().sub(a), _ = this.localToWorld(O.clone()).sub(
158
- this.localToWorld(new n())
159
- );
160
- _.y = 0, _.normalize();
161
- const f = e.clone();
162
- f.y = r.y;
163
- const b = f.clone().sub(r);
164
- b.y = 0, b.normalize(), _.dot(b) < 0 && _.multiplyScalar(-1);
165
- const D = r.clone().add(_.multiplyScalar(0.01)).add(new n(0, 1, 0));
166
- this._textLabel.update(d, this._labelText, D);
167
- } else
168
- this._textLabel.update(d, this._labelText, e);
169
- }
170
- initializeTextLabels() {
171
- if (!(!this._font || !this._labelText || !this._textLabel) && !this._textLabel.children.length)
172
- try {
173
- if (this.updateMatrixWorld(!0), this._camera)
174
- this._updateLabelOrientation();
175
- else {
176
- const t = this._getMainLineCenterWorldPosition();
177
- if (t) {
178
- const e = this.worldToLocal(t.clone());
179
- this._textLabel.position.copy(e);
180
- const i = new n(0, 0, 1);
181
- e.add(new n(0, 0, 2e-3)), this._textLabel.update(
182
- e,
183
- this._labelText,
184
- i
185
- );
186
- }
187
- }
188
- } catch (t) {
189
- console.warn("Failed to initialize text label for dimension:", t), this._textLabel && (this.remove(this._textLabel), this._textLabel = null);
190
- }
191
- }
192
- updateLabelForCamera(t) {
193
- this._textLabel && (this._camera = t, this._textLabel.children.length ? this._updateLabelOrientation() : this.initializeTextLabels());
194
- }
195
- _addEdgeSideLines(t, e, i) {
196
- const a = -(3 * x + t) * 0.5, l = e.start.clone(), s = e.start.clone().add(i.clone().multiplyScalar(a)), r = e.end.clone(), h = e.end.clone().add(i.clone().multiplyScalar(a));
197
- this._addLine(s, l), this._addLine(h, r);
198
- }
199
- _addLine(t, e) {
200
- const i = new p(), a = [t.x, t.y, t.z, e.x, e.y, e.z];
201
- i.setAttribute(
202
- "position",
203
- new y(new Float32Array(a), 3)
204
- );
205
- const l = new w(i, this._lineMaterial);
206
- l.renderOrder = 0, this.add(l);
207
- }
208
- dispose() {
209
- if (this._textLabel) {
210
- try {
211
- this._textLabel.dispose();
212
- } catch (t) {
213
- console.warn("Error disposing text label:", t);
214
- }
215
- this._textLabel = null;
216
- }
217
- this._mainLineObject = null, this._labelText = null, this._camera = null;
218
- }
219
- }
220
- T([
221
- g
222
- ], z.prototype, "_cacheHolder");
223
- T([
224
- g
225
- ], z.prototype, "_unitFormatter");
226
- export {
227
- z as default
228
- };
229
- //# sourceMappingURL=component-dimensioning-DHTSa-If.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-dimensioning-DHTSa-If.mjs","sources":["../../packages/configurator-core/src/utils/component-dimensioning.ts"],"sourcesContent":["import type CacheHolder from '../../../common-core/src/services/cache-holder';\nimport type UnitFormatter from '../services/unit-formatter';\nimport type { Dimensioning, DimensioningAxis } from '../../../typings/kernel';\n\nimport type { Box3, Camera } from 'three';\nimport {\n BufferAttribute,\n BufferGeometry,\n Line,\n Line3,\n LineBasicMaterial,\n Object3D,\n Vector3,\n} from 'three';\nimport { kernelDimensioningToThree } from '../../../common-core/src/utils/threejs-utils';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport { DIMENSIONING_GEOMETRY } from './dimensioning-helper';\nimport type { Font } from 'three/examples/jsm/loaders/FontLoader.js';\nimport TextWithBackground, {\n TEXT_COLOR,\n TEXT_SPACING,\n} from './text-with-background';\nimport inject from '../../../common-core/src/di/inject';\n\nconst LINE_MATERIAL = 'component_dimensioning_line_material';\n\nconst TEXT_SIZE = 0.025;\nconst LINE_SPACING = 0.05;\n\nexport interface DimensioningAndAxis {\n dimensioning: Dimensioning;\n axis?: DimensioningAxis;\n}\n\nclass ComponentDimensioningAxis {\n private _origin: Vector3;\n private _direction: Vector3;\n private _labelDirection: Vector3;\n\n constructor(\n dimensioningAndAxis: DimensioningAndAxis,\n boundingBox: Box3,\n cameraPosition: Vector3,\n ) {\n this._direction =\n ComponentDimensioningAxis._getDirection(dimensioningAndAxis);\n const defaultLabelDirection =\n ComponentDimensioningAxis._getDefaultLabelDirection(\n dimensioningAndAxis,\n this._direction,\n );\n const lookAtOppositeSide = cameraPosition.dot(defaultLabelDirection) >= 0;\n this._labelDirection =\n ComponentDimensioningAxis._calculateActualLabelDirection(\n dimensioningAndAxis,\n lookAtOppositeSide,\n defaultLabelDirection,\n );\n this._origin = ComponentDimensioningAxis._calculateOrigin(\n dimensioningAndAxis,\n boundingBox,\n lookAtOppositeSide,\n );\n }\n\n get direction(): Vector3 {\n return this._direction;\n }\n\n get labelDirection(): Vector3 {\n return this._labelDirection;\n }\n\n getEdge(from: number, to: number, lineOffset: number): Line3 {\n const start = this._origin\n .clone()\n .add(this._direction.clone().multiplyScalar(from))\n .add(this._labelDirection.clone().multiplyScalar(lineOffset));\n const end = this._origin\n .clone()\n .add(this._direction.clone().multiplyScalar(to))\n .add(this._labelDirection.clone().multiplyScalar(lineOffset));\n return new Line3(start, end);\n }\n\n private static _getDirection(\n dimensioningAndAxis: DimensioningAndAxis,\n ): Vector3 {\n if (dimensioningAndAxis.axis) {\n return convertToTHREE(dimensioningAndAxis.axis.direction).normalize();\n } else if (dimensioningAndAxis.dimensioning.axis === 'x') {\n return new Vector3(1, 0, 0);\n } else if (dimensioningAndAxis.dimensioning.axis === 'y') {\n return new Vector3(0, 0, 1);\n }\n return new Vector3(0, 1, 0);\n }\n\n private static _getDefaultLabelDirection(\n dimensioningAndAxis: DimensioningAndAxis,\n direction: Vector3,\n ): Vector3 {\n if (dimensioningAndAxis.axis) {\n const labelDirection = convertToTHREE(\n dimensioningAndAxis.axis.labelDirection,\n );\n const planeNormal = direction.clone().cross(labelDirection);\n return planeNormal.cross(direction).normalize();\n } else if (dimensioningAndAxis.dimensioning.axis === 'x') {\n return new Vector3(0, 1, 0);\n } else if (dimensioningAndAxis.dimensioning.axis === 'y') {\n return new Vector3(-1, 0, 0);\n }\n return new Vector3(-1, 0, 0);\n }\n\n private static _calculateActualLabelDirection(\n dimensioningAndAxis: DimensioningAndAxis,\n lookAtOppositeSide: boolean,\n labelDirection: Vector3,\n ): Vector3 {\n if (lookAtOppositeSide) {\n if (dimensioningAndAxis.axis) {\n if (dimensioningAndAxis.axis.alternativeOrigin) {\n return labelDirection.clone().multiplyScalar(-1);\n }\n } else if (\n dimensioningAndAxis.dimensioning.axis === 'y' ||\n dimensioningAndAxis.dimensioning.axis === 'z'\n ) {\n return labelDirection.clone().multiplyScalar(-1);\n }\n }\n return labelDirection;\n }\n\n private static _calculateOrigin(\n dimensioningAndAxis: DimensioningAndAxis,\n boundingBox: Box3,\n lookAtOppositeSide: boolean,\n ): Vector3 {\n const center = boundingBox.getCenter(new Vector3());\n const size = boundingBox.getSize(new Vector3());\n if (dimensioningAndAxis.axis) {\n return lookAtOppositeSide && dimensioningAndAxis.axis.alternativeOrigin\n ? convertToTHREE(dimensioningAndAxis.axis.alternativeOrigin)\n : convertToTHREE(dimensioningAndAxis.axis.origin);\n } else if (dimensioningAndAxis.dimensioning.axis === 'x') {\n return new Vector3(0, center.y + size.y * 0.5, center.z - size.z * 0.5);\n } else if (dimensioningAndAxis.dimensioning.axis === 'y') {\n return new Vector3(\n center.x + size.x * (lookAtOppositeSide ? 0.5 : -0.5),\n center.y - size.y * 0.5,\n 0,\n );\n }\n return new Vector3(\n center.x + size.x * (lookAtOppositeSide ? 0.5 : -0.5),\n 0,\n center.z - size.z * 0.5,\n );\n }\n}\n\nexport default class ComponentDimensioning extends Object3D {\n @inject\n private _cacheHolder: CacheHolder;\n\n @inject\n private _unitFormatter: UnitFormatter;\n\n private _dimensioning: Dimensioning;\n private _axis: ComponentDimensioningAxis;\n private _size: Vector3;\n\n private _level: number;\n private _lineMaterial: LineBasicMaterial;\n private _font: Font;\n\n private _textLabel: TextWithBackground;\n private _camera: Camera | null = null;\n\n private _mainLineObject: Line | null = null;\n private _labelText: string | null = null;\n\n constructor(\n dimensioningAndAxis: DimensioningAndAxis,\n boundingBox: Box3,\n relativeCameraDirection: Vector3,\n font?: Font,\n ) {\n super();\n this.name = DIMENSIONING_GEOMETRY;\n\n this._font = font || null;\n\n this._size = boundingBox.getSize(new Vector3());\n this._dimensioning = kernelDimensioningToThree(\n dimensioningAndAxis.dimensioning,\n );\n this._axis = new ComponentDimensioningAxis(\n dimensioningAndAxis,\n boundingBox,\n relativeCameraDirection,\n );\n this._level = this._dimensioning.maxLevel - this._dimensioning.level;\n\n this._init();\n }\n\n clone() {\n // We do not clone ComponentDimensioning because this can break the\n // generation of perspective images. If the ComponentDimensioning is\n // visible during the generation of the perspective image, three.js\n // tries to clone it but clone does not give any parameters to the\n // constructor and therefore the clone breaks. Since we do not need\n // to clone ComponentDimensioning, we return undefined\n console.warn('Will not clone ComponentDimensioning');\n return undefined as any;\n }\n\n public setCamera(camera: Camera): void {\n this._camera = camera;\n if (this._textLabel) {\n this._updateLabelOrientation();\n }\n }\n\n private _initMaterials() {\n if (!this._cacheHolder.materialCache) {\n return;\n }\n\n if (this._cacheHolder.materialCache.has(LINE_MATERIAL)) {\n this._lineMaterial = this._cacheHolder.materialCache.get(\n LINE_MATERIAL,\n ) as LineBasicMaterial;\n } else {\n this._lineMaterial = new LineBasicMaterial({\n color: TEXT_COLOR,\n });\n this._cacheHolder.materialCache.set(LINE_MATERIAL, this._lineMaterial);\n }\n }\n\n private _init() {\n this._initMaterials();\n\n const maxSize = Math.round(\n Math.max(this._size.y, this._size.x, this._size.z),\n );\n const length = Math.abs(this._dimensioning.to - this._dimensioning.from);\n\n let fontSize = TEXT_SIZE + (maxSize < 4 ? 0 : maxSize * 0.005);\n if (length < 0.3) {\n fontSize *= 0.5 + length;\n }\n\n // Approximate text height for spacing calculations\n // Based on typical font metrics (height is roughly 1.4x the font size)\n const levelSpacing = fontSize * 1.4;\n\n const lineOffset =\n LINE_SPACING + (3 * TEXT_SPACING + levelSpacing) * this._level;\n\n const line = this._axis.getEdge(\n this._dimensioning.from,\n this._dimensioning.to,\n lineOffset,\n );\n\n this._addEdgeSideLines(\n levelSpacing,\n line,\n this._axis.labelDirection.clone(),\n );\n\n const lineGeometry = new BufferGeometry();\n const vertices = [\n line.start.x,\n line.start.y,\n line.start.z,\n line.end.x,\n line.end.y,\n line.end.z,\n ];\n lineGeometry.setAttribute(\n 'position',\n new BufferAttribute(new Float32Array(vertices), 3),\n );\n\n const lineObject = new Line(lineGeometry, this._lineMaterial);\n lineObject.name = 'component dimension line ' + this._dimensioning.axis;\n lineObject.renderOrder = 0;\n\n this._mainLineObject = lineObject;\n\n this.add(lineObject);\n\n if (this._font) {\n const length = Math.abs(this._dimensioning.to - this._dimensioning.from);\n this._labelText = this._unitFormatter.formatMMValueToUnitString(\n length * 1000,\n );\n\n this._textLabel = new TextWithBackground(this._font);\n this._textLabel.userData.isLabel = true;\n\n this._textLabel.renderOrder = 1;\n\n this.add(this._textLabel);\n }\n }\n\n // Get the world position center of the main dimension line (same logic as getDimensionLineCenter)\n private _getMainLineCenterWorldPosition(): Vector3 | null {\n if (!this._mainLineObject) {\n return null;\n }\n\n this.updateMatrixWorld(true);\n this._mainLineObject.updateMatrixWorld(true);\n\n const positions = this._mainLineObject.geometry.attributes.position.array;\n\n if (positions.length < 6) {\n return null;\n }\n\n const start = new Vector3(positions[0], positions[1], positions[2]);\n const end = new Vector3(positions[3], positions[4], positions[5]);\n\n start.applyMatrix4(this._mainLineObject.matrixWorld);\n end.applyMatrix4(this._mainLineObject.matrixWorld);\n\n return start.clone().add(end).multiplyScalar(0.5);\n }\n\n private _updateLabelOrientation(): void {\n if (!this._textLabel || !this._camera || !this._labelText) {\n return;\n }\n\n const cameraDir = new Vector3();\n this._camera.getWorldDirection(cameraDir);\n const cameraWorldPos = new Vector3();\n this._camera.getWorldPosition(cameraWorldPos);\n\n const positions = this._mainLineObject.geometry.attributes.position.array;\n const start = new Vector3(positions[0], positions[1], positions[2]);\n const end = new Vector3(positions[3], positions[4], positions[5]);\n const labelPosition = start.clone().add(end).multiplyScalar(0.5);\n const labelWorldPos = this.localToWorld(labelPosition.clone());\n\n const toCameraWorld = cameraWorldPos.clone().sub(labelWorldPos).normalize();\n const toCameraLocal = this.worldToLocal(\n this.localToWorld(new Vector3()).add(toCameraWorld),\n ).sub(this.worldToLocal(this.localToWorld(new Vector3())));\n\n const offsetPosition = labelPosition\n .clone()\n .add(toCameraLocal.multiplyScalar(0.002));\n\n const isTopDown = Math.abs(cameraDir.y) > 0.95;\n\n if (isTopDown) {\n const lineDir = end.clone().sub(start);\n const lineDirWorld = this.localToWorld(lineDir.clone()).sub(\n this.localToWorld(new Vector3()),\n );\n lineDirWorld.y = 0;\n lineDirWorld.normalize();\n\n const cameraFlat = cameraWorldPos.clone();\n cameraFlat.y = labelWorldPos.y;\n\n const toCameraFlat = cameraFlat.clone().sub(labelWorldPos);\n toCameraFlat.y = 0;\n toCameraFlat.normalize();\n\n const shouldFlip = lineDirWorld.dot(toCameraFlat) < 0;\n if (shouldFlip) {\n lineDirWorld.multiplyScalar(-1);\n }\n\n const pseudoCameraPos = labelWorldPos\n .clone()\n .add(lineDirWorld.multiplyScalar(0.01))\n .add(new Vector3(0, 1, 0));\n\n this._textLabel.update(offsetPosition, this._labelText, pseudoCameraPos);\n } else {\n this._textLabel.update(offsetPosition, this._labelText, cameraWorldPos);\n }\n }\n\n public initializeTextLabels(): void {\n if (!this._font || !this._labelText || !this._textLabel) {\n return;\n }\n\n if (this._textLabel.children.length) {\n return;\n }\n\n try {\n this.updateMatrixWorld(true);\n\n if (this._camera) {\n this._updateLabelOrientation();\n } else {\n const labelWorldPos = this._getMainLineCenterWorldPosition();\n if (labelWorldPos) {\n const labelLocalPos = this.worldToLocal(labelWorldPos.clone());\n this._textLabel.position.copy(labelLocalPos);\n const defaultCameraDir = new Vector3(0, 0, 1);\n labelLocalPos.add(new Vector3(0, 0, 0.002));\n this._textLabel.update(\n labelLocalPos,\n this._labelText,\n defaultCameraDir,\n );\n }\n }\n } catch (error) {\n console.warn('Failed to initialize text label for dimension:', error);\n if (this._textLabel) {\n this.remove(this._textLabel);\n this._textLabel = null;\n }\n }\n }\n\n public updateLabelForCamera(camera: Camera): void {\n if (!this._textLabel) {\n return;\n }\n\n this._camera = camera;\n\n if (!this._textLabel.children.length) {\n this.initializeTextLabels();\n } else {\n this._updateLabelOrientation();\n }\n }\n\n private _addEdgeSideLines(\n levelSpacing: number,\n line: Line3,\n labelDirection: Vector3,\n ) {\n const sideOffset = -(3 * TEXT_SPACING + levelSpacing) * 0.5;\n const endFrom = line.start.clone();\n const startFrom = line.start\n .clone()\n .add(labelDirection.clone().multiplyScalar(sideOffset));\n const endTo = line.end.clone();\n const startTo = line.end\n .clone()\n .add(labelDirection.clone().multiplyScalar(sideOffset));\n this._addLine(startFrom, endFrom);\n this._addLine(startTo, endTo);\n }\n\n private _addLine(start: Vector3, end: Vector3) {\n const lineGeometry = new BufferGeometry();\n const vertices = [start.x, start.y, start.z, end.x, end.y, end.z];\n lineGeometry.setAttribute(\n 'position',\n new BufferAttribute(new Float32Array(vertices), 3),\n );\n const line = new Line(lineGeometry, this._lineMaterial);\n line.renderOrder = 0;\n this.add(line);\n }\n\n public dispose() {\n if (this._textLabel) {\n try {\n this._textLabel.dispose();\n } catch (error) {\n console.warn('Error disposing text label:', error);\n }\n this._textLabel = null;\n }\n this._mainLineObject = null;\n this._labelText = null;\n this._camera = null;\n }\n}\n"],"names":["LINE_MATERIAL","TEXT_SIZE","LINE_SPACING","ComponentDimensioningAxis","dimensioningAndAxis","boundingBox","cameraPosition","defaultLabelDirection","lookAtOppositeSide","from","to","lineOffset","start","end","Line3","convertToTHREE","Vector3","direction","labelDirection","center","size","ComponentDimensioning","Object3D","relativeCameraDirection","font","DIMENSIONING_GEOMETRY","kernelDimensioningToThree","camera","LineBasicMaterial","TEXT_COLOR","maxSize","length","fontSize","levelSpacing","TEXT_SPACING","line","lineGeometry","BufferGeometry","vertices","BufferAttribute","lineObject","Line","TextWithBackground","positions","cameraDir","cameraWorldPos","labelPosition","labelWorldPos","toCameraWorld","toCameraLocal","offsetPosition","lineDir","lineDirWorld","cameraFlat","toCameraFlat","pseudoCameraPos","labelLocalPos","defaultCameraDir","error","sideOffset","endFrom","startFrom","endTo","startTo","__decorateClass","inject"],"mappings":";;;;;;AAwBA,MAAMA,IAAgB,wCAEhBC,IAAY,OACZC,IAAe;AAOrB,MAAMC,EAA0B;AAAA,EAK9B,YACEC,GACAC,GACAC,GACA;AACA,SAAK,aACHH,EAA0B,cAAcC,CAAmB;AAC7D,UAAMG,IACJJ,EAA0B;AAAA,MACxBC;AAAA,MACA,KAAK;AAAA,IAAA,GAEHI,IAAqBF,EAAe,IAAIC,CAAqB,KAAK;AACxE,SAAK,kBACHJ,EAA0B;AAAA,MACxBC;AAAA,MACAI;AAAA,MACAD;AAAA,IAAA,GAEJ,KAAK,UAAUJ,EAA0B;AAAA,MACvCC;AAAA,MACAC;AAAA,MACAG;AAAA,IAAA;AAAA,EAEJ;AAAA,EAEA,IAAI,YAAqB;AACvB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,iBAA0B;AAC5B,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,QAAQC,GAAcC,GAAYC,GAA2B;AAC3D,UAAM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AAIjB,EAAe,MAAA,EAAQ,eAAeyC,CAAU,CAAC,GAClDG,IAAQ3B,EAAK,IAAI,MAAA,GACjB4B,IAAU5B,EAAK,IAClB,MAAA,EACA,IAAIjB,EAAe,MAAA,EAAQ,eAAeyC,CAAU,CAAC;AACxD,SAAK,SAASE,GAAWD,CAAO,GAChC,KAAK,SAASG,GAASD,CAAK;AAAA,EAC9B;AAAA,EAEQ,SAASlD,GAAgBC,GAAc;AAC7C,UAAMuB,IAAe,IAAIC,EAAA,GACnBC,IAAW,CAAC1B,EAAM,GAAGA,EAAM,GAAGA,EAAM,GAAGC,EAAI,GAAGA,EAAI,GAAGA,EAAI,CAAC;AAChE,IAAAuB,EAAa;AAAA,MACX;AAAA,MACA,IAAIG,EAAgB,IAAI,aAAaD,CAAQ,GAAG,CAAC;AAAA,IAAA;AAEnD,UAAMH,IAAO,IAAIM,EAAKL,GAAc,KAAK,aAAa;AACtD,IAAAD,EAAK,cAAc,GACnB,KAAK,IAAIA,CAAI;AAAA,EACf;AAAA,EAEO,UAAU;AACf,QAAI,KAAK,YAAY;AACnB,UAAI;AACF,aAAK,WAAW,QAAA;AAAA,MAClB,SAASuB,GAAO;AACd,gBAAQ,KAAK,+BAA+BA,CAAK;AAAA,MACnD;AACA,WAAK,aAAa;AAAA,IACpB;AACA,SAAK,kBAAkB,MACvB,KAAK,aAAa,MAClB,KAAK,UAAU;AAAA,EACjB;AACF;AApUUM,EAAA;AAAA,EADPC;AAAA,GADkB5C,EAEX,WAAA,cAAA;AAGA2C,EAAA;AAAA,EADPC;AAAA,GAJkB5C,EAKX,WAAA,gBAAA;"}
@@ -1,48 +0,0 @@
1
- import { aF as s, aG as n, j as o, d as c, aE as a } from "./index-C-Prfui2.mjs";
2
- class u {
3
- constructor() {
4
- this._currentInnerRadius = 0;
5
- }
6
- init(i, e, t) {
7
- this._drawingGroup = i, this._continuousDrawingManager = e, this._kernelZoomFactor = t, this.update();
8
- }
9
- update() {
10
- this._initCircle(), this._updateCircle();
11
- }
12
- _initCircle() {
13
- if (this._circleMesh)
14
- return;
15
- const i = 70 / this._kernelZoomFactor / 1e3, e = i + i / 50, t = new s(i, e, 32), r = new n({
16
- color: 10066329,
17
- side: o
18
- });
19
- this._circleMesh = new c(t, r), this._circleMesh.name = "Circle", this._circleMesh.rotation.set(Math.PI / 2, 0, 0), this._circleMesh.visible = this._continuousDrawingManager.shouldShowCircle(), this._drawingGroup.add(this._circleMesh);
20
- }
21
- _updateCircle() {
22
- if (!this._circleMesh)
23
- return;
24
- const i = 70 / this._kernelZoomFactor / 1e3;
25
- if (i !== this._currentInnerRadius) {
26
- const t = i + i / 50;
27
- this._circleMesh.geometry = new s(
28
- i,
29
- t,
30
- 32
31
- );
32
- }
33
- const e = a(
34
- this._continuousDrawingManager.getStartPoint()
35
- );
36
- e.y = 5, this._circleMesh.position.copy(e), this._circleMesh.visible = this._continuousDrawingManager.shouldShowCircle(), this._currentInnerRadius = i;
37
- }
38
- setKernelZoomFactor(i) {
39
- this._kernelZoomFactor = i;
40
- }
41
- endDrawing() {
42
- this._drawingGroup.remove(this._circleMesh), this._circleMesh = null;
43
- }
44
- }
45
- export {
46
- u as default
47
- };
48
- //# sourceMappingURL=continuous-drawing-helper-BNHRsd4B.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"continuous-drawing-helper-BNHRsd4B.mjs","sources":["../../packages/planner-core/src/webgl/continuous-drawing-helper.ts"],"sourcesContent":["import type { ContinuousDrawingManager } from '../../../typings/planner';\nimport { convertToTHREE } from '../../../common-core/src/utils/kernel-utils';\nimport type { Group } from 'three';\nimport { DoubleSide, Mesh, MeshBasicMaterial, RingGeometry } from 'three';\n\nexport default class ContinuousDrawingHelper {\n private _drawingGroup: Group;\n private _continuousDrawingManager: ContinuousDrawingManager;\n\n private _circleMesh: Mesh;\n\n private _kernelZoomFactor: number;\n\n private _currentInnerRadius: number = 0;\n\n init(\n drawingGroup: Group,\n continuousDrawingManager: ContinuousDrawingManager,\n kernelZoomFactor: number,\n ) {\n this._drawingGroup = drawingGroup;\n this._continuousDrawingManager = continuousDrawingManager;\n this._kernelZoomFactor = kernelZoomFactor;\n this.update();\n }\n\n public update() {\n this._initCircle();\n this._updateCircle();\n }\n\n private _initCircle() {\n if (this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n const outerRadius = innerRadius + innerRadius / 50;\n\n const innerRingGeometry = new RingGeometry(innerRadius, outerRadius, 32);\n const innerRingMaterial = new MeshBasicMaterial({\n color: 0x999999,\n side: DoubleSide,\n });\n this._circleMesh = new Mesh(innerRingGeometry, innerRingMaterial);\n this._circleMesh.name = 'Circle';\n this._circleMesh.rotation.set(Math.PI / 2, 0, 0);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._drawingGroup.add(this._circleMesh);\n }\n\n private _updateCircle() {\n if (!this._circleMesh) {\n return;\n }\n\n const innerRadius = 70 / this._kernelZoomFactor / 1000;\n if (innerRadius !== this._currentInnerRadius) {\n const outerRadius = innerRadius + innerRadius / 50;\n\n this._circleMesh.geometry = new RingGeometry(\n innerRadius,\n outerRadius,\n 32,\n );\n }\n\n const position = convertToTHREE(\n this._continuousDrawingManager.getStartPoint(),\n );\n position.y = 5;\n\n this._circleMesh.position.copy(position);\n this._circleMesh.visible =\n this._continuousDrawingManager.shouldShowCircle();\n\n this._currentInnerRadius = innerRadius;\n }\n\n public setKernelZoomFactor(kernelZoomFactor: number) {\n this._kernelZoomFactor = kernelZoomFactor;\n }\n\n public endDrawing() {\n this._drawingGroup.remove(this._circleMesh);\n this._circleMesh = null;\n }\n}\n"],"names":["ContinuousDrawingHelper","drawingGroup","continuousDrawingManager","kernelZoomFactor","innerRadius","outerRadius","innerRingGeometry","RingGeometry","innerRingMaterial","MeshBasicMaterial","DoubleSide","Mesh","position","convertToTHREE"],"mappings":";AAKA,MAAqBA,EAAwB;AAAA,EAA7C,cAAA;AAQE,SAAQ,sBAA8B;AAAA,EAAA;AAAA,EAEt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