@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,450 +0,0 @@
1
- import { C as I, S as F, a as R, b as T, i as f, D as C, c as A, P as U, B as y, M as B, d as D, e as k, f as w, g as S, h as v, s as L, j as P, k as x, l as V, F as O, m as z, n as b, o as G, T as H, p as j, q as N, R as d, r as s, U as W, t as m, u as q, L as X, I as Y, v as E, w as Z, x as $, y as J, z as K, A as Q } from "./index-C-Prfui2.mjs";
2
- class ee extends I {
3
- get cameraControl() {
4
- return this._cameraControl;
5
- }
6
- }
7
- var te = Object.defineProperty, g = (o, e, t, r) => {
8
- for (var a = void 0, n = o.length - 1, _; n >= 0; n--)
9
- (_ = o[n]) && (a = _(e, t, a) || a);
10
- return a && te(e, t, a), a;
11
- };
12
- const i = { x: 1, y: 1, z: 1 };
13
- class c extends F {
14
- constructor(e, t) {
15
- super(e, t, R.RMV, T.CAMERA_3D), this._sceneParams = {
16
- type: "cube"
17
- /* CUBE */
18
- }, this._materialParams = {
19
- color: "#ffffff",
20
- metallic: 0.5,
21
- alpha: 0,
22
- alphaCutoff: 0,
23
- doubleSided: !1
24
- }, this._initializeRendererSettings(), this._initScene();
25
- }
26
- // If renderer is not ready yet, will retry on next tick.
27
- // This is necessary for dynamic WebGPU renderer imports.
28
- _initializeRendererSettings() {
29
- if (!this._renderer) {
30
- setTimeout(() => this._initializeRendererSettings(), 0);
31
- return;
32
- }
33
- (f(this._renderer) ? this._renderer.capabilities.maxTextures : C) > 8 && this.loadDynamicLightSetting(
34
- A.createDynamicLightSettingSource(
35
- null,
36
- U.CAMERA
37
- )
38
- );
39
- }
40
- _initScene() {
41
- const e = new y(i.x, i.y, i.z, 100, 100, 100), t = B.createMeshPhysicalMaterial({
42
- color: this._initData.colors.PRIMARY
43
- });
44
- this._setMaterial(t), this._mesh = new D(e, this._material), this._mesh.castShadow = !0, this._mesh.position.setY(i.y / 2), this._scene.add(this._mesh);
45
- const { initialFloorMaterial: r } = this._initData;
46
- if (r ? this.changeFloorMaterialById(r) : this._environment = new k(
47
- this._scene,
48
- void 0,
49
- new w(16777215)
50
- ), this.cameraBehaviour.cameraControl instanceof S) {
51
- const a = new v();
52
- a.setFromObject(this._mesh), console.trace("reset camera"), this.cameraBehaviour.cameraControl.updateAndReset(a);
53
- }
54
- this.showGUI();
55
- }
56
- loadMaterialId(e) {
57
- return new Promise((t) => {
58
- this._configuratorMeshGenerator.loadMaterial(e, i.x * 1e3, i.y * 1e3).then((r) => {
59
- this._setMaterial(r), this._mesh.material = this._material, this._updateGUI(), this._requestRender(), t();
60
- });
61
- });
62
- }
63
- loadMaterial(e) {
64
- return new Promise((t) => {
65
- e.__rapi_path__ || (e.__rapi_path__ = "materials"), this._mesh.material = this._material, this._configuratorMeshGenerator.loadTextures(e, this._material, i.x * 100, i.y * 100).then(() => {
66
- this._updateGUI(), this._requestRender();
67
- }), t();
68
- });
69
- }
70
- loadMaterialShading(e) {
71
- return new Promise((t) => {
72
- let r = { shading: e };
73
- this._setMaterial(L(this._material, r)), this._mesh.material = this._material, this._updateGUI(), this._requestRender(), t();
74
- });
75
- }
76
- resetMaterial() {
77
- this._initScene();
78
- }
79
- _setMaterial(e) {
80
- this._material = e, this._materialParams.alpha = e.opacity, this._materialParams.alphaCutoff = e.alphaTest, this._materialParams.color = "#" + e.color.getHexString(), this._materialParams.doubleSided = e.side === P, this._materialParams.metallic = e.metalness === 1 ? 1 : e.reflectivity;
81
- }
82
- getMaterialShading(e = 1) {
83
- return x(this._material, e);
84
- }
85
- createCameraControl(e, t) {
86
- this._changeCameraBehaviour(
87
- new ee(
88
- new S(this._creator_, this._getInputManager(), void 0),
89
- this._cameraBehaviourState
90
- )
91
- );
92
- }
93
- _getInputManager() {
94
- return this._inputManager;
95
- }
96
- sceneChanged() {
97
- }
98
- getBounds() {
99
- return this._mesh ? new v().setFromObject(this._mesh) : null;
100
- }
101
- getGeometryBounds() {
102
- return null;
103
- }
104
- _guiLoaded() {
105
- this._updateGUI();
106
- }
107
- _updateGUI() {
108
- let e = V();
109
- e && (this._guiGeometryFolder || (this._guiGeometryFolder = e.addFolder("Geometry"), this._guiGeometryFolder.add(this._sceneParams, "type", {
110
- Cube: "cube",
111
- Sphere: "sphere",
112
- PlaneVertical: "plane_vertical",
113
- PlaneHorizontal: "plane_horizontal"
114
- /* PLANE_HORIZONTAL */
115
- }).onChange((t) => {
116
- console.log(t), this._setGeometry();
117
- })), this._material && (this._guiMaterialFolder && e.removeFolder(this._guiMaterialFolder), this._guiMaterialFolder = e.addFolder("Material"), this._guiMaterialFolder.addColor(this._materialParams, "color").onChange((t) => {
118
- this._material.color = new w(t), this._shadingChanged();
119
- }), this._guiMaterialFolder.add(this._materialParams, "metallic").min(0).max(1).step(0.01).onChange((t) => {
120
- this._material.metalness = t === 1 ? 1 : 0.5, this._material.reflectivity = t || 0.5, this._shadingChanged();
121
- }), this._guiMaterialFolder.add(this._material, "roughness").min(0).max(1).step(0.01).onChange((t) => {
122
- this._shadingChanged();
123
- }), this._guiMaterialFolder.add(this._material, "transmission").min(0).max(1).step(0.01).onChange((t) => {
124
- this._material.transmission = t, t > 0 && (this._material.opacity = 1, this._material.alphaTest = 0.5, this._material.depthWrite = !1, this._material.transparent = !0, this._material.metalness = 0), this._mesh.castShadow = !this._material.transparent, this._shadingChanged();
125
- }), this._guiMaterialFolder.add(this._materialParams, "alpha").min(0).max(1).step(0.01).onChange((t) => {
126
- this._material.transparent = t < 1, this._material.opacity = t, this._material.depthWrite = t >= 1, this._mesh.castShadow = !this._material.transparent, this._shadingChanged();
127
- }), this._guiMaterialFolder.add(this._materialParams, "alphaCutoff").min(0).max(1).step(0.01).onChange((t) => {
128
- t ? this._material.alphaTest = t : this._material.alphaTest = 0, this._shadingChanged();
129
- }), this._guiMaterialFolder.add(this._materialParams, "doubleSided").onChange((t) => {
130
- t ? this._material.side = P : this._material.side = O, this._shadingChanged();
131
- })), this._addGUIListener(e));
132
- }
133
- _shadingChanged() {
134
- this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(
135
- x(this._material)
136
- );
137
- }
138
- setGeometry(e) {
139
- this._sceneParams.type = e, this._setGeometry();
140
- }
141
- _setGeometry() {
142
- let e;
143
- this._sceneParams.type === "cube" && (e = new y(i.x, i.y, i.z, 100, 100, 100)), this._sceneParams.type === "sphere" && (e = new z(0.5, 100, 100)), this._sceneParams.type === "plane_horizontal" && (e = new b(i.x, i.z), e.rotateX(-Math.PI / 2)), this._sceneParams.type === "plane_vertical" && (e = new b(i.x, i.z)), this._mesh.geometry = e, this._renderEverything();
144
- }
145
- async changeFloorMaterialById(e) {
146
- const t = await this._rapiAccess.getMaterial(e);
147
- return (!this._environment || !(this._environment instanceof G)) && (this._environment = new G(
148
- this._scene,
149
- this._environment,
150
- !0
151
- )), new Promise((r, a) => {
152
- this._environment.changeFloorMaterial(t, this._maxAnisotropy).then(() => {
153
- this._requestRender(), r();
154
- }, a);
155
- });
156
- }
157
- async addTexture(e, t) {
158
- const r = i.x * 100, a = i.y * 100, n = r / (e.mmWidth === 0 ? 1 : e.mmWidth), _ = a / (e.mmHeight === 0 ? 1 : e.mmHeight), M = f(this._renderer) ? this._renderer.capabilities.maxTextures : C;
159
- if (t) {
160
- const u = new Image();
161
- u.src = t;
162
- const p = new H();
163
- p.image = u, u.onload = function() {
164
- p.needsUpdate = !0;
165
- }, j(
166
- p,
167
- e,
168
- this._material,
169
- this._maxAnisotropy,
170
- n,
171
- _,
172
- M
173
- );
174
- } else
175
- await N(
176
- e.image,
177
- e,
178
- this._material,
179
- this._maxAnisotropy,
180
- n,
181
- _,
182
- M
183
- );
184
- this._requestRender();
185
- }
186
- removeTexture(e) {
187
- e.mapping === d.ORM && (this._material.aoMap = null, this._material.roughnessMap = null, this._material.metalnessMap = null), (e.mapping === d.RGB || e.mapping === d.RGBA) && (this._material.map = null), e.mapping === d.XYZ && (this._material.normalMap = null), this._material.needsUpdate = !0, this._requestRender();
188
- }
189
- clearCache() {
190
- this._configuratorMeshGenerator.clear();
191
- }
192
- }
193
- g([
194
- s
195
- ], c.prototype, "_inputManager");
196
- g([
197
- s
198
- ], c.prototype, "_configuratorMeshGenerator");
199
- g([
200
- s
201
- ], c.prototype, "_roomleMaterialViewerUiCallback");
202
- g([
203
- s
204
- ], c.prototype, "_rapiAccess");
205
- var ae = Object.defineProperty, l = (o, e, t, r) => {
206
- for (var a = void 0, n = o.length - 1, _; n >= 0; n--)
207
- (_ = o[n]) && (a = _(e, t, a) || a);
208
- return a && ae(e, t, a), a;
209
- };
210
- class h {
211
- constructor(e) {
212
- this._creator_ = e;
213
- }
214
- setCameraOffset(e) {
215
- this._sceneManager.setCameraOffset(e);
216
- }
217
- getCameraOffset() {
218
- return this._sceneManager.getCameraOffset();
219
- }
220
- init(e) {
221
- return this._domHelper.setDomElement(e), this._sceneManager ? (this._lifeCycleManager.resume(), Promise.resolve()) : new Promise(this._initPromiseCallback.bind(this));
222
- }
223
- _initPromiseCallback(e, t) {
224
- this._sceneManager = new c(this._creator_, {
225
- left: 0,
226
- top: 1,
227
- right: 1,
228
- bottom: 0
229
- }), this._sceneManager.enableHD(), e();
230
- }
231
- get callbacks() {
232
- return this._roomleMaterialViewerUiCallback;
233
- }
234
- set callbacks(e) {
235
- this._roomleMaterialViewerUiCallback = e;
236
- }
237
- loadMaterialShading(e) {
238
- return this._sceneManager.loadMaterialShading(e);
239
- }
240
- resetMaterial() {
241
- this._sceneManager.resetMaterial();
242
- }
243
- loadMaterial(e, t = {}) {
244
- return t.flushCache && this._clearCaches(), this._sceneManager.loadMaterial(e);
245
- }
246
- loadMaterialId(e, t = {}) {
247
- return t.flushCache && this._clearCaches(), this._sceneManager.loadMaterialId(e);
248
- }
249
- getMaterialShading(e = 1) {
250
- return this._sceneManager.getMaterialShading(e);
251
- }
252
- /**
253
- * Loads a SceneSettings object, currently it can can contain a light setting definition
254
- * (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}).
255
- * @param sceneSettings
256
- */
257
- loadSceneSetting(e) {
258
- return this._sceneManager.loadSceneSettings(e);
259
- }
260
- setOverrides(e) {
261
- e && this._initData.setOverrides(e);
262
- }
263
- updateSize() {
264
- this._sceneManager.updateCamera();
265
- }
266
- /**
267
- * Return the main class which has access to lifecycle events and RapiAccess.
268
- * Hidden because it's only useful for embedding API.
269
- * Has to be overridden by main class.
270
- * @hidden
271
- */
272
- getMain() {
273
- }
274
- resumeTest(e) {
275
- this._domHelper.setDomElement(e), this._lifeCycleManager.resume();
276
- }
277
- pauseTest() {
278
- this._lifeCycleManager.pause();
279
- }
280
- showGUI() {
281
- this._sceneManager.showGUI();
282
- }
283
- /**
284
- * Sets the material of the floor to the given material id.
285
- * If the current environment is not floor environment it will be changed
286
- *
287
- * Example material ids are:
288
- * roomle_floor:DresdenEiche
289
- * roomle_floor:Ibiza
290
- * roomle_floor:Palma
291
- * roomle_floor:Elba
292
- * roomle_floor:Manacor
293
- * roomle_floor:KernEiche
294
- * roomle_floor:KieferScandic
295
- * roomle_floor:EicheHabsburg
296
- * roomle_floor:FuldaKiefer
297
- * roomle_floor:Ashton
298
- * roomle_floor:EicheLondon
299
- *
300
- * @param materialId
301
- * @returns promise that resolves when material has been changed
302
- */
303
- async changeFloorMaterialById(e) {
304
- return this._sceneManager.changeFloorMaterialById(e);
305
- }
306
- /**
307
- * Set the geometry of the demo material mesh
308
- *
309
- * Possible parameter:
310
- * 'cube',
311
- * 'sphere',
312
- * 'plane_vertical',
313
- * 'plane_horizontal'
314
- *
315
- * @param type
316
- */
317
- setGeometry(e) {
318
- this._sceneManager.setGeometry(e);
319
- }
320
- /**
321
- * Set a texture on the demo material, if no base64Image is set, the image field of rapiTexture is used
322
- * @param rapiTexture
323
- * @param base64Image for example "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPj/HwADBwIAMCbHYQAAAABJRU5ErkJggg=="
324
- */
325
- async addTexture(e, t) {
326
- return this._sceneManager.addTexture(e, t);
327
- }
328
- /**
329
- * Remove texture from the demo material
330
- * @param rapiTexture
331
- */
332
- removeTexture(e) {
333
- return this._sceneManager.removeTexture(e);
334
- }
335
- _clearCaches() {
336
- this._rapiAccess.cleanUp(), this._sceneManager.clearCache();
337
- }
338
- getScene() {
339
- return this._sceneManager.getScene();
340
- }
341
- updateScene() {
342
- this._sceneManager.updateScene();
343
- }
344
- /**
345
- * returns unit formatter for formatting input und output values in scene
346
- */
347
- getUnitFormatter() {
348
- return this._unitFormatter;
349
- }
350
- /**
351
- * returns manager class to interface with indexedDB storage
352
- */
353
- getStorage() {
354
- return this._idbManager;
355
- }
356
- setEnvironmentMap(e) {
357
- const { url: t, intensity: r, rotation: a, maxLightSources: n } = e;
358
- this._sceneManager.setEnvironmentMap(
359
- t,
360
- r,
361
- a,
362
- n
363
- );
364
- }
365
- /**
366
- * @internal
367
- * Use this callbacks to hook in your functionality
368
- */
369
- get globalCallbacks() {
370
- return this._globalCallback;
371
- }
372
- }
373
- l([
374
- s
375
- ], h.prototype, "_domHelper");
376
- l([
377
- s
378
- ], h.prototype, "_scriptLoader");
379
- l([
380
- s
381
- ], h.prototype, "_lifeCycleManager");
382
- l([
383
- s
384
- ], h.prototype, "_roomleMaterialViewerUiCallback");
385
- l([
386
- s
387
- ], h.prototype, "_initData");
388
- l([
389
- s
390
- ], h.prototype, "_globalCallback");
391
- l([
392
- s
393
- ], h.prototype, "_rapiAccess");
394
- l([
395
- s
396
- ], h.prototype, "_unitFormatter");
397
- l([
398
- s
399
- ], h.prototype, "_idbManager");
400
- class ie extends W {
401
- constructor(e) {
402
- super(e), this.onMaterialShadingChanged = (t) => {
403
- };
404
- }
405
- }
406
- const re = [
407
- new m("script-loader", q),
408
- new m("logger", X),
409
- new m(
410
- "input-manager",
411
- Y,
412
- E.CONTEXT
413
- ),
414
- new m(
415
- "configurator-mesh-generator",
416
- Z
417
- ),
418
- new m("rapi-access", $),
419
- new m(
420
- "roomle-material-viewer-ui-callback",
421
- ie,
422
- E.CONTEXT
423
- )
424
- ];
425
- class ne extends J {
426
- setupGlobals() {
427
- }
428
- setupDependencies() {
429
- K.setup(re), this.lookup("logger", this._context);
430
- }
431
- cleanUpGlobals() {
432
- throw new Error("Method not implemented.");
433
- }
434
- cleanUpDependencies() {
435
- throw new Error("Method not implemented.");
436
- }
437
- async bootFinished() {
438
- this._viewer = new h(this._context), window.RoomleMaterialViewer || (window.RoomleMaterialViewer = this._viewer);
439
- }
440
- getApi() {
441
- return this._viewer;
442
- }
443
- getContextName() {
444
- return Q.MATERIAL_VIEWER;
445
- }
446
- }
447
- export {
448
- ne as MaterialViewer
449
- };
450
- //# sourceMappingURL=material-viewer-DyVGp6Xm.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"material-viewer-DyVGp6Xm.mjs","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 this.loadDynamicLightSetting(\n DynamicLightSettingLoader.createDynamicLightSettingSource(\n null,\n PREDEFINED_LIGHTSETTING.CAMERA,\n ),\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"],"names":["MaterialViewerCameraBehaviour","CameraBehaviour","SIZE","MaterialViewerSceneManager","SceneManager","creator","offset","CANVAS_ID","CAMERA_TYPE","isWebGLRenderer","DEFAULT_WEBGPU_MAX_SAMPLES","DynamicLightSettingLoader","PREDEFINED_LIGHTSETTING","geometry","BoxGeometry","meshPhysicalMaterial","MaterialCreator","Mesh","initialFloorMaterial","BackgroundEnvironment","Color","CameraControl3D","boundingBox","Box3","materialId","resolve","material","materialShading","setMaterial","DoubleSide","version","getMaterialShading","_mode","_offset","gui","getGUI","type","color","metallic","_roughness","transmission","alpha","alphaCutoff","doubleSided","FrontSide","SphereGeometry","PlaneGeometry","FloorEnvironment","reject","rapiTexture","base64Image","width","height","repeatWidth","repeatHeight","maxTextures","image","texture","Texture","addExistingTexture","addTexture","RAPI_TEXTURE_TYPE","__decorateClass","inject","RoomleMaterialViewer","element","_reject","callback","options","sceneSettings","initData","params","url","intensity","rotation","maxLightSources","RoomleMaterialViewerUiCallback","UiCallback","INJECTABLES","DependencyInjectionAssignment","ScriptLoader","Logger","InputManager","DI_TYPE","ConfiguratorMeshGenerator","RapiAccess","MaterialViewer","Main","RoomleDependencyInjection","BASE_CONTEXT"],"mappings":";AAGA,MAAqBA,WAAsCC,EAAgB;AAAA,EACzE,IAAW,gBAA2C;AACpD,WAAO,KAAK;AAAA,EACd;AACF;;;;;;AC+CA,MAAMC,IAAO,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,EAAA;AAC9B,MAAqBC,UAAmCC,EAAa;AAAA,EA4BnE,YAAYC,GAAiBC,GAAsB;AACjD,UAAMD,GAASC,GAAQC,EAAU,KAAKC,EAAY,SAAS,GAZ7D,KAAQ,eAAe;AAAA,MACrB,MAAM;AAAA;AAAA,IAAA,GAER,KAAQ,kBAAkB;AAAA,MACxB,OAAO;AAAA,MACP,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa;AAAA,MACb,aAAa;AAAA,IAAA,GAOb,KAAK,4BAAA,GAEL,KAAK,WAAA;AAAA,EACP;AAAA;AAAA;AAAA,EAIQ,8BAAoC;AAC1C,QAAI,CAAC,KAAK,WAAW;AAEnB,iBAAW,MAAM,KAAK,4BAAA,GAA+B,CAAC;AACtD;AAAA,IACF;AAKA,KAHoBC,EAAgB,KAAK,SAAS,IAC9C,KAAK,UAAU,aAAa,cAC5BC,KACc,KAChB,KAAK;AAAA,MACHC,EAA0B;AAAA,QACxB;AAAA,QACAC,EAAwB;AAAA,MAAA;AAAA,IAC1B;AAAA,EAGN;AAAA,EAEQ,aAAa;AACnB,UAAMC,IAAW,IAAIC,EAAYZ,EAAK,GAAGA,EAAK,GAAGA,EAA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,KAAK,QAAQ;AAAA,EAC7C;AAAA,EAEU,iBAAuB;AAC/B,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC3C;AAAA,EAEU,sBAA4B;AACpC,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC3C;AAAA,EAEA,MAAgB,eAA8B;AAC5C,SAAK,UAAU,IAAId,EAAqB,KAAK,QAAQ,GAEhD,OAAO,yBACV,OAAO,uBAAuB,KAAK;AAAA,EAEvC;AAAA,EAEO,SAA+B;AACpC,WAAO,KAAK;AAAA,EACd;AAAA,EAEU,iBAAyB;AACjC,WAAOyB,EAAa;AAAA,EACtB;AACF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"roomle-sdk.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- (()=>{var m=(o,e)=>o!=null?typeof o=="string"?o==="true":o===!0:(typeof e=="string"&&(e=parseInt(e,10)),e>=200&&e<300);var h=40,a=class{constructor(){this._queue=[];this._pendingRequests=0}_nextSlot(){if(this._pendingRequests-=1,!this._queue.length)return;let{request:e,resolve:t,reject:n}=this._queue.shift();this._fetch(e).then(t,n)}_fetch(e,t={},n={}){return this._pendingRequests+=1,new Promise((s,i)=>{self.fetch(e,t).then(async function(r){this._nextSlot();let l=n.checkResponse?await n.checkResponse(r)!==!1:!0;if(m(r.ok,r.status)&&l)s(...arguments);else{let d=r?.url||"URL unknown";i(new Error(r.statusText||'Http error "'+(r&&r.status?r.status:"unknown")+'", for "'+d+'"'))}}.bind(this),r=>{this._nextSlot(),i(r)})})}fetch(e,t={},n={}){return this._pendingRequests>=h?new Promise((i,r)=>this._queue.push({request:e,resolve:i,reject:r})):this._fetch(e,t,n)}};var _=0;var c=class{constructor(e,t){this._callbacks=e;this.eventListener=t;this.eventListener.addEventListener("message",this,!1)}get eventPoster(){return this._eventPoster&&this._eventPoster.postMessage?this._eventPoster:this.eventListener&&this.eventListener.postMessage?this.eventListener:{postMessage:()=>{}}}hasEventPoster(){return!!this._eventPoster}nextConversationId(){return _++}setEventPoster(e){this._eventPoster=e}handleEvent(e){if(!e||!e.data)return;let[t,n,s]=JSON.parse(e.data);if(!t||t.indexOf("rml")!==0)return;let[i,r]=t.split("."),l=parseInt(r,10);this._callbacks.onCommand(l,parseInt(n,10),s)}};var u=class extends c{constructor(e,t){super(e,t||self)}sendToMainThread(e,t,n){let s=JSON.stringify(["rml."+e,t,n]);!this.hasEventPoster()&&self.ServiceWorkerGlobalScope&&this.eventListener instanceof self.ServiceWorkerGlobalScope?clients.matchAll({includeUncontrolled:!0}).then(i=>{i.forEach(r=>r.postMessage(s))},i=>console.error(i)):this.eventPoster.postMessage(s)}};var p=class{constructor(e){this._networkLayer=e}loadAsset(e){return this._networkLayer.fetch(e).then(t=>t.blob()).then(t=>new Promise(n=>n(URL.createObjectURL(t)))).catch(t=>new Promise((n,s)=>s(t)))}},f=class{constructor(){this._communicationInterface=new u(this)}onCommand(e,t,n){switch(e){case 1:this._loader=new p(new a),this._communicationInterface.sendToMainThread(4,t,[]);break;case 5:if(!this._loader)return;this._loader.loadAsset(n).then(s=>{this._communicationInterface.sendToMainThread(3,t,s)},s=>this._communicationInterface.sendToMainThread(2,t,{message:s.message}))}}};})();