@roomle/web-sdk 2.52.0-debug.1 → 2.52.0

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 (218) hide show
  1. package/lib/banana-for-scale-30597efb.nomodule.js +2 -0
  2. package/lib/{banana-for-scale-beb021eb.nomodule.js.map → banana-for-scale-30597efb.nomodule.js.map} +1 -1
  3. package/lib/banana-for-scale-7974e8a1.js +2 -0
  4. package/lib/{banana-for-scale-7f4886dc.js.map → banana-for-scale-7974e8a1.js.map} +1 -1
  5. package/lib/{component-dimensioning-172d70ad.nomodule.js → component-dimensioning-421bbb31.nomodule.js} +2 -2
  6. package/lib/component-dimensioning-421bbb31.nomodule.js.map +1 -0
  7. package/lib/{component-dimensioning-9246c6cc.js → component-dimensioning-8f50e9ae.js} +2 -2
  8. package/lib/component-dimensioning-8f50e9ae.js.map +1 -0
  9. package/lib/{component-raycast-helper-619320dd.nomodule.js → component-raycast-helper-6785d475.nomodule.js} +2 -2
  10. package/lib/component-raycast-helper-6785d475.nomodule.js.map +1 -0
  11. package/lib/{component-raycast-helper-f1b04bb6.js → component-raycast-helper-ff38d8de.js} +2 -2
  12. package/lib/component-raycast-helper-ff38d8de.js.map +1 -0
  13. package/lib/{configurator-8d5b17e5.js → configurator-4d69676d.js} +2 -2
  14. package/lib/configurator-4d69676d.js.map +1 -0
  15. package/lib/{configurator-089743c8.nomodule.js → configurator-9775c600.nomodule.js} +2 -2
  16. package/lib/configurator-9775c600.nomodule.js.map +1 -0
  17. package/lib/configurator-dummy-app.js +1 -1
  18. package/lib/configurator-dummy-app.js.map +1 -1
  19. package/lib/configurator-main-f4289e3c.js +2 -0
  20. package/lib/configurator-main-f4289e3c.js.map +1 -0
  21. package/lib/configurator-main.nomodule.js +1 -1
  22. package/lib/{continuous-drawing-helper-7269b28d.js → continuous-drawing-helper-6ab69cc6.js} +2 -2
  23. package/lib/continuous-drawing-helper-6ab69cc6.js.map +1 -0
  24. package/lib/{continuous-drawing-helper-161e3098.nomodule.js → continuous-drawing-helper-c361dcaa.nomodule.js} +2 -2
  25. package/lib/continuous-drawing-helper-c361dcaa.nomodule.js.map +1 -0
  26. package/lib/{default-light-setting-de008a6d.js → default-light-setting-696a1899.js} +2 -2
  27. package/lib/default-light-setting-696a1899.js.map +1 -0
  28. package/lib/{default-light-setting-d6819041.nomodule.js → default-light-setting-f0a27d18.nomodule.js} +2 -2
  29. package/lib/default-light-setting-f0a27d18.nomodule.js.map +1 -0
  30. package/lib/definitions/common-core/src/configurator-kernel-access.d.ts +1 -0
  31. package/lib/definitions/common-core/src/rapi-access.d.ts +9 -2
  32. package/lib/definitions/common-core/src/utils/shims.d.ts +1 -0
  33. package/lib/definitions/common-core/src/webgl/static-item-loader.d.ts +6 -2
  34. package/lib/definitions/configurator-core/mock/kernel-mock.d.ts +1 -1
  35. package/lib/definitions/planner-core/src/roomle-planner.d.ts +4 -2
  36. package/lib/definitions/planner-core/src/view-model/static-plan-object-view-model.d.ts +2 -0
  37. package/lib/definitions/typings/configurator-kernel-container.d.ts +1 -1
  38. package/lib/definitions/typings/kernel.d.ts +1 -0
  39. package/lib/definitions/typings/planner-kernel-container.d.ts +2 -2
  40. package/lib/definitions/typings/planner.d.ts +10 -1
  41. package/lib/definitions/typings/rapi-types.d.ts +15 -0
  42. package/lib/{dimensioning-helper-26db3ade.js → dimensioning-helper-a712794b.js} +2 -2
  43. package/lib/{dimensioning-helper-26db3ade.js.map → dimensioning-helper-a712794b.js.map} +1 -1
  44. package/lib/{dimensioning-helper-0d4caa33.nomodule.js → dimensioning-helper-cbf5f542.nomodule.js} +2 -2
  45. package/lib/{dimensioning-helper-0d4caa33.nomodule.js.map → dimensioning-helper-cbf5f542.nomodule.js.map} +1 -1
  46. package/lib/{glb-viewer-91d48343.js → glb-viewer-1371edb6.js} +2 -2
  47. package/lib/{glb-viewer-91d48343.js.map → glb-viewer-1371edb6.js.map} +1 -1
  48. package/lib/{glb-viewer-0246e88b.nomodule.js → glb-viewer-29ff1d91.nomodule.js} +2 -2
  49. package/lib/{glb-viewer-0246e88b.nomodule.js.map → glb-viewer-29ff1d91.nomodule.js.map} +1 -1
  50. package/lib/glb-viewer-main-1c408241.js +2 -0
  51. package/lib/glb-viewer-main-1c408241.js.map +1 -0
  52. package/lib/glb-viewer-main.nomodule.js +1 -1
  53. package/lib/legacy/banana-for-scale-18804f5f.legacy.js +2 -0
  54. package/lib/legacy/{banana-for-scale-be99f7f4.legacy.js.map → banana-for-scale-18804f5f.legacy.js.map} +1 -1
  55. package/lib/legacy/{component-dimensioning-7393934c.legacy.js → component-dimensioning-5d54719c.legacy.js} +2 -2
  56. package/lib/legacy/component-dimensioning-5d54719c.legacy.js.map +1 -0
  57. package/lib/legacy/{component-raycast-helper-3943f1d8.legacy.js → component-raycast-helper-a10a6f49.legacy.js} +2 -2
  58. package/lib/legacy/component-raycast-helper-a10a6f49.legacy.js.map +1 -0
  59. package/lib/legacy/{configurator-7c3619d8.legacy.js → configurator-7d487924.legacy.js} +2 -2
  60. package/lib/legacy/configurator-7d487924.legacy.js.map +1 -0
  61. package/lib/legacy/configurator-main.legacy.js +1 -1
  62. package/lib/legacy/{continuous-drawing-helper-e7cc68f4.legacy.js → continuous-drawing-helper-92d203da.legacy.js} +2 -2
  63. package/lib/legacy/continuous-drawing-helper-92d203da.legacy.js.map +1 -0
  64. package/lib/legacy/{default-light-setting-31623ca0.legacy.js → default-light-setting-283463e3.legacy.js} +2 -2
  65. package/lib/legacy/default-light-setting-283463e3.legacy.js.map +1 -0
  66. package/lib/legacy/{dimensioning-helper-acdfd39b.legacy.js → dimensioning-helper-c080117e.legacy.js} +2 -2
  67. package/lib/legacy/{dimensioning-helper-acdfd39b.legacy.js.map → dimensioning-helper-c080117e.legacy.js.map} +1 -1
  68. package/lib/legacy/{glb-viewer-e96b3963.legacy.js → glb-viewer-afc3ac60.legacy.js} +2 -2
  69. package/lib/legacy/{glb-viewer-e96b3963.legacy.js.map → glb-viewer-afc3ac60.legacy.js.map} +1 -1
  70. package/lib/legacy/glb-viewer-main.legacy.js +1 -1
  71. package/lib/legacy/{material-viewer-2f01e891.legacy.js → material-viewer-9b643aef.legacy.js} +2 -2
  72. package/lib/legacy/material-viewer-9b643aef.legacy.js.map +1 -0
  73. package/lib/legacy/material-viewer-main.legacy.js +1 -1
  74. package/lib/legacy/{pixotron-aed2579e.legacy.js → pixotron-ea1b5c34.legacy.js} +2 -2
  75. package/lib/legacy/{pixotron-aed2579e.legacy.js.map → pixotron-ea1b5c34.legacy.js.map} +1 -1
  76. package/lib/legacy/planner-b540a57e.legacy.js +2 -0
  77. package/lib/legacy/{planner-6c0ce8eb.legacy.js.map → planner-b540a57e.legacy.js.map} +1 -1
  78. package/lib/legacy/planner-main.legacy.js +1 -1
  79. package/lib/legacy/roomle-configurator-c972b0fa.legacy.js +2 -0
  80. package/lib/legacy/{roomle-configurator-89322fbd.legacy.js.map → roomle-configurator-c972b0fa.legacy.js.map} +1 -1
  81. package/lib/legacy/roomle-dependency-injection-9039338d.legacy.js +16 -0
  82. package/lib/legacy/{roomle-dependency-injection-6d4fe95c.legacy.js.map → roomle-dependency-injection-9039338d.legacy.js.map} +1 -1
  83. package/lib/legacy/roomle-sdk.legacy.js +1 -1
  84. package/lib/legacy/{script-loader-a64acbb1.legacy.js → script-loader-7a3768a8.legacy.js} +2 -2
  85. package/lib/legacy/script-loader-7a3768a8.legacy.js.map +1 -0
  86. package/lib/legacy/static/ConfiguratorKernel-d16ae27ee72e88e0.wasm +0 -0
  87. package/lib/legacy/static/{ConfiguratorKernel-4a120e5209cf1cd0.js → ConfiguratorKernel-f0f690a2a1ca4c6d.js} +25 -25
  88. package/lib/legacy/static/ConfiguratorKernelJs-247da5a777bb2add.js +146 -0
  89. package/lib/legacy/static/ConfiguratorKernelJs-bb1d20624c2b4740.mem +0 -0
  90. package/lib/legacy/static/RoomleCore-6426a8a0d5a9d1c1.wasm +0 -0
  91. package/lib/legacy/static/RoomleCore-77341d3d3c69e85f.js +131 -0
  92. package/lib/legacy/static/RoomleCoreJs-2e1bc7afad0a13a5.js +156 -0
  93. package/lib/legacy/static/RoomleCoreJs-fef5f2a658bf77c3.mem +0 -0
  94. package/lib/legacy/static/{RoomleToolsCore-1fbf3bc88981cea9.js → RoomleToolsCore-210c30ed9c3f421a.js} +19 -19
  95. package/lib/legacy/static/RoomleToolsCore-ff9d37683de473c7.wasm +0 -0
  96. package/lib/{static/shaders-a517109fc4195f66.json → legacy/static/shaders-d6a40bba2f93a977.json} +1 -1
  97. package/lib/legacy/{stats-helper-767882c3.legacy.js → stats-helper-de80177e.legacy.js} +2 -2
  98. package/lib/legacy/{stats-helper-767882c3.legacy.js.map → stats-helper-de80177e.legacy.js.map} +1 -1
  99. package/lib/legacy/{tools-core-253210a4.legacy.js → tools-core-69b04981.legacy.js} +2 -2
  100. package/lib/legacy/tools-core-69b04981.legacy.js.map +1 -0
  101. package/lib/{material-viewer-3b958f44.js → material-viewer-5804025c.js} +2 -2
  102. package/lib/material-viewer-5804025c.js.map +1 -0
  103. package/lib/{material-viewer-e73cc1f8.nomodule.js → material-viewer-c20237e6.nomodule.js} +2 -2
  104. package/lib/material-viewer-c20237e6.nomodule.js.map +1 -0
  105. package/lib/material-viewer-main-35d2c933.js +2 -0
  106. package/lib/material-viewer-main-35d2c933.js.map +1 -0
  107. package/lib/material-viewer-main.nomodule.js +1 -1
  108. package/lib/{pixotron-ad110207.js → pixotron-3bc73e7b.js} +2 -2
  109. package/lib/{pixotron-ad110207.js.map → pixotron-3bc73e7b.js.map} +1 -1
  110. package/lib/{pixotron-becbee6b.nomodule.js → pixotron-c971205e.nomodule.js} +2 -2
  111. package/lib/{pixotron-becbee6b.nomodule.js.map → pixotron-c971205e.nomodule.js.map} +1 -1
  112. package/lib/planner-a5199e6f.js +2 -0
  113. package/lib/{planner-86b833ec.js.map → planner-a5199e6f.js.map} +1 -1
  114. package/lib/planner-ef12336e.nomodule.js +2 -0
  115. package/lib/{planner-0176717a.nomodule.js.map → planner-ef12336e.nomodule.js.map} +1 -1
  116. package/lib/planner-main-4201f12d.js +2 -0
  117. package/lib/planner-main-4201f12d.js.map +1 -0
  118. package/lib/planner-main.nomodule.js +1 -1
  119. package/lib/roomle-configurator-23794a99.js +2 -0
  120. package/lib/{roomle-configurator-ff35715f.js.map → roomle-configurator-23794a99.js.map} +1 -1
  121. package/lib/roomle-configurator-a87e275f.nomodule.js +2 -0
  122. package/lib/{roomle-configurator-e7256218.nomodule.js.map → roomle-configurator-a87e275f.nomodule.js.map} +1 -1
  123. package/lib/roomle-dependency-injection-11aa8a76.nomodule.js +16 -0
  124. package/lib/{roomle-dependency-injection-95fcebc2.nomodule.js.map → roomle-dependency-injection-11aa8a76.nomodule.js.map} +1 -1
  125. package/lib/roomle-dependency-injection-f2fa0789.js +16 -0
  126. package/lib/{roomle-dependency-injection-0d6b01a8.js.map → roomle-dependency-injection-f2fa0789.js.map} +1 -1
  127. package/lib/{roomle-sdk-f552b223.js → roomle-sdk-5627632f.js} +2 -2
  128. package/lib/roomle-sdk-5627632f.js.map +1 -0
  129. package/lib/roomle-sdk.nomodule.js +1 -1
  130. package/lib/{script-loader-5681c298.js → script-loader-96d0be41.js} +2 -2
  131. package/lib/script-loader-96d0be41.js.map +1 -0
  132. package/lib/{script-loader-1d69982b.nomodule.js → script-loader-a86102bc.nomodule.js} +2 -2
  133. package/lib/script-loader-a86102bc.nomodule.js.map +1 -0
  134. package/lib/static/ConfiguratorKernel-d16ae27ee72e88e0.wasm +0 -0
  135. package/lib/static/{ConfiguratorKernel-4a120e5209cf1cd0.js → ConfiguratorKernel-f0f690a2a1ca4c6d.js} +1 -1
  136. package/lib/static/{ConfiguratorKernel-4a120e5209cf1cd0.js.map → ConfiguratorKernel-f0f690a2a1ca4c6d.js.map} +1 -1
  137. package/lib/static/ConfiguratorKernelJs-247da5a777bb2add.js +146 -0
  138. package/lib/static/ConfiguratorKernelJs-bb1d20624c2b4740.mem +0 -0
  139. package/lib/static/RoomleCore-6426a8a0d5a9d1c1.wasm +0 -0
  140. package/lib/static/RoomleCore-77341d3d3c69e85f.js +1 -0
  141. package/lib/static/RoomleCore-77341d3d3c69e85f.js.map +1 -0
  142. package/lib/static/RoomleCoreJs-2e1bc7afad0a13a5.js +156 -0
  143. package/lib/static/RoomleCoreJs-fef5f2a658bf77c3.mem +0 -0
  144. package/lib/static/{RoomleToolsCore-1fbf3bc88981cea9.js → RoomleToolsCore-210c30ed9c3f421a.js} +1 -1
  145. package/lib/static/{RoomleToolsCore-1fbf3bc88981cea9.js.map → RoomleToolsCore-210c30ed9c3f421a.js.map} +1 -1
  146. package/lib/static/RoomleToolsCore-ff9d37683de473c7.wasm +0 -0
  147. package/lib/{legacy/static/shaders-a517109fc4195f66.json → static/shaders-d6a40bba2f93a977.json} +1 -1
  148. package/lib/{stats-helper-7d9f0a8a.nomodule.js → stats-helper-04478d21.nomodule.js} +2 -2
  149. package/lib/{stats-helper-7d9f0a8a.nomodule.js.map → stats-helper-04478d21.nomodule.js.map} +1 -1
  150. package/lib/{stats-helper-b27c936e.js → stats-helper-54bf0373.js} +2 -2
  151. package/lib/{stats-helper-b27c936e.js.map → stats-helper-54bf0373.js.map} +1 -1
  152. package/lib/{tools-core-e26bb496.nomodule.js → tools-core-52e89220.nomodule.js} +2 -2
  153. package/lib/tools-core-52e89220.nomodule.js.map +1 -0
  154. package/lib/{tools-core-0d19f253.js → tools-core-9bd96441.js} +2 -2
  155. package/lib/tools-core-9bd96441.js.map +1 -0
  156. package/package.json +2 -2
  157. package/lib/banana-for-scale-7f4886dc.js +0 -2
  158. package/lib/banana-for-scale-beb021eb.nomodule.js +0 -2
  159. package/lib/component-dimensioning-172d70ad.nomodule.js.map +0 -1
  160. package/lib/component-dimensioning-9246c6cc.js.map +0 -1
  161. package/lib/component-raycast-helper-619320dd.nomodule.js.map +0 -1
  162. package/lib/component-raycast-helper-f1b04bb6.js.map +0 -1
  163. package/lib/configurator-089743c8.nomodule.js.map +0 -1
  164. package/lib/configurator-8d5b17e5.js.map +0 -1
  165. package/lib/configurator-main-f39a172b.js +0 -2
  166. package/lib/configurator-main-f39a172b.js.map +0 -1
  167. package/lib/continuous-drawing-helper-161e3098.nomodule.js.map +0 -1
  168. package/lib/continuous-drawing-helper-7269b28d.js.map +0 -1
  169. package/lib/default-light-setting-d6819041.nomodule.js.map +0 -1
  170. package/lib/default-light-setting-de008a6d.js.map +0 -1
  171. package/lib/glb-viewer-main-9f58a136.js +0 -2
  172. package/lib/glb-viewer-main-9f58a136.js.map +0 -1
  173. package/lib/legacy/banana-for-scale-be99f7f4.legacy.js +0 -2
  174. package/lib/legacy/component-dimensioning-7393934c.legacy.js.map +0 -1
  175. package/lib/legacy/component-raycast-helper-3943f1d8.legacy.js.map +0 -1
  176. package/lib/legacy/configurator-7c3619d8.legacy.js.map +0 -1
  177. package/lib/legacy/continuous-drawing-helper-e7cc68f4.legacy.js.map +0 -1
  178. package/lib/legacy/default-light-setting-31623ca0.legacy.js.map +0 -1
  179. package/lib/legacy/material-viewer-2f01e891.legacy.js.map +0 -1
  180. package/lib/legacy/planner-6c0ce8eb.legacy.js +0 -2
  181. package/lib/legacy/roomle-configurator-89322fbd.legacy.js +0 -2
  182. package/lib/legacy/roomle-dependency-injection-6d4fe95c.legacy.js +0 -16
  183. package/lib/legacy/script-loader-a64acbb1.legacy.js.map +0 -1
  184. package/lib/legacy/static/ConfiguratorKernel-fa95f23ce304f1db.wasm +0 -0
  185. package/lib/legacy/static/ConfiguratorKernelJs-843b32f9cf068595.js +0 -146
  186. package/lib/legacy/static/ConfiguratorKernelJs-b884d72267d0ed0f.mem +0 -0
  187. package/lib/legacy/static/RoomleCore-6c1973038e81be15.js +0 -131
  188. package/lib/legacy/static/RoomleCore-72494809ac9e04bb.wasm +0 -0
  189. package/lib/legacy/static/RoomleCoreJs-a1ed5d94a85e5ef0.mem +0 -0
  190. package/lib/legacy/static/RoomleCoreJs-bf2ff14d27bce33b.js +0 -155
  191. package/lib/legacy/static/RoomleToolsCore-152f43851b519f0a.wasm +0 -0
  192. package/lib/legacy/tools-core-253210a4.legacy.js.map +0 -1
  193. package/lib/material-viewer-3b958f44.js.map +0 -1
  194. package/lib/material-viewer-e73cc1f8.nomodule.js.map +0 -1
  195. package/lib/material-viewer-main-01a4fb08.js +0 -2
  196. package/lib/material-viewer-main-01a4fb08.js.map +0 -1
  197. package/lib/planner-0176717a.nomodule.js +0 -2
  198. package/lib/planner-86b833ec.js +0 -2
  199. package/lib/planner-main-d1636ed4.js +0 -2
  200. package/lib/planner-main-d1636ed4.js.map +0 -1
  201. package/lib/roomle-configurator-e7256218.nomodule.js +0 -2
  202. package/lib/roomle-configurator-ff35715f.js +0 -2
  203. package/lib/roomle-dependency-injection-0d6b01a8.js +0 -16
  204. package/lib/roomle-dependency-injection-95fcebc2.nomodule.js +0 -16
  205. package/lib/roomle-sdk-f552b223.js.map +0 -1
  206. package/lib/script-loader-1d69982b.nomodule.js.map +0 -1
  207. package/lib/script-loader-5681c298.js.map +0 -1
  208. package/lib/static/ConfiguratorKernel-fa95f23ce304f1db.wasm +0 -0
  209. package/lib/static/ConfiguratorKernelJs-843b32f9cf068595.js +0 -146
  210. package/lib/static/ConfiguratorKernelJs-b884d72267d0ed0f.mem +0 -0
  211. package/lib/static/RoomleCore-6c1973038e81be15.js +0 -1
  212. package/lib/static/RoomleCore-6c1973038e81be15.js.map +0 -1
  213. package/lib/static/RoomleCore-72494809ac9e04bb.wasm +0 -0
  214. package/lib/static/RoomleCoreJs-a1ed5d94a85e5ef0.mem +0 -0
  215. package/lib/static/RoomleCoreJs-bf2ff14d27bce33b.js +0 -155
  216. package/lib/static/RoomleToolsCore-152f43851b519f0a.wasm +0 -0
  217. package/lib/tools-core-0d19f253.js.map +0 -1
  218. package/lib/tools-core-e26bb496.nomodule.js.map +0 -1
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-6d4fe95c.legacy.js","./main-thread-to-worker-876e61ea.legacy.js"],(function(e){var i,t,s,n,h;return{setters:[function(e){i=e.u,t=e._,s=e.i,n=e.V,h=e.ar},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";class _ 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,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(){i(this)}}t([s],_.prototype,"_cacheHolder",void 0);class d{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 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}),h.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.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 _(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 _(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 _(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){if(!e)return;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}}e("default",d),t([s],d.prototype,"_unitFormatter",void 0)}}}));
2
- //# sourceMappingURL=dimensioning-helper-acdfd39b.legacy.js.map
1
+ System.register(["./roomle-dependency-injection-9039338d.legacy.js","./main-thread-to-worker-876e61ea.legacy.js"],(function(e){var i,t,s,n,h;return{setters:[function(e){i=e.u,t=e._,s=e.i,n=e.V,h=e.as},function(){}],execute:function(){const o="component_dimensioning_plane_material",a="component_dimensioning_text_material";class _ 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,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(){i(this)}}t([s],_.prototype,"_cacheHolder",void 0);class d{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 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}),h.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.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 _(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 _(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 _(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){if(!e)return;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}}e("default",d),t([s],d.prototype,"_unitFormatter",void 0)}}}));
2
+ //# sourceMappingURL=dimensioning-helper-c080117e.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-acdfd39b.legacy.js","sources":["../../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"klHAAe"}
1
+ {"version":3,"file":"dimensioning-helper-c080117e.legacy.js","sources":["../../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"klHAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-6d4fe95c.legacy.js","./main-thread-to-worker-876e61ea.legacy.js","./pixotron-aed2579e.legacy.js","./script-loader-a64acbb1.legacy.js","./default-light-setting-31623ca0.legacy.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,y,C;return{setters:[function(){},function(e){t=e.ag,i=e.D,r=e.L,s=e.R,n=e.l,a=e._,o=e.i,h=e.n,c=e.r,l=e.s,d=e.u,_=e.ae,m=e.af,u=e.b},function(e){p=e.f},function(e){g=e.C,w=e.L,E=e.S,f=e.B,b=e.T,S=e.P,v=e.c},function(e){L=e.S,y=e.M},function(e){C=e.D}],execute:function(){const M=[new i("script-loader",L),new i("glb-input-manager",class extends t{},1),new i("logger",r),new i("rapi-access",s)];class R extends g{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 w{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=n();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)})}}}class T extends E{constructor(e,t){super(e,t,h.GLB),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(c.createDynamicLightSettingSource(null,l.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 f(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=p(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,!0),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 C(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}}a([o],T.prototype,"_glbInputManager",void 0),a([o],T.prototype,"_rapiAccess",void 0);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()}}class H{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(_,{id:"gltf-loader"}),i=this._scriptLoader.fetch(m,{id:"draco-loader"}),r=this._scriptLoader.fetch(b,{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(S.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(v,{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()}getUnitFormatter(){return this._unitFormatter}}a([o],H.prototype,"_rapiAccess",void 0),a([o],H.prototype,"_domHelper",void 0),a([o],H.prototype,"_scriptLoader",void 0),a([o],H.prototype,"_lifeCycleManager",void 0),a([o],H.prototype,"_threeLoader",void 0),a([o],H.prototype,"_initData",void 0),a([o],H.prototype,"_globalInitData",void 0),a([o],H.prototype,"_unitFormatter",void 0),e("GlbViewer",class extends y{setupGlobals(){}setupDependencies(){u.setup(M),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-e96b3963.legacy.js.map
1
+ System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-9039338d.legacy.js","./main-thread-to-worker-876e61ea.legacy.js","./pixotron-ea1b5c34.legacy.js","./script-loader-7a3768a8.legacy.js","./default-light-setting-283463e3.legacy.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,y,C;return{setters:[function(){},function(e){t=e.ah,i=e.D,r=e.L,s=e.R,n=e.l,a=e._,o=e.i,h=e.n,c=e.r,l=e.s,d=e.u,_=e.af,m=e.ag,u=e.b},function(e){p=e.f},function(e){g=e.C,w=e.L,E=e.S,f=e.B,b=e.T,S=e.P,v=e.c},function(e){L=e.S,y=e.M},function(e){C=e.D}],execute:function(){const M=[new i("script-loader",L),new i("glb-input-manager",class extends t{},1),new i("logger",r),new i("rapi-access",s)];class R extends g{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 w{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=n();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)})}}}class T extends E{constructor(e,t){super(e,t,h.GLB),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(c.createDynamicLightSettingSource(null,l.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 f(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=p(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,!0),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 C(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}}a([o],T.prototype,"_glbInputManager",void 0),a([o],T.prototype,"_rapiAccess",void 0);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()}}class H{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(_,{id:"gltf-loader"}),i=this._scriptLoader.fetch(m,{id:"draco-loader"}),r=this._scriptLoader.fetch(b,{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(S.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(v,{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()}getUnitFormatter(){return this._unitFormatter}}a([o],H.prototype,"_rapiAccess",void 0),a([o],H.prototype,"_domHelper",void 0),a([o],H.prototype,"_scriptLoader",void 0),a([o],H.prototype,"_lifeCycleManager",void 0),a([o],H.prototype,"_threeLoader",void 0),a([o],H.prototype,"_initData",void 0),a([o],H.prototype,"_globalInitData",void 0),a([o],H.prototype,"_unitFormatter",void 0),e("GlbViewer",class extends y{setupGlobals(){}setupDependencies(){u.setup(M),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-afc3ac60.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-e96b3963.legacy.js","sources":["../../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"m6QAAe"}
1
+ {"version":3,"file":"glb-viewer-afc3ac60.legacy.js","sources":["../../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-dd6c9829408677a1.js\""],"names":[],"mappings":"m6QAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-6d4fe95c.legacy.js","./main-thread-to-worker-876e61ea.legacy.js","./pixotron-aed2579e.legacy.js","./script-loader-a64acbb1.legacy.js","./default-light-setting-31623ca0.legacy.js","./glb-viewer-e96b3963.legacy.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(){},function(n){e=n.GlbViewer}],execute:function(){(new e).boot()}}}));
1
+ System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-9039338d.legacy.js","./main-thread-to-worker-876e61ea.legacy.js","./pixotron-ea1b5c34.legacy.js","./script-loader-7a3768a8.legacy.js","./default-light-setting-283463e3.legacy.js","./glb-viewer-afc3ac60.legacy.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(){},function(n){e=n.GlbViewer}],execute:function(){(new e).boot()}}}));
2
2
  //# sourceMappingURL=glb-viewer-main.legacy.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-6d4fe95c.legacy.js","./main-thread-to-worker-876e61ea.legacy.js","./pixotron-aed2579e.legacy.js","./script-loader-a64acbb1.legacy.js"],(function(e){var t,a,i,r,s,n,o,h,l,m,_,d,c,p,g,u,M,w,y,C,f,S,E,P,v,b,x,R,T;return{setters:[function(){},function(e){t=e._,a=e.i,i=e.n,r=e.r,s=e.s,n=e.Z,o=e.ai,h=e.aj,l=e.l,m=e.ak,_=e.$,d=e.ae,c=e.al,p=e.D,g=e.L,u=e.ag,M=e.am,w=e.an,y=e.R,C=e.b},function(){},function(e){f=e.S,S=e.b,E=e.C,P=e.F,v=e.T,b=e.P,x=e.c},function(e){R=e.S,T=e.M}],execute:function(){class F extends f{constructor(e,t){super(e,t,i.RMV),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(r.createDynamicLightSettingSource(null,s.CAMERA)),this._initScene()}_initScene(){const e=new THREE.BoxGeometry(1,1,1,100,100,100),t=new THREE.MeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._environmentLoader.setEnvMap(t),this._setMaterial(t),this._mesh=new THREE.Mesh(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:a}=this._initData;if(a?this.changeFloorMaterialById(a):this._environment=new S(this._scene,null,new THREE.Color(16777215)),this._cameraControl instanceof E){const e=new THREE.Box3;e.setFromObject(this._mesh),this._cameraControl.updateAndReset(e.getSize(new THREE.Vector3),e.getCenter(new THREE.Vector3))}this.showGUI()}loadMaterialId(e){return new Promise(t=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})})}loadMaterial(e){return new Promise(t=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._setMaterial(n(e,this._environmentLoader)),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),t()})}loadMaterialShading(e){return new Promise(t=>{let a={shading:e};this._setMaterial(o(this._material,a,this._environmentLoader)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===THREE.DoubleSide,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(){return h(this._material)}createCameraControl(e,t){this._cameraControl=new E(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._inputManager}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.6,smoothTransition:!0,samplesPerFrame:4,bias:.02,numSamples:200,accumulative:!0},shadowparams:{shadowMapResolution:1024,shadowRadius:1,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.05,nearPlane:.01,farPlane:50,fov:40,numSamples:50,side:THREE.FrontSide}}}getBakedShadowParams(){return{enable:!1,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4}}getBounds(){return this._mesh?(new THREE.Box3).setFromObject(this._mesh):null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=l();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new THREE.Color(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?THREE.DoubleSide:THREE.FrontSide,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(h(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new THREE.BoxGeometry(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new THREE.SphereGeometry(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new THREE.PlaneGeometry(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new THREE.PlaneGeometry(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const t=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof P||(this._environment=new P(this._scene,this._environment,!0)),this._pixotron&&this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera()),new Promise((e,a)=>{this._environment.changeFloorMaterial(t,this._maxAnisotropy).then(()=>{this._requestRender(),e()},a)})}async addTexture(e,t){const a=100/(0===e.mmWidth?1:e.mmWidth),i=100/(0===e.mmHeight?1:e.mmHeight);if(t){const r=new Image;r.src=t;const s=new THREE.Texture;s.image=r,r.onload=function(){s.needsUpdate=!0},m(s,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures)}else await _(e.image,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}t([a],F.prototype,"_inputManager",void 0),t([a],F.prototype,"_configuratorMeshGenerator",void 0),t([a],F.prototype,"_roomleMaterialViewerUiCallback",void 0),t([a],F.prototype,"_rapiAccess",void 0);class G{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return 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"}),a=this._scriptLoader.fetch(v,{id:"tween-js"});Promise.all([t,a]).then(()=>{this._sceneManager=new F(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const a=()=>{this._sceneManager.enableHD(),e()};Promise.all(b.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(x,{id:"pi-js"}).then(a,t)},t)})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}loadMaterial(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(){return this._sceneManager.getMaterialShading()}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,t){return this._sceneManager.addTexture(e,t)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}}t([a],G.prototype,"_domHelper",void 0),t([a],G.prototype,"_scriptLoader",void 0),t([a],G.prototype,"_lifeCycleManager",void 0),t([a],G.prototype,"_threeLoader",void 0),t([a],G.prototype,"_roomleMaterialViewerUiCallback",void 0),t([a],G.prototype,"_initData",void 0),t([a],G.prototype,"_rapiAccess",void 0),t([a],G.prototype,"_unitFormatter",void 0);const H=[new p("script-loader",R),new p("logger",g),new p("input-manager",u,1),new p("environment-loader",M),new p("configurator-mesh-generator",w),new p("rapi-access",y),new p("roomle-material-viewer-ui-callback",class extends c{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];e("MaterialViewer",class extends T{setupGlobals(){}setupDependencies(){C.setup(H),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new G(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
2
- //# sourceMappingURL=material-viewer-2f01e891.legacy.js.map
1
+ System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-9039338d.legacy.js","./main-thread-to-worker-876e61ea.legacy.js","./pixotron-ea1b5c34.legacy.js","./script-loader-7a3768a8.legacy.js"],(function(e){var t,a,i,r,s,n,o,h,l,m,_,d,c,p,g,u,M,w,y,C,f,S,E,P,v,x,R,T,b;return{setters:[function(){},function(e){t=e._,a=e.i,i=e.n,r=e.r,s=e.s,n=e.Z,o=e.aj,h=e.ak,l=e.l,m=e.al,_=e.$,d=e.af,c=e.am,p=e.D,g=e.L,u=e.ah,M=e.an,w=e.ao,y=e.R,C=e.b},function(){},function(e){f=e.S,S=e.b,E=e.C,P=e.F,v=e.T,x=e.P,R=e.c},function(e){T=e.S,b=e.M}],execute:function(){class F extends f{constructor(e,t){super(e,t,i.RMV),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(r.createDynamicLightSettingSource(null,s.CAMERA)),this._initScene()}_initScene(){const e=new THREE.BoxGeometry(1,1,1,100,100,100),t=new THREE.MeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._environmentLoader.setEnvMap(t),this._setMaterial(t),this._mesh=new THREE.Mesh(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:a}=this._initData;if(a?this.changeFloorMaterialById(a):this._environment=new S(this._scene,null,new THREE.Color(16777215)),this._cameraControl instanceof E){const e=new THREE.Box3;e.setFromObject(this._mesh),this._cameraControl.updateAndReset(e.getSize(new THREE.Vector3),e.getCenter(new THREE.Vector3))}this.showGUI()}loadMaterialId(e){return new Promise(t=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})})}loadMaterial(e){return new Promise(t=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._setMaterial(n(e,this._environmentLoader)),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),t()})}loadMaterialShading(e){return new Promise(t=>{let a={shading:e};this._setMaterial(o(this._material,a,this._environmentLoader)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===THREE.DoubleSide,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(){return h(this._material)}createCameraControl(e,t){this._cameraControl=new E(this._creator_,this._getInputManager(),new THREE.Vector3(-1,1,1))}_getInputManager(){return this._inputManager}sceneChanged(){}getPixotronParams(){return{saoparams:{intensity:.25,occlusionWorldRadius:.6,smoothTransition:!0,samplesPerFrame:4,bias:.02,numSamples:200,accumulative:!0},shadowparams:{shadowMapResolution:1024,shadowRadius:1,shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.05,nearPlane:.01,farPlane:50,fov:40,numSamples:50,side:THREE.FrontSide}}}getBakedShadowParams(){return{enable:!1,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4}}getBounds(){return this._mesh?(new THREE.Box3).setFromObject(this._mesh):null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=l();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new THREE.Color(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?THREE.DoubleSide:THREE.FrontSide,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(h(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new THREE.BoxGeometry(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new THREE.SphereGeometry(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new THREE.PlaneGeometry(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new THREE.PlaneGeometry(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const t=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof P||(this._environment=new P(this._scene,this._environment,!0)),this._pixotron&&this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera()),new Promise((e,a)=>{this._environment.changeFloorMaterial(t,this._maxAnisotropy).then(()=>{this._requestRender(),e()},a)})}async addTexture(e,t){const a=100/(0===e.mmWidth?1:e.mmWidth),i=100/(0===e.mmHeight?1:e.mmHeight);if(t){const r=new Image;r.src=t;const s=new THREE.Texture;s.image=r,r.onload=function(){s.needsUpdate=!0},m(s,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures)}else await _(e.image,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}t([a],F.prototype,"_inputManager",void 0),t([a],F.prototype,"_configuratorMeshGenerator",void 0),t([a],F.prototype,"_roomleMaterialViewerUiCallback",void 0),t([a],F.prototype,"_rapiAccess",void 0);class G{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return 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"}),a=this._scriptLoader.fetch(v,{id:"tween-js"});Promise.all([t,a]).then(()=>{this._sceneManager=new F(this._creator_,{left:0,top:1,right:1,bottom:0}),this.enableHD(),e()})})}enableHD(){return new Promise((e,t)=>{const a=()=>{this._sceneManager.enableHD(),e()};Promise.all(x.map(e=>this._scriptLoader.fetch(e,{id:e}))).then(()=>{this._scriptLoader.fetch(R,{id:"pi-js"}).then(a,t)},t)})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}loadMaterial(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(){return this._sceneManager.getMaterialShading()}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}loadQualitySetting(e){this._sceneManager.loadQualitySetting(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,t){return this._sceneManager.addTexture(e,t)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}}t([a],G.prototype,"_domHelper",void 0),t([a],G.prototype,"_scriptLoader",void 0),t([a],G.prototype,"_lifeCycleManager",void 0),t([a],G.prototype,"_threeLoader",void 0),t([a],G.prototype,"_roomleMaterialViewerUiCallback",void 0),t([a],G.prototype,"_initData",void 0),t([a],G.prototype,"_rapiAccess",void 0),t([a],G.prototype,"_unitFormatter",void 0);const H=[new p("script-loader",T),new p("logger",g),new p("input-manager",u,1),new p("environment-loader",M),new p("configurator-mesh-generator",w),new p("rapi-access",y),new p("roomle-material-viewer-ui-callback",class extends c{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];e("MaterialViewer",class extends b{setupGlobals(){}setupDependencies(){C.setup(H),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new G(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
2
+ //# sourceMappingURL=material-viewer-9b643aef.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"material-viewer-9b643aef.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-6d4fe95c.legacy.js","./main-thread-to-worker-876e61ea.legacy.js","./pixotron-aed2579e.legacy.js","./script-loader-a64acbb1.legacy.js","./material-viewer-2f01e891.legacy.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(n){e=n.MaterialViewer}],execute:function(){(new e).boot()}}}));
1
+ System.register(["./query-params-helper-8c00a872.legacy.js","./roomle-dependency-injection-9039338d.legacy.js","./main-thread-to-worker-876e61ea.legacy.js","./pixotron-ea1b5c34.legacy.js","./script-loader-7a3768a8.legacy.js","./material-viewer-9b643aef.legacy.js"],(function(){var e;return{setters:[function(){},function(){},function(){},function(){},function(){},function(n){e=n.MaterialViewer}],execute:function(){(new e).boot()}}}));
2
2
  //# sourceMappingURL=material-viewer-main.legacy.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-6d4fe95c.legacy.js","./main-thread-to-worker-876e61ea.legacy.js"],(function(t,e){var i,s,a,n,o,r,h,_,d,l,c,m,u,p,g,w,y,E,S,P,v,C,b,x,f,R;return{setters:[function(t){i=t._,s=t.i,a=t.E,n=t.t,o=t.O,r=t.Q,h=t.T,_=t.U,d=t.m,l=t.V,c=t.X,m=t.Y,u=t.Z,p=t.$,g=t.l,w=t.a0,y=t.a1,E=t.a2,S=t.e,P=t.a3,v=t.u,C=t.r,b=t.x,x=t.a4},function(t){f=t.l,R=t.h}],execute:function(){t("T","static/Tween-5ebfb82307807fdc.js");class T extends a{constructor(t,e,i){if(super(),this._tweenEnd=null,this._cameraStandingStill=!0,this._pitch=n(10),this._yaw=n(-30),this._distance=-1,this._locked=!1,this._inputListeners=[],this._lerpEnabled=!0,this._creator_=t,this._inputManager=e,this._initInputListener(),this._addInputListeners(),this._cameraPosition=new THREE.Vector3,this._targetPosition=new THREE.Vector3,i?this._cameraPosition.copy(i):this._cameraPosition=new THREE.Vector3(0,.5,3),this._initData.debug){const t=this.getDebugCameraPosition();t&&this._setCurrentCameraParameters(t)}let s=this._domHelper.getClientDimensions();this._width=s.x,this._height=s.y,this._dispatchCameraIdle=f(this._dispatchCameraIdle.bind(this),32)}getCamera(){return this._getCamera()}_addInputListeners(){this._inputListeners.forEach(t=>{this._inputManager.addEventListener(t.key,t.fun,this)})}_removeInputListeners(){this._inputListeners.forEach(t=>{this._inputManager.removeEventListener(t.key,t.fun)}),this._inputListeners=[]}cleanUp(){this._removeInputListeners()}animateCamera(t){let e=this._cameraPosition;if(!e||o(e,this.getCamera().position))return this._cameraStandingStill||(this._cameraStandingStill=!0,setTimeout(()=>this._dispatchCameraIdle(),16),this._initData.debug&&this.saveDebugCameraPosition()),!1;if(this._cameraStandingStill&&this.dispatchEvent(7,3),this._cameraStandingStill=!1,this._lerpEnabled&&!this._tweenEnd){let i=this.getCamera().position.clone();const s=Math.min(10*t,1);i.lerp(e,s),this.getCamera().position.copy(i)}else this.getCamera().position.copy(e);return!0}getDebugCameraPosition(){return JSON.parse(localStorage.getItem("debug_camera_position"))}saveDebugCameraPosition(){localStorage.setItem("debug_camera_position",JSON.stringify(this._getCurrentCameraParameters()))}_dispatchCameraIdle(){this.dispatchEvent(8,3)}_areEqual(t,e){return t.yaw.toFixed(5)===e.yaw.toFixed(5)&&t.pitch.toFixed(5)===e.pitch.toFixed(5)&&t.distance.toFixed(5)===e.distance.toFixed(5)&&t.targetX===e.targetX&&t.targetY===e.targetY&&t.targetZ===e.targetZ}_tweenCameraParameter(t,e,i=!1){return new Promise(s=>{if(e.yaw-t.yaw<=-Math.PI?t.yaw-=2*Math.PI:e.yaw-t.yaw>=Math.PI&&(t.yaw+=2*Math.PI),window.TWEEN){if(null!==this._tweenEnd&&this._tweenEnd.blockOtherTweens)return;this._tweenEnd=e,new TWEEN.Tween(t).to(e,400).easing(TWEEN.Easing.Sinusoidal.In).onUpdate(()=>{this.dispatchEvent(1,3),this._yaw=t.yaw,this._pitch=t.pitch,this._distance=t.distance,this._setCameraNear(),this._update(new THREE.Vector3(t.targetX,t.targetY,t.targetZ),i)}).onComplete(()=>{this.dispatchEvent(2,3),this._dispatchCameraIdle(),this._tweenEnd=null,s()}).start(),this.dispatchEvent(0,3)}})}_setCameraNear(){const t=this.getCamera();if(t instanceof THREE.PerspectiveCamera){const e=Math.max(.1,this._distance/6);t.near=e}}_getCurrentCameraParameters(){const t=this._targetPosition.clone();return{yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:t.x,targetY:t.y,targetZ:t.z}}_setCurrentCameraParameters(t){this._yaw=t.yaw,this._pitch=t.pitch,this._distance=t.distance,this._targetPosition.copy(new THREE.Vector3(t.targetX,t.targetY,t.targetZ))}_rotateHorizontal(t){this._yaw-=t,this._yaw<-Math.PI?this._yaw+=2*Math.PI:this._yaw>Math.PI&&(this._yaw-=2*Math.PI)}_rotateVertical(t){this._pitch+=t,this._pitch<-Math.PI?this._pitch+=2*Math.PI:this._pitch>Math.PI&&(this._pitch-=2*Math.PI)}saveState(t){if(t||!this._stateSaved){let t=this._yaw,e=this._pitch,i=this._distance,s=this._targetPosition.clone();if(this._stateSaved={yaw:t,pitch:e,distance:i,targetX:s.x,targetY:s.y,targetZ:s.z,blockOtherTweens:!0},this._getCamera().fov){let t=this._getCamera();this._stateSaved.fov=t.fov,this._stateSaved.near=t.near,this._stateSaved.far=t.far}return this._stateSaved}return null}resetToState(){if(this._stateSaved){this._stateSaved.blockOtherTweens=!1;let t=this._targetPosition.clone();this._tweenCameraParameter({yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:t.x,targetY:t.y,targetZ:t.z},this._stateSaved,!0)}this._stateSaved=null}setToState(t,e){this._tweenCameraParameter(t,e,!0)}hasSavedState(){return null!=this._stateSaved}lock(){this._locked=!0}unlock(){this._locked=!1}isLocked(){return this._locked}getTargetPosition(){return this._targetPosition}_saveYawAndPitch(){this._getCamera().userData.yaw=this._yaw,this._getCamera().userData.pitch=this._pitch}getInputPosition(t){const{x:e,y:i}=this._domHelper.getClientDimensions();return new THREE.Vector3(t.x/e*2-1,-t.y/i*2+1,.5)}addLightContainer(t){t.name="lights";const e=this._getCamera(),i=e.children.find(t=>"lights"===t.name);i&&e.remove(i),e.add(t)}checkNearFarDistance(t){if(!t)return;const e=this._cameraPosition.distanceTo(t),i=this._getCamera();i instanceof THREE.PerspectiveCamera&&e>i.far&&(i.far=e+1)}setBounds(t){this._boundingBox=t}}t("a",T),i([s],T.prototype,"_domHelper",void 0),i([s],T.prototype,"_initData",void 0);class M{constructor(t,e){this.minZoom=!1,this.maxZoom=!1,this.minZoom=t,this.maxZoom=e}}class A extends T{constructor(t,e,i,s){super(t,e,i),this._bounds=new THREE.Vector3,this._scale=1,this._state=0,this._zoomSpeed=Math.pow(.95,3),this.minDistance=0,this.maxDistance=5,this.minPolarAngle=n(0),this.maxPolarAngle=n(85),this._objectRotation=0,this.minAzimuthAngle=Number.NEGATIVE_INFINITY,this.maxAzimuthAngle=Number.POSITIVE_INFINITY,this._zoomDistance=.1,this._userInteraction=!1,this._currentZoomHash="",this._maxZoomedIn=!1,this._maxZoomedOut=!1,this._panningEnabled=!1,this._targetPositionIsPanned=!1,s?this._camera=s:this._initCamera(),this._targetPosition||(this._targetPosition=new THREE.Vector3(0,0,0),this._targetPositionIsPanned=!1);const{cameraRestriction:a,zoomDistance:o,minVerticalCameraAngle:r,maxVerticalCameraAngle:h,minHorizontalCameraAngle:_,maxHorizontalCameraAngle:d}=this._initData;if(o&&(this._zoomDistance=o/100),void 0!==r&&(this.minPolarAngle=n(r<0?r:-1*r)),void 0!==h&&(this.maxPolarAngle=n(h)),void 0!==_&&(this.minAzimuthAngle=n(_<0?_:-1*_)),void 0!==d&&(this.maxAzimuthAngle=n(d)),void 0!==a){let t=Math.abs(n(a));this.minAzimuthAngle=-t,this.maxAzimuthAngle=t,this.maxPolarAngle=Math.min(t,n(85))}this._update()}_getCamera(){return this._camera||this._initCamera(),this._camera}getCamera(){return super.getCamera()}_initCamera(){this._camera=new THREE.PerspectiveCamera,this._camera.fov=30,this._camera.aspect=this._width/this._height,this._camera.near=.1,this._camera.far=100,this._camera.updateProjectionMatrix(),this._camera.layers.set(3),this._camera.layers.enable(1),this._camera.layers.enable(2),this._camera.layers.enable(6),this._camera.layers.enable(5)}setObjectRotation(t){this._objectRotation=t}getObjectRotation(){return this._objectRotation}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix()}animateCamera(t){if(!super.animateCamera(t))return!1;let e=this._targetPosition;return!!e&&(this.getCamera().lookAt(e),!0)}_initInputListener(){this._inputListeners.push({key:3,fun:()=>{this._state=1}}),this._inputListeners.push({key:6,fun:t=>{var e,i;1!==this._state||this._locked||(this._userInteraction=!0,!(void 0!==(null===(e=t.event)||void 0===e?void 0:e.shiftKey)&&(null===(i=t.event)||void 0===i?void 0:i.shiftKey))&&this._panningEnabled&&this.disablePanning(),this._move(new THREE.Vector2(t.position.x,t.position.y),t.type))}}),this._inputListeners.push({key:11,fun:t=>{1===this._state||this._locked||(this._userInteraction=!0,this._pan(new THREE.Vector2(t.position.x,t.position.y),t.type))}}),this._inputListeners.push({key:4,fun:t=>{1===this._state&&this.dispatchEvent(2,t.type),this._state=0,this._orbitPosition=null,this._lerpEnabled=!0}}),this._inputListeners.push({key:7,fun:({event:t})=>{this._maxZoomedIn||(t&&(t.preventDefault(),t.stopPropagation()),this.zoomIn())}}),this._inputListeners.push({key:8,fun:({event:t})=>{this._maxZoomedOut||(t&&(t.preventDefault(),t.stopPropagation()),this.zoomOut())}})}_panTargetPosition(t){const e=t.clone().sub(this._orbitPosition),i=this._domHelper.element,s=this._targetPosition.project(this._camera),a=Math.max(2,4*(1-this._distance/this.maxDistance));s.x=s.x-e.x/i.clientHeight*a,s.y=s.y+e.y/i.clientHeight*a,this._targetPositionIsPanned=!0,this._targetPosition.copy(s.unproject(this._camera))}_pan(t,e){this._lerpEnabled=!1,this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0,e)),this._panTargetPosition(t),r(this._orbitPosition,t)||this.dispatchEvent(1,e),this._orbitPosition.copy(t),this._update()}_move(t,e){this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0,e));const i=t.clone().sub(this._orbitPosition),s=this._domHelper.element;this._panningEnabled?this._panTargetPosition(t):(this._rotateHorizontal(2*Math.PI*i.x/s.clientWidth*1),this._rotateVertical(2*Math.PI*i.y/s.clientHeight*1)),r(this._orbitPosition,t)||this.dispatchEvent(1,e),this._orbitPosition.copy(t),this._update()}checkBoundsAndPlaceCamera(t,e=!0){this._boundingBox&&h(t,this._boundingBox)<=0?this.setBounds(t):this.zoomToFitBounds(t,e)}zoomToFitBounds(t,e=!0){this.setBounds(t);const i=t.getSize(new THREE.Vector3);if(this._initData.debug||i.x+i.y+i.z===0)return;const s=this._getCurrentCameraParameters(),a=t.getCenter(new THREE.Vector3),n=this._setDistanceAndRangesBasedOnBounds(i);this._checkZoomDistance(t,n),this._tweenCameraParameter(s,{yaw:e?this._yaw:s.yaw,pitch:e?this._pitch:s.pitch,distance:n,targetX:a.x,targetY:a.y,targetZ:a.z},!1)}updateToBounds(t,e,i=!0,s){if(this.setBounds(t),this._initData.debug)return;const a=t.getCenter(new THREE.Vector3);s?(this._targetPosition=s.clone(),this._targetPositionIsPanned=!1):this._targetPositionIsPanned||(this._targetPosition=new THREE.Vector3(a.x,a.y,a.z));const n=this._getCurrentCameraParameters(),o=t.getSize(new THREE.Vector3);if(i){const i=this._setDistanceAndRangesBasedOnBounds(o);this._distance=i,this._checkZoomDistance(t,i),this._userInteraction?this._tweenCameraParameter(n,{yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:this._targetPosition.x,targetY:this._targetPosition.y,targetZ:this._targetPosition.z},e):this._update()}else this._setDistanceAndRangesBasedOnBounds(o,!1);this._update()}_checkZoomDistance(t,e){const i=t.getBoundingSphere(new THREE.Sphere);e-i.radius<this._zoomDistance&&(console.warn("the initial camera position is closer than the zoomDistance param, zoomDistance is set to initial camera position."),this._zoomDistance=e-i.radius)}_setDistanceAndRangesBasedOnBounds(t,e=!0){const i=this._domHelper.getClientDimensions(),s=i.x,a=i.y,n=this._camera.offset?s-s*this._camera.offset.left-s*(1-this._camera.offset.right):s,o=this._camera.offset?a-a*this._camera.offset.bottom-a*(1-this._camera.offset.top):a;this._bounds.copy(t);const{cameraSpacing:r}=this._initData;t.addScalar(r/100),this.minDistance=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z);const h=Math.max(t.x,t.y),{x:d,y:l}=this._getMargin(n,o),c=_(t.x+d,t.y+l,t.z,this._camera.fov,n,o);return this._distance<c&&e&&(this._distance=c),this.maxDistance=c+h,this.maxDistance<2&&(this.maxDistance=2),this._camera.far=5*this.maxDistance,this._setCameraNear(),c}_getMargin(t,e){let i=this._bounds.x/2,s=this._bounds.y/2;return t>1080&&(i+=this._bounds.x<.3?.2:0,i+=this._bounds.x*(t/1080-1)),e>1080&&(i+=this._bounds.y<.3?.2:0,s+=this._bounds.y*(e/1080-1)),{x:i,y:s}}reset(t,e,i,s,a=!0){const o=t.getSize(new THREE.Vector3);if(o){if(e)this._targetPosition.copy(e);else{const e=t.getCenter(new THREE.Vector3);this._targetPosition.copy(e)}const r=this._getCurrentCameraParameters();if(i||(i=-30),s||(s=10),i+=d(this._objectRotation),this._initData.debug)return this._distance=this._setDistanceAndRangesBasedOnBounds(o),this._update(this._targetPosition),void this._setDistanceAndRangesBasedOnBounds(o);const h=this._setDistanceAndRangesBasedOnBounds(o),_=n(s),l=n(i);let c=this._targetPosition.clone();a?this._tweenCameraParameter(r,{yaw:l,pitch:_,distance:h,targetX:c.x,targetY:c.y,targetZ:c.z},!0):(this._pitch=_,this._yaw=l,this._distance=h,this._update(this._targetPosition))}else console.warn("you cant reset without bounds!")}updateAndReset(t,e,i,s,a,o=!0){const r=new THREE.Vector3(-t.x/2,0,-t.z/2),h=new THREE.Vector3(t.x/2,t.y,t.z/2);if(this._boundingBox=new THREE.Box3(r,h),a&&t.addScalar(a),e?this._targetPosition.copy(e):(this._targetPosition=new THREE.Vector3(0,t.y/2,0),this._targetPositionIsPanned=!1),-1===this._distance){const e=this._setDistanceAndRangesBasedOnBounds(t);this._distance=Math.max(2,e)}const _=this._getCurrentCameraParameters();i||(i=-30),s||(s=10),i+=d(this._objectRotation),this._pitch=n(s),this._yaw=n(i),this._setDistanceAndRangesBasedOnBounds(t);let l=this._targetPosition.clone();o?this._tweenCameraParameter(_,{yaw:this._yaw,pitch:this._pitch,distance:this.maxDistance,targetX:l.x,targetY:l.y,targetZ:l.z},!0):this._update(this._targetPosition)}_update(t,e){this._initData.debug?this._pitch=Math.max(n(-89),Math.min(n(89),this._pitch)):(this._yaw=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,this._yaw)),this._pitch=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._pitch))),this._saveYawAndPitch();const i=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX"),s=(new THREE.Quaternion).setFromEuler(i),a=new THREE.Vector3(0,0,-1);a.applyQuaternion(s),this._distance*=this._scale,this._initData.debug||(this._distance=Math.min(this.maxDistance,this._distance)),t&&this._targetPosition.copy(t);const o=this._targetPosition.clone().sub(a.multiplyScalar(this._distance));if(this._initData.debug)this._cameraPosition.copy(o),this._zoomChanged(!1,!1);else if(e)this._cameraPosition.copy(o);else{const t=this._getCameraSphere(o);null!=this._boundingBox&&this._boundingBox.intersectsSphere(t)&&this._scale>=1?this._distance+=.1:null==this._boundingBox||this._boundingBox.intersectsSphere(t)?this._zoomChanged(!1,!0):(this._cameraPosition.copy(o),this._distance===this.maxDistance?this._zoomChanged(!0,!1):this._zoomChanged(!1,!1))}this._scale=1}_zoomChanged(t,e){let i=t+""+e;0===this._currentZoomHash.length||this._currentZoomHash!==i?(this.dispatchEvent(5,new M(t,e)),this._currentZoomHash=i):t||e||this.dispatchEvent(5,new M(t,e)),this._maxZoomedIn=e,this._maxZoomedOut=t}zoomTo(t,e,i,s,a,n){return this._tweenCameraParameter(this._getCurrentCameraParameters(),{yaw:s,pitch:a,distance:2.725*_(t.x,t.y,t.z,this._camera.fov,e,i),targetX:n.x,targetY:n.y,targetZ:n.z,blockOtherTweens:!0},!0)}_getCameraSphere(t){const e=Math.max(this._bounds.x,this._bounds.y),i=Math.max(e/10,this._zoomDistance);return new THREE.Sphere(t,i)}zoomIn(t){this._lerpEnabled=!0,this._scale*=t?Math.pow(.95,t):this._zoomSpeed,this._setCameraNear(),this._update(),this.dispatchEvent(3)}zoomOut(t){this._lerpEnabled=!0,this._scale/=t?Math.pow(.95,t):this._zoomSpeed,this._setCameraNear(),this._update(),this.dispatchEvent(4)}clear(){this._userInteraction=!1,this._initData.debug||(this._distance=-1,this._targetPosition=new THREE.Vector3(0,0,0),this._targetPositionIsPanned=!1)}async moveCamera(t){return this._tweenCameraParameter(this._getCurrentCameraParameters(),t,!0)}enablePanning(){this._lerpEnabled=!1,this._panningEnabled=!0}disablePanning(){this._lerpEnabled=!1,this._panningEnabled=!1}getKernelZoomFactor(){const t=this.maxDistance;return 1-this._distance/(t-2)+.2}}t("C",A);class H{constructor(t,e){this._scene=t,e&&e.removeFromScene()}needsBounds(){return!1}updateBounds(t){}getCameraContainer(){return this._cameraContainer||(this._cameraContainer=new THREE.Object3D),this._cameraContainer}}t("L",H);const k={enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightSolidAngle:40,yPosition:0};class L extends class{constructor(t,e){this._scene=t,e&&(e.removeFromScene(),e.cleanUp())}updateCamera(t){}reload(){this.removeFromScene(),this.addToScene()}updateBounds(t,e){this._bounds=t}cleanUp(){this._scene=null}}{constructor(t,e){super(t,e),this._pixotronGuard=new l,this._enabled=!0,this._params=Object.assign(k,{lightDirection:new THREE.Vector3(0,1,.5),onComplete:this._addGroundShadows.bind(this),onProgress:this._progressCallback.bind(this)})}_progressCallback(t){}needsBounds(){return!0}needsCamera(){return!1}needsRotation(){return!1}setPixotron(t,e,i,s){t&&(this._pixotron=t,this._renderer=e,this._camera=i,this._shadowBaker||(this._shadowBaker=new window.PIXOTRON.PlaneShadowBakePass(Object.assign(this._params,s))),this._shadowBaker.enable?this._shadowBaker.startBake(this._renderer,this._scene,this._camera):this._shadowBaker.enable=!0,this._wasAAEnabled=this._pixotron.enableAA,this._pixotronGuard.resolve())}async _addGroundShadows(){await this._pixotronGuard.wait(),this._pixotron.needsUpdate=!0,this._shadowPlane=this._shadowBaker.getShadowPlane(),this._shadowPlane.name="Shadow plane",this._shadowPlane.receiveShadow=!1,0!==this._params.yPosition&&(this._shadowPlane.position.y=this._params.yPosition),this._shadowPlane.visible=!0,this.addToScene(),this._loadedCallback&&this._loadedCallback()}setLoadedCallback(t){this._loadedCallback=t}update(){const t=this._getNumberOfChildren();this._bake(),this._sceneChildren=t}updateBounds(t,e){const i=this._getNumberOfChildren();return!(c(this._bounds,t,1e-4)&&this._scene&&i===this._sceneChildren&&!e||(super.updateBounds(t),this._bake(),this._sceneChildren=i,0))}_bake(){this._pixotronGuard.wait().then(()=>{this._shadowPlane&&(this._shadowPlane.visible=!1),this._shadowBaker.startBake(this._renderer,this._scene,this._camera)})}_getNumberOfChildren(){let t=0;return this._scene.traverse(e=>{"Shadow plane"!==e.name&&t++}),t}addToScene(){this._scene&&this._shadowPlane&&this._enabled&&(this._shadowPlane.material.needsUpdate=!0,m(this._shadowPlane),this._scene.add(this._shadowPlane))}removeFromScene(){this._shadowPlane&&(this._scene.remove(this._shadowPlane),this._pixotron&&(this._pixotron.enableAA=this._wasAAEnabled))}enable(){this._enabled=!0,this.addToScene()}disable(){this._enabled=!1,this.removeFromScene()}showGUI(){}}t("B",L);class z{constructor(t){this._innerSize=1,this._outerSize=100,this._plane=new THREE.Object3D,this._plane.rotation.x=-Math.PI/2;const e=new THREE.MeshStandardMaterial;this._innerPlaneMesh=new THREE.Mesh,this._innerPlaneMesh.layers.set(2),this._innerPlaneMesh.material=e,this._innerPlaneMesh.receiveShadow=!0,this._outerPlaneMesh=new THREE.Mesh,this._outerPlaneMesh.layers.set(2),this._outerPlaneMesh.material=e,this._outerPlaneMesh.receiveShadow=!0,this._plane.add(this._innerPlaneMesh),this._plane.add(this._outerPlaneMesh),this._innerSize=1,this._outerSize=t,this._updatePlane(this._innerSize,this._outerSize)}getRootNode(){return this._plane}getInnerPlane(){return this._innerPlaneMesh}getOuterPlane(){return this._outerPlaneMesh}updateSize(t){this._innerSize=t,this._updatePlane(this._innerSize,this._outerSize)}_updatePlane(t,e){const i=new THREE.Shape;i.moveTo(-t/2,-t/2),i.lineTo(-t/2,t/2),i.lineTo(t/2,t/2),i.lineTo(t/2,-t/2),i.lineTo(-t/2,-t/2);const s=new THREE.Shape;s.moveTo(-e/2,-e/2),s.lineTo(-e/2,e/2),s.lineTo(e/2,e/2),s.lineTo(e/2,-e/2),s.lineTo(-e/2,-e/2);const a=new THREE.Path;a.moveTo(-t/2,-t/2),a.lineTo(-t/2,t/2),a.lineTo(t/2,t/2),a.lineTo(t/2,-t/2),a.lineTo(-t/2,-t/2),s.holes.push(a);const n=new THREE.ShapeBufferGeometry(i);this._innerPlaneMesh.geometry&&this._innerPlaneMesh.geometry.dispose(),this._innerPlaneMesh.geometry=n;const o=new THREE.ShapeBufferGeometry(s);this._outerPlaneMesh.geometry&&this._outerPlaneMesh.geometry.dispose(),this._outerPlaneMesh.geometry=o;const r=n.attributes.uv.clone();n.setAttribute("uv2",r);const h=n.attributes.uv2.array;for(let t=0;t<h.length;++t)h[t]+=.5}}class I extends L{constructor(t,e,i){super(t,e),this._longestSide=2,this._bakedShadowPlane=new z(100),this._fog=i||!1,this._textureLoader=new THREE.TextureLoader,this.addToScene()}needsBounds(){return!0}needsCamera(){return this._fog}needsRotation(){return!1}updateBounds(t){return super.updateBounds(t),this._longestSide=Math.max(t.x,t.z),this._update(),!0}updateCamera(t){this._cameraDistance=t.position.distanceTo(new THREE.Vector3(0,0,0)),this._update()}_update(){this._fog&&this._updateFog()}_updateFog(){let t=this._longestSide/2;this._scene.fog=new THREE.Fog(16185078,this._cameraDistance+t+3,this._cameraDistance+t+3+1),this._scene.background=new THREE.Color(16185078)}_updateFloor(){if(this._floorMaterial)this._bakedShadowPlane.getOuterPlane().material=this._floorMaterial,this._bakedShadowPlane.getInnerPlane().material=this._floorMaterial;else{let t=this._width/1e3,e=this._height/1e3;this._repeatable&&(this._floorTexture.wrapS=THREE.RepeatWrapping,this._floorTexture.wrapT=THREE.RepeatWrapping,this._floorTexture.repeat.set(100/t,100/e));let i=new THREE.MeshStandardMaterial({map:this._floorTexture,side:THREE.DoubleSide});this._bakedShadowPlane.getInnerPlane().material=i,this._bakedShadowPlane.getOuterPlane().material=i}}addToScene(){this._scene&&(this._shadowPlane&&(this._bakedShadowPlane.updateSize(this._shadowPlane.scale.x),this._bakedShadowPlane.getRootNode().position.copy(this._shadowPlane.position),this._bakedShadowPlane.getInnerPlane().material.aoMap=this._shadowPlane.material.aoMap),this._scene.add(this._bakedShadowPlane.getRootNode()))}removeFromScene(){this._scene.remove(this._bakedShadowPlane.getRootNode())}setFloorMaterial(t,e,i,s){return this._width=e,this._height=i,this._repeatable=s,this._floorPromise=new Promise((e,i)=>{this._textureLoader.load(t,t=>{this._floorTexture=t,e()},null,i)}),new Promise((t,e)=>{this._floorPromise.then(()=>{this._updateFloor(),this._update(),t()},e)})}changeFloorMaterial(t,e){this._floorPromise=new Promise((i,s)=>{this._floorMaterial=u(t,this._environmentLoader),this._rapiAccess.getTexturesOf(t).then(t=>{if(t.length>0){let a=[];t.forEach(t=>{a.push(p(this._dataSyncer.requestAsset(t.image,!0),t,this._floorMaterial,e,1,1))}),Promise.all(a).then(()=>{setTimeout(()=>i(),0)},s)}else setTimeout(()=>i(),0)})});let i=[this._floorPromise];return new Promise((t,e)=>{Promise.all(i).then(()=>{this._updateFloor(),this._update(),t()},e)})}showGUI(){this._floorMaterial?this._addGUI():this._floorPromise&&this._floorPromise.then(()=>this._addGUI())}_addGUI(){let t=g();if(!t)return;let e=t.addFolder("Floor");e.add(this._floorMaterial,"roughness").min(0).max(1).step(.01),e.add(this._floorMaterial,"reflectivity").min(0).max(1).step(.01),e.add(this._floorMaterial,"clearCoat").min(0).max(1).step(.01),e.add(this._floorMaterial,"clearCoatRoughness").min(0).max(1).step(.01),e.add(this._floorMaterial,"opacity").min(0).max(1).step(.01),e.add(this._floorMaterial,"metalness").min(0).max(1).step(.01),e.add(this._floorMaterial,"bumpScale").min(0).max(1).step(.01)}}t("F",I),i([s],I.prototype,"_rapiAccess",void 0),i([s],I.prototype,"_dataSyncer",void 0),i([s],I.prototype,"_environmentLoader",void 0);class D extends L{constructor(t,e,i,s,a){if(super(t,e),this._color=i,this._oldBackground=t.background,s&&a){this._canvas=s,this._style=document.createElement("style");let t='background-image: url("'+a+'"); background-size: cover;';this._style.innerText=".rml-scene-background {"+t+"}",this._canvas.appendChild(this._style)}}needsBounds(){return!0}needsCamera(){return!1}needsRotation(){return!1}addToScene(){super.addToScene(),this._scene&&this._color&&(this._scene.background=this._color),this._canvas&&this._canvas.classList&&(this._scene.background=null,this._canvas.classList.add("rml-scene-background"),this._pixotron&&(this._pixotron.enableAA=!1))}removeFromScene(){super.removeFromScene(),this._oldBackground&&(this._scene.background=this._oldBackground),this._canvas&&this._canvas.classList.remove("rml-scene-background")}}t("b",D);class B extends T{constructor(t,e,i,s){super(t,e,i),this._scale=1,this._cameraZoom=1,this._state=0,this._size=5,this._lastPosition=new THREE.Vector2,this._zoomPosition=new THREE.Vector3,this._lastZoom=0,this._zoomSpeed=Math.pow(.95,2),s?(this._camera=s,this._cameraPosition=(new THREE.Vector3).copy(this._camera.position)):this._initCamera(i||new THREE.Vector3(0,10,0))}_getCamera(){return this._camera||this._initCamera(new THREE.Vector3(0,10,0)),this._camera}_initCamera(t){let{x:e,y:i}=this._domHelper.getClientDimensions(),s=e/i*this._size,a=this._size;this._camera=new THREE.OrthographicCamera(s/-2,s/2,a/2,a/-2,1,1e3),this._camera.position.copy(t),this._cameraPosition=t,this._camera.lookAt(new THREE.Vector3(0,0,0))}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions(),i=t/e*this._size,s=this._size;this._camera.left=i/-2,this._camera.right=i/2,this._camera.top=s/2,this._camera.bottom=s/-2,this._camera.updateProjectionMatrix()}_initInputListener(){this._inputListeners.push({key:3,fun:t=>{this._locked||(this._state=1,this._lastPosition.set(t.positionRelative.x,t.positionRelative.y),this.dispatchEvent(0))}}),this._inputListeners.push({key:6,fun:t=>{1!==this._state||this._locked||(this._move(new THREE.Vector2(t.positionRelative.x,t.positionRelative.y),t.type),this.dispatchEvent(1))}}),this._inputListeners.push({key:4,fun:t=>{1===this._state&&this.dispatchEvent(2),this._state=0}}),this._inputListeners.push({key:7,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this.dispatchEvent(3),this._scale/=this._zoomSpeed,this._zoomTo(t.positionRelative),this._update()}}),this._inputListeners.push({key:8,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this.dispatchEvent(4),this._scale*=this._zoomSpeed,this._zoomTo(t.positionRelative),this._update()}})}_zoomTo(t){if(Date.now()-this._lastZoom>200){let e=new THREE.Vector3(t.x,t.y,0);e.unproject(this._camera),this._zoomPosition.copy(e)}this._lastZoom=Date.now()}_move(t,e){let i=new THREE.Vector3,s=new THREE.Vector3(this._lastPosition.x,this._lastPosition.y,0),a=new THREE.Vector3(t.x,t.y,0);s.unproject(this._camera),a.unproject(this._camera),i.subVectors(a,s),this._cameraPosition.x-=i.x*(2===e?1.1:1),this._cameraPosition.z-=i.z*(2===e?1.1:1),this._lastPosition.copy(t)}zoomToFitBounds(t,e,i){if(h(t,this._boundingBox)<0&&!i)return void this.setBounds(t);this.setBounds(t);const s=t.getSize(new THREE.Vector3),a=t.getCenter(new THREE.Vector3),n=s.x/-2/this._camera.left,o=s.z/-2/this._camera.bottom,r=1/Math.max(n,o);(r<this._cameraZoom||e)&&(this._scale=r,this._cameraZoom=r,this._cameraPosition.x=a.x,this._cameraPosition.z=a.z)}_update(t){this._scale=Math.min(this._scale,5),this._scale=Math.max(this._scale,.2);let e=(new THREE.Vector3).subVectors(this._zoomPosition,this._cameraPosition).multiplyScalar((this._scale-this._cameraZoom)/this._scale);this._cameraPosition.x+=e.x,this._cameraPosition.z+=e.z,this._cameraZoom!==this._scale&&this.dispatchEvent(5,new M(.2===this._scale,5===this._scale)),this._cameraZoom=this._scale,this._camera.updateProjectionMatrix()}animateCamera(t){if(!super.animateCamera(t)&&Math.abs(this._cameraZoom-this._camera.zoom)<=.01)return!1;const e=Math.min(10*t,1);return this._camera.zoom=THREE.MathUtils.lerp(this._camera.zoom,this._cameraZoom,e),!0}getKernelZoomFactor(){const t=1e3*(this._camera.right-this._camera.left);return this._domHelper.element.clientWidth/t*this._camera.zoom}}t("d",B);const O=Math.PI/4;class Q extends T{constructor(t,e,i,s){super(t,e,i),this._state=0,this._rotationSpeed=1,this._keyMap=new Map,this.minPolarAngle=n(-60),this.maxPolarAngle=n(60),this._camera=s||new THREE.PerspectiveCamera,this._camera.fov=70,this._camera.aspect=this._width/this._height,this._camera.near=.1,this._camera.far=100,this._camera.updateProjectionMatrix(),this._camera.layers.set(3),this._camera.layers.enable(1),this._camera.layers.enable(2),this._camera.layers.enable(6),this._camera.layers.enable(5),i?this._camera.position.set(i.x,1.5,i.z):this._camera.position.set(0,1.5,0),this._cameraPosition=new THREE.Vector3,this._cameraPosition.copy(this._camera.position),this._cameraRotation=new THREE.Quaternion,this._pitch=0,this._yaw=0;let a=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(a),window.addEventListener("gamepadconnected",this._gamepadConnected.bind(this)),window.addEventListener("gamepaddisconnected",this._gamepadDisconnected.bind(this))}_gamepadConnected(t){this.startButtonPressListener()}_gamepadDisconnected(t){window.cancelAnimationFrame(this._listenerLoopAnimationFrame)}startButtonPressListener(){this._listenerLoopAnimationFrame=window.requestAnimationFrame(()=>{this.buttonPressListener()})}buttonPressListener(){let t=navigator.getGamepads()[0];this._checkRightStick(t),this._checkLeftStick(t),this._checkButtons(t),this._processKeyMap(this._keyMap,.001),this.startButtonPressListener()}_checkRightStick(t){let e=t.axes[2],i=t.axes[3];Math.abs(e)>.2&&(this._rotateHorizontal(.01*O*e),this._update(),this.dispatchEvent(1)),Math.abs(i)>.2&&(this._rotateVertical(.01*O*i),this._update(),this.dispatchEvent(1))}_checkLeftStick(t){let e=t.axes[0],i=t.axes[1];Math.abs(i)>.2?i<0?this._keyMap.set(87,!0):this._keyMap.set(83,!0):t.buttons&&t.buttons[12]&&t.buttons[12].pressed?this._keyMap.set(87,!0):t.buttons&&t.buttons[13]&&t.buttons[13].pressed?this._keyMap.set(83,!0):(this._keyMap.set(87,!1),this._keyMap.set(83,!1)),Math.abs(e)>.2?e<0?this._keyMap.set(65,!0):this._keyMap.set(68,!0):(this._keyMap.set(65,!1),this._keyMap.set(68,!1))}_checkButtons(t){t.buttons&&t.buttons[6]&&t.buttons[6].pressed?this._keyMap.set(16,!0):this._keyMap.set(16,!1),t.buttons&&t.buttons[14]&&t.buttons[14].pressed?(this._keyMap.set(37,!0),this.dispatchEvent(1)):this._keyMap.set(37,!1),t.buttons&&t.buttons[15]&&t.buttons[15].pressed?(this._keyMap.set(39,!0),this.dispatchEvent(1)):this._keyMap.set(39,!1)}animateCamera(t){let e=this._cameraPosition,i=this._cameraRotation,s=this.getCamera(),a=o(e,s.position),n=w(i,s.quaternion);if(!e||a&&n)return!1;let r=this.getCamera().position.clone(),h=Math.min(10*t,1);r.lerp(e,h),this.getCamera().position.copy(r);let _=this.getCamera().quaternion.clone(),d=Math.min(5*t,1);_.slerp(i,d),this.getCamera().setRotationFromQuaternion(_);let l=!1;return this._keyMap.forEach(t=>{t&&(l=!0)}),l&&this._processKeyMap(this._keyMap,t),!0}_getCamera(){return this._camera}_initInputListener(){window.addEventListener("keyup",this._onKeyChanged.bind(this),!1),window.addEventListener("keydown",this._onKeyChanged.bind(this),!1),this._inputListeners.push({key:3,fun:t=>{this._down(t)}}),this._inputListeners.push({key:6,fun:t=>{this._move(t)}}),this._inputListeners.push({key:4,fun:t=>{this._up(t)}})}_down(t){this._downPosition=t.position,this._position=t.position,this._state=1,2===t.type&&window.setTimeout(this._onLongDown.bind(this),350),2===t.type?this._rotationSpeed=.6:this._rotationSpeed=1}_move(t){this._position=t.position,1!==this._state||this._locked||this._orbit(new THREE.Vector2(t.position.x,t.position.y)),2!==this._state||this._locked||(this._orbit(new THREE.Vector2(t.position.x,t.position.y)),this._moveForward())}_up(t){1===this._state&&this.dispatchEvent(2),2===this._state&&this._keyMap.set(87,!1),this._state=0,this._orbitPosition=null}_onLongDown(){y(this._downPosition,this._position)<E&&1===this._state&&(this._state=2,this._orbit(new THREE.Vector2(this._position.x,this._position.y)),this._moveForward())}_update(t){let e=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(e)}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix()}_onKeyChanged(t){this._keyMap.set(t.keyCode,"keydown"===t.type),this.dispatchEvent(6),this._processKeyMap(this._keyMap,.001)&&t.preventDefault()}_processKeyMap(t,e){e=Math.min(e,.1);let i=new THREE.Vector3(0,0,0),s=!1;return this._processUpDown(t,i,e),t.get(65)&&(i.x=-1*e),t.get(68)&&(i.x=1*e),t.get(37)&&(this._rotateHorizontal(-O*this._rotationSpeed*e),s=!0),t.get(39)&&(this._rotateHorizontal(O*this._rotationSpeed*e),s=!0),t.get(16)&&(i.x*=3,i.z*=3),!(0===i.x&&0===i.y&&0===i.z&&!s||(i.applyQuaternion(this.getCamera().quaternion),this._cameraPosition.add(new THREE.Vector3(i.x,0,i.z)),this._update(),0))}_processUpDown(t,e,i){(t.get(87)||t.get(38))&&(e.z=-1*i),(t.get(83)||t.get(40))&&(e.z=1*i)}_orbit(t){this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0));let e=t.clone().sub(this._orbitPosition),i=this._domHelper.element instanceof Document?this._domHelper.element.body:this._domHelper.element;e.multiplyScalar(-1),this._rotateHorizontal(2*Math.PI*e.x/i.clientWidth*1),this._rotateVertical(2*Math.PI*e.y/i.clientHeight*1),r(this._orbitPosition,t)||this.dispatchEvent(1),this._orbitPosition.copy(t),this._update()}_moveForward(){this._keyMap.set(87,!0),this._processKeyMap(this._keyMap,.001)}_rotateVertical(t){let e=this._pitch+t;e>this.maxPolarAngle||e<this.minPolarAngle||(this._pitch=e,this._pitch<-Math.PI?this._pitch+=2*Math.PI:this._pitch>Math.PI&&(this._pitch-=2*Math.PI),this._saveYawAndPitch())}getKernelZoomFactor(){return this._camera.zoom}}t("e",Q);class F{parse(t,e,i,s){let a=JSON.parse(s);return a.environment?this.load(t,e,i,a):null}load(t,e,i,s){let a,n=s.environment;if(!n)return console.warn("No environment set in scene settings"),Promise.resolve(null);switch(n.type){case"color":a=new Promise(e=>e(new D(t,i,new THREE.Color(n.details.color))));break;case"image":a=new Promise(s=>s(new D(t,i,null,e,n.details.imageUrl)));break;case"floor":a=new Promise(e=>{this._rapiAccess.getMaterial(n.details.material).then(s=>{let a=void 0===n.details.fog||n.details.fog,o=new I(t,i,a);o.changeFloorMaterial(s).then(()=>{e(o)})})});break;case"baked_shadow":a=new Promise(s=>{n.details&&n.details.color?s(new D(t,i,new THREE.Color(n.details.color))):n.details&&n.details.imageUrl?s(new D(t,i,null,e,n.details.imageUrl)):s(new L(t,i))});break;default:console.warn("Could not load environment, return old environment"),a=new Promise(t=>t(i))}return a}}i([s],F.prototype,"_rapiAccess",void 0);class V extends H{constructor(t,e){super(t,e),this._lights=[]}needsBounds(){return!0}updateBounds(t){if(this._cameraLight){const e=this._cameraLight,i=new THREE.Vector3;t.getSize(i);const s=1.5*Math.max(Math.max(i.x,i.y),i.z);this._boundingSize=s,e.shadow.camera.top=s/2,e.shadow.camera.bottom=-s/2,e.shadow.camera.left=-s/2,e.shadow.camera.right=s/2,e.shadow.camera.updateProjectionMatrix()}}loadFromJSON(t){return new Promise(e=>{this._lights=this._dynamicLightSettingLoader.parse(t),this.addToScene(),e()})}loadFromObject(t){return new Promise(e=>{t.lights||e(),this._lights=this._dynamicLightSettingLoader.load(t),this._lights.forEach((t,e)=>{t.userData.movesWithCamera&&(this._cameraLight=t,this._lights.splice(e,1))}),this.addToScene(),e()})}loadFromURL(t){return new Promise((e,i)=>{fetch(new Request(t,{method:"GET"})).then(R).then(t=>this.loadFromObject(t).then(e,i))})}addToScene(){this._lights.forEach(t=>{this._scene.add(t)}),this._cameraLight&&this._scene.add(this._cameraLight)}update(t,e){if(!this._cameraLight)return;let i=new THREE.Vector3;t.getWorldDirection(i),i.multiplyScalar(-this._boundingSize);let s=e.clone().add(i);this._cameraLight.position.copy(s)}removeFromScene(){this._lights.forEach(t=>{this._scene.remove(t)}),this._cameraLight&&this._scene.remove(this._cameraLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let t=g();this._cameraLight&&this._addToGUI(t,this._cameraLight),this._lights.forEach(e=>{this._addToGUI(t,e)})}_addToGUI(t,e){t&&(e instanceof THREE.SpotLight&&this._addSpotLightToGUI(t,e),e instanceof THREE.AmbientLight&&this._addAmbientLightToGUI(t,e),e instanceof THREE.DirectionalLight&&this._addDirectionalLightToGUI(t,e),e instanceof THREE.RectAreaLight&&this._addRectAreaLightToGUI(t,e))}_addRectAreaLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString(),intensity:e.intensity*(e.width*e.height)};i.add(e,"visible"),i.add(s,"intensity").min(10).max(400).step(10).onChange(t=>{e.intensity=t/(e.width*e.height)}),i.add(e,"castShadow"),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}_addSpotLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString(),angle:180*e.angle/Math.PI};i.add(e,"visible"),i.add(e,"intensity").min(0).max(5).step(.1),i.add(e,"penumbra").min(0).max(1).step(.1),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(s,"angle").min(10).max(180).step(1).onChange(t=>{e.angle=t*Math.PI/180}),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}_addAmbientLightToGUI(t,e){let i={name:e.name,color:"#"+e.color.getHexString()},s=t.addFolder(e.name);s.add(e,"visible"),s.add(e,"intensity").min(0).max(5).step(.1),s.addColor(i,"color").onChange(t=>{e.color=new THREE.Color(t)})}_addDirectionalLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString()};i.add(e,"visible"),i.add(e,"intensity").min(0).max(5).step(.1),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(e,"castShadow"),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}}i([s],V.prototype,"_dynamicLightSettingLoader",void 0);class U{constructor(){this._settings=new window.PIXOTRON.QualitySettings(5),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!0,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!0,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class G{constructor(){this._settings=new window.PIXOTRON.QualitySettings(4),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!0,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!0,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class j{constructor(){this._settings=new window.PIXOTRON.QualitySettings(3),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class N{constructor(){this._settings=new window.PIXOTRON.QualitySettings(2),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class Z{constructor(){this._settings=new window.PIXOTRON.QualitySettings(1),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class W{constructor(){this._settings=new window.PIXOTRON.QualitySettings(0),this._settings.enableAA=!1,this._settings.useAreaLight=!1,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class X{constructor(t){this._sceneBoundingSphere=new THREE.Sphere,this._pixotron=t,this._initializeQualitySettings(),this._initializeQualityAdapters()}getPixotronInstance(t){const e={saoparams:{intensity:.5,occlusionWorldRadius:.6,smoothTransition:!0,bias:.02,accumulative:!1},shadowparams:{shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.05,nearPlane:.01,farPlane:50,fov:40,numSamples:100,side:THREE.FrontSide}};return t=t||e,new window.PIXOTRON.Pixotron(t)}showGUI(){let t=g();if(!t)return;let e=t.addFolder("Renderer");e.add(this._pixotron.getSAOPass(),"enabled"),this._pixotron.getSAOPass().smoothTransition&&e.add(this._pixotron.getSAOPass(),"smoothTransition"),e.add(this._pixotron.getSAOPass(),"occlusionWorldRadius").min(0).max(1).step(1e-4).onChange(t=>{this._adjustSaoRadius(t)}),e.add(this._pixotron.getSAOPass(),"intensity").min(.1).max(2).step(.05),e.add(this._pixotron.getSAOPass(),"bias").min(0).max(1).step(1e-4).onChange(t=>{this._adjustSaoBias(t)}),this._pixotron.getSAOPass().numSamples&&e.add(this._pixotron.getSAOPass(),"numSamples").min(10).max(3e3).step(10),void 0!==this._pixotron.getShadowPass().enabled&&e.add(this._pixotron.getShadowPass(),"enabled"),e.add(this._pixotron.getShadowPass(),"smoothTransition"),e.add(this._pixotron.getShadowPass(),"enableAccumulation"),e.add(this._pixotron.getShadowPass(),"shadowRadius").min(0).max(5).step(.1),e.add(this._pixotron.getShadowPass(),"shadowBiasMultiplier").min(0).max(3).step(.01),e.add(this._pixotron.getShadowPass(),"numSamples").min(10).max(3e3).step(10)}updateBounds(t){this._sceneBoundingSphere.copy(t);const e=.25*this._getMaxSaoRadius();this._adjustSaoRadius(e);const i=2*this._getMinSaoBias();this._adjustSaoBias(i)}_getSaoRadius(){return this._sceneBoundingSphere.radius}_adjustSaoRadius(t){const e=this._pixotron.getSAOPass(),i=this._getMinSaoRadius(),s=this._getMaxSaoRadius();e.occlusionWorldRadius=Math.min(Math.max(t,i),s)}_adjustSaoBias(t){const e=this._pixotron.getSAOPass(),i=this._getMinSaoBias(),s=this._getMaxSaoBias();e.bias=Math.min(Math.max(t,i),s)}_getMinSaoRadius(){return.001*this._getSaoRadius()}_getMaxSaoRadius(){return.6*this._getSaoRadius()}_getMinSaoBias(){return.001*this._getSaoRadius()}_getMaxSaoBias(){return.01*this._getSaoRadius()}updatePixelRatio(t){const e=new THREE.Vector2;t.getDrawingBufferSize(e),this._pixotron.setSize(Math.floor(e.width),Math.floor(e.height))}getHighPixelRatioQualitySetting(){return this._highPixelRatioQualitySetting.getSettings()}getLowestQualitySetting(){return this._lowQualitySetting.getSettings()}_initializeQualitySettings(){this._highestQualitySetting=new G,this._highPixelRatioQualitySetting=new U,this._highQualitySetting=new j,this._midQualitySetting=new N,this._lowQualitySetting=new Z,this._lowestQualitySetting=new W}_initializeQualityAdapters(){this._autoQualityAdapter=new window.PIXOTRON.AutoQualityAdapter(this._pixotron),this._autoQualityAdapter.addQuality(this._highestQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._highQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._midQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._lowQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._lowestQualitySetting.getSettings()),this._autoQualityAdapter.setDesiredFps(20),this._manualQualityAdapter=new window.PIXOTRON.ManualQualityAdapter(this._pixotron)}onAutoQualityChange(t){this._autoQualityAdapter.onQualityChange(t)}onManualQualityChange(t){this._manualQualityAdapter.onQualityChange(t)}getAutoAdapter(){return this._autoQualityAdapter}lockAdapter(){this._autoQualityAdapter.getCurrentQualitySetting().lock()}unLockAdapter(){this._autoQualityAdapter.getCurrentQualitySetting().unLock()}enablePixotronAutoQuality(){this._currentQualityAdapter||(this._currentQualityAdapter=this._autoQualityAdapter,this._pixotron.setQualityAdapter(this._autoQualityAdapter))}movingCameraStarts(){this._currentQualityAdapter&&(this._currentQualityAdapter=this._autoQualityAdapter,this._currentQualitySetting&&(this._manualQualityAdapter.setQualitySetting(this._currentQualitySetting),this._pixotron.setQualityAdapter(this._manualQualityAdapter)),this._pixotron.setQualityAdapter(this._autoQualityAdapter))}movingCameraStops(){this._currentQualityAdapter&&(this._currentQualitySetting=this._currentQualityAdapter.getCurrentQualitySetting(),this._currentQualityAdapter=this._manualQualityAdapter,this._pixotron.setQualityAdapter(this._manualQualityAdapter),this._manualQualityAdapter.setQualitySetting(this._highestQualitySetting.getSettings()))}}class q{onBeforeRender(){}constructor(t,e,i,s=S.CAMERA_3D){this._depthWriteMaterial=new THREE.MeshBasicMaterial({colorWrite:!1}),this._maxAnisotropy=1,this._clock=new THREE.Clock,this._delta=0,this._renderListener=null,this._stopRendering=!1,this._forceRender=!1,this._updateShadowsAndAO=!0,this._lastChange=Date.now(),this._running=!1,this._perspectiveOffsetCamera=null,this._orthographicOffsetCamera=null,this._onAfterRender=()=>{},this._creator_=t,this._canvasID=i,this.createCameraControl(P(s),e),this._setupScene(e,!1),this._lifeCycleManager.addEventListener(this)}_changeCameraControl(t){this._cameraControl&&this._cameraControl.cleanUp(),t instanceof Q&&(this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener)),this._cameraControl instanceof Q&&(this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this)),(t instanceof B||t instanceof Q)&&this._environment instanceof L&&this._environment.disable(),t instanceof A&&this._environment instanceof L&&this._environment.enable(),this._cameraControl=t,this.cameraControlChanged()}cameraControlChanged(){}_addCameraControlListener(){this._cameraControl.addEventListener(0,this._requestRender,this),this._cameraControl.addEventListener(1,this._requestRender,this),this._cameraControl.addEventListener(2,this._requestRender,this),this._cameraControl.addEventListener(6,this._requestRender,this)}_renderEverything(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!0),this._requestRender()}_renderWithoutShadowsAndAO(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!1),this._requestRender()}_requestRender(){if(!this._renderer||this._stopRendering)return;const t=()=>{var e;this._delta=this._clock.getDelta(),this._animateCamera(),this._cameraControl.getCamera().layers.mask=65535,null===(e=this._statsHelper)||void 0===e||e.updateRenderInfo(this._renderer.info),this._renderLoopFunction&&(this._renderLoopFunction(),this._renderLoopFunction=null),this.onBeforeRender(),this._pixotron?(this._pixotron.autoShadowsClear=this._updateShadowsAndAO,this._pixotron.autoSAOClear=this._updateShadowsAndAO,this._forceRender&&(this._pixotron.needsUpdate=!0),this._pixotron.render(this._renderer,this._scene,this._cameraControl.getCamera(),this._renderTarget),this._forceRender=!1,this._updateShadowsAndAO=!0,this._pixotron.blit(),this._shouldRenderUi()&&this._renderUi()):this._renderer.render(this._scene,this._cameraControl.getCamera()),this._onAfterRender(),window.TWEEN&&TWEEN.update(),this._lastChange+3e3<Date.now()||this._stopRendering?this._running=!1:(this._running=!0,requestAnimationFrame(t))};this._lastChange=Date.now(),this._running||this._stopRendering||(this._running=!0,requestAnimationFrame(t))}_shouldRenderUi(){return this._pluginSystem&&this._pluginSystem.needsUiScene()}_renderUi(){const t=this._scene.background?this._scene.background.clone():null;this._scene.overrideMaterial=this._depthWriteMaterial,this._scene.background=null,this._renderer.render(this._scene,this._cameraControl.getCamera()),this._scene.overrideMaterial=null;const e=this._renderer.autoClear;this._renderer.autoClear=!1,this._renderer.clearDepth(),this._renderer.render(this._uiScene,this._cameraControl.getCamera()),this._renderer.autoClear=e,this._scene.background=t}_animateCamera(){this._cameraControl&&(!this._cameraControl.animateCamera(this._delta)&&this.shouldClearShadowsAndAO()&&this._pixotron&&!this._forceRender?(this._pixotron.autoShadowsClear=!1,this._pixotron.autoSAOClear=!1):(this._lightSetting instanceof V&&this._cameraControl.getCamera()instanceof THREE.PerspectiveCamera&&this._lightSetting.update(this._cameraControl.getCamera(),this._cameraControl.getTargetPosition()),this._pixotron&&(this._pixotron.needsUpdate=!0))),this._environment&&this._environment.needsCamera()&&this._cameraControl instanceof A&&this._environment.updateCamera(this._cameraControl.getCamera())}shouldClearShadowsAndAO(){return!1}_setupScene(t,e){const{x:i,y:s}=this._domHelper.getClientDimensions();this._scene=new THREE.Scene,this._uiScene=new THREE.Scene,(e=e||!1)||(this._scene.background=new THREE.Color(this._initData.colors.DEFAULT_BACKGROUND));const a={format:THREE.RGBAFormat,minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter},n=THREE.sRGBEncoding,o=Math.floor(i*window.devicePixelRatio),r=Math.floor(s*window.devicePixelRatio);this._renderTarget=new THREE.WebGLRenderTarget(o,r,a),this._renderTarget.texture.encoding=n,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(i,s),this._renderer.outputEncoding=THREE.sRGBEncoding,this._renderer.autoClear=!1,this._renderer.shadowMap.enabled=!0,this._renderer.shadowMap.type=THREE.PCFSoftShadowMap,this._maxAnisotropy=this._renderer.capabilities.getMaxAnisotropy(),this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),this._environmentLoader.setRendererAndScene(this._renderer,this._scene),this._environmentLoader.registerEnvironmentChangedCallback(()=>this._requestRender()),this._requestRender(),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),document.addEventListener("visibilitychange",this),this._pluginSystem.init(this._scene,this._uiScene,this._cameraControl.getCamera().position),this._addCameraControlListener(),this.sceneChanged()}_tabVisible(){this.updateCamera(!1)}updateCamera(t=!0){const{x:e,y:i}=this._domHelper.getClientDimensions();this._renderer.setSize(e,i);const s=this._renderer.getPixelRatio();if(this._renderTarget){const t=Math.floor(e*s),a=Math.floor(i*s);this._renderTarget.setSize(t,a)}if(this._pixotron)try{this._pixotron.setSize(e,i)}catch(t){console.warn(t)}this._cameraControl.updateCamera(),this._renderEverything()}_onWindowResize(){const t=this._getInputManager();t&&t.updateSize(),this.updateCamera(),this._requestRender()}_isPartOfScene(t){return"Object3D"===t.type||"Mesh"===t.type||"GLB"===t.type||"GLTF"===t.type||"Group"===t.type}cleanUp(){this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener),this._cameraControl&&this._cameraControl.cleanUp(),this._stopRendering=!0}clearScene(){let t=[];this._scene.children.forEach(e=>{this._isPartOfScene(e)&&t.push(e)}),t.forEach(t=>{v(t),this._scene.remove(t)}),this._renderer.renderLists.dispose()}enableHD(t){this._renderer.capabilities.maxTextures>8&&t&&this.loadDynamicLightSetting(t),this._pixotron=new window.PIXOTRON.Pixotron(this.getPixotronParams()),this._pixotron.enableAA=!1,this._pixotronUtil=new X(this._pixotron),this._initData.autoQuality&&this._enableAutoQuality(),this._environment instanceof L&&(this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera(),this.getBakedShadowParams()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._requestRender(),500))),this._requestRender()}_enableAutoQuality(){this._pixotronUtil.enablePixotronAutoQuality();const t=this._pixotronUtil.getAutoAdapter();this._pixotronUtil.onAutoQualityChange((e,i)=>{var s;null===(s=this._statsHelper)||void 0===s||s.updateQualityInfo(e);const a=this._pixotronUtil.getLowestQualitySetting();if(this._enableSSR(e.ssr),i&&e.getQuality()<i.getQuality()&&t.getAverageFps()<5&&t.setQualitySetting(a),this._renderer.getPixelRatio()>1&&!e.useDevicePixelRatio){this._renderer.setPixelRatio(1);const{x:t,y:e}=this._domHelper.getClientDimensions();try{this._pixotron.setSize(t,e)}catch(t){console.warn(t)}this._renderTarget&&this._renderTarget.setSize(t,e)}}),this._pixotronUtil.onManualQualityChange((t,e)=>{var i;null===(i=this._statsHelper)||void 0===i||i.updateQualityInfo(t),this._enableSSR(t.ssr)}),this._pixotronUtil.lockAdapter()}_enableSSR(t=!1){const e=void 0!==this._initData.ssr&&this._initData.ssr;this._pixotron.getSSRPass().enabled=!!e&&t}_loadGLTF(t,e,i,s,a,n,o){return new Promise((r,h)=>{this._staticItemLoader.loadGLTF(t,e,i,s,a,n,null,o).then(t=>{this._setCamera("GLTF",t),r(t)},h)})}_loadGLB(t,e,i,s,a,n,o,r){return new Promise((h,_)=>{this._staticItemLoader.loadGLB(t,e,i,s,a,n,o,r).then(t=>{this._setCamera("GLB",t),h(t)},_)})}_setCamera(t,e){if(!e)return void console.warn("could not set camera for gltf",e);const i=new THREE.Box3;i.setFromObject(e),"GLB"===t?this._cameraControl instanceof A&&this._cameraControl.updateToBounds(i,!1):"GLTF"===t&&(this._cameraControl instanceof A&&this._cameraControl.updateAndReset(i.getSize(new THREE.Vector3),i.getCenter(new THREE.Vector3),-15,70,5,!1),this._cameraControl instanceof B&&this._cameraControl.zoomToFitBounds(i,!0)),this.updateCamera()}async showGUI(){if(this._initData.disableDebugGUI)return;const t=document.createElement("style");t.innerText=".dg.main{position:absolute;z-index:100;top:0;left:0;}",document.head.appendChild(t),await this._scriptLoader.fetch("static/dat.gui.min-24a0d861d5534d62.js",{id:"dat-gui-js"});let e=g(!1);e&&(this._domHelper.element.appendChild(e.domElement),this._guiLoaded())}_guiLoaded(){let t=g();t&&(this._lightSetting&&this._lightSetting.showGUI(),this._pixotron&&this._pixotronUtil.showGUI(),this._environment&&this._environment.showGUI(),this._addGUIListener(t))}_addGUIListener(t){let e=t.__folders;Object.keys(e).forEach(t=>{let i=e[t];i.__folders&&Object.keys(i.__folders).forEach(t=>{let i=e[t];this._addGUIListener(i)}),i.__controllers&&i.__controllers.forEach(t=>{t.onFinishChange(()=>{this._guiParamChanged()})})})}_guiParamChanged(){this._renderEverything()}showStats(){e.import("./stats-helper-767882c3.legacy.js").then(t=>this._statsHelper=new t.default)}_onKeyDown(t){}_onKeyUp(t){}pause(){this._getInputManager().removeEvents(this._renderer.domElement),window.removeEventListener("resize",this,!1),window.removeEventListener("keydown",this,!1),window.removeEventListener("keyup",this,!1),document.removeEventListener("visibilitychange",this)}resume(){let t=this._domHelper.getClientDimensions(),e=t.x,i=t.y;if(this._renderTarget){const t=Math.floor(e*window.devicePixelRatio),s=Math.floor(i*window.devicePixelRatio);this._renderTarget.setSize(t,s)}this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),document.addEventListener("visibilitychange",this),this.updateCamera()}destroy(){this.pause(),this.cleanUp()}handleEvent(t){switch(t.type){case"resize":this._onWindowResize();break;case"keydown":if(t.target&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement))break;this._onKeyDown(t);break;case"keyup":if(t.target&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement))break;this._onKeyUp(t);break;case"visibilitychange":this._tabVisible()}}async loadSceneSettings(t){let e,i;return e=t.environment?new Promise(e=>{(new F).load(this._scene,this._renderer.domElement,this._environment,t).then(t=>{this._setEnvironment(t),e()})}):Promise.resolve(),t.lights?(this._lightSetting=new V(this._scene,this._lightSetting),i=this._lightSetting.loadFromObject(t)):i=Promise.resolve(),new Promise((t,s)=>{Promise.all([e,i]).then(()=>{this._renderEverything(),t()},s)})}setBackgroundColor(t){this._setEnvironment(new D(this._scene,this._environment,new THREE.Color(t)))}setBackgroundImage(t){this._setEnvironment(new D(this._scene,this._environment,null,this._renderer.domElement,t))}setBakedShadow(t,e){this._setEnvironment(new D(this._scene,this._environment,new THREE.Color(t),this._renderer.domElement,e))}_setEnvironment(t){this._environment=t,this._environment instanceof L&&(this._pixotron&&this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._renderEverything(),500))),this._renderEverything()}loadQualitySetting(t){this._pixotron&&(new x).set(this._pixotron,t)}async loadDynamicLightSetting(t){this._lightSetting=new V(this._scene,this._lightSetting);let e=!1;if(t.url)await this._lightSetting.loadFromURL(t.url),e=!0;else if(t.json)await this._lightSetting.loadFromJSON(t.json),e=!0;else if(t.object)await this._lightSetting.loadFromObject(t.object),e=!0;else if(t.ls){const i=C.createDynamicLightSettingSource(null,t.ls);await this._lightSetting.loadFromURL(i.url),e=!0}if(!e)throw new Error("No dynamic light setting source set");this._requestRender()}getScene(){return this._scene}updateScene(){this._updateBounds(this.getBounds()),this._renderEverything()}_updateBounds(t,e=!1){if(t){if(this.updateEnvironment(t,e),this._lightSetting&&this._lightSetting.needsBounds()&&this._lightSetting.updateBounds(t),this._pixotronUtil){const e=new THREE.Sphere;t.getBoundingSphere(e),this._pixotronUtil.updateBounds(e)}this._requestRender(),this._pluginSystem.updateBounds(t)}}setCameraOffset(t){const e=this._cameraControl.getCamera(),i=e||e;(null==i?void 0:i.offset)?(i.offset=t,this._renderEverything()):console.warn("Cannot set offset, current camera does not support it")}getCameraOffset(){const t=this._cameraControl.getCamera(),e=t||t;return(null==e?void 0:e.offset)?JSON.parse(JSON.stringify(e.offset)):{left:0,top:0,right:1,bottom:1}}getOrthographicOffsetCamera(){if(!this._orthographicOffsetCamera){const t=this.getCameraOffset(),e=this._domHelper.getClientDimensions(),i=5;let s=e.x/e.y*i,a=i;const n=b();this._orthographicOffsetCamera=n.createOrthographicCamera(s/-2,s/2,a/2,a/-2,1,1e3,t),this._orthographicOffsetCamera.position.set(0,10,0),this._orthographicOffsetCamera.lookAt(new THREE.Vector3(0,0,0))}return this._orthographicOffsetCamera}getPerspectiveOffsetCamera(){if(!this._perspectiveOffsetCamera){const t=this.getCameraOffset(),e=this._domHelper.getClientDimensions(),i=e.x,s=e.y,a=b();this._perspectiveOffsetCamera=a.createPerspectiveCamera(30,i/s,.1,20,t)}return this._perspectiveOffsetCamera}updateEnvironment(t,e=!1){if(t&&this._environment&&this._environment.needsBounds()){const i=t.getSize(new THREE.Vector3);(i.x+i.y+i.z!==0||e)&&this._environment.updateBounds(t.getSize(new THREE.Vector3),e)}}_onCameraIdle(){return!0}_onCameraMove(){return!0}}t("S",q),i([s],q.prototype,"_domHelper",void 0),i([s],q.prototype,"_scriptLoader",void 0),i([s],q.prototype,"_lifeCycleManager",void 0),i([s],q.prototype,"_staticItemLoader",void 0),i([s],q.prototype,"_environmentLoader",void 0),i([s],q.prototype,"_initData",void 0),i([s],q.prototype,"_pluginSystem",void 0),t("c","static/pi.min-0272f873b3a4380a.js"),t("P",["static/CopyShader-cde53240fcc3e06e.js","static/EffectComposer-1e936e5d03ff43cc.js","static/RenderPass-bc5df3810a01b2c6.js","static/ShaderPass-31f36160e0ea282d.js","static/LuminosityHighPassShader-dd5826656142421d.js","static/OutlinePass-f4bcd337cdd89b8d.js","static/RectAreaLightUniformsLib-4b74882185efd473.js","static/GammaCorrectionShader-b3b56f244f0d1e0e.js"])}}}));
2
- //# sourceMappingURL=pixotron-aed2579e.legacy.js.map
1
+ System.register(["./roomle-dependency-injection-9039338d.legacy.js","./main-thread-to-worker-876e61ea.legacy.js"],(function(t,e){var i,s,a,n,o,r,h,_,d,l,c,m,u,p,g,w,y,E,S,P,v,C,b,x,f,R;return{setters:[function(t){i=t._,s=t.i,a=t.E,n=t.t,o=t.O,r=t.Q,h=t.T,_=t.U,d=t.m,l=t.V,c=t.X,m=t.Y,u=t.Z,p=t.$,g=t.l,w=t.a0,y=t.a1,E=t.a2,S=t.e,P=t.a3,v=t.u,C=t.r,b=t.x,x=t.a4},function(t){f=t.l,R=t.h}],execute:function(){t("T","static/Tween-5ebfb82307807fdc.js");class T extends a{constructor(t,e,i){if(super(),this._tweenEnd=null,this._cameraStandingStill=!0,this._pitch=n(10),this._yaw=n(-30),this._distance=-1,this._locked=!1,this._inputListeners=[],this._lerpEnabled=!0,this._creator_=t,this._inputManager=e,this._initInputListener(),this._addInputListeners(),this._cameraPosition=new THREE.Vector3,this._targetPosition=new THREE.Vector3,i?this._cameraPosition.copy(i):this._cameraPosition=new THREE.Vector3(0,.5,3),this._initData.debug){const t=this.getDebugCameraPosition();t&&this._setCurrentCameraParameters(t)}let s=this._domHelper.getClientDimensions();this._width=s.x,this._height=s.y,this._dispatchCameraIdle=f(this._dispatchCameraIdle.bind(this),32)}getCamera(){return this._getCamera()}_addInputListeners(){this._inputListeners.forEach(t=>{this._inputManager.addEventListener(t.key,t.fun,this)})}_removeInputListeners(){this._inputListeners.forEach(t=>{this._inputManager.removeEventListener(t.key,t.fun)}),this._inputListeners=[]}cleanUp(){this._removeInputListeners()}animateCamera(t){let e=this._cameraPosition;if(!e||o(e,this.getCamera().position))return this._cameraStandingStill||(this._cameraStandingStill=!0,setTimeout(()=>this._dispatchCameraIdle(),16),this._initData.debug&&this.saveDebugCameraPosition()),!1;if(this._cameraStandingStill&&this.dispatchEvent(7,3),this._cameraStandingStill=!1,this._lerpEnabled&&!this._tweenEnd){let i=this.getCamera().position.clone();const s=Math.min(10*t,1);i.lerp(e,s),this.getCamera().position.copy(i)}else this.getCamera().position.copy(e);return!0}getDebugCameraPosition(){return JSON.parse(localStorage.getItem("debug_camera_position"))}saveDebugCameraPosition(){localStorage.setItem("debug_camera_position",JSON.stringify(this._getCurrentCameraParameters()))}_dispatchCameraIdle(){this.dispatchEvent(8,3)}_areEqual(t,e){return t.yaw.toFixed(5)===e.yaw.toFixed(5)&&t.pitch.toFixed(5)===e.pitch.toFixed(5)&&t.distance.toFixed(5)===e.distance.toFixed(5)&&t.targetX===e.targetX&&t.targetY===e.targetY&&t.targetZ===e.targetZ}_tweenCameraParameter(t,e,i=!1){return new Promise(s=>{if(e.yaw-t.yaw<=-Math.PI?t.yaw-=2*Math.PI:e.yaw-t.yaw>=Math.PI&&(t.yaw+=2*Math.PI),window.TWEEN){if(null!==this._tweenEnd&&this._tweenEnd.blockOtherTweens)return;this._tweenEnd=e,new TWEEN.Tween(t).to(e,400).easing(TWEEN.Easing.Sinusoidal.In).onUpdate(()=>{this.dispatchEvent(1,3),this._yaw=t.yaw,this._pitch=t.pitch,this._distance=t.distance,this._setCameraNear(),this._update(new THREE.Vector3(t.targetX,t.targetY,t.targetZ),i)}).onComplete(()=>{this.dispatchEvent(2,3),this._dispatchCameraIdle(),this._tweenEnd=null,s()}).start(),this.dispatchEvent(0,3)}})}_setCameraNear(){const t=this.getCamera();if(t instanceof THREE.PerspectiveCamera){const e=Math.max(.1,this._distance/6);t.near=e}}_getCurrentCameraParameters(){const t=this._targetPosition.clone();return{yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:t.x,targetY:t.y,targetZ:t.z}}_setCurrentCameraParameters(t){this._yaw=t.yaw,this._pitch=t.pitch,this._distance=t.distance,this._targetPosition.copy(new THREE.Vector3(t.targetX,t.targetY,t.targetZ))}_rotateHorizontal(t){this._yaw-=t,this._yaw<-Math.PI?this._yaw+=2*Math.PI:this._yaw>Math.PI&&(this._yaw-=2*Math.PI)}_rotateVertical(t){this._pitch+=t,this._pitch<-Math.PI?this._pitch+=2*Math.PI:this._pitch>Math.PI&&(this._pitch-=2*Math.PI)}saveState(t){if(t||!this._stateSaved){let t=this._yaw,e=this._pitch,i=this._distance,s=this._targetPosition.clone();if(this._stateSaved={yaw:t,pitch:e,distance:i,targetX:s.x,targetY:s.y,targetZ:s.z,blockOtherTweens:!0},this._getCamera().fov){let t=this._getCamera();this._stateSaved.fov=t.fov,this._stateSaved.near=t.near,this._stateSaved.far=t.far}return this._stateSaved}return null}resetToState(){if(this._stateSaved){this._stateSaved.blockOtherTweens=!1;let t=this._targetPosition.clone();this._tweenCameraParameter({yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:t.x,targetY:t.y,targetZ:t.z},this._stateSaved,!0)}this._stateSaved=null}setToState(t,e){this._tweenCameraParameter(t,e,!0)}hasSavedState(){return null!=this._stateSaved}lock(){this._locked=!0}unlock(){this._locked=!1}isLocked(){return this._locked}getTargetPosition(){return this._targetPosition}_saveYawAndPitch(){this._getCamera().userData.yaw=this._yaw,this._getCamera().userData.pitch=this._pitch}getInputPosition(t){const{x:e,y:i}=this._domHelper.getClientDimensions();return new THREE.Vector3(t.x/e*2-1,-t.y/i*2+1,.5)}addLightContainer(t){t.name="lights";const e=this._getCamera(),i=e.children.find(t=>"lights"===t.name);i&&e.remove(i),e.add(t)}checkNearFarDistance(t){if(!t)return;const e=this._cameraPosition.distanceTo(t),i=this._getCamera();i instanceof THREE.PerspectiveCamera&&e>i.far&&(i.far=e+1)}setBounds(t){this._boundingBox=t}}t("a",T),i([s],T.prototype,"_domHelper",void 0),i([s],T.prototype,"_initData",void 0);class M{constructor(t,e){this.minZoom=!1,this.maxZoom=!1,this.minZoom=t,this.maxZoom=e}}class A extends T{constructor(t,e,i,s){super(t,e,i),this._bounds=new THREE.Vector3,this._scale=1,this._state=0,this._zoomSpeed=Math.pow(.95,3),this.minDistance=0,this.maxDistance=5,this.minPolarAngle=n(0),this.maxPolarAngle=n(85),this._objectRotation=0,this.minAzimuthAngle=Number.NEGATIVE_INFINITY,this.maxAzimuthAngle=Number.POSITIVE_INFINITY,this._zoomDistance=.1,this._userInteraction=!1,this._currentZoomHash="",this._maxZoomedIn=!1,this._maxZoomedOut=!1,this._panningEnabled=!1,this._targetPositionIsPanned=!1,s?this._camera=s:this._initCamera(),this._targetPosition||(this._targetPosition=new THREE.Vector3(0,0,0),this._targetPositionIsPanned=!1);const{cameraRestriction:a,zoomDistance:o,minVerticalCameraAngle:r,maxVerticalCameraAngle:h,minHorizontalCameraAngle:_,maxHorizontalCameraAngle:d}=this._initData;if(o&&(this._zoomDistance=o/100),void 0!==r&&(this.minPolarAngle=n(r<0?r:-1*r)),void 0!==h&&(this.maxPolarAngle=n(h)),void 0!==_&&(this.minAzimuthAngle=n(_<0?_:-1*_)),void 0!==d&&(this.maxAzimuthAngle=n(d)),void 0!==a){let t=Math.abs(n(a));this.minAzimuthAngle=-t,this.maxAzimuthAngle=t,this.maxPolarAngle=Math.min(t,n(85))}this._update()}_getCamera(){return this._camera||this._initCamera(),this._camera}getCamera(){return super.getCamera()}_initCamera(){this._camera=new THREE.PerspectiveCamera,this._camera.fov=30,this._camera.aspect=this._width/this._height,this._camera.near=.1,this._camera.far=100,this._camera.updateProjectionMatrix(),this._camera.layers.set(3),this._camera.layers.enable(1),this._camera.layers.enable(2),this._camera.layers.enable(6),this._camera.layers.enable(5)}setObjectRotation(t){this._objectRotation=t}getObjectRotation(){return this._objectRotation}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix()}animateCamera(t){if(!super.animateCamera(t))return!1;let e=this._targetPosition;return!!e&&(this.getCamera().lookAt(e),!0)}_initInputListener(){this._inputListeners.push({key:3,fun:()=>{this._state=1}}),this._inputListeners.push({key:6,fun:t=>{var e,i;1!==this._state||this._locked||(this._userInteraction=!0,!(void 0!==(null===(e=t.event)||void 0===e?void 0:e.shiftKey)&&(null===(i=t.event)||void 0===i?void 0:i.shiftKey))&&this._panningEnabled&&this.disablePanning(),this._move(new THREE.Vector2(t.position.x,t.position.y),t.type))}}),this._inputListeners.push({key:11,fun:t=>{1===this._state||this._locked||(this._userInteraction=!0,this._pan(new THREE.Vector2(t.position.x,t.position.y),t.type))}}),this._inputListeners.push({key:4,fun:t=>{1===this._state&&this.dispatchEvent(2,t.type),this._state=0,this._orbitPosition=null,this._lerpEnabled=!0}}),this._inputListeners.push({key:7,fun:({event:t})=>{this._maxZoomedIn||(t&&(t.preventDefault(),t.stopPropagation()),this.zoomIn())}}),this._inputListeners.push({key:8,fun:({event:t})=>{this._maxZoomedOut||(t&&(t.preventDefault(),t.stopPropagation()),this.zoomOut())}})}_panTargetPosition(t){const e=t.clone().sub(this._orbitPosition),i=this._domHelper.element,s=this._targetPosition.project(this._camera),a=Math.max(2,4*(1-this._distance/this.maxDistance));s.x=s.x-e.x/i.clientHeight*a,s.y=s.y+e.y/i.clientHeight*a,this._targetPositionIsPanned=!0,this._targetPosition.copy(s.unproject(this._camera))}_pan(t,e){this._lerpEnabled=!1,this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0,e)),this._panTargetPosition(t),r(this._orbitPosition,t)||this.dispatchEvent(1,e),this._orbitPosition.copy(t),this._update()}_move(t,e){this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0,e));const i=t.clone().sub(this._orbitPosition),s=this._domHelper.element;this._panningEnabled?this._panTargetPosition(t):(this._rotateHorizontal(2*Math.PI*i.x/s.clientWidth*1),this._rotateVertical(2*Math.PI*i.y/s.clientHeight*1)),r(this._orbitPosition,t)||this.dispatchEvent(1,e),this._orbitPosition.copy(t),this._update()}checkBoundsAndPlaceCamera(t,e=!0){this._boundingBox&&h(t,this._boundingBox)<=0?this.setBounds(t):this.zoomToFitBounds(t,e)}zoomToFitBounds(t,e=!0){this.setBounds(t);const i=t.getSize(new THREE.Vector3);if(this._initData.debug||i.x+i.y+i.z===0)return;const s=this._getCurrentCameraParameters(),a=t.getCenter(new THREE.Vector3),n=this._setDistanceAndRangesBasedOnBounds(i);this._checkZoomDistance(t,n),this._tweenCameraParameter(s,{yaw:e?this._yaw:s.yaw,pitch:e?this._pitch:s.pitch,distance:n,targetX:a.x,targetY:a.y,targetZ:a.z},!1)}updateToBounds(t,e,i=!0,s){if(this.setBounds(t),this._initData.debug)return;const a=t.getCenter(new THREE.Vector3);s?(this._targetPosition=s.clone(),this._targetPositionIsPanned=!1):this._targetPositionIsPanned||(this._targetPosition=new THREE.Vector3(a.x,a.y,a.z));const n=this._getCurrentCameraParameters(),o=t.getSize(new THREE.Vector3);if(i){const i=this._setDistanceAndRangesBasedOnBounds(o);this._distance=i,this._checkZoomDistance(t,i),this._userInteraction?this._tweenCameraParameter(n,{yaw:this._yaw,pitch:this._pitch,distance:this._distance,targetX:this._targetPosition.x,targetY:this._targetPosition.y,targetZ:this._targetPosition.z},e):this._update()}else this._setDistanceAndRangesBasedOnBounds(o,!1);this._update()}_checkZoomDistance(t,e){const i=t.getBoundingSphere(new THREE.Sphere);e-i.radius<this._zoomDistance&&(console.warn("the initial camera position is closer than the zoomDistance param, zoomDistance is set to initial camera position."),this._zoomDistance=e-i.radius)}_setDistanceAndRangesBasedOnBounds(t,e=!0){const i=this._domHelper.getClientDimensions(),s=i.x,a=i.y,n=this._camera.offset?s-s*this._camera.offset.left-s*(1-this._camera.offset.right):s,o=this._camera.offset?a-a*this._camera.offset.bottom-a*(1-this._camera.offset.top):a;this._bounds.copy(t);const{cameraSpacing:r}=this._initData;t.addScalar(r/100),this.minDistance=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z);const h=Math.max(t.x,t.y),{x:d,y:l}=this._getMargin(n,o),c=_(t.x+d,t.y+l,t.z,this._camera.fov,n,o);return this._distance<c&&e&&(this._distance=c),this.maxDistance=c+h,this.maxDistance<2&&(this.maxDistance=2),this._camera.far=5*this.maxDistance,this._setCameraNear(),c}_getMargin(t,e){let i=this._bounds.x/2,s=this._bounds.y/2;return t>1080&&(i+=this._bounds.x<.3?.2:0,i+=this._bounds.x*(t/1080-1)),e>1080&&(i+=this._bounds.y<.3?.2:0,s+=this._bounds.y*(e/1080-1)),{x:i,y:s}}reset(t,e,i,s,a=!0){const o=t.getSize(new THREE.Vector3);if(o){if(e)this._targetPosition.copy(e);else{const e=t.getCenter(new THREE.Vector3);this._targetPosition.copy(e)}const r=this._getCurrentCameraParameters();if(i||(i=-30),s||(s=10),i+=d(this._objectRotation),this._initData.debug)return this._distance=this._setDistanceAndRangesBasedOnBounds(o),this._update(this._targetPosition),void this._setDistanceAndRangesBasedOnBounds(o);const h=this._setDistanceAndRangesBasedOnBounds(o),_=n(s),l=n(i);let c=this._targetPosition.clone();a?this._tweenCameraParameter(r,{yaw:l,pitch:_,distance:h,targetX:c.x,targetY:c.y,targetZ:c.z},!0):(this._pitch=_,this._yaw=l,this._distance=h,this._update(this._targetPosition))}else console.warn("you cant reset without bounds!")}updateAndReset(t,e,i,s,a,o=!0){const r=new THREE.Vector3(-t.x/2,0,-t.z/2),h=new THREE.Vector3(t.x/2,t.y,t.z/2);if(this._boundingBox=new THREE.Box3(r,h),a&&t.addScalar(a),e?this._targetPosition.copy(e):(this._targetPosition=new THREE.Vector3(0,t.y/2,0),this._targetPositionIsPanned=!1),-1===this._distance){const e=this._setDistanceAndRangesBasedOnBounds(t);this._distance=Math.max(2,e)}const _=this._getCurrentCameraParameters();i||(i=-30),s||(s=10),i+=d(this._objectRotation),this._pitch=n(s),this._yaw=n(i),this._setDistanceAndRangesBasedOnBounds(t);let l=this._targetPosition.clone();o?this._tweenCameraParameter(_,{yaw:this._yaw,pitch:this._pitch,distance:this.maxDistance,targetX:l.x,targetY:l.y,targetZ:l.z},!0):this._update(this._targetPosition)}_update(t,e){this._initData.debug?this._pitch=Math.max(n(-89),Math.min(n(89),this._pitch)):(this._yaw=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,this._yaw)),this._pitch=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._pitch))),this._saveYawAndPitch();const i=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX"),s=(new THREE.Quaternion).setFromEuler(i),a=new THREE.Vector3(0,0,-1);a.applyQuaternion(s),this._distance*=this._scale,this._initData.debug||(this._distance=Math.min(this.maxDistance,this._distance)),t&&this._targetPosition.copy(t);const o=this._targetPosition.clone().sub(a.multiplyScalar(this._distance));if(this._initData.debug)this._cameraPosition.copy(o),this._zoomChanged(!1,!1);else if(e)this._cameraPosition.copy(o);else{const t=this._getCameraSphere(o);null!=this._boundingBox&&this._boundingBox.intersectsSphere(t)&&this._scale>=1?this._distance+=.1:null==this._boundingBox||this._boundingBox.intersectsSphere(t)?this._zoomChanged(!1,!0):(this._cameraPosition.copy(o),this._distance===this.maxDistance?this._zoomChanged(!0,!1):this._zoomChanged(!1,!1))}this._scale=1}_zoomChanged(t,e){let i=t+""+e;0===this._currentZoomHash.length||this._currentZoomHash!==i?(this.dispatchEvent(5,new M(t,e)),this._currentZoomHash=i):t||e||this.dispatchEvent(5,new M(t,e)),this._maxZoomedIn=e,this._maxZoomedOut=t}zoomTo(t,e,i,s,a,n){return this._tweenCameraParameter(this._getCurrentCameraParameters(),{yaw:s,pitch:a,distance:2.725*_(t.x,t.y,t.z,this._camera.fov,e,i),targetX:n.x,targetY:n.y,targetZ:n.z,blockOtherTweens:!0},!0)}_getCameraSphere(t){const e=Math.max(this._bounds.x,this._bounds.y),i=Math.max(e/10,this._zoomDistance);return new THREE.Sphere(t,i)}zoomIn(t){this._lerpEnabled=!0,this._scale*=t?Math.pow(.95,t):this._zoomSpeed,this._setCameraNear(),this._update(),this.dispatchEvent(3)}zoomOut(t){this._lerpEnabled=!0,this._scale/=t?Math.pow(.95,t):this._zoomSpeed,this._setCameraNear(),this._update(),this.dispatchEvent(4)}clear(){this._userInteraction=!1,this._initData.debug||(this._distance=-1,this._targetPosition=new THREE.Vector3(0,0,0),this._targetPositionIsPanned=!1)}async moveCamera(t){return this._tweenCameraParameter(this._getCurrentCameraParameters(),t,!0)}enablePanning(){this._lerpEnabled=!1,this._panningEnabled=!0}disablePanning(){this._lerpEnabled=!1,this._panningEnabled=!1}getKernelZoomFactor(){const t=this.maxDistance;return 1-this._distance/(t-2)+.2}}t("C",A);class H{constructor(t,e){this._scene=t,e&&e.removeFromScene()}needsBounds(){return!1}updateBounds(t){}getCameraContainer(){return this._cameraContainer||(this._cameraContainer=new THREE.Object3D),this._cameraContainer}}t("L",H);const k={enable:!0,shadowMapResolution:512,smoothTransition:!0,numSamples:500,numSamplesPerFrame:4,bShadowMaterial:!0,falloff:1.5,darkness:.2,size:1.6,lightSolidAngle:40,yPosition:0};class L extends class{constructor(t,e){this._scene=t,e&&(e.removeFromScene(),e.cleanUp())}updateCamera(t){}reload(){this.removeFromScene(),this.addToScene()}updateBounds(t,e){this._bounds=t}cleanUp(){this._scene=null}}{constructor(t,e){super(t,e),this._pixotronGuard=new l,this._enabled=!0,this._params=Object.assign(k,{lightDirection:new THREE.Vector3(0,1,.5),onComplete:this._addGroundShadows.bind(this),onProgress:this._progressCallback.bind(this)})}_progressCallback(t){}needsBounds(){return!0}needsCamera(){return!1}needsRotation(){return!1}setPixotron(t,e,i,s){t&&(this._pixotron=t,this._renderer=e,this._camera=i,this._shadowBaker||(this._shadowBaker=new window.PIXOTRON.PlaneShadowBakePass(Object.assign(this._params,s))),this._shadowBaker.enable?this._shadowBaker.startBake(this._renderer,this._scene,this._camera):this._shadowBaker.enable=!0,this._wasAAEnabled=this._pixotron.enableAA,this._pixotronGuard.resolve())}async _addGroundShadows(){await this._pixotronGuard.wait(),this._pixotron.needsUpdate=!0,this._shadowPlane=this._shadowBaker.getShadowPlane(),this._shadowPlane.name="Shadow plane",this._shadowPlane.receiveShadow=!1,0!==this._params.yPosition&&(this._shadowPlane.position.y=this._params.yPosition),this._shadowPlane.visible=!0,this.addToScene(),this._loadedCallback&&this._loadedCallback()}setLoadedCallback(t){this._loadedCallback=t}update(){const t=this._getNumberOfChildren();this._bake(),this._sceneChildren=t}updateBounds(t,e){const i=this._getNumberOfChildren();return!(c(this._bounds,t,1e-4)&&this._scene&&i===this._sceneChildren&&!e||(super.updateBounds(t),this._bake(),this._sceneChildren=i,0))}_bake(){this._pixotronGuard.wait().then(()=>{this._shadowPlane&&(this._shadowPlane.visible=!1),this._shadowBaker.startBake(this._renderer,this._scene,this._camera)})}_getNumberOfChildren(){let t=0;return this._scene.traverse(e=>{"Shadow plane"!==e.name&&t++}),t}addToScene(){this._scene&&this._shadowPlane&&this._enabled&&(this._shadowPlane.material.needsUpdate=!0,m(this._shadowPlane),this._scene.add(this._shadowPlane))}removeFromScene(){this._shadowPlane&&(this._scene.remove(this._shadowPlane),this._pixotron&&(this._pixotron.enableAA=this._wasAAEnabled))}enable(){this._enabled=!0,this.addToScene()}disable(){this._enabled=!1,this.removeFromScene()}showGUI(){}}t("B",L);class z{constructor(t){this._innerSize=1,this._outerSize=100,this._plane=new THREE.Object3D,this._plane.rotation.x=-Math.PI/2;const e=new THREE.MeshStandardMaterial;this._innerPlaneMesh=new THREE.Mesh,this._innerPlaneMesh.layers.set(2),this._innerPlaneMesh.material=e,this._innerPlaneMesh.receiveShadow=!0,this._outerPlaneMesh=new THREE.Mesh,this._outerPlaneMesh.layers.set(2),this._outerPlaneMesh.material=e,this._outerPlaneMesh.receiveShadow=!0,this._plane.add(this._innerPlaneMesh),this._plane.add(this._outerPlaneMesh),this._innerSize=1,this._outerSize=t,this._updatePlane(this._innerSize,this._outerSize)}getRootNode(){return this._plane}getInnerPlane(){return this._innerPlaneMesh}getOuterPlane(){return this._outerPlaneMesh}updateSize(t){this._innerSize=t,this._updatePlane(this._innerSize,this._outerSize)}_updatePlane(t,e){const i=new THREE.Shape;i.moveTo(-t/2,-t/2),i.lineTo(-t/2,t/2),i.lineTo(t/2,t/2),i.lineTo(t/2,-t/2),i.lineTo(-t/2,-t/2);const s=new THREE.Shape;s.moveTo(-e/2,-e/2),s.lineTo(-e/2,e/2),s.lineTo(e/2,e/2),s.lineTo(e/2,-e/2),s.lineTo(-e/2,-e/2);const a=new THREE.Path;a.moveTo(-t/2,-t/2),a.lineTo(-t/2,t/2),a.lineTo(t/2,t/2),a.lineTo(t/2,-t/2),a.lineTo(-t/2,-t/2),s.holes.push(a);const n=new THREE.ShapeBufferGeometry(i);this._innerPlaneMesh.geometry&&this._innerPlaneMesh.geometry.dispose(),this._innerPlaneMesh.geometry=n;const o=new THREE.ShapeBufferGeometry(s);this._outerPlaneMesh.geometry&&this._outerPlaneMesh.geometry.dispose(),this._outerPlaneMesh.geometry=o;const r=n.attributes.uv.clone();n.setAttribute("uv2",r);const h=n.attributes.uv2.array;for(let t=0;t<h.length;++t)h[t]+=.5}}class I extends L{constructor(t,e,i){super(t,e),this._longestSide=2,this._bakedShadowPlane=new z(100),this._fog=i||!1,this._textureLoader=new THREE.TextureLoader,this.addToScene()}needsBounds(){return!0}needsCamera(){return this._fog}needsRotation(){return!1}updateBounds(t){return super.updateBounds(t),this._longestSide=Math.max(t.x,t.z),this._update(),!0}updateCamera(t){this._cameraDistance=t.position.distanceTo(new THREE.Vector3(0,0,0)),this._update()}_update(){this._fog&&this._updateFog()}_updateFog(){let t=this._longestSide/2;this._scene.fog=new THREE.Fog(16185078,this._cameraDistance+t+3,this._cameraDistance+t+3+1),this._scene.background=new THREE.Color(16185078)}_updateFloor(){if(this._floorMaterial)this._bakedShadowPlane.getOuterPlane().material=this._floorMaterial,this._bakedShadowPlane.getInnerPlane().material=this._floorMaterial;else{let t=this._width/1e3,e=this._height/1e3;this._repeatable&&(this._floorTexture.wrapS=THREE.RepeatWrapping,this._floorTexture.wrapT=THREE.RepeatWrapping,this._floorTexture.repeat.set(100/t,100/e));let i=new THREE.MeshStandardMaterial({map:this._floorTexture,side:THREE.DoubleSide});this._bakedShadowPlane.getInnerPlane().material=i,this._bakedShadowPlane.getOuterPlane().material=i}}addToScene(){this._scene&&(this._shadowPlane&&(this._bakedShadowPlane.updateSize(this._shadowPlane.scale.x),this._bakedShadowPlane.getRootNode().position.copy(this._shadowPlane.position),this._bakedShadowPlane.getInnerPlane().material.aoMap=this._shadowPlane.material.aoMap),this._scene.add(this._bakedShadowPlane.getRootNode()))}removeFromScene(){this._scene.remove(this._bakedShadowPlane.getRootNode())}setFloorMaterial(t,e,i,s){return this._width=e,this._height=i,this._repeatable=s,this._floorPromise=new Promise((e,i)=>{this._textureLoader.load(t,t=>{this._floorTexture=t,e()},null,i)}),new Promise((t,e)=>{this._floorPromise.then(()=>{this._updateFloor(),this._update(),t()},e)})}changeFloorMaterial(t,e){this._floorPromise=new Promise((i,s)=>{this._floorMaterial=u(t,this._environmentLoader),this._rapiAccess.getTexturesOf(t).then(t=>{if(t.length>0){let a=[];t.forEach(t=>{a.push(p(this._dataSyncer.requestAsset(t.image,!0),t,this._floorMaterial,e,1,1))}),Promise.all(a).then(()=>{setTimeout(()=>i(),0)},s)}else setTimeout(()=>i(),0)})});let i=[this._floorPromise];return new Promise((t,e)=>{Promise.all(i).then(()=>{this._updateFloor(),this._update(),t()},e)})}showGUI(){this._floorMaterial?this._addGUI():this._floorPromise&&this._floorPromise.then(()=>this._addGUI())}_addGUI(){let t=g();if(!t)return;let e=t.addFolder("Floor");e.add(this._floorMaterial,"roughness").min(0).max(1).step(.01),e.add(this._floorMaterial,"reflectivity").min(0).max(1).step(.01),e.add(this._floorMaterial,"clearCoat").min(0).max(1).step(.01),e.add(this._floorMaterial,"clearCoatRoughness").min(0).max(1).step(.01),e.add(this._floorMaterial,"opacity").min(0).max(1).step(.01),e.add(this._floorMaterial,"metalness").min(0).max(1).step(.01),e.add(this._floorMaterial,"bumpScale").min(0).max(1).step(.01)}}t("F",I),i([s],I.prototype,"_rapiAccess",void 0),i([s],I.prototype,"_dataSyncer",void 0),i([s],I.prototype,"_environmentLoader",void 0);class D extends L{constructor(t,e,i,s,a){if(super(t,e),this._color=i,this._oldBackground=t.background,s&&a){this._canvas=s,this._style=document.createElement("style");let t='background-image: url("'+a+'"); background-size: cover;';this._style.innerText=".rml-scene-background {"+t+"}",this._canvas.appendChild(this._style)}}needsBounds(){return!0}needsCamera(){return!1}needsRotation(){return!1}addToScene(){super.addToScene(),this._scene&&this._color&&(this._scene.background=this._color),this._canvas&&this._canvas.classList&&(this._scene.background=null,this._canvas.classList.add("rml-scene-background"),this._pixotron&&(this._pixotron.enableAA=!1))}removeFromScene(){super.removeFromScene(),this._oldBackground&&(this._scene.background=this._oldBackground),this._canvas&&this._canvas.classList.remove("rml-scene-background")}}t("b",D);class B extends T{constructor(t,e,i,s){super(t,e,i),this._scale=1,this._cameraZoom=1,this._state=0,this._size=5,this._lastPosition=new THREE.Vector2,this._zoomPosition=new THREE.Vector3,this._lastZoom=0,this._zoomSpeed=Math.pow(.95,2),s?(this._camera=s,this._cameraPosition=(new THREE.Vector3).copy(this._camera.position)):this._initCamera(i||new THREE.Vector3(0,10,0))}_getCamera(){return this._camera||this._initCamera(new THREE.Vector3(0,10,0)),this._camera}_initCamera(t){let{x:e,y:i}=this._domHelper.getClientDimensions(),s=e/i*this._size,a=this._size;this._camera=new THREE.OrthographicCamera(s/-2,s/2,a/2,a/-2,1,1e3),this._camera.position.copy(t),this._cameraPosition=t,this._camera.lookAt(new THREE.Vector3(0,0,0))}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions(),i=t/e*this._size,s=this._size;this._camera.left=i/-2,this._camera.right=i/2,this._camera.top=s/2,this._camera.bottom=s/-2,this._camera.updateProjectionMatrix()}_initInputListener(){this._inputListeners.push({key:3,fun:t=>{this._locked||(this._state=1,this._lastPosition.set(t.positionRelative.x,t.positionRelative.y),this.dispatchEvent(0))}}),this._inputListeners.push({key:6,fun:t=>{1!==this._state||this._locked||(this._move(new THREE.Vector2(t.positionRelative.x,t.positionRelative.y),t.type),this.dispatchEvent(1))}}),this._inputListeners.push({key:4,fun:t=>{1===this._state&&this.dispatchEvent(2),this._state=0}}),this._inputListeners.push({key:7,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this.dispatchEvent(3),this._scale/=this._zoomSpeed,this._zoomTo(t.positionRelative),this._update()}}),this._inputListeners.push({key:8,fun:t=>{t.event&&(t.event.stopPropagation(),t.event.preventDefault()),this.dispatchEvent(4),this._scale*=this._zoomSpeed,this._zoomTo(t.positionRelative),this._update()}})}_zoomTo(t){if(Date.now()-this._lastZoom>200){let e=new THREE.Vector3(t.x,t.y,0);e.unproject(this._camera),this._zoomPosition.copy(e)}this._lastZoom=Date.now()}_move(t,e){let i=new THREE.Vector3,s=new THREE.Vector3(this._lastPosition.x,this._lastPosition.y,0),a=new THREE.Vector3(t.x,t.y,0);s.unproject(this._camera),a.unproject(this._camera),i.subVectors(a,s),this._cameraPosition.x-=i.x*(2===e?1.1:1),this._cameraPosition.z-=i.z*(2===e?1.1:1),this._lastPosition.copy(t)}zoomToFitBounds(t,e,i){if(h(t,this._boundingBox)<0&&!i)return void this.setBounds(t);this.setBounds(t);const s=t.getSize(new THREE.Vector3),a=t.getCenter(new THREE.Vector3),n=s.x/-2/this._camera.left,o=s.z/-2/this._camera.bottom,r=1/Math.max(n,o);(r<this._cameraZoom||e)&&(this._scale=r,this._cameraZoom=r,this._cameraPosition.x=a.x,this._cameraPosition.z=a.z)}_update(t){this._scale=Math.min(this._scale,5),this._scale=Math.max(this._scale,.2);let e=(new THREE.Vector3).subVectors(this._zoomPosition,this._cameraPosition).multiplyScalar((this._scale-this._cameraZoom)/this._scale);this._cameraPosition.x+=e.x,this._cameraPosition.z+=e.z,this._cameraZoom!==this._scale&&this.dispatchEvent(5,new M(.2===this._scale,5===this._scale)),this._cameraZoom=this._scale,this._camera.updateProjectionMatrix()}animateCamera(t){if(!super.animateCamera(t)&&Math.abs(this._cameraZoom-this._camera.zoom)<=.01)return!1;const e=Math.min(10*t,1);return this._camera.zoom=THREE.MathUtils.lerp(this._camera.zoom,this._cameraZoom,e),!0}getKernelZoomFactor(){const t=1e3*(this._camera.right-this._camera.left);return this._domHelper.element.clientWidth/t*this._camera.zoom}}t("d",B);const O=Math.PI/4;class Q extends T{constructor(t,e,i,s){super(t,e,i),this._state=0,this._rotationSpeed=1,this._keyMap=new Map,this.minPolarAngle=n(-60),this.maxPolarAngle=n(60),this._camera=s||new THREE.PerspectiveCamera,this._camera.fov=70,this._camera.aspect=this._width/this._height,this._camera.near=.1,this._camera.far=100,this._camera.updateProjectionMatrix(),this._camera.layers.set(3),this._camera.layers.enable(1),this._camera.layers.enable(2),this._camera.layers.enable(6),this._camera.layers.enable(5),i?this._camera.position.set(i.x,1.5,i.z):this._camera.position.set(0,1.5,0),this._cameraPosition=new THREE.Vector3,this._cameraPosition.copy(this._camera.position),this._cameraRotation=new THREE.Quaternion,this._pitch=0,this._yaw=0;let a=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(a),window.addEventListener("gamepadconnected",this._gamepadConnected.bind(this)),window.addEventListener("gamepaddisconnected",this._gamepadDisconnected.bind(this))}_gamepadConnected(t){this.startButtonPressListener()}_gamepadDisconnected(t){window.cancelAnimationFrame(this._listenerLoopAnimationFrame)}startButtonPressListener(){this._listenerLoopAnimationFrame=window.requestAnimationFrame(()=>{this.buttonPressListener()})}buttonPressListener(){let t=navigator.getGamepads()[0];this._checkRightStick(t),this._checkLeftStick(t),this._checkButtons(t),this._processKeyMap(this._keyMap,.001),this.startButtonPressListener()}_checkRightStick(t){let e=t.axes[2],i=t.axes[3];Math.abs(e)>.2&&(this._rotateHorizontal(.01*O*e),this._update(),this.dispatchEvent(1)),Math.abs(i)>.2&&(this._rotateVertical(.01*O*i),this._update(),this.dispatchEvent(1))}_checkLeftStick(t){let e=t.axes[0],i=t.axes[1];Math.abs(i)>.2?i<0?this._keyMap.set(87,!0):this._keyMap.set(83,!0):t.buttons&&t.buttons[12]&&t.buttons[12].pressed?this._keyMap.set(87,!0):t.buttons&&t.buttons[13]&&t.buttons[13].pressed?this._keyMap.set(83,!0):(this._keyMap.set(87,!1),this._keyMap.set(83,!1)),Math.abs(e)>.2?e<0?this._keyMap.set(65,!0):this._keyMap.set(68,!0):(this._keyMap.set(65,!1),this._keyMap.set(68,!1))}_checkButtons(t){t.buttons&&t.buttons[6]&&t.buttons[6].pressed?this._keyMap.set(16,!0):this._keyMap.set(16,!1),t.buttons&&t.buttons[14]&&t.buttons[14].pressed?(this._keyMap.set(37,!0),this.dispatchEvent(1)):this._keyMap.set(37,!1),t.buttons&&t.buttons[15]&&t.buttons[15].pressed?(this._keyMap.set(39,!0),this.dispatchEvent(1)):this._keyMap.set(39,!1)}animateCamera(t){let e=this._cameraPosition,i=this._cameraRotation,s=this.getCamera(),a=o(e,s.position),n=w(i,s.quaternion);if(!e||a&&n)return!1;let r=this.getCamera().position.clone(),h=Math.min(10*t,1);r.lerp(e,h),this.getCamera().position.copy(r);let _=this.getCamera().quaternion.clone(),d=Math.min(5*t,1);_.slerp(i,d),this.getCamera().setRotationFromQuaternion(_);let l=!1;return this._keyMap.forEach(t=>{t&&(l=!0)}),l&&this._processKeyMap(this._keyMap,t),!0}_getCamera(){return this._camera}_initInputListener(){window.addEventListener("keyup",this._onKeyChanged.bind(this),!1),window.addEventListener("keydown",this._onKeyChanged.bind(this),!1),this._inputListeners.push({key:3,fun:t=>{this._down(t)}}),this._inputListeners.push({key:6,fun:t=>{this._move(t)}}),this._inputListeners.push({key:4,fun:t=>{this._up(t)}})}_down(t){this._downPosition=t.position,this._position=t.position,this._state=1,2===t.type&&window.setTimeout(this._onLongDown.bind(this),350),2===t.type?this._rotationSpeed=.6:this._rotationSpeed=1}_move(t){this._position=t.position,1!==this._state||this._locked||this._orbit(new THREE.Vector2(t.position.x,t.position.y)),2!==this._state||this._locked||(this._orbit(new THREE.Vector2(t.position.x,t.position.y)),this._moveForward())}_up(t){1===this._state&&this.dispatchEvent(2),2===this._state&&this._keyMap.set(87,!1),this._state=0,this._orbitPosition=null}_onLongDown(){y(this._downPosition,this._position)<E&&1===this._state&&(this._state=2,this._orbit(new THREE.Vector2(this._position.x,this._position.y)),this._moveForward())}_update(t){let e=new THREE.Euler(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(e)}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix()}_onKeyChanged(t){this._keyMap.set(t.keyCode,"keydown"===t.type),this.dispatchEvent(6),this._processKeyMap(this._keyMap,.001)&&t.preventDefault()}_processKeyMap(t,e){e=Math.min(e,.1);let i=new THREE.Vector3(0,0,0),s=!1;return this._processUpDown(t,i,e),t.get(65)&&(i.x=-1*e),t.get(68)&&(i.x=1*e),t.get(37)&&(this._rotateHorizontal(-O*this._rotationSpeed*e),s=!0),t.get(39)&&(this._rotateHorizontal(O*this._rotationSpeed*e),s=!0),t.get(16)&&(i.x*=3,i.z*=3),!(0===i.x&&0===i.y&&0===i.z&&!s||(i.applyQuaternion(this.getCamera().quaternion),this._cameraPosition.add(new THREE.Vector3(i.x,0,i.z)),this._update(),0))}_processUpDown(t,e,i){(t.get(87)||t.get(38))&&(e.z=-1*i),(t.get(83)||t.get(40))&&(e.z=1*i)}_orbit(t){this._orbitPosition||(this._orbitPosition=new THREE.Vector2(t.x,t.y),this.dispatchEvent(0));let e=t.clone().sub(this._orbitPosition),i=this._domHelper.element instanceof Document?this._domHelper.element.body:this._domHelper.element;e.multiplyScalar(-1),this._rotateHorizontal(2*Math.PI*e.x/i.clientWidth*1),this._rotateVertical(2*Math.PI*e.y/i.clientHeight*1),r(this._orbitPosition,t)||this.dispatchEvent(1),this._orbitPosition.copy(t),this._update()}_moveForward(){this._keyMap.set(87,!0),this._processKeyMap(this._keyMap,.001)}_rotateVertical(t){let e=this._pitch+t;e>this.maxPolarAngle||e<this.minPolarAngle||(this._pitch=e,this._pitch<-Math.PI?this._pitch+=2*Math.PI:this._pitch>Math.PI&&(this._pitch-=2*Math.PI),this._saveYawAndPitch())}getKernelZoomFactor(){return this._camera.zoom}}t("e",Q);class F{parse(t,e,i,s){let a=JSON.parse(s);return a.environment?this.load(t,e,i,a):null}load(t,e,i,s){let a,n=s.environment;if(!n)return console.warn("No environment set in scene settings"),Promise.resolve(null);switch(n.type){case"color":a=new Promise(e=>e(new D(t,i,new THREE.Color(n.details.color))));break;case"image":a=new Promise(s=>s(new D(t,i,null,e,n.details.imageUrl)));break;case"floor":a=new Promise(e=>{this._rapiAccess.getMaterial(n.details.material).then(s=>{let a=void 0===n.details.fog||n.details.fog,o=new I(t,i,a);o.changeFloorMaterial(s).then(()=>{e(o)})})});break;case"baked_shadow":a=new Promise(s=>{n.details&&n.details.color?s(new D(t,i,new THREE.Color(n.details.color))):n.details&&n.details.imageUrl?s(new D(t,i,null,e,n.details.imageUrl)):s(new L(t,i))});break;default:console.warn("Could not load environment, return old environment"),a=new Promise(t=>t(i))}return a}}i([s],F.prototype,"_rapiAccess",void 0);class V extends H{constructor(t,e){super(t,e),this._lights=[]}needsBounds(){return!0}updateBounds(t){if(this._cameraLight){const e=this._cameraLight,i=new THREE.Vector3;t.getSize(i);const s=1.5*Math.max(Math.max(i.x,i.y),i.z);this._boundingSize=s,e.shadow.camera.top=s/2,e.shadow.camera.bottom=-s/2,e.shadow.camera.left=-s/2,e.shadow.camera.right=s/2,e.shadow.camera.updateProjectionMatrix()}}loadFromJSON(t){return new Promise(e=>{this._lights=this._dynamicLightSettingLoader.parse(t),this.addToScene(),e()})}loadFromObject(t){return new Promise(e=>{t.lights||e(),this._lights=this._dynamicLightSettingLoader.load(t),this._lights.forEach((t,e)=>{t.userData.movesWithCamera&&(this._cameraLight=t,this._lights.splice(e,1))}),this.addToScene(),e()})}loadFromURL(t){return new Promise((e,i)=>{fetch(new Request(t,{method:"GET"})).then(R).then(t=>this.loadFromObject(t).then(e,i))})}addToScene(){this._lights.forEach(t=>{this._scene.add(t)}),this._cameraLight&&this._scene.add(this._cameraLight)}update(t,e){if(!this._cameraLight)return;let i=new THREE.Vector3;t.getWorldDirection(i),i.multiplyScalar(-this._boundingSize);let s=e.clone().add(i);this._cameraLight.position.copy(s)}removeFromScene(){this._lights.forEach(t=>{this._scene.remove(t)}),this._cameraLight&&this._scene.remove(this._cameraLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let t=g();this._cameraLight&&this._addToGUI(t,this._cameraLight),this._lights.forEach(e=>{this._addToGUI(t,e)})}_addToGUI(t,e){t&&(e instanceof THREE.SpotLight&&this._addSpotLightToGUI(t,e),e instanceof THREE.AmbientLight&&this._addAmbientLightToGUI(t,e),e instanceof THREE.DirectionalLight&&this._addDirectionalLightToGUI(t,e),e instanceof THREE.RectAreaLight&&this._addRectAreaLightToGUI(t,e))}_addRectAreaLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString(),intensity:e.intensity*(e.width*e.height)};i.add(e,"visible"),i.add(s,"intensity").min(10).max(400).step(10).onChange(t=>{e.intensity=t/(e.width*e.height)}),i.add(e,"castShadow"),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}_addSpotLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString(),angle:180*e.angle/Math.PI};i.add(e,"visible"),i.add(e,"intensity").min(0).max(5).step(.1),i.add(e,"penumbra").min(0).max(1).step(.1),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(s,"angle").min(10).max(180).step(1).onChange(t=>{e.angle=t*Math.PI/180}),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}_addAmbientLightToGUI(t,e){let i={name:e.name,color:"#"+e.color.getHexString()},s=t.addFolder(e.name);s.add(e,"visible"),s.add(e,"intensity").min(0).max(5).step(.1),s.addColor(i,"color").onChange(t=>{e.color=new THREE.Color(t)})}_addDirectionalLightToGUI(t,e){let i=t.addFolder(e.name),s={name:e.name,color:"#"+e.color.getHexString()};i.add(e,"visible"),i.add(e,"intensity").min(0).max(5).step(.1),i.addColor(s,"color").onChange(t=>{e.color=new THREE.Color(t)}),i.add(e,"castShadow"),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new THREE.Vector3(0,0,0))})}}i([s],V.prototype,"_dynamicLightSettingLoader",void 0);class U{constructor(){this._settings=new window.PIXOTRON.QualitySettings(5),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!0,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!0,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class G{constructor(){this._settings=new window.PIXOTRON.QualitySettings(4),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!0,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!0,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class j{constructor(){this._settings=new window.PIXOTRON.QualitySettings(3),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!0,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!0},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class N{constructor(){this._settings=new window.PIXOTRON.QualitySettings(2),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class Z{constructor(){this._settings=new window.PIXOTRON.QualitySettings(1),this._settings.enableAA=!0,this._settings.useAreaLight=!0,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!0,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class W{constructor(){this._settings=new window.PIXOTRON.QualitySettings(0),this._settings.enableAA=!1,this._settings.useAreaLight=!1,this._settings.useDevicePixelRatio=!1,this._settings.useHDREnv=!1,this._settings.useGBuffer=!0,this._settings.ssr=!1,this._settings.saoQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0,useNormalWeights:!0,useAccumulative:!1,enableBlur:!1},this._settings.shadowQualitySettings={enabled:!1,downscale:1,enabledOnMove:!0}}getSettings(){return this._settings}}class X{constructor(t){this._sceneBoundingSphere=new THREE.Sphere,this._pixotron=t,this._initializeQualitySettings(),this._initializeQualityAdapters()}getPixotronInstance(t){const e={saoparams:{intensity:.5,occlusionWorldRadius:.6,smoothTransition:!0,bias:.02,accumulative:!1},shadowparams:{shadowQuality:1,smoothTransition:!0,enableAccumulation:!0,shadowBiasMultiplier:.05,nearPlane:.01,farPlane:50,fov:40,numSamples:100,side:THREE.FrontSide}};return t=t||e,new window.PIXOTRON.Pixotron(t)}showGUI(){let t=g();if(!t)return;let e=t.addFolder("Renderer");e.add(this._pixotron.getSAOPass(),"enabled"),this._pixotron.getSAOPass().smoothTransition&&e.add(this._pixotron.getSAOPass(),"smoothTransition"),e.add(this._pixotron.getSAOPass(),"occlusionWorldRadius").min(0).max(1).step(1e-4).onChange(t=>{this._adjustSaoRadius(t)}),e.add(this._pixotron.getSAOPass(),"intensity").min(.1).max(2).step(.05),e.add(this._pixotron.getSAOPass(),"bias").min(0).max(1).step(1e-4).onChange(t=>{this._adjustSaoBias(t)}),this._pixotron.getSAOPass().numSamples&&e.add(this._pixotron.getSAOPass(),"numSamples").min(10).max(3e3).step(10),void 0!==this._pixotron.getShadowPass().enabled&&e.add(this._pixotron.getShadowPass(),"enabled"),e.add(this._pixotron.getShadowPass(),"smoothTransition"),e.add(this._pixotron.getShadowPass(),"enableAccumulation"),e.add(this._pixotron.getShadowPass(),"shadowRadius").min(0).max(5).step(.1),e.add(this._pixotron.getShadowPass(),"shadowBiasMultiplier").min(0).max(3).step(.01),e.add(this._pixotron.getShadowPass(),"numSamples").min(10).max(3e3).step(10)}updateBounds(t){this._sceneBoundingSphere.copy(t);const e=.25*this._getMaxSaoRadius();this._adjustSaoRadius(e);const i=2*this._getMinSaoBias();this._adjustSaoBias(i)}_getSaoRadius(){return this._sceneBoundingSphere.radius}_adjustSaoRadius(t){const e=this._pixotron.getSAOPass(),i=this._getMinSaoRadius(),s=this._getMaxSaoRadius();e.occlusionWorldRadius=Math.min(Math.max(t,i),s)}_adjustSaoBias(t){const e=this._pixotron.getSAOPass(),i=this._getMinSaoBias(),s=this._getMaxSaoBias();e.bias=Math.min(Math.max(t,i),s)}_getMinSaoRadius(){return.001*this._getSaoRadius()}_getMaxSaoRadius(){return.6*this._getSaoRadius()}_getMinSaoBias(){return.001*this._getSaoRadius()}_getMaxSaoBias(){return.01*this._getSaoRadius()}updatePixelRatio(t){const e=new THREE.Vector2;t.getDrawingBufferSize(e),this._pixotron.setSize(Math.floor(e.width),Math.floor(e.height))}getHighPixelRatioQualitySetting(){return this._highPixelRatioQualitySetting.getSettings()}getLowestQualitySetting(){return this._lowQualitySetting.getSettings()}_initializeQualitySettings(){this._highestQualitySetting=new G,this._highPixelRatioQualitySetting=new U,this._highQualitySetting=new j,this._midQualitySetting=new N,this._lowQualitySetting=new Z,this._lowestQualitySetting=new W}_initializeQualityAdapters(){this._autoQualityAdapter=new window.PIXOTRON.AutoQualityAdapter(this._pixotron),this._autoQualityAdapter.addQuality(this._highestQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._highQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._midQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._lowQualitySetting.getSettings()),this._autoQualityAdapter.addQuality(this._lowestQualitySetting.getSettings()),this._autoQualityAdapter.setDesiredFps(20),this._manualQualityAdapter=new window.PIXOTRON.ManualQualityAdapter(this._pixotron)}onAutoQualityChange(t){this._autoQualityAdapter.onQualityChange(t)}onManualQualityChange(t){this._manualQualityAdapter.onQualityChange(t)}getAutoAdapter(){return this._autoQualityAdapter}lockAdapter(){this._autoQualityAdapter.getCurrentQualitySetting().lock()}unLockAdapter(){this._autoQualityAdapter.getCurrentQualitySetting().unLock()}enablePixotronAutoQuality(){this._currentQualityAdapter||(this._currentQualityAdapter=this._autoQualityAdapter,this._pixotron.setQualityAdapter(this._autoQualityAdapter))}movingCameraStarts(){this._currentQualityAdapter&&(this._currentQualityAdapter=this._autoQualityAdapter,this._currentQualitySetting&&(this._manualQualityAdapter.setQualitySetting(this._currentQualitySetting),this._pixotron.setQualityAdapter(this._manualQualityAdapter)),this._pixotron.setQualityAdapter(this._autoQualityAdapter))}movingCameraStops(){this._currentQualityAdapter&&(this._currentQualitySetting=this._currentQualityAdapter.getCurrentQualitySetting(),this._currentQualityAdapter=this._manualQualityAdapter,this._pixotron.setQualityAdapter(this._manualQualityAdapter),this._manualQualityAdapter.setQualitySetting(this._highestQualitySetting.getSettings()))}}class q{onBeforeRender(){}constructor(t,e,i,s=S.CAMERA_3D){this._depthWriteMaterial=new THREE.MeshBasicMaterial({colorWrite:!1}),this._maxAnisotropy=1,this._clock=new THREE.Clock,this._delta=0,this._renderListener=null,this._stopRendering=!1,this._forceRender=!1,this._updateShadowsAndAO=!0,this._lastChange=Date.now(),this._running=!1,this._perspectiveOffsetCamera=null,this._orthographicOffsetCamera=null,this._onAfterRender=()=>{},this._creator_=t,this._canvasID=i,this.createCameraControl(P(s),e),this._setupScene(e,!1),this._lifeCycleManager.addEventListener(this)}_changeCameraControl(t){this._cameraControl&&this._cameraControl.cleanUp(),t instanceof Q&&(this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener)),this._cameraControl instanceof Q&&(this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this)),(t instanceof B||t instanceof Q)&&this._environment instanceof L&&this._environment.disable(),t instanceof A&&this._environment instanceof L&&this._environment.enable(),this._cameraControl=t,this.cameraControlChanged()}cameraControlChanged(){}_addCameraControlListener(){this._cameraControl.addEventListener(0,this._requestRender,this),this._cameraControl.addEventListener(1,this._requestRender,this),this._cameraControl.addEventListener(2,this._requestRender,this),this._cameraControl.addEventListener(6,this._requestRender,this)}_renderEverything(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!0),this._requestRender()}_renderWithoutShadowsAndAO(){this._pixotron&&(this._forceRender=!0,this._updateShadowsAndAO=!1),this._requestRender()}_requestRender(){if(!this._renderer||this._stopRendering)return;const t=()=>{var e;this._delta=this._clock.getDelta(),this._animateCamera(),this._cameraControl.getCamera().layers.mask=65535,null===(e=this._statsHelper)||void 0===e||e.updateRenderInfo(this._renderer.info),this._renderLoopFunction&&(this._renderLoopFunction(),this._renderLoopFunction=null),this.onBeforeRender(),this._pixotron?(this._pixotron.autoShadowsClear=this._updateShadowsAndAO,this._pixotron.autoSAOClear=this._updateShadowsAndAO,this._forceRender&&(this._pixotron.needsUpdate=!0),this._pixotron.render(this._renderer,this._scene,this._cameraControl.getCamera(),this._renderTarget),this._forceRender=!1,this._updateShadowsAndAO=!0,this._pixotron.blit(),this._shouldRenderUi()&&this._renderUi()):this._renderer.render(this._scene,this._cameraControl.getCamera()),this._onAfterRender(),window.TWEEN&&TWEEN.update(),this._lastChange+3e3<Date.now()||this._stopRendering?this._running=!1:(this._running=!0,requestAnimationFrame(t))};this._lastChange=Date.now(),this._running||this._stopRendering||(this._running=!0,requestAnimationFrame(t))}_shouldRenderUi(){return this._pluginSystem&&this._pluginSystem.needsUiScene()}_renderUi(){const t=this._scene.background?this._scene.background.clone():null;this._scene.overrideMaterial=this._depthWriteMaterial,this._scene.background=null,this._renderer.render(this._scene,this._cameraControl.getCamera()),this._scene.overrideMaterial=null;const e=this._renderer.autoClear;this._renderer.autoClear=!1,this._renderer.clearDepth(),this._renderer.render(this._uiScene,this._cameraControl.getCamera()),this._renderer.autoClear=e,this._scene.background=t}_animateCamera(){this._cameraControl&&(!this._cameraControl.animateCamera(this._delta)&&this.shouldClearShadowsAndAO()&&this._pixotron&&!this._forceRender?(this._pixotron.autoShadowsClear=!1,this._pixotron.autoSAOClear=!1):(this._lightSetting instanceof V&&this._cameraControl.getCamera()instanceof THREE.PerspectiveCamera&&this._lightSetting.update(this._cameraControl.getCamera(),this._cameraControl.getTargetPosition()),this._pixotron&&(this._pixotron.needsUpdate=!0))),this._environment&&this._environment.needsCamera()&&this._cameraControl instanceof A&&this._environment.updateCamera(this._cameraControl.getCamera())}shouldClearShadowsAndAO(){return!1}_setupScene(t,e){const{x:i,y:s}=this._domHelper.getClientDimensions();this._scene=new THREE.Scene,this._uiScene=new THREE.Scene,(e=e||!1)||(this._scene.background=new THREE.Color(this._initData.colors.DEFAULT_BACKGROUND));const a={format:THREE.RGBAFormat,minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter},n=THREE.sRGBEncoding,o=Math.floor(i*window.devicePixelRatio),r=Math.floor(s*window.devicePixelRatio);this._renderTarget=new THREE.WebGLRenderTarget(o,r,a),this._renderTarget.texture.encoding=n,this._renderer=new THREE.WebGLRenderer({antialias:!0,alpha:!0}),this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize(i,s),this._renderer.outputEncoding=THREE.sRGBEncoding,this._renderer.autoClear=!1,this._renderer.shadowMap.enabled=!0,this._renderer.shadowMap.type=THREE.PCFSoftShadowMap,this._maxAnisotropy=this._renderer.capabilities.getMaxAnisotropy(),this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),this._environmentLoader.setRendererAndScene(this._renderer,this._scene),this._environmentLoader.registerEnvironmentChangedCallback(()=>this._requestRender()),this._requestRender(),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),document.addEventListener("visibilitychange",this),this._pluginSystem.init(this._scene,this._uiScene,this._cameraControl.getCamera().position),this._addCameraControlListener(),this.sceneChanged()}_tabVisible(){this.updateCamera(!1)}updateCamera(t=!0){const{x:e,y:i}=this._domHelper.getClientDimensions();this._renderer.setSize(e,i);const s=this._renderer.getPixelRatio();if(this._renderTarget){const t=Math.floor(e*s),a=Math.floor(i*s);this._renderTarget.setSize(t,a)}if(this._pixotron)try{this._pixotron.setSize(e,i)}catch(t){console.warn(t)}this._cameraControl.updateCamera(),this._renderEverything()}_onWindowResize(){const t=this._getInputManager();t&&t.updateSize(),this.updateCamera(),this._requestRender()}_isPartOfScene(t){return"Object3D"===t.type||"Mesh"===t.type||"GLB"===t.type||"GLTF"===t.type||"Group"===t.type}cleanUp(){this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener),this._cameraControl&&this._cameraControl.cleanUp(),this._stopRendering=!0}clearScene(){let t=[];this._scene.children.forEach(e=>{this._isPartOfScene(e)&&t.push(e)}),t.forEach(t=>{v(t),this._scene.remove(t)}),this._renderer.renderLists.dispose()}enableHD(t){this._renderer.capabilities.maxTextures>8&&t&&this.loadDynamicLightSetting(t),this._pixotron=new window.PIXOTRON.Pixotron(this.getPixotronParams()),this._pixotron.enableAA=!1,this._pixotronUtil=new X(this._pixotron),this._initData.autoQuality&&this._enableAutoQuality(),this._environment instanceof L&&(this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera(),this.getBakedShadowParams()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._requestRender(),500))),this._requestRender()}_enableAutoQuality(){this._pixotronUtil.enablePixotronAutoQuality();const t=this._pixotronUtil.getAutoAdapter();this._pixotronUtil.onAutoQualityChange((e,i)=>{var s;null===(s=this._statsHelper)||void 0===s||s.updateQualityInfo(e);const a=this._pixotronUtil.getLowestQualitySetting();if(this._enableSSR(e.ssr),i&&e.getQuality()<i.getQuality()&&t.getAverageFps()<5&&t.setQualitySetting(a),this._renderer.getPixelRatio()>1&&!e.useDevicePixelRatio){this._renderer.setPixelRatio(1);const{x:t,y:e}=this._domHelper.getClientDimensions();try{this._pixotron.setSize(t,e)}catch(t){console.warn(t)}this._renderTarget&&this._renderTarget.setSize(t,e)}}),this._pixotronUtil.onManualQualityChange((t,e)=>{var i;null===(i=this._statsHelper)||void 0===i||i.updateQualityInfo(t),this._enableSSR(t.ssr)}),this._pixotronUtil.lockAdapter()}_enableSSR(t=!1){const e=void 0!==this._initData.ssr&&this._initData.ssr;this._pixotron.getSSRPass().enabled=!!e&&t}_loadGLTF(t,e,i,s,a,n,o){return new Promise((r,h)=>{this._staticItemLoader.loadGLTF(t,e,i,s,a,n,null,o).then(t=>{this._setCamera("GLTF",t.scene),r(t.scene)},h)})}_loadGLB(t,e,i,s,a,n,o,r){return new Promise((h,_)=>{this._staticItemLoader.loadGLB(t,e,i,s,a,n,o,r).then(t=>{this._setCamera("GLB",t.scene),h(t.scene)},_)})}_setCamera(t,e){if(!e)return void console.warn("could not set camera for gltf",e);const i=new THREE.Box3;i.setFromObject(e),"GLB"===t?this._cameraControl instanceof A&&this._cameraControl.updateToBounds(i,!1):"GLTF"===t&&(this._cameraControl instanceof A&&this._cameraControl.updateAndReset(i.getSize(new THREE.Vector3),i.getCenter(new THREE.Vector3),-15,70,5,!1),this._cameraControl instanceof B&&this._cameraControl.zoomToFitBounds(i,!0)),this.updateCamera()}async showGUI(){if(this._initData.disableDebugGUI)return;const t=document.createElement("style");t.innerText=".dg.main{position:absolute;z-index:100;top:0;left:0;}",document.head.appendChild(t),await this._scriptLoader.fetch("static/dat.gui.min-24a0d861d5534d62.js",{id:"dat-gui-js"});let e=g(!1);e&&(this._domHelper.element.appendChild(e.domElement),this._guiLoaded())}_guiLoaded(){let t=g();t&&(this._lightSetting&&this._lightSetting.showGUI(),this._pixotron&&this._pixotronUtil.showGUI(),this._environment&&this._environment.showGUI(),this._addGUIListener(t))}_addGUIListener(t){let e=t.__folders;Object.keys(e).forEach(t=>{let i=e[t];i.__folders&&Object.keys(i.__folders).forEach(t=>{let i=e[t];this._addGUIListener(i)}),i.__controllers&&i.__controllers.forEach(t=>{t.onFinishChange(()=>{this._guiParamChanged()})})})}_guiParamChanged(){this._renderEverything()}showStats(){e.import("./stats-helper-de80177e.legacy.js").then(t=>this._statsHelper=new t.default)}_onKeyDown(t){}_onKeyUp(t){}pause(){this._getInputManager().removeEvents(this._renderer.domElement),window.removeEventListener("resize",this,!1),window.removeEventListener("keydown",this,!1),window.removeEventListener("keyup",this,!1),document.removeEventListener("visibilitychange",this)}resume(){let t=this._domHelper.getClientDimensions(),e=t.x,i=t.y;if(this._renderTarget){const t=Math.floor(e*window.devicePixelRatio),s=Math.floor(i*window.devicePixelRatio);this._renderTarget.setSize(t,s)}this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),window.addEventListener("resize",this,!1),window.addEventListener("keydown",this,!1),window.addEventListener("keyup",this,!1),document.addEventListener("visibilitychange",this),this.updateCamera()}destroy(){this.pause(),this.cleanUp()}handleEvent(t){switch(t.type){case"resize":this._onWindowResize();break;case"keydown":if(t.target&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement))break;this._onKeyDown(t);break;case"keyup":if(t.target&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement))break;this._onKeyUp(t);break;case"visibilitychange":this._tabVisible()}}async loadSceneSettings(t){let e,i;return e=t.environment?new Promise(e=>{(new F).load(this._scene,this._renderer.domElement,this._environment,t).then(t=>{this._setEnvironment(t),e()})}):Promise.resolve(),t.lights?(this._lightSetting=new V(this._scene,this._lightSetting),i=this._lightSetting.loadFromObject(t)):i=Promise.resolve(),new Promise((t,s)=>{Promise.all([e,i]).then(()=>{this._renderEverything(),t()},s)})}setBackgroundColor(t){this._setEnvironment(new D(this._scene,this._environment,new THREE.Color(t)))}setBackgroundImage(t){this._setEnvironment(new D(this._scene,this._environment,null,this._renderer.domElement,t))}setBakedShadow(t,e){this._setEnvironment(new D(this._scene,this._environment,new THREE.Color(t),this._renderer.domElement,e))}_setEnvironment(t){this._environment=t,this._environment instanceof L&&(this._pixotron&&this._environment.setPixotron(this._pixotron,this._renderer,this._cameraControl.getCamera()),this._environment.setLoadedCallback(()=>setTimeout(()=>this._renderEverything(),500))),this._renderEverything()}loadQualitySetting(t){this._pixotron&&(new x).set(this._pixotron,t)}async loadDynamicLightSetting(t){this._lightSetting=new V(this._scene,this._lightSetting);let e=!1;if(t.url)await this._lightSetting.loadFromURL(t.url),e=!0;else if(t.json)await this._lightSetting.loadFromJSON(t.json),e=!0;else if(t.object)await this._lightSetting.loadFromObject(t.object),e=!0;else if(t.ls){const i=C.createDynamicLightSettingSource(null,t.ls);await this._lightSetting.loadFromURL(i.url),e=!0}if(!e)throw new Error("No dynamic light setting source set");this._requestRender()}getScene(){return this._scene}updateScene(){this._updateBounds(this.getBounds()),this._renderEverything()}_updateBounds(t,e=!1){if(t){if(this.updateEnvironment(t,e),this._lightSetting&&this._lightSetting.needsBounds()&&this._lightSetting.updateBounds(t),this._pixotronUtil){const e=new THREE.Sphere;t.getBoundingSphere(e),this._pixotronUtil.updateBounds(e)}this._requestRender(),this._pluginSystem.updateBounds(t)}}setCameraOffset(t){const e=this._cameraControl.getCamera(),i=e||e;(null==i?void 0:i.offset)?(i.offset=t,this._renderEverything()):console.warn("Cannot set offset, current camera does not support it")}getCameraOffset(){const t=this._cameraControl.getCamera(),e=t||t;return(null==e?void 0:e.offset)?JSON.parse(JSON.stringify(e.offset)):{left:0,top:0,right:1,bottom:1}}getOrthographicOffsetCamera(){if(!this._orthographicOffsetCamera){const t=this.getCameraOffset(),e=this._domHelper.getClientDimensions(),i=5;let s=e.x/e.y*i,a=i;const n=b();this._orthographicOffsetCamera=n.createOrthographicCamera(s/-2,s/2,a/2,a/-2,1,1e3,t),this._orthographicOffsetCamera.position.set(0,10,0),this._orthographicOffsetCamera.lookAt(new THREE.Vector3(0,0,0))}return this._orthographicOffsetCamera}getPerspectiveOffsetCamera(){if(!this._perspectiveOffsetCamera){const t=this.getCameraOffset(),e=this._domHelper.getClientDimensions(),i=e.x,s=e.y,a=b();this._perspectiveOffsetCamera=a.createPerspectiveCamera(30,i/s,.1,20,t)}return this._perspectiveOffsetCamera}updateEnvironment(t,e=!1){if(t&&this._environment&&this._environment.needsBounds()){const i=t.getSize(new THREE.Vector3);(i.x+i.y+i.z!==0||e)&&this._environment.updateBounds(t.getSize(new THREE.Vector3),e)}}_onCameraIdle(){return!0}_onCameraMove(){return!0}}t("S",q),i([s],q.prototype,"_domHelper",void 0),i([s],q.prototype,"_scriptLoader",void 0),i([s],q.prototype,"_lifeCycleManager",void 0),i([s],q.prototype,"_staticItemLoader",void 0),i([s],q.prototype,"_environmentLoader",void 0),i([s],q.prototype,"_initData",void 0),i([s],q.prototype,"_pluginSystem",void 0),t("c","static/pi.min-0272f873b3a4380a.js"),t("P",["static/CopyShader-cde53240fcc3e06e.js","static/EffectComposer-1e936e5d03ff43cc.js","static/RenderPass-bc5df3810a01b2c6.js","static/ShaderPass-31f36160e0ea282d.js","static/LuminosityHighPassShader-dd5826656142421d.js","static/OutlinePass-f4bcd337cdd89b8d.js","static/RectAreaLightUniformsLib-4b74882185efd473.js","static/GammaCorrectionShader-b3b56f244f0d1e0e.js"])}}}));
2
+ //# sourceMappingURL=pixotron-ea1b5c34.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pixotron-aed2579e.legacy.js","sources":["../../../packages/three-build/src/Tween.js","../../../packages/three-build/src/dat.gui.min.js","../../../node_modules/pi/pi.min.js","../../../node_modules/pi/js/shaders/CopyShader.js","../../../node_modules/pi/js/postprocessing/EffectComposer.js","../../../node_modules/pi/js/postprocessing/RenderPass.js","../../../node_modules/pi/js/postprocessing/ShaderPass.js","../../../node_modules/pi/js/shaders/LuminosityHighPassShader.js","../../../node_modules/pi/js/postprocessing/OutlinePass.js","../../../node_modules/pi/js/lights/RectAreaLightUniformsLib.js","../../../node_modules/pi/js/shaders/GammaCorrectionShader.js"],"sourcesContent":["export default \"static/Tween-5ebfb82307807fdc.js\"","export default \"static/dat.gui.min-24a0d861d5534d62.js\"","export default \"static/pi.min-0272f873b3a4380a.js\"","export default \"static/CopyShader-cde53240fcc3e06e.js\"","export default \"static/EffectComposer-1e936e5d03ff43cc.js\"","export default \"static/RenderPass-bc5df3810a01b2c6.js\"","export default \"static/ShaderPass-31f36160e0ea282d.js\"","export default \"static/LuminosityHighPassShader-dd5826656142421d.js\"","export default \"static/OutlinePass-f4bcd337cdd89b8d.js\"","export default \"static/RectAreaLightUniformsLib-4b74882185efd473.js\"","export default \"static/GammaCorrectionShader-b3b56f244f0d1e0e.js\""],"names":[],"mappings":"8ZAAe,sjqDCAA,4iLCAA,4CCAA,wCCAA,4CCAA,wCCAA,wCCAA,sDCAA,yCCAA,sDCAA"}
1
+ {"version":3,"file":"pixotron-ea1b5c34.legacy.js","sources":["../../../packages/three-build/src/Tween.js","../../../packages/three-build/src/dat.gui.min.js","../../../node_modules/pi/pi.min.js","../../../node_modules/pi/js/shaders/CopyShader.js","../../../node_modules/pi/js/postprocessing/EffectComposer.js","../../../node_modules/pi/js/postprocessing/RenderPass.js","../../../node_modules/pi/js/postprocessing/ShaderPass.js","../../../node_modules/pi/js/shaders/LuminosityHighPassShader.js","../../../node_modules/pi/js/postprocessing/OutlinePass.js","../../../node_modules/pi/js/lights/RectAreaLightUniformsLib.js","../../../node_modules/pi/js/shaders/GammaCorrectionShader.js"],"sourcesContent":["export default \"static/Tween-5ebfb82307807fdc.js\"","export default \"static/dat.gui.min-24a0d861d5534d62.js\"","export default \"static/pi.min-0272f873b3a4380a.js\"","export default \"static/CopyShader-cde53240fcc3e06e.js\"","export default \"static/EffectComposer-1e936e5d03ff43cc.js\"","export default \"static/RenderPass-bc5df3810a01b2c6.js\"","export default \"static/ShaderPass-31f36160e0ea282d.js\"","export default \"static/LuminosityHighPassShader-dd5826656142421d.js\"","export default \"static/OutlinePass-f4bcd337cdd89b8d.js\"","export default \"static/RectAreaLightUniformsLib-4b74882185efd473.js\"","export default \"static/GammaCorrectionShader-b3b56f244f0d1e0e.js\""],"names":[],"mappings":"8ZAAe,8kqDCAA,4iLCAA,4CCAA,wCCAA,4CCAA,wCCAA,wCCAA,sDCAA,yCCAA,sDCAA"}