@roomle/web-sdk 2.94.0-alpha.13 → 2.94.0-alpha.17
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.
- package/lib/{banana-for-scale-1597f552.js → banana-for-scale-11b22580.js} +2 -2
- package/lib/{banana-for-scale-1597f552.js.map → banana-for-scale-11b22580.js.map} +1 -1
- package/lib/{banana-for-scale-68b0559b.nomodule.js → banana-for-scale-35f20384.nomodule.js} +2 -2
- package/lib/{banana-for-scale-68b0559b.nomodule.js.map → banana-for-scale-35f20384.nomodule.js.map} +1 -1
- package/lib/camera-behaviour-507aa62e.js +2 -0
- package/lib/{camera-behaviour-e00e1248.js.map → camera-behaviour-507aa62e.js.map} +1 -1
- package/lib/camera-behaviour-8f359476.nomodule.js +2 -0
- package/lib/{camera-behaviour-c3053204.nomodule.js.map → camera-behaviour-8f359476.nomodule.js.map} +1 -1
- package/lib/{component-dimensioning-61fbbbdb.nomodule.js → component-dimensioning-65a38b71.nomodule.js} +2 -2
- package/lib/component-dimensioning-65a38b71.nomodule.js.map +1 -0
- package/lib/{component-dimensioning-9e0bd8e2.js → component-dimensioning-9dab7fd9.js} +2 -2
- package/lib/component-dimensioning-9dab7fd9.js.map +1 -0
- package/lib/{component-raycast-helper-17aefd3b.nomodule.js → component-raycast-helper-4ec48a0b.nomodule.js} +2 -2
- package/lib/component-raycast-helper-4ec48a0b.nomodule.js.map +1 -0
- package/lib/{component-raycast-helper-d8b48570.js → component-raycast-helper-f571bff9.js} +2 -2
- package/lib/component-raycast-helper-f571bff9.js.map +1 -0
- package/lib/{configurator-0e7c6d32.nomodule.js → configurator-27baf28f.nomodule.js} +2 -2
- package/lib/configurator-27baf28f.nomodule.js.map +1 -0
- package/lib/{configurator-9b734516.js → configurator-30a3dce4.js} +2 -2
- package/lib/configurator-30a3dce4.js.map +1 -0
- package/lib/configurator-main-00bfbf8f.js +2 -0
- package/lib/configurator-main-00bfbf8f.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{continuous-drawing-helper-13c73269.nomodule.js → continuous-drawing-helper-4ee649ed.nomodule.js} +2 -2
- package/lib/continuous-drawing-helper-4ee649ed.nomodule.js.map +1 -0
- package/lib/{continuous-drawing-helper-d1018319.js → continuous-drawing-helper-6b4bba48.js} +2 -2
- package/lib/continuous-drawing-helper-6b4bba48.js.map +1 -0
- package/lib/{default-light-setting-a83f6e0e.nomodule.js → default-light-setting-0d5875a7.nomodule.js} +2 -2
- package/lib/default-light-setting-0d5875a7.nomodule.js.map +1 -0
- package/lib/{default-light-setting-d4f45799.js → default-light-setting-4307fa21.js} +2 -2
- package/lib/default-light-setting-4307fa21.js.map +1 -0
- package/lib/definitions/common-core/src/cameracontrol/camera-control.d.ts +1 -0
- package/lib/definitions/packages/common-core/src/cameracontrol/camera-control.d.ts +1 -0
- package/lib/definitions/packages/planner-core/src/camera-control/camera-control-first-person.d.ts +1 -0
- package/lib/definitions/packages/planner-core/src/external-object-api-callbacks.d.ts +2 -1
- package/lib/definitions/packages/planner-core/src/external-object-api.d.ts +6 -1
- package/lib/definitions/packages/planner-core/src/roomle-planner-ui-callback.d.ts +1 -1
- package/lib/definitions/packages/planner-core/src/roomle-planner.d.ts +2 -1
- package/lib/definitions/packages/planner-core/src/services/planner-kernel-access.d.ts +2 -2
- package/lib/definitions/packages/typings/planner.d.ts +10 -2
- package/lib/definitions/planner-core/src/camera-control/camera-control-first-person.d.ts +1 -0
- package/lib/definitions/planner-core/src/external-object-api-callbacks.d.ts +2 -1
- package/lib/definitions/planner-core/src/external-object-api.d.ts +6 -1
- package/lib/definitions/planner-core/src/roomle-planner-ui-callback.d.ts +1 -1
- package/lib/definitions/planner-core/src/roomle-planner.d.ts +2 -1
- package/lib/definitions/planner-core/src/services/planner-kernel-access.d.ts +2 -2
- package/lib/definitions/typings/planner.d.ts +10 -2
- package/lib/{dimensioning-helper-1cd23e09.js → dimensioning-helper-c662eb18.js} +2 -2
- package/lib/{dimensioning-helper-1cd23e09.js.map → dimensioning-helper-c662eb18.js.map} +1 -1
- package/lib/{dimensioning-helper-884dea70.nomodule.js → dimensioning-helper-dfca8d0b.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-884dea70.nomodule.js.map → dimensioning-helper-dfca8d0b.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-0c371d31.js → glb-viewer-11f9e85d.js} +2 -2
- package/lib/{glb-viewer-0c371d31.js.map → glb-viewer-11f9e85d.js.map} +1 -1
- package/lib/{glb-viewer-95b7ae7b.nomodule.js → glb-viewer-bb3cd78d.nomodule.js} +2 -2
- package/lib/{glb-viewer-95b7ae7b.nomodule.js.map → glb-viewer-bb3cd78d.nomodule.js.map} +1 -1
- package/lib/{glb-viewer-camera-behaviour-6bb3e23a.js → glb-viewer-camera-behaviour-7388dfb9.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-7388dfb9.js.map +1 -0
- package/lib/{glb-viewer-camera-behaviour-dc36db53.nomodule.js → glb-viewer-camera-behaviour-dcb50219.nomodule.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-dcb50219.nomodule.js.map +1 -0
- package/lib/glb-viewer-main-c5731dad.js +2 -0
- package/lib/glb-viewer-main-c5731dad.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/{imos-ix-poc-export-helper-5268eef6.js → imos-ix-poc-export-helper-91d7e509.js} +2 -2
- package/lib/imos-ix-poc-export-helper-91d7e509.js.map +1 -0
- package/lib/{imos-ix-poc-export-helper-72e0817f.nomodule.js → imos-ix-poc-export-helper-ff332661.nomodule.js} +2 -2
- package/lib/imos-ix-poc-export-helper-ff332661.nomodule.js.map +1 -0
- package/lib/legacy/TextGeometry-7a5a6f22.legacy.js +2 -0
- package/lib/legacy/{TextGeometry-5fb8e830.legacy.js.map → TextGeometry-7a5a6f22.legacy.js.map} +1 -1
- package/lib/legacy/{banana-for-scale-1eac95a5.legacy.js → banana-for-scale-6ecefbb0.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-1eac95a5.legacy.js.map → banana-for-scale-6ecefbb0.legacy.js.map} +1 -1
- package/lib/legacy/budgeteer-measure.legacy.js +1 -1
- package/lib/legacy/camera-behaviour-ee8ad64b.legacy.js +2 -0
- package/lib/legacy/{camera-behaviour-cf86d84e.legacy.js.map → camera-behaviour-ee8ad64b.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-9fc6aa32.legacy.js → component-dimensioning-3d92e6e3.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-3d92e6e3.legacy.js.map +1 -0
- package/lib/legacy/{component-raycast-helper-e1d2085a.legacy.js → component-raycast-helper-d5401e27.legacy.js} +2 -2
- package/lib/legacy/component-raycast-helper-d5401e27.legacy.js.map +1 -0
- package/lib/legacy/configurator-e0f102b4.legacy.js +2 -0
- package/lib/legacy/configurator-e0f102b4.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{continuous-drawing-helper-e1d48bc2.legacy.js → continuous-drawing-helper-fd527749.legacy.js} +2 -2
- package/lib/legacy/continuous-drawing-helper-fd527749.legacy.js.map +1 -0
- package/lib/legacy/{default-light-setting-3bd0fca6.legacy.js → default-light-setting-363d7d18.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-363d7d18.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-d83dfd82.legacy.js → dimensioning-helper-11069d8c.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-d83dfd82.legacy.js.map → dimensioning-helper-11069d8c.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-8ddcb4d5.legacy.js → glb-viewer-6b8d3a35.legacy.js} +2 -2
- package/lib/legacy/{glb-viewer-8ddcb4d5.legacy.js.map → glb-viewer-6b8d3a35.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-camera-behaviour-6f39e9d3.legacy.js → glb-viewer-camera-behaviour-ecef15aa.legacy.js} +2 -2
- package/lib/legacy/glb-viewer-camera-behaviour-ecef15aa.legacy.js.map +1 -0
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{imos-ix-poc-export-helper-dc591729.legacy.js → imos-ix-poc-export-helper-2b70fa34.legacy.js} +2 -2
- package/lib/legacy/imos-ix-poc-export-helper-2b70fa34.legacy.js.map +1 -0
- package/lib/legacy/main-thread-to-worker-6115d235.legacy.js +7 -0
- package/lib/legacy/{main-thread-to-worker-1ffd1d44.legacy.js.map → main-thread-to-worker-6115d235.legacy.js.map} +1 -1
- package/lib/legacy/{material-viewer-6aec699a.legacy.js → material-viewer-1fa3a47f.legacy.js} +2 -2
- package/lib/legacy/material-viewer-1fa3a47f.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/planner-b1d9b1b7.legacy.js +2 -0
- package/lib/legacy/{planner-1cdb5a30.legacy.js.map → planner-b1d9b1b7.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/{query-params-helper-9bc9aa02.legacy.js → query-params-helper-28b451be.legacy.js} +2 -2
- package/lib/legacy/query-params-helper-28b451be.legacy.js.map +1 -0
- package/lib/legacy/{roomle-configurator-37f12427.legacy.js → roomle-configurator-5393d210.legacy.js} +2 -2
- package/lib/legacy/roomle-configurator-5393d210.legacy.js.map +1 -0
- package/lib/legacy/roomle-dependency-injection-edc88f31.legacy.js +9 -0
- package/lib/legacy/{roomle-dependency-injection-a668ec53.legacy.js.map → roomle-dependency-injection-edc88f31.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{script-loader-ad8989f8.legacy.js → script-loader-ea33e7a8.legacy.js} +2 -2
- package/lib/legacy/script-loader-ea33e7a8.legacy.js.map +1 -0
- package/lib/legacy/static/ConfiguratorKernel-224b7042fc2da198.wasm +0 -0
- package/lib/legacy/static/RoomleCore-3196e6b7b616cb0e.wasm +0 -0
- package/lib/legacy/static/{RoomleCore-c236bb6d0a25bbb2.js → RoomleCore-7d10b7b8ca9a203a.js} +10 -10
- package/lib/legacy/static/RoomleToolsCore-25aa4fbadaab8219.wasm +0 -0
- package/lib/legacy/{stats-helper-fb2b8318.legacy.js → stats-helper-fb3a580c.legacy.js} +2 -2
- package/lib/legacy/stats-helper-fb3a580c.legacy.js.map +1 -0
- package/lib/legacy/{tools-core-147bf25e.legacy.js → tools-core-a6125630.legacy.js} +2 -2
- package/lib/legacy/tools-core-a6125630.legacy.js.map +1 -0
- package/lib/{material-viewer-ede9cd77.nomodule.js → material-viewer-074076cd.nomodule.js} +2 -2
- package/lib/material-viewer-074076cd.nomodule.js.map +1 -0
- package/lib/{material-viewer-272248a0.js → material-viewer-ce63ba67.js} +2 -2
- package/lib/material-viewer-ce63ba67.js.map +1 -0
- package/lib/material-viewer-main-7f83ded6.js +2 -0
- package/lib/material-viewer-main-7f83ded6.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{planner-b8bef769.js → planner-2313b5ef.js} +2 -2
- package/lib/{planner-b8bef769.js.map → planner-2313b5ef.js.map} +1 -1
- package/lib/{planner-dbb7a844.nomodule.js → planner-e8f9fc69.nomodule.js} +2 -2
- package/lib/{planner-dbb7a844.nomodule.js.map → planner-e8f9fc69.nomodule.js.map} +1 -1
- package/lib/planner-main-e906ee66.js +2 -0
- package/lib/planner-main-e906ee66.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/{roomle-configurator-95dd9be3.js → roomle-configurator-19c694f2.js} +2 -2
- package/lib/roomle-configurator-19c694f2.js.map +1 -0
- package/lib/{roomle-configurator-ae9cdae5.nomodule.js → roomle-configurator-32bfbd41.nomodule.js} +2 -2
- package/lib/roomle-configurator-32bfbd41.nomodule.js.map +1 -0
- package/lib/{roomle-dependency-injection-e12b2673.js → roomle-dependency-injection-0124576e.js} +3 -3
- package/lib/{roomle-dependency-injection-e12b2673.js.map → roomle-dependency-injection-0124576e.js.map} +1 -1
- package/lib/{roomle-dependency-injection-432be283.nomodule.js → roomle-dependency-injection-2553a6bd.nomodule.js} +3 -3
- package/lib/{roomle-dependency-injection-432be283.nomodule.js.map → roomle-dependency-injection-2553a6bd.nomodule.js.map} +1 -1
- package/lib/{roomle-sdk-e4eafdb4.js → roomle-sdk-60649d61.js} +2 -2
- package/lib/roomle-sdk-60649d61.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{script-loader-5cd07278.nomodule.js → script-loader-7a55dce4.nomodule.js} +2 -2
- package/lib/script-loader-7a55dce4.nomodule.js.map +1 -0
- package/lib/{script-loader-33eeb531.js → script-loader-836c1efb.js} +2 -2
- package/lib/script-loader-836c1efb.js.map +1 -0
- package/lib/static/ConfiguratorKernel-224b7042fc2da198.wasm +0 -0
- package/lib/static/RoomleCore-3196e6b7b616cb0e.wasm +0 -0
- package/lib/static/{RoomleCore-c236bb6d0a25bbb2.js → RoomleCore-7d10b7b8ca9a203a.js} +1 -1
- package/lib/static/{RoomleCore-c236bb6d0a25bbb2.js.map → RoomleCore-7d10b7b8ca9a203a.js.map} +1 -1
- package/lib/static/RoomleToolsCore-25aa4fbadaab8219.wasm +0 -0
- package/lib/{stats-helper-cac7dccd.js → stats-helper-8820dd05.js} +2 -2
- package/lib/stats-helper-8820dd05.js.map +1 -0
- package/lib/{stats-helper-6928023d.nomodule.js → stats-helper-a41f8b8f.nomodule.js} +2 -2
- package/lib/stats-helper-a41f8b8f.nomodule.js.map +1 -0
- package/lib/{tools-core-96f823f3.nomodule.js → tools-core-1c9d9da3.nomodule.js} +2 -2
- package/lib/tools-core-1c9d9da3.nomodule.js.map +1 -0
- package/lib/{tools-core-f1ece54b.js → tools-core-cbdcc6c8.js} +2 -2
- package/lib/tools-core-cbdcc6c8.js.map +1 -0
- package/package.json +2 -2
- package/lib/camera-behaviour-c3053204.nomodule.js +0 -2
- package/lib/camera-behaviour-e00e1248.js +0 -2
- package/lib/component-dimensioning-61fbbbdb.nomodule.js.map +0 -1
- package/lib/component-dimensioning-9e0bd8e2.js.map +0 -1
- package/lib/component-raycast-helper-17aefd3b.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-d8b48570.js.map +0 -1
- package/lib/configurator-0e7c6d32.nomodule.js.map +0 -1
- package/lib/configurator-9b734516.js.map +0 -1
- package/lib/configurator-main-9c2152b4.js +0 -2
- package/lib/configurator-main-9c2152b4.js.map +0 -1
- package/lib/continuous-drawing-helper-13c73269.nomodule.js.map +0 -1
- package/lib/continuous-drawing-helper-d1018319.js.map +0 -1
- package/lib/default-light-setting-a83f6e0e.nomodule.js.map +0 -1
- package/lib/default-light-setting-d4f45799.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-6bb3e23a.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-dc36db53.nomodule.js.map +0 -1
- package/lib/glb-viewer-main-652136ba.js +0 -2
- package/lib/glb-viewer-main-652136ba.js.map +0 -1
- package/lib/imos-ix-poc-export-helper-5268eef6.js.map +0 -1
- package/lib/imos-ix-poc-export-helper-72e0817f.nomodule.js.map +0 -1
- package/lib/legacy/TextGeometry-5fb8e830.legacy.js +0 -2
- package/lib/legacy/camera-behaviour-cf86d84e.legacy.js +0 -2
- package/lib/legacy/component-dimensioning-9fc6aa32.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-e1d2085a.legacy.js.map +0 -1
- package/lib/legacy/configurator-5fc65045.legacy.js +0 -2
- package/lib/legacy/configurator-5fc65045.legacy.js.map +0 -1
- package/lib/legacy/continuous-drawing-helper-e1d48bc2.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-3bd0fca6.legacy.js.map +0 -1
- package/lib/legacy/glb-viewer-camera-behaviour-6f39e9d3.legacy.js.map +0 -1
- package/lib/legacy/imos-ix-poc-export-helper-dc591729.legacy.js.map +0 -1
- package/lib/legacy/main-thread-to-worker-1ffd1d44.legacy.js +0 -7
- package/lib/legacy/material-viewer-6aec699a.legacy.js.map +0 -1
- package/lib/legacy/planner-1cdb5a30.legacy.js +0 -2
- package/lib/legacy/query-params-helper-9bc9aa02.legacy.js.map +0 -1
- package/lib/legacy/roomle-configurator-37f12427.legacy.js.map +0 -1
- package/lib/legacy/roomle-dependency-injection-a668ec53.legacy.js +0 -9
- package/lib/legacy/script-loader-ad8989f8.legacy.js.map +0 -1
- package/lib/legacy/static/ConfiguratorKernel-a18cfca26f45be3c.wasm +0 -0
- package/lib/legacy/static/RoomleCore-c101ddc34ae46f6b.wasm +0 -0
- package/lib/legacy/static/RoomleToolsCore-9acbf17122008cdb.wasm +0 -0
- package/lib/legacy/stats-helper-fb2b8318.legacy.js.map +0 -1
- package/lib/legacy/tools-core-147bf25e.legacy.js.map +0 -1
- package/lib/material-viewer-272248a0.js.map +0 -1
- package/lib/material-viewer-ede9cd77.nomodule.js.map +0 -1
- package/lib/material-viewer-main-fa6bee2e.js +0 -2
- package/lib/material-viewer-main-fa6bee2e.js.map +0 -1
- package/lib/planner-main-da4270f8.js +0 -2
- package/lib/planner-main-da4270f8.js.map +0 -1
- package/lib/roomle-configurator-95dd9be3.js.map +0 -1
- package/lib/roomle-configurator-ae9cdae5.nomodule.js.map +0 -1
- package/lib/roomle-sdk-e4eafdb4.js.map +0 -1
- package/lib/script-loader-33eeb531.js.map +0 -1
- package/lib/script-loader-5cd07278.nomodule.js.map +0 -1
- package/lib/static/ConfiguratorKernel-a18cfca26f45be3c.wasm +0 -0
- package/lib/static/RoomleCore-c101ddc34ae46f6b.wasm +0 -0
- package/lib/static/RoomleToolsCore-9acbf17122008cdb.wasm +0 -0
- package/lib/stats-helper-6928023d.nomodule.js.map +0 -1
- package/lib/stats-helper-cac7dccd.js.map +0 -1
- package/lib/tools-core-96f823f3.nomodule.js.map +0 -1
- package/lib/tools-core-f1ece54b.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-thread-to-worker-7f1cb5ea.nomodule.js","./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
System.register(["./main-thread-to-worker-7f1cb5ea.nomodule.js","./roomle-dependency-injection-2553a6bd.nomodule.js"],(function(e){var t,i,n,a,s,r,c,o,l;return{setters:[function(e){t=e.bz,i=e.bT,n=e.z,a=e.v,s=e.ad,r=e.a,c=e.am,o=e.k},function(e){l=e.ap}],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-4ec48a0b.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-4ec48a0b.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bz as Raycaster,bT as throttle,z as Mesh,v as MeshStandardMaterial,ad as Box3,a as Vector3,am as Frustum,k as Matrix4}from"./main-thread-to-worker-352ff4b1.js";import{ap as transitionTransparencyOfMaterial}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
import{bz as Raycaster,bT as throttle,z as Mesh,v as MeshStandardMaterial,ad as Box3,a as Vector3,am as Frustum,k as Matrix4}from"./main-thread-to-worker-352ff4b1.js";import{ap as transitionTransparencyOfMaterial}from"./roomle-dependency-injection-0124576e.js";class ComponentRaycastHelper{constructor(){this._nonTransparentComponent=null,this._raycaster=new Raycaster,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=throttle(this.checkComponentVisibility,100).bind(this),this.checkPreviewVisibility=throttle(this.checkPreviewVisibility,100).bind(this)}setCamera(e){this._camera=e}setObject(e){this._object=e}changeMaterialsOnSelect(e,t,a=!1,i){t!==this._nonTransparentComponent&&(this._nonTransparentComponent=t,this._changeMaterialsOnSelect(e,t,a,i))}_changeMaterialsOnSelect(e,t,a=!1,i){if(e.children.length>0&&e.children.forEach(s=>{const n=t&&e.id===t.id||a,r=!(s instanceof Mesh);s.userData.ignoreComponentRaycast||this._changeMaterialsOnSelect(s,t,(!n||!r)&&n,i)}),t)e instanceof Mesh&&e.material instanceof MeshStandardMaterial&&!e.userData.oldMaterial&&(e.userData.oldMaterial=e.material,e.material=e.material.clone(),a||transitionTransparencyOfMaterial(e,{opacity:.2,transparent:!0}).then(()=>{null==i||i()}));else if(e.userData.oldMaterial&&e instanceof Mesh&&e.material instanceof MeshStandardMaterial){const{opacity:t,transparent:a}=e.userData.oldMaterial;transitionTransparencyOfMaterial(e,{opacity:t,transparent:a}).then(()=>null==i?void 0:i()),e.userData.oldMaterial=void 0}}isComponentVisible(e){const t=[];e.traverse(e=>t.push(e.uuid));const a=(new Box3).setFromObject(e).getCenter(new Vector3),i=(new Vector3).subVectors(a,this._camera.position).normalize();this._raycaster.set(this._camera.position,i),this._raycaster.far=this._camera.position.distanceTo(a);const s=[];return this._raycaster.intersectObjects(this._object.children,!0).forEach(e=>{e.object.material.visible&&(t.includes(e.object.uuid)||e.object.userData.ignoreComponentRaycast||s.push(e))}),0===s.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 a=t.getComponentsForIds(e.getSelectedRuntimeComponentIds());if(a.length>1)return;const i=a[0];this.isComponentVisible(i)?this.changeMaterialsOnSelect(this._object,null):this.changeMaterialsOnSelect(this._object,i)}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 Frustum,a=(new Matrix4).multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse),i=new Box3;return t.setFromProjectionMatrix(a),e.map(e=>(e=>{const a=i.setFromObject(e).getCenter(new Vector3);return t.containsPoint(a)})(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){e.hasPreviewLines()||(this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._object,null):this.changeMaterialsOnSelect(this._object,{id:-1}))}}export{ComponentRaycastHelper as default};
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-f571bff9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-f571bff9.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
System.register(["./script-loader-7a55dce4.nomodule.js","./roomle-dependency-injection-2553a6bd.nomodule.js","./camera-behaviour-8f359476.nomodule.js","./component-raycast-helper-4ec48a0b.nomodule.js","./roomle-configurator-32bfbd41.nomodule.js","./query-params-helper-4f855064.nomodule.js","./main-thread-to-worker-7f1cb5ea.nomodule.js","./default-light-setting-0d5875a7.nomodule.js"],(function(e){var o,n,t,r,a,i,c,s,l,u,p,d,f,h;return{setters:[function(e){o=e.S,n=e.M},function(e){t=e.D,r=e.L,a=e.R,i=e.a,c=e.b,s=e.A},function(e){l=e.C,u=e.a},function(e){p=e.default},function(e){d=e.C,f=e.a,h=e.R},function(){},function(){},function(){}],execute:function(){const m=[new t("logger",r),new t("rapi-access",a),new t("script-loader",o),new t("camera-control-3d",l),new t("camera-control",u),new t("data-syncer",i),new t("configurator-scene-manager",d,1),new t("configurator-view-model",f,1),new t("component-raycast-helper",p,0)];e("Configurator",class extends n{setupDependencies(){c.setup(m),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"),o=this.lookup("rapi-access");this.lookup("dom-helper");const n=this.lookup("configurator-scene-manager");e&&e.cleanUp(),o&&o.cleanUp(),n&&n.cleanUp()}setupGlobals(e){const{kernelInstance:o,kernelContainer:n,planObjectId:t}=e||{};s.init({kernelInstance:o,kernelContainer:n,planObjectId:t})}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-27baf28f.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-27baf28f.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as ScriptLoader,M as Main}from"./script-loader-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
import{S as ScriptLoader,M as Main}from"./script-loader-836c1efb.js";import{D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,a as DataSyncer,b as RoomleDependencyInjection,A as AppContext}from"./roomle-dependency-injection-0124576e.js";import{C as CameraControl3D,a as CameraControl}from"./camera-behaviour-507aa62e.js";import ComponentRaycastHelper from"./component-raycast-helper-f571bff9.js";import{C as ConfiguratorSceneManager,a as ConfiguratorViewModel,R as RoomleConfigurator}from"./roomle-configurator-19c694f2.js";import"./query-params-helper-28405b8d.js";import"./main-thread-to-worker-352ff4b1.js";import"./default-light-setting-4307fa21.js";const INJECTABLES=[new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("rapi-access",RapiAccess),new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("camera-control-3d",CameraControl3D),new DependencyInjectionAssignment("camera-control",CameraControl),new DependencyInjectionAssignment("data-syncer",DataSyncer),new DependencyInjectionAssignment("configurator-scene-manager",ConfiguratorSceneManager,1),new DependencyInjectionAssignment("configurator-view-model",ConfiguratorViewModel,1),new DependencyInjectionAssignment("component-raycast-helper",ComponentRaycastHelper,0)];class Configurator extends Main{setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),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 o=this.lookup("configurator-scene-manager");e&&e.cleanUp(),n&&n.cleanUp(),o&&o.cleanUp()}setupGlobals(e){const{kernelInstance:n,kernelContainer:o,planObjectId:t}=e||{};AppContext.init({kernelInstance:n,kernelContainer:o,planObjectId:t})}getApi(){return this._configurator}bootFinished(){this._configurator=new RoomleConfigurator(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}}export{Configurator};
|
|
2
|
+
//# sourceMappingURL=configurator-30a3dce4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-30a3dce4.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Configurator}from"./configurator-30a3dce4.js";import"./script-loader-836c1efb.js";import"./query-params-helper-28405b8d.js";import"./main-thread-to-worker-352ff4b1.js";import"./roomle-dependency-injection-0124576e.js";import"./camera-behaviour-507aa62e.js";import"./component-raycast-helper-f571bff9.js";import"./roomle-configurator-19c694f2.js";import"./default-light-setting-4307fa21.js";(new Configurator).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let o=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)});
|
|
2
|
+
//# sourceMappingURL=configurator-main-00bfbf8f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-main-00bfbf8f.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./configurator-
|
|
1
|
+
System.register(["./configurator-27baf28f.nomodule.js","./script-loader-7a55dce4.nomodule.js","./query-params-helper-4f855064.nomodule.js","./main-thread-to-worker-7f1cb5ea.nomodule.js","./roomle-dependency-injection-2553a6bd.nomodule.js","./camera-behaviour-8f359476.nomodule.js","./component-raycast-helper-4ec48a0b.nomodule.js","./roomle-configurator-32bfbd41.nomodule.js","./default-light-setting-0d5875a7.nomodule.js"],(function(){var e;return{setters:[function(o){e=o.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let o=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
|
|
2
2
|
//# sourceMappingURL=configurator-main.nomodule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=continuous-drawing-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-2553a6bd.nomodule.js","./main-thread-to-worker-7f1cb5ea.nomodule.js"],(function(e){var i,t,r,n,s;return{setters:[function(e){i=e.ac},function(e){t=e.aT,r=e.h,n=e.w,s=e.z}],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:n});this._circleMesh=new s(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-4ee649ed.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-4ee649ed.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ac as convertToTHREE}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=continuous-drawing-helper-
|
|
1
|
+
import{ac as convertToTHREE}from"./roomle-dependency-injection-0124576e.js";import{aT as RingGeometry,h as MeshBasicMaterial,w as DoubleSide,z as Mesh}from"./main-thread-to-worker-352ff4b1.js";class ContinuousDrawingHelper{constructor(){this._currentInnerRadius=0}init(e,i,r){this._drawingGroup=e,this._continuousDrawingManager=i,this._kernelZoomFactor=r,this.update()}update(){this._initCircle(),this._updateCircle()}_initCircle(){if(this._circleMesh)return;const e=70/this._kernelZoomFactor/1e3,i=new RingGeometry(e,e+e/50,32),r=new MeshBasicMaterial({color:10066329,side:DoubleSide});this._circleMesh=new Mesh(i,r),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 RingGeometry(e,i,32)}const i=convertToTHREE(this._continuousDrawingManager.getStartPoint());i.y=5,this._circleMesh.position.copy(i),this._circleMesh.visible=this._continuousDrawingManager.shouldShowCircle(),this._currentInnerRadius=e}setKernelZoomFactor(e){this._kernelZoomFactor=e}endDrawing(){this._drawingGroup.remove(this._circleMesh),this._circleMesh=null}}export{ContinuousDrawingHelper as default};
|
|
2
|
+
//# sourceMappingURL=continuous-drawing-helper-6b4bba48.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-6b4bba48.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./camera-behaviour-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
System.register(["./camera-behaviour-8f359476.nomodule.js","./roomle-dependency-injection-2553a6bd.nomodule.js","./main-thread-to-worker-7f1cb5ea.nomodule.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.ag},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-0d5875a7.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-0d5875a7.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as LightSetting}from"./camera-behaviour-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
import{L as LightSetting}from"./camera-behaviour-507aa62e.js";import{ag as getGUI}from"./roomle-dependency-injection-0124576e.js";import{D as DirectionalLight,C as Color,V as Vector2,a as Vector3,A as AmbientLight}from"./main-thread-to-worker-352ff4b1.js";class DefaultLightSetting extends LightSetting{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new DirectionalLight(new Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new Vector3(0,0,0)),this._secondDirectionalLight=new DirectionalLight(new Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new Vector3(0,0,0)),this._ambientLight=new AmbientLight(new Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,o=a/2;this._mainDirectionalLight.shadow.camera.top=o,this._mainDirectionalLight.shadow.camera.bottom=-o,this._mainDirectionalLight.shadow.camera.left=-o,this._mainDirectionalLight.shadow.camera.right=o,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=o,this._secondDirectionalLight.shadow.camera.bottom=-o,this._secondDirectionalLight.shadow.camera.left=-o,this._secondDirectionalLight.shadow.camera.right=o,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=getGUI();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0)))}}}}export{DefaultLightSetting as D};
|
|
2
|
+
//# sourceMappingURL=default-light-setting-4307fa21.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-4307fa21.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -97,6 +97,7 @@ export default abstract class CameraControl extends EventDispatcher<any> impleme
|
|
|
97
97
|
protected abstract _initInputListener(): void;
|
|
98
98
|
private _addInputListeners;
|
|
99
99
|
private _removeInputListeners;
|
|
100
|
+
setUp(): void;
|
|
100
101
|
cleanUp(): void;
|
|
101
102
|
animateCamera(delta: number): boolean;
|
|
102
103
|
protected getDebugCameraPosition(): CameraParameter;
|
|
@@ -97,6 +97,7 @@ export default abstract class CameraControl extends EventDispatcher<any> impleme
|
|
|
97
97
|
protected abstract _initInputListener(): void;
|
|
98
98
|
private _addInputListeners;
|
|
99
99
|
private _removeInputListeners;
|
|
100
|
+
setUp(): void;
|
|
100
101
|
cleanUp(): void;
|
|
101
102
|
animateCamera(delta: number): boolean;
|
|
102
103
|
protected getDebugCameraPosition(): CameraParameter;
|
package/lib/definitions/packages/planner-core/src/camera-control/camera-control-first-person.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export default class CameraControlFirstPerson extends CameraControl {
|
|
|
14
14
|
minPolarAngle: number;
|
|
15
15
|
maxPolarAngle: number;
|
|
16
16
|
constructor(creator: string, inputManager: InputManager, initialCameraParameters?: CameraParameter, camera?: PerspectiveCamera);
|
|
17
|
+
setUp(): void;
|
|
17
18
|
private _gamepadConnected;
|
|
18
19
|
private _gamepadDisconnected;
|
|
19
20
|
private startButtonPressListener;
|
|
@@ -34,8 +34,9 @@ export interface ExternalObjectUiCallback {
|
|
|
34
34
|
* "idsOfGroupsMerged" are the IDs of the groups whose modules must be merged into the target group and therefore the groups that must be deleted.
|
|
35
35
|
* @param targetGroup The target group of root modules.
|
|
36
36
|
* @param idsOfGroupsMerged The IDs of the groups merged into the target group.
|
|
37
|
+
* @param idOfTargetRootModule The ID of the root module which is the target of the merge operation.
|
|
37
38
|
*/
|
|
38
|
-
onMergeExternalObjectGroup(targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[]): void;
|
|
39
|
+
onMergeExternalObjectGroup(targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], idOfTargetRootModule: string): void;
|
|
39
40
|
/**
|
|
40
41
|
* "onSplitExternalObjectGroup" is invoked when one or more root modules are split from a group of root modules.
|
|
41
42
|
* The split root modules form a new group, which must be assigned a new ID.
|
|
@@ -45,8 +45,9 @@ export interface ExternalObjectAPI {
|
|
|
45
45
|
* @param groupJson The group JSON as string or object.
|
|
46
46
|
* @param findFreeSpaceInPlan A free space is automatically searched for in the plane.
|
|
47
47
|
* @param verifyArrangement Verify whether the root modules of the group need to be rearranged as they have changed in size.
|
|
48
|
+
* @param mergedGroups Groups that were merged into another group and have to be delete (this is required to generate correct undo/redo steps).
|
|
48
49
|
*/
|
|
49
|
-
loadExternalObjectGroup(groupJson: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean): Promise<void>;
|
|
50
|
+
loadExternalObjectGroup(groupJson: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean, mergedGroups?: string[]): Promise<void>;
|
|
50
51
|
/**
|
|
51
52
|
* "renderImagesOfExternalObjectGroups" renders images of groups of modules.
|
|
52
53
|
* @param groupJson The group JSON as string or object.
|
|
@@ -96,5 +97,9 @@ export interface ExternalObjectAPI {
|
|
|
96
97
|
* @param animate If true the opening or closing is animated else the geometry is switched instantly.
|
|
97
98
|
*/
|
|
98
99
|
openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* "getExternalObjectGroups" returns all groups of external objects modules (PosData) that are currently loaded in the plan.
|
|
102
|
+
*/
|
|
103
|
+
getExternalObjectGroups(): Promise<object[]>;
|
|
99
104
|
}
|
|
100
105
|
export declare const getDefaultExternalObjectApiConfiguration: () => Promise<ExternalObjectApiConfiguration>;
|
|
@@ -180,7 +180,7 @@ export default class RoomlePlannerUiCallback extends UiCallback implements Exter
|
|
|
180
180
|
/**
|
|
181
181
|
* documented in interface ExternalObjectUiCallback
|
|
182
182
|
*/
|
|
183
|
-
onMergeExternalObjectGroup: (targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[]) => void;
|
|
183
|
+
onMergeExternalObjectGroup: (targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], idOfTargetRootModule: string) => void;
|
|
184
184
|
/**
|
|
185
185
|
* documented in interface ExternalObjectUiCallback
|
|
186
186
|
*/
|
|
@@ -379,7 +379,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
|
|
|
379
379
|
downloadHomagIxExportPoC(): Promise<any>;
|
|
380
380
|
configureExternalObjectApi(configurationJson: string | ExternalObjectApiConfiguration): Promise<void>;
|
|
381
381
|
loadExternalObjectLibrary(libraryJson: string | object): void;
|
|
382
|
-
loadExternalObjectGroup(groupData: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean): Promise<void>;
|
|
382
|
+
loadExternalObjectGroup(groupData: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean, mergedGroups?: string[]): Promise<void>;
|
|
383
383
|
private _loadExternalObjectGroup;
|
|
384
384
|
private _createSerializedGroupCollection;
|
|
385
385
|
renderImagesOfExternalObjectGroup(groups: object): Promise<{
|
|
@@ -396,6 +396,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
|
|
|
396
396
|
_selectExternalObjectModule(rootModuleId: string, subModuleId: string | null, selectPlanObject: boolean, switchToConfigurator: boolean, selectComponent: boolean, highlightSelection: boolean): Promise<void>;
|
|
397
397
|
private _selectPlanObject;
|
|
398
398
|
private _getSelectedPlanObjectComponent;
|
|
399
|
+
getExternalObjectGroups(): Promise<object[]>;
|
|
399
400
|
/**
|
|
400
401
|
* @internal
|
|
401
402
|
* Use this callbacks to hook in your functionality
|
|
@@ -70,7 +70,7 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
|
|
|
70
70
|
externalObjectComponentDeleted(plan: Plan, planObject: PlanObject, remainingGroupOrGroups: ExternalObjectGroup | ExternalObjectGroup[], deletedRootModuleId: string): void;
|
|
71
71
|
externalObjectConfigurationDuplicated(plan: Plan, planObject: PlanObject, sourceGroupId: string, newGroupPosition: ExternalObjectGroupPosition): void;
|
|
72
72
|
externalObjectPlanChanged(plan: Plan, planObject: PlanObject, movedGroup: ExternalObjectGroup): void;
|
|
73
|
-
externalObjectConfigurationsMerged(plan: Plan, planObject: PlanObject, mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[]): void;
|
|
73
|
+
externalObjectConfigurationsMerged(plan: Plan, planObject: PlanObject, mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], targetRootModuleId: string): void;
|
|
74
74
|
externalObjectComponentSplitOff(plan: Plan, planObject: PlanObject, splitGroups: ExternalObjectGroup[]): void;
|
|
75
75
|
externalObjectArrangementChanged(plan: Plan, planObject: PlanObject, changedGroup: ExternalObjectGroup): void;
|
|
76
76
|
planObjectConfigurationLoaded(plan: Plan, element: PlanElement, success: boolean): Promise<void>;
|
|
@@ -98,7 +98,7 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
|
|
|
98
98
|
protected _externalObjectComponentDeleted(remainingGroupOrGroups: ExternalObjectGroup | ExternalObjectGroup[], deletedRootModuleId: string): void;
|
|
99
99
|
_externalObjectConfigurationDuplicated(sourceGroupId: string, newGroupPosition: ExternalObjectGroupPosition): void;
|
|
100
100
|
_externalObjectPlanChanged(movedGroup: ExternalObjectGroup): void;
|
|
101
|
-
_externalObjectConfigurationsMerged(mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[]): void;
|
|
101
|
+
_externalObjectConfigurationsMerged(mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], targetRootModuleId: string): void;
|
|
102
102
|
_externalObjectComponentSplitOff(splitGroups: ExternalObjectGroup[]): void;
|
|
103
103
|
_externalObjectArrangementChanged(changedGroup: ExternalObjectGroup): void;
|
|
104
104
|
planSnapshotCreated(planSnapshot: RapiPlanSnapshotPostData): void;
|
|
@@ -26,7 +26,7 @@ export interface Plan extends KernelObject {
|
|
|
26
26
|
getTotalFloorArea(): number;
|
|
27
27
|
getPlanXML(includeRuntimeId: boolean, xmlVersion: number /** current version is 2 */): string;
|
|
28
28
|
createPlanXmlWithSingleObject(object: PlanObject, includeRuntimeId: boolean, version: number): string;
|
|
29
|
-
|
|
29
|
+
createPlanXmlWithObjects(objectId: string | string[], includeRuntimeId: boolean, version: number): string;
|
|
30
30
|
createObjWithPlanContours(levels: number[]): string;
|
|
31
31
|
getWallCount(): number;
|
|
32
32
|
getId(): number;
|
|
@@ -201,7 +201,7 @@ export interface PlanInteractionHandler {
|
|
|
201
201
|
setWallHeight(wall: KernelWall, height: number): void;
|
|
202
202
|
setLengthOfWall(wall: KernelWall, length: number, preferredSide: WallSide, direction: EMSConstant, moveOrthogonalWalls: boolean): void;
|
|
203
203
|
setWallThickness(wall: KernelWall, thickness: number): void;
|
|
204
|
-
addAttic(wall: KernelWall,
|
|
204
|
+
addAttic(wall: KernelWall, kneeHeight: number, width: number, side: WallSide | null | undefined): KernelAttic;
|
|
205
205
|
setAtticSide(attic: KernelAttic, side: WallSide): void;
|
|
206
206
|
setAtticKneeHeight(attic: KernelAttic, kneeHeight: number): void;
|
|
207
207
|
setAtticWidth(attic: KernelAttic, width: number): void;
|
|
@@ -264,6 +264,13 @@ export interface PlanOverview {
|
|
|
264
264
|
outsideWalls: PlanElement[];
|
|
265
265
|
rooms: PlanElement[];
|
|
266
266
|
}
|
|
267
|
+
export interface KernelObjectConfiguration {
|
|
268
|
+
runtimeId: number;
|
|
269
|
+
serializedDefinition: string;
|
|
270
|
+
uniqueId: string;
|
|
271
|
+
}
|
|
272
|
+
declare class KernelObjectConfigurationArray extends EmsArray<KernelObjectConfiguration> {
|
|
273
|
+
}
|
|
267
274
|
export interface LightSourceConfiguration {
|
|
268
275
|
lightSourceAreaInSquareMeters: number;
|
|
269
276
|
minimumRoomSizeInSquareMeters: number;
|
|
@@ -285,6 +292,7 @@ export interface PlanModelViewHelper {
|
|
|
285
292
|
getExternalObjectComponent(plan: Plan, groupId: string, moduleId: string): KernelPlanObjectComponent;
|
|
286
293
|
getExternalComponentModuleIdsForSelection(plan: Plan, groupOrRootModuleId: string, subModuleId: string): ExternalModuleInformation;
|
|
287
294
|
requestMesh3d(element: PlanElement): void;
|
|
295
|
+
getExternalObjectGroups(plan: Plan): KernelObjectConfigurationArray;
|
|
288
296
|
calculateLightSourceDistribution(plan: Plan, lightSourceConfiguration: LightSourceConfiguration): RoomLightSourceDistributionArray;
|
|
289
297
|
}
|
|
290
298
|
export interface PlanNode extends KernelObject {
|
|
@@ -14,6 +14,7 @@ export default class CameraControlFirstPerson extends CameraControl {
|
|
|
14
14
|
minPolarAngle: number;
|
|
15
15
|
maxPolarAngle: number;
|
|
16
16
|
constructor(creator: string, inputManager: InputManager, initialCameraParameters?: CameraParameter, camera?: PerspectiveCamera);
|
|
17
|
+
setUp(): void;
|
|
17
18
|
private _gamepadConnected;
|
|
18
19
|
private _gamepadDisconnected;
|
|
19
20
|
private startButtonPressListener;
|
|
@@ -34,8 +34,9 @@ export interface ExternalObjectUiCallback {
|
|
|
34
34
|
* "idsOfGroupsMerged" are the IDs of the groups whose modules must be merged into the target group and therefore the groups that must be deleted.
|
|
35
35
|
* @param targetGroup The target group of root modules.
|
|
36
36
|
* @param idsOfGroupsMerged The IDs of the groups merged into the target group.
|
|
37
|
+
* @param idOfTargetRootModule The ID of the root module which is the target of the merge operation.
|
|
37
38
|
*/
|
|
38
|
-
onMergeExternalObjectGroup(targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[]): void;
|
|
39
|
+
onMergeExternalObjectGroup(targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], idOfTargetRootModule: string): void;
|
|
39
40
|
/**
|
|
40
41
|
* "onSplitExternalObjectGroup" is invoked when one or more root modules are split from a group of root modules.
|
|
41
42
|
* The split root modules form a new group, which must be assigned a new ID.
|
|
@@ -45,8 +45,9 @@ export interface ExternalObjectAPI {
|
|
|
45
45
|
* @param groupJson The group JSON as string or object.
|
|
46
46
|
* @param findFreeSpaceInPlan A free space is automatically searched for in the plane.
|
|
47
47
|
* @param verifyArrangement Verify whether the root modules of the group need to be rearranged as they have changed in size.
|
|
48
|
+
* @param mergedGroups Groups that were merged into another group and have to be delete (this is required to generate correct undo/redo steps).
|
|
48
49
|
*/
|
|
49
|
-
loadExternalObjectGroup(groupJson: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean): Promise<void>;
|
|
50
|
+
loadExternalObjectGroup(groupJson: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean, mergedGroups?: string[]): Promise<void>;
|
|
50
51
|
/**
|
|
51
52
|
* "renderImagesOfExternalObjectGroups" renders images of groups of modules.
|
|
52
53
|
* @param groupJson The group JSON as string or object.
|
|
@@ -96,5 +97,9 @@ export interface ExternalObjectAPI {
|
|
|
96
97
|
* @param animate If true the opening or closing is animated else the geometry is switched instantly.
|
|
97
98
|
*/
|
|
98
99
|
openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId: string, subModuleId: string | null, open: boolean, animate: boolean): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* "getExternalObjectGroups" returns all groups of external objects modules (PosData) that are currently loaded in the plan.
|
|
102
|
+
*/
|
|
103
|
+
getExternalObjectGroups(): Promise<object[]>;
|
|
99
104
|
}
|
|
100
105
|
export declare const getDefaultExternalObjectApiConfiguration: () => Promise<ExternalObjectApiConfiguration>;
|
|
@@ -180,7 +180,7 @@ export default class RoomlePlannerUiCallback extends UiCallback implements Exter
|
|
|
180
180
|
/**
|
|
181
181
|
* documented in interface ExternalObjectUiCallback
|
|
182
182
|
*/
|
|
183
|
-
onMergeExternalObjectGroup: (targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[]) => void;
|
|
183
|
+
onMergeExternalObjectGroup: (targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], idOfTargetRootModule: string) => void;
|
|
184
184
|
/**
|
|
185
185
|
* documented in interface ExternalObjectUiCallback
|
|
186
186
|
*/
|
|
@@ -379,7 +379,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
|
|
|
379
379
|
downloadHomagIxExportPoC(): Promise<any>;
|
|
380
380
|
configureExternalObjectApi(configurationJson: string | ExternalObjectApiConfiguration): Promise<void>;
|
|
381
381
|
loadExternalObjectLibrary(libraryJson: string | object): void;
|
|
382
|
-
loadExternalObjectGroup(groupData: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean): Promise<void>;
|
|
382
|
+
loadExternalObjectGroup(groupData: object | string | string[], findFreeSpaceInPlan: boolean, verifyArrangement?: boolean, mergedGroups?: string[]): Promise<void>;
|
|
383
383
|
private _loadExternalObjectGroup;
|
|
384
384
|
private _createSerializedGroupCollection;
|
|
385
385
|
renderImagesOfExternalObjectGroup(groups: object): Promise<{
|
|
@@ -396,6 +396,7 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
|
|
|
396
396
|
_selectExternalObjectModule(rootModuleId: string, subModuleId: string | null, selectPlanObject: boolean, switchToConfigurator: boolean, selectComponent: boolean, highlightSelection: boolean): Promise<void>;
|
|
397
397
|
private _selectPlanObject;
|
|
398
398
|
private _getSelectedPlanObjectComponent;
|
|
399
|
+
getExternalObjectGroups(): Promise<object[]>;
|
|
399
400
|
/**
|
|
400
401
|
* @internal
|
|
401
402
|
* Use this callbacks to hook in your functionality
|
|
@@ -70,7 +70,7 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
|
|
|
70
70
|
externalObjectComponentDeleted(plan: Plan, planObject: PlanObject, remainingGroupOrGroups: ExternalObjectGroup | ExternalObjectGroup[], deletedRootModuleId: string): void;
|
|
71
71
|
externalObjectConfigurationDuplicated(plan: Plan, planObject: PlanObject, sourceGroupId: string, newGroupPosition: ExternalObjectGroupPosition): void;
|
|
72
72
|
externalObjectPlanChanged(plan: Plan, planObject: PlanObject, movedGroup: ExternalObjectGroup): void;
|
|
73
|
-
externalObjectConfigurationsMerged(plan: Plan, planObject: PlanObject, mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[]): void;
|
|
73
|
+
externalObjectConfigurationsMerged(plan: Plan, planObject: PlanObject, mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], targetRootModuleId: string): void;
|
|
74
74
|
externalObjectComponentSplitOff(plan: Plan, planObject: PlanObject, splitGroups: ExternalObjectGroup[]): void;
|
|
75
75
|
externalObjectArrangementChanged(plan: Plan, planObject: PlanObject, changedGroup: ExternalObjectGroup): void;
|
|
76
76
|
planObjectConfigurationLoaded(plan: Plan, element: PlanElement, success: boolean): Promise<void>;
|
|
@@ -98,7 +98,7 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
|
|
|
98
98
|
protected _externalObjectComponentDeleted(remainingGroupOrGroups: ExternalObjectGroup | ExternalObjectGroup[], deletedRootModuleId: string): void;
|
|
99
99
|
_externalObjectConfigurationDuplicated(sourceGroupId: string, newGroupPosition: ExternalObjectGroupPosition): void;
|
|
100
100
|
_externalObjectPlanChanged(movedGroup: ExternalObjectGroup): void;
|
|
101
|
-
_externalObjectConfigurationsMerged(mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[]): void;
|
|
101
|
+
_externalObjectConfigurationsMerged(mergedGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], targetRootModuleId: string): void;
|
|
102
102
|
_externalObjectComponentSplitOff(splitGroups: ExternalObjectGroup[]): void;
|
|
103
103
|
_externalObjectArrangementChanged(changedGroup: ExternalObjectGroup): void;
|
|
104
104
|
planSnapshotCreated(planSnapshot: RapiPlanSnapshotPostData): void;
|
|
@@ -26,7 +26,7 @@ export interface Plan extends KernelObject {
|
|
|
26
26
|
getTotalFloorArea(): number;
|
|
27
27
|
getPlanXML(includeRuntimeId: boolean, xmlVersion: number /** current version is 2 */): string;
|
|
28
28
|
createPlanXmlWithSingleObject(object: PlanObject, includeRuntimeId: boolean, version: number): string;
|
|
29
|
-
|
|
29
|
+
createPlanXmlWithObjects(objectId: string | string[], includeRuntimeId: boolean, version: number): string;
|
|
30
30
|
createObjWithPlanContours(levels: number[]): string;
|
|
31
31
|
getWallCount(): number;
|
|
32
32
|
getId(): number;
|
|
@@ -201,7 +201,7 @@ export interface PlanInteractionHandler {
|
|
|
201
201
|
setWallHeight(wall: KernelWall, height: number): void;
|
|
202
202
|
setLengthOfWall(wall: KernelWall, length: number, preferredSide: WallSide, direction: EMSConstant, moveOrthogonalWalls: boolean): void;
|
|
203
203
|
setWallThickness(wall: KernelWall, thickness: number): void;
|
|
204
|
-
addAttic(wall: KernelWall,
|
|
204
|
+
addAttic(wall: KernelWall, kneeHeight: number, width: number, side: WallSide | null | undefined): KernelAttic;
|
|
205
205
|
setAtticSide(attic: KernelAttic, side: WallSide): void;
|
|
206
206
|
setAtticKneeHeight(attic: KernelAttic, kneeHeight: number): void;
|
|
207
207
|
setAtticWidth(attic: KernelAttic, width: number): void;
|
|
@@ -264,6 +264,13 @@ export interface PlanOverview {
|
|
|
264
264
|
outsideWalls: PlanElement[];
|
|
265
265
|
rooms: PlanElement[];
|
|
266
266
|
}
|
|
267
|
+
export interface KernelObjectConfiguration {
|
|
268
|
+
runtimeId: number;
|
|
269
|
+
serializedDefinition: string;
|
|
270
|
+
uniqueId: string;
|
|
271
|
+
}
|
|
272
|
+
declare class KernelObjectConfigurationArray extends EmsArray<KernelObjectConfiguration> {
|
|
273
|
+
}
|
|
267
274
|
export interface LightSourceConfiguration {
|
|
268
275
|
lightSourceAreaInSquareMeters: number;
|
|
269
276
|
minimumRoomSizeInSquareMeters: number;
|
|
@@ -285,6 +292,7 @@ export interface PlanModelViewHelper {
|
|
|
285
292
|
getExternalObjectComponent(plan: Plan, groupId: string, moduleId: string): KernelPlanObjectComponent;
|
|
286
293
|
getExternalComponentModuleIdsForSelection(plan: Plan, groupOrRootModuleId: string, subModuleId: string): ExternalModuleInformation;
|
|
287
294
|
requestMesh3d(element: PlanElement): void;
|
|
295
|
+
getExternalObjectGroups(plan: Plan): KernelObjectConfigurationArray;
|
|
288
296
|
calculateLightSourceDistribution(plan: Plan, lightSourceConfiguration: LightSourceConfiguration): RoomLightSourceDistributionArray;
|
|
289
297
|
}
|
|
290
298
|
export interface PlanNode extends KernelObject {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{aY as normalizeRotation,H as dispose,_ as __decorate,i as inject,j as AsyncGuard,aZ as AsyncDependencyLoader,ac as convertToTHREE}from"./roomle-dependency-injection-e12b2673.js";import{O as Object3D,a as Vector3,h as MeshBasicMaterial,w as DoubleSide,bo as MeshPhongMaterial,B as BufferGeometry,z as Mesh,Q as Quaternion,b9 as PlaneGeometry,K as Group,u as LineBasicMaterial,G as Line,b as BufferAttribute,bL as Line3,ad as Box3}from"./main-thread-to-worker-352ff4b1.js";import{T as TextGeometry}from"./TextGeometry-dc304c0e.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends Object3D{constructor(e){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=e,this._position=new Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new BufferGeometry;this._text=new Mesh(e,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new Mesh(e,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i){this._position.copy(e),this._cameraPosition=i,this._label=t;const s=this.getWorldPosition(new Vector3),n=this._cameraPosition.distanceTo(s),o=Math.max(.01,n/150),h=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=h,this._parameters.bevelSize=h,this._parameters.size=o,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new Quaternion;e.setFromAxisAngle(new Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new Vector3)}else if(this._updateText(this._textGeometry,new Quaternion,new Vector3),this._cameraPosition){const e=this.getWorldPosition(new Vector3),t=normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this.parent.rotation.y);this._text.rotation.y=t,this._plane.rotation.y=t}}_updateText(e,t,i){let s=new Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new Vector3);e.center(),this._text.position.copy(s),t&&this._text.quaternion.copy(t);let o=new PlaneGeometry(n.x+.02,n.y+.02,32);o.center(),this._plane.geometry=o,this._plane.position.copy(s),t&&this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._objectRotation=0,this._cameraPosition=new Vector3,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new Group,this._dimensionTextGroup=new Object3D,this._creator_=e,this._lineMaterial=new LineBasicMaterial({color:3618615,linewidth:2});let t=new BufferGeometry;this._widthLine=new Line(t,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new Line(t,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new Line(t,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/lato_regular_sub-9dd2262895ccc1a9.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._dimensions||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new BufferGeometry,t=this._getWidthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let s=t.getCenter(new Vector3);this._widthText||(this._widthText=new TextWithBackground(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 e=new BufferGeometry,t=this._getHeightEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let s=t.getCenter(new Vector3);this._heightText||(this._heightText=new TextWithBackground(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 e=new BufferGeometry,t=this._getDepthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let s=t.getCenter(new Vector3);this._depthText||(this._depthText=new TextWithBackground(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(e){this._origin=convertToTHREE(e.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=convertToTHREE(e.size);const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToObject(e){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&e.add(this._dimensionLineGroup)}removeFromObject(e){e.remove(this._dimensionLineGroup),this.update()}addToUiScene(e){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this._dimensionTextGroup.rotation.y=this._objectRotation,e.add(this._dimensionTextGroup),this.update()}removeFromUiScene(e){e.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const e=this._getRotation();return e>Math.PI/2||e<-Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(this._dimensions.x+.05,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const e=this._getRotation();return e>0&&e<Math.PI/2?new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,this._dimensions.y+.05,.05)):e>Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):e<-Math.PI/2?new Line3(new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(e){this._onChange=e}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 e=new Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=e,this._dimensionTextGroup.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setObject(e,t=0){this._object=e,this._objectRotation=t}setUiScene(e){this._uiScene=e}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const e=this._object.getWorldPosition(new Vector3);return normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this._objectRotation)}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export{DimensioningHelper as default};
|
|
2
|
-
//# sourceMappingURL=dimensioning-helper-
|
|
1
|
+
import{aY as normalizeRotation,H as dispose,_ as __decorate,i as inject,j as AsyncGuard,aZ as AsyncDependencyLoader,ac as convertToTHREE}from"./roomle-dependency-injection-0124576e.js";import{O as Object3D,a as Vector3,h as MeshBasicMaterial,w as DoubleSide,bo as MeshPhongMaterial,B as BufferGeometry,z as Mesh,Q as Quaternion,b9 as PlaneGeometry,K as Group,u as LineBasicMaterial,G as Line,b as BufferAttribute,bL as Line3,ad as Box3}from"./main-thread-to-worker-352ff4b1.js";import{T as TextGeometry}from"./TextGeometry-dc304c0e.js";const PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class TextWithBackground extends Object3D{constructor(e){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=e,this._position=new Vector3,this._initMaterials(),this._init(),this._update()}_initMaterials(){this._cacheHolder.materialCache.has(PLANE_MATERIAL)?this._planeMaterial=this._cacheHolder.materialCache.get(PLANE_MATERIAL):(this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(PLANE_MATERIAL,this._planeMaterial)),this._cacheHolder.materialCache.has(TEXT_MATERIAL)?this._textMaterial=this._cacheHolder.materialCache.get(TEXT_MATERIAL):(this._textMaterial=new MeshPhongMaterial({color:3618615}),this._cacheHolder.materialCache.set(TEXT_MATERIAL,this._textMaterial))}_init(){let e=new BufferGeometry;this._text=new Mesh(e,this._textMaterial),this._text.userData.ignoreComponentRaycast=!0,this._text.name="text with background text "+this._label,this._plane=new Mesh(e,this._planeMaterial),this._plane.userData.ignoreComponentRaycast=!0,this._plane.name="text with background plane "+this._label,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this.add(this._text),this.add(this._plane)}update(e,t,i){this._position.copy(e),this._cameraPosition=i,this._label=t;const s=this.getWorldPosition(new Vector3),n=this._cameraPosition.distanceTo(s),o=Math.max(.01,n/150),h=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=h,this._parameters.bevelSize=h,this._parameters.size=o,this._textGeometry=new TextGeometry(this._label,this._parameters),this._textGeometry.computeBoundingBox(),this._text.geometry=this._textGeometry,this._update()}_update(){if(this.topDown){let e=new Quaternion;e.setFromAxisAngle(new Vector3(-1,0,0),Math.PI/2),this._updateText(this._textGeometry,e,new Vector3)}else if(this._updateText(this._textGeometry,new Quaternion,new Vector3),this._cameraPosition){const e=this.getWorldPosition(new Vector3),t=normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this.parent.rotation.y);this._text.rotation.y=t,this._plane.rotation.y=t}}_updateText(e,t,i){let s=new Vector3;s.copy(this._position),i.x*=this._getXSign(),s.add(i);let n=e.boundingBox.getSize(new Vector3);e.center(),this._text.position.copy(s),t&&this._text.quaternion.copy(t);let o=new PlaneGeometry(n.x+.02,n.y+.02,32);o.center(),this._plane.geometry=o,this._plane.position.copy(s),t&&this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._objectRotation=0,this._cameraPosition=new Vector3,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,this._dimensionLineGroup=new Group,this._dimensionTextGroup=new Object3D,this._creator_=e,this._lineMaterial=new LineBasicMaterial({color:3618615,linewidth:2});let t=new BufferGeometry;this._widthLine=new Line(t,this._lineMaterial),this._widthLine.userData.ignoreComponentRaycast=!0,this._widthLine.name="dimension width line",this._dimensionLineGroup.add(this._widthLine),this._heightLine=new Line(t,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._dimensionLineGroup.add(this._heightLine),this._depthLine=new Line(t,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._dimensionLineGroup.add(this._depthLine),this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/lato_regular_sub-9dd2262895ccc1a9.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToObject(this._object),this.addToUiScene(this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._dimensions||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new BufferGeometry,t=this._getWidthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._widthLine.geometry.dispose(),this._widthLine.geometry=e;let s=t.getCenter(new Vector3);this._widthText||(this._widthText=new TextWithBackground(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 e=new BufferGeometry,t=this._getHeightEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._heightLine.geometry.dispose(),this._heightLine.geometry=e;let s=t.getCenter(new Vector3);this._heightText||(this._heightText=new TextWithBackground(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 e=new BufferGeometry,t=this._getDepthEdge(),i=[t.start.x,t.start.y,t.start.z,t.end.x,t.end.y,t.end.z];e.setAttribute("position",new BufferAttribute(new Float32Array(i),3)),this._depthLine.geometry.dispose(),this._depthLine.geometry=e;let s=t.getCenter(new Vector3);this._depthText||(this._depthText=new TextWithBackground(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(e){this._origin=convertToTHREE(e.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=convertToTHREE(e.size);const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToObject(e){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&e.add(this._dimensionLineGroup)}removeFromObject(e){e.remove(this._dimensionLineGroup),this.update()}addToUiScene(e){if(!(this._widthText&&this._heightText&&this._depthText&&this._object))return;const t=this._dimensionLineGroup.localToWorld(new Vector3);this._dimensionTextGroup.position.copy(t),this._dimensionTextGroup.rotation.y=this._objectRotation,e.add(this._dimensionTextGroup),this.update()}removeFromUiScene(e){e.remove(this._dimensionTextGroup),this.update()}_getWidthEdge(){const e=this._getRotation();return e>Math.PI/2||e<-Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(this._dimensions.x+.05,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(this._dimensions.x+.05,0,.05))}_getDepthEdge(){return this._getRotation()>0?new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05)):new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,0,this._dimensions.z-.05))}_getHeightEdge(){const e=this._getRotation();return e>0&&e<Math.PI/2?new Line3(new Vector3(-.05,0,.05),new Vector3(-.05,this._dimensions.y+.05,.05)):e>Math.PI/2?new Line3(new Vector3(-.05,0,this._dimensions.z-.05),new Vector3(-.05,this._dimensions.y+.05,this._dimensions.z-.05)):e<-Math.PI/2?new Line3(new Vector3(.05+this._dimensions.x,0,this._dimensions.z-.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,this._dimensions.z-.05)):new Line3(new Vector3(.05+this._dimensions.x,0,.05),new Vector3(.05+this._dimensions.x,this._dimensions.y+.05,.05))}onDimensionsVisibilityChanged(e){this._onChange=e}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 e=new Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._dimensionLineGroup&&this._dimensionTextGroup&&(this._dimensionLineGroup.visible=e,this._dimensionTextGroup.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setObject(e,t=0){this._object=e,this._objectRotation=t}setUiScene(e){this._uiScene=e}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}_getRotation(){const e=this._object.getWorldPosition(new Vector3);return normalizeRotation(Math.atan2(this._cameraPosition.x-e.x,this._cameraPosition.z-e.z)-this._objectRotation)}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export{DimensioningHelper as default};
|
|
2
|
+
//# sourceMappingURL=dimensioning-helper-c662eb18.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-c662eb18.js","sources":["../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-9dd2262895ccc1a9.json\""],"names":[],"mappings":"u7IAAe"}
|