@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
@@ -0,0 +1,292 @@
1
+ import { Cr as e, Pt as t, h as n, o as r, s as i, tn as a, yr as o } from "./three.core-CLIofecG.mjs";
2
+ import { E as s, O as c, P as l, Q as u, V as d, c as f, l as p } from "./threejs-utils-jEzvlJF1.mjs";
3
+ import { V as m } from "./common-utils-DMSTohiS.mjs";
4
+ import { n as h, r as g, t as _ } from "./decorate-C1QnXPYw.mjs";
5
+ import { $ as v, B as y, C as b, H as x, J as S, Q as C, V as w, W as T, Y as E, Z as D, et as O, f as k, g as A, h as j, m as M, n as N, q as P, r as F, t as I } from "./main-BxEZ11ag.mjs";
6
+ import { t as L } from "./script-loader-KBq8SjP6.mjs";
7
+ //#region packages/common-core/src/cameracontrol/material-viewer-camera-behaviour.ts
8
+ var R = class extends k {
9
+ get cameraControl() {
10
+ return this._cameraControl;
11
+ }
12
+ }, z = /* @__PURE__ */ function(e) {
13
+ return e.CUBE = "cube", e.SPHERE = "sphere", e.PLANE_VERTICAL = "plane_vertical", e.PLANE_HORIZONTAL = "plane_horizontal", e;
14
+ }({}), B = {
15
+ x: 1,
16
+ y: 1,
17
+ z: 1
18
+ }, V = class extends M {
19
+ constructor(e, t) {
20
+ super(e, t, x.RMV, v.CAMERA_3D), this._sceneParams = { type: z.CUBE }, this._materialParams = {
21
+ color: "#ffffff",
22
+ metallic: .5,
23
+ alpha: 0,
24
+ alphaCutoff: 0,
25
+ doubleSided: !1
26
+ }, this._initializeRendererSettings(), this._initScene();
27
+ }
28
+ _initializeRendererSettings() {
29
+ if (!this._renderer) {
30
+ setTimeout(() => this._initializeRendererSettings(), 0);
31
+ return;
32
+ }
33
+ if ((l(this._renderer) ? this._renderer.capabilities.maxTextures : 16) > 8) {
34
+ let e = S.createDynamicLightSettingSource(null, E.CAMERA);
35
+ e && this.loadDynamicLightSetting(e);
36
+ }
37
+ }
38
+ _initScene() {
39
+ let e = new i(B.x, B.y, B.z, 100, 100, 100), a = u.createMeshPhysicalMaterial({ color: this._initData.colors.PRIMARY });
40
+ this._setMaterial(a), this._mesh = new t(e, this._material), this._mesh.castShadow = !0, this._mesh.position.setY(B.y / 2), this._scene.add(this._mesh);
41
+ let { initialFloorMaterial: o } = this._initData;
42
+ if (o ? this.changeFloorMaterialById(o) : this._environment = new A(this._scene, void 0, new n(16777215)), this.cameraBehaviour.cameraControl instanceof b) {
43
+ let e = new r();
44
+ e.setFromObject(this._mesh), console.trace("reset camera"), this.cameraBehaviour.cameraControl.updateAndReset(e);
45
+ }
46
+ this.showGUI();
47
+ }
48
+ loadMaterialId(e) {
49
+ return new Promise((t) => {
50
+ this._configuratorMeshGenerator.loadMaterial(e, B.x * 1e3, B.y * 1e3).then((e) => {
51
+ this._setMaterial(e), this._mesh.material = this._material, this._updateGUI(), this._requestRender(), t();
52
+ });
53
+ });
54
+ }
55
+ loadMaterial(e) {
56
+ return new Promise((t) => {
57
+ e.__rapi_path__ ||= "materials", this._mesh.material = this._material, this._configuratorMeshGenerator.loadTextures(e, this._material, B.x * 100, B.y * 100).then(() => {
58
+ this._updateGUI(), this._requestRender();
59
+ }), t();
60
+ });
61
+ }
62
+ loadMaterialShading(e) {
63
+ return new Promise((t) => {
64
+ let n = { shading: e };
65
+ this._setMaterial(d(this._material, n)), this._mesh.material = this._material, this._updateGUI(), this._requestRender(), t();
66
+ });
67
+ }
68
+ resetMaterial() {
69
+ this._initScene();
70
+ }
71
+ _setMaterial(e) {
72
+ this._material = e, this._materialParams.alpha = e.opacity, this._materialParams.alphaCutoff = e.alphaTest, this._materialParams.color = "#" + e.color.getHexString(), this._materialParams.doubleSided = e.side === 2, this._materialParams.metallic = e.metalness === 1 ? 1 : e.reflectivity;
73
+ }
74
+ getMaterialShading(e = 1) {
75
+ return c(this._material, e);
76
+ }
77
+ createCameraControl(e, t) {
78
+ this._changeCameraBehaviour(new R(new b(this._creator_, this._getInputManager(), void 0), this._cameraBehaviourState));
79
+ }
80
+ _getInputManager() {
81
+ return this._inputManager;
82
+ }
83
+ sceneChanged() {}
84
+ getBounds() {
85
+ return this._mesh ? new r().setFromObject(this._mesh) : null;
86
+ }
87
+ getGeometryBounds() {
88
+ return null;
89
+ }
90
+ _guiLoaded() {
91
+ this._updateGUI();
92
+ }
93
+ _updateGUI() {
94
+ let e = s();
95
+ e && (this._guiGeometryFolder || (this._guiGeometryFolder = e.addFolder("Geometry"), this._guiGeometryFolder.add(this._sceneParams, "type", {
96
+ Cube: z.CUBE,
97
+ Sphere: z.SPHERE,
98
+ PlaneVertical: z.PLANE_VERTICAL,
99
+ PlaneHorizontal: z.PLANE_HORIZONTAL
100
+ }).onChange((e) => {
101
+ console.log(e), this._setGeometry();
102
+ })), this._material && (this._guiMaterialFolder && e.removeFolder(this._guiMaterialFolder), this._guiMaterialFolder = e.addFolder("Material"), this._guiMaterialFolder.addColor(this._materialParams, "color").onChange((e) => {
103
+ this._material.color = new n(e), this._shadingChanged();
104
+ }), this._guiMaterialFolder.add(this._materialParams, "metallic").min(0).max(1).step(.01).onChange((e) => {
105
+ this._material.metalness = e === 1 ? 1 : .5, this._material.reflectivity = e || .5, this._shadingChanged();
106
+ }), this._guiMaterialFolder.add(this._material, "roughness").min(0).max(1).step(.01).onChange((e) => {
107
+ this._shadingChanged();
108
+ }), this._guiMaterialFolder.add(this._material, "transmission").min(0).max(1).step(.01).onChange((e) => {
109
+ this._material.transmission = e, e > 0 && (this._material.opacity = 1, this._material.alphaTest = .5, this._material.depthWrite = !1, this._material.transparent = !0, this._material.metalness = 0), this._mesh.castShadow = !this._material.transparent, this._shadingChanged();
110
+ }), this._guiMaterialFolder.add(this._materialParams, "alpha").min(0).max(1).step(.01).onChange((e) => {
111
+ this._material.transparent = e < 1, this._material.opacity = e, this._material.depthWrite = e >= 1, this._mesh.castShadow = !this._material.transparent, this._shadingChanged();
112
+ }), this._guiMaterialFolder.add(this._materialParams, "alphaCutoff").min(0).max(1).step(.01).onChange((e) => {
113
+ e ? this._material.alphaTest = e : this._material.alphaTest = 0, this._shadingChanged();
114
+ }), this._guiMaterialFolder.add(this._materialParams, "doubleSided").onChange((e) => {
115
+ e ? this._material.side = 2 : this._material.side = 0, this._shadingChanged();
116
+ })), this._addGUIListener(e));
117
+ }
118
+ _shadingChanged() {
119
+ this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(c(this._material));
120
+ }
121
+ setGeometry(e) {
122
+ this._sceneParams.type = e, this._setGeometry();
123
+ }
124
+ _setGeometry() {
125
+ let e;
126
+ this._sceneParams.type === z.CUBE && (e = new i(B.x, B.y, B.z, 100, 100, 100)), this._sceneParams.type === z.SPHERE && (e = new o(.5, 100, 100)), this._sceneParams.type === z.PLANE_HORIZONTAL && (e = new a(B.x, B.z), e.rotateX(-Math.PI / 2)), this._sceneParams.type === z.PLANE_VERTICAL && (e = new a(B.x, B.z)), this._mesh.geometry = e, this._renderEverything();
127
+ }
128
+ async changeFloorMaterialById(e) {
129
+ let t = await this._rapiAccess.getMaterial(e);
130
+ return (!this._environment || !(this._environment instanceof j)) && (this._environment = new j(this._scene, this._environment, !0)), new Promise((e, n) => {
131
+ this._environment.changeFloorMaterial(t, this._maxAnisotropy).then(() => {
132
+ this._requestRender(), e();
133
+ }, n);
134
+ });
135
+ }
136
+ async addTexture(t, n) {
137
+ let r = B.x * 100, i = B.y * 100, a = r / (t.mmWidth === 0 ? 1 : t.mmWidth), o = i / (t.mmHeight === 0 ? 1 : t.mmHeight), s = l(this._renderer) ? this._renderer.capabilities.maxTextures : 16;
138
+ if (n) {
139
+ let r = new Image();
140
+ r.src = n;
141
+ let i = new e();
142
+ i.image = r, r.onload = function() {
143
+ i.needsUpdate = !0;
144
+ }, f(i, t, this._material, this._maxAnisotropy, a, o, s);
145
+ } else await p(t.image, t, this._material, this._maxAnisotropy, a, o, s);
146
+ this._requestRender();
147
+ }
148
+ removeTexture(e) {
149
+ e.mapping === m.ORM && (this._material.aoMap = null, this._material.roughnessMap = null, this._material.metalnessMap = null), (e.mapping === m.RGB || e.mapping === m.RGBA) && (this._material.map = null), e.mapping === m.XYZ && (this._material.normalMap = null), this._material.needsUpdate = !0, this._requestRender();
150
+ }
151
+ clearCache() {
152
+ this._configuratorMeshGenerator.clear();
153
+ }
154
+ };
155
+ _([g, h("design:type", Object)], V.prototype, "_inputManager", void 0), _([g, h("design:type", Object)], V.prototype, "_configuratorMeshGenerator", void 0), _([g, h("design:type", Object)], V.prototype, "_roomleMaterialViewerUiCallback", void 0), _([g, h("design:type", Object)], V.prototype, "_rapiAccess", void 0);
156
+ //#endregion
157
+ //#region packages/material-viewer/src/roomle-material-viewer.ts
158
+ var H = class {
159
+ constructor(e) {
160
+ this._creator_ = e;
161
+ }
162
+ setCameraOffset(e) {
163
+ this._sceneManager.setCameraOffset(e);
164
+ }
165
+ getCameraOffset() {
166
+ return this._sceneManager.getCameraOffset();
167
+ }
168
+ init(e) {
169
+ return this._domHelper.setDomElement(e), this._sceneManager ? (this._lifeCycleManager.resume(), Promise.resolve()) : new Promise(this._initPromiseCallback.bind(this));
170
+ }
171
+ _initPromiseCallback(e, t) {
172
+ this._sceneManager = new V(this._creator_, {
173
+ left: 0,
174
+ top: 1,
175
+ right: 1,
176
+ bottom: 0
177
+ }), this._sceneManager.enableHD(), e();
178
+ }
179
+ get callbacks() {
180
+ return this._roomleMaterialViewerUiCallback;
181
+ }
182
+ set callbacks(e) {
183
+ this._roomleMaterialViewerUiCallback = e;
184
+ }
185
+ loadMaterialShading(e) {
186
+ return this._sceneManager.loadMaterialShading(e);
187
+ }
188
+ resetMaterial() {
189
+ this._sceneManager.resetMaterial();
190
+ }
191
+ loadMaterial(e, t = {}) {
192
+ return t.flushCache && this._clearCaches(), this._sceneManager.loadMaterial(e);
193
+ }
194
+ loadMaterialId(e, t = {}) {
195
+ return t.flushCache && this._clearCaches(), this._sceneManager.loadMaterialId(e);
196
+ }
197
+ getMaterialShading(e = 1) {
198
+ return this._sceneManager.getMaterialShading(e);
199
+ }
200
+ loadSceneSetting(e) {
201
+ return this._sceneManager.loadSceneSettings(e);
202
+ }
203
+ setOverrides(e) {
204
+ e && this._initData.setOverrides(e);
205
+ }
206
+ updateSize() {
207
+ this._sceneManager.updateCamera();
208
+ }
209
+ getMain() {}
210
+ resumeTest(e) {
211
+ this._domHelper.setDomElement(e), this._lifeCycleManager.resume();
212
+ }
213
+ pauseTest() {
214
+ this._lifeCycleManager.pause();
215
+ }
216
+ showGUI() {
217
+ this._sceneManager.showGUI();
218
+ }
219
+ async changeFloorMaterialById(e) {
220
+ return this._sceneManager.changeFloorMaterialById(e);
221
+ }
222
+ setGeometry(e) {
223
+ this._sceneManager.setGeometry(e);
224
+ }
225
+ async addTexture(e, t) {
226
+ return this._sceneManager.addTexture(e, t);
227
+ }
228
+ removeTexture(e) {
229
+ return this._sceneManager.removeTexture(e);
230
+ }
231
+ _clearCaches() {
232
+ this._rapiAccess.cleanUp(), this._sceneManager.clearCache();
233
+ }
234
+ getScene() {
235
+ return this._sceneManager.getScene();
236
+ }
237
+ updateScene() {
238
+ this._sceneManager.updateScene();
239
+ }
240
+ getUnitFormatter() {
241
+ return this._unitFormatter;
242
+ }
243
+ getStorage() {
244
+ return this._idbManager;
245
+ }
246
+ setEnvironmentMap(e) {
247
+ let { url: t, intensity: n, rotation: r, maxLightSources: i } = e;
248
+ this._sceneManager.setEnvironmentMap(t, n, r, i);
249
+ }
250
+ get globalCallbacks() {
251
+ return this._globalCallback;
252
+ }
253
+ };
254
+ _([g, h("design:type", Object)], H.prototype, "_domHelper", void 0), _([g, h("design:type", Object)], H.prototype, "_scriptLoader", void 0), _([g, h("design:type", Object)], H.prototype, "_lifeCycleManager", void 0), _([g, h("design:type", Object)], H.prototype, "_roomleMaterialViewerUiCallback", void 0), _([g, h("design:type", Object)], H.prototype, "_initData", void 0), _([g, h("design:type", Object)], H.prototype, "_globalCallback", void 0), _([g, h("design:type", Object)], H.prototype, "_rapiAccess", void 0), _([g, h("design:type", Object)], H.prototype, "_unitFormatter", void 0), _([g, h("design:type", Object)], H.prototype, "_idbManager", void 0);
255
+ //#endregion
256
+ //#region packages/material-viewer/src/roomle-material-viewer-ui-callback.ts
257
+ var U = class extends T {
258
+ constructor(e) {
259
+ super(e), this.onMaterialShadingChanged = (e) => void 0;
260
+ }
261
+ }, W = [
262
+ new C("script-loader", L),
263
+ new C("logger", P),
264
+ new C("input-manager", y, D.CONTEXT),
265
+ new C("configurator-mesh-generator", w),
266
+ new C("rapi-access", O),
267
+ new C("roomle-material-viewer-ui-callback", U, D.CONTEXT)
268
+ ], G = class extends N {
269
+ setupGlobals() {}
270
+ setupDependencies() {
271
+ F.setup(W), this.lookup("logger", this._context);
272
+ }
273
+ cleanUpGlobals() {
274
+ throw Error("Method not implemented.");
275
+ }
276
+ cleanUpDependencies() {
277
+ throw Error("Method not implemented.");
278
+ }
279
+ async bootFinished() {
280
+ this._viewer = new H(this._context), window.RoomleMaterialViewer || (window.RoomleMaterialViewer = this._viewer);
281
+ }
282
+ getApi() {
283
+ return this._viewer;
284
+ }
285
+ getContextName() {
286
+ return I.MATERIAL_VIEWER;
287
+ }
288
+ };
289
+ //#endregion
290
+ export { G as MaterialViewer };
291
+
292
+ //# sourceMappingURL=material-viewer-njBFF0Zg.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"material-viewer-njBFF0Zg.mjs","names":[],"sources":["../../packages/common-core/src/cameracontrol/material-viewer-camera-behaviour.ts","../../packages/material-viewer/src/webgl/material-viewer-scene-manager.ts","../../packages/material-viewer/src/roomle-material-viewer.ts","../../packages/material-viewer/src/roomle-material-viewer-ui-callback.ts","../../packages/material-viewer/src/utils/injectables.ts","../../packages/material-viewer/src/material-viewer.ts"],"sourcesContent":["import CameraBehaviour from './camera-behaviour';\nimport type AdjustableCameraControl3D from '../../../glb-viewer-core/src/camera-control/adjustable-camera-control-3d';\n\nexport default class MaterialViewerCameraBehaviour extends CameraBehaviour {\n public get cameraControl(): AdjustableCameraControl3D {\n return this._cameraControl as AdjustableCameraControl3D;\n }\n}\n","import SceneManager from '../../../common-core/src/webgl/scene-manager';\nimport type { CanvasOffset } from '../../../common-core/src/common-interfaces';\nimport type InputManager from '../../../common-core/src/input/input-manager';\nimport inject from '../../../common-core/src/di/inject';\nimport CameraControl3D from '../../../common-core/src/cameracontrol/camera-control-3d';\nimport type {\n RapiId,\n RapiMaterial,\n RapiMaterialShading,\n RapiTexture,\n} from '../../../typings/rapi-types';\nimport { RAPI_TEXTURE_TYPE } from '../../../typings/rapi-types';\nimport {\n addExistingTexture,\n addTexture,\n getGUI,\n getMaterialShading,\n setMaterial,\n isWebGLRenderer,\n DEFAULT_WEBGPU_MAX_SAMPLES,\n} from '../../../common-core/src/utils/threejs-utils';\nimport { CAMERA_TYPE } from '../../../common-core/src/cameracontrol/camera-type';\nimport type ConfiguratorMeshGenerator from '../../../configurator-core/src/webgl/configurator-mesh-generator';\nimport type RoomleMaterialViewerUiCallback from '../roomle-material-viewer-ui-callback';\nimport BackgroundEnvironment from '../../../common-core/src/environment/background-environment';\nimport FloorEnvironment from '../../../configurator-core/src/webgl/environment/floor-environment';\nimport { type RapiAccess } from '../../../common-core/src/rapi-access';\nimport DynamicLightSettingLoader, {\n PREDEFINED_LIGHTSETTING,\n} from '../../../common-core/src/lightsetting/dynamic-light-setting-loader';\nimport { CANVAS_ID } from '../../../common-core/src/utils/dom-helper';\nimport type { Enumify } from '#/common/src/utils/types';\nimport type { ColorRepresentation, MeshPhysicalMaterial } from 'three';\nimport {\n Box3,\n BoxGeometry,\n Color,\n DoubleSide,\n FrontSide,\n Mesh,\n PlaneGeometry,\n SphereGeometry,\n Texture,\n} from 'three';\nimport MaterialCreator from '../../../common-core/src/utils/material-creator';\nimport MaterialViewerCameraBehaviour from '../../../common-core/src/cameracontrol/material-viewer-camera-behaviour';\n\nexport const enum GEOMETRY {\n CUBE = 'cube',\n SPHERE = 'sphere',\n PLANE_VERTICAL = 'plane_vertical',\n PLANE_HORIZONTAL = 'plane_horizontal',\n}\n\nconst SIZE = { x: 1, y: 1, z: 1 };\nexport default class MaterialViewerSceneManager extends SceneManager {\n @inject\n private _inputManager: InputManager;\n\n @inject\n private _configuratorMeshGenerator: ConfiguratorMeshGenerator;\n\n @inject\n private _roomleMaterialViewerUiCallback: RoomleMaterialViewerUiCallback;\n\n @inject\n private _rapiAccess: RapiAccess;\n\n private _guiGeometryFolder: any;\n private _guiMaterialFolder: any;\n private _mesh: Mesh;\n private _material: MeshPhysicalMaterial;\n private _sceneParams = {\n type: GEOMETRY.CUBE,\n };\n private _materialParams = {\n color: '#ffffff',\n metallic: 0.5,\n alpha: 0,\n alphaCutoff: 0,\n doubleSided: false,\n };\n\n constructor(creator: string, offset: CanvasOffset) {\n super(creator, offset, CANVAS_ID.RMV, CAMERA_TYPE.CAMERA_3D);\n\n // Use lazy initialization for renderer-dependent settings\n this._initializeRendererSettings();\n\n this._initScene();\n }\n\n // If renderer is not ready yet, will retry on next tick.\n // This is necessary for dynamic WebGPU renderer imports.\n private _initializeRendererSettings(): void {\n if (!this._renderer) {\n // Retry on next tick if renderer not ready\n setTimeout(() => this._initializeRendererSettings(), 0);\n return;\n }\n\n const maxTextures = isWebGLRenderer(this._renderer)\n ? this._renderer.capabilities.maxTextures\n : DEFAULT_WEBGPU_MAX_SAMPLES;\n if (maxTextures > 8) {\n const lightSource =\n DynamicLightSettingLoader.createDynamicLightSettingSource(\n null,\n PREDEFINED_LIGHTSETTING.CAMERA,\n );\n if (lightSource) {\n this.loadDynamicLightSetting(lightSource);\n }\n }\n }\n\n private _initScene() {\n const geometry = new BoxGeometry(SIZE.x, SIZE.y, SIZE.z, 100, 100, 100);\n const meshPhysicalMaterial = MaterialCreator.createMeshPhysicalMaterial({\n color: this._initData.colors.PRIMARY,\n });\n this._setMaterial(meshPhysicalMaterial);\n this._mesh = new Mesh(geometry, this._material);\n this._mesh.castShadow = true;\n this._mesh.position.setY(SIZE.y / 2);\n this._scene.add(this._mesh);\n\n const { initialFloorMaterial } = this._initData;\n\n if (initialFloorMaterial) {\n this.changeFloorMaterialById(initialFloorMaterial);\n } else {\n this._environment = new BackgroundEnvironment(\n this._scene,\n undefined,\n new Color(0xffffff),\n );\n }\n\n if (this.cameraBehaviour.cameraControl instanceof CameraControl3D) {\n const boundingBox = new Box3();\n boundingBox.setFromObject(this._mesh);\n console.trace('reset camera');\n this.cameraBehaviour.cameraControl.updateAndReset(boundingBox);\n }\n\n this.showGUI();\n }\n\n public loadMaterialId(materialId: RapiId): Promise<void> {\n return new Promise<void>((resolve) => {\n this._configuratorMeshGenerator\n .loadMaterial(materialId, SIZE.x * 1000, SIZE.y * 1000)\n .then((material) => {\n this._setMaterial(material as MeshPhysicalMaterial);\n this._mesh.material = this._material;\n this._updateGUI();\n this._requestRender();\n resolve();\n });\n });\n }\n\n public loadMaterial(material: RapiMaterial): Promise<void> {\n return new Promise<void>((resolve) => {\n // eslint-disable-next-line\n if (!material.__rapi_path__) {\n // eslint-disable-next-line\n material.__rapi_path__ = 'materials';\n }\n this._mesh.material = this._material;\n this._configuratorMeshGenerator\n .loadTextures(material, this._material, SIZE.x * 100, SIZE.y * 100)\n .then(() => {\n this._updateGUI();\n this._requestRender();\n });\n resolve();\n });\n }\n\n public loadMaterialShading(\n materialShading: RapiMaterialShading,\n ): Promise<void> {\n return new Promise<void>((resolve) => {\n let material = { shading: materialShading };\n this._setMaterial(setMaterial(this._material, material as RapiMaterial));\n this._mesh.material = this._material;\n this._updateGUI();\n this._requestRender();\n resolve();\n });\n }\n public resetMaterial(): void {\n this._initScene();\n }\n\n private _setMaterial(material: MeshPhysicalMaterial) {\n this._material = material;\n this._materialParams.alpha = material.opacity;\n this._materialParams.alphaCutoff = material.alphaTest;\n this._materialParams.color = '#' + material.color.getHexString();\n this._materialParams.doubleSided = material.side === DoubleSide;\n this._materialParams.metallic =\n material.metalness === 1 ? 1 : material.reflectivity;\n }\n\n public getMaterialShading(version: number = 1): RapiMaterialShading {\n return getMaterialShading(this._material, version);\n }\n\n protected createCameraControl(\n _mode: Enumify<typeof CAMERA_TYPE>,\n _offset: CanvasOffset,\n ) {\n this._changeCameraBehaviour(\n new MaterialViewerCameraBehaviour(\n new CameraControl3D(this._creator_, this._getInputManager(), undefined),\n this._cameraBehaviourState,\n ),\n );\n }\n\n protected _getInputManager(): InputManager {\n return this._inputManager;\n }\n\n public sceneChanged(): void {\n //override when needed\n }\n\n public getBounds(): Box3 | null {\n if (!this._mesh) {\n return null;\n }\n return new Box3().setFromObject(this._mesh);\n }\n\n getGeometryBounds(): Box3 | null {\n return null;\n }\n\n protected _guiLoaded() {\n this._updateGUI();\n }\n\n private _updateGUI() {\n let gui = getGUI();\n if (!gui) {\n return;\n }\n if (!this._guiGeometryFolder) {\n this._guiGeometryFolder = gui.addFolder('Geometry');\n this._guiGeometryFolder\n .add(this._sceneParams, 'type', {\n Cube: GEOMETRY.CUBE,\n Sphere: GEOMETRY.SPHERE,\n PlaneVertical: GEOMETRY.PLANE_VERTICAL,\n PlaneHorizontal: GEOMETRY.PLANE_HORIZONTAL,\n })\n .onChange((type: number) => {\n console.log(type);\n this._setGeometry();\n });\n }\n if (this._material) {\n if (this._guiMaterialFolder) {\n gui.removeFolder(this._guiMaterialFolder);\n }\n this._guiMaterialFolder = gui.addFolder('Material');\n this._guiMaterialFolder\n .addColor(this._materialParams, 'color')\n .onChange((color: string) => {\n this._material.color = new Color(color as ColorRepresentation);\n this._shadingChanged();\n });\n this._guiMaterialFolder\n .add(this._materialParams, 'metallic')\n .min(0)\n .max(1)\n .step(0.01)\n .onChange((metallic: number) => {\n this._material.metalness = metallic === 1 ? 1 : 0.5;\n this._material.reflectivity = metallic || 0.5;\n this._shadingChanged();\n });\n this._guiMaterialFolder\n .add(this._material, 'roughness')\n .min(0)\n .max(1)\n .step(0.01)\n .onChange((_roughness: number) => {\n this._shadingChanged();\n });\n this._guiMaterialFolder\n .add(this._material, 'transmission')\n .min(0)\n .max(1)\n .step(0.01)\n .onChange((transmission: number) => {\n this._material.transmission = transmission;\n if (transmission > 0) {\n this._material.opacity = 1;\n this._material.alphaTest = 0.5;\n this._material.depthWrite = false;\n this._material.transparent = true;\n this._material.metalness = 0;\n }\n this._mesh.castShadow = !this._material.transparent;\n this._shadingChanged();\n });\n this._guiMaterialFolder\n .add(this._materialParams, 'alpha')\n .min(0)\n .max(1)\n .step(0.01)\n .onChange((alpha: number) => {\n this._material.transparent = alpha < 1;\n this._material.opacity = alpha;\n this._material.depthWrite = alpha >= 1;\n this._mesh.castShadow = !this._material.transparent;\n this._shadingChanged();\n });\n this._guiMaterialFolder\n .add(this._materialParams, 'alphaCutoff')\n .min(0)\n .max(1)\n .step(0.01)\n .onChange((alphaCutoff: number) => {\n if (alphaCutoff) {\n this._material.alphaTest = alphaCutoff;\n } else {\n this._material.alphaTest = 0;\n }\n this._shadingChanged();\n });\n this._guiMaterialFolder\n .add(this._materialParams, 'doubleSided')\n .onChange((doubleSided: boolean) => {\n if (doubleSided) {\n this._material.side = DoubleSide;\n } else {\n this._material.side = FrontSide;\n }\n this._shadingChanged();\n });\n }\n this._addGUIListener(gui);\n }\n\n private _shadingChanged() {\n this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(\n getMaterialShading(this._material),\n );\n }\n\n public setGeometry(type: GEOMETRY) {\n this._sceneParams.type = type;\n this._setGeometry();\n }\n\n private _setGeometry() {\n let geometry;\n if (this._sceneParams.type === GEOMETRY.CUBE) {\n geometry = new BoxGeometry(SIZE.x, SIZE.y, SIZE.z, 100, 100, 100);\n }\n if (this._sceneParams.type === GEOMETRY.SPHERE) {\n geometry = new SphereGeometry(0.5, 100, 100);\n }\n if (this._sceneParams.type === GEOMETRY.PLANE_HORIZONTAL) {\n geometry = new PlaneGeometry(SIZE.x, SIZE.z);\n geometry.rotateX(-Math.PI / 2);\n }\n if (this._sceneParams.type === GEOMETRY.PLANE_VERTICAL) {\n geometry = new PlaneGeometry(SIZE.x, SIZE.z);\n }\n this._mesh.geometry = geometry;\n this._renderEverything();\n }\n\n public async changeFloorMaterialById(materialId: string): Promise<void> {\n const material = await this._rapiAccess.getMaterial(materialId);\n if (\n !this._environment ||\n !(this._environment instanceof FloorEnvironment)\n ) {\n this._environment = new FloorEnvironment(\n this._scene,\n this._environment,\n true,\n );\n }\n return new Promise((resolve, reject) => {\n (this._environment as FloorEnvironment)\n .changeFloorMaterial(material, this._maxAnisotropy)\n .then(() => {\n this._requestRender();\n resolve();\n }, reject);\n });\n }\n\n public async addTexture(rapiTexture: RapiTexture, base64Image?: string) {\n const width = SIZE.x * 100;\n const height = SIZE.y * 100;\n const repeatWidth =\n width / (rapiTexture.mmWidth === 0 ? 1 : rapiTexture.mmWidth);\n const repeatHeight =\n height / (rapiTexture.mmHeight === 0 ? 1 : rapiTexture.mmHeight);\n const maxTextures = isWebGLRenderer(this._renderer)\n ? this._renderer.capabilities.maxTextures\n : DEFAULT_WEBGPU_MAX_SAMPLES;\n if (base64Image) {\n const image = new Image();\n image.src = base64Image;\n const texture = new Texture();\n texture.image = image;\n image.onload = function () {\n texture.needsUpdate = true;\n };\n addExistingTexture(\n texture,\n rapiTexture,\n this._material,\n this._maxAnisotropy,\n repeatWidth,\n repeatHeight,\n maxTextures,\n );\n } else {\n await addTexture(\n rapiTexture.image,\n rapiTexture,\n this._material,\n this._maxAnisotropy,\n repeatWidth,\n repeatHeight,\n maxTextures,\n );\n }\n this._requestRender();\n }\n\n public removeTexture(rapiTexture: RapiTexture) {\n if (rapiTexture.mapping === RAPI_TEXTURE_TYPE.ORM) {\n this._material.aoMap = null;\n this._material.roughnessMap = null;\n this._material.metalnessMap = null;\n }\n if (\n rapiTexture.mapping === RAPI_TEXTURE_TYPE.RGB ||\n rapiTexture.mapping === RAPI_TEXTURE_TYPE.RGBA\n ) {\n this._material.map = null;\n }\n if (rapiTexture.mapping === RAPI_TEXTURE_TYPE.XYZ) {\n this._material.normalMap = null;\n }\n this._material.needsUpdate = true;\n this._requestRender();\n }\n\n public clearCache() {\n this._configuratorMeshGenerator.clear();\n }\n}\n","import type ScriptLoader from '../../common-core/src/script-loader';\nimport type DomHelper from '../../common-core/src/utils/dom-helper';\nimport inject from '../../common-core/src/di/inject';\nimport type { ExternalEmbeddable, GlobalAPI } from '../../common-core/src/main';\nimport type { Main } from '../../common-core/src/main';\nimport type { Context } from '../../common-core/src/di/context';\nimport type LifeCycleManager from '../../common-core/src/life-cycle-manager';\nimport type { SceneSettings } from '../../common-core/src/scene-settings-loader';\nimport type { GEOMETRY } from './webgl/material-viewer-scene-manager';\nimport MaterialViewerSceneManager from './webgl/material-viewer-scene-manager';\nimport type {\n RapiId,\n RapiMaterial,\n RapiMaterialShading,\n RapiTexture,\n} from '../../typings/rapi-types';\nimport type RoomleMaterialViewerUiCallback from './roomle-material-viewer-ui-callback';\nimport type { InitDataDefinition } from '../../common-core/src/utils/shims';\nimport type InitData from '../../common-core/src/utils/init-data';\nimport { type RapiAccess } from '../../common-core/src/rapi-access';\nimport type { CanvasOffset } from '../../common-core/src/common-interfaces';\nimport type UnitFormatter from '../../configurator-core/src/services/unit-formatter';\nimport type { Scene } from 'three';\nimport { type IdbManager } from '../../common-core/src/services/idb-manager';\nimport type { GlobalCallback } from '../../common-core/src/services/global-callback';\n\nexport default class RoomleMaterialViewer\n implements\n GlobalAPI,\n Context,\n ExternalEmbeddable<RoomleMaterialViewerUiCallback>\n{\n public _creator_: string;\n\n @inject\n private _domHelper: DomHelper;\n\n @inject\n private _scriptLoader: ScriptLoader;\n\n @inject\n private _lifeCycleManager: LifeCycleManager;\n\n @inject\n private _roomleMaterialViewerUiCallback: RoomleMaterialViewerUiCallback;\n\n @inject\n private _initData: InitData;\n\n @inject\n private _globalCallback: GlobalCallback;\n\n @inject\n private _rapiAccess: RapiAccess;\n\n @inject\n private _unitFormatter: UnitFormatter;\n\n @inject\n protected _idbManager: IdbManager;\n\n private _sceneManager: MaterialViewerSceneManager;\n\n constructor(creator: string) {\n this._creator_ = creator;\n }\n\n public setCameraOffset(offset: CanvasOffset): void {\n this._sceneManager.setCameraOffset(offset);\n }\n\n public getCameraOffset(): CanvasOffset {\n return this._sceneManager.getCameraOffset();\n }\n\n public init(element: HTMLElement): Promise<void> {\n this._domHelper.setDomElement(element);\n\n if (this._sceneManager) {\n this._lifeCycleManager.resume();\n return Promise.resolve();\n }\n\n return new Promise<void>(this._initPromiseCallback.bind(this));\n }\n\n private _initPromiseCallback(resolve: () => void, _reject: () => void) {\n this._sceneManager = new MaterialViewerSceneManager(this._creator_, {\n left: 0,\n top: 1,\n right: 1,\n bottom: 0,\n });\n this._sceneManager.enableHD();\n resolve();\n }\n\n get callbacks(): RoomleMaterialViewerUiCallback {\n return this._roomleMaterialViewerUiCallback;\n }\n\n set callbacks(callback: RoomleMaterialViewerUiCallback) {\n this._roomleMaterialViewerUiCallback = callback;\n }\n\n public loadMaterialShading(\n materialShading: RapiMaterialShading,\n ): Promise<void> {\n return this._sceneManager.loadMaterialShading(materialShading);\n }\n\n public resetMaterial(): void {\n this._sceneManager.resetMaterial();\n }\n\n public loadMaterial(\n material: RapiMaterial,\n options: { flushCache?: boolean } = {},\n ): Promise<void> {\n if (options.flushCache) {\n this._clearCaches();\n }\n return this._sceneManager.loadMaterial(material);\n }\n\n public loadMaterialId(\n materialId: RapiId,\n options: { flushCache?: boolean } = {},\n ): Promise<void> {\n if (options.flushCache) {\n this._clearCaches();\n }\n return this._sceneManager.loadMaterialId(materialId);\n }\n\n public getMaterialShading(version: number = 1): RapiMaterialShading {\n return this._sceneManager.getMaterialShading(version);\n }\n\n /**\n * Loads a SceneSettings object, currently it can can contain a light setting definition\n * (see {@link @roomle/web-sdk/configurator-core/src/roomle-configurator#RoomleConfigurator.loadDynamicLightSetting}) and an environment definition (see {@link @roomle/web-sdk/configurator-core/src/environment/dynamic-environment-setting-loader#EnvironmentSetting}).\n * @param sceneSettings\n */\n public loadSceneSetting(sceneSettings: SceneSettings): Promise<void> {\n return this._sceneManager.loadSceneSettings(sceneSettings);\n }\n\n public setOverrides(initData: InitDataDefinition): void {\n if (!initData) {\n return;\n }\n this._initData.setOverrides(initData);\n }\n\n public updateSize(): void {\n this._sceneManager.updateCamera();\n }\n\n /**\n * Return the main class which has access to lifecycle events and RapiAccess.\n * Hidden because it's only useful for embedding API.\n * Has to be overridden by main class.\n * @hidden\n */\n public getMain(): Main | undefined {\n return undefined;\n }\n\n public resumeTest(element: HTMLElement) {\n this._domHelper.setDomElement(element);\n this._lifeCycleManager.resume();\n }\n\n public pauseTest() {\n this._lifeCycleManager.pause();\n }\n\n public showGUI() {\n this._sceneManager.showGUI();\n }\n\n /**\n * Sets the material of the floor to the given material id.\n * If the current environment is not floor environment it will be changed\n *\n * Example material ids are:\n * roomle_floor:DresdenEiche\n * roomle_floor:Ibiza\n * roomle_floor:Palma\n * roomle_floor:Elba\n * roomle_floor:Manacor\n * roomle_floor:KernEiche\n * roomle_floor:KieferScandic\n * roomle_floor:EicheHabsburg\n * roomle_floor:FuldaKiefer\n * roomle_floor:Ashton\n * roomle_floor:EicheLondon\n *\n * @param materialId\n * @returns promise that resolves when material has been changed\n */\n public async changeFloorMaterialById(materialId: string): Promise<void> {\n return this._sceneManager.changeFloorMaterialById(materialId);\n }\n\n /**\n * Set the geometry of the demo material mesh\n *\n * Possible parameter:\n * 'cube',\n * 'sphere',\n * 'plane_vertical',\n * 'plane_horizontal'\n *\n * @param type\n */\n public setGeometry(type: GEOMETRY) {\n this._sceneManager.setGeometry(type);\n }\n\n /**\n * Set a texture on the demo material, if no base64Image is set, the image field of rapiTexture is used\n * @param rapiTexture\n * @param base64Image for example \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg==\"\n */\n public async addTexture(rapiTexture: RapiTexture, base64Image?: string) {\n return this._sceneManager.addTexture(rapiTexture, base64Image);\n }\n\n /**\n * Remove texture from the demo material\n * @param rapiTexture\n */\n public removeTexture(rapiTexture: RapiTexture) {\n return this._sceneManager.removeTexture(rapiTexture);\n }\n\n private _clearCaches() {\n this._rapiAccess.cleanUp();\n this._sceneManager.clearCache();\n }\n\n public getScene(): Scene {\n return this._sceneManager.getScene();\n }\n\n public updateScene(): void {\n this._sceneManager.updateScene();\n }\n\n /**\n * returns unit formatter for formatting input und output values in scene\n */\n public getUnitFormatter(): UnitFormatter {\n return this._unitFormatter;\n }\n\n /**\n * returns manager class to interface with indexedDB storage\n */\n public getStorage(): IdbManager {\n return this._idbManager;\n }\n\n public setEnvironmentMap(params: {\n url?: string;\n intensity?: number;\n rotation?: number;\n maxLightSources?: number;\n }): void {\n const { url, intensity, rotation, maxLightSources } = params;\n this._sceneManager.setEnvironmentMap(\n url,\n intensity,\n rotation,\n maxLightSources,\n );\n }\n\n /**\n * @internal\n * Use this callbacks to hook in your functionality\n */\n public get globalCallbacks(): GlobalCallback {\n return this._globalCallback;\n }\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport { UiCallback } from '../../common-core/src/utils/ui-callback';\nimport type { RapiMaterialShading } from '../../typings/rapi-types';\n\nexport default class RoomleMaterialViewerUiCallback extends UiCallback {\n constructor(creator: string) {\n super(creator);\n }\n\n /**\n * Gets called when a material parameter has been changed using the graphical user interface\n * @param materialShading\n */\n public onMaterialShadingChanged = (\n materialShading: RapiMaterialShading,\n ): void => undefined;\n}\n","import Logger from '../../../common-core/src/logger';\nimport ScriptLoader from '../../../common-core/src/script-loader';\nimport {\n DependencyInjectionAssignment,\n DI_TYPE,\n} from '../../../common-core/src/di/container';\nimport InputManager from '../../../common-core/src/input/input-manager';\nimport ConfiguratorMeshGenerator from '../../../configurator-core/src/webgl/configurator-mesh-generator';\nimport { RapiAccess } from '../../../common-core/src/rapi-access';\nimport RoomleMaterialViewerUiCallback from '../roomle-material-viewer-ui-callback';\n\nexport const INJECTABLES: DependencyInjectionAssignment[] = [\n new DependencyInjectionAssignment('script-loader', ScriptLoader),\n new DependencyInjectionAssignment('logger', Logger),\n new DependencyInjectionAssignment(\n 'input-manager',\n InputManager,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment(\n 'configurator-mesh-generator',\n ConfiguratorMeshGenerator,\n ),\n new DependencyInjectionAssignment('rapi-access', RapiAccess),\n new DependencyInjectionAssignment(\n 'roomle-material-viewer-ui-callback',\n RoomleMaterialViewerUiCallback,\n DI_TYPE.CONTEXT,\n ),\n];\n","import './utils/global-definitions';\nimport { Main, BASE_CONTEXT } from '../../common-core/src/main';\nimport type Logger from '../../common-core/src/logger';\nimport RoomleDependencyInjection from '../../common-core/src/di/roomle-dependency-injection';\nimport RoomleMaterialViewer from './roomle-material-viewer';\nimport { INJECTABLES } from './utils/injectables';\n\nexport class MaterialViewer extends Main {\n private _viewer: RoomleMaterialViewer;\n\n protected setupGlobals(): void {\n //globals are initialized in bootFinished()\n }\n\n protected setupDependencies(): void {\n RoomleDependencyInjection.setup(INJECTABLES);\n this.lookup<Logger>('logger', this._context);\n }\n\n protected cleanUpGlobals(): void {\n throw new Error('Method not implemented.');\n }\n\n protected cleanUpDependencies(): void {\n throw new Error('Method not implemented.');\n }\n\n protected async bootFinished(): Promise<void> {\n this._viewer = new RoomleMaterialViewer(this._context);\n\n if (!window.RoomleMaterialViewer) {\n window.RoomleMaterialViewer = this._viewer;\n }\n }\n\n public getApi(): RoomleMaterialViewer {\n return this._viewer;\n }\n\n protected getContextName(): string {\n return BASE_CONTEXT.MATERIAL_VIEWER;\n }\n}\n"],"mappings":";;;;;;;AAGA,IAAqB,IAArB,cAA2D,EAAgB;CACzE,IAAW,gBAA2C;AACpD,SAAO,KAAK;;GC0CE,IAAX,yBAAA,GAAA;QACL,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AA0B,MAAM,EAAY,EAC5C,KAAK,OAAe,UAAU,KAAK,SAAS;;CAG9C,iBAAiC;AAC/B,QAAU,MAAM,0BAA0B;;CAG5C,sBAAsC;AACpC,QAAU,MAAM,0BAA0B;;CAG5C,MAAgB,eAA8B;AAG5C,EAFA,KAAK,UAAU,IAAI,EAAqB,KAAK,SAAS,EAEjD,OAAO,yBACV,OAAO,uBAAuB,KAAK;;CAIvC,SAAsC;AACpC,SAAO,KAAK;;CAGd,iBAAmC;AACjC,SAAO,EAAa"}
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./planner-DY73rplC.mjs";
2
+ export { e as Planner };
@@ -0,0 +1,44 @@
1
+ import { B as e, G as t, N as n, Q as r, S as i, Z as a, et as o, it as s, n as c, o as l, q as u, r as d, s as f, t as p, x as m } from "./main-BxEZ11ag.mjs";
2
+ import { t as h } from "./script-loader-KBq8SjP6.mjs";
3
+ //#region packages/planner-core/src/input/planner-input-manager.ts
4
+ var g = class extends e {
5
+ _canDrag(e) {
6
+ return !0;
7
+ }
8
+ }, _ = [
9
+ new r("script-loader", h),
10
+ new r("planner-input-manager", g, a.CONTEXT),
11
+ new r("logger", u),
12
+ new r("planner-mesh-generator", l),
13
+ new r("configurator-view-model", m, a.CONTEXT),
14
+ new r("rapi-access", o),
15
+ new r("global-init-data", t),
16
+ new r("planner-selection-handler", i)
17
+ ], v = class extends c {
18
+ constructor(e, t) {
19
+ super(e), this._activePlugins = t || [];
20
+ }
21
+ setupGlobals() {}
22
+ setupDependencies() {
23
+ d.setup(_), this.lookup("logger", this._context), this.lookup("planner-kernel-access", this._context).init(n.PLANNER);
24
+ }
25
+ cleanUpGlobals() {
26
+ throw Error("Method not implemented.");
27
+ }
28
+ cleanUpDependencies() {
29
+ throw Error("Method not implemented.");
30
+ }
31
+ async bootFinished() {
32
+ this._planner = new f(this._context, this._activePlugins), this._planner.getMain = () => this, window.RoomlePlanner || (this._activePlugins.length, window.RoomlePlanner = this._planner), this.lookup("init-data", this._context)?.hi && s() && await this._planner.setupHomagIntelligence();
33
+ }
34
+ getApi() {
35
+ return this._planner;
36
+ }
37
+ getContextName() {
38
+ return p.PLANNER;
39
+ }
40
+ };
41
+ //#endregion
42
+ export { v as t };
43
+
44
+ //# sourceMappingURL=planner-DY73rplC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner-DY73rplC.mjs","names":[],"sources":["../../packages/planner-core/src/input/planner-input-manager.ts","../../packages/planner-core/src/utils/injectables.ts","../../packages/planner-core/src/planner.ts"],"sourcesContent":["import type { INPUT_EVENT_TYPE } from '../../../common-core/src/input/input-manager';\nimport InputManager from '../../../common-core/src/input/input-manager';\n\nexport default class PlannerInputManager extends InputManager {\n protected _canDrag(_type: INPUT_EVENT_TYPE): boolean {\n return true;\n }\n}\n","import ScriptLoader from '../../../common-core/src/script-loader';\nimport {\n DependencyInjectionAssignment,\n DI_TYPE,\n} from '../../../common-core/src/di/container';\nimport Logger from '../../../common-core/src/logger';\nimport { default as PlannerMeshGenerator } from '../webgl/planner-mesh-generator';\nimport { RapiAccess } from '../../../common-core/src/rapi-access';\nimport PlannerInputManager from '../input/planner-input-manager';\nimport PlannerSelectionHandler from './planner-selection-handler';\nimport GlobalInitData from '../../../common-core/src/utils/global-init-data';\nimport ConfiguratorViewModel from '../../../common-core/src/view-model/configurator-view-model';\n\nexport const INJECTABLES: DependencyInjectionAssignment[] = [\n new DependencyInjectionAssignment('script-loader', ScriptLoader),\n new DependencyInjectionAssignment(\n 'planner-input-manager',\n PlannerInputManager,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment('logger', Logger),\n new DependencyInjectionAssignment(\n 'planner-mesh-generator',\n PlannerMeshGenerator,\n ),\n new DependencyInjectionAssignment(\n 'configurator-view-model',\n ConfiguratorViewModel,\n DI_TYPE.CONTEXT,\n ),\n new DependencyInjectionAssignment('rapi-access', RapiAccess),\n new DependencyInjectionAssignment('global-init-data', GlobalInitData),\n new DependencyInjectionAssignment(\n 'planner-selection-handler',\n PlannerSelectionHandler,\n ),\n];\n","import './utils/global-definitions';\nimport { Main, BASE_CONTEXT } from '../../common-core/src/main';\nimport { RoomlePlanner } from './roomle-planner';\nimport RoomleDependencyInjection from '../../common-core/src/di/roomle-dependency-injection';\nimport { INJECTABLES } from './utils/injectables';\nimport type PlannerKernelAccess from './services/planner-kernel-access';\nimport type Logger from '../../common-core/src/logger';\nimport { KERNEL_TYPE } from '../../common-core/src/services/common-kernel-access';\nimport type { PluginName } from '../../configurator-core/src/utils/plugin-types';\nimport type InitData from '../../common-core/src/utils/init-data';\nimport { isInIframe } from '../../common-core/src/utils/rapi-utils';\n\nexport class Planner<\n P extends readonly PluginName[] = readonly [],\n> extends Main {\n private _planner: RoomlePlanner<P>;\n private _activePlugins: P;\n\n constructor(creator?: string, activePlugins?: P) {\n super(creator);\n this._activePlugins = (activePlugins || []) as P;\n }\n protected setupGlobals(): void {\n //globals are initialized in bootFinished()\n }\n\n protected setupDependencies(): void {\n RoomleDependencyInjection.setup(INJECTABLES);\n this.lookup<Logger>('logger', this._context);\n // instantiate kernel acccess\n // instantiate pka\n // set pka on kernel access\n const plannerKernelAccess = this.lookup<PlannerKernelAccess>(\n 'planner-kernel-access',\n this._context,\n );\n plannerKernelAccess.init(KERNEL_TYPE.PLANNER);\n }\n\n protected cleanUpGlobals(): void {\n throw new Error('Method not implemented.');\n }\n\n protected cleanUpDependencies(): void {\n throw new Error('Method not implemented.');\n }\n\n protected async bootFinished(): Promise<void> {\n this._planner = new RoomlePlanner<P>(this._context, this._activePlugins);\n\n this._planner.getMain = () => {\n return this;\n };\n\n if (!window.RoomlePlanner) {\n if (this._activePlugins.length === 0) {\n // cast to unknown because we know that the planner is a RoomlePlanner\n window.RoomlePlanner = this._planner as unknown as RoomlePlanner;\n } else {\n window.RoomlePlanner = this._planner as RoomlePlanner<\n readonly PluginName[]\n >;\n }\n }\n\n const initData = this.lookup<InitData>('init-data', this._context);\n\n if (initData?.hi && isInIframe()) {\n await this._planner.setupHomagIntelligence();\n }\n }\n\n public getApi(): RoomlePlanner<P> {\n return this._planner;\n }\n\n protected getContextName(): string {\n return BASE_CONTEXT.PLANNER;\n }\n}\n"],"mappings":";;;AAGA,IAAqB,IAArB,cAAiD,EAAa;CAC5D,SAAmB,GAAkC;AACnD,SAAO;;GCQE,IAA+C;CAC1D,IAAI,EAA8B,iBAAiB,EAAa;CAChE,IAAI,EACF,yBACA,GACA,EAAQ,QACT;CACD,IAAI,EAA8B,UAAU,EAAO;CACnD,IAAI,EACF,0BACA,EACD;CACD,IAAI,EACF,2BACA,GACA,EAAQ,QACT;CACD,IAAI,EAA8B,eAAe,EAAW;CAC5D,IAAI,EAA8B,oBAAoB,EAAe;CACrE,IAAI,EACF,6BACA,EACD;CACF,ECxBY,IAAb,cAEU,EAAK;CAIb,YAAY,GAAkB,GAAmB;AAE/C,EADA,MAAM,EAAQ,EACd,KAAK,iBAAkB,KAAiB,EAAE;;CAE5C,eAA+B;CAI/B,oBAAoC;AAMN,EAL5B,EAA0B,MAAM,EAAY,EAC5C,KAAK,OAAe,UAAU,KAAK,SAAS,EAIhB,KAAK,OAC/B,yBACA,KAAK,SACN,CACmB,KAAK,EAAY,QAAQ;;CAG/C,iBAAiC;AAC/B,QAAU,MAAM,0BAA0B;;CAG5C,sBAAsC;AACpC,QAAU,MAAM,0BAA0B;;CAG5C,MAAgB,eAA8B;AAoB5C,EAnBA,KAAK,WAAW,IAAI,EAAiB,KAAK,UAAU,KAAK,eAAe,EAExE,KAAK,SAAS,gBACL,MAGJ,OAAO,kBACN,KAAK,eAAe,QAEtB,OAAO,gBAAgB,KAAK,WAQf,KAAK,OAAiB,aAAa,KAAK,SAAS,EAEpD,MAAM,GAAY,IAC9B,MAAM,KAAK,SAAS,wBAAwB;;CAIhD,SAAkC;AAChC,SAAO,KAAK;;CAGd,iBAAmC;AACjC,SAAO,EAAa"}
@@ -0,0 +1,55 @@
1
+ import { n as e, r as t, t as n } from "./decorate-C1QnXPYw.mjs";
2
+ //#region packages/configurator-core/src/webgl/plugin-system.ts
3
+ var r = class {
4
+ constructor(e) {
5
+ this._creator_ = e;
6
+ }
7
+ setScene(e) {}
8
+ setUiScene(e) {}
9
+ updateBounds(e) {}
10
+ clearScene(e, t) {}
11
+ moveCameraEnd(e) {}
12
+ moveCameraStart(e) {}
13
+ needsUiScene() {
14
+ return !1;
15
+ }
16
+ }, i = class {
17
+ constructor(e) {
18
+ this._plugins = [], this._creator_ = e;
19
+ }
20
+ async init(e, t, n) {
21
+ this._scene = e, this._uiScene = t, this._cameraPosition = n;
22
+ let { bananaForScale: r } = this._initData;
23
+ r && await import("./banana-for-scale-C_iNmlCT.mjs").then(({ default: e }) => this._plugins.push(new e(this._creator_))), this._plugins.forEach((e) => e.setScene(this._scene)), this._plugins.forEach((e) => e.setUiScene(this._uiScene)), this._plugins.forEach((e) => e.updateBounds(this._bounds)), this._plugins.forEach((e) => e.moveCameraEnd(this._cameraPosition));
24
+ }
25
+ addPlugin(e) {
26
+ this._plugins.push(e), e.setScene(this._scene), e.setUiScene(this._uiScene), e.updateBounds(this._bounds), e.moveCameraEnd(this._cameraPosition);
27
+ }
28
+ updateBounds(e) {
29
+ this._bounds = e, this._plugins.forEach((t) => t.updateBounds(e));
30
+ }
31
+ clearScene(e, t) {
32
+ this._plugins.forEach((n) => n.clearScene(e, t));
33
+ }
34
+ getActivePlugins() {
35
+ return this._plugins;
36
+ }
37
+ getPlugin(e) {
38
+ for (let t of this._plugins) if (t instanceof e) return t;
39
+ return null;
40
+ }
41
+ moveCameraEnd(e) {
42
+ this._cameraPosition = e, this._plugins.forEach((t) => t.moveCameraEnd(e));
43
+ }
44
+ moveCameraStart(e) {
45
+ this._cameraPosition = e, this._plugins.forEach((t) => t.moveCameraStart(e));
46
+ }
47
+ needsUiScene() {
48
+ return this._plugins.map((e) => e.needsUiScene()).reduce((e, t) => e || t, !1);
49
+ }
50
+ };
51
+ n([t, e("design:type", Object)], i.prototype, "_initData", void 0);
52
+ //#endregion
53
+ export { r as n, i as t };
54
+
55
+ //# sourceMappingURL=plugin-system-D9K46xJk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-system-D9K46xJk.mjs","names":[],"sources":["../../packages/configurator-core/src/webgl/plugin-system.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport type { Context } from '../../../common-core/src/di/context';\nimport inject from '../../../common-core/src/di/inject';\nimport type InitData from '../../../common-core/src/utils/init-data';\nimport type { Box3, Scene, Vector3 } from 'three';\n\nexport declare interface ScenePluginHooks {\n updateBounds(bounds: Box3): void;\n\n clearScene(scene: Scene, uiScene: Scene): void;\n\n moveCameraEnd(position: Vector3): void;\n\n moveCameraStart(position: Vector3): void;\n\n needsUiScene(): boolean;\n}\n\nexport declare interface ScenePlugin extends ScenePluginHooks, Context {\n setScene(scene: Scene): void;\n\n setUiScene(uiScene: Scene): void;\n}\n\nexport class ScenePluginDefaultImplementation implements ScenePlugin {\n public _creator_: string;\n\n constructor(creator: string) {\n this._creator_ = creator;\n }\n\n public setScene(scene: Scene): void {\n //noop\n }\n\n public setUiScene(uiScene: Scene): void {\n //noop\n }\n\n public updateBounds(bounds: Box3): void {\n //noop\n }\n\n public clearScene(scene: Scene, uiScene: Scene): void {\n //noop\n }\n\n public moveCameraEnd(position: Vector3): void {\n //noop\n }\n\n public moveCameraStart(position: Vector3): void {\n //noop\n }\n\n public needsUiScene(): boolean {\n return false;\n }\n}\n\nexport default class PluginSystem implements Context, ScenePluginHooks {\n public _creator_: string;\n\n @inject\n private _initData: InitData;\n\n private _scene: Scene;\n private _uiScene: Scene;\n private _bounds: Box3;\n private _cameraPosition: Vector3;\n\n private _plugins: ScenePlugin[] = [];\n\n constructor(creator: string) {\n this._creator_ = creator;\n }\n\n public async init(scene: Scene, uiScene: Scene, cameraPosition: Vector3) {\n this._scene = scene;\n this._uiScene = uiScene;\n this._cameraPosition = cameraPosition;\n const { bananaForScale } = this._initData;\n\n if (bananaForScale) {\n await import('./banana-for-scale').then(({ default: BananaForScale }) =>\n this._plugins.push(new BananaForScale(this._creator_)),\n );\n }\n\n this._plugins.forEach((plugin) => plugin.setScene(this._scene));\n this._plugins.forEach((plugin) => plugin.setUiScene(this._uiScene));\n this._plugins.forEach((plugin) => plugin.updateBounds(this._bounds));\n this._plugins.forEach((plugin) =>\n plugin.moveCameraEnd(this._cameraPosition),\n );\n }\n\n public addPlugin(plugin: ScenePlugin) {\n this._plugins.push(plugin);\n plugin.setScene(this._scene);\n plugin.setUiScene(this._uiScene);\n plugin.updateBounds(this._bounds);\n plugin.moveCameraEnd(this._cameraPosition);\n }\n\n public updateBounds(bounds: Box3) {\n this._bounds = bounds;\n this._plugins.forEach((plugin) => plugin.updateBounds(bounds));\n }\n\n public clearScene(scene: Scene, uiScene: Scene): void {\n this._plugins.forEach((plugin) => plugin.clearScene(scene, uiScene));\n }\n\n public getActivePlugins(): ScenePlugin[] {\n return this._plugins;\n }\n\n public getPlugin<T extends ScenePlugin>(type: any): T {\n for (let plugin of this._plugins) {\n if (plugin instanceof type) {\n return plugin as T;\n }\n }\n return null;\n }\n\n public moveCameraEnd(position: Vector3): void {\n this._cameraPosition = position;\n this._plugins.forEach((plugin) => plugin.moveCameraEnd(position));\n }\n\n public moveCameraStart(position: Vector3): void {\n this._cameraPosition = position;\n this._plugins.forEach((plugin) => plugin.moveCameraStart(position));\n }\n\n public needsUiScene(): boolean {\n return this._plugins\n .map((plugin) => plugin.needsUiScene())\n .reduce(\n (previousValue, currentValue) => previousValue || currentValue,\n false,\n );\n }\n}\n"],"mappings":";;AAwBA,IAAa,IAAb,MAAqE;CAGnE,YAAY,GAAiB;AAC3B,OAAK,YAAY;;CAGnB,SAAgB,GAAoB;CAIpC,WAAkB,GAAsB;CAIxC,aAAoB,GAAoB;CAIxC,WAAkB,GAAc,GAAsB;CAItD,cAAqB,GAAyB;CAI9C,gBAAuB,GAAyB;CAIhD,eAA+B;AAC7B,SAAO;;GAIU,IAArB,MAAuE;CAarE,YAAY,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