@roomle/web-sdk 2.31.0-alpha.2 → 2.31.0-alpha.3

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 (212) hide show
  1. package/lib/{banana-for-scale-95bb0a36.nomodule.js → banana-for-scale-141aac17.nomodule.js} +2 -2
  2. package/lib/{banana-for-scale-95bb0a36.nomodule.js.map → banana-for-scale-141aac17.nomodule.js.map} +1 -1
  3. package/lib/{banana-for-scale-c62bb269.js → banana-for-scale-22914fa9.js} +2 -2
  4. package/lib/{banana-for-scale-c62bb269.js.map → banana-for-scale-22914fa9.js.map} +1 -1
  5. package/lib/{budgeteer-measure-8cfea554.js → budgeteer-measure-700b4d27.js} +2 -2
  6. package/lib/{budgeteer-measure-8cfea554.js.map → budgeteer-measure-700b4d27.js.map} +1 -1
  7. package/lib/budgeteer-measure.nomodule.js +1 -1
  8. package/lib/{component-dimensioning-032b19a5.nomodule.js → component-dimensioning-5e747b61.nomodule.js} +2 -2
  9. package/lib/component-dimensioning-5e747b61.nomodule.js.map +1 -0
  10. package/lib/{component-dimensioning-231c9af2.js → component-dimensioning-fb7c1c69.js} +2 -2
  11. package/lib/component-dimensioning-fb7c1c69.js.map +1 -0
  12. package/lib/configurator-ac4b6505.js +2 -0
  13. package/lib/{configurator-3570c605.js.map → configurator-ac4b6505.js.map} +1 -1
  14. package/lib/configurator-cefab5fe.nomodule.js +2 -0
  15. package/lib/{configurator-08e58911.nomodule.js.map → configurator-cefab5fe.nomodule.js.map} +1 -1
  16. package/lib/configurator-main-5779d018.js +2 -0
  17. package/lib/configurator-main-5779d018.js.map +1 -0
  18. package/lib/configurator-main.nomodule.js +1 -1
  19. package/lib/configurator-mesh-generator-5cd4381f.js +2 -0
  20. package/lib/configurator-mesh-generator-5cd4381f.js.map +1 -0
  21. package/lib/configurator-mesh-generator-719634c2.nomodule.js +2 -0
  22. package/lib/configurator-mesh-generator-719634c2.nomodule.js.map +1 -0
  23. package/lib/{default-light-setting-86b8760c.nomodule.js → default-light-setting-0cfc3fcd.nomodule.js} +2 -2
  24. package/lib/default-light-setting-0cfc3fcd.nomodule.js.map +1 -0
  25. package/lib/{default-light-setting-88521da5.js → default-light-setting-4c3fa180.js} +2 -2
  26. package/lib/default-light-setting-4c3fa180.js.map +1 -0
  27. package/lib/definitions/common-core/mock/kernel-instances.d.ts +4 -1
  28. package/lib/definitions/common-core/src/kernel-access.d.ts +4 -10
  29. package/lib/definitions/common-core/src/services/common-kernel-access.d.ts +18 -2
  30. package/lib/definitions/common-core/src/webgl/layer.d.ts +2 -1
  31. package/lib/definitions/configurator-core/mock/configurator-mock-data.d.ts +1 -0
  32. package/lib/definitions/planner-core/src/roomle-planner.d.ts +30 -2
  33. package/lib/definitions/planner-core/src/services/planner-kernel-access.d.ts +0 -1
  34. package/lib/definitions/planner-core/src/view-model/node-plan-element-view-model.d.ts +6 -0
  35. package/lib/definitions/planner-core/src/view-model/plan-view-model.d.ts +6 -1
  36. package/lib/definitions/planner-core/src/view-model/wall-plan-element-view-model.d.ts +1 -0
  37. package/lib/definitions/typings/kernel.d.ts +4 -1
  38. package/lib/definitions/typings/planner.d.ts +16 -0
  39. package/lib/{dimensioning-helper-c69b5012.nomodule.js → dimensioning-helper-154cc3a1.nomodule.js} +2 -2
  40. package/lib/{dimensioning-helper-c69b5012.nomodule.js.map → dimensioning-helper-154cc3a1.nomodule.js.map} +1 -1
  41. package/lib/{dimensioning-helper-55aa9709.js → dimensioning-helper-3358a318.js} +2 -2
  42. package/lib/{dimensioning-helper-55aa9709.js.map → dimensioning-helper-3358a318.js.map} +1 -1
  43. package/lib/{glb-viewer-1482553f.nomodule.js → glb-viewer-79f4e8f2.nomodule.js} +2 -2
  44. package/lib/{glb-viewer-1482553f.nomodule.js.map → glb-viewer-79f4e8f2.nomodule.js.map} +1 -1
  45. package/lib/{glb-viewer-75d1de15.js → glb-viewer-f03a2567.js} +2 -2
  46. package/lib/{glb-viewer-75d1de15.js.map → glb-viewer-f03a2567.js.map} +1 -1
  47. package/lib/glb-viewer-main-0f214277.js +2 -0
  48. package/lib/glb-viewer-main-0f214277.js.map +1 -0
  49. package/lib/glb-viewer-main.nomodule.js +1 -1
  50. package/lib/image-renderer-2ef5040e.nomodule.js +2 -0
  51. package/lib/{image-renderer-52bbd908.nomodule.js.map → image-renderer-2ef5040e.nomodule.js.map} +1 -1
  52. package/lib/image-renderer-aec6bf8b.js +2 -0
  53. package/lib/{image-renderer-757a6907.js.map → image-renderer-aec6bf8b.js.map} +1 -1
  54. package/lib/legacy/{banana-for-scale-0854a7dc.legacy.js → banana-for-scale-facecaed.legacy.js} +2 -2
  55. package/lib/legacy/{banana-for-scale-0854a7dc.legacy.js.map → banana-for-scale-facecaed.legacy.js.map} +1 -1
  56. package/lib/legacy/budgeteer-measure.legacy.js +1 -1
  57. package/lib/legacy/{component-dimensioning-aaa05dd4.legacy.js → component-dimensioning-4caad30b.legacy.js} +2 -2
  58. package/lib/legacy/component-dimensioning-4caad30b.legacy.js.map +1 -0
  59. package/lib/legacy/configurator-8891cab5.legacy.js +2 -0
  60. package/lib/legacy/{configurator-21c32b82.legacy.js.map → configurator-8891cab5.legacy.js.map} +1 -1
  61. package/lib/legacy/configurator-main.legacy.js +1 -1
  62. package/lib/legacy/configurator-mesh-generator-d7c0f722.legacy.js +2 -0
  63. package/lib/legacy/configurator-mesh-generator-d7c0f722.legacy.js.map +1 -0
  64. package/lib/legacy/{default-light-setting-d6e9de1f.legacy.js → default-light-setting-f9c0f379.legacy.js} +2 -2
  65. package/lib/legacy/default-light-setting-f9c0f379.legacy.js.map +1 -0
  66. package/lib/legacy/{dimensioning-helper-3878022f.legacy.js → dimensioning-helper-a8aa1a40.legacy.js} +2 -2
  67. package/lib/legacy/{dimensioning-helper-3878022f.legacy.js.map → dimensioning-helper-a8aa1a40.legacy.js.map} +1 -1
  68. package/lib/legacy/{glb-viewer-056c11ee.legacy.js → glb-viewer-4f36a579.legacy.js} +2 -2
  69. package/lib/legacy/{glb-viewer-056c11ee.legacy.js.map → glb-viewer-4f36a579.legacy.js.map} +1 -1
  70. package/lib/legacy/glb-viewer-main.legacy.js +1 -1
  71. package/lib/legacy/image-renderer-b41c524a.legacy.js +2 -0
  72. package/lib/legacy/{image-renderer-9a6a67fc.legacy.js.map → image-renderer-b41c524a.legacy.js.map} +1 -1
  73. package/lib/legacy/{main-thread-to-worker-4c02f179.legacy.js → main-thread-to-worker-fb98950d.legacy.js} +2 -2
  74. package/lib/legacy/main-thread-to-worker-fb98950d.legacy.js.map +1 -0
  75. package/lib/legacy/{material-viewer-7a17728a.legacy.js → material-viewer-7fab7335.legacy.js} +2 -2
  76. package/lib/legacy/material-viewer-7fab7335.legacy.js.map +1 -0
  77. package/lib/legacy/material-viewer-main.legacy.js +1 -1
  78. package/lib/legacy/mesh-generator-e286194e.legacy.js +2 -0
  79. package/lib/legacy/mesh-generator-e286194e.legacy.js.map +1 -0
  80. package/lib/legacy/{pixotron-b2477d2d.legacy.js → pixotron-2fe30835.legacy.js} +2 -2
  81. package/lib/legacy/{pixotron-b2477d2d.legacy.js.map → pixotron-2fe30835.legacy.js.map} +1 -1
  82. package/lib/legacy/planner-68d375ba.legacy.js +2 -0
  83. package/lib/legacy/{planner-7afba417.legacy.js.map → planner-68d375ba.legacy.js.map} +1 -1
  84. package/lib/legacy/planner-main.legacy.js +1 -1
  85. package/lib/legacy/rapi-access-2a5f0d6e.legacy.js +16 -0
  86. package/lib/legacy/{rapi-access-990628ad.legacy.js.map → rapi-access-2a5f0d6e.legacy.js.map} +1 -1
  87. package/lib/legacy/roomle-sdk.legacy.js +1 -1
  88. package/lib/legacy/static/ConfiguratorKernel-2d65fb351a47e14f.wasm +0 -0
  89. package/lib/legacy/static/ConfiguratorKernel-b3f9bde09ca9cb82.js +121 -0
  90. package/lib/legacy/static/ConfiguratorKernelJs-0e232fcb92bd0fdf.js +143 -0
  91. package/lib/legacy/static/ConfiguratorKernelJs-5f8ff2d9e58b1c2e.mem +0 -0
  92. package/lib/legacy/static/RoomleCore-142e8c50aaf95e25.wasm +0 -0
  93. package/lib/legacy/static/RoomleCore-7aae58649d719a05.js +129 -0
  94. package/lib/legacy/static/RoomleCoreJs-28f57d562097ad09.js +151 -0
  95. package/lib/legacy/static/RoomleCoreJs-7129d0003a480c2c.mem +0 -0
  96. package/lib/legacy/static/shaders-36d0319326c4463c.json +1 -0
  97. package/lib/legacy/{stats-helper-12f49aa1.legacy.js → stats-helper-8a009d9b.legacy.js} +2 -2
  98. package/lib/legacy/{stats-helper-12f49aa1.legacy.js.map → stats-helper-8a009d9b.legacy.js.map} +1 -1
  99. package/lib/{main-thread-to-worker-4fc95d50.nomodule.js → main-thread-to-worker-97315397.nomodule.js} +2 -2
  100. package/lib/main-thread-to-worker-97315397.nomodule.js.map +1 -0
  101. package/lib/{main-thread-to-worker-5447c1c5.js → main-thread-to-worker-9d399850.js} +2 -2
  102. package/lib/main-thread-to-worker-9d399850.js.map +1 -0
  103. package/lib/{material-viewer-37019048.js → material-viewer-35a1667b.js} +2 -2
  104. package/lib/material-viewer-35a1667b.js.map +1 -0
  105. package/lib/{material-viewer-b01a3995.nomodule.js → material-viewer-e9a19afe.nomodule.js} +2 -2
  106. package/lib/material-viewer-e9a19afe.nomodule.js.map +1 -0
  107. package/lib/material-viewer-main-7584b24f.js +2 -0
  108. package/lib/material-viewer-main-7584b24f.js.map +1 -0
  109. package/lib/material-viewer-main.nomodule.js +1 -1
  110. package/lib/mesh-generator-d641da46.nomodule.js +2 -0
  111. package/lib/mesh-generator-d641da46.nomodule.js.map +1 -0
  112. package/lib/mesh-generator-e8cdc7cf.js +2 -0
  113. package/lib/mesh-generator-e8cdc7cf.js.map +1 -0
  114. package/lib/{pixotron-c033394c.nomodule.js → pixotron-9b23daa3.nomodule.js} +2 -2
  115. package/lib/{pixotron-c033394c.nomodule.js.map → pixotron-9b23daa3.nomodule.js.map} +1 -1
  116. package/lib/{pixotron-76665c10.js → pixotron-f16e92fe.js} +2 -2
  117. package/lib/{pixotron-76665c10.js.map → pixotron-f16e92fe.js.map} +1 -1
  118. package/lib/planner-92cd02ad.js +2 -0
  119. package/lib/{planner-5cbf6167.js.map → planner-92cd02ad.js.map} +1 -1
  120. package/lib/planner-e2d8f4ac.nomodule.js +2 -0
  121. package/lib/{planner-59a8e189.nomodule.js.map → planner-e2d8f4ac.nomodule.js.map} +1 -1
  122. package/lib/planner-main-994ac088.js +2 -0
  123. package/lib/planner-main-994ac088.js.map +1 -0
  124. package/lib/planner-main.nomodule.js +1 -1
  125. package/lib/rapi-access-184c82bc.js +16 -0
  126. package/lib/{rapi-access-21338f5f.js.map → rapi-access-184c82bc.js.map} +1 -1
  127. package/lib/rapi-access-5df63b00.nomodule.js +16 -0
  128. package/lib/{rapi-access-6a614458.nomodule.js.map → rapi-access-5df63b00.nomodule.js.map} +1 -1
  129. package/lib/{roomle-sdk-6b970f8f.js → roomle-sdk-8880667c.js} +2 -2
  130. package/lib/roomle-sdk-8880667c.js.map +1 -0
  131. package/lib/roomle-sdk.nomodule.js +1 -1
  132. package/lib/static/ConfiguratorKernel-2d65fb351a47e14f.wasm +0 -0
  133. package/lib/static/ConfiguratorKernel-b3f9bde09ca9cb82.js +1 -0
  134. package/lib/static/ConfiguratorKernel-b3f9bde09ca9cb82.js.map +1 -0
  135. package/lib/static/ConfiguratorKernelJs-0e232fcb92bd0fdf.js +143 -0
  136. package/lib/static/ConfiguratorKernelJs-5f8ff2d9e58b1c2e.mem +0 -0
  137. package/lib/static/RoomleCore-142e8c50aaf95e25.wasm +0 -0
  138. package/lib/static/RoomleCore-7aae58649d719a05.js +1 -0
  139. package/lib/static/RoomleCore-7aae58649d719a05.js.map +1 -0
  140. package/lib/static/RoomleCoreJs-28f57d562097ad09.js +151 -0
  141. package/lib/static/RoomleCoreJs-7129d0003a480c2c.mem +0 -0
  142. package/lib/static/shaders-36d0319326c4463c.json +1 -0
  143. package/lib/{stats-helper-37bc8127.nomodule.js → stats-helper-68cb7b1c.nomodule.js} +2 -2
  144. package/lib/{stats-helper-37bc8127.nomodule.js.map → stats-helper-68cb7b1c.nomodule.js.map} +1 -1
  145. package/lib/{stats-helper-50118506.js → stats-helper-fa2b0d75.js} +2 -2
  146. package/lib/{stats-helper-50118506.js.map → stats-helper-fa2b0d75.js.map} +1 -1
  147. package/package.json +2 -2
  148. package/lib/component-dimensioning-032b19a5.nomodule.js.map +0 -1
  149. package/lib/component-dimensioning-231c9af2.js.map +0 -1
  150. package/lib/configurator-08e58911.nomodule.js +0 -2
  151. package/lib/configurator-3570c605.js +0 -2
  152. package/lib/configurator-main-d4562587.js +0 -2
  153. package/lib/configurator-main-d4562587.js.map +0 -1
  154. package/lib/configurator-mesh-generator-a69ff1e4.nomodule.js +0 -2
  155. package/lib/configurator-mesh-generator-a69ff1e4.nomodule.js.map +0 -1
  156. package/lib/configurator-mesh-generator-ed7f42a4.js +0 -2
  157. package/lib/configurator-mesh-generator-ed7f42a4.js.map +0 -1
  158. package/lib/default-light-setting-86b8760c.nomodule.js.map +0 -1
  159. package/lib/default-light-setting-88521da5.js.map +0 -1
  160. package/lib/glb-viewer-main-ee2c73a8.js +0 -2
  161. package/lib/glb-viewer-main-ee2c73a8.js.map +0 -1
  162. package/lib/image-renderer-52bbd908.nomodule.js +0 -2
  163. package/lib/image-renderer-757a6907.js +0 -2
  164. package/lib/legacy/component-dimensioning-aaa05dd4.legacy.js.map +0 -1
  165. package/lib/legacy/configurator-21c32b82.legacy.js +0 -2
  166. package/lib/legacy/configurator-mesh-generator-62f318f2.legacy.js +0 -2
  167. package/lib/legacy/configurator-mesh-generator-62f318f2.legacy.js.map +0 -1
  168. package/lib/legacy/default-light-setting-d6e9de1f.legacy.js.map +0 -1
  169. package/lib/legacy/image-renderer-9a6a67fc.legacy.js +0 -2
  170. package/lib/legacy/main-thread-to-worker-4c02f179.legacy.js.map +0 -1
  171. package/lib/legacy/material-viewer-7a17728a.legacy.js.map +0 -1
  172. package/lib/legacy/mesh-generator-f2c8bb17.legacy.js +0 -2
  173. package/lib/legacy/mesh-generator-f2c8bb17.legacy.js.map +0 -1
  174. package/lib/legacy/planner-7afba417.legacy.js +0 -2
  175. package/lib/legacy/rapi-access-990628ad.legacy.js +0 -16
  176. package/lib/legacy/static/ConfiguratorKernel-1814e60dbe690ae6.js +0 -121
  177. package/lib/legacy/static/ConfiguratorKernel-cbbc9ab4c6a45a73.wasm +0 -0
  178. package/lib/legacy/static/ConfiguratorKernelJs-4aa196fbd2db1290.js +0 -143
  179. package/lib/legacy/static/ConfiguratorKernelJs-83da6e4b5a0e6868.mem +0 -0
  180. package/lib/legacy/static/RoomleCore-1682cd0bfe5c84db.wasm +0 -0
  181. package/lib/legacy/static/RoomleCore-cf5eb8ac9b418bb8.js +0 -130
  182. package/lib/legacy/static/RoomleCoreJs-1a283c23fa3f057e.js +0 -152
  183. package/lib/legacy/static/RoomleCoreJs-c0e10f71d1afdef5.mem +0 -0
  184. package/lib/legacy/static/shaders-47c5850937e0536d.json +0 -1
  185. package/lib/main-thread-to-worker-4fc95d50.nomodule.js.map +0 -1
  186. package/lib/main-thread-to-worker-5447c1c5.js.map +0 -1
  187. package/lib/material-viewer-37019048.js.map +0 -1
  188. package/lib/material-viewer-b01a3995.nomodule.js.map +0 -1
  189. package/lib/material-viewer-main-9b09cbb2.js +0 -2
  190. package/lib/material-viewer-main-9b09cbb2.js.map +0 -1
  191. package/lib/mesh-generator-106a6ce1.nomodule.js +0 -2
  192. package/lib/mesh-generator-106a6ce1.nomodule.js.map +0 -1
  193. package/lib/mesh-generator-df801dc9.js +0 -2
  194. package/lib/mesh-generator-df801dc9.js.map +0 -1
  195. package/lib/planner-59a8e189.nomodule.js +0 -2
  196. package/lib/planner-5cbf6167.js +0 -2
  197. package/lib/planner-main-8933f5be.js +0 -2
  198. package/lib/planner-main-8933f5be.js.map +0 -1
  199. package/lib/rapi-access-21338f5f.js +0 -16
  200. package/lib/rapi-access-6a614458.nomodule.js +0 -16
  201. package/lib/roomle-sdk-6b970f8f.js.map +0 -1
  202. package/lib/static/ConfiguratorKernel-1814e60dbe690ae6.js +0 -1
  203. package/lib/static/ConfiguratorKernel-1814e60dbe690ae6.js.map +0 -1
  204. package/lib/static/ConfiguratorKernel-cbbc9ab4c6a45a73.wasm +0 -0
  205. package/lib/static/ConfiguratorKernelJs-4aa196fbd2db1290.js +0 -143
  206. package/lib/static/ConfiguratorKernelJs-83da6e4b5a0e6868.mem +0 -0
  207. package/lib/static/RoomleCore-1682cd0bfe5c84db.wasm +0 -0
  208. package/lib/static/RoomleCore-cf5eb8ac9b418bb8.js +0 -1
  209. package/lib/static/RoomleCore-cf5eb8ac9b418bb8.js.map +0 -1
  210. package/lib/static/RoomleCoreJs-1a283c23fa3f057e.js +0 -152
  211. package/lib/static/RoomleCoreJs-c0e10f71d1afdef5.mem +0 -0
  212. package/lib/static/shaders-47c5850937e0536d.json +0 -1
@@ -1,2 +1,2 @@
1
- import{K as getGUI}from"./rapi-access-21338f5f.js";import{L as LightSetting}from"./pixotron-76665c10.js";class DefaultLightSetting extends LightSetting{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._secondDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new THREE.Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,o=a/2;this._mainDirectionalLight.shadow.camera.top=o,this._mainDirectionalLight.shadow.camera.bottom=-o,this._mainDirectionalLight.shadow.camera.left=-o,this._mainDirectionalLight.shadow.camera.right=o,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=o,this._secondDirectionalLight.shadow.camera.bottom=-o,this._secondDirectionalLight.shadow.camera.left=-o,this._secondDirectionalLight.shadow.camera.right=o,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=getGUI();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new THREE.Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}}}}export{DefaultLightSetting as D};
2
- //# sourceMappingURL=default-light-setting-88521da5.js.map
1
+ import{J as getGUI}from"./rapi-access-184c82bc.js";import{L as LightSetting}from"./pixotron-f16e92fe.js";class DefaultLightSetting extends LightSetting{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._secondDirectionalLight=new THREE.DirectionalLight(new THREE.Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new THREE.Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new THREE.Vector3(0,0,0)),this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new THREE.Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,o=a/2;this._mainDirectionalLight.shadow.camera.top=o,this._mainDirectionalLight.shadow.camera.bottom=-o,this._mainDirectionalLight.shadow.camera.left=-o,this._mainDirectionalLight.shadow.camera.right=o,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=o,this._secondDirectionalLight.shadow.camera.bottom=-o,this._secondDirectionalLight.shadow.camera.left=-o,this._secondDirectionalLight.shadow.camera.right=o,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=getGUI();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new THREE.Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new THREE.Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new THREE.Vector3(0,0,0)))}}}}export{DefaultLightSetting as D};
2
+ //# sourceMappingURL=default-light-setting-4c3fa180.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-light-setting-4c3fa180.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { KernelObject } from '../../typings/planner';
1
+ import { KernelObject, PlanOverview } from '../../typings/planner';
2
2
  import PlanViewModel from '../../planner-core/src/view-model/plan-view-model';
3
3
  export declare const MOCK_MINIMAL_KERNEL_INSTANCE: {
4
4
  setEnvironmentVariable: () => void;
@@ -14,6 +14,9 @@ export declare const MOCK_MINIMAL_KERNEL_CONTAINER: {
14
14
  registerPlannerCallback: () => void;
15
15
  unregisterConfiguratorCallback: () => void;
16
16
  PlanInteractionHandler: () => void;
17
+ PlanModelViewHelper: {
18
+ getPlanOverview: () => PlanOverview;
19
+ };
17
20
  UnitMeasureFormatter: () => void;
18
21
  Unit: {};
19
22
  UnitStringType: {};
@@ -1,9 +1,11 @@
1
1
  import ConfiguratorContext from './webgl/configurator-context';
2
- import { EmscriptenString, KernelParameter, KernelParameterGroup, KernelPart, KernelPartList, KernelVector3, PlanObject, VariantsList } from '../../typings/kernel';
2
+ import { ConfiguratorKernelClass, EmscriptenString, KernelParameter, KernelParameterGroup, KernelVector3, PlanObject, VariantsList } from '../../typings/kernel';
3
3
  import CommonKernelAccess from './services/common-kernel-access';
4
4
  import { ArticleNumber, ConfigurationHash, ConfigurationString, RapiId, RapiPrice } from '../../typings/rapi-types';
5
5
  import { CommonConfiguratorKernelCallbackI } from './common-configurator-kernel-callback';
6
+ import GlobalInitData from './utils/global-init-data';
6
7
  import { PromiseQueue } from './utils/promise-queue';
8
+ export declare const setupConfiguratorKernelInstance: (kernelInstance: ConfiguratorKernelClass, globalInitData: GlobalInitData) => void;
7
9
  export interface ConfiguratorKernelCallbackI extends CommonConfiguratorKernelCallbackI {
8
10
  planObjectCreated(conversationId: number, planObjectId: number): void;
9
11
  planObjectUpdated(planObject: PlanObject): void;
@@ -18,16 +20,11 @@ export interface ConfiguratorKernelCallbackI extends CommonConfiguratorKernelCal
18
20
  finishParameterChange(resolve: () => void, reject: () => void): void;
19
21
  }
20
22
  export default class KernelAccess extends CommonKernelAccess {
21
- private _unitFormatter;
22
23
  private _memoryManager;
23
24
  private _configuratorKernelAccessCallback;
24
- private _configuratorContext;
25
- private _initData;
26
- private _globalInitData;
27
25
  private _configuratorHistory;
28
26
  externalMeshQueue: PromiseQueue<void>;
29
27
  muteKernelCallbacks: boolean;
30
- private _lastPartListHash;
31
28
  constructor(creator: string);
32
29
  private _loadSuccess;
33
30
  private _loadError;
@@ -54,11 +51,8 @@ export default class KernelAccess extends CommonKernelAccess {
54
51
  changePlanObjectParameter(planObjectId: number, parameterKey: string, type: string, value: string, resolve: () => void, reject: () => void): void;
55
52
  private _finishParameterChange;
56
53
  requestDeleteComponents(componentIds: number[]): void;
57
- private _calcPrice;
58
54
  loadComponentIntoKernel(component: string, componentId: RapiId): void;
59
- addUiDataAndPriceToPartList(partList: KernelPartList, hash: string): Promise<KernelPartList>;
60
55
  requestPartListAndUpdatePricesOfParts(hash?: ConfigurationHash, _prices?: Map<ArticleNumber, RapiPrice>): Promise<void>;
61
- addUiDataToPartList(partList: KernelPart[], hash: string): KernelPart[];
62
56
  requestSync(conversationId: number, planObjectId: number): void;
63
57
  getGlobalParameters(planObjectId: number, rootComponentParametersAsGlobal: boolean): Promise<KernelParameter[]>;
64
58
  getPartList(): Promise<unknown>;
@@ -86,7 +80,7 @@ export default class KernelAccess extends CommonKernelAccess {
86
80
  Editor3dGeometryNotReady(id: number): void;
87
81
  Editor3dPlanObjectConstructionDone(planObjectId: number): Promise<{
88
82
  totalSum: number;
89
- partMap: Map<string, KernelPart>;
83
+ partMap: Map<string, import("../../typings/kernel").KernelPart>;
90
84
  }>;
91
85
  Editor3dBeginGroup(): void;
92
86
  Editor3dEndGroup(): void;
@@ -2,13 +2,17 @@ import RapiAccess from '../rapi-access';
2
2
  import ScriptLoader from '../script-loader';
3
3
  import KernelIo from '../kernel-io';
4
4
  import DataSyncer from './data-syncer';
5
- import { RapiId } from '../../../typings/rapi-types';
5
+ import { ArticleNumber, ConfigurationHash, PriceId, RapiId, RapiPrice } from '../../../typings/rapi-types';
6
6
  import { LifeCycleCallbacks } from '../life-cycle-manager';
7
7
  import { Context } from '../di/context';
8
- import { ConfigurationObject, ConfiguratorKernelClass, KernelVector3 } from '../../../typings/kernel';
8
+ import { ConfigurationObject, ConfiguratorKernelClass, KernelPart, KernelPartList, KernelVector3 } from '../../../typings/kernel';
9
9
  import { ConfiguratorKernelCallbackI } from '../kernel-access';
10
10
  import ConfiguratorUiCallbacks from '../../../configurator-core/src/services/configurator-ui-callback';
11
11
  import { GlobalCallback } from './global-callback';
12
+ import InitData from '../utils/init-data';
13
+ import UnitFormatter from '../../../configurator-core/src/services/unit-formatter';
14
+ import ConfiguratorContext from '../webgl/configurator-context';
15
+ import GlobalInitData from '../utils/global-init-data';
12
16
  export declare const enum KERNEL_TYPE {
13
17
  PLANNER = 0,
14
18
  CONFIGURATOR = 1
@@ -28,6 +32,11 @@ export default abstract class CommonKernelAccess implements LifeCycleCallbacks,
28
32
  private _requestedMaterialIds;
29
33
  protected _configuratorUiCallbacks: ConfiguratorUiCallbacks;
30
34
  protected _globalCallback: GlobalCallback;
35
+ protected _initData: InitData;
36
+ protected _unitFormatter: UnitFormatter;
37
+ protected _configuratorContext: ConfiguratorContext;
38
+ protected _globalInitData: GlobalInitData;
39
+ protected _lastPartListHash: string;
31
40
  protected _configuratorKernelCallbackListener: Set<ConfiguratorKernelCallbackI>;
32
41
  protected _cachedGroupIds: string[];
33
42
  protected _waitingForGroups: boolean;
@@ -100,5 +109,12 @@ export default abstract class CommonKernelAccess implements LifeCycleCallbacks,
100
109
  resume(): void;
101
110
  destroy(): void;
102
111
  protected _handleCortoMesh<T>(buffer: ArrayBuffer, meshId: string, quality: number): void;
112
+ protected _calcPrice(): Promise<{
113
+ totalSum: number;
114
+ partMap: Map<PriceId, KernelPart>;
115
+ }>;
116
+ addUiDataAndPriceToPartList(partList: KernelPartList, hash: string): Promise<KernelPartList>;
117
+ addUiDataToPartList(partList: KernelPart[], hash: string): KernelPart[];
118
+ requestPartListAndUpdatePricesOfParts(hash?: ConfigurationHash, _prices?: Map<ArticleNumber, RapiPrice>): Promise<void>;
103
119
  }
104
120
  export {};
@@ -6,7 +6,8 @@ export declare const enum LAYER {
6
6
  PREVIEW = 4,
7
7
  UI = 5,
8
8
  GIZMO = 6,
9
- DIMENSIONS = 7
9
+ DIMENSIONS = 7,
10
+ CONSTRUCTION = 8
10
11
  }
11
12
  declare const _default: {};
12
13
  export default _default;
@@ -1,4 +1,5 @@
1
1
  import { KernelPossibleChild } from '../../typings/kernel';
2
+ export declare const USM_PARTLIST: any;
2
3
  export declare const USM_KERNEL_POSSIBLE_CHILD: KernelPossibleChild;
3
4
  export declare const USM_RAPI_COMPONENT: {
4
5
  externalIdentifier: string;
@@ -10,9 +10,9 @@ import { PlanInteractionHandler, PlanModelViewHelper, PlanOverview } from '../..
10
10
  import { KernelAccessCallbackI } from '../../common-core/src/kernel-access-callback';
11
11
  import InitData from '../../common-core/src/utils/init-data';
12
12
  import { CanvasOffset, Position3 } from '../../common-core/src/common-interfaces';
13
- import { KernelPlanObject } from '../../typings/kernel';
14
13
  import { PrepareImageOptions } from '../../common-core/src/webgl/image-renderer';
15
14
  import { DynamicLightSettingSource } from '../../common-core/src/lightsetting/dynamic-light-setting-loader';
15
+ import { KernelParameter, KernelPartList, UiPlanObject } from '../../typings/kernel';
16
16
  export interface RoomlePlannerCallback {
17
17
  switchToConfigurator: () => Promise<Configurator>;
18
18
  switchToViewer: () => Promise<GlbViewer>;
@@ -20,6 +20,14 @@ export interface RoomlePlannerCallback {
20
20
  deleteSelection: () => void;
21
21
  rotateSelection: (rotateBy: number) => void;
22
22
  }
23
+ export interface WallDefinition {
24
+ from: Position3;
25
+ to: Position3;
26
+ props?: {
27
+ thickness: number;
28
+ height: number;
29
+ };
30
+ }
23
31
  export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlannerCallback, GlobalAPI, BackstackCallbacks, Context, KernelUtilityForUi, ExternalEmbeddable<RoomlePlannerUiCallback> {
24
32
  _creator_: string;
25
33
  private _domHelper;
@@ -35,6 +43,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
35
43
  private _dataSyncer;
36
44
  protected _initData: InitData;
37
45
  private _globalInitData;
46
+ private _unitFormatter;
38
47
  private _planInteractionHandler;
39
48
  private _sceneManager;
40
49
  private _plan;
@@ -129,7 +138,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
129
138
  * returns all objects found in the current plan
130
139
  * this includes info about size, rotation, id and parts
131
140
  */
132
- getObjects(): Promise<KernelPlanObject[]>;
141
+ getObjects(): Promise<UiPlanObject[]>;
133
142
  /**
134
143
  * get all info available for the current plan, including objects, rooms and walls
135
144
  */
@@ -161,4 +170,23 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
161
170
  * disable all types of snapping
162
171
  */
163
172
  disableSnapping(): void;
173
+ /**
174
+ * get the Partlist of certain runtimeID
175
+ * can be used if partlist of a selected Item is needed
176
+ * @param id runtimeID of a configurable item
177
+ * @returns kernelPartlist with processed price, currency and RAL colors
178
+ */
179
+ getPartlistOf(id: number): Promise<KernelPartList | null>;
180
+ /**
181
+ * Returns the formatted value based on the parameter.unitType
182
+ *
183
+ * @param value
184
+ * @param parameter
185
+ */
186
+ formatValueToUnitString(value: number, parameter: KernelParameter): string | number;
187
+ /**
188
+ * Draws walls according to the wall definitions
189
+ * this can be used to create a room on the fly
190
+ */
191
+ drawWalls(wallDefinitions: WallDefinition[]): void;
164
192
  }
@@ -23,7 +23,6 @@ export interface PlannerKernelCallbackI {
23
23
  export default class PlannerKernelAccess extends CommonKernelAccess {
24
24
  private _kernelAccessCallback;
25
25
  private _roomlePlannerUiCallback;
26
- private _initData;
27
26
  private _planInteractionHandler;
28
27
  private _plannerKernelCallbackListener;
29
28
  get kernelContainer(): any;
@@ -0,0 +1,6 @@
1
+ import { PlanObject } from '../../../typings/planner';
2
+ import PlanElementViewModel from '../../../common-core/src/view-model/plan-element-view-model';
3
+ export default class NodePlanElementViewModel extends PlanElementViewModel {
4
+ constructor(planObject: PlanObject);
5
+ addMesh(mesh: THREE.Mesh): void;
6
+ }
@@ -10,6 +10,8 @@ import CommonKernelAccess from '../../../common-core/src/services/common-kernel-
10
10
  import PlanElementViewModel from '../../../common-core/src/view-model/plan-element-view-model';
11
11
  import MeshGenerator from '../../../common-core/src/webgl/mesh-generator';
12
12
  export declare const GROUP_CONSTRUCTION = "Construction";
13
+ export declare const GROUP_CEILING = "Ceiling";
14
+ export declare const GROUP_FLOOR = "Ceiling";
13
15
  export default class PlanViewModel extends ConfiguratorViewModel implements PlannerKernelCallbackI {
14
16
  private _plannerMeshGenerator;
15
17
  private _coreReference;
@@ -17,6 +19,7 @@ export default class PlanViewModel extends ConfiguratorViewModel implements Plan
17
19
  private _staticPlanObjectViewModels;
18
20
  private _constructionGroup;
19
21
  private _ceilingGroup;
22
+ private _floorGroup;
20
23
  private _plannerSceneEventHandler;
21
24
  constructor(creator: string);
22
25
  planBoundsChanged(): void;
@@ -30,6 +33,7 @@ export default class PlanViewModel extends ConfiguratorViewModel implements Plan
30
33
  getPlanObjectForId(id: number): PlanObjectViewModel;
31
34
  getConstructionGroup(): THREE.Group;
32
35
  getCeilingGroup(): THREE.Group;
36
+ getFloorGroup(): THREE.Group;
33
37
  getBoundingBox(): THREE.Box3;
34
38
  /**
35
39
  * Merges geometries on the fly when creating them
@@ -60,7 +64,8 @@ export default class PlanViewModel extends ConfiguratorViewModel implements Plan
60
64
  planElementChanged(_plan: Plan, _planObject: PlanElementViewModel): void;
61
65
  planObjectConfigurationLoaded(_plan: Plan, _element: PlanElement, _success: boolean): void;
62
66
  addMesh(planElement: PlanElement, material: any, vertices: Int32Array, indices: Int32Array, uvCoords: Float32Array, normals: Float32Array): void;
63
- removePlanObjectFromScene(_planElementViewModel: PlanElementViewModel): void;
67
+ removePlanObjectFromScene(planElementViewModel: PlanElementViewModel): void;
68
+ private _isConstructionType;
64
69
  planElementRemoved(element: PlanElement): void;
65
70
  protected getMeshGenerator(): MeshGenerator;
66
71
  }
@@ -3,4 +3,5 @@ import PlanElementViewModel from '../../../common-core/src/view-model/plan-eleme
3
3
  export default class WallPlanElementViewModel extends PlanElementViewModel {
4
4
  constructor(planObject: PlanObject);
5
5
  addMesh(mesh: THREE.Mesh): void;
6
+ protected _generateBoundingBox(size: THREE.Vector3, color: number): THREE.Mesh;
6
7
  }
@@ -1,5 +1,5 @@
1
1
  import { PARAMETER_KERNEL_TYPE, PARAMETER_UNIT_TYPES } from '../common-core/src/utils/parameter-types';
2
- import { ConfigurationHash, ConfigurationString, RapiElement, RapiId, RapiJson, RapiTag } from './rapi-types';
2
+ import { ConfigurationHash, ConfigurationString, RapiConfiguration, RapiElement, RapiId, RapiItem, RapiJson, RapiTag } from './rapi-types';
3
3
  import { KernelObject } from './planner';
4
4
  import { BindingError, InternalError, UnboundTypeError } from './ems';
5
5
  export interface WasmDbEntry {
@@ -155,6 +155,9 @@ export interface KernelPlanObject {
155
155
  parts: KernelPartList;
156
156
  rotation: number;
157
157
  }
158
+ export interface UiPlanObject extends KernelPlanObject {
159
+ data: RapiItem | RapiConfiguration | null;
160
+ }
158
161
  export interface EmscriptenList {
159
162
  size: () => number;
160
163
  length: number;
@@ -56,6 +56,14 @@ export interface PlanInteractionHandler {
56
56
  endInteraction(): void;
57
57
  undo(): void;
58
58
  redo(): void;
59
+ addNode(point: {
60
+ x: number;
61
+ y: number;
62
+ z: number;
63
+ }): PlanNode;
64
+ addWall(from: PlanNode, to: PlanNode): KernelWall;
65
+ setWallHeight(wall: KernelWall, height: number): void;
66
+ setWallThickness(wall: KernelWall, thickness: number): void;
59
67
  }
60
68
  export interface PlanOverview {
61
69
  area: number;
@@ -67,3 +75,11 @@ export interface PlanOverview {
67
75
  export interface PlanModelViewHelper {
68
76
  getPlanOverview(planObject: KernelObject): PlanOverview;
69
77
  }
78
+ export interface PlanNode extends KernelObject {
79
+ getMaxWallHeight(): number;
80
+ getNumberOfConnectedWalls(): number;
81
+ }
82
+ export interface KernelWall {
83
+ readonly thickness: number;
84
+ readonly height: number;
85
+ }
@@ -1,2 +1,2 @@
1
- System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-6a614458.nomodule.js","./main-thread-to-worker-4fc95d50.nomodule.js","./image-renderer-52bbd908.nomodule.js","./pixotron-c033394c.nomodule.js","./configurator-08e58911.nomodule.js","./mesh-generator-106a6ce1.nomodule.js","./configurator-mesh-generator-a69ff1e4.nomodule.js","./default-light-setting-86b8760c.nomodule.js"],(function(e){var t,i,s,n,h;return{setters:[function(){},function(e){t=e.f,i=e._,s=e.i,n=e.z},function(){},function(){},function(){},function(e){h=e.A},function(){},function(){},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";let _=(()=>{class e extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(o)?this._planeMaterial=this._cacheHolder.materialCache.get(o):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(o,this._planeMaterial)),this._cacheHolder.materialCache.has(a)?this._textMaterial=this._cacheHolder.materialCache.get(a):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(a,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i,s){this._position.copy(e),this._dimensioningType=t,this._cameraPosition=s,this._label=i;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,t,i){let s=new THREE.Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(t);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){t(this)}}return i([s],e.prototype,"_cacheHolder",void 0),e})();e("default",(()=>{class e{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let t=new THREE.Geometry;this._widthLine=new THREE.Line(t,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(t,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(t,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-eb3f3b61078695cc.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,t=this._getWidthEdge();e.vertices.push(t.start,t.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new _(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(i,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,t=this._getHeightEdge();e.vertices.push(t.start,t.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new _(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(i,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,t=this._getDepthEdge();e.vertices.push(t.start,t.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new _(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(i,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let t=this._lineBounds.min.y<0?this._lineBounds.min.y:0;t-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,t,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),t.add(this._widthText),e.add(this._heightLine),t.add(this._heightText),e.add(this._depthLine),t.add(this._depthText))}removeFromScene(e,t){e.remove(this._widthLine),t.remove(this._widthText),e.remove(this._heightLine),t.remove(this._heightText),e.remove(this._depthLine),t.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}return i([s],e.prototype,"_unitFormatter",void 0),e})())}}}));
2
- //# sourceMappingURL=dimensioning-helper-c69b5012.nomodule.js.map
1
+ System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-5df63b00.nomodule.js","./main-thread-to-worker-97315397.nomodule.js","./image-renderer-2ef5040e.nomodule.js","./pixotron-9b23daa3.nomodule.js","./mesh-generator-d641da46.nomodule.js","./configurator-cefab5fe.nomodule.js","./configurator-mesh-generator-719634c2.nomodule.js","./default-light-setting-0cfc3fcd.nomodule.js"],(function(e){var t,i,s,n,h;return{setters:[function(){},function(e){t=e.d,i=e._,s=e.i,n=e.y},function(){},function(){},function(){},function(){},function(e){h=e.A},function(){},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";let _=(()=>{class e extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(o)?this._planeMaterial=this._cacheHolder.materialCache.get(o):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(o,this._planeMaterial)),this._cacheHolder.materialCache.has(a)?this._textMaterial=this._cacheHolder.materialCache.get(a):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(a,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i,s){this._position.copy(e),this._dimensioningType=t,this._cameraPosition=s,this._label=i;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,t,i){let s=new THREE.Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(t);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){t(this)}}return i([s],e.prototype,"_cacheHolder",void 0),e})();e("default",(()=>{class e{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new n,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let t=new THREE.Geometry;this._widthLine=new THREE.Line(t,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(t,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(t,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),h.loadFont("static/rubik_regular_sub-eb3f3b61078695cc.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,t=this._getWidthEdge();e.vertices.push(t.start,t.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new _(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(i,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,t=this._getHeightEdge();e.vertices.push(t.start,t.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new _(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(i,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,t=this._getDepthEdge();e.vertices.push(t.start,t.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let i=t.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new _(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(i,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let t=this._lineBounds.min.y<0?this._lineBounds.min.y:0;t-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,t,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),t.add(this._widthText),e.add(this._heightLine),t.add(this._heightText),e.add(this._depthLine),t.add(this._depthText))}removeFromScene(e,t){e.remove(this._widthLine),t.remove(this._widthText),e.remove(this._heightLine),t.remove(this._heightText),e.remove(this._depthLine),t.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}return i([s],e.prototype,"_unitFormatter",void 0),e})())}}}));
2
+ //# sourceMappingURL=dimensioning-helper-154cc3a1.nomodule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-c69b5012.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"o/HAAe"}
1
+ {"version":3,"file":"dimensioning-helper-154cc3a1.nomodule.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"o/HAAe"}
@@ -1,2 +1,2 @@
1
- import"./query-params-helper-a271f9dc.js";import{f as dispose,_ as __decorate,i as inject,z as AsyncGuard}from"./rapi-access-21338f5f.js";import"./main-thread-to-worker-5447c1c5.js";import"./image-renderer-757a6907.js";import"./pixotron-76665c10.js";import{A as AsyncDependencyLoader}from"./configurator-3570c605.js";import"./mesh-generator-df801dc9.js";import"./configurator-mesh-generator-ed7f42a4.js";import"./default-light-setting-88521da5.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";let TextWithBackground=(()=>{class e extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}return __decorate([inject],e.prototype,"_cacheHolder",void 0),e})(),DimensioningHelper=(()=>{class e{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-eb3f3b61078695cc.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}return __decorate([inject],e.prototype,"_unitFormatter",void 0),e})();export default DimensioningHelper;
2
- //# sourceMappingURL=dimensioning-helper-55aa9709.js.map
1
+ import"./query-params-helper-a271f9dc.js";import{d as dispose,_ as __decorate,i as inject,y as AsyncGuard}from"./rapi-access-184c82bc.js";import"./main-thread-to-worker-9d399850.js";import"./image-renderer-aec6bf8b.js";import"./pixotron-f16e92fe.js";import"./mesh-generator-e8cdc7cf.js";import{A as AsyncDependencyLoader}from"./configurator-ac4b6505.js";import"./configurator-mesh-generator-5cd4381f.js";import"./default-light-setting-4c3fa180.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";let TextWithBackground=(()=>{class e extends THREE.Object3D{constructor(e){super(),this._label="",this._parameters={font:null,size:.1,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=e,this._position=new THREE.Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new THREE.MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new THREE.Geometry;this._text=new THREE.Mesh(e,this._textMaterial),this._text.name="text with background text "+this._label,this._plane=new THREE.Mesh(e,this._planeMaterial),this._plane.name="text with background plane "+this._label,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,i,t,s){this._position.copy(e),this._dimensioningType=i,this._cameraPosition=s,this._label=t;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new THREE.TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new THREE.Quaternion;e.setFromAxisAngle(new THREE.Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new THREE.Vector3)}else if(this._updateText(this._textGeometry,new THREE.Quaternion,new THREE.Vector3),this._cameraPosition){const e=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,i,t){let s=new THREE.Vector3;s.copy(this._position),t.x*=this._getXSign(),s.add(t);let n=e.boundingBox.getSize(new THREE.Vector3);e.center(),this._text.position.copy(s),this._text.quaternion.copy(i);let h=new THREE.PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}return __decorate([inject],e.prototype,"_cacheHolder",void 0),e})(),DimensioningHelper=(()=>{class e{constructor(e){this._cameraPosition=new THREE.Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._creator_=e,this._lineMaterial=new THREE.LineBasicMaterial({color:3618615,linewidth:2});let i=new THREE.Geometry;this._widthLine=new THREE.Line(i,this._lineMaterial),this._widthLine.name="dimension width line",this._heightLine=new THREE.Line(i,this._lineMaterial),this._heightLine.name="dimension height line",this._depthLine=new THREE.Line(i,this._lineMaterial),this._depthLine.name="dimension depth line",this._planeMaterial=new THREE.MeshBasicMaterial({color:16777215,side:THREE.DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-eb3f3b61078695cc.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new THREE.Geometry,i=this._getWidthEdge();e.vertices.push(i.start,i.end),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._widthText||(this._widthText=new TextWithBackground(this._font)),this._widthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(t,0,s,this._cameraPosition)}_updateHeight(){let e=new THREE.Geometry,i=this._getHeightEdge();e.vertices.push(i.start,i.end),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._heightText||(this._heightText=new TextWithBackground(this._font)),this._heightText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(t,1,s,this._cameraPosition)}_updateDepth(){let e=new THREE.Geometry,i=this._getDepthEdge();e.vertices.push(i.start,i.end),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let t=i.getCenter(new THREE.Vector3);this._depthText||(this._depthText=new TextWithBackground(this._font)),this._depthText.topDown=this._topDimensions;const s=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(t,2,s,this._cameraPosition)}updateBounds(e){this._dimensions=e.getSize(new THREE.Vector3),this._lineBounds=e.clone();let i=this._lineBounds.min.y<0?this._lineBounds.min.y:0;i-=.01,this._lineBounds.expandByVector(new THREE.Vector3(.05,i,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,i){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),i.add(this._widthText),e.add(this._heightLine),i.add(this._heightText),e.add(this._depthLine),i.add(this._depthText))}removeFromScene(e,i){e.remove(this._widthLine),i.remove(this._widthText),e.remove(this._heightLine),i.remove(this._heightText),e.remove(this._depthLine),i.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new THREE.Line3(new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new THREE.Line3(new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new THREE.Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new THREE.Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}return __decorate([inject],e.prototype,"_unitFormatter",void 0),e})();export default DimensioningHelper;
2
+ //# sourceMappingURL=dimensioning-helper-3358a318.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-55aa9709.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"ggIAAe"}
1
+ {"version":3,"file":"dimensioning-helper-3358a318.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-eb3f3b61078695cc.json\""],"names":[],"mappings":"ggIAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-6a614458.nomodule.js","./main-thread-to-worker-4fc95d50.nomodule.js","./pixotron-c033394c.nomodule.js","./default-light-setting-86b8760c.nomodule.js"],(function(e){var t,i,r,s,n,a,o,h,c,l,d,_,m,u,p,g,w,E,f,b,S,v,L,C,M;return{setters:[function(){},function(e){t=e.n,i=e.L,r=e.o,s=e.K,n=e._,a=e.i,o=e.d,h=e.e,c=e.P,l=e.f,d=e.a9,_=e.aa,m=e.s},function(e){u=e.f},function(e){p=e.I,g=e.b,w=e.C,E=e.L,f=e.S,b=e.B,S=e.T,v=e.P,L=e.d,C=e.M},function(e){M=e.D}],execute:function(){const y=[new t("script-loader",g),new t("glb-input-manager",class extends p{},1),new t("logger",i),new t("rapi-access",r)];class R extends w{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,i,r,s){let n=new THREE.Vector3(-e.x/2,0,-e.z/2),a=new THREE.Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new THREE.Box3(n,a);let o=new THREE.Euler(-Math.PI/2+r,i,0,"ZYX"),h=(new THREE.Quaternion).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class B extends E{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=s();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new THREE.Color(e)})}}}let T=(()=>{class e extends f{constructor(e,t){super(e,t,o.GLB,"3D"),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(h.createDynamicLightSettingSource(null,c.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new B(this._scene)),this._setEnvironment(new b(this._scene,this._environment))}createCameraControl(e,t){this._cameraControl=new R(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const i=await this._rapiAccess.getItem(e);if(i.configuration)return Promise.reject();const r=u(i);return r?this.loadGLB(r,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,i=new THREE.Vector3(1,1,1),r){return this.clearScene(),new Promise((s,n)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,i,void 0,void 0,r).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let i=(new THREE.Box3).setFromObject(this._currentGLB);if(t){let e=i.getCenter(new THREE.Vector3);this._cameraControl instanceof R&&(this._cameraControl.updateToBounds(i,!1,!0,e),this._cameraControl.reset(i,e,-15,0))}this._updateBounds(i),s()},n)})}preparePerspectiveImage(e,t,i){return new Promise(r=>{t||(t=1e3),i||(i=1e3),e||((e=new THREE.WebGLRenderer({antialias:!0})).setSize(t,i),e.outputEncoding=THREE.sRGBEncoding,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=THREE.BasicShadowMap);let s=this._cameraControl.getCamera().clone();s instanceof THREE.PerspectiveCamera&&(s.aspect=t/i,s.updateProjectionMatrix()),this._lightSetting.removeFromScene();let n=new M(this._scene);e.render(this._scene,s);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{r({image:a,width:t,height:i,blob:e})},"image/png"),n.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,i,r){if(this._cameraControl instanceof R){let s=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(s,e,t,i,r),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),l(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD(),this._pixotron.enableAA=!1,this._pixotron.getSAOPass().enabled=!0}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.4,smoothTransition:!0,samplesPerFrame:4,bias:.016,numSamples:200,accumulative:!1,falloff:1.5},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightDirection:new THREE.Vector3(0,1,.5),lightSolidAngle:40}}getBounds(){return this._currentGLB?(new THREE.Box3).setFromObject(this._currentGLB):null}}return n([a],e.prototype,"_glbInputManager",void 0),n([a],e.prototype,"_rapiAccess",void 0),e})();class x{constructor(e,t,i){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=i,this._renderer.setSize(t,i),this._renderer.setClearColor(16777215,0),this._renderer.outputEncoding=THREE.sRGBEncoding}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new THREE.Vector3(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let i=this._entries.indexOf(e);i>-1&&this._entries.splice(i,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}let H=(()=>{class e{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(d,{id:"gltf-loader"}),i=this._scriptLoader.fetch(_,{id:"draco-loader"}),r=this._scriptLoader.fetch(S,{id:"tween-js"});Promise.all([t,i,r]).then(()=>{this._sceneManager=new T(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const i=()=>{this._sceneManager.enableHD(),e()};Promise.all(v.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(L,{id:"pi-js"}).then(i,t)},t)})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,i){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new THREE.Vector3(t,t,t),i)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,i=320){let r=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-dd6c9829408677a1.js",{id:"jszip-js"}).then(()=>{let e=new x(this._sceneManager,t,i);e.addListener(this._sceneManager),e.start(r.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{let i=document.createElement("a");i.href=URL.createObjectURL(t),i.download="content.zip",i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}}return n([a],e.prototype,"_rapiAccess",void 0),n([a],e.prototype,"_domHelper",void 0),n([a],e.prototype,"_scriptLoader",void 0),n([a],e.prototype,"_lifeCycleManager",void 0),n([a],e.prototype,"_threeLoader",void 0),n([a],e.prototype,"_initData",void 0),n([a],e.prototype,"_globalInitData",void 0),e})();e("GlbViewer",class extends C{setupGlobals(){}setupDependencies(){m.setup(y),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new H(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
- //# sourceMappingURL=glb-viewer-1482553f.nomodule.js.map
1
+ System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-5df63b00.nomodule.js","./main-thread-to-worker-97315397.nomodule.js","./pixotron-9b23daa3.nomodule.js","./default-light-setting-0cfc3fcd.nomodule.js"],(function(e){var t,i,r,s,n,a,o,h,c,d,l,_,m,u,p,g,w,f,E,b,S,v,L,C,M;return{setters:[function(){},function(e){t=e.e,i=e.L,r=e.f,s=e.J,n=e._,a=e.i,o=e.C,h=e.D,c=e.P,d=e.d,l=e.aa,_=e.ab,m=e.r},function(e){u=e.f},function(e){p=e.I,g=e.b,w=e.C,f=e.L,E=e.S,b=e.B,S=e.T,v=e.P,L=e.d,C=e.M},function(e){M=e.D}],execute:function(){const y=[new t("script-loader",g),new t("glb-input-manager",class extends p{},1),new t("logger",i),new t("rapi-access",r)];class R extends w{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,i,r,s){let n=new THREE.Vector3(-e.x/2,0,-e.z/2),a=new THREE.Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new THREE.Box3(n,a);let o=new THREE.Euler(-Math.PI/2+r,i,0,"ZYX"),h=(new THREE.Quaternion).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class B extends f{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=s();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new THREE.Color(e)})}}}let T=(()=>{class e extends E{constructor(e,t){super(e,t,o.GLB,"3D"),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(h.createDynamicLightSettingSource(null,c.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new B(this._scene)),this._setEnvironment(new b(this._scene,this._environment))}createCameraControl(e,t){this._cameraControl=new R(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const i=await this._rapiAccess.getItem(e);if(i.configuration)return Promise.reject();const r=u(i);return r?this.loadGLB(r,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,i=new THREE.Vector3(1,1,1),r){return this.clearScene(),new Promise((s,n)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,i,void 0,void 0,r).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let i=(new THREE.Box3).setFromObject(this._currentGLB);if(t){let e=i.getCenter(new THREE.Vector3);this._cameraControl instanceof R&&(this._cameraControl.updateToBounds(i,!1,!0,e),this._cameraControl.reset(i,e,-15,0))}this._updateBounds(i),s()},n)})}preparePerspectiveImage(e,t,i){return new Promise(r=>{t||(t=1e3),i||(i=1e3),e||((e=new THREE.WebGLRenderer({antialias:!0})).setSize(t,i),e.outputEncoding=THREE.sRGBEncoding,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=THREE.BasicShadowMap);let s=this._cameraControl.getCamera().clone();s instanceof THREE.PerspectiveCamera&&(s.aspect=t/i,s.updateProjectionMatrix()),this._lightSetting.removeFromScene();let n=new M(this._scene);e.render(this._scene,s);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{r({image:a,width:t,height:i,blob:e})},"image/png"),n.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,i,r){if(this._cameraControl instanceof R){let s=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(s,e,t,i,r),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof R&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),d(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD(),this._pixotron.enableAA=!1,this._pixotron.getSAOPass().enabled=!0}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.4,smoothTransition:!0,samplesPerFrame:4,bias:.016,numSamples:200,accumulative:!1,falloff:1.5},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightDirection:new THREE.Vector3(0,1,.5),lightSolidAngle:40}}getBounds(){return this._currentGLB?(new THREE.Box3).setFromObject(this._currentGLB):null}}return n([a],e.prototype,"_glbInputManager",void 0),n([a],e.prototype,"_rapiAccess",void 0),e})();class x{constructor(e,t,i){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=i,this._renderer.setSize(t,i),this._renderer.setClearColor(16777215,0),this._renderer.outputEncoding=THREE.sRGBEncoding}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new THREE.Vector3(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let i=this._entries.indexOf(e);i>-1&&this._entries.splice(i,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}let H=(()=>{class e{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(l,{id:"gltf-loader"}),i=this._scriptLoader.fetch(_,{id:"draco-loader"}),r=this._scriptLoader.fetch(S,{id:"tween-js"});Promise.all([t,i,r]).then(()=>{this._sceneManager=new T(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const i=()=>{this._sceneManager.enableHD(),e()};Promise.all(v.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(L,{id:"pi-js"}).then(i,t)},t)})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,i){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new THREE.Vector3(t,t,t),i)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,i=320){let r=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-dd6c9829408677a1.js",{id:"jszip-js"}).then(()=>{let e=new x(this._sceneManager,t,i);e.addListener(this._sceneManager),e.start(r.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{let i=document.createElement("a");i.href=URL.createObjectURL(t),i.download="content.zip",i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}}return n([a],e.prototype,"_rapiAccess",void 0),n([a],e.prototype,"_domHelper",void 0),n([a],e.prototype,"_scriptLoader",void 0),n([a],e.prototype,"_lifeCycleManager",void 0),n([a],e.prototype,"_threeLoader",void 0),n([a],e.prototype,"_initData",void 0),n([a],e.prototype,"_globalInitData",void 0),e})();e("GlbViewer",class extends C{setupGlobals(){}setupDependencies(){m.setup(y),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new H(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
+ //# sourceMappingURL=glb-viewer-79f4e8f2.nomodule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-1482553f.nomodule.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"i5QAAe"}
1
+ {"version":3,"file":"glb-viewer-79f4e8f2.nomodule.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"i5QAAe"}
@@ -1,2 +1,2 @@
1
- import"./query-params-helper-a271f9dc.js";import{n as DependencyInjectionAssignment,L as Logger,o as RapiAccess,K as getGUI,_ as __decorate,i as inject,d as CANVAS_ID,e as DynamicLightSettingLoader,P as PREDEFINED_LIGHTSETTING,f as dispose,a9 as GLTF_LOADER_FILE_NAME,aa as DRACO_LOADER_FILE_NAME,s as RoomleDependencyInjection}from"./rapi-access-21338f5f.js";import{f as getGlbUrl}from"./main-thread-to-worker-5447c1c5.js";import{I as InputManager,b as ScriptLoader,C as CameraControl3D,L as LightSetting,S as SceneManager,B as BakedShadowEnvironment,T as TWEEN_FILE_NAME,P as PIXOTRON_EFFETCS,d as PIXOTRON_FILE_NAME,M as Main}from"./pixotron-76665c10.js";import{D as DefaultLightSetting}from"./default-light-setting-88521da5.js";const INJECTABLES=[new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("glb-input-manager",class extends InputManager{},1),new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("rapi-access",RapiAccess)];class AdjustableCameraControl3D extends CameraControl3D{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,n,i){let s=new THREE.Vector3(-e.x/2,0,-e.z/2),a=new THREE.Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new THREE.Box3(s,a);let o=new THREE.Euler(-Math.PI/2+n,r,0,"ZYX"),c=(new THREE.Quaternion).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(c),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class GLBViewerLightSetting extends LightSetting{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=getGUI();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new THREE.Color(e)})}}}let GLBViewerSceneManager=(()=>{class e extends SceneManager{constructor(e,t){super(e,t,CANVAS_ID.GLB,"3D"),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(DynamicLightSettingLoader.createDynamicLightSettingSource(null,PREDEFINED_LIGHTSETTING.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new GLBViewerLightSetting(this._scene)),this._setEnvironment(new BakedShadowEnvironment(this._scene,this._environment))}createCameraControl(e,t){this._cameraControl=new AdjustableCameraControl3D(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const n=getGlbUrl(r);return n?this.loadGLB(n,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new THREE.Vector3(1,1,1),n){return this.clearScene(),new Promise((i,s)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,r,void 0,void 0,n).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new THREE.Box3).setFromObject(this._currentGLB);if(t){let e=r.getCenter(new THREE.Vector3);this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.updateToBounds(r,!1,!0,e),this._cameraControl.reset(r,e,-15,0))}this._updateBounds(r),i()},s)})}preparePerspectiveImage(e,t,r){return new Promise(n=>{t||(t=1e3),r||(r=1e3),e||((e=new THREE.WebGLRenderer({antialias:!0})).setSize(t,r),e.outputEncoding=THREE.sRGBEncoding,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=THREE.BasicShadowMap);let i=this._cameraControl.getCamera().clone();i instanceof THREE.PerspectiveCamera&&(i.aspect=t/r,i.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new DefaultLightSetting(this._scene);e.render(this._scene,i);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{n({image:a,width:t,height:r,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,r,n){if(this._cameraControl instanceof AdjustableCameraControl3D){let i=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(i,e,t,r,n),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),dispose(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD(),this._pixotron.enableAA=!1,this._pixotron.getSAOPass().enabled=!0}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.4,smoothTransition:!0,samplesPerFrame:4,bias:.016,numSamples:200,accumulative:!1,falloff:1.5},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightDirection:new THREE.Vector3(0,1,.5),lightSolidAngle:40}}getBounds(){return this._currentGLB?(new THREE.Box3).setFromObject(this._currentGLB):null}}return __decorate([inject],e.prototype,"_glbInputManager",void 0),__decorate([inject],e.prototype,"_rapiAccess",void 0),e})();class GLBRenderWorker{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputEncoding=THREE.sRGBEncoding}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new THREE.Vector3(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}let RoomleGLBViewer=(()=>{class e{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(GLTF_LOADER_FILE_NAME,{id:"gltf-loader"}),r=this._scriptLoader.fetch(DRACO_LOADER_FILE_NAME,{id:"draco-loader"}),n=this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"});Promise.all([t,r,n]).then(()=>{this._sceneManager=new GLBViewerSceneManager(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const r=()=>{this._sceneManager.enableHD(),e()};Promise.all(PIXOTRON_EFFETCS.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(PIXOTRON_FILE_NAME,{id:"pi-js"}).then(r,t)},t)})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new THREE.Vector3(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let n=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-dd6c9829408677a1.js",{id:"jszip-js"}).then(()=>{let e=new GLBRenderWorker(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(n.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{let r=document.createElement("a");r.href=URL.createObjectURL(t),r.download="content.zip",r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}}return __decorate([inject],e.prototype,"_rapiAccess",void 0),__decorate([inject],e.prototype,"_domHelper",void 0),__decorate([inject],e.prototype,"_scriptLoader",void 0),__decorate([inject],e.prototype,"_lifeCycleManager",void 0),__decorate([inject],e.prototype,"_threeLoader",void 0),__decorate([inject],e.prototype,"_initData",void 0),__decorate([inject],e.prototype,"_globalInitData",void 0),e})();class GlbViewer extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new RoomleGLBViewer(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}}export{GlbViewer};
2
- //# sourceMappingURL=glb-viewer-75d1de15.js.map
1
+ import"./query-params-helper-a271f9dc.js";import{e as DependencyInjectionAssignment,L as Logger,f as RapiAccess,J as getGUI,_ as __decorate,i as inject,C as CANVAS_ID,D as DynamicLightSettingLoader,P as PREDEFINED_LIGHTSETTING,d as dispose,aa as GLTF_LOADER_FILE_NAME,ab as DRACO_LOADER_FILE_NAME,r as RoomleDependencyInjection}from"./rapi-access-184c82bc.js";import{f as getGlbUrl}from"./main-thread-to-worker-9d399850.js";import{I as InputManager,b as ScriptLoader,C as CameraControl3D,L as LightSetting,S as SceneManager,B as BakedShadowEnvironment,T as TWEEN_FILE_NAME,P as PIXOTRON_EFFETCS,d as PIXOTRON_FILE_NAME,M as Main}from"./pixotron-f16e92fe.js";import{D as DefaultLightSetting}from"./default-light-setting-4c3fa180.js";const INJECTABLES=[new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("glb-input-manager",class extends InputManager{},1),new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("rapi-access",RapiAccess)];class AdjustableCameraControl3D extends CameraControl3D{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,n,i){let s=new THREE.Vector3(-e.x/2,0,-e.z/2),a=new THREE.Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new THREE.Box3(s,a);let o=new THREE.Euler(-Math.PI/2+n,r,0,"ZYX"),c=(new THREE.Quaternion).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(c),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class GLBViewerLightSetting extends LightSetting{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new THREE.AmbientLight(new THREE.Color(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=getGUI();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new THREE.Color(e)})}}}let GLBViewerSceneManager=(()=>{class e extends SceneManager{constructor(e,t){super(e,t,CANVAS_ID.GLB,"3D"),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(DynamicLightSettingLoader.createDynamicLightSettingSource(null,PREDEFINED_LIGHTSETTING.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new GLBViewerLightSetting(this._scene)),this._setEnvironment(new BakedShadowEnvironment(this._scene,this._environment))}createCameraControl(e,t){this._cameraControl=new AdjustableCameraControl3D(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const n=getGlbUrl(r);return n?this.loadGLB(n,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new THREE.Vector3(1,1,1),n){return this.clearScene(),new Promise((i,s)=>{this._loadGLB(e,new THREE.Vector3(0,0,0),0,void 0,r,void 0,void 0,n).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new THREE.Box3).setFromObject(this._currentGLB);if(t){let e=r.getCenter(new THREE.Vector3);this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.updateToBounds(r,!1,!0,e),this._cameraControl.reset(r,e,-15,0))}this._updateBounds(r),i()},s)})}preparePerspectiveImage(e,t,r){return new Promise(n=>{t||(t=1e3),r||(r=1e3),e||((e=new THREE.WebGLRenderer({antialias:!0})).setSize(t,r),e.outputEncoding=THREE.sRGBEncoding,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=THREE.BasicShadowMap);let i=this._cameraControl.getCamera().clone();i instanceof THREE.PerspectiveCamera&&(i.aspect=t/r,i.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new DefaultLightSetting(this._scene);e.render(this._scene,i);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{n({image:a,width:t,height:r,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,r,n){if(this._cameraControl instanceof AdjustableCameraControl3D){let i=(new THREE.Box3).setFromObject(this._scene).getSize(new THREE.Vector3);this._cameraControl.adjust(i,e,t,r,n),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),dispose(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD(),this._pixotron.enableAA=!1,this._pixotron.getSAOPass().enabled=!0}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.4,smoothTransition:!0,samplesPerFrame:4,bias:.016,numSamples:200,accumulative:!1,falloff:1.5},shadowparams:{shadowMapResolution:1024,shadowRadius:3,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.6,nearPlane:.01,farPlane:50,fov:110,side:THREE.FrontSide,numSamples:100}}}getBakedShadowParams(){return{enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightDirection:new THREE.Vector3(0,1,.5),lightSolidAngle:40}}getBounds(){return this._currentGLB?(new THREE.Box3).setFromObject(this._currentGLB):null}}return __decorate([inject],e.prototype,"_glbInputManager",void 0),__decorate([inject],e.prototype,"_rapiAccess",void 0),e})();class GLBRenderWorker{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputEncoding=THREE.sRGBEncoding}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new THREE.Vector3(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}let RoomleGLBViewer=(()=>{class e{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){this._threeLoader.fetch().then(()=>{let t=this._scriptLoader.fetch(GLTF_LOADER_FILE_NAME,{id:"gltf-loader"}),r=this._scriptLoader.fetch(DRACO_LOADER_FILE_NAME,{id:"draco-loader"}),n=this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"});Promise.all([t,r,n]).then(()=>{this._sceneManager=new GLBViewerSceneManager(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const r=()=>{this._sceneManager.enableHD(),e()};Promise.all(PIXOTRON_EFFETCS.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(PIXOTRON_FILE_NAME,{id:"pi-js"}).then(r,t)},t)})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new THREE.Vector3(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let n=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-dd6c9829408677a1.js",{id:"jszip-js"}).then(()=>{let e=new GLBRenderWorker(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(n.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{let r=document.createElement("a");r.href=URL.createObjectURL(t),r.download="content.zip",r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}}return __decorate([inject],e.prototype,"_rapiAccess",void 0),__decorate([inject],e.prototype,"_domHelper",void 0),__decorate([inject],e.prototype,"_scriptLoader",void 0),__decorate([inject],e.prototype,"_lifeCycleManager",void 0),__decorate([inject],e.prototype,"_threeLoader",void 0),__decorate([inject],e.prototype,"_initData",void 0),__decorate([inject],e.prototype,"_globalInitData",void 0),e})();class GlbViewer extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new RoomleGLBViewer(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}}export{GlbViewer};
2
+ //# sourceMappingURL=glb-viewer-f03a2567.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-75d1de15.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"0uSAAe"}
1
+ {"version":3,"file":"glb-viewer-f03a2567.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"0uSAAe"}
@@ -0,0 +1,2 @@
1
+ import"./query-params-helper-a271f9dc.js";import"./rapi-access-184c82bc.js";import"./main-thread-to-worker-9d399850.js";import"./pixotron-f16e92fe.js";import"./default-light-setting-4c3fa180.js";import{GlbViewer}from"./glb-viewer-f03a2567.js";(new GlbViewer).boot();
2
+ //# sourceMappingURL=glb-viewer-main-0f214277.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glb-viewer-main-0f214277.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-6a614458.nomodule.js","./main-thread-to-worker-4fc95d50.nomodule.js","./pixotron-c033394c.nomodule.js","./default-light-setting-86b8760c.nomodule.js","./glb-viewer-1482553f.nomodule.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(n){e=n.GlbViewer}],execute:function(){(new e).boot()}}}));
1
+ System.register(["./query-params-helper-c231e1b8.nomodule.js","./rapi-access-5df63b00.nomodule.js","./main-thread-to-worker-97315397.nomodule.js","./pixotron-9b23daa3.nomodule.js","./default-light-setting-0cfc3fcd.nomodule.js","./glb-viewer-79f4e8f2.nomodule.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(n){e=n.GlbViewer}],execute:function(){(new e).boot()}}}));
2
2
  //# sourceMappingURL=glb-viewer-main.nomodule.js.map