@roomle/web-sdk 2.105.0-alpha.6 → 2.105.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 (173) hide show
  1. package/lib/{banana-for-scale-2633168c.js → banana-for-scale-33778dbb.js} +2 -2
  2. package/lib/{banana-for-scale-2633168c.js.map → banana-for-scale-33778dbb.js.map} +1 -1
  3. package/lib/{banana-for-scale-7d3eda64.nomodule.js → banana-for-scale-5e2781a3.nomodule.js} +2 -2
  4. package/lib/{banana-for-scale-7d3eda64.nomodule.js.map → banana-for-scale-5e2781a3.nomodule.js.map} +1 -1
  5. package/lib/camera-behaviour-16588b1c.js +2 -0
  6. package/lib/{camera-behaviour-b38936e8.js.map → camera-behaviour-16588b1c.js.map} +1 -1
  7. package/lib/camera-behaviour-dd7a063e.nomodule.js +2 -0
  8. package/lib/{camera-behaviour-d54a163f.nomodule.js.map → camera-behaviour-dd7a063e.nomodule.js.map} +1 -1
  9. package/lib/{component-dimensioning-bfc2cae3.js → component-dimensioning-4ee8f27d.js} +2 -2
  10. package/lib/component-dimensioning-4ee8f27d.js.map +1 -0
  11. package/lib/{component-dimensioning-40501ab3.nomodule.js → component-dimensioning-763769c4.nomodule.js} +2 -2
  12. package/lib/component-dimensioning-763769c4.nomodule.js.map +1 -0
  13. package/lib/{component-raycast-helper-9c21304e.js → component-raycast-helper-7c75e5f0.js} +2 -2
  14. package/lib/component-raycast-helper-7c75e5f0.js.map +1 -0
  15. package/lib/{component-raycast-helper-40bfa0dc.nomodule.js → component-raycast-helper-9e685f1a.nomodule.js} +2 -2
  16. package/lib/component-raycast-helper-9e685f1a.nomodule.js.map +1 -0
  17. package/lib/{configurator-1835defb.js → configurator-cca1c6b9.js} +2 -2
  18. package/lib/configurator-cca1c6b9.js.map +1 -0
  19. package/lib/{configurator-0d266f2d.nomodule.js → configurator-d5e3e975.nomodule.js} +2 -2
  20. package/lib/configurator-d5e3e975.nomodule.js.map +1 -0
  21. package/lib/configurator-main-314fd7d7.js +2 -0
  22. package/lib/configurator-main-314fd7d7.js.map +1 -0
  23. package/lib/configurator-main.nomodule.js +1 -1
  24. package/lib/{continuous-drawing-helper-966ca38e.js → continuous-drawing-helper-18cc6038.js} +2 -2
  25. package/lib/continuous-drawing-helper-18cc6038.js.map +1 -0
  26. package/lib/{continuous-drawing-helper-6f0ede86.nomodule.js → continuous-drawing-helper-7c54ed2c.nomodule.js} +2 -2
  27. package/lib/continuous-drawing-helper-7c54ed2c.nomodule.js.map +1 -0
  28. package/lib/{default-light-setting-dbac7805.js → default-light-setting-427cc173.js} +2 -2
  29. package/lib/default-light-setting-427cc173.js.map +1 -0
  30. package/lib/{default-light-setting-9a50093b.nomodule.js → default-light-setting-b7032eac.nomodule.js} +2 -2
  31. package/lib/default-light-setting-b7032eac.nomodule.js.map +1 -0
  32. package/lib/definitions/common-core/src/utils/threejs-utils.d.ts +1 -1
  33. package/lib/definitions/packages/common-core/src/utils/threejs-utils.d.ts +1 -1
  34. package/lib/{dimensioning-helper-29e6a6ef.nomodule.js → dimensioning-helper-d4726ede.nomodule.js} +2 -2
  35. package/lib/{dimensioning-helper-29e6a6ef.nomodule.js.map → dimensioning-helper-d4726ede.nomodule.js.map} +1 -1
  36. package/lib/{dimensioning-helper-6a37e332.js → dimensioning-helper-d7060dbf.js} +2 -2
  37. package/lib/{dimensioning-helper-6a37e332.js.map → dimensioning-helper-d7060dbf.js.map} +1 -1
  38. package/lib/{glb-viewer-289273d5.js → glb-viewer-56580b03.js} +2 -2
  39. package/lib/{glb-viewer-289273d5.js.map → glb-viewer-56580b03.js.map} +1 -1
  40. package/lib/{glb-viewer-camera-behaviour-7e1b1e90.nomodule.js → glb-viewer-camera-behaviour-67fa46c3.nomodule.js} +2 -2
  41. package/lib/glb-viewer-camera-behaviour-67fa46c3.nomodule.js.map +1 -0
  42. package/lib/{glb-viewer-camera-behaviour-be7c8747.js → glb-viewer-camera-behaviour-bcd098e8.js} +2 -2
  43. package/lib/glb-viewer-camera-behaviour-bcd098e8.js.map +1 -0
  44. package/lib/{glb-viewer-6772ad20.nomodule.js → glb-viewer-fe45c467.nomodule.js} +2 -2
  45. package/lib/{glb-viewer-6772ad20.nomodule.js.map → glb-viewer-fe45c467.nomodule.js.map} +1 -1
  46. package/lib/glb-viewer-main-e1a17a38.js +2 -0
  47. package/lib/glb-viewer-main-e1a17a38.js.map +1 -0
  48. package/lib/glb-viewer-main.nomodule.js +1 -1
  49. package/lib/{imos-ix-poc-export-helper-588a53ab.nomodule.js → imos-ix-poc-export-helper-56fd272c.nomodule.js} +2 -2
  50. package/lib/imos-ix-poc-export-helper-56fd272c.nomodule.js.map +1 -0
  51. package/lib/{imos-ix-poc-export-helper-37572034.js → imos-ix-poc-export-helper-68f83fb7.js} +2 -2
  52. package/lib/imos-ix-poc-export-helper-68f83fb7.js.map +1 -0
  53. package/lib/legacy/{banana-for-scale-5b011d9f.legacy.js → banana-for-scale-2fc610a6.legacy.js} +2 -2
  54. package/lib/legacy/{banana-for-scale-5b011d9f.legacy.js.map → banana-for-scale-2fc610a6.legacy.js.map} +1 -1
  55. package/lib/legacy/camera-behaviour-f5d2fa60.legacy.js +2 -0
  56. package/lib/legacy/{camera-behaviour-2088546c.legacy.js.map → camera-behaviour-f5d2fa60.legacy.js.map} +1 -1
  57. package/lib/legacy/{component-dimensioning-f04cf8d0.legacy.js → component-dimensioning-0224eda5.legacy.js} +2 -2
  58. package/lib/legacy/component-dimensioning-0224eda5.legacy.js.map +1 -0
  59. package/lib/legacy/{component-raycast-helper-967cd80e.legacy.js → component-raycast-helper-6e8975b4.legacy.js} +2 -2
  60. package/lib/legacy/component-raycast-helper-6e8975b4.legacy.js.map +1 -0
  61. package/lib/legacy/{configurator-6d32b749.legacy.js → configurator-0dafcb92.legacy.js} +2 -2
  62. package/lib/legacy/configurator-0dafcb92.legacy.js.map +1 -0
  63. package/lib/legacy/configurator-main.legacy.js +1 -1
  64. package/lib/legacy/{continuous-drawing-helper-6985bc30.legacy.js → continuous-drawing-helper-b2afe8d1.legacy.js} +2 -2
  65. package/lib/legacy/continuous-drawing-helper-b2afe8d1.legacy.js.map +1 -0
  66. package/lib/legacy/{default-light-setting-e6e3c9ef.legacy.js → default-light-setting-05238ba4.legacy.js} +2 -2
  67. package/lib/legacy/default-light-setting-05238ba4.legacy.js.map +1 -0
  68. package/lib/legacy/{dimensioning-helper-1859491f.legacy.js → dimensioning-helper-78fdeba9.legacy.js} +2 -2
  69. package/lib/legacy/{dimensioning-helper-1859491f.legacy.js.map → dimensioning-helper-78fdeba9.legacy.js.map} +1 -1
  70. package/lib/legacy/{glb-viewer-dc032024.legacy.js → glb-viewer-039e52be.legacy.js} +2 -2
  71. package/lib/legacy/{glb-viewer-dc032024.legacy.js.map → glb-viewer-039e52be.legacy.js.map} +1 -1
  72. package/lib/legacy/{glb-viewer-camera-behaviour-9a618475.legacy.js → glb-viewer-camera-behaviour-8a2d4de1.legacy.js} +2 -2
  73. package/lib/legacy/glb-viewer-camera-behaviour-8a2d4de1.legacy.js.map +1 -0
  74. package/lib/legacy/glb-viewer-main.legacy.js +1 -1
  75. package/lib/legacy/{imos-ix-poc-export-helper-e6175ea6.legacy.js → imos-ix-poc-export-helper-eff99220.legacy.js} +2 -2
  76. package/lib/legacy/imos-ix-poc-export-helper-eff99220.legacy.js.map +1 -0
  77. package/lib/legacy/{material-viewer-29935906.legacy.js → material-viewer-75848657.legacy.js} +2 -2
  78. package/lib/legacy/material-viewer-75848657.legacy.js.map +1 -0
  79. package/lib/legacy/material-viewer-main.legacy.js +1 -1
  80. package/lib/legacy/{planner-db6af31d.legacy.js → planner-96b5c06a.legacy.js} +2 -2
  81. package/lib/legacy/{planner-db6af31d.legacy.js.map → planner-96b5c06a.legacy.js.map} +1 -1
  82. package/lib/legacy/planner-main.legacy.js +1 -1
  83. package/lib/legacy/{roomle-configurator-4891f01a.legacy.js → roomle-configurator-88689bbd.legacy.js} +2 -2
  84. package/lib/legacy/{roomle-configurator-4891f01a.legacy.js.map → roomle-configurator-88689bbd.legacy.js.map} +1 -1
  85. package/lib/legacy/{roomle-dependency-injection-5672400b.legacy.js → roomle-dependency-injection-f9e80d9c.legacy.js} +2 -2
  86. package/lib/legacy/{roomle-dependency-injection-5672400b.legacy.js.map → roomle-dependency-injection-f9e80d9c.legacy.js.map} +1 -1
  87. package/lib/legacy/roomle-sdk.legacy.js +1 -1
  88. package/lib/legacy/{script-loader-1e570149.legacy.js → script-loader-c7c8f3b8.legacy.js} +2 -2
  89. package/lib/legacy/script-loader-c7c8f3b8.legacy.js.map +1 -0
  90. package/lib/legacy/{stats-helper-c5311cdc.legacy.js → stats-helper-e205d215.legacy.js} +2 -2
  91. package/lib/legacy/{stats-helper-c5311cdc.legacy.js.map → stats-helper-e205d215.legacy.js.map} +1 -1
  92. package/lib/legacy/{tools-core-26d48a74.legacy.js → tools-core-245e7016.legacy.js} +2 -2
  93. package/lib/legacy/tools-core-245e7016.legacy.js.map +1 -0
  94. package/lib/{material-viewer-28079735.nomodule.js → material-viewer-75a6946b.nomodule.js} +2 -2
  95. package/lib/material-viewer-75a6946b.nomodule.js.map +1 -0
  96. package/lib/{material-viewer-e3e02a19.js → material-viewer-b7225b36.js} +2 -2
  97. package/lib/material-viewer-b7225b36.js.map +1 -0
  98. package/lib/material-viewer-main-5d9fad42.js +2 -0
  99. package/lib/material-viewer-main-5d9fad42.js.map +1 -0
  100. package/lib/material-viewer-main.nomodule.js +1 -1
  101. package/lib/{planner-04496cd9.js → planner-0d5b3552.js} +2 -2
  102. package/lib/{planner-04496cd9.js.map → planner-0d5b3552.js.map} +1 -1
  103. package/lib/{planner-6bde1857.nomodule.js → planner-47be9e18.nomodule.js} +2 -2
  104. package/lib/{planner-6bde1857.nomodule.js.map → planner-47be9e18.nomodule.js.map} +1 -1
  105. package/lib/planner-main-6a885050.js +2 -0
  106. package/lib/planner-main-6a885050.js.map +1 -0
  107. package/lib/planner-main.nomodule.js +1 -1
  108. package/lib/{roomle-configurator-6b12a452.nomodule.js → roomle-configurator-20693b9d.nomodule.js} +2 -2
  109. package/lib/{roomle-configurator-6b12a452.nomodule.js.map → roomle-configurator-20693b9d.nomodule.js.map} +1 -1
  110. package/lib/{roomle-configurator-fee84062.js → roomle-configurator-b014274e.js} +2 -2
  111. package/lib/{roomle-configurator-fee84062.js.map → roomle-configurator-b014274e.js.map} +1 -1
  112. package/lib/{roomle-dependency-injection-04bee035.js → roomle-dependency-injection-40c9e584.js} +2 -2
  113. package/lib/{roomle-dependency-injection-04bee035.js.map → roomle-dependency-injection-40c9e584.js.map} +1 -1
  114. package/lib/{roomle-dependency-injection-f5a3c39f.nomodule.js → roomle-dependency-injection-e3763cd6.nomodule.js} +2 -2
  115. package/lib/{roomle-dependency-injection-f5a3c39f.nomodule.js.map → roomle-dependency-injection-e3763cd6.nomodule.js.map} +1 -1
  116. package/lib/{roomle-sdk-4657770f.js → roomle-sdk-b7447e02.js} +2 -2
  117. package/lib/roomle-sdk-b7447e02.js.map +1 -0
  118. package/lib/roomle-sdk.nomodule.js +1 -1
  119. package/lib/{script-loader-df273d31.js → script-loader-01e992f9.js} +2 -2
  120. package/lib/script-loader-01e992f9.js.map +1 -0
  121. package/lib/{script-loader-ac74eccd.nomodule.js → script-loader-fa13d1f5.nomodule.js} +2 -2
  122. package/lib/script-loader-fa13d1f5.nomodule.js.map +1 -0
  123. package/lib/{stats-helper-94a8807b.nomodule.js → stats-helper-d2c22957.nomodule.js} +2 -2
  124. package/lib/{stats-helper-94a8807b.nomodule.js.map → stats-helper-d2c22957.nomodule.js.map} +1 -1
  125. package/lib/{stats-helper-f1462964.js → stats-helper-dccf2916.js} +2 -2
  126. package/lib/{stats-helper-f1462964.js.map → stats-helper-dccf2916.js.map} +1 -1
  127. package/lib/{tools-core-e655b76b.nomodule.js → tools-core-262d0573.nomodule.js} +2 -2
  128. package/lib/tools-core-262d0573.nomodule.js.map +1 -0
  129. package/lib/{tools-core-bd3d5c0b.js → tools-core-290dd27f.js} +2 -2
  130. package/lib/tools-core-290dd27f.js.map +1 -0
  131. package/package.json +2 -2
  132. package/lib/camera-behaviour-b38936e8.js +0 -2
  133. package/lib/camera-behaviour-d54a163f.nomodule.js +0 -2
  134. package/lib/component-dimensioning-40501ab3.nomodule.js.map +0 -1
  135. package/lib/component-dimensioning-bfc2cae3.js.map +0 -1
  136. package/lib/component-raycast-helper-40bfa0dc.nomodule.js.map +0 -1
  137. package/lib/component-raycast-helper-9c21304e.js.map +0 -1
  138. package/lib/configurator-0d266f2d.nomodule.js.map +0 -1
  139. package/lib/configurator-1835defb.js.map +0 -1
  140. package/lib/configurator-main-08e2552a.js +0 -2
  141. package/lib/configurator-main-08e2552a.js.map +0 -1
  142. package/lib/continuous-drawing-helper-6f0ede86.nomodule.js.map +0 -1
  143. package/lib/continuous-drawing-helper-966ca38e.js.map +0 -1
  144. package/lib/default-light-setting-9a50093b.nomodule.js.map +0 -1
  145. package/lib/default-light-setting-dbac7805.js.map +0 -1
  146. package/lib/glb-viewer-camera-behaviour-7e1b1e90.nomodule.js.map +0 -1
  147. package/lib/glb-viewer-camera-behaviour-be7c8747.js.map +0 -1
  148. package/lib/glb-viewer-main-5f614eaa.js +0 -2
  149. package/lib/glb-viewer-main-5f614eaa.js.map +0 -1
  150. package/lib/imos-ix-poc-export-helper-37572034.js.map +0 -1
  151. package/lib/imos-ix-poc-export-helper-588a53ab.nomodule.js.map +0 -1
  152. package/lib/legacy/camera-behaviour-2088546c.legacy.js +0 -2
  153. package/lib/legacy/component-dimensioning-f04cf8d0.legacy.js.map +0 -1
  154. package/lib/legacy/component-raycast-helper-967cd80e.legacy.js.map +0 -1
  155. package/lib/legacy/configurator-6d32b749.legacy.js.map +0 -1
  156. package/lib/legacy/continuous-drawing-helper-6985bc30.legacy.js.map +0 -1
  157. package/lib/legacy/default-light-setting-e6e3c9ef.legacy.js.map +0 -1
  158. package/lib/legacy/glb-viewer-camera-behaviour-9a618475.legacy.js.map +0 -1
  159. package/lib/legacy/imos-ix-poc-export-helper-e6175ea6.legacy.js.map +0 -1
  160. package/lib/legacy/material-viewer-29935906.legacy.js.map +0 -1
  161. package/lib/legacy/script-loader-1e570149.legacy.js.map +0 -1
  162. package/lib/legacy/tools-core-26d48a74.legacy.js.map +0 -1
  163. package/lib/material-viewer-28079735.nomodule.js.map +0 -1
  164. package/lib/material-viewer-e3e02a19.js.map +0 -1
  165. package/lib/material-viewer-main-7df74726.js +0 -2
  166. package/lib/material-viewer-main-7df74726.js.map +0 -1
  167. package/lib/planner-main-624e6e13.js +0 -2
  168. package/lib/planner-main-624e6e13.js.map +0 -1
  169. package/lib/roomle-sdk-4657770f.js.map +0 -1
  170. package/lib/script-loader-ac74eccd.nomodule.js.map +0 -1
  171. package/lib/script-loader-df273d31.js.map +0 -1
  172. package/lib/tools-core-bd3d5c0b.js.map +0 -1
  173. package/lib/tools-core-e655b76b.nomodule.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{bK as download}from"./main-thread-to-worker-b1fa75c7.js";import{a5 as convertCObject}from"./roomle-dependency-injection-04bee035.js";const createVector3fString=(e,t)=>`${e.x.toFixed(t)},${e.y.toFixed(t)},${e.z.toFixed(t)}`,createSectionFromArray=(e,t)=>{let r="";for(let o=0;o<t.length;o++)r+=`<${e}${o+1}>${t[o]}</${e}${o+1}>\n `;return r},createHomagIxXml=(e={},t={},r={},o)=>{return`<?xml version="1.0" encoding="UTF-8"?>\n <XML type="ListBuilder">\n <Order No="${e.orderNumber}" DispDate="${e.dispatchDate}" Basket="${e.basketNumber}">\n ${n=t,`<Head>\n <COMM>${n.comm}</COMM>\n <ARTICLENO>${n.articleno}</ARTICLENO>\n <CUSTOMER>${n.customer}</CUSTOMER>\n <RETAILER>${n.retailer}</RETAILER>\n <CLIENT>${n.client}</CLIENT>\n <PROGRAM>${n.program}</PROGRAM>\n <EMPLOYEE>${n.employee}</EMPLOYEE>\n <TEXT_LONG>${n.textLong}</TEXT_LONG>\n <TEXT_SHORT>${n.textShort}</TEXT_SHORT>\n\n ${createSectionFromArray("COLOUR",n.colour)}\n ${createSectionFromArray("INFO",n.info)}\n ${createSectionFromArray("ADDRESS",n.address)}\n ${createSectionFromArray("BILLING_ADDRESS",n.billingAddress)}\n ${createSectionFromArray("SHIPPING_ADDRESS",n.shippingAddress)}\n ${createSectionFromArray("ORDER_PRICE_INFO",n.orderPriceInfo)}\n ${createSectionFromArray("CUSTOM_INFO",n.customInfo)}\n </Head>`}\n <BuilderList>\n ${((e={},t)=>{let r="";for(let a=0;a<t.length;a++)r+=`<Set LineNo="${a+1}">${o=e,n=t[a],`\n <Pname>${n.name}</Pname>\n <Count>${n.count}</Count>\n <PVarString>${n.attributes}</PVarString>\n <ARTICLE_TEXT_INFO1>${o.articleTextInfo1||""}</ARTICLE_TEXT_INFO1>\n <ARTICLE_TEXT_INFO2>${o.articleTextInfo2||""}</ARTICLE_TEXT_INFO2>\n <ARTICLE_PRICE_INFO1>${o.articlePriceInfo1||""}</ARTICLE_PRICE_INFO1>\n <ARTICLE_PRICE_INFO2>${o.articlePriceInfo2||""}</ARTICLE_PRICE_INFO2>\n <ARTICLE_PRICE_INFO3>${o.articlePriceInfo3||""}</ARTICLE_PRICE_INFO3>\n <Pinsertion>${createVector3fString(n.position,2)}</Pinsertion>\n <POrntation>${createVector3fString(n.rotation,2)}</POrntation>\n <DeliveryPeriod>${o.deliveryPeriod||""}</DeliveryPeriod>\n <LIEFERANT>${o.supplier||""}</LIEFERANT>\n <Mengenrabatt>${o.discount||0}</Mengenrabatt>\n <MengenrabattAbs>${o.discountAbs||""}</MengenrabattAbs>\n `}</Set>\n `;var o,n;return r})(r,o.articles)}\n </BuilderList>\n </Order>\n </XML>\n `;var n},getFakeOrderParams=()=>{const e=Math.floor(1e6*Math.random()).toString();return{orderNumber:"Order "+e,dispatchDate:"9/11/1911",basketNumber:e}},getFakeHeaderParams=()=>({comm:"Rubens2Rembrand",articleno:"ExampleSIM",customer:"Roomle",retailer:"Retail",client:"Ex ClientName",program:"program",employee:"Homag",textLong:"long long long txt",textShort:"short txt",colour:["colour1","colour2","colour3","colour4","colour5"],info:["1Admin","2Firma_ABC","3Adresse_ABC","4PLZ_ABC","5Stadt_ABC","6","7","8","9","10","11","12"],address:["Admin","Firma_ABC","Adresse_ABC","PLZ_ABC","Stadt_ABC","Kundennummer_ABC","Land_ABC"],billingAddress:["Optional1","Optional2","Optional3","Optional4","Optional5","Optional6"],shippingAddress:["opt","opt","opt","opt","opt","opt"],orderPriceInfo:["000","Price002","Price003","Price004","Price005"],customInfo:["CustInf1","CustInf2","CustInf3","CustInf4","CustInf5","CustInf6","CustInf7","CustInf8","CustInf9","CustInf10"]}),getFakeArticleParams=()=>({}),downloadHomagIxExportPoC=async(e,t,r)=>{const o=convertCObject(e.objects);let n=[];for(const e of o){const o=e.configurationRuntimeId;try{const e=JSON.parse(t.generateExport(2,o,r));n=n.concat(e.articles)}catch(e){return console.error(e),Promise.reject("Could not create export JSON 2")}}const a=getFakeOrderParams(),i=createHomagIxXml(a,{comm:"Rubens2Rembrand",articleno:"ExampleSIM",customer:"Roomle",retailer:"Retail",client:"Ex ClientName",program:"program",employee:"Homag",textLong:"long long long txt",textShort:"short txt",colour:["colour1","colour2","colour3","colour4","colour5"],info:["1Admin","2Firma_ABC","3Adresse_ABC","4PLZ_ABC","5Stadt_ABC","6","7","8","9","10","11","12"],address:["Admin","Firma_ABC","Adresse_ABC","PLZ_ABC","Stadt_ABC","Kundennummer_ABC","Land_ABC"],billingAddress:["Optional1","Optional2","Optional3","Optional4","Optional5","Optional6"],shippingAddress:["opt","opt","opt","opt","opt","opt"],orderPriceInfo:["000","Price002","Price003","Price004","Price005"],customInfo:["CustInf1","CustInf2","CustInf3","CustInf4","CustInf5","CustInf6","CustInf7","CustInf8","CustInf9","CustInf10"]},{},{articles:n});return download("IMOSiX.xml",i),Promise.resolve()},generateExportHomagIxConfiguration=async(e,t,r,o,n="")=>{try{return r.setDefaultExportDataDefinition(n),Promise.resolve(JSON.parse(r.generateExport(t,e,o)))}catch(e){return console.error(e),Promise.reject("Could not create export JSON "+t)}},homagIxMockUpData=(e,t={},r={},o={})=>(t=getFakeOrderParams(),createHomagIxXml(t,{comm:"Rubens2Rembrand",articleno:"ExampleSIM",customer:"Roomle",retailer:"Retail",client:"Ex ClientName",program:"program",employee:"Homag",textLong:"long long long txt",textShort:"short txt",colour:["colour1","colour2","colour3","colour4","colour5"],info:["1Admin","2Firma_ABC","3Adresse_ABC","4PLZ_ABC","5Stadt_ABC","6","7","8","9","10","11","12"],address:["Admin","Firma_ABC","Adresse_ABC","PLZ_ABC","Stadt_ABC","Kundennummer_ABC","Land_ABC"],billingAddress:["Optional1","Optional2","Optional3","Optional4","Optional5","Optional6"],shippingAddress:["opt","opt","opt","opt","opt","opt"],orderPriceInfo:["000","Price002","Price003","Price004","Price005"],customInfo:["CustInf1","CustInf2","CustInf3","CustInf4","CustInf5","CustInf6","CustInf7","CustInf8","CustInf9","CustInf10"]},{},e));export{createHomagIxXml,downloadHomagIxExportPoC,generateExportHomagIxConfiguration,getFakeArticleParams,getFakeHeaderParams,getFakeOrderParams,homagIxMockUpData};
2
- //# sourceMappingURL=imos-ix-poc-export-helper-37572034.js.map
1
+ import{bK as download}from"./main-thread-to-worker-b1fa75c7.js";import{a5 as convertCObject}from"./roomle-dependency-injection-40c9e584.js";const createVector3fString=(e,t)=>`${e.x.toFixed(t)},${e.y.toFixed(t)},${e.z.toFixed(t)}`,createSectionFromArray=(e,t)=>{let r="";for(let o=0;o<t.length;o++)r+=`<${e}${o+1}>${t[o]}</${e}${o+1}>\n `;return r},createHomagIxXml=(e={},t={},r={},o)=>{return`<?xml version="1.0" encoding="UTF-8"?>\n <XML type="ListBuilder">\n <Order No="${e.orderNumber}" DispDate="${e.dispatchDate}" Basket="${e.basketNumber}">\n ${n=t,`<Head>\n <COMM>${n.comm}</COMM>\n <ARTICLENO>${n.articleno}</ARTICLENO>\n <CUSTOMER>${n.customer}</CUSTOMER>\n <RETAILER>${n.retailer}</RETAILER>\n <CLIENT>${n.client}</CLIENT>\n <PROGRAM>${n.program}</PROGRAM>\n <EMPLOYEE>${n.employee}</EMPLOYEE>\n <TEXT_LONG>${n.textLong}</TEXT_LONG>\n <TEXT_SHORT>${n.textShort}</TEXT_SHORT>\n\n ${createSectionFromArray("COLOUR",n.colour)}\n ${createSectionFromArray("INFO",n.info)}\n ${createSectionFromArray("ADDRESS",n.address)}\n ${createSectionFromArray("BILLING_ADDRESS",n.billingAddress)}\n ${createSectionFromArray("SHIPPING_ADDRESS",n.shippingAddress)}\n ${createSectionFromArray("ORDER_PRICE_INFO",n.orderPriceInfo)}\n ${createSectionFromArray("CUSTOM_INFO",n.customInfo)}\n </Head>`}\n <BuilderList>\n ${((e={},t)=>{let r="";for(let a=0;a<t.length;a++)r+=`<Set LineNo="${a+1}">${o=e,n=t[a],`\n <Pname>${n.name}</Pname>\n <Count>${n.count}</Count>\n <PVarString>${n.attributes}</PVarString>\n <ARTICLE_TEXT_INFO1>${o.articleTextInfo1||""}</ARTICLE_TEXT_INFO1>\n <ARTICLE_TEXT_INFO2>${o.articleTextInfo2||""}</ARTICLE_TEXT_INFO2>\n <ARTICLE_PRICE_INFO1>${o.articlePriceInfo1||""}</ARTICLE_PRICE_INFO1>\n <ARTICLE_PRICE_INFO2>${o.articlePriceInfo2||""}</ARTICLE_PRICE_INFO2>\n <ARTICLE_PRICE_INFO3>${o.articlePriceInfo3||""}</ARTICLE_PRICE_INFO3>\n <Pinsertion>${createVector3fString(n.position,2)}</Pinsertion>\n <POrntation>${createVector3fString(n.rotation,2)}</POrntation>\n <DeliveryPeriod>${o.deliveryPeriod||""}</DeliveryPeriod>\n <LIEFERANT>${o.supplier||""}</LIEFERANT>\n <Mengenrabatt>${o.discount||0}</Mengenrabatt>\n <MengenrabattAbs>${o.discountAbs||""}</MengenrabattAbs>\n `}</Set>\n `;var o,n;return r})(r,o.articles)}\n </BuilderList>\n </Order>\n </XML>\n `;var n},getFakeOrderParams=()=>{const e=Math.floor(1e6*Math.random()).toString();return{orderNumber:"Order "+e,dispatchDate:"9/11/1911",basketNumber:e}},getFakeHeaderParams=()=>({comm:"Rubens2Rembrand",articleno:"ExampleSIM",customer:"Roomle",retailer:"Retail",client:"Ex ClientName",program:"program",employee:"Homag",textLong:"long long long txt",textShort:"short txt",colour:["colour1","colour2","colour3","colour4","colour5"],info:["1Admin","2Firma_ABC","3Adresse_ABC","4PLZ_ABC","5Stadt_ABC","6","7","8","9","10","11","12"],address:["Admin","Firma_ABC","Adresse_ABC","PLZ_ABC","Stadt_ABC","Kundennummer_ABC","Land_ABC"],billingAddress:["Optional1","Optional2","Optional3","Optional4","Optional5","Optional6"],shippingAddress:["opt","opt","opt","opt","opt","opt"],orderPriceInfo:["000","Price002","Price003","Price004","Price005"],customInfo:["CustInf1","CustInf2","CustInf3","CustInf4","CustInf5","CustInf6","CustInf7","CustInf8","CustInf9","CustInf10"]}),getFakeArticleParams=()=>({}),downloadHomagIxExportPoC=async(e,t,r)=>{const o=convertCObject(e.objects);let n=[];for(const e of o){const o=e.configurationRuntimeId;try{const e=JSON.parse(t.generateExport(2,o,r));n=n.concat(e.articles)}catch(e){return console.error(e),Promise.reject("Could not create export JSON 2")}}const a=getFakeOrderParams(),i=createHomagIxXml(a,{comm:"Rubens2Rembrand",articleno:"ExampleSIM",customer:"Roomle",retailer:"Retail",client:"Ex ClientName",program:"program",employee:"Homag",textLong:"long long long txt",textShort:"short txt",colour:["colour1","colour2","colour3","colour4","colour5"],info:["1Admin","2Firma_ABC","3Adresse_ABC","4PLZ_ABC","5Stadt_ABC","6","7","8","9","10","11","12"],address:["Admin","Firma_ABC","Adresse_ABC","PLZ_ABC","Stadt_ABC","Kundennummer_ABC","Land_ABC"],billingAddress:["Optional1","Optional2","Optional3","Optional4","Optional5","Optional6"],shippingAddress:["opt","opt","opt","opt","opt","opt"],orderPriceInfo:["000","Price002","Price003","Price004","Price005"],customInfo:["CustInf1","CustInf2","CustInf3","CustInf4","CustInf5","CustInf6","CustInf7","CustInf8","CustInf9","CustInf10"]},{},{articles:n});return download("IMOSiX.xml",i),Promise.resolve()},generateExportHomagIxConfiguration=async(e,t,r,o,n="")=>{try{return r.setDefaultExportDataDefinition(n),Promise.resolve(JSON.parse(r.generateExport(t,e,o)))}catch(e){return console.error(e),Promise.reject("Could not create export JSON "+t)}},homagIxMockUpData=(e,t={},r={},o={})=>(t=getFakeOrderParams(),createHomagIxXml(t,{comm:"Rubens2Rembrand",articleno:"ExampleSIM",customer:"Roomle",retailer:"Retail",client:"Ex ClientName",program:"program",employee:"Homag",textLong:"long long long txt",textShort:"short txt",colour:["colour1","colour2","colour3","colour4","colour5"],info:["1Admin","2Firma_ABC","3Adresse_ABC","4PLZ_ABC","5Stadt_ABC","6","7","8","9","10","11","12"],address:["Admin","Firma_ABC","Adresse_ABC","PLZ_ABC","Stadt_ABC","Kundennummer_ABC","Land_ABC"],billingAddress:["Optional1","Optional2","Optional3","Optional4","Optional5","Optional6"],shippingAddress:["opt","opt","opt","opt","opt","opt"],orderPriceInfo:["000","Price002","Price003","Price004","Price005"],customInfo:["CustInf1","CustInf2","CustInf3","CustInf4","CustInf5","CustInf6","CustInf7","CustInf8","CustInf9","CustInf10"]},{},e));export{createHomagIxXml,downloadHomagIxExportPoC,generateExportHomagIxConfiguration,getFakeArticleParams,getFakeHeaderParams,getFakeOrderParams,homagIxMockUpData};
2
+ //# sourceMappingURL=imos-ix-poc-export-helper-68f83fb7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imos-ix-poc-export-helper-68f83fb7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-5672400b.legacy.js","./main-thread-to-worker-83f62641.legacy.js"],(function(e){var n,t,a,s,i;return{setters:[function(e){n=e.b5,t=e._,a=e.i},function(e){s=e.g,i=e.a}],execute:function(){class c extends n{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(s()+"static/banana-bbcc0e46fc0ee694.glb").then(e=>{this._banana=e.scene,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new i),n=this._bounds.getCenter(new i).clone();n.x-=e.x/2+.18,n.z+=e.z/2+.05,n.y=0;let t=.1;this._banana.scale.copy(new i(t,t,t)),this._banana.rotation.y=.6,this._banana.position.copy(n)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,n){super.clearScene(e,n),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}e("default",c),t([a],c.prototype,"_staticItemLoader",void 0)}}}));
2
- //# sourceMappingURL=banana-for-scale-5b011d9f.legacy.js.map
1
+ System.register(["./roomle-dependency-injection-f9e80d9c.legacy.js","./main-thread-to-worker-83f62641.legacy.js"],(function(e){var n,t,a,s,i;return{setters:[function(e){n=e.b5,t=e._,a=e.i},function(e){s=e.g,i=e.a}],execute:function(){class c extends n{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(s()+"static/banana-bbcc0e46fc0ee694.glb").then(e=>{this._banana=e.scene,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new i),n=this._bounds.getCenter(new i).clone();n.x-=e.x/2+.18,n.z+=e.z/2+.05,n.y=0;let t=.1;this._banana.scale.copy(new i(t,t,t)),this._banana.rotation.y=.6,this._banana.position.copy(n)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,n){super.clearScene(e,n),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}e("default",c),t([a],c.prototype,"_staticItemLoader",void 0)}}}));
2
+ //# sourceMappingURL=banana-for-scale-2fc610a6.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"banana-for-scale-5b011d9f.legacy.js","sources":["../../../packages/configurator-core/public/geometry/banana.glb"],"sourcesContent":["export default \"static/banana-bbcc0e46fc0ee694.glb\""],"names":[],"mappings":"yTAAe"}
1
+ {"version":3,"file":"banana-for-scale-2fc610a6.legacy.js","sources":["../../../packages/configurator-core/public/geometry/banana.glb"],"sourcesContent":["export default \"static/banana-bbcc0e46fc0ee694.glb\""],"names":[],"mappings":"yTAAe"}
@@ -0,0 +1,2 @@
1
+ System.register(["./roomle-dependency-injection-f9e80d9c.legacy.js","./main-thread-to-worker-83f62641.legacy.js"],(function(t,e){var i,s,n,a,o,r,h,l,c,d,_,m,u,g,p,v,f,y,w,b,x,M,C,P,S,L,D,E,I,k,B,R,z,A,T,O,F,j,U,H,q,N,G,Z,V,W,K,Y,X,Q,J,$,tt,et,it,st,nt,at,ot,rt,ht,lt,ct,dt,_t,mt,ut,gt,pt,vt,ft,yt,wt,bt,xt,Mt,Ct,Pt,St,Lt,Dt,Et,It,kt,Bt,Rt,zt,At,Tt,Ot,Ft,jt,Ut,Ht,qt,Nt,Gt,Zt,Vt,Wt,Kt,Yt;return{setters:[function(t){i=t._,s=t.i,n=t.E,a=t.z,o=t.a7,r=t.a8,h=t.v,l=t.X,c=t.Z,d=t.c,_=t.a9,m=t.aa,u=t.ab,g=t.ac,p=t.ad,v=t.ae,f=t.x,y=t.af,w=t.ag,b=t.ah,x=t.k,M=t.y,C=t.s,P=t.ai,S=t.m,L=t.aj,D=t.ak,E=t.n,I=t.al,k=t.am,B=t.an,R=t.ao,z=t.ap,A=t.aq,T=t.ar,O=t.as,F=t.at,j=t.au,U=t.av,H=t.U,q=t.K},function(t){N=t.a,G=t.J,Z=t.bQ,V=t.V,W=t.bS,K=t.al,Y=t.bX,X=t.Q,Q=t.ao,J=t.aK,$=t.l,tt=t.t,et=t.C,it=t.bY,st=t.x,nt=t.Y,at=t.y,ot=t.b7,rt=t.bZ,ht=t.aY,lt=t.ak,ct=t.B,dt=t.b_,_t=t.b$,mt=t.O,ut=t.c0,gt=t.c1,pt=t.c2,vt=t.ad,ft=t.c3,yt=t.q,wt=t.u,bt=t.b6,xt=t.S,Mt=t.A,Ct=t.D,Pt=t.R,St=t._,Lt=t.e,Dt=t.k,Et=t.a$,It=t.a0,kt=t.h,Bt=t.bi,Rt=t.b8,zt=t.s,At=t.c4,Tt=t.ax,Ot=t.aw,Ft=t.az,jt=t.ap,Ut=t.ag,Ht=t.at,qt=t.K,Nt=t.c5,Gt=t.bW,Zt=t.bL,Vt=t.j,Wt=t.bw,Kt=t.bU,Yt=t.c6}],execute:function(){t("R",ie),t("T","static/Tween-d57ee5d181fce582.js");class Xt extends n{constructor(t,e,i){var s,n;if(super(),this._tweenEnd=null,this._cameraStandingStill=!0,this._distance=-1,this._locked=!1,this._inputListeners=[],this._lerpEnabled=!0,this._creator_=t,this._inputManager=e,this._initInputListener(),this._addInputListeners(),this._cameraPosition=new N,this._targetPosition=new N,i?this.setCurrentCameraParameters(i):(this._cameraPosition=new N(0,.5,3),this._pitch=a(null!==(s=this._initData.verticalCameraAngle)&&void 0!==s?s:10),this._yaw=a(null!==(n=this._initData.horizontalCameraAngle)&&void 0!==n?n:-30)),this._initData.debug&&this._getCamera()instanceof G){const t=this.getDebugCameraPosition();t&&this.setCurrentCameraParameters(t)}let o=this._domHelper.getClientDimensions();this._width=o.x,this._height=o.y,this._dispatchCameraIdle=Z(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)})}setUp(){this._inputListeners.length&&this._inputManager.hasEventListener(this._inputListeners[0].key,this._inputListeners[0].fun,this)||this._addInputListeners()}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||this._globalInitData.e2e)this.getCamera().position.copy(e);else{let i=this.getCamera().position.clone();const s=Math.min(10*t,1);i.lerp(e,s),this.getCamera().position.copy(i)}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)}_tweenCameraParameter(t,e,i=!1){return this._globalInitData.e2e||!this._initData.animateCamera?(this.dispatchEvent(0,3),this.dispatchEvent(1,3),this._yaw=e.yaw,this._pitch=e.pitch,this._distance=e.distance,this._setCameraNear(),this._update(new N(e.targetX,e.targetY,e.targetZ),i),this.dispatchEvent(1,3),this.dispatchEvent(2,3),this.dispatchEvent(8,3),Promise.resolve()):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 N(t.targetX,t.targetY,t.targetZ),i,!0)}).onComplete(()=>{this.dispatchEvent(2,3),this._dispatchCameraIdle(),this._tweenEnd=null,s()}).start(),this.dispatchEvent(0,3)}})}_setCameraNear(){const t=this.getCamera();if(t instanceof G){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){var e,i,s;this._yaw=null!==(e=t.yaw)&&void 0!==e?e:0,this._pitch=null!==(i=t.pitch)&&void 0!==i?i:0,this._distance=null!==(s=t.distance)&&void 0!==s?s:0,this._targetPosition.copy(new N(t.targetX,t.targetY,t.targetZ)),this._update(null,!0,!0)}_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}async setToState(t,e){await 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 N(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 G&&e>i.far&&(i.far=e+1)}setBounds(t){this._boundingBox=t}get domHelper(){return this._domHelper}}t("a",Xt),i([s],Xt.prototype,"_domHelper",void 0),i([s],Xt.prototype,"_initData",void 0),i([s],Xt.prototype,"_globalInitData",void 0);class Qt{constructor(t,e){this.minZoom=!1,this.maxZoom=!1,this.minZoom=t,this.maxZoom=e}}t("D",2.725);class Jt extends Xt{constructor(t,e,i,s){super(t,e,i),this._bounds=new N,this._scale=1,this._state=0,this._zoomSpeed=Math.pow(.95,3),this.minDistance=0,this.maxDistance=5,this.minPolarAngle=a(0),this.maxPolarAngle=a(85),this._objectRotation=0,this._lookAtSide=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._camera.fov=30,this._targetPosition||(this._targetPosition=new N(0,0,0),this._targetPositionIsPanned=!1);const{cameraRestriction:n,zoomDistance:o,minVerticalCameraAngle:r,maxVerticalCameraAngle:h,minHorizontalCameraAngle:l,maxHorizontalCameraAngle:c}=this._initData;if(o&&(this._zoomDistance=o/100),void 0!==r&&(this.minPolarAngle=a(r<0?r:-1*r)),void 0!==h&&(this.maxPolarAngle=a(h)),void 0!==l&&(this.minAzimuthAngle=a(l<0?l:-1*l)),void 0!==c&&(this.maxAzimuthAngle=a(c)),void 0!==n){let t=Math.abs(a(n));this.minAzimuthAngle=-t,this.maxAzimuthAngle=t,this.maxPolarAngle=Math.min(t,a(85))}this._update()}_getCamera(){return this._camera||this._initCamera(),this._camera}getCamera(){return super.getCamera()}_initCamera(){this._camera=new G,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,e=0){this._objectRotation=t,this._lookAtSide=e}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 V(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 V(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),n=Math.max(2,4*(1-this._distance/this.maxDistance));s.x=s.x-e.x/i.clientHeight*n,s.y=s.y+e.y/i.clientHeight*n,this._targetPositionIsPanned=!0,this._targetPosition.copy(s.unproject(this._camera))}_pan(t,e){this._lerpEnabled=!1,this._orbitPosition||(this._orbitPosition=new V(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 V(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)}adjustToBoundsWithoutChangingDistance(t){this.setBounds(t);const e=t.getSize(new N);if(this._initData.debug||e.x+e.y+e.z===0)return;const i=this.getCurrentCameraParameters(),s=t.getCenter(new N);this._setDistanceAndRangesBasedOnBounds(e,!1);const n={yaw:i.yaw,pitch:i.pitch,distance:this._distance,targetX:s.x,targetY:s.y,targetZ:s.z};W(i,n)||this._tweenCameraParameter(i,n,!1)}zoomToFitBounds(t,e=!0){this.setBounds(t);const i=t.getSize(new N);if(this._initData.debug||i.x+i.y+i.z===0)return;const s=this.getCurrentCameraParameters(),n=t.getCenter(new N),a=this._setDistanceAndRangesBasedOnBounds(i);this._checkZoomDistance(t,a);const o={yaw:e?this._yaw:s.yaw,pitch:e?this._pitch:s.pitch,distance:a,targetX:n.x,targetY:n.y,targetZ:n.z};W(s,o)||this._tweenCameraParameter(s,o,!1)}updateToBounds(t,e,i=!0,s){if(this.setBounds(t),this._initData.debug)return;const n=t.getCenter(new N);s?(this._targetPosition=s.clone(),this._targetPositionIsPanned=!1):this._targetPositionIsPanned||(this._targetPosition=new N(n.x,n.y,n.z));const a=this.getCurrentCameraParameters(),o=t.getSize(new N);if(i){const i=this._setDistanceAndRangesBasedOnBounds(o);this._distance=i,this._checkZoomDistance(t,i),this._userInteraction?this._tweenCameraParameter(a,{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 K);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{offsetWidth:i,offsetHeight:s}=this._getOffset();this._bounds.copy(t);const{cameraSpacing:n}=this._initData;t.addScalar(n/100),this.minDistance=Math.sqrt(t.x*t.x+t.y*t.y+t.z*t.z);const a=Math.max(t.x,t.y),{x:o,y:r}=this._getMargin(i,s),h=l(t.x+o,t.y+r,t.z,this._camera.fov,i,s);return this._distance<h&&e&&(this._distance=h),this.maxDistance=h+a,this.maxDistance<2&&(this.maxDistance=2),this._camera.far=5*this.maxDistance,this._setCameraNear(),h}_getIdealDistance(){const{offsetWidth:t,offsetHeight:e}=this._getOffset(),{x:i,y:s}=this._getMargin(t,e);return l(this._bounds.x+i,this._bounds.y+s,this._bounds.z,this._camera.fov,t,e)}_getOffset(){const t=this._domHelper.getClientDimensions(),e=t.x,i=t.y;return{offsetWidth:this._camera.offset?e-e*this._camera.offset.left-e*(1-this._camera.offset.right):e,offsetHeight:this._camera.offset?i-i*this._camera.offset.bottom-i*(1-this._camera.offset.top):i}}_getMargin(t,e){const i=Math.max(this._bounds.x,this._bounds.y);let s=i>3?0:this._bounds.x/2,n=i>3?0:this._bounds.y/2;return t>1080&&(s+=i<.3?.1:0,s+=(i>3?0:this._bounds.x)*(t/1080-1)),e>1080&&(s+=i<.3?.1:0,n+=(i>3?0:this._bounds.y)*(e/1080-1)),{x:s,y:n}}reset(t,e,i,s,n=!0){var o,r;const h=t.getSize(new N);if(h){if(e)this._targetPosition.copy(e);else{const e=t.getCenter(new N);this._targetPosition.copy(e)}const l=this.getCurrentCameraParameters();if(i||(i=null!==(o=this._initData.horizontalCameraAngle)&&void 0!==o?o:-30),s||(s=null!==(r=this._initData.verticalCameraAngle)&&void 0!==r?r:10),i+=c(this._objectRotation),this._initData.debug)return this._distance=this._setDistanceAndRangesBasedOnBounds(h),this._update(this._targetPosition),void this._setDistanceAndRangesBasedOnBounds(h);const d=this._setDistanceAndRangesBasedOnBounds(h),_=a(s),m=a(i);let u=this._targetPosition.clone();n?this._tweenCameraParameter(l,{yaw:m,pitch:_,distance:d,targetX:u.x,targetY:u.y,targetZ:u.z},!0):(this._pitch=_,this._yaw=m,this._distance=d,this._update(this._targetPosition))}else console.warn("you cant reset without bounds!")}updateDistanceAndRangesBasedOnBounds(t){if(!t)return;const e=t.getSize(new N),i=t.getCenter(new N);this.setBounds(t),this._targetPosition.copy(i),this._setDistanceAndRangesBasedOnBounds(e,!1)}async updateAndReset(t,e=!0){var i,s;const n=t.getSize(new N),o=t.getCenter(new N);this.setBounds(t),this._targetPosition.copy(o),-1===this._distance&&(this._distance=this._setDistanceAndRangesBasedOnBounds(n));const r=this.getCurrentCameraParameters();this._camera.fov=30,this._pitch=a(null!==(i=this._initData.verticalCameraAngle)&&void 0!==i?i:10);const h=null!==(s=this._initData.horizontalCameraAngle)&&void 0!==s?s:-30;this._yaw=a(h*(this._lookAtSide<0?-1:1)+c(this._objectRotation)),this._setDistanceAndRangesBasedOnBounds(n);let l=this._targetPosition.clone();e?await this._tweenCameraParameter(r,{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,i){i||(this._yaw=Y(this._yaw,this.minAzimuthAngle,this.maxAzimuthAngle),this._pitch=this._initData.debug?Y(this._pitch,a(-89),a(89)):Y(this._pitch,this.minPolarAngle,this.maxPolarAngle),this._saveYawAndPitch());const s=(new X).setFromEuler(new Q(-this._pitch,this._yaw,0,"ZYX")),n=new N(0,0,-1).applyQuaternion(s);i||(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(n.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._zoomChanged(this._distance===this.maxDistance,!1))}this._scale=1}_zoomChanged(t,e){var i;let s=t+""+e;0===(null===(i=this._currentZoomHash)||void 0===i?void 0:i.length)||this._currentZoomHash!==s?(this.dispatchEvent(5,new Qt(t,e)),this._currentZoomHash=s):t||e||this.dispatchEvent(5,new Qt(t,e)),this._maxZoomedIn=e,this._maxZoomedOut=t}zoomTo(t){return this._tweenCameraParameter(this.getCurrentCameraParameters(),t,!0)}_getCameraSphere(t){const e=Math.max(this._bounds.x,this._bounds.y),i=Math.max(e/10,this._zoomDistance);return new K(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 N(0,0,0),this._targetPositionIsPanned=!1)}async moveCamera(t){const{x:e,y:i,z:s}=this._boundingBox.getCenter(new N);t.targetX=t.targetX||e,t.targetY=t.targetY||i,t.targetZ=t.targetZ||s,t.distance=t.distance||this._getIdealDistance();const n=this.getCurrentCameraParameters(),a=J(JSON.parse(JSON.stringify(n)),t);return this._tweenCameraParameter(n,a,!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",Jt);class $t{constructor(){this.animationMap=new Map}static setObjectAnimations(t,e,i){if(!e||0===Object.keys(e).length)return void(t.userData.objectAnimations=void 0);t.userData.objectAnimations=new $t;const s=new Map;for(const t in e)s.set(t,{matrix:d(e[t].matrix),visible:e[t].visibility,initial:e[t].initial});this.addObjectAnimations(t,s,i)}static addObjectAnimations(t,e,i){var s,n;if(!e||0===e.size)return;null!==(s=(n=t.userData).objectAnimations)&&void 0!==s||(n.objectAnimations=new $t);const a=t.userData.objectAnimations;e.forEach((e,s)=>{var n;if(a.animationMap.set(s,e),null===(n=null==i?void 0:i.animationValueMap)||void 0===n?void 0:n.hasKeyAndValue(s)){if(t.userData.transform){const i=t.userData.transform.clone().multiply(e.matrix);_(t,i)}t.visible=e.visible}})}static removeObjectAnimations(t,e){var i;if(!(null===(i=t.userData)||void 0===i?void 0:i.objectAnimations))return;const s=t.userData.objectAnimations;s.animationMap.delete(e),0===s.animationMap.size&&(t.userData.objectAnimations=void 0)}static animateObject(t,e,i,s=!0,n){t.userData.objectAnimations instanceof $t&&t.userData.objectAnimations._animate(t,e,i,s,n)}_animate(t,e,i,s=!0,n){let a=new $,o=this.animationMap.get(`${e}:${i.from}`),r=this.animationMap.get(`${e}:${i.to}`);if(i.priorAnimations.length>0||i.subsequentAnimations.length>0){a=this._calculateCombinedAnimationMatrix(i.priorAnimations);const t=this._calculateCombinedAnimationMatrix(i.subsequentAnimations);o=this._calculateAnimationTransformation(o,t),r=this._calculateAnimationTransformation(r,t)}this._animateMesh(t,a,o,r,s,n)}_calculateCombinedAnimationMatrix(t){const e=new $;return t.forEach(t=>{const i=this.animationMap.get(t);(null==i?void 0:i.matrix)&&e.multiply(i.matrix)}),e}_calculateAnimationTransformation(t,e){var i;const s=e.clone();return(null==t?void 0:t.matrix)&&s.multiply(t.matrix),{matrix:s,visible:null===(i=null==t?void 0:t.visible)||void 0===i||i,initial:!1}}_animateMesh(t,e,i,s,n=!0,a){var o,r,h,l;if(!t.userData||!i&&!s)return;null!==(o=(l=t.userData).transform)&&void 0!==o||(l.transform=t.matrix.clone());const c=t.userData.transform.clone(),d=null!==(r=null==s?void 0:s.matrix.clone())&&void 0!==r?r:new $;if(n){let s=null!==(h=null==i?void 0:i.matrix.clone())&&void 0!==h?h:new $;m(t,e,s,d,c,a)}else _(t,c.clone().multiply(d).multiply(e)),void 0!==(null==s?void 0:s.visible)&&(t.visible=s.visible),a&&a()}}t("O",$t);const te=t("c",1500),ee=t("P",5);function ie(){class t extends nt{static _generateOutline(t,e){let i=new at(new ot(t),new rt({color:"#000000",dashSize:.03,gapSize:.01,linewidth:1}));return i.translateOnAxis(e,1),i.userData.ignoreComponentRaycast=!0,i}static cloneDockLine(t,e){let i=new at(t.geometry,t.material);return i.translateOnAxis(e.getCenter(new N),1),i.name="dockline",i.layers.set(5),i.userData.ignoreComponentRaycast=!0,i}_setValues(t,e,i,s,n){t&&(this.runtimeId=t,this.name=t.toString()),e&&(this.roomlePosition=Object.assign({},e)),i&&(this.roomleRotation=Object.assign({},i)),s&&(this.parentObjectId=s),n&&(this.isRootComponent=n)}constructor(t,e,i,s,n){super(),this._selected=!1,this.isChildPlanObject=!1,this.geometryChanged=!0,this.meshes=[],this.castShadow=!1,this.receiveShadow=!0,this._setValues(t,e,i,s,n)}get loadingMesh(){return this._loadingMesh}get boundingBoxMesh(){return this._boundingBoxMesh}get boundingBox(){return this._boundingBox}set roomlePosition(t){this._roomlePosition=t,t&&this.position.set(t.x/1e3,t.z/1e3,t.y/-1e3)}get roomlePosition(){return this._roomlePosition}set roomleRotation(t){this._roomleRotation=t,t&&this.rotation.set(t.x,t.z,-t.y)}get roomleRotation(){return this._roomleRotation}replaceMeshes(t){this.removeAllMeshes(),t.forEach(t=>{this.addMesh(new st(t.geometry,t.material))})}addMesh(t,e){t.renderOrder=2,t.userData.meshType=0,e&&t.applyMatrix4(d(e)),this.add(t),this.meshes.push(t)}getMeshById(t){return this.meshes.find(e=>e.userData.meshId===t)}removeMeshById(t){const e=this.getMeshById(t);e?this.removeMesh(e):console.warn("Could not remove mesh with id "+t,this.runtimeId,this.meshes)}removeMesh(t){const e=this.meshes.indexOf(t);this.remove(t),f(t),e<0||this.meshes.splice(e,1)}removeAllMeshes(t=!0){this.meshes.forEach(e=>{this.remove(e),t&&f(e)}),this.meshes=[],this._removeLoadingMesh(),this.remove(this._boundingBoxMesh),f(this._boundingBoxMesh),this._boundingBoxMesh=null}_hideAllMeshes(){this.meshes.forEach(t=>t.visible=!1)}_showAllMeshes(){this.meshes.forEach(t=>t.visible=!0)}select(){this._selected=!0}loading(){if(!this._kernelBoundingBox)return void console.warn("Bounding box (box for measurements) for component "+this.runtimeId+" not set, can not show external mesh loading box!");this._removeLoadingMesh(),this._hideAllMeshes();const{x:t,y:e,z:i}=this._kernelBoundingBox.getSize(new N);let s=new ht(t,e,i);this._loadingMesh=new st(s,y.createMeshStandardMaterial({transparent:!0,opacity:w,color:new et(b)})),this._loadingMesh.name="loading mesh",this._loadingMesh.receiveShadow=!1,this._loadingMesh.castShadow=!1,this._loadingMesh.layers.set(5),this._loadingMesh.translateOnAxis(this._kernelBoundingBox.getCenter(new N),1),this._loadingMesh.renderOrder=3,this.add(this._loadingMesh)}_removeLoadingMesh(){this._loadingMesh&&(this.remove(this._loadingMesh),f(this._loadingMesh),this._loadingMesh=null)}loadingFinished(){this._removeLoadingMesh(),this._showAllMeshes()}deselect(){this._selected=!1}hoverOn(){it("pointer")}hoverOff(){it("default")}computeBoundingBox(e,i=!1){if(this._boundingBoxMesh&&this.remove(this._boundingBoxMesh),!i&&e&&0===e.size.x&&0===e.size.y&&0===e.size.z)return;let s;if(!e||i){this._boundingBox=new lt;let t=new N;this.meshes.forEach(e=>{if(e.geometry instanceof ct){let i=e.geometry.attributes.position;if(void 0!==i)for(let s=0,n=i.count;s<n;s++)t.fromBufferAttribute(i,s).applyMatrix4(e.matrix),this._boundingBox.expandByPoint(t)}}),this._kernelBoundingBox=this._boundingBox.clone();let e=this._boundingBox.max.x-this._boundingBox.min.x,i=this._boundingBox.max.y-this._boundingBox.min.y,n=this._boundingBox.max.z-this._boundingBox.min.z;s=new ht(e,i,n)}else{this._kernelBoundingBox=x(e),this._boundingBox=this._kernelBoundingBox.clone();let{x:t,y:i,z:n}=this._boundingBox.getSize(new N);s=new ht(t,i,n)}this._boundingBoxMesh=new st(s,y.createMeshStandardMaterial({color:"#FFFFFF",transparent:!0,opacity:0,polygonOffset:!0,polygonOffsetFactor:-1,visible:!1})),this._boundingBoxMesh.name="bounding box mesh";let n=this._boundingBox.getCenter(new N);this._boundingBoxMesh.position.add(n),this._boundingBoxMesh.layers.set(5),this._boundingBoxMesh.renderOrder=3,this._boundingBoxMesh.castShadow=!1,this._boundingBoxMesh.receiveShadow=!1,this.add(this._boundingBoxMesh),this._dockline=t._generateOutline(s,n),this._dockline.name="bounding box outline",this._dockline.layers.set(5),this._selected&&this.add(this._dockline)}recursiveMeshes(){let e=this.meshes.slice();return this.children.forEach(i=>{i instanceof t&&e.push(...i.recursiveMeshes())}),e}isChild(e){let i=!1;return this.children.forEach(s=>{s instanceof t&&!i&&(i=s.runtimeId===e||s.isChild(e))}),i}getKernelPosition(t){let e=this.parent.localToWorld(this.position);return M(t.worldToLocal(e))}animateMeshes(t,e,i=!0,s){this.meshes.forEach(n=>$t.animateObject(n,t,e,i,s))}}class e extends t{constructor(t,e){super(t,null,null,null,!1),this.glbUrl=e}}class n extends t{constructor(t,e,i,s,n,a){super(e,i,s,n,a),this._stringId=null,this.receivedPointAssociation=!1,this.castShadow=!1,this.receiveShadow=!1,this._creator_=t}get stringId(){return this._stringId?this._stringId:this.runtimeId.toString()}addMesh(t,e){super.addMesh(t,e),t.material instanceof tt&&(t.material.opacity=u,t.material.roughness=g,t.material.metalness=p,t.material.color=new et(this._initData.colors.PREVIEW_DOCKING_COLOR)),t.renderOrder=1,t.castShadow=!1,t.receiveShadow=!1}startPulsating(){var t,e;if(null===(e=null===(t=this._initData)||void 0===t?void 0:t.featureFlags)||void 0===e?void 0:e.pulsePreview)for(const t of this.meshes){const e={opacity:u},i={opacity:.3};new TWEEN.Tween(e).to(i,te).easing(TWEEN.Easing.Sinusoidal.In).onUpdate(()=>{t.material.opacity=e.opacity}).yoyo(!0).repeat(ee).start()}}hoverOn(){this.remove(this._dockline),this.meshes.forEach(({material:t})=>{t.opacity=v,t.roughness=g,t.metalness=p,t.color=new et(this._initData.colors.PREVIEW_DOCKING_COLOR)}),it("pointer")}hoverOff(){this.add(this._dockline),this.meshes.forEach(({material:t})=>{t.opacity=u,t.roughness=g,t.metalness=p,t.color=new et(this._initData.colors.PREVIEW_DOCKING_COLOR)}),it("default")}clonePreview(e){const i=new n(this._creator_,this.runtimeId,this.roomlePosition,this.roomleRotation,this.parentObjectId,this.isRootComponent);return i._stringId=this.runtimeId+"_"+e,this.children.forEach(t=>{t instanceof st&&0===t.userData.meshType&&i.meshes.push(t.clone(!0))}),i.meshes.forEach(t=>{t.material=t.material.clone(),t.geometry=t.geometry.clone(),i.add(t)}),this._dockline&&(i._dockline=t.cloneDockLine(this._dockline,this._boundingBox)),this._boundingBoxMesh&&(i._boundingBoxMesh=this._boundingBoxMesh.clone(!0)),this._boundingBox&&(i._boundingBox=this._boundingBox.clone()),i}preparePreview(){this.add(this._dockline),this.add(this._boundingBoxMesh)}}i([s],n.prototype,"_initData",void 0);class a extends n{constructor(t,e,i,s,n,a){super(t,e,i,s,n,!1),this.lineSegments=[],a&&(this._stringId=this.runtimeId+"_has_additional_dock_point_copy")}set roomleLineFrom(t){this._roomleLineFrom=t,this.lineFrom=C(t)}get roomleLineFrom(){return this._roomleLineFrom}set roomleLineTo(t){this._roomleLineTo=t;let e=C(t);e.equals(this.lineFrom)&&(console.warn("lineFrom and lineTo are equal!"),e.add(new N(0,.01,0))),this.lineTo=e}get roomleLineTo(){return this._roomleLineTo}set roomlePositionFrom(t){this._roomlePositionFrom=t,this.positionFrom=C(t)}get roomlePositionFrom(){return this._roomlePositionFrom}set roomlePositionTo(t){this._roomlePositionTo=t;let e=C(t);e.equals(this.positionFrom)&&(console.warn("positionFrom and positionTo are equal!"),e.add(new N(0,.01,0))),this.positionTo=e}get roomlePositionTo(){return this._roomlePositionTo}addMesh(t,e){super.addMesh(t,e),t.visible=!1,t.renderOrder=3}hoverOn(){this._dockline.visible=!0,it("pointer")}hoverOff(){this._dockline.visible=!1,it("default")}preparePreview(){super.preparePreview(),this._dockline.visible=!1;let t=this.lineTo.clone(),e=this.lineFrom.clone();const i=(new N).subVectors(t,e);let s=i.length(),n=i.normalize();this._createLineMesh(.01,s,this.lineSegments);const a=(new X).setFromUnitVectors(new N(0,1,0),n);this.lineMesh.quaternion.multiply(a),this.lineMesh.renderOrder=1;let o=(new N).addVectors(t,e).multiplyScalar(.5);this.lineMesh.position.copy((new N).subVectors(o,this.position.clone())),this.add(this.lineMesh);let r=this._boundingBox.getCenter(new N).applyEuler(this.docklineRotation),h=null,l=0,c=Math.abs(n.x),d=Math.abs(n.y),_=Math.abs(n.z);c>=d&&c>=_?(h=new N(r.x,0,0),l=Math.sqrt(r.y*r.y+r.z*r.z)):d>=c&&d>=_?(h=new N(0,r.y,0),l=Math.sqrt(r.x*r.x+r.z*r.z)):_>=d&&_>=c&&(h=new N(0,0,r.z),l=Math.sqrt(r.y*r.y+r.x*r.x)),l=l>0?l:.01;let m=(new N).subVectors(this.positionTo.clone(),this.positionFrom.clone()).length()+h.length();this._createBoundingLineMesh(1.1*l,m,this.lineSegments);let u=this.positionTo.clone(),g=this.positionFrom.clone(),p=(new N).subVectors(u,g).normalize();const v=(new X).setFromUnitVectors(new N(0,1,0),p);this.boundingLineMesh.quaternion.multiply(v),this.boundingLineMesh.renderOrder=3;let f=(new N).addVectors(this.positionTo.clone(),this.positionFrom.clone()).multiplyScalar(.5).add(r);this.boundingLineMesh.position.copy((new N).subVectors(f,this.position.clone())),this.add(this.boundingLineMesh)}_createLineMesh(t,e,i){this.lineMesh=this._createPreviewMesh(t,e,i,16,y.createMeshStandardMaterial({color:b,transparent:!0,opacity:P})),this.lineMesh.name="line mesh"}_createBoundingLineMesh(t,e,i){this.boundingLineMesh=this._createPreviewMesh(t,e,i,32,y.createMeshStandardMaterial({color:"#ffffff",transparent:!0,opacity:0})),this.boundingLineMesh.name="bounding line mesh",this.boundingLineMesh.userData.ignoreComponentRaycast=!0,this.boundingLineMesh.layers.set(5)}_createPreviewMesh(t,e,i,s,n){let a;if(0===i.length)a=new dt(t,t,e,s,1);else{const n=[];for(const a of i){const i=a.to-a.from,o=(a.from+a.to)/2,r=new dt(t,t,i,s,1);r.translate(0,o-e/2,0),n.push(r)}a=S(n,!1)}return new st(a,n)}clonePreviewLine(e){let i=new a(this._creator_,this.runtimeId,this.roomlePosition,this.roomleRotation,this.parentObjectId,this.receivedPointAssociation);return i._stringId=this.runtimeId+"_"+e,this.children.forEach(t=>{t instanceof st&&0===t.userData.meshType&&i.meshes.push(t.clone(!0))}),i.meshes.forEach(t=>{t.material=t.material.clone(),t.geometry=t.geometry.clone(),i.add(t)}),this._dockline&&(i._dockline=t.cloneDockLine(this._dockline,this._boundingBox)),this._boundingBoxMesh&&(i._boundingBoxMesh=this._boundingBoxMesh.clone(!0)),this._boundingBox&&(i._boundingBox=this._boundingBox.clone()),i}getPositionForIntersectionPoint(t){let e=this._boundingBox.getCenter(new N).applyEuler(this.docklineRotation),i=this.positionTo.clone().add(e),s=this.positionFrom.clone().add(e),n=new _t(s,i).closestPointToPoint(t,!0,new N);return(isNaN(n.x)||isNaN(n.y)||isNaN(n.z))&&n.copy(t),n.sub(e)}updatePreviewPosition(t){let e=this.getPositionForIntersectionPoint(t),i=this.parent.localToWorld(e);this._newPosition=this.worldToLocal(i);let s=this._boundingBox.getCenter(new N).applyEuler(this.docklineRotation);this._dockline.position.copy((new N).addVectors(this._newPosition,s)),this._dockline.rotation.copy(this.docklineRotation)}hideSelectionLine(){this._dockline.visible=!1}getKernelPosition(t){if(this._newPosition){let e=this.localToWorld(this._newPosition);return M(t.worldToLocal(e))}return super.getKernelPosition(t)}}class o extends mt{constructor(t,e,i,s,n,a,o){super(t,e,i,s,n,a),o||(o={left:0,top:1,right:1,bottom:0}),this.offset=o}set offset(t){this._offset=t,this.updateProjectionMatrix()}get offset(){return this._offset}resetOffset(){this._offset={left:0,top:1,right:1,bottom:0}}updateProjectionMatrix(){this._offset?(this.projectionMatrix=this._calculateProjectionMatrix(),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()):super.updateProjectionMatrix()}_calculateProjectionMatrix(){const t=this._calculate2DPlanes();if(this._offset.left>=this._offset.right||this._offset.bottom>this._offset.top)return(new $).makeOrthographic(t.left,t.right,t.top,t.bottom,this.near,this.far);const e=this._scaleRange(t.left,t.right,this._offset.left,this._offset.right);let i=e.from,s=e.to;const n=this._scaleRange(t.bottom,t.top,this._offset.bottom,this._offset.top);let a=n.from,o=n.to;const r=(t.right-t.left)/(t.top-t.bottom),h=(s-i)/(o-a);if(h>r){const t=(a+o)/2,e=(o-a)*h/r;a=t-e/2,o=t+e/2}else{const t=(i+s)/2,e=(s-i)*r/h;i=t-e/2,s=t+e/2}return(new $).makeOrthographic(i,s,o,a,this.near,this.far)}_scaleRange(t,e,i,s){const n=(e-t)/(s-i);return{from:t-n*i,to:e+n*(1-s)}}_calculate2DPlanes(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let n=i-t,a=i+t,o=s+e,r=s-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;n+=t*this.view.offsetX,a=n+t*this.view.width,o-=e*this.view.offsetY,r=o-e*this.view.height}return{left:n,right:a,top:o,bottom:r}}}class r extends G{constructor(t,e,i,s,n){super(t,e,i,s),n||(n={left:0,top:1,right:1,bottom:0}),this.offset=n}copy(t,e){return super.copy(t,e),this._offset=t._offset,this}set offset(t){this._offset=t,this.updateProjectionMatrix()}get offset(){return this._offset}resetOffset(){this._offset={left:0,top:1,right:1,bottom:0}}_calculateProjectionMatrix(){let t,e,i,s,n=this.fov*(2*Math.PI/360)/2;i=Math.tan(n),s=-i;let a=Math.atan(this.aspect*Math.tan(n));e=Math.tan(a),t=-e;let o=this._offset.left,r=this._offset.right,h=this._offset.top,l=this._offset.bottom,c=new V(r-o,h-l),d=new V(o+c.x/2,l+c.y/2);if(c.x<c.y){let n=(1-d.x)/(c.x/2),a=d.x/(c.x/2);e*=n,t*=a;let o=(n+a)/2;i*=o,s*=o}else{let n=(1-d.y)/(c.y/2),a=d.y/(c.y/2);i*=n,s*=a;let o=(a+n)/2;t*=o,e*=o}t*=this.near,e*=this.near,i*=this.near,s*=this.near;let _=this.near*Math.tan(Math.PI/180*.5*this.fov)/this.zoom*2,m=this.aspect*_;return this.view&&this.view.enabled&&(t+=this.view.offsetX*m/this.view.fullWidth,i-=this.view.offsetY*_/this.view.fullHeight,e+=this.view.offsetX*m/this.view.fullWidth,s-=this.view.offsetY*_/this.view.fullHeight),(new $).makePerspective(t,e,i,s,this.near,this.far)}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){this._offset?(this.projectionMatrix=this._calculateProjectionMatrix(),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()):super.updateProjectionMatrix()}}return{create:function(e,i,s,n,a){return new t(e,i,s,n,a)},createPreview:function(t,e,i){return new n(i,t,{x:0,y:0,z:0},{x:0,y:0,z:0},e,!1)},createStatic:function(t,i){return new e(t,i)},createPreviewLine:function(t,e){let i=new a(e,t.id,t.roomlePosition,t.roomleRotation,t.parentObjectId,t.receivedPointAssociation);return t.meshes.forEach(t=>{let e=t.clone();e.material=t.material.clone(),e.geometry=t.geometry.clone(),i.addMesh(e)}),i.computeBoundingBox(),i},isPreview:function(t){return t instanceof n},isPreviewLine:function(t){return t instanceof a},createPerspectiveCamera:function(t,e,i,s,n){return new r(t,e,i,s,n)},createOrthographicCamera:function(t,e,i,s,n,a,r){return new o(t,e,i,s,n,a,r)}}}class se{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}}class ne{constructor(t){this._innerSize=1,this._outerSize=100,this._plane=new nt,this._plane.rotation.x=-Math.PI/2;const e=y.createMeshStandardMaterial({});this._innerPlaneMesh=new st,this._innerPlaneMesh.layers.set(2),this._innerPlaneMesh.material=e,this._innerPlaneMesh.receiveShadow=!0,this._outerPlaneMesh=new st,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 ut;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 ut;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 n=new gt;n.moveTo(-t/2,-t/2),n.lineTo(-t/2,t/2),n.lineTo(t/2,t/2),n.lineTo(t/2,-t/2),n.lineTo(-t/2,-t/2),s.holes.push(n);const a=new pt(i);this._innerPlaneMesh.geometry&&this._innerPlaneMesh.geometry.dispose(),this._innerPlaneMesh.geometry=a;const o=new pt(s);this._outerPlaneMesh.geometry&&this._outerPlaneMesh.geometry.dispose(),this._outerPlaneMesh.geometry=o;const r=a.attributes.uv.clone();a.setAttribute("uv2",r);const h=a.attributes.uv2.array;for(let t=0;t<h.length;++t)h[t]+=.5}}class ae extends se{constructor(t,e,i){super(t,e),this._longestSide=2,this._bakedShadowPlane=new ne(100),this._fog=i||!1,this._textureLoader=new vt,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 N(0,0,0)),this._update()}_update(){this._fog&&this._updateFog()}_updateFog(){let t=this._longestSide/2;this._scene.fog=new ft(16185078,this._cameraDistance+t+3,this._cameraDistance+t+3+1),this._scene.background=new et(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=yt,this._floorTexture.wrapT=yt,this._floorTexture.repeat.set(100/t,100/e));let i=y.createMeshStandardMaterial({map:this._floorTexture,side:wt});this._bakedShadowPlane.getInnerPlane().material=i,this._bakedShadowPlane.getOuterPlane().material=i}}addToScene(){this._scene&&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=L(t),this._rapiAccess.getTexturesOf(t).then(t=>{if(t.length>0){let n=[];t.forEach(t=>{n.push(D(this._dataSyncer.requestAsset(t.image,!0),t,this._floorMaterial,e,1,1))}),Promise.all(n).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=E();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",ae),i([s],ae.prototype,"_rapiAccess",void 0),i([s],ae.prototype,"_dataSyncer",void 0);const oe=Math.PI/4;class re extends Xt{constructor(t,e,i,s){super(t,e,i),this._state=0,this._cameraRotation=new X,this._rotationSpeed=1,this._keyMap=new Map,this.minPolarAngle=a(-60),this.maxPolarAngle=a(60),this._camera=s||new G,this._camera.fov=75,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(0,1.5,0),this._cameraPosition=new N,this._cameraPosition.copy(this._camera.position),this._pitch=0,this._yaw=0;let n=new Q(-this._pitch,this._yaw,0,"ZYX");this._cameraRotation.setFromEuler(n),window.addEventListener("gamepadconnected",this._gamepadConnected.bind(this)),window.addEventListener("gamepaddisconnected",this._gamepadDisconnected.bind(this))}setUp(){super.setUp(),this._camera.fov=75,this._initInputListener()}_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*oe*e),this._update(),this.dispatchEvent(1)),Math.abs(i)>.2&&(this._rotateVertical(.01*oe*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(),n=o(e,s.position),a=I(i,s.quaternion);if(!e||n&&a)return!1;let r=this.getCamera().position.clone(),h=Math.min(10*t,1);r.lerp(e,h),this.getCamera().position.copy(r);let l=this.getCamera().quaternion.clone(),c=Math.min(5*t,1);l.slerp(i,c),this.getCamera().setRotationFromQuaternion(l);let d=!1;return this._keyMap.forEach(t=>{t&&(d=!0)}),d&&this._processKeyMap(this._keyMap,t),!0}_getCamera(){return this._camera}_initInputListener(){this._onKeyChanged=this._onKeyChanged.bind(this),this._inputListeners.push({key:16,fun:t=>{this._onKeyChanged(t.event)}}),this._inputListeners.push({key:17,fun:t=>{this._onKeyChanged(t.event)}}),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)}})}_removeInputListener(){this._inputListeners=this._inputListeners.filter(t=>17!==t.key&&16!==t.key)}_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=.1:this._rotationSpeed=1}_move(t){this._position=t.position,1!==this._state||this._locked||this._orbit(new V(t.position.x,t.position.y)),2!==this._state||this._locked||(this._orbit(new V(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(){k(this._downPosition,this._position)<B&&1===this._state&&(this._state=2,this._orbit(new V(this._position.x,this._position.y)),this._moveForward())}_update(t){var e;let i=new Q(-this._pitch,this._yaw,0,"ZYX");null===(e=this._cameraRotation)||void 0===e||e.setFromEuler(i)}updateCamera(){let{x:t,y:e}=this._domHelper.getClientDimensions();this._camera.aspect=t/e,this._camera.updateProjectionMatrix(),this._camera.near=.1,this._camera.far=100}_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 N(0,0,0),s=!1;return this._processUpDown(t,i,e),t.get(65)&&(i.x=-1.5*e),t.get(68)&&(i.x=1.5*e),t.get(37)&&(this._rotateHorizontal(-oe*this._rotationSpeed*e),s=!0),t.get(39)&&(this._rotateHorizontal(oe*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 N(i.x,0,i.z)),this._update(),0))}_processUpDown(t,e,i){(t.get(87)||t.get(38))&&(e.z=-1.5*i),(t.get(83)||t.get(40))&&(e.z=1.5*i)}_orbit(t){this._orbitPosition||(this._orbitPosition=new V(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",re);class he extends se{constructor(t,e,i,s,n){if(super(t,e),this._color=i,this._oldBackground=t.background,s&&n){this._canvas=s,this._style=document.createElement("style");let t='background-image: url("'+n+'"); 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(){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"))}removeFromScene(){this._oldBackground&&(this._scene.background=this._oldBackground),this._canvas&&this._canvas.classList.remove("rml-scene-background")}showGUI(){}}t("B",he);class le{parse(t,e,i,s,n){let a=JSON.parse(s);return a.environment?this.load(t,e,i,a,n):null}load(t,e,i,s,n){let a,o=s.environment;if(!o)return console.warn("No environment set in scene settings"),Promise.resolve(null);switch(o.type){case"color":a=new Promise(e=>e(new he(t,i,new et(o.details.color))));break;case"image":a=new Promise(s=>s(new he(t,i,null,e,o.details.imageUrl)));break;case"floor":a=new Promise(e=>{this._rapiAccess.getMaterial(o.details.material).then(s=>{let a=void 0===o.details.fog||o.details.fog,r=new ae(t,i,a);r.changeFloorMaterial(s,n).then(()=>{e(r)})})});break;default:console.warn("Could not load environment, return old environment"),a=new Promise(t=>t(i))}return a}}i([s],le.prototype,"_rapiAccess",void 0);class ce{constructor(t,e){this._scene=t,e&&e.removeFromScene()}needsBounds(){return!1}updateBounds(t){}getCameraContainer(){return this._cameraContainer||(this._cameraContainer=new nt),this._cameraContainer}}t("L",ce);class de extends ce{constructor(t,e){super(t,e),this._lights=[]}needsBounds(){return!0}updateBounds(t){if(this._cameraLight){const e=this._cameraLight,i=new N;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=>{(null==t?void 0: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(bt).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 N;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=E();this._cameraLight&&this._addToGUI(t,this._cameraLight),this._lights.forEach(e=>{this._addToGUI(t,e)})}_addToGUI(t,e){t&&(e instanceof xt&&this._addSpotLightToGUI(t,e),e instanceof Mt&&this._addAmbientLightToGUI(t,e),e instanceof Ct&&this._addDirectionalLightToGUI(t,e),e instanceof Pt&&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 et(t)}),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new N(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new N(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new N(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 et(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 N(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new N(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new N(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 et(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 et(t)}),i.add(e,"castShadow"),i.add(e.position,"x").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new N(0,0,0))}),i.add(e.position,"y").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new N(0,0,0))}),i.add(e.position,"z").min(-10).max(10).step(.1).onChange(()=>{e.lookAt(new N(0,0,0))})}}i([s],de.prototype,"_dynamicLightSettingLoader",void 0);var _e=function(t){function e(t,i,s){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:128;if(Dt(this,e),i<=0||s<=0||n<=0)throw new Error("GroundedSkybox height, radius, and resolution must be positive.");var a=new Et(s,2*n,n);a.scale(1,1,-1);for(var o=a.getAttribute("position"),r=new N,h=0;h<o.count;++h)if(r.fromBufferAttribute(o,h),r.y<0){var l=3*-i/2,c=r.y<l?-i/r.y:1-r.y*r.y/(3*l*l);r.multiplyScalar(c),r.toArray(o.array,3*h)}return o.needsUpdate=!0,It(this,e,[a,new kt({map:t,depthWrite:!1})])}return St(e,t),Lt(e)}(st);class me extends se{constructor(t,e,i){super(t,e),this.updateEnvironmentTexture(i)}updateEnvironmentTexture(t){t&&(this._environmentTexture=t,this._skybox=new _e(this._environmentTexture,15,100),this._skybox.name="Ground projected skybox",this._skybox.scale.setScalar(100)),this.reload()}needsBounds(){return!1}needsCamera(){return!1}needsRotation(){return!1}addToScene(){this._scene&&this._skybox&&this._scene.add(this._skybox)}removeFromScene(){this._scene&&this._skybox&&this._scene.remove(this._skybox)}showGUI(t){let e=E();if(!e)return;let i=e.addFolder("Ground Projected Environment");i.add(this._skybox,"height").min(10).max(100).step(.1).onChange(t),i.add(this._skybox,"radius").min(20).max(200).step(.1).onChange(t)}}class ue{constructor(t){this._lightSourceDetector=t}static createPlane(t,e){const i=new Bt(2,1),s=null!=e?e:new kt({color:12632256,side:wt}),n=new st(i,s);return n.position.z=-.1,t.add(n),n}createDebugScene(t,e){this._scene=t,this._createLightGraphInMap(this._lightSourceDetector.sampleUVs,this._lightSourceDetector.lightSamples,this._lightSourceDetector.lightGraph,e)}_createLightGraphInMap(t,e,i,s){const n=[],a=[];for(let t=0;t<this._lightSourceDetector.lightGraph.noOfNodes;++t)0===i.adjacent[t].length?n.push(e[t]):a.push(e[t]);const o=n.map(t=>t.uv),r=a.map(t=>t.uv),h=t.filter(t=>!o.includes(t)&&!r.includes(t));this._createSamplePointsInMap(h,.005,16711680),this._createSamplePointsInMap(o,.01,255),this._createSamplePointsInMap(r,.01,65280),this._createClusterLinesInMap(this._lightSourceDetector.lightSamples,this._lightSourceDetector.lightGraph.edges,128);const l=this._lightSourceDetector.lightSources.map(t=>t.uv);this._createSamplePointsInMap(l,.015,16776960);let c=this._lightSourceDetector.lightSources;void 0!==s&&s>=0&&s<c.length&&(c=c.slice(0,s)),this._createCirclesInMap(c,8421376)}_createSamplePointsInMap(t,e,i){const s=new Rt(e,8,4),n=new kt({color:i});t.forEach(t=>{var e;const i=new st(s,n);i.position.copy(this._uvToMapPosition(t)),i.name="samplePoint",null===(e=this._scene)||void 0===e||e.add(i)})}_createCirclesInMap(t,e){const i=new kt({color:e,transparent:!0,opacity:.5});t.forEach(t=>{var e;const s=new Rt(t.size,8,4),n=new st(s,i);n.position.copy(this._uvToMapPosition(t.uv)),n.name="samplePoint",null===(e=this._scene)||void 0===e||e.add(n)})}_createClusterLinesInMap(t,e,i){var s;const n=new zt({color:i}),a=[];e.forEach(e=>{for(let i=1;i<e.length;i++){const s=t[e[0]].uv,n=t[e[i]].uv;if(a.push(this._uvToMapPosition(s)),Math.abs(s.x-n.x)>.5){const t=(s.y+n.y)/2,e=s.x<n.x?0:1;a.push(this._uvToMapPosition(new V(e,t))),a.push(this._uvToMapPosition(new V(1-e,t)))}a.push(this._uvToMapPosition(n))}});const o=(new ct).setFromPoints(a),r=new at(o,n);r.name="clusterLine",null===(s=this._scene)||void 0===s||s.add(r)}_uvToMapPosition(t){return new N(2*t.x-1,t.y-.5,0)}}class ge extends At{constructor(t){super(t),this._extendedEquirectMaterial=this._createEquirectMaterial()}fromEquirectangularTexture(t,e){var i,s;const n=null!==(i=null==e?void 0:e.rotation)&&void 0!==i?i:0,a=null!==(s=null==e?void 0:e.intensity)&&void 0!==s?s:1;return this._extendedEquirectMaterial.uniforms.intensity.value=a,this._extendedEquirectMaterial.uniforms.rotationMatrix.value.set(Math.cos(n),0,-Math.sin(n),0,1,0,Math.sin(n),0,Math.cos(n)),super.fromEquirectangular(t)}_createEquirectMaterial(){const t=new Tt({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},intensity:{value:1},rotationMatrix:{value:new Ot}},vertexShader:pe,fragmentShader:ve,blending:Ft,depthTest:!1,depthWrite:!1});return this._equirectMaterial=t,t}}const pe="\nprecision mediump float;\nprecision mediump int;\nattribute float faceIndex;\nvarying vec3 vOutputDirection;\nuniform mat3 rotationMatrix;\n\n// RH coordinate system; PMREM face-indexing convention\nvec3 getDirection( vec2 uv, float face ) {\n uv = 2.0 * uv - 1.0;\n vec3 direction = vec3( uv, 1.0 );\n if ( face == 0.0 ) {\n direction = direction.zyx; // ( 1, v, u ) pos x\n } else if ( face == 1.0 ) {\n direction = direction.xzy;\n direction.xz *= -1.0; // ( -u, 1, -v ) pos y\n } else if ( face == 2.0 ) {\n direction.x *= -1.0; // ( -u, v, 1 ) pos z\n } else if ( face == 3.0 ) {\n direction = direction.zyx;\n direction.xz *= -1.0; // ( -1, v, -u ) neg x\n } else if ( face == 4.0 ) {\n direction = direction.xzy;\n direction.xy *= -1.0; // ( -u, -1, v ) neg y\n } else if ( face == 5.0 ) {\n direction.z *= -1.0; // ( u, v, -1 ) neg z\n }\n return direction;\n}\n\nvoid main() {\n vOutputDirection = rotationMatrix * getDirection(uv, faceIndex);\n gl_Position = vec4(position, 1.0);\n}\n",ve="\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform float intensity;\n\n#include <common>\n\nvoid main() { \n vec3 outputDirection = normalize(vOutputDirection);\n vec2 uv = equirectUv(outputDirection);\n gl_FragColor = vec4(texture2D(envMap, uv).rgb * intensity, 1.0);\n}\n";class fe{}class ye{get lightSources(){return this._lightSources}set rotation(t){this._rotation!==t&&(this._rotation=t,this.needsUpdate=!0)}set intensity(t){this._intensity!==t&&(this._intensity=t,this.needsUpdate=!0)}set maxNoOfLightSources(t){this._maxNoOfLightSources!==t&&(this._maxNoOfLightSources=t,this.needsUpdate=!0)}get maxNoOfLightSources(){return this._maxNoOfLightSources}constructor(t,e){var i,s;this.needsUpdate=!0,this._lightSources=[],t instanceof fe?this.environmentSceneGenerator=t:t instanceof jt?this.cubeTexture=t:t instanceof Ut&&(this.equirectangularTexture=t),(null==e?void 0:e.textureData)&&(this.textureData=null==e?void 0:e.textureData),this._rotation=null!==(i=null==e?void 0:e.rotation)&&void 0!==i?i:0,this._intensity=null!==(s=null==e?void 0:e.intensity)&&void 0!==s?s:1,void 0!==(null==e?void 0:e.maxNoOfLightSources)&&(this._maxNoOfLightSources=e.maxNoOfLightSources),this._parameters=e,this._environment=t}clone(){return new ye(this._environment,this._parameters)}createNewEnvironment(t){const e=this._createPmremTexture(t),i=this._detectLightSources(t,e);return this._lightSources=i.lightSources,null!=e?e:null}_getTextureOffset(){const t=this._rotation/(2*Math.PI)%1;return new V(t,0)}_createPmremTexture(t){const e=new ge(t);let i;if(this.equirectangularTexture)this.equirectangularTexture.offset.copy(this._getTextureOffset()),i=e.fromEquirectangularTexture(this.equirectangularTexture,{rotation:this._rotation,intensity:this._intensity});else if(this.cubeTexture)i=e.fromCubemap(this.cubeTexture);else if(this.environmentSceneGenerator){const t=this.environmentSceneGenerator.generateScene(this._intensity,this._rotation);i=e.fromScene(t,.04)}return this._debugScene=void 0,this.needsUpdate=!1,null==i?void 0:i.texture}_detectLightSources(t,e){const i=new R;return this.equirectangularTexture&&0===this.rotation?i.detectLightSources(t,this.equirectangularTexture,this.textureData):e&&i.detectLightSources(t,e),i}createDebugScene(t,e,i){const s=null!=i?i:-1;if(this._debugScene&&s===this._debugScene.userData.maximumNumberOfLightSources)return this._debugScene;this._debugScene=new Ht;const n=new z(!0,!1);n.setSourceTexture(e.environment),ue.createPlane(this._debugScene,n);const a=this._detectLightSources(t,e.environment);return new ue(a).createDebugScene(this._debugScene,s),this._debugScene.userData.maximumNumberOfLightSources=s,this._debugScene}}class we extends fe{constructor(t={}){super(),this._parameters={},this._parameters=t}generateScene(t,e){const i=new be({...this._parameters,lightIntensity:t*(this._parameters.lightIntensity||1),topLightIntensity:t*(this._parameters.topLightIntensity||1),sidLightIntensity:t*(this._parameters.sidLightIntensity||1)});return i.rotation.y=e,i}}class be extends Ht{constructor(t={}){var e;super(),this._type=null!==(e=null==t?void 0:t.type)&&void 0!==e?e:"all_around",this._topLightIntensity=(null==t?void 0:t.topLightIntensity)||(null==t?void 0:t.lightIntensity)||1,this._sideLightIntensity=(null==t?void 0:t.sidLightIntensity)||(null==t?void 0:t.lightIntensity)||1,this._sideReflectorIntensity=(null==t?void 0:t.sidLightIntensity)||(null==t?void 0:t.lightIntensity)||1;const i="front"===this._type?.3:0;this._ambientLightIntensity=(null==t?void 0:t.ambientLightIntensity)||i,this._colorVariation=(null==t?void 0:t.colorVariation)||.5,this._lightGeometry=new ht,this._lightGeometry.deleteAttribute("uv"),this._reflectorLightGeometry=new dt(.7,.4,2,32),this._reflectorLightGeometry.deleteAttribute("uv"),this.generateScene(this)}generateScene(t){switch(this._type){default:case"all_around":this._createAllAroundSceneLight(t);break;case"front":this._createFrontSceneLight(t)}}dispose(){const t=new Set;this.traverse(e=>{e.isMesh&&(t.add(e.geometry),t.add(e.material))});for(const e of t)e.dispose()}_createAllAroundSceneLight(t){const e=this._ambientLightIntensity;this.background=new et(e,e,e),this._createTopLight(t,6,1);for(let e=0;e<6;e++){const i=e*Math.PI*2/6,s=Math.sin(i),n=Math.cos(i);e%2==0?this._createReflector(t,new V(s,n),3,1,.8,.2):this._createSideLight(t,new V(s,n),(e-1)/2,15,1.1,.33,1)}}_createFrontSceneLight(t){const e=this._ambientLightIntensity;this.background=new et(e,e,e),this._createTopLight(t,6,.7);for(let e=0;e<6;e++){const i=e*Math.PI*2/6,s=Math.sin(i),n=Math.cos(i);if(0===e){this._createReflector(t,new V(s,n),1.1,.6,.8,-.4);for(let i=0;i<2;i++){const s=(e-.3+.6*i)*Math.PI*2/6,n=Math.sin(s),a=Math.cos(s);this._createSideLight(t,new V(n,a),(e-1)/2,50,1.2,.7,.8)}}else this._createReflector(t,new V(s,n),1.1,.7,1.4,0)}}_createAreaLightMaterial(t,e,i){const s=new kt;return s.color.set(t,null!=e?e:t,null!=i?i:t),s}_createTopLight(t,e,i){const s=new st(this._lightGeometry,this._createAreaLightMaterial(e*this._topLightIntensity));s.position.set(0,20,0),s.scale.set(5*i,.1,5*i),t.add(s)}_createSideLight(t,e,i,s,n,a,o){for(let r=0;r<3;r++){const h=s*this._sideLightIntensity,l=new st(this._lightGeometry,this._createAreaLightMaterial((r+i)%3==0?h:h*(1-this._colorVariation),(r+i)%3==1?h:h*(1-this._colorVariation),(r+i)%3==2?h:h*(1-this._colorVariation))),c=(1===r?-e.y:2===r?e.y:0)/Math.sqrt(2),d=0===r?0:1,_=(1===r?e.x:2===r?-e.x:0)/Math.sqrt(2);l.position.set(e.x*o*15+1.1*c*n,15*a+1.1*d*n,e.y*o*15+1.1*_*n),l.rotation.set(0,Math.atan2(e.x,e.y),0),l.scale.setScalar(n),t.add(l)}}_createReflector(t,e,i,s,n,a){const o=new st(this._reflectorLightGeometry,this._createAreaLightMaterial(i*this._sideReflectorIntensity));o.position.set(15*e.x,10*a,15*e.y),o.scale.set(10*s,10*n,10*s),t.add(o)}}class xe extends Xt{constructor(t,e,i,s){super(t,e,i),this._scale=1,this._cameraZoom=1,this._state=0,this._size=5,this._lastPosition=new V,this._zoomPosition=new N,this._lastZoom=0,this._wasZooming=!1,this._zoomSpeed=Math.pow(.95,2),s?(this._camera=s,this._cameraPosition=(new N).copy(this._camera.position)):this._initCamera(i?new N(i.targetX,10,i.targetZ):new N(0,10,0)),this._lerpEnabled=!1}_getCamera(){return this._camera||this._initCamera(new N(0,10,0)),this._camera}_initCamera(t){let{x:e,y:i}=this._domHelper.getClientDimensions(),s=(e/i||1)*this._size,n=this._size;this._camera=new mt(s/-2,s/2,n/2,n/-2,1,1e3),this._camera.position.copy(t),this._cameraPosition=t,this._camera.lookAt(new N(0,0,0))}updateCamera(){let t=this._domHelper.getAspectRatio()*this._size,e=this._size;this._camera.left=t/-2,this._camera.right=t/2,this._camera.top=e/2,this._camera.bottom=e/-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=>{this._lastPosition.x===t.positionRelative.x&&this._lastPosition.y===t.positionRelative.y||1!==this._state||this._locked||(this._move(new V(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 N(t.x,t.y,0);e.unproject(this._camera),this._zoomPosition.copy(e)}this._lastZoom=Date.now()}_move(t,e){let i=new N,s=new N(this._lastPosition.x,this._lastPosition.y,0),n=new N(t.x,t.y,0);s.unproject(this._camera),n.unproject(this._camera),i.subVectors(n,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 N),n=t.getCenter(new N),a=s.x/-2/this._camera.left,o=s.z/-2/this._camera.bottom,r=1/Math.max(a,o);(r<this._cameraZoom||e)&&(this._scale=r,this._cameraZoom=r,this._cameraPosition.x=n.x,this._cameraPosition.z=n.z)}_update(t,e,i){this._scale=Math.min(this._scale,5),this._scale=Math.max(this._scale,.1);let s=(new N).subVectors(this._zoomPosition,this._cameraPosition).multiplyScalar((this._scale-this._cameraZoom)/this._scale);this._cameraPosition.x+=s.x,this._cameraPosition.z+=s.z,this._cameraZoom!==this._scale&&this.dispatchEvent(5,new Qt(.1===this._scale,5===this._scale)),this._cameraZoom=this._scale,this._camera.updateProjectionMatrix()}animateCamera(t){const e=Math.abs(this._cameraZoom-this._camera.zoom)>.01;if(this._lerpEnabled=e,e&&(this._wasZooming=!0),this._wasZooming&&!e&&(setTimeout(()=>this._dispatchCameraIdle(),16),this._wasZooming=!1),!super.animateCamera(t)&&!e)return!1;this._lerpEnabled=!1;const i=Math.min(10*t,1);return this._camera.zoom=qt.lerp(this._camera.zoom,this._cameraZoom,i),!0}getKernelZoomFactor(){const t=1e3*(this._camera.right-this._camera.left);return this._domHelper.element.clientWidth/t*this._camera.zoom}}t("d",xe);const Me=t("f",.35),Ce=t("I",1.16);class Pe{get cameraBehaviour(){return this._cameraBehaviour}onBeforeRender(){}constructor(t,e,i,s){this._depthWriteMaterial=new kt({colorWrite:!1}),this._maxAnisotropy=1,this._clock=new Nt,this._delta=0,this._renderListener=null,this._stopRendering=!1,this._roomleRenderer=null,this._forceRender=!1,this._lastChange=Date.now(),this._running=!1,this._isInteriorLightActive=!1,this._perspectiveOffsetCamera=null,this._orthographicOffsetCamera=null,this._onAfterRender=()=>{},this._creator_=t,this._canvasID=i,this._isInteriorLightActive=this._initData.featureFlags.interiorLights,this._renderListener=()=>{this._requestRender()},this.createCameraControl(Gt(s),e),this._setupScene(e,this._initData.transparentBackground),this._lifeCycleManager.addEventListener(this)}addEventListener(t){throw new Error("Method not implemented.")}removeEventListener(t){throw new Error("Method not implemented.")}_changeCameraBehaviour(t){this._cameraBehaviour&&(this.cameraBehaviour.cameraControl instanceof re&&(this._getInputManager().removeEventListener(7,this._renderListener),this._getInputManager().removeEventListener(8,this._renderListener)),this._cameraBehaviour.cameraControl.cleanUp()),this._cameraBehaviour=t,this._cameraBehaviour.cameraControl.setUp(),this._cameraBehaviour.setCameraChangeListener(this.onCameraChanged.bind(this)),t.cameraControl instanceof re&&(this._getInputManager().addEventListener(7,this._renderListener,this),this._getInputManager().addEventListener(8,this._renderListener,this)),this.cameraBehaviourChanged()}onCameraChanged(){}cameraBehaviourChanged(){this.cameraBehaviour.cameraControl instanceof Jt&&this.cameraBehaviour.cameraControl.updateDistanceAndRangesBasedOnBounds(this.getBounds())}_addCameraControlListener(){this.cameraBehaviour.cameraControl.addEventListener(0,()=>{var t;null===(t=this._roomleRenderer)||void 0===t||t.movingCameraStarts(),this._requestRender()},this),this.cameraBehaviour.cameraControl.addEventListener(1,this._requestRender,this),this.cameraBehaviour.cameraControl.addEventListener(2,()=>{var t;null===(t=this._roomleRenderer)||void 0===t||t.movingCameraStops(),this._requestRender()},this),this.cameraBehaviour.cameraControl.addEventListener(6,this._requestRender,this)}_renderEverything(){this._roomleRenderer&&(this._forceRender=!0,this._roomleRenderer.forceShadowUpdates(!1)),this._requestRender()}_renderWithoutShadowsAndAO(){this._roomleRenderer&&(this._forceRender=!0),this._requestRender()}_requestRender(){if(!this._renderer||this._stopRendering)return;const t=()=>{var e,i;if(this._delta=this._clock.getDelta(),this._animateCamera(),this.cameraBehaviour.cameraControl.getCamera().layers.mask=65535,this._renderLoopFunction&&(this._renderLoopFunction(),this._renderLoopFunction=null),this.onBeforeRender(),this._globalInitData.e2e&&window.TWEEN){const t=TWEEN.getAll();for(const e of t)e.end()}if(this._roomleRenderer)null===(e=this._statsHelper)||void 0===e||e.updateRenderInfo(this._roomleRenderer.renderer.info),this._roomleRenderer.render(this._scene,this.cameraBehaviour.cameraControl.getCamera()),this._forceRender=!1,this._shouldRenderUi()&&this._renderUi();else{null===(i=this._statsHelper)||void 0===i||i.updateRenderInfo(this._renderer.info);const t=this.cameraBehaviour.cameraControl.getCamera();t.updateMatrixWorld(),t.updateProjectionMatrix(),this._renderer.render(this._scene,t)}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(){var t;return null===(t=this._pluginSystem)||void 0===t?void 0:t.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.cameraBehaviour.cameraControl.getCamera()),this._scene.overrideMaterial=null;const e=this._renderer.autoClear;this._renderer.autoClear=!1,this._renderer.clearDepth(),this._renderer.render(this._uiScene,this.cameraBehaviour.cameraControl.getCamera()),this._renderer.autoClear=e,this._scene.background=t}_animateCamera(){this.cameraBehaviour.cameraControl&&(this.cameraBehaviour.cameraControl.animateCamera(this._delta)||!this.shouldClearShadowsAndAO()||this._forceRender)&&this._lightSetting instanceof de&&this.cameraBehaviour.cameraControl.getCamera()instanceof G&&this._lightSetting.update(this.cameraBehaviour.cameraControl.getCamera(),this.cameraBehaviour.cameraControl.getTargetPosition()),this._environment&&this._environment.needsCamera()&&this.cameraBehaviour.cameraControl instanceof Jt&&this._environment.updateCamera(this.cameraBehaviour.cameraControl.getCamera())}shouldClearShadowsAndAO(){return!1}_setupScene(t,e){var i,s,n,a;const{x:o,y:r}=this._domHelper.getClientDimensions();this._scene=new Ht,this._uiScene=new Ht,(e=e||!1)||(this._scene.background=this._initData.colors.DEFAULT_BACKGROUND),this._renderer=new Zt({antialias:!this._globalInitData.e2e,alpha:!0}),!0!==(null===(i=this._initData)||void 0===i?void 0:i.debug)&&void 0!==(null===(s=this._renderer)||void 0===s?void 0:s.debug)&&(this._renderer.debug.checkShaderErrors=!1);const h=this._initData.autoQuality?Math.min(window.devicePixelRatio,1.5):window.devicePixelRatio;this._renderer.setPixelRatio(h),this._renderer.setSize(o,r),this._renderer.outputColorSpace=Vt,this._renderer.autoClear=!1,this._renderer.shadowMap.enabled=!0,this._renderer.shadowMap.type=Wt,this._maxAnisotropy=this._renderer.capabilities.getMaxAnisotropy(),this._globalInitData.e2e||(this._roomleRenderer=new A(this._renderer,o,r,null!==(n=this._initData.linearAoFilter)&&void 0!==n&&n),this._initData.debug&&this._roomleRenderer.sceneRenderer.loadLutImages(T),this._roomleRenderer.setQualityMap(O),this._roomleRenderer.setAutoQuality(this._initData.autoQuality),this._roomleRenderer.setShadingType(this._initData.shading),this._roomleRenderer.setCustomShadingParameters(this._initData.customShading,this._initData.customShadingMoc),null===(a=this._roomleRenderer)||void 0===a||a.setSize(o,r),this._roomleRenderer.sceneRenderer.outlineRenderer.parameters.hiddenEdgeColor=this._initData.colors.SELECTION.getHex(),this._roomleRenderer.sceneRenderer.outlineRenderer.parameters.visibleEdgeColor=this._initData.colors.SELECTION.getHex(),this._roomleRenderer.sceneRenderer.outlineRenderer.applyParameters()),this._renderer.domElement.classList.add(this._canvasID),this._domHelper.element.appendChild(this._renderer.domElement),this._getInputManager().addEvents(this._renderer.domElement),this._hdrEnvironmentLoader.registerEnvironmentChangedCallback(t=>{this._setEnvMap(t)}),this._initData.legacyLight?this.loadEnvMap("static/legacy_env-d5810ec5057d4716.exr"):this._initData.sceneLight?this._setDefaultEnvironmentScene():this.loadEnvMap(this._initData.envMapUrl),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.cameraBehaviour.cameraControl.getCamera().position),this._addCameraControlListener(),this.sceneChanged()}async loadEnvMap(t){await this._hdrEnvironmentLoader.loadUrl(this._renderer,t)}_getEnvMapIntensityAndRotation(){let t=this._initData.envMapIntensity,e=this._initData.envMapRotation;return t===F&&this._isInteriorLightActive&&(t=Me),e===j&&this._isInteriorLightActive&&(e=Ce),{intensity:t,rotation:e}}_setDefaultEnvironmentScene(){const t=this._initData.sceneLight,{intensity:e,rotation:i}=this._getEnvMapIntensityAndRotation();this._scene.userData.environmentDefinition=new ye(new we({type:t}),{rotation:i,intensity:e,maxNoOfLightSources:this._initData.maxLightSources}),this._scene.userData.shadowFromEnvironment=!0,this._requestRender()}_setEnvMap(t){const{url:e,environmentMap:i}=t,{intensity:s,rotation:n}=this._getEnvMapIntensityAndRotation();this._scene.environment=i,this._scene.userData.environmentDefinition=new ye(i,{rotation:n,intensity:this._initData.legacyLight?.9:s,maxNoOfLightSources:this._initData.maxLightSources}),this._scene.userData.shadowFromEnvironment=!this._initData.legacyLight,this._environment instanceof me&&this._environment.updateEnvironmentTexture(i),e!==U||this._globalInitData.e2e||window.requestIdleCallback(this.loadEnvMap.bind(this,"static/default_1k-2aa6d42244d30fb1.exr")),this._requestRender()}_tabVisible(){this.updateCamera(!1)}_releaseKeystrokeStates(){const t=["Shift","Meta","Control","Escape"];for(const e of t){const t=new KeyboardEvent("keyup",{key:e});this._onKeyUp(t,!0)}}updateCamera(t=!0){var e;const{x:i,y:s}=this._domHelper.getClientDimensions();null===(e=this._roomleRenderer)||void 0===e||e.setSize(i,s),this.cameraBehaviour.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.cameraBehaviour.cameraControl&&this.cameraBehaviour.cameraControl.cleanUp(),this._stopRendering=!0}clearScene(){let t=[];this._scene.children.forEach(e=>{this._isPartOfScene(e)&&t.push(e)}),t.forEach(t=>{H(t),this._scene.remove(t)}),this._renderer.renderLists.dispose()}enableHD(t){this._renderer.capabilities.maxTextures>8&&t&&this.loadDynamicLightSetting(t),this._requestRender()}_loadGLTF(t,e,i,s,n,a,o){return new Promise((r,h)=>{this._staticItemLoader.loadGLTF(t,e,i,s,n,a,null,o).then(t=>{r(t.scene)},h)})}_loadGLB(t,e,i,s,n,a,o,r){return new Promise((h,l)=>{this._staticItemLoader.loadGLB(t,e,i,s,n,a,o,r).then(t=>{h(t.scene)},l)})}showGUI(){if(this._initData.disableDebugGUI)return;const t=document.createElement("style");t.innerText=".dg.main{position:absolute;z-index:999;top:0;left:0;}",document.head.appendChild(t);let e=E(!1);e&&(this._domHelper.element.appendChild(e.domElement),e.domElement.style.zIndex="999",e.domElement.style.overflowY="auto",e.domElement.style.maxHeight=this._domHelper.element.clientHeight+"px",this._guiLoaded())}_guiLoaded(){let t=E();if(!t)return;const e=t.addFolder("Scene Parameter"),i={intensity:this._initData.envMapIntensity,rotation:this._initData.envMapRotation};e.add(i,"intensity",0,4,.01).name("env map intensity").onChange(t=>{this.changeEnvironmentMapIntensity(t),this._requestRender()}),e.add(i,"rotation",0,2*Math.PI,.01).name("env map rotation").onChange(t=>{this._scene.userData.environmentDefinition.rotation=t,this._requestRender()}),this._lightSetting&&this._lightSetting.showGUI(),this._roomleRenderer&&this._roomleRenderer.showGUI(()=>this._requestRender()),this._environment&&this._environment.showGUI(()=>this._requestRender()),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 e=i.__folders[t];this._addGUIListener(e)}),i.__controllers&&i.__controllers.forEach(t=>{t.onFinishChange(()=>{this._guiParamChanged()})})})}_guiParamChanged(){this._renderEverything()}showStats(){e.import("./stats-helper-e205d215.legacy.js").then(t=>{this._statsHelper=new t.default,this._roomleRenderer.setOnQualityLevelChangeCallback(t=>{var e;null===(e=this._statsHelper)||void 0===e||e.updateQualityInfo(t)})})}_onKeyDown(t){}_onKeyUp(t,e=!1){}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(){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(),this._releaseKeystrokeStates()}}async loadSceneSettings(t){let e,i;return e=t.environment?new Promise(e=>{(new le).load(this._scene,this._renderer.domElement,this._environment,t,this._maxAnisotropy).then(t=>{this._setEnvironment(t),e()})}):Promise.resolve(),t.lights?(this._lightSetting=new de(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 he(this._scene,this._environment,new et(t)))}setBackgroundImage(t){this._setEnvironment(new he(this._scene,this._environment,null,this._renderer.domElement,t))}_setEnvironment(t){this._environment=t,this._renderEverything()}async loadDynamicLightSetting(t){this._lightSetting=new de(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=q.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(){var t;this._updateBounds(this.getBounds(),this.getGeometryBounds()),null===(t=this._roomleRenderer)||void 0===t||t.forceShadowUpdates(!0),this._renderEverything()}_updateBounds(t,e,i=!1){var s;if(!t)return;const n=null!=e?e:t;this.updateEnvironment(n,i),this._lightSetting&&this._lightSetting.needsBounds()&&this._lightSetting.updateBounds(t),null===(s=this._roomleRenderer)||void 0===s||s.updateBounds(n),this._requestRender(),this._pluginSystem.updateBounds(t)}setCameraOffset(t){const e=this.cameraBehaviour.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(){var t,e;const i=null===(e=null===(t=this.cameraBehaviour)||void 0===t?void 0:t.cameraControl)||void 0===e?void 0:e.getCamera(),s=i||i;return(null==s?void 0:s.offset)?JSON.parse(JSON.stringify(s.offset)):{left:0,top:0,right:1,bottom:1}}getOrthographicOffsetCamera(){if(!this._orthographicOffsetCamera){const t=this.getCameraOffset(),e=5;let i=this._domHelper.getAspectRatio()*e,s=e;const n=ie();this._orthographicOffsetCamera=n.createOrthographicCamera(i/-2,i/2,s/2,s/-2,1,1e3,t),this._orthographicOffsetCamera.position.set(0,10,0),this._orthographicOffsetCamera.lookAt(new N(0,0,0))}return this._orthographicOffsetCamera}getPerspectiveOffsetCamera(){if(!this._perspectiveOffsetCamera){const t=this.getCameraOffset(),e=this._domHelper.getClientDimensions(),i=e.x,s=e.y,n=ie();this._perspectiveOffsetCamera=n.createPerspectiveCamera(30,i/s,.1,20,t)}return this._perspectiveOffsetCamera}updateEnvironment(t,e=!1){var i;if(t&&this._environment&&this._environment.needsBounds()){const i=t.getSize(new N);(i.x+i.y+i.z!==0||e)&&this._environment.updateBounds(t.getSize(new N),e)}null===(i=this._roomleRenderer)||void 0===i||i.updateBounds(t)}_onCameraIdle(){return!0}_onCameraMove(){return!0}_waitForAssets(){return Promise.resolve()}async exportCanvasScreenshot(t=1){return await this._waitForAssets(),new Promise(e=>{this._onAfterRender=()=>{const i=this._renderer.domElement.toDataURL(this._initData.transparentBackground?"image/png":"image/jpeg",t);e(i),this._onAfterRender=()=>{}},this._requestRender()})}async exportImageFromCamera(t,e=!1){return e&&await this._waitForAssets(),new Promise((e,i)=>{this._onAfterRender=()=>{this._onAfterRender=()=>{};const s=this._renderer.domElement.toDataURL("image/jpeg",1),{left:n,right:a,top:o,bottom:r}=this.getCameraOffset(),h=a-n,l=o-r;if(1===h&&1===l)return Kt(t,s),void e();const c=new Image;c.src=s,c.onload=()=>{const{naturalWidth:i,naturalHeight:s}=c,a=document.createElement("canvas");a.width=i*h,a.height=s*l;const r=a.getContext("2d"),d=i*n*-1,_=s*(1-o)*-1;r.drawImage(c,d,_),r.save(),Kt(t,a.toDataURL("image/jpeg",1)),e()},c.onerror=i},this._requestRender()})}changeEnvironmentMapIntensity(t){this._scene.userData.environmentDefinition.intensity=t}lockCamera(){this.cameraBehaviour.cameraControl.lock()}unlockCamera(){this.cameraBehaviour.cameraControl.unlock()}setEnvironmentMap(t,e,i,s){void 0!==t&&this._hdrEnvironmentLoader.loadUrl(this._renderer,t),void 0!==e&&(this._scene.userData.environmentDefinition.intensity=e),void 0!==i&&(this._scene.userData.environmentDefinition.rotation=i),void 0!==s&&(this._scene.userData.environmentDefinition.maxNoOfLightSources=s,this._roomleRenderer.forceShadowUpdates(!1)),this._requestRender()}_getCameraControl3D(t){return this._cameraControl3D?t&&this._cameraControl3D.setCurrentCameraParameters(t):this._cameraControl3D=new Jt(this._creator_,this._getInputManager(),t,this.getPerspectiveOffsetCamera()),this._cameraControl3D}_getCameraControl2D(){return this._cameraControl2D||(this._cameraControl2D=new xe(this._creator_,this._getInputManager(),null,this.getOrthographicOffsetCamera())),this._cameraControl2D}_getCameraControlFirstPerson(){return this._cameraControlFirstPerson||(this._cameraControlFirstPerson=new re(this._creator_,this._getInputManager(),null,this.getPerspectiveOffsetCamera())),this._cameraControlFirstPerson}}t("S",Pe),i([s],Pe.prototype,"_domHelper",void 0),i([s],Pe.prototype,"_scriptLoader",void 0),i([s],Pe.prototype,"_lifeCycleManager",void 0),i([s],Pe.prototype,"_staticItemLoader",void 0),i([s],Pe.prototype,"_hdrEnvironmentLoader",void 0),i([s],Pe.prototype,"_initData",void 0),i([s],Pe.prototype,"_globalInitData",void 0),i([s],Pe.prototype,"_globalCallback",void 0),i([s],Pe.prototype,"_idbManager",void 0),i([s],Pe.prototype,"_pluginSystem",void 0),i([s],Pe.prototype,"_imageRenderer",void 0),i([s],Pe.prototype,"_cameraBehaviourState",void 0),t("b",class{constructor(t,e){var i;return this._state=null,this._cameraChangeListener=null,this._cameraControl=t,this._state=e,(null===(i=window.__RML__DEBUG__)||void 0===i?void 0:i.camera)?Yt(this,"CameraBehaviour"):this}get state(){return this._state}setCameraChangeListener(t){this._cameraChangeListener=t}removeCameraChangeListener(){this._cameraChangeListener=null}_onCameraChanged(){this._cameraChangeListener&&this._cameraChangeListener()}})}}}));
2
+ //# sourceMappingURL=camera-behaviour-f5d2fa60.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"camera-behaviour-2088546c.legacy.js","sources":["../../../packages/three-build/src/Tween.js","../../../node_modules/three/examples/jsm/objects/GroundedSkybox.js","../../../packages/common-core/public/textures/env/legacy_env.exr","../../../packages/common-core/public/textures/env/default_1k.exr"],"sourcesContent":["export default \"static/Tween-d57ee5d181fce582.js\"","import { Mesh, MeshBasicMaterial, SphereGeometry, Vector3 } from 'three';\n\n/**\n * A ground-projected skybox. The height is how far the camera that took the photo was above the ground -\n * a larger value will magnify the downward part of the image. By default the object is centered at the camera,\n * so it is often helpful to set skybox.position.y = height to put the ground at the origin. Set the radius\n * large enough to ensure your user's camera stays inside.\n */\n\nclass GroundedSkybox extends Mesh {\n\n\tconstructor( map, height, radius, resolution = 128 ) {\n\n\t\tif ( height <= 0 || radius <= 0 || resolution <= 0 ) {\n\n\t\t\tthrow new Error( 'GroundedSkybox height, radius, and resolution must be positive.' );\n\n\t\t}\n\n\t\tconst geometry = new SphereGeometry( radius, 2 * resolution, resolution );\n\t\tgeometry.scale( 1, 1, - 1 );\n\n\t\tconst pos = geometry.getAttribute( 'position' );\n\t\tconst tmp = new Vector3();\n\n\t\tfor ( let i = 0; i < pos.count; ++ i ) {\n\n\t\t\ttmp.fromBufferAttribute( pos, i );\n\t\t\tif ( tmp.y < 0 ) {\n\n\t\t\t\t// Smooth out the transition from flat floor to sphere:\n\t\t\t\tconst y1 = - height * 3 / 2;\n\t\t\t\tconst f =\n\t\t\t\t\t\ttmp.y < y1 ? - height / tmp.y : ( 1 - tmp.y * tmp.y / ( 3 * y1 * y1 ) );\n\t\t\t\ttmp.multiplyScalar( f );\n\t\t\t\ttmp.toArray( pos.array, 3 * i );\n\n\t\t\t}\n\n\t\t}\n\n\t\tpos.needsUpdate = true;\n\n\t\tsuper( geometry, new MeshBasicMaterial( { map, depthWrite: false } ) );\n\n\t}\n\n}\n\nexport { GroundedSkybox };\n","export default \"static/legacy_env-d5810ec5057d4716.exr\"","export default \"static/default_1k-2aa6d42244d30fb1.exr\""],"names":["exports","GroundedSkybox","_Mesh","map","height","radius","resolution","arguments","length","undefined","_classCallCheck","Error","geometry","SphereGeometry","scale","pos","getAttribute","tmp","Vector3","i","count","fromBufferAttribute","y","y1","f","multiplyScalar","toArray","array","needsUpdate","_callSuper","MeshBasicMaterial","depthWrite","_inherits","_createClass","Mesh"],"mappings":"8pCAAAA,EAAA,IAAe,00hDCEf,IAOMC,YAAcC,GAEnB,SAAAD,EAAaE,EAAKC,EAAQC,GAA2B,IAAnBC,EAAUC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,IAE9C,GAFiDG,QAAAT,GAE5CG,GAAU,GAAKC,GAAU,GAAKC,GAAc,EAEhD,MAAM,IAAIK,MAAO,mEAIlB,IAAMC,EAAW,IAAIC,GAAgBR,EAAQ,EAAIC,EAAYA,GAC7DM,EAASE,MAAO,EAAG,GAAK,GAKxB,IAHA,IAAMC,EAAMH,EAASI,aAAc,YAC7BC,EAAM,IAAIC,EAENC,EAAI,EAAGA,EAAIJ,EAAIK,QAAUD,EAGlC,GADAF,EAAII,oBAAqBN,EAAKI,GACzBF,EAAIK,EAAI,EAAI,CAGhB,IAAMC,EAAgB,GAATnB,EAAa,EACpBoB,EACJP,EAAIK,EAAIC,GAAOnB,EAASa,EAAIK,EAAM,EAAIL,EAAIK,EAAIL,EAAIK,GAAM,EAAIC,EAAKA,GACnEN,EAAIQ,eAAgBD,GACpBP,EAAIS,QAASX,EAAIY,MAAO,EAAIR,GAMP,OAAvBJ,EAAIa,aAAc,EAAKC,QAAA5B,EAAA,CAEhBW,EAAU,IAAIkB,GAAmB,CAAE3B,IAAAA,EAAK4B,YAAY,MAE3D,OAAAC,GAAA/B,EAAAC,GAAA+B,GAAAhC,IApC2BiC,48oBCTd,woDCAA"}
1
+ {"version":3,"file":"camera-behaviour-f5d2fa60.legacy.js","sources":["../../../packages/three-build/src/Tween.js","../../../node_modules/three/examples/jsm/objects/GroundedSkybox.js","../../../packages/common-core/public/textures/env/legacy_env.exr","../../../packages/common-core/public/textures/env/default_1k.exr"],"sourcesContent":["export default \"static/Tween-d57ee5d181fce582.js\"","import { Mesh, MeshBasicMaterial, SphereGeometry, Vector3 } from 'three';\n\n/**\n * A ground-projected skybox. The height is how far the camera that took the photo was above the ground -\n * a larger value will magnify the downward part of the image. By default the object is centered at the camera,\n * so it is often helpful to set skybox.position.y = height to put the ground at the origin. Set the radius\n * large enough to ensure your user's camera stays inside.\n */\n\nclass GroundedSkybox extends Mesh {\n\n\tconstructor( map, height, radius, resolution = 128 ) {\n\n\t\tif ( height <= 0 || radius <= 0 || resolution <= 0 ) {\n\n\t\t\tthrow new Error( 'GroundedSkybox height, radius, and resolution must be positive.' );\n\n\t\t}\n\n\t\tconst geometry = new SphereGeometry( radius, 2 * resolution, resolution );\n\t\tgeometry.scale( 1, 1, - 1 );\n\n\t\tconst pos = geometry.getAttribute( 'position' );\n\t\tconst tmp = new Vector3();\n\n\t\tfor ( let i = 0; i < pos.count; ++ i ) {\n\n\t\t\ttmp.fromBufferAttribute( pos, i );\n\t\t\tif ( tmp.y < 0 ) {\n\n\t\t\t\t// Smooth out the transition from flat floor to sphere:\n\t\t\t\tconst y1 = - height * 3 / 2;\n\t\t\t\tconst f =\n\t\t\t\t\t\ttmp.y < y1 ? - height / tmp.y : ( 1 - tmp.y * tmp.y / ( 3 * y1 * y1 ) );\n\t\t\t\ttmp.multiplyScalar( f );\n\t\t\t\ttmp.toArray( pos.array, 3 * i );\n\n\t\t\t}\n\n\t\t}\n\n\t\tpos.needsUpdate = true;\n\n\t\tsuper( geometry, new MeshBasicMaterial( { map, depthWrite: false } ) );\n\n\t}\n\n}\n\nexport { GroundedSkybox };\n","export default \"static/legacy_env-d5810ec5057d4716.exr\"","export default \"static/default_1k-2aa6d42244d30fb1.exr\""],"names":["exports","GroundedSkybox","_Mesh","map","height","radius","resolution","arguments","length","undefined","_classCallCheck","Error","geometry","SphereGeometry","scale","pos","getAttribute","tmp","Vector3","i","count","fromBufferAttribute","y","y1","f","multiplyScalar","toArray","array","needsUpdate","_callSuper","MeshBasicMaterial","depthWrite","_inherits","_createClass","Mesh"],"mappings":"8pCAAAA,EAAA,IAAe,q3hDCEf,IAOMC,YAAcC,GAEnB,SAAAD,EAAaE,EAAKC,EAAQC,GAA2B,IAAnBC,EAAUC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,IAE9C,GAFiDG,QAAAT,GAE5CG,GAAU,GAAKC,GAAU,GAAKC,GAAc,EAEhD,MAAM,IAAIK,MAAO,mEAIlB,IAAMC,EAAW,IAAIC,GAAgBR,EAAQ,EAAIC,EAAYA,GAC7DM,EAASE,MAAO,EAAG,GAAK,GAKxB,IAHA,IAAMC,EAAMH,EAASI,aAAc,YAC7BC,EAAM,IAAIC,EAENC,EAAI,EAAGA,EAAIJ,EAAIK,QAAUD,EAGlC,GADAF,EAAII,oBAAqBN,EAAKI,GACzBF,EAAIK,EAAI,EAAI,CAGhB,IAAMC,EAAgB,GAATnB,EAAa,EACpBoB,EACJP,EAAIK,EAAIC,GAAOnB,EAASa,EAAIK,EAAM,EAAIL,EAAIK,EAAIL,EAAIK,GAAM,EAAIC,EAAKA,GACnEN,EAAIQ,eAAgBD,GACpBP,EAAIS,QAASX,EAAIY,MAAO,EAAIR,GAMP,OAAvBJ,EAAIa,aAAc,EAAKC,QAAA5B,EAAA,CAEhBW,EAAU,IAAIkB,GAAmB,CAAE3B,IAAAA,EAAK4B,YAAY,MAE3D,OAAAC,GAAA/B,EAAAC,GAAA+B,GAAAhC,IApC2BiC,48oBCTd,woDCAA"}
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-5672400b.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./TextGeometry-25959a81.legacy.js"],(function(e){var i,t,n,a,s,l,o,r,c,h,_,d,m,g,x,u,p,y,w;return{setters:[function(e){i=e.b6,t=e.s,n=e._,a=e.i},function(e){s=e.Y,l=e.a,o=e.s,r=e.h,c=e.u,h=e.bt,_=e.B,d=e.z,m=e.x,g=e.b,x=e.l,u=e.Q,p=e.bi,y=e.b$},function(e){w=e.T}],execute:function(){const b="component_dimensioning_line_material",z="component_dimensioning_plane_material",M="component_dimensioning_text_material";class S{constructor(e,i,t){this._direction=S._getDirection(e);const n=S._getDefaultLabelDirection(e,this._direction),a=t.dot(n)>=0;this._labelDirection=S._calculateActualLabelDirection(e,a,n),this._origin=S._calculateOrigin(e,i,a)}get direction(){return this._direction}get labelDirection(){return this._labelDirection}getEdge(e,i,t){const n=this._origin.clone().add(this._direction.clone().multiplyScalar(e)).add(this._labelDirection.clone().multiplyScalar(t)),a=this._origin.clone().add(this._direction.clone().multiplyScalar(i)).add(this._labelDirection.clone().multiplyScalar(t));return new y(n,a)}static _getDirection(e){return e.axis?t(e.axis.direction).normalize():"x"===e.dimensioning.axis?new l(1,0,0):"y"===e.dimensioning.axis?new l(0,0,1):new l(0,1,0)}static _getDefaultLabelDirection(e,i){if(e.axis){const n=t(e.axis.labelDirection);return i.clone().cross(n).cross(i).normalize()}return"x"===e.dimensioning.axis?new l(0,1,0):(e.dimensioning.axis,new l(-1,0,0))}static _calculateActualLabelDirection(e,i,t){if(i)if(e.axis){if(e.axis.alternativeOrigin)return t.clone().multiplyScalar(-1)}else if("y"===e.dimensioning.axis||"z"===e.dimensioning.axis)return t.clone().multiplyScalar(-1);return t}static _calculateOrigin(e,i,n){const a=i.getCenter(new l),s=i.getSize(new l);return e.axis?n&&e.axis.alternativeOrigin?t(e.axis.alternativeOrigin):t(e.axis.origin):"x"===e.dimensioning.axis?new l(0,a.y+.5*s.y,a.z-.5*s.z):"y"===e.dimensioning.axis?new l(a.x+s.x*(n?.5:-.5),a.y-.5*s.y,0):new l(a.x+s.x*(n?.5:-.5),0,a.z-.5*s.z)}}class f extends s{constructor(e,t,n,a){super(),this._size=t.getSize(new l),this._relativeCameraDirection=a.clone(),this._dimensioning=i(e.dimensioning),this._axis=new S(e,t,a),this._level=this._dimensioning.maxLevel-this._dimensioning.level,this._font=n,this._init()}clone(){console.warn("Will not clone ComponentDimensioning")}_initMaterials(){this._cacheHolder.materialCache.has(b)?this._lineMaterial=this._cacheHolder.materialCache.get(b):(this._lineMaterial=new o({color:3618615}),this._cacheHolder.materialCache.set(b,this._lineMaterial)),this._cacheHolder.materialCache.has(z)?this._planeMaterial=this._cacheHolder.materialCache.get(z):(this._planeMaterial=new r({color:16777215,side:c,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(z,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new h({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){this._initMaterials();let e=new _;this._line=new d(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.axis,this._text=new m(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.axis,this._plane=new m(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.axis;let i,t=new _,n=Math.round(Math.max(this._size.y,this._size.x,this._size.z)),a=Math.abs(this._dimensioning.to-this._dimensioning.from),s=.025+(n<4?0:.005*n);a<.3&&(s*=.5+a);let o={font:this._font,size:s,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001,depth:.001},r=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*a),c=new w(r,o);c.computeBoundingBox();let h=c.boundingBox.getSize(new l).y;const p=.05+(.06+h)*this._level;i=this._axis.getEdge(this._dimensioning.from,this._dimensioning.to,p),this._addEdgeSideLines(h,i,this._axis.labelDirection.clone());let y=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new g(new Float32Array(y),3)),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=c;const b=this._axis.direction.clone(),z=this._axis.labelDirection.clone();new l(0,1,0).dot(z)<Math.SQRT1_2&&z.multiplyScalar(-1);const M=b.clone().cross(z);let S=(new x).makeBasis(b,z,M);this._relativeCameraDirection.dot(M)>0&&(S=S.multiply((new x).makeRotationY(Math.PI)));const f=(new u).setFromRotationMatrix(S);this._addText(i,c,f,this._axis.labelDirection.clone().multiplyScalar(.04))}_addEdgeSideLines(e,i,t){const n=.5*-(.06+e),a=i.start.clone(),s=i.start.clone().add(t.clone().multiplyScalar(n)),l=i.end.clone(),o=i.end.clone().add(t.clone().multiplyScalar(n));this._addLine(s,a),this._addLine(o,l)}_addLine(e,i){let t=new _,n=[e.x,e.y,e.z,i.x,i.y,i.z];t.setAttribute("position",new g(new Float32Array(n),3)),this.add(new d(t,this._lineMaterial))}_addText(e,i,t,n){let a=e.getCenter(new l);a.add(n);let s=i.boundingBox.getSize(new l);i.center(),this._text.position.copy(a),this._text.quaternion.copy(t),this.add(this._text);let o=new p(s.x+.02,s.y+.02,32);o.center(),this._plane.geometry=o,this._plane.position.copy(a),this._plane.quaternion.copy(t),this.add(this._plane)}}e("default",f),n([a],f.prototype,"_cacheHolder",void 0),n([a],f.prototype,"_unitFormatter",void 0)}}}));
2
- //# sourceMappingURL=component-dimensioning-f04cf8d0.legacy.js.map
1
+ System.register(["./roomle-dependency-injection-f9e80d9c.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./TextGeometry-25959a81.legacy.js"],(function(e){var i,t,n,a,s,l,o,r,c,h,_,d,m,g,x,u,p,y,w;return{setters:[function(e){i=e.b6,t=e.s,n=e._,a=e.i},function(e){s=e.Y,l=e.a,o=e.s,r=e.h,c=e.u,h=e.bt,_=e.B,d=e.z,m=e.x,g=e.b,x=e.l,u=e.Q,p=e.bi,y=e.b$},function(e){w=e.T}],execute:function(){const b="component_dimensioning_line_material",z="component_dimensioning_plane_material",M="component_dimensioning_text_material";class f{constructor(e,i,t){this._direction=f._getDirection(e);const n=f._getDefaultLabelDirection(e,this._direction),a=t.dot(n)>=0;this._labelDirection=f._calculateActualLabelDirection(e,a,n),this._origin=f._calculateOrigin(e,i,a)}get direction(){return this._direction}get labelDirection(){return this._labelDirection}getEdge(e,i,t){const n=this._origin.clone().add(this._direction.clone().multiplyScalar(e)).add(this._labelDirection.clone().multiplyScalar(t)),a=this._origin.clone().add(this._direction.clone().multiplyScalar(i)).add(this._labelDirection.clone().multiplyScalar(t));return new y(n,a)}static _getDirection(e){return e.axis?t(e.axis.direction).normalize():"x"===e.dimensioning.axis?new l(1,0,0):"y"===e.dimensioning.axis?new l(0,0,1):new l(0,1,0)}static _getDefaultLabelDirection(e,i){if(e.axis){const n=t(e.axis.labelDirection);return i.clone().cross(n).cross(i).normalize()}return"x"===e.dimensioning.axis?new l(0,1,0):(e.dimensioning.axis,new l(-1,0,0))}static _calculateActualLabelDirection(e,i,t){if(i)if(e.axis){if(e.axis.alternativeOrigin)return t.clone().multiplyScalar(-1)}else if("y"===e.dimensioning.axis||"z"===e.dimensioning.axis)return t.clone().multiplyScalar(-1);return t}static _calculateOrigin(e,i,n){const a=i.getCenter(new l),s=i.getSize(new l);return e.axis?n&&e.axis.alternativeOrigin?t(e.axis.alternativeOrigin):t(e.axis.origin):"x"===e.dimensioning.axis?new l(0,a.y+.5*s.y,a.z-.5*s.z):"y"===e.dimensioning.axis?new l(a.x+s.x*(n?.5:-.5),a.y-.5*s.y,0):new l(a.x+s.x*(n?.5:-.5),0,a.z-.5*s.z)}}class S extends s{constructor(e,t,n,a){super(),this._size=t.getSize(new l),this._relativeCameraDirection=a.clone(),this._dimensioning=i(e.dimensioning),this._axis=new f(e,t,a),this._level=this._dimensioning.maxLevel-this._dimensioning.level,this._font=n,this._init()}clone(){console.warn("Will not clone ComponentDimensioning")}_initMaterials(){this._cacheHolder.materialCache.has(b)?this._lineMaterial=this._cacheHolder.materialCache.get(b):(this._lineMaterial=new o({color:3618615}),this._cacheHolder.materialCache.set(b,this._lineMaterial)),this._cacheHolder.materialCache.has(z)?this._planeMaterial=this._cacheHolder.materialCache.get(z):(this._planeMaterial=new r({color:16777215,side:c,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(z,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new h({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){this._initMaterials();let e=new _;this._line=new d(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.axis,this._text=new m(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.axis,this._plane=new m(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.axis;let i,t=new _,n=Math.round(Math.max(this._size.y,this._size.x,this._size.z)),a=Math.abs(this._dimensioning.to-this._dimensioning.from),s=.025+(n<4?0:.005*n);a<.3&&(s*=.5+a);let o={font:this._font,size:s,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001,depth:.001},r=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*a),c=new w(r,o);c.computeBoundingBox();let h=c.boundingBox.getSize(new l).y;const p=.05+(.06+h)*this._level;i=this._axis.getEdge(this._dimensioning.from,this._dimensioning.to,p),this._addEdgeSideLines(h,i,this._axis.labelDirection.clone());let y=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new g(new Float32Array(y),3)),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=c;const b=this._axis.direction.clone(),z=this._axis.labelDirection.clone();new l(0,1,0).dot(z)<Math.SQRT1_2&&z.multiplyScalar(-1);const M=b.clone().cross(z);let f=(new x).makeBasis(b,z,M);this._relativeCameraDirection.dot(M)>0&&(f=f.multiply((new x).makeRotationY(Math.PI)));const S=(new u).setFromRotationMatrix(f);this._addText(i,c,S,this._axis.labelDirection.clone().multiplyScalar(.04))}_addEdgeSideLines(e,i,t){const n=.5*-(.06+e),a=i.start.clone(),s=i.start.clone().add(t.clone().multiplyScalar(n)),l=i.end.clone(),o=i.end.clone().add(t.clone().multiplyScalar(n));this._addLine(s,a),this._addLine(o,l)}_addLine(e,i){let t=new _,n=[e.x,e.y,e.z,i.x,i.y,i.z];t.setAttribute("position",new g(new Float32Array(n),3)),this.add(new d(t,this._lineMaterial))}_addText(e,i,t,n){let a=e.getCenter(new l);a.add(n);let s=i.boundingBox.getSize(new l);i.center(),this._text.position.copy(a),this._text.quaternion.copy(t),this.add(this._text);let o=new p(s.x+.02,s.y+.02,32);o.center(),this._plane.geometry=o,this._plane.position.copy(a),this._plane.quaternion.copy(t),this.add(this._plane)}}e("default",S),n([a],S.prototype,"_cacheHolder",void 0),n([a],S.prototype,"_unitFormatter",void 0)}}}));
2
+ //# sourceMappingURL=component-dimensioning-0224eda5.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-dimensioning-0224eda5.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./main-thread-to-worker-83f62641.legacy.js","./roomle-dependency-injection-5672400b.legacy.js"],(function(e){var t,i,n,a,s,r,c,o,l;return{setters:[function(e){t=e.bN,i=e.c7,n=e.x,a=e.t,s=e.ak,r=e.a,c=e.au,o=e.l},function(e){l=e.aw}],execute:function(){e("default",class{constructor(){this._nonTransparentComponent=null,this._raycaster=new t,this._raycaster.near=.1,this._raycaster.layers.enable(3),this._raycaster.layers.enable(4),this._raycaster.layers.enable(5),this._raycaster.layers.enable(6)}init(e,t){this._object=e,this._camera=t,this.checkComponentVisibility=i(this.checkComponentVisibility,100).bind(this),this.checkPreviewVisibility=i(this.checkPreviewVisibility,100).bind(this)}setCamera(e){this._camera=e}setObject(e){this._object=e}changeMaterialsOnSelect(e,t,i=!1,n){t!==this._nonTransparentComponent&&(this._nonTransparentComponent=t,this._changeMaterialsOnSelect(e,t,i,n))}_changeMaterialsOnSelect(e,t,i=!1,s){if(e.children.length>0&&e.children.forEach(a=>{const r=t&&e.id===t.id||i,c=!(a instanceof n);a.userData.ignoreComponentRaycast||this._changeMaterialsOnSelect(a,t,(!r||!c)&&r,s)}),t)e instanceof n&&e.material instanceof a&&!e.userData.oldMaterial&&(e.userData.oldMaterial=e.material,e.material=e.material.clone(),i||l(e,{opacity:.2,transparent:!0}).then(()=>{null==s||s()}));else if(e.userData.oldMaterial&&e instanceof n&&e.material instanceof a){const{opacity:t,transparent:i}=e.userData.oldMaterial;l(e,{opacity:t,transparent:i}).then(()=>null==s?void 0:s()),e.userData.oldMaterial=void 0}}isComponentVisible(e){const t=[];e.traverse(e=>t.push(e.uuid));const i=(new s).setFromObject(e).getCenter(new r),n=(new r).subVectors(i,this._camera.position).normalize();this._raycaster.set(this._camera.position,n),this._raycaster.far=this._camera.position.distanceTo(i);const a=[];return this._raycaster.intersectObjects(this._object.children,!0).forEach(e=>{e.object.material.visible&&(t.includes(e.object.uuid)||e.object.userData.ignoreComponentRaycast||a.push(e))}),0===a.length}checkComponentAndPreviewVisibility(e,t){e.hasSelection()?this.checkComponentVisibility(e,t):t.hasPreviews()?this.checkPreviewVisibility(t):this.changeMaterialsOnSelect(this._object,null)}checkComponentVisibility(e,t){if(!e.hasSelection())return;const i=t.getComponentsForIds(e.getSelectedRuntimeComponentIds());if(i.length>1)return;const n=i[0];this.isComponentVisible(n)?this.changeMaterialsOnSelect(this._object,null):this.changeMaterialsOnSelect(this._object,n)}areAllPreviewsVisible(e){if(!e.hasPreviews())return!0;const t=e.getPreviews();return 0===t.length||t.map(e=>this.isComponentVisible(e)).reduce((e,t)=>e&&t)}areAllComponentsInFrustum(e){if(0===e.length)return!0;const t=new c,i=(new o).multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse),n=new s;return t.setFromProjectionMatrix(i),e.map(e=>(e=>{const i=n.setFromObject(e).getCenter(new r);return t.containsPoint(i)})(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){e.hasPreviewLines()||(this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._object,null):this.changeMaterialsOnSelect(this._object,{id:-1}))}})}}}));
2
- //# sourceMappingURL=component-raycast-helper-967cd80e.legacy.js.map
1
+ System.register(["./main-thread-to-worker-83f62641.legacy.js","./roomle-dependency-injection-f9e80d9c.legacy.js"],(function(e){var t,i,n,a,s,r,c,o,l;return{setters:[function(e){t=e.bN,i=e.c7,n=e.x,a=e.t,s=e.ak,r=e.a,c=e.au,o=e.l},function(e){l=e.aw}],execute:function(){e("default",class{constructor(){this._nonTransparentComponent=null,this._raycaster=new t,this._raycaster.near=.1,this._raycaster.layers.enable(3),this._raycaster.layers.enable(4),this._raycaster.layers.enable(5),this._raycaster.layers.enable(6)}init(e,t){this._object=e,this._camera=t,this.checkComponentVisibility=i(this.checkComponentVisibility,100).bind(this),this.checkPreviewVisibility=i(this.checkPreviewVisibility,100).bind(this)}setCamera(e){this._camera=e}setObject(e){this._object=e}changeMaterialsOnSelect(e,t,i=!1,n){t!==this._nonTransparentComponent&&(this._nonTransparentComponent=t,this._changeMaterialsOnSelect(e,t,i,n))}_changeMaterialsOnSelect(e,t,i=!1,s){if(e.children.length>0&&e.children.forEach(a=>{const r=t&&e.id===t.id||i,c=!(a instanceof n);a.userData.ignoreComponentRaycast||this._changeMaterialsOnSelect(a,t,(!r||!c)&&r,s)}),t)e instanceof n&&e.material instanceof a&&!e.userData.oldMaterial&&(e.userData.oldMaterial=e.material,e.material=e.material.clone(),i||l(e,{opacity:.2,transparent:!0}).then(()=>{null==s||s()}));else if(e.userData.oldMaterial&&e instanceof n&&e.material instanceof a){const{opacity:t,transparent:i}=e.userData.oldMaterial;l(e,{opacity:t,transparent:i}).then(()=>null==s?void 0:s()),e.userData.oldMaterial=void 0}}isComponentVisible(e){const t=[];e.traverse(e=>t.push(e.uuid));const i=(new s).setFromObject(e).getCenter(new r),n=(new r).subVectors(i,this._camera.position).normalize();this._raycaster.set(this._camera.position,n),this._raycaster.far=this._camera.position.distanceTo(i);const a=[];return this._raycaster.intersectObjects(this._object.children,!0).forEach(e=>{e.object.material.visible&&(t.includes(e.object.uuid)||e.object.userData.ignoreComponentRaycast||a.push(e))}),0===a.length}checkComponentAndPreviewVisibility(e,t){e.hasSelection()?this.checkComponentVisibility(e,t):t.hasPreviews()?this.checkPreviewVisibility(t):this.changeMaterialsOnSelect(this._object,null)}checkComponentVisibility(e,t){if(!e.hasSelection())return;const i=t.getComponentsForIds(e.getSelectedRuntimeComponentIds());if(i.length>1)return;const n=i[0];this.isComponentVisible(n)?this.changeMaterialsOnSelect(this._object,null):this.changeMaterialsOnSelect(this._object,n)}areAllPreviewsVisible(e){if(!e.hasPreviews())return!0;const t=e.getPreviews();return 0===t.length||t.map(e=>this.isComponentVisible(e)).reduce((e,t)=>e&&t)}areAllComponentsInFrustum(e){if(0===e.length)return!0;const t=new c,i=(new o).multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse),n=new s;return t.setFromProjectionMatrix(i),e.map(e=>(e=>{const i=n.setFromObject(e).getCenter(new r);return t.containsPoint(i)})(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){e.hasPreviewLines()||(this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._object,null):this.changeMaterialsOnSelect(this._object,{id:-1}))}})}}}));
2
+ //# sourceMappingURL=component-raycast-helper-6e8975b4.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-raycast-helper-6e8975b4.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./script-loader-1e570149.legacy.js","./roomle-dependency-injection-5672400b.legacy.js","./camera-behaviour-2088546c.legacy.js","./component-raycast-helper-967cd80e.legacy.js","./roomle-configurator-4891f01a.legacy.js","./query-params-helper-1160ef5b.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./Object3D-978403f4.legacy.js","./default-light-setting-e6e3c9ef.legacy.js","./external-objects-b826c1cf.legacy.js"],(function(e){var n,t,o,c,a,r,i,s,l,u,p,g,f,h;return{setters:[function(e){n=e.S,t=e.M},function(e){o=e.D,c=e.L,a=e.R,r=e.a,i=e.b,s=e.A},function(e){l=e.C,u=e.a},function(e){p=e.default},function(e){g=e.C,f=e.a,h=e.R},function(){},function(){},function(){},function(){},function(){}],execute:function(){const d=[new o("logger",c),new o("rapi-access",a),new o("script-loader",n),new o("camera-control-3d",l),new o("camera-control",u),new o("data-syncer",r),new o("configurator-scene-manager",g,1),new o("configurator-view-model",f,1),new o("component-raycast-helper",p,0)];e("Configurator",class extends t{setupDependencies(){i.setup(d),this.lookup("planner-kernel-access",this._context).init(1),this.lookup("rapi-access",this._context),this.lookup("script-loader",this._context),this.lookup("logger",this._context)}cleanUpGlobals(){delete window.RoomleConfigurator}cleanUpDependencies(){const e=this.lookup("script-loader"),n=this.lookup("rapi-access");this.lookup("dom-helper");const t=this.lookup("configurator-scene-manager");e&&e.cleanUp(),n&&n.cleanUp(),t&&t.cleanUp()}setupGlobals(e){const{kernelInstance:n,kernelContainer:t,planObjectId:o}=e||{};s.init({kernelInstance:n,kernelContainer:t,planObjectId:o})}getApi(){return this._configurator}bootFinished(){this._configurator=new h(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}})}}}));
2
- //# sourceMappingURL=configurator-6d32b749.legacy.js.map
1
+ System.register(["./script-loader-c7c8f3b8.legacy.js","./roomle-dependency-injection-f9e80d9c.legacy.js","./camera-behaviour-f5d2fa60.legacy.js","./component-raycast-helper-6e8975b4.legacy.js","./roomle-configurator-88689bbd.legacy.js","./query-params-helper-1160ef5b.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./Object3D-978403f4.legacy.js","./default-light-setting-05238ba4.legacy.js","./external-objects-b826c1cf.legacy.js"],(function(e){var n,t,o,c,a,r,i,s,l,u,p,f,g,d;return{setters:[function(e){n=e.S,t=e.M},function(e){o=e.D,c=e.L,a=e.R,r=e.a,i=e.b,s=e.A},function(e){l=e.C,u=e.a},function(e){p=e.default},function(e){f=e.C,g=e.a,d=e.R},function(){},function(){},function(){},function(){},function(){}],execute:function(){const h=[new o("logger",c),new o("rapi-access",a),new o("script-loader",n),new o("camera-control-3d",l),new o("camera-control",u),new o("data-syncer",r),new o("configurator-scene-manager",f,1),new o("configurator-view-model",g,1),new o("component-raycast-helper",p,0)];e("Configurator",class extends t{setupDependencies(){i.setup(h),this.lookup("planner-kernel-access",this._context).init(1),this.lookup("rapi-access",this._context),this.lookup("script-loader",this._context),this.lookup("logger",this._context)}cleanUpGlobals(){delete window.RoomleConfigurator}cleanUpDependencies(){const e=this.lookup("script-loader"),n=this.lookup("rapi-access");this.lookup("dom-helper");const t=this.lookup("configurator-scene-manager");e&&e.cleanUp(),n&&n.cleanUp(),t&&t.cleanUp()}setupGlobals(e){const{kernelInstance:n,kernelContainer:t,planObjectId:o}=e||{};s.init({kernelInstance:n,kernelContainer:t,planObjectId:o})}getApi(){return this._configurator}bootFinished(){this._configurator=new d(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}})}}}));
2
+ //# sourceMappingURL=configurator-0dafcb92.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configurator-0dafcb92.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./configurator-6d32b749.legacy.js","./script-loader-1e570149.legacy.js","./query-params-helper-1160ef5b.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./roomle-dependency-injection-5672400b.legacy.js","./camera-behaviour-2088546c.legacy.js","./component-raycast-helper-967cd80e.legacy.js","./roomle-configurator-4891f01a.legacy.js","./Object3D-978403f4.legacy.js","./default-light-setting-e6e3c9ef.legacy.js","./external-objects-b826c1cf.legacy.js"],(function(){var e;return{setters:[function(n){e=n.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let n=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
1
+ System.register(["./configurator-0dafcb92.legacy.js","./script-loader-c7c8f3b8.legacy.js","./query-params-helper-1160ef5b.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./roomle-dependency-injection-f9e80d9c.legacy.js","./camera-behaviour-f5d2fa60.legacy.js","./component-raycast-helper-6e8975b4.legacy.js","./roomle-configurator-88689bbd.legacy.js","./Object3D-978403f4.legacy.js","./default-light-setting-05238ba4.legacy.js","./external-objects-b826c1cf.legacy.js"],(function(){var e;return{setters:[function(c){e=c.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let c=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-c))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
2
2
  //# sourceMappingURL=configurator-main.legacy.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-5672400b.legacy.js","./main-thread-to-worker-83f62641.legacy.js"],(function(e){var i,t,r,s,n;return{setters:[function(e){i=e.s},function(e){t=e.b0,r=e.h,s=e.u,n=e.x}],execute:function(){e("default",class{constructor(){this._currentInnerRadius=0}init(e,i,t){this._drawingGroup=e,this._continuousDrawingManager=i,this._kernelZoomFactor=t,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3,i=new t(e,e+e/50,32),c=new r({color:10066329,side:s});this._circleMesh=new n(i,c),this._circleMesh.name="Circle",this._circleMesh.rotation.set(Math.PI/2,0,0),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._drawingGroup.add(this._circleMesh)}_updateCircle(){if(!this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3;if(e!==this._currentInnerRadius){const i=e+e/50;this._circleMesh.geometry=new t(e,i,32)}const r=i(this._continuousDrawingManager.getStartPoint());r.y=5,this._circleMesh.position.copy(r),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=e}setKernelZoomFactor(e){this._kernelZoomFactor=e}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}})}}}));
2
- //# sourceMappingURL=continuous-drawing-helper-6985bc30.legacy.js.map
1
+ System.register(["./roomle-dependency-injection-f9e80d9c.legacy.js","./main-thread-to-worker-83f62641.legacy.js"],(function(e){var i,t,r,s,n;return{setters:[function(e){i=e.s},function(e){t=e.b0,r=e.h,s=e.u,n=e.x}],execute:function(){e("default",class{constructor(){this._currentInnerRadius=0}init(e,i,t){this._drawingGroup=e,this._continuousDrawingManager=i,this._kernelZoomFactor=t,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3,i=new t(e,e+e/50,32),c=new r({color:10066329,side:s});this._circleMesh=new n(i,c),this._circleMesh.name="Circle",this._circleMesh.rotation.set(Math.PI/2,0,0),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._drawingGroup.add(this._circleMesh)}_updateCircle(){if(!this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3;if(e!==this._currentInnerRadius){const i=e+e/50;this._circleMesh.geometry=new t(e,i,32)}const r=i(this._continuousDrawingManager.getStartPoint());r.y=5,this._circleMesh.position.copy(r),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=e}setKernelZoomFactor(e){this._kernelZoomFactor=e}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}})}}}));
2
+ //# sourceMappingURL=continuous-drawing-helper-b2afe8d1.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continuous-drawing-helper-b2afe8d1.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./camera-behaviour-2088546c.legacy.js","./roomle-dependency-injection-5672400b.legacy.js","./main-thread-to-worker-83f62641.legacy.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.n},function(i){e=i.D,n=i.C,o=i.V,s=i.a,h=i.A}],execute:function(){i("D",class extends t{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new e(new n(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new o(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new s(0,0,0)),this._secondDirectionalLight=new e(new n(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new o(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new s(0,0,0)),this._ambientLight=new h(new n(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new s),a=Math.max(Math.max(t.x,t.y),t.z)+1,e=a/2;this._mainDirectionalLight.shadow.camera.top=e,this._mainDirectionalLight.shadow.camera.bottom=-e,this._mainDirectionalLight.shadow.camera.left=-e,this._mainDirectionalLight.shadow.camera.right=e,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=e,this._secondDirectionalLight.shadow.camera.bottom=-e,this._secondDirectionalLight.shadow.camera.left=-e,this._secondDirectionalLight.shadow.camera.right=e,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=a();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new n(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}}}})}}}));
2
- //# sourceMappingURL=default-light-setting-e6e3c9ef.legacy.js.map
1
+ System.register(["./camera-behaviour-f5d2fa60.legacy.js","./roomle-dependency-injection-f9e80d9c.legacy.js","./main-thread-to-worker-83f62641.legacy.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.n},function(i){e=i.D,n=i.C,o=i.V,s=i.a,h=i.A}],execute:function(){i("D",class extends t{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new e(new n(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new o(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new s(0,0,0)),this._secondDirectionalLight=new e(new n(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new o(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new s(0,0,0)),this._ambientLight=new h(new n(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new s),a=Math.max(Math.max(t.x,t.y),t.z)+1,e=a/2;this._mainDirectionalLight.shadow.camera.top=e,this._mainDirectionalLight.shadow.camera.bottom=-e,this._mainDirectionalLight.shadow.camera.left=-e,this._mainDirectionalLight.shadow.camera.right=e,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=e,this._secondDirectionalLight.shadow.camera.bottom=-e,this._secondDirectionalLight.shadow.camera.left=-e,this._secondDirectionalLight.shadow.camera.right=e,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=a();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new n(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}}}})}}}));
2
+ //# sourceMappingURL=default-light-setting-05238ba4.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-light-setting-05238ba4.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./roomle-dependency-injection-5672400b.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./TextGeometry-25959a81.legacy.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,x,g,u,w,b,y,T,L,z;return{setters:[function(t){i=t.b3,e=t.U,s=t._,n=t.i,h=t.j,o=t.b4,a=t.s},function(t){_=t.Y,d=t.a,r=t.h,p=t.u,m=t.bt,l=t.B,c=t.x,x=t.Q,g=t.bi,u=t.H,w=t.s,b=t.z,y=t.b,T=t.b$,L=t.ak},function(t){z=t.T}],execute:function(){const G="component_dimensioning_plane_material",M="component_dimensioning_text_material";class j extends _{constructor(t){super(),this._label="",this._parameters={font:null,size:.1,depth:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=t,this._position=new d,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(G)?this._planeMaterial=this._cacheHolder.materialCache.get(G):(this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(G,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new m({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){let t=new l;this._text=new c(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new c(t,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new z(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(t,i,e){this._position.copy(t),this._cameraPosition=e,this._label=i;const s=this.getWorldPosition(new d),n=this._cameraPosition.distanceTo(s),h=Math.max(.01,n/150),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new z(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new x;t.setFromAxisAngle(new d(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new d)}else if(this._updateText(this._textGeometry,new x,new d),this._cameraPosition){const t=this.getWorldPosition(new d),e=i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this.parent.rotation.y);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(t,i,e){let s=new d;s.copy(this._position),e.x*=this._getXSign(),s.add(e);let n=t.boundingBox.getSize(new d);t.center(),this._text.position.copy(s),i&&this._text.quaternion.copy(i);let h=new g(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),i&&this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}s([n],j.prototype,"_cacheHolder",void 0);class D{constructor(t){this._objectRotation=0,this._cameraPosition=new d,this._topDimensions=!1,this._initialized=new h,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new u,this._dimensionTextGroup=new _,this._creator_=t,this._lineMaterial=new w({color:3618615,linewidth:2});let i=new l;this._widthLine=new b(i,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new b(i,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new b(i,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),o.loadFont("static/lato_regular_sub-9dd2262895ccc1a9.json").then(t=>{this._font=t,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(t){this._enabled&&(this._dimensions||t)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let t=new l,i=this._getWidthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=t;let s=i.getCenter(new d);this._widthText||(this._widthText=new j(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let t=new l,i=this._getHeightEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=t;let s=i.getCenter(new d);this._heightText||(this._heightText=new j(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let t=new l,i=this._getDepthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=t;let s=i.getCenter(new d);this._depthText||(this._depthText=new j(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(t){this._origin=a(t.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=a(t.size);const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this.update()}update(t=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(t)}addToObject(t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&t.add(this._dimensionLineGroup)}removeFromObject(t){t.remove(this._dimensionLineGroup),this.update()}addToUiScene(t){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this._dimensionTextGroup.rotation.y=this._objectRotation,t.add(this._dimensionTextGroup),this.update()}removeFromUiScene(t){t.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const t=this._getRotation();return t>Math.PI/2||t<-Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(this._dimensions.x+.05,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const t=this._getRotation();return t>0&&t<Math.PI/2?new T(new d(-.05,0,.05),new d(-.05,this._dimensions.y+.05,.05)):t>Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):t<-Math.PI/2?new T(new d(.05+this._dimensions.x,0,this._dimensions.z-.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(t){this._onChange=t}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),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.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_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 t=new L;return t.expandByObject(this._widthLine),t.expandByObject(this._widthText),t.expandByObject(this._heightLine),t.expandByObject(this._heightText),t.expandByObject(this._depthLine),t.expandByObject(this._depthText),t}setVisibility(t){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=t,this._dimensionTextGroup.visible=t)}moveCameraStart(t){this.setVisibility(!1),this._cameraPosition=t,this.update()}moveCameraEnd(t){this.setVisibility(!0),this._cameraPosition=t,this.update()}clearScene(t){this._clear()}setObject(t,i=0){this._object=t,this._objectRotation=i}setUiScene(t){this._uiScene=t}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const t=this._object.getWorldPosition(new d);return i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this._objectRotation)}}t("default",D),s([n],D.prototype,"_unitFormatter",void 0)}}}));
2
- //# sourceMappingURL=dimensioning-helper-1859491f.legacy.js.map
1
+ System.register(["./roomle-dependency-injection-f9e80d9c.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./TextGeometry-25959a81.legacy.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,x,g,u,w,b,y,T,L,z;return{setters:[function(t){i=t.b3,e=t.U,s=t._,n=t.i,h=t.j,o=t.b4,a=t.s},function(t){_=t.Y,d=t.a,r=t.h,p=t.u,m=t.bt,l=t.B,c=t.x,x=t.Q,g=t.bi,u=t.H,w=t.s,b=t.z,y=t.b,T=t.b$,L=t.ak},function(t){z=t.T}],execute:function(){const G="component_dimensioning_plane_material",M="component_dimensioning_text_material";class j extends _{constructor(t){super(),this._label="",this._parameters={font:null,size:.1,depth:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},this.topDown=!1,this._parameters.font=t,this._position=new d,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(G)?this._planeMaterial=this._cacheHolder.materialCache.get(G):(this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(G,this._planeMaterial)),this._cacheHolder.materialCache.has(M)?this._textMaterial=this._cacheHolder.materialCache.get(M):(this._textMaterial=new m({color:3618615}),this._cacheHolder.materialCache.set(M,this._textMaterial))}_init(){let t=new l;this._text=new c(t,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new c(t,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new z(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(t,i,e){this._position.copy(t),this._cameraPosition=e,this._label=i;const s=this.getWorldPosition(new d),n=this._cameraPosition.distanceTo(s),h=Math.max(.01,n/150),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new z(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let t=new x;t.setFromAxisAngle(new d(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,t,new d)}else if(this._updateText(this._textGeometry,new x,new d),this._cameraPosition){const t=this.getWorldPosition(new d),e=i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this.parent.rotation.y);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(t,i,e){let s=new d;s.copy(this._position),e.x*=this._getXSign(),s.add(e);let n=t.boundingBox.getSize(new d);t.center(),this._text.position.copy(s),i&&this._text.quaternion.copy(i);let h=new g(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),i&&this._plane.quaternion.copy(i)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){e(this)}}s([n],j.prototype,"_cacheHolder",void 0);class D{constructor(t){this._objectRotation=0,this._cameraPosition=new d,this._topDimensions=!1,this._initialized=new h,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new u,this._dimensionTextGroup=new _,this._creator_=t,this._lineMaterial=new w({color:3618615,linewidth:2});let i=new l;this._widthLine=new b(i,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new b(i,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new b(i,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new r({color:16777215,side:p,opacity:.8,transparent:!0}),o.loadFont("static/lato_regular_sub-9dd2262895ccc1a9.json").then(t=>{this._font=t,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(t){this._enabled&&(this._dimensions||t)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let t=new l,i=this._getWidthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=t;let s=i.getCenter(new d);this._widthText||(this._widthText=new j(this._font),this._dimensionTextGroup.add(this._widthText)),this._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,n,this._cameraPosition)}_updateHeight(){let t=new l,i=this._getHeightEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=t;let s=i.getCenter(new d);this._heightText||(this._heightText=new j(this._font),this._dimensionTextGroup.add(this._heightText)),this._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,n,this._cameraPosition)}_updateDepth(){let t=new l,i=this._getDepthEdge(),e=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];t.setAttribute("position",new y(new Float32Array(e),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=t;let s=i.getCenter(new d);this._depthText||(this._depthText=new j(this._font),this._dimensionTextGroup.add(this._depthText)),this._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(-1e3*this._dimensions.z);this._depthText.update(s,n,this._cameraPosition)}updateSize(t){this._origin=a(t.origin),this._dimensionLineGroup.position.x=this._origin.x-this._object.position.x,this._dimensionLineGroup.position.y=this._origin.y-this._object.position.y,this._dimensionLineGroup.position.z=this._origin.z-this._object.position.z,this._dimensions=a(t.size);const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this.update()}update(t=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(t)}addToObject(t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&t.add(this._dimensionLineGroup)}removeFromObject(t){t.remove(this._dimensionLineGroup),this.update()}addToUiScene(t){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const i=this._dimensionLineGroup.localToWorld(new d);this._dimensionTextGroup.position.copy(i),this._dimensionTextGroup.rotation.y=this._objectRotation,t.add(this._dimensionTextGroup),this.update()}removeFromUiScene(t){t.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const t=this._getRotation();return t>Math.PI/2||t<-Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(this._dimensions.x+.05,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,0,this._dimensions.z-.05)):new T(new d(-.05,0,.05),new d(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const t=this._getRotation();return t>0&&t<Math.PI/2?new T(new d(-.05,0,.05),new d(-.05,this._dimensions.y+.05,.05)):t>Math.PI/2?new T(new d(-.05,0,this._dimensions.z-.05),new d(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):t<-Math.PI/2?new T(new d(.05+this._dimensions.x,0,this._dimensions.z-.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new T(new d(.05+this._dimensions.x,0,.05),new d(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(t){this._onChange=t}enableTopDimensions(){this._topDimensions=!0,this.enableDimensions(),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.addToObject(this._object),this.addToUiScene(this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromUiScene(this._uiScene),this.removeFromObject(this._object)}_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 t=new L;return t.expandByObject(this._widthLine),t.expandByObject(this._widthText),t.expandByObject(this._heightLine),t.expandByObject(this._heightText),t.expandByObject(this._depthLine),t.expandByObject(this._depthText),t}setVisibility(t){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=t,this._dimensionTextGroup.visible=t)}moveCameraStart(t){this.setVisibility(!1),this._cameraPosition=t,this.update()}moveCameraEnd(t){this.setVisibility(!0),this._cameraPosition=t,this.update()}clearScene(t){this._clear()}setObject(t,i=0){this._object=t,this._objectRotation=i}setUiScene(t){this._uiScene=t}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const t=this._object.getWorldPosition(new d);return i(Math.atan2(this._cameraPosition.x-t.x,this._cameraPosition.z-t.z)-this._objectRotation)}}t("default",D),s([n],D.prototype,"_unitFormatter",void 0)}}}));
2
+ //# sourceMappingURL=dimensioning-helper-78fdeba9.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dimensioning-helper-1859491f.legacy.js","sources":["../../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-9dd2262895ccc1a9.json\""],"names":[],"mappings":"g4HAAe"}
1
+ {"version":3,"file":"dimensioning-helper-78fdeba9.legacy.js","sources":["../../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-9dd2262895ccc1a9.json\""],"names":[],"mappings":"g4HAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./script-loader-1e570149.legacy.js","./roomle-dependency-injection-5672400b.legacy.js","./camera-behaviour-2088546c.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./default-light-setting-e6e3c9ef.legacy.js","./glb-viewer-camera-behaviour-9a618475.legacy.js","./query-params-helper-1160ef5b.legacy.js"],(function(e){var t,r,i,a,n,s,o,h,c,l,d,_,m,u,g,p,v,w,b,C,f,S,y,L,M,B,I,x,G,j,E,F,O;return{setters:[function(e){t=e.S,r=e.M},function(e){i=e.aV,a=e.D,n=e.L,s=e.R,o=e.n,h=e._,c=e.i,l=e.H,d=e.K,_=e.O,m=e.U,u=e.b},function(e){g=e.C,p=e.L,v=e.S,w=e.T},function(e){b=e.a,C=e.ak,f=e.ao,S=e.Q,y=e.A,L=e.C,M=e.aM,B=e.a_,I=e.bL,x=e.j,G=e.bv,j=e.J,E=e.bU},function(e){F=e.D},function(e){O=e.G},function(){}],execute:function(){const D=[new a("script-loader",t),new a("glb-input-manager",class extends i{},1),new a("logger",n),new a("rapi-access",s)];class P extends g{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,i,a){let n=new b(-e.x/2,0,-e.z/2),s=new b(e.x/2,e.y,e.z/2);this._boundingBox=new C(n,s);let o=new f(-Math.PI/2+i,r,0,"ZYX"),h=(new S).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 k extends p{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new y(new L(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=o();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 L(e)})}}}class R extends v{constructor(e,t){super(e,t,l.GLB,M.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(d.createDynamicLightSettingSource(null,_.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new k(this._scene)))}createCameraControl(e,t){this._changeCameraBehaviour(new O(new P(this._creator_,this._getInputManager(),null),this._cameraBehaviourState))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const i=B(r);return i?this.loadGLB(i,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new b(1,1,1),i){return this.clearScene(),new Promise((a,n)=>{this._loadGLB(e,new b(0,0,0),0,void 0,r,void 0,void 0,i).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new C).setFromObject(this._currentGLB);t&&this.cameraBehaviour.cameraControl instanceof P&&this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(r),this._updateBounds(r,null,!0),this._readyForRender(),a()},n)})}preparePerspectiveImage(e,t,r){return new Promise(i=>{var a,n;t||(t=1e3),r||(r=1e3),e||((e=new I({antialias:!0})).setSize(t,r),e.outputColorSpace=x,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=G);let s=this.cameraBehaviour.cameraControl.getCamera().clone();s instanceof j&&(s.aspect=t/r,s.updateProjectionMatrix()),null===(a=this._lightSetting)||void 0===a||a.removeFromScene();let o=new F(this._scene);e.render(this._scene,s);let h=e.domElement.toDataURL();e.domElement.toBlob(e=>{i({image:h,width:t,height:r,blob:e})},"image/png"),o.removeFromScene(),null===(n=this._lightSetting)||void 0===n||n.addToScene()})}adjustCamera(e,t,r,i){if(this.cameraBehaviour.cameraControl instanceof P){let a=(new C).setFromObject(this._scene).getSize(new b);this.cameraBehaviour.cameraControl.adjust(a,e,t,r,i),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),m(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new C).setFromObject(this._currentGLB):null}get glbViewerCameraBehaviour(){return this.cameraBehaviour}getGeometryBounds(){return null}cameraBehaviourChanged(){super.cameraBehaviourChanged(),this.cameraBehaviour.cameraControl.addEventListener(3,()=>{this._requestRender()},this),this.cameraBehaviour.cameraControl.addEventListener(4,()=>{this._requestRender()},this)}async moveCamera(e){return this.glbViewerCameraBehaviour.externalApiMoveCamera(e)}_readyForRender(){this._globalCallback.onReadyForRender()}}h([c],R.prototype,"_glbInputManager",void 0),h([c],R.prototype,"_rapiAccess",void 0);class U{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new I({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=x}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 b(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class z{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){Promise.all([this._scriptLoader.fetch(w,{id:"tween-js"})]).then(()=>{this._sceneManager=new R(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new b(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let i=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new U(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(i.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{E("content.zip",URL.createObjectURL(t)),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}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:r,rotation:i,maxLightSources:a}=e;this._sceneManager.setEnvironmentMap(t,r,i,a)}exportCanvasScreenshot(e){return this._sceneManager.exportCanvasScreenshot(e)}async moveCamera(e){return this._sceneManager.moveCamera(e)}get globalCallbacks(){return this._globalCallback}}h([c],z.prototype,"_rapiAccess",void 0),h([c],z.prototype,"_domHelper",void 0),h([c],z.prototype,"_scriptLoader",void 0),h([c],z.prototype,"_lifeCycleManager",void 0),h([c],z.prototype,"_initData",void 0),h([c],z.prototype,"_globalInitData",void 0),h([c],z.prototype,"_globalCallback",void 0),h([c],z.prototype,"_unitFormatter",void 0),h([c],z.prototype,"_idbManager",void 0),e("GlbViewer",class extends r{setupGlobals(){}setupDependencies(){u.setup(D),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new z(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
- //# sourceMappingURL=glb-viewer-dc032024.legacy.js.map
1
+ System.register(["./script-loader-c7c8f3b8.legacy.js","./roomle-dependency-injection-f9e80d9c.legacy.js","./camera-behaviour-f5d2fa60.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./default-light-setting-05238ba4.legacy.js","./glb-viewer-camera-behaviour-8a2d4de1.legacy.js","./query-params-helper-1160ef5b.legacy.js"],(function(e){var t,r,a,i,n,s,o,h,c,l,d,_,m,u,g,p,v,w,b,f,C,S,y,L,M,B,I,x,G,j,E,F,O;return{setters:[function(e){t=e.S,r=e.M},function(e){a=e.aV,i=e.D,n=e.L,s=e.R,o=e.n,h=e._,c=e.i,l=e.H,d=e.K,_=e.O,m=e.U,u=e.b},function(e){g=e.C,p=e.L,v=e.S,w=e.T},function(e){b=e.a,f=e.ak,C=e.ao,S=e.Q,y=e.A,L=e.C,M=e.aM,B=e.a_,I=e.bL,x=e.j,G=e.bv,j=e.J,E=e.bU},function(e){F=e.D},function(e){O=e.G},function(){}],execute:function(){const D=[new i("script-loader",t),new i("glb-input-manager",class extends a{},1),new i("logger",n),new i("rapi-access",s)];class P extends g{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,a,i){let n=new b(-e.x/2,0,-e.z/2),s=new b(e.x/2,e.y,e.z/2);this._boundingBox=new f(n,s);let o=new C(-Math.PI/2+a,r,0,"ZYX"),h=(new S).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 k extends p{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new y(new L(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=o();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 L(e)})}}}class R extends v{constructor(e,t){super(e,t,l.GLB,M.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(d.createDynamicLightSettingSource(null,_.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new k(this._scene)))}createCameraControl(e,t){this._changeCameraBehaviour(new O(new P(this._creator_,this._getInputManager(),null),this._cameraBehaviourState))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const a=B(r);return a?this.loadGLB(a,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new b(1,1,1),a){return this.clearScene(),new Promise((i,n)=>{this._loadGLB(e,new b(0,0,0),0,void 0,r,void 0,void 0,a).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new f).setFromObject(this._currentGLB);t&&this.cameraBehaviour.cameraControl instanceof P&&this.glbViewerCameraBehaviour.updateCameraOnItemLoaded(r),this._updateBounds(r,null,!0),this._readyForRender(),i()},n)})}preparePerspectiveImage(e,t,r){return new Promise(a=>{var i,n;t||(t=1e3),r||(r=1e3),e||((e=new I({antialias:!0})).setSize(t,r),e.outputColorSpace=x,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=G);let s=this.cameraBehaviour.cameraControl.getCamera().clone();s instanceof j&&(s.aspect=t/r,s.updateProjectionMatrix()),null===(i=this._lightSetting)||void 0===i||i.removeFromScene();let o=new F(this._scene);e.render(this._scene,s);let h=e.domElement.toDataURL();e.domElement.toBlob(e=>{a({image:h,width:t,height:r,blob:e})},"image/png"),o.removeFromScene(),null===(n=this._lightSetting)||void 0===n||n.addToScene()})}adjustCamera(e,t,r,a){if(this.cameraBehaviour.cameraControl instanceof P){let i=(new f).setFromObject(this._scene).getSize(new b);this.cameraBehaviour.cameraControl.adjust(i,e,t,r,a),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this.cameraBehaviour.cameraControl instanceof P&&(this.cameraBehaviour.cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),m(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new f).setFromObject(this._currentGLB):null}get glbViewerCameraBehaviour(){return this.cameraBehaviour}getGeometryBounds(){return null}cameraBehaviourChanged(){super.cameraBehaviourChanged(),this.cameraBehaviour.cameraControl.addEventListener(3,()=>{this._requestRender()},this),this.cameraBehaviour.cameraControl.addEventListener(4,()=>{this._requestRender()},this)}async moveCamera(e){return this.glbViewerCameraBehaviour.externalApiMoveCamera(e)}_readyForRender(){this._globalCallback.onReadyForRender()}}h([c],R.prototype,"_glbInputManager",void 0),h([c],R.prototype,"_rapiAccess",void 0);class U{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new I({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=x}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 b(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class z{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){Promise.all([this._scriptLoader.fetch(w,{id:"tween-js"})]).then(()=>{this._sceneManager=new R(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new b(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let a=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new U(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(a.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{E("content.zip",URL.createObjectURL(t)),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}getStorage(){return this._idbManager}setEnvironmentMap(e){const{url:t,intensity:r,rotation:a,maxLightSources:i}=e;this._sceneManager.setEnvironmentMap(t,r,a,i)}exportCanvasScreenshot(e){return this._sceneManager.exportCanvasScreenshot(e)}async moveCamera(e){return this._sceneManager.moveCamera(e)}get globalCallbacks(){return this._globalCallback}}h([c],z.prototype,"_rapiAccess",void 0),h([c],z.prototype,"_domHelper",void 0),h([c],z.prototype,"_scriptLoader",void 0),h([c],z.prototype,"_lifeCycleManager",void 0),h([c],z.prototype,"_initData",void 0),h([c],z.prototype,"_globalInitData",void 0),h([c],z.prototype,"_globalCallback",void 0),h([c],z.prototype,"_unitFormatter",void 0),h([c],z.prototype,"_idbManager",void 0),e("GlbViewer",class extends r{setupGlobals(){}setupDependencies(){u.setup(D),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new z(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
2
+ //# sourceMappingURL=glb-viewer-039e52be.legacy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glb-viewer-dc032024.legacy.js","sources":["../../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"ozPAAe"}
1
+ {"version":3,"file":"glb-viewer-039e52be.legacy.js","sources":["../../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"ozPAAe"}
@@ -1,2 +1,2 @@
1
- System.register(["./camera-behaviour-2088546c.legacy.js"],(function(e){var a;return{setters:[function(e){a=e.b}],execute:function(){e("G",class extends a{get cameraControl(){return this._cameraControl}async updateCameraOnItemLoaded(e){await this.cameraControl.updateAndReset(e,!0)}async externalApiMoveCamera(e){await this.cameraControl.moveCamera(e),this._onCameraChanged()}})}}}));
2
- //# sourceMappingURL=glb-viewer-camera-behaviour-9a618475.legacy.js.map
1
+ System.register(["./camera-behaviour-f5d2fa60.legacy.js"],(function(e){var a;return{setters:[function(e){a=e.b}],execute:function(){e("G",class extends a{get cameraControl(){return this._cameraControl}async updateCameraOnItemLoaded(e){await this.cameraControl.updateAndReset(e,!0)}async externalApiMoveCamera(e){await this.cameraControl.moveCamera(e),this._onCameraChanged()}})}}}));
2
+ //# sourceMappingURL=glb-viewer-camera-behaviour-8a2d4de1.legacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glb-viewer-camera-behaviour-8a2d4de1.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- System.register(["./glb-viewer-dc032024.legacy.js","./script-loader-1e570149.legacy.js","./query-params-helper-1160ef5b.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./roomle-dependency-injection-5672400b.legacy.js","./camera-behaviour-2088546c.legacy.js","./default-light-setting-e6e3c9ef.legacy.js","./glb-viewer-camera-behaviour-9a618475.legacy.js"],(function(){var e;return{setters:[function(n){e=n.GlbViewer},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
1
+ System.register(["./glb-viewer-039e52be.legacy.js","./script-loader-c7c8f3b8.legacy.js","./query-params-helper-1160ef5b.legacy.js","./main-thread-to-worker-83f62641.legacy.js","./roomle-dependency-injection-f9e80d9c.legacy.js","./camera-behaviour-f5d2fa60.legacy.js","./default-light-setting-05238ba4.legacy.js","./glb-viewer-camera-behaviour-8a2d4de1.legacy.js"],(function(){var e;return{setters:[function(n){e=n.GlbViewer},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
2
2
  //# sourceMappingURL=glb-viewer-main.legacy.js.map