@roomle/web-sdk 2.93.0-alpha.2 → 2.93.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{banana-for-scale-5f2db830.js → banana-for-scale-60e62f33.js} +2 -2
- package/lib/{banana-for-scale-5f2db830.js.map → banana-for-scale-60e62f33.js.map} +1 -1
- package/lib/{banana-for-scale-eb4ee972.nomodule.js → banana-for-scale-6e368a38.nomodule.js} +2 -2
- package/lib/{banana-for-scale-eb4ee972.nomodule.js.map → banana-for-scale-6e368a38.nomodule.js.map} +1 -1
- package/lib/{camera-behaviour-d165f950.js → camera-behaviour-478f9d50.js} +2 -2
- package/lib/{camera-behaviour-d165f950.js.map → camera-behaviour-478f9d50.js.map} +1 -1
- package/lib/{camera-behaviour-76144aee.nomodule.js → camera-behaviour-8039bb35.nomodule.js} +2 -2
- package/lib/{camera-behaviour-76144aee.nomodule.js.map → camera-behaviour-8039bb35.nomodule.js.map} +1 -1
- package/lib/{component-dimensioning-da1c927c.js → component-dimensioning-48143ae8.js} +2 -2
- package/lib/component-dimensioning-48143ae8.js.map +1 -0
- package/lib/{component-dimensioning-29366795.nomodule.js → component-dimensioning-ed1315b8.nomodule.js} +2 -2
- package/lib/component-dimensioning-ed1315b8.nomodule.js.map +1 -0
- package/lib/{component-raycast-helper-50b02e79.js → component-raycast-helper-94f7b436.js} +2 -2
- package/lib/component-raycast-helper-94f7b436.js.map +1 -0
- package/lib/{component-raycast-helper-12d4e717.nomodule.js → component-raycast-helper-abc6a286.nomodule.js} +2 -2
- package/lib/component-raycast-helper-abc6a286.nomodule.js.map +1 -0
- package/lib/{configurator-a6b433cc.nomodule.js → configurator-1f5aa854.nomodule.js} +2 -2
- package/lib/configurator-1f5aa854.nomodule.js.map +1 -0
- package/lib/{configurator-38aa441c.js → configurator-9719c319.js} +2 -2
- package/lib/configurator-9719c319.js.map +1 -0
- package/lib/configurator-main-abd6e1c5.js +2 -0
- package/lib/configurator-main-abd6e1c5.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{continuous-drawing-helper-1ee03f56.nomodule.js → continuous-drawing-helper-5a2759f1.nomodule.js} +2 -2
- package/lib/continuous-drawing-helper-5a2759f1.nomodule.js.map +1 -0
- package/lib/{continuous-drawing-helper-871a885f.js → continuous-drawing-helper-f45acb3e.js} +2 -2
- package/lib/continuous-drawing-helper-f45acb3e.js.map +1 -0
- package/lib/{default-light-setting-72b66285.js → default-light-setting-7c86a261.js} +2 -2
- package/lib/default-light-setting-7c86a261.js.map +1 -0
- package/lib/{default-light-setting-0acafdb5.nomodule.js → default-light-setting-a9220dec.nomodule.js} +2 -2
- package/lib/default-light-setting-a9220dec.nomodule.js.map +1 -0
- package/lib/definitions/common-core/src/utils/shims.d.ts +6 -0
- package/lib/definitions/configurator-core/src/webgl/configurator-scene-manager.d.ts +2 -1
- package/lib/definitions/packages/common-core/src/utils/shims.d.ts +6 -0
- package/lib/definitions/packages/configurator-core/src/webgl/configurator-scene-manager.d.ts +2 -1
- package/lib/definitions/packages/planner-core/src/external-object-api-callbacks.d.ts +3 -1
- package/lib/definitions/packages/planner-core/src/roomle-planner-ui-callback.d.ts +3 -1
- package/lib/definitions/packages/planner-core/src/roomle-planner.d.ts +4 -4
- package/lib/definitions/packages/planner-core/src/utils/planner-selection-handler.d.ts +2 -1
- package/lib/definitions/packages/planner-core/src/webgl/planner-element-highlighter.d.ts +16 -0
- package/lib/definitions/packages/planner-core/src/webgl/planner-scene-manager.d.ts +5 -3
- package/lib/definitions/packages/typings/kernel.d.ts +1 -2
- package/lib/definitions/packages/typings/planner.d.ts +2 -1
- package/lib/definitions/packages/vite-plugins/vite-plugin-bundle-sw.d.ts +10 -0
- package/lib/definitions/planner-core/src/external-object-api-callbacks.d.ts +3 -1
- package/lib/definitions/planner-core/src/roomle-planner-ui-callback.d.ts +3 -1
- package/lib/definitions/planner-core/src/roomle-planner.d.ts +4 -4
- package/lib/definitions/planner-core/src/utils/planner-selection-handler.d.ts +2 -1
- package/lib/definitions/planner-core/src/webgl/planner-element-highlighter.d.ts +16 -0
- package/lib/definitions/planner-core/src/webgl/planner-scene-manager.d.ts +5 -3
- package/lib/definitions/typings/kernel.d.ts +1 -2
- package/lib/definitions/typings/planner.d.ts +2 -1
- package/lib/definitions/vite-plugins/vite-plugin-bundle-sw.d.ts +10 -0
- package/lib/{dimensioning-helper-eca2350a.nomodule.js → dimensioning-helper-5ff4ec1b.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-eca2350a.nomodule.js.map → dimensioning-helper-5ff4ec1b.nomodule.js.map} +1 -1
- package/lib/{dimensioning-helper-6c3a1cfd.js → dimensioning-helper-900aae2f.js} +2 -2
- package/lib/{dimensioning-helper-6c3a1cfd.js.map → dimensioning-helper-900aae2f.js.map} +1 -1
- package/lib/{glb-viewer-cc03fbb7.js → glb-viewer-8637b63f.js} +2 -2
- package/lib/{glb-viewer-cc03fbb7.js.map → glb-viewer-8637b63f.js.map} +1 -1
- package/lib/{glb-viewer-camera-behaviour-49cc3a02.js → glb-viewer-camera-behaviour-902fbd3f.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-902fbd3f.js.map +1 -0
- package/lib/{glb-viewer-camera-behaviour-bd9036eb.nomodule.js → glb-viewer-camera-behaviour-d7c341e1.nomodule.js} +2 -2
- package/lib/glb-viewer-camera-behaviour-d7c341e1.nomodule.js.map +1 -0
- package/lib/{glb-viewer-71c3d57d.nomodule.js → glb-viewer-f3735286.nomodule.js} +2 -2
- package/lib/{glb-viewer-71c3d57d.nomodule.js.map → glb-viewer-f3735286.nomodule.js.map} +1 -1
- package/lib/glb-viewer-main-17e46c09.js +2 -0
- package/lib/glb-viewer-main-17e46c09.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/legacy/{banana-for-scale-6324cd2e.legacy.js → banana-for-scale-fac09381.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-6324cd2e.legacy.js.map → banana-for-scale-fac09381.legacy.js.map} +1 -1
- package/lib/legacy/{camera-behaviour-3652ec64.legacy.js → camera-behaviour-39bfe182.legacy.js} +2 -2
- package/lib/legacy/{camera-behaviour-3652ec64.legacy.js.map → camera-behaviour-39bfe182.legacy.js.map} +1 -1
- package/lib/legacy/{component-dimensioning-fcc7ac72.legacy.js → component-dimensioning-0066dbaf.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-0066dbaf.legacy.js.map +1 -0
- package/lib/legacy/{component-raycast-helper-1953123a.legacy.js → component-raycast-helper-218c4ad8.legacy.js} +2 -2
- package/lib/legacy/component-raycast-helper-218c4ad8.legacy.js.map +1 -0
- package/lib/legacy/{configurator-e63e2588.legacy.js → configurator-094603e4.legacy.js} +2 -2
- package/lib/legacy/configurator-094603e4.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{continuous-drawing-helper-21e3a44b.legacy.js → continuous-drawing-helper-894c9b4a.legacy.js} +2 -2
- package/lib/legacy/continuous-drawing-helper-894c9b4a.legacy.js.map +1 -0
- package/lib/legacy/{default-light-setting-247d1ac2.legacy.js → default-light-setting-890801a4.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-890801a4.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-ef295586.legacy.js → dimensioning-helper-afe7b1dd.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-ef295586.legacy.js.map → dimensioning-helper-afe7b1dd.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-07009fa9.legacy.js → glb-viewer-0b716d25.legacy.js} +2 -2
- package/lib/legacy/{glb-viewer-07009fa9.legacy.js.map → glb-viewer-0b716d25.legacy.js.map} +1 -1
- package/lib/legacy/{glb-viewer-camera-behaviour-6ae06e5b.legacy.js → glb-viewer-camera-behaviour-8f00ca9a.legacy.js} +2 -2
- package/lib/legacy/glb-viewer-camera-behaviour-8f00ca9a.legacy.js.map +1 -0
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{material-viewer-e2e1415f.legacy.js → material-viewer-26d42d4d.legacy.js} +2 -2
- package/lib/legacy/material-viewer-26d42d4d.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/planner-a909db4e.legacy.js +2 -0
- package/lib/legacy/{planner-b29e04fa.legacy.js.map → planner-a909db4e.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/{roomle-configurator-7b4da1c7.legacy.js → roomle-configurator-726ec19f.legacy.js} +2 -2
- package/lib/legacy/roomle-configurator-726ec19f.legacy.js.map +1 -0
- package/lib/legacy/{roomle-dependency-injection-b0964663.legacy.js → roomle-dependency-injection-94e0f3c5.legacy.js} +3 -3
- package/lib/legacy/{roomle-dependency-injection-b0964663.legacy.js.map → roomle-dependency-injection-94e0f3c5.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{script-loader-2a629319.legacy.js → script-loader-9eaecbc2.legacy.js} +2 -2
- package/lib/legacy/script-loader-9eaecbc2.legacy.js.map +1 -0
- package/lib/legacy/static/ConfiguratorKernel-f1b76b0ed55f4545.wasm +0 -0
- package/lib/legacy/static/RoomleCore-cedf1d78a58f2f99.wasm +0 -0
- package/lib/legacy/static/RoomleToolsCore-9cb115f8f7b58855.wasm +0 -0
- package/lib/legacy/{stats-helper-510b1818.legacy.js → stats-helper-1ead90df.legacy.js} +2 -2
- package/lib/legacy/stats-helper-1ead90df.legacy.js.map +1 -0
- package/lib/legacy/{tools-core-a71c4033.legacy.js → tools-core-4aa11aa0.legacy.js} +2 -2
- package/lib/legacy/tools-core-4aa11aa0.legacy.js.map +1 -0
- package/lib/{material-viewer-ded822e5.js → material-viewer-0ad40915.js} +2 -2
- package/lib/material-viewer-0ad40915.js.map +1 -0
- package/lib/{material-viewer-fa945a76.nomodule.js → material-viewer-cb5cfc43.nomodule.js} +2 -2
- package/lib/material-viewer-cb5cfc43.nomodule.js.map +1 -0
- package/lib/material-viewer-main-7ea852a6.js +2 -0
- package/lib/material-viewer-main-7ea852a6.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/planner-74f30292.nomodule.js +2 -0
- package/lib/{planner-22e2b28f.nomodule.js.map → planner-74f30292.nomodule.js.map} +1 -1
- package/lib/{planner-22e2b28f.nomodule.js → planner-e0458453.js} +2 -2
- package/lib/{planner-e462c654.js.map → planner-e0458453.js.map} +1 -1
- package/lib/planner-main-ee1ef6f5.js +2 -0
- package/lib/planner-main-ee1ef6f5.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/{roomle-configurator-c10f01a5.js → roomle-configurator-1727bda3.js} +2 -2
- package/lib/roomle-configurator-1727bda3.js.map +1 -0
- package/lib/{roomle-configurator-2e0c7207.nomodule.js → roomle-configurator-87863dd0.nomodule.js} +2 -2
- package/lib/roomle-configurator-87863dd0.nomodule.js.map +1 -0
- package/lib/{roomle-dependency-injection-87e6c4d2.js → roomle-dependency-injection-1b6e21f3.js} +3 -3
- package/lib/{roomle-dependency-injection-87e6c4d2.js.map → roomle-dependency-injection-1b6e21f3.js.map} +1 -1
- package/lib/{roomle-dependency-injection-4e3533e5.nomodule.js → roomle-dependency-injection-ee9ba74c.nomodule.js} +3 -3
- package/lib/{roomle-dependency-injection-4e3533e5.nomodule.js.map → roomle-dependency-injection-ee9ba74c.nomodule.js.map} +1 -1
- package/lib/{roomle-sdk-4ccbfa37.js → roomle-sdk-68ce1231.js} +2 -2
- package/lib/roomle-sdk-68ce1231.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{script-loader-23bf165d.js → script-loader-215d2bd6.js} +2 -2
- package/lib/script-loader-215d2bd6.js.map +1 -0
- package/lib/{script-loader-e89cfa99.nomodule.js → script-loader-9d578ff7.nomodule.js} +2 -2
- package/lib/script-loader-9d578ff7.nomodule.js.map +1 -0
- package/lib/static/ConfiguratorKernel-f1b76b0ed55f4545.wasm +0 -0
- package/lib/static/RoomleCore-cedf1d78a58f2f99.wasm +0 -0
- package/lib/static/RoomleToolsCore-9cb115f8f7b58855.wasm +0 -0
- package/lib/{stats-helper-0da40708.js → stats-helper-91a65ddb.js} +2 -2
- package/lib/stats-helper-91a65ddb.js.map +1 -0
- package/lib/{stats-helper-d1577325.nomodule.js → stats-helper-a54a6a36.nomodule.js} +2 -2
- package/lib/stats-helper-a54a6a36.nomodule.js.map +1 -0
- package/lib/{tools-core-079d2bde.js → tools-core-a545471b.js} +2 -2
- package/lib/tools-core-a545471b.js.map +1 -0
- package/lib/{tools-core-9763aa70.nomodule.js → tools-core-deef757c.nomodule.js} +2 -2
- package/lib/tools-core-deef757c.nomodule.js.map +1 -0
- package/package.json +2 -2
- package/lib/component-dimensioning-29366795.nomodule.js.map +0 -1
- package/lib/component-dimensioning-da1c927c.js.map +0 -1
- package/lib/component-raycast-helper-12d4e717.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-50b02e79.js.map +0 -1
- package/lib/configurator-38aa441c.js.map +0 -1
- package/lib/configurator-a6b433cc.nomodule.js.map +0 -1
- package/lib/configurator-main-c7df33dc.js +0 -2
- package/lib/configurator-main-c7df33dc.js.map +0 -1
- package/lib/continuous-drawing-helper-1ee03f56.nomodule.js.map +0 -1
- package/lib/continuous-drawing-helper-871a885f.js.map +0 -1
- package/lib/default-light-setting-0acafdb5.nomodule.js.map +0 -1
- package/lib/default-light-setting-72b66285.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-49cc3a02.js.map +0 -1
- package/lib/glb-viewer-camera-behaviour-bd9036eb.nomodule.js.map +0 -1
- package/lib/glb-viewer-main-f1c4341f.js +0 -2
- package/lib/glb-viewer-main-f1c4341f.js.map +0 -1
- package/lib/legacy/component-dimensioning-fcc7ac72.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-1953123a.legacy.js.map +0 -1
- package/lib/legacy/configurator-e63e2588.legacy.js.map +0 -1
- package/lib/legacy/continuous-drawing-helper-21e3a44b.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-247d1ac2.legacy.js.map +0 -1
- package/lib/legacy/glb-viewer-camera-behaviour-6ae06e5b.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-e2e1415f.legacy.js.map +0 -1
- package/lib/legacy/planner-b29e04fa.legacy.js +0 -2
- package/lib/legacy/roomle-configurator-7b4da1c7.legacy.js.map +0 -1
- package/lib/legacy/script-loader-2a629319.legacy.js.map +0 -1
- package/lib/legacy/static/ConfiguratorKernel-106d74e3cf540e4f.wasm +0 -0
- package/lib/legacy/static/RoomleCore-592c38aa7008d421.wasm +0 -0
- package/lib/legacy/static/RoomleToolsCore-3e547eb833c0c5bf.wasm +0 -0
- package/lib/legacy/stats-helper-510b1818.legacy.js.map +0 -1
- package/lib/legacy/tools-core-a71c4033.legacy.js.map +0 -1
- package/lib/material-viewer-ded822e5.js.map +0 -1
- package/lib/material-viewer-fa945a76.nomodule.js.map +0 -1
- package/lib/material-viewer-main-bc64c8b0.js +0 -2
- package/lib/material-viewer-main-bc64c8b0.js.map +0 -1
- package/lib/planner-e462c654.js +0 -2
- package/lib/planner-main-be575906.js +0 -2
- package/lib/planner-main-be575906.js.map +0 -1
- package/lib/roomle-configurator-2e0c7207.nomodule.js.map +0 -1
- package/lib/roomle-configurator-c10f01a5.js.map +0 -1
- package/lib/roomle-sdk-4ccbfa37.js.map +0 -1
- package/lib/script-loader-23bf165d.js.map +0 -1
- package/lib/script-loader-e89cfa99.nomodule.js.map +0 -1
- package/lib/static/ConfiguratorKernel-106d74e3cf540e4f.wasm +0 -0
- package/lib/static/RoomleCore-592c38aa7008d421.wasm +0 -0
- package/lib/static/RoomleToolsCore-3e547eb833c0c5bf.wasm +0 -0
- package/lib/stats-helper-0da40708.js.map +0 -1
- package/lib/stats-helper-d1577325.nomodule.js.map +0 -1
- package/lib/tools-core-079d2bde.js.map +0 -1
- package/lib/tools-core-9763aa70.nomodule.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Configurator}from"./configurator-9719c319.js";import"./script-loader-215d2bd6.js";import"./query-params-helper-c9492f35.js";import"./main-thread-to-worker-ee3036b3.js";import"./roomle-dependency-injection-1b6e21f3.js";import"./camera-behaviour-478f9d50.js";import"./component-raycast-helper-94f7b436.js";import"./roomle-configurator-1727bda3.js";import"./default-light-setting-7c86a261.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-abd6e1c5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-main-abd6e1c5.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./configurator-
|
|
1
|
+
System.register(["./configurator-1f5aa854.nomodule.js","./script-loader-9d578ff7.nomodule.js","./query-params-helper-51a53f8c.nomodule.js","./main-thread-to-worker-2529fa31.nomodule.js","./roomle-dependency-injection-ee9ba74c.nomodule.js","./camera-behaviour-8039bb35.nomodule.js","./component-raycast-helper-abc6a286.nomodule.js","./roomle-configurator-87863dd0.nomodule.js","./default-light-setting-a9220dec.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-ee9ba74c.nomodule.js","./main-thread-to-worker-2529fa31.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-5a2759f1.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-5a2759f1.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-1b6e21f3.js";import{aT as RingGeometry,h as MeshBasicMaterial,w as DoubleSide,z as Mesh}from"./main-thread-to-worker-ee3036b3.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-f45acb3e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-f45acb3e.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-478f9d50.js";import{ag as getGUI}from"./roomle-dependency-injection-1b6e21f3.js";import{D as DirectionalLight,C as Color,V as Vector2,a as Vector3,A as AmbientLight}from"./main-thread-to-worker-ee3036b3.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,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=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-7c86a261.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-7c86a261.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./camera-behaviour-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
System.register(["./camera-behaviour-8039bb35.nomodule.js","./roomle-dependency-injection-ee9ba74c.nomodule.js","./main-thread-to-worker-2529fa31.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-a9220dec.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-a9220dec.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -92,6 +92,12 @@ export interface FeatureFlags {
|
|
|
92
92
|
* as it is not possible to guess which side of the wall of the room currently being entered is the inside of the wall.
|
|
93
93
|
*/
|
|
94
94
|
drawPreviewMode?: Enumify<typeof DRAW_PREVIEW_MODES>;
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @description TO BE REMOVED ONCE RML-13218 IS RESOLVED.
|
|
98
|
+
* Forces new thumbnails to be generated on configuration save
|
|
99
|
+
*/
|
|
100
|
+
forceSaveThumbnails?: boolean;
|
|
95
101
|
}
|
|
96
102
|
export type RoomleColors = keyof typeof ROOMLE_COLORS;
|
|
97
103
|
export type ColorsIn3dScene = Record<RoomleColors, HexColorString | HexColorNumber>;
|
|
@@ -22,6 +22,7 @@ import ConfiguratorCameraBehaviour from '../../../common-core/src/cameracontrol/
|
|
|
22
22
|
import type CameraBehaviour from '../../../common-core/src/cameracontrol/camera-behaviour';
|
|
23
23
|
import type CameraBehaviour3d from '../../../common-core/src/cameracontrol/camera-behaviour-3d';
|
|
24
24
|
import type GlobalInitData from '../../../common-core/src/utils/global-init-data';
|
|
25
|
+
import type { CancelSelectionReasons } from '../../../typings/planner';
|
|
25
26
|
export default class ConfiguratorSceneManager extends SceneManager implements ConfiguratorViewModelCallbackI {
|
|
26
27
|
_creator_: string;
|
|
27
28
|
private _configuratorInputManager;
|
|
@@ -98,7 +99,7 @@ export default class ConfiguratorSceneManager extends SceneManager implements Co
|
|
|
98
99
|
protected disablePanning(): void;
|
|
99
100
|
cancelPreviousDockings(): void;
|
|
100
101
|
cancelComponentSelection(resetCamera?: boolean): void;
|
|
101
|
-
protected notifyPlannerOnComponentSelectionCancel(_isExternalObject: boolean): void;
|
|
102
|
+
protected notifyPlannerOnComponentSelectionCancel(_isExternalObject: boolean, _reason: CancelSelectionReasons): void;
|
|
102
103
|
private _cancelSelection;
|
|
103
104
|
private _selectComponent;
|
|
104
105
|
private _deselectComponent;
|
|
@@ -92,6 +92,12 @@ export interface FeatureFlags {
|
|
|
92
92
|
* as it is not possible to guess which side of the wall of the room currently being entered is the inside of the wall.
|
|
93
93
|
*/
|
|
94
94
|
drawPreviewMode?: Enumify<typeof DRAW_PREVIEW_MODES>;
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @description TO BE REMOVED ONCE RML-13218 IS RESOLVED.
|
|
98
|
+
* Forces new thumbnails to be generated on configuration save
|
|
99
|
+
*/
|
|
100
|
+
forceSaveThumbnails?: boolean;
|
|
95
101
|
}
|
|
96
102
|
export type RoomleColors = keyof typeof ROOMLE_COLORS;
|
|
97
103
|
export type ColorsIn3dScene = Record<RoomleColors, HexColorString | HexColorNumber>;
|
package/lib/definitions/packages/configurator-core/src/webgl/configurator-scene-manager.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import ConfiguratorCameraBehaviour from '../../../common-core/src/cameracontrol/
|
|
|
22
22
|
import type CameraBehaviour from '../../../common-core/src/cameracontrol/camera-behaviour';
|
|
23
23
|
import type CameraBehaviour3d from '../../../common-core/src/cameracontrol/camera-behaviour-3d';
|
|
24
24
|
import type GlobalInitData from '../../../common-core/src/utils/global-init-data';
|
|
25
|
+
import type { CancelSelectionReasons } from '../../../typings/planner';
|
|
25
26
|
export default class ConfiguratorSceneManager extends SceneManager implements ConfiguratorViewModelCallbackI {
|
|
26
27
|
_creator_: string;
|
|
27
28
|
private _configuratorInputManager;
|
|
@@ -98,7 +99,7 @@ export default class ConfiguratorSceneManager extends SceneManager implements Co
|
|
|
98
99
|
protected disablePanning(): void;
|
|
99
100
|
cancelPreviousDockings(): void;
|
|
100
101
|
cancelComponentSelection(resetCamera?: boolean): void;
|
|
101
|
-
protected notifyPlannerOnComponentSelectionCancel(_isExternalObject: boolean): void;
|
|
102
|
+
protected notifyPlannerOnComponentSelectionCancel(_isExternalObject: boolean, _reason: CancelSelectionReasons): void;
|
|
102
103
|
private _cancelSelection;
|
|
103
104
|
private _selectComponent;
|
|
104
105
|
private _deselectComponent;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CancelSelectionReasons } from '../../typings/planner';
|
|
1
2
|
export interface ExternalObjectGroupPosition {
|
|
2
3
|
pos: number[];
|
|
3
4
|
rotation?: number;
|
|
@@ -124,6 +125,7 @@ export interface ExternalObjectUiCallback {
|
|
|
124
125
|
onExternalObjectModuleSelected(groupId: string, rootModuleId: string | null, subModuleId: string | null): void;
|
|
125
126
|
/**
|
|
126
127
|
* "onExternalObjectSelectionCancel" is invoked when the selection of a group, root module or sub module is canceled.
|
|
128
|
+
* @param reason why the selection was canceled
|
|
127
129
|
*/
|
|
128
|
-
onExternalObjectSelectionCancel(): void;
|
|
130
|
+
onExternalObjectSelectionCancel(reason: CancelSelectionReasons): void;
|
|
129
131
|
}
|
|
@@ -60,6 +60,7 @@ export default class RoomlePlannerUiCallback extends UiCallback implements Exter
|
|
|
60
60
|
onSelectionChange: (selectionMode: SELECTION_MODE, objectType: CallbackObjectType, payload: SelectionPayload, payloadPromise: Promise<SelectionPayload>, planElementViewModel: PlanElementViewModel) => void;
|
|
61
61
|
/**
|
|
62
62
|
* When an item selection has been canceled
|
|
63
|
+
* @param reason why the selection was canceled
|
|
63
64
|
*/
|
|
64
65
|
onSelectionCancel: (reason: CancelSelectionReasons) => void;
|
|
65
66
|
/**
|
|
@@ -229,6 +230,7 @@ export default class RoomlePlannerUiCallback extends UiCallback implements Exter
|
|
|
229
230
|
onExternalObjectModuleSelected: (groupId: string, rootModuleId: string | null, subModuleId: string | null) => void;
|
|
230
231
|
/**
|
|
231
232
|
* documented in interface ExternalObjectUiCallback
|
|
233
|
+
* @param reason why the selection was canceled
|
|
232
234
|
*/
|
|
233
|
-
onExternalObjectSelectionCancel: () => void;
|
|
235
|
+
onExternalObjectSelectionCancel: (reason: CancelSelectionReasons) => void;
|
|
234
236
|
}
|
|
@@ -136,12 +136,12 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
|
|
|
136
136
|
*/
|
|
137
137
|
selectPlanObjectById(runtimeId: RuntimeId): Promise<void>;
|
|
138
138
|
/**
|
|
139
|
-
* Highlights
|
|
140
|
-
* If `
|
|
139
|
+
* Highlights one or more objects in the scene based on their runtime IDs.
|
|
140
|
+
* If `runtimeIds` is `null`, all highlighted objects will be unhighlighted.
|
|
141
141
|
*
|
|
142
|
-
* @param
|
|
142
|
+
* @param runtimeIds A single runtime ID, an array of runtime IDs, or null.
|
|
143
143
|
*/
|
|
144
|
-
|
|
144
|
+
highlightPlanElements(runtimeIds: number | number[] | null): void;
|
|
145
145
|
backToPlanner(): void;
|
|
146
146
|
showGUI(): void;
|
|
147
147
|
switchToConfigurator(): Promise<Configurator>;
|
|
@@ -5,7 +5,8 @@ import { SELECTION_MODE } from '../../../configurator-core/src/utils/selection-h
|
|
|
5
5
|
export declare const enum SELECTION_EVENT {
|
|
6
6
|
SELECT_PLAN_ELEMENT = 0,
|
|
7
7
|
DESELECT_PLAN_ELEMENT = 1,
|
|
8
|
-
SELECT_PLAN_ELEMENT_MULTI = 2
|
|
8
|
+
SELECT_PLAN_ELEMENT_MULTI = 2,
|
|
9
|
+
SELECTION_MODE_CHANGED = 3
|
|
9
10
|
}
|
|
10
11
|
export declare const isWallOrFloor: (planElementViewModel: PlanElementViewModel) => boolean;
|
|
11
12
|
export declare class PlannerSelectionHandlerEvent {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type PlannerSceneEventHandler from './planner-scene-event-handler';
|
|
2
|
+
import type PlanViewModel from '../view-model/plan-view-model';
|
|
3
|
+
import type PlanElementViewModel from '../../../common-core/src/view-model/plan-element-view-model';
|
|
4
|
+
import type { RoomleWebGLRenderer } from '../../../common-core/src/webgl/roomle-webgl-renderer';
|
|
5
|
+
export default class PlanElementHighlighter {
|
|
6
|
+
private _sceneEventHandler;
|
|
7
|
+
private _roomleRenderer;
|
|
8
|
+
private _planViewModel;
|
|
9
|
+
constructor(sceneEventHandler: PlannerSceneEventHandler, roomleRenderer: RoomleWebGLRenderer, planViewModel: PlanViewModel);
|
|
10
|
+
private _processViewModel;
|
|
11
|
+
private _processSelectedPlanElementIds;
|
|
12
|
+
private _highlightPlanElementsBase;
|
|
13
|
+
highlightPlanElements(runtimeIds?: number[]): void;
|
|
14
|
+
highlightPlanElement(planElementViewModel?: PlanElementViewModel): void;
|
|
15
|
+
clearHighlighting(): void;
|
|
16
|
+
}
|
|
@@ -52,6 +52,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
52
52
|
currentSelection: SelectionPayload;
|
|
53
53
|
private _paperBackground;
|
|
54
54
|
private _cameraState;
|
|
55
|
+
private _planElementHighlighter;
|
|
55
56
|
private _debugSpheres;
|
|
56
57
|
constructor(creator: string, offset: CanvasOffset, plannerCallback: RoomlePlannerCallback, mode: Enumify<typeof CAMERA_TYPE>);
|
|
57
58
|
get configuratorContext(): import("../../../common-core/src/webgl/configurator-context").default;
|
|
@@ -64,7 +65,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
64
65
|
private _onSelectionChange;
|
|
65
66
|
private _onSelectionCancel;
|
|
66
67
|
private _handleMeasurementLineDraggablePoints;
|
|
67
|
-
resetConfiguratorContext(): void;
|
|
68
|
+
resetConfiguratorContext(reason: CancelSelectionReasons): void;
|
|
68
69
|
protected _setupScene(offset?: CanvasOffset, transparent?: boolean): void;
|
|
69
70
|
protected onBeforeRender(): void;
|
|
70
71
|
protected _getInputManager(): InputManager;
|
|
@@ -110,8 +111,9 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
110
111
|
private _checkNumKey;
|
|
111
112
|
protected _onKeyUp(event: KeyboardEvent, cleanup?: boolean): void;
|
|
112
113
|
setMode(mode: Enumify<typeof CAMERA_TYPE>): void;
|
|
114
|
+
private _clearHighlighting;
|
|
115
|
+
highlightPlanElementsById(runtimeIds: number[] | null): void;
|
|
113
116
|
highlightPlanElementById(runtimeId: number | null): void;
|
|
114
|
-
private _highlightPlanElement;
|
|
115
117
|
destroy(): void;
|
|
116
118
|
planObjectConfigurationLoaded(plan: Plan, element: PlanElement, _success: boolean): void;
|
|
117
119
|
addMesh(_planElement: PlanElement, _material: any, _vertices: Float32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array): void;
|
|
@@ -202,6 +204,6 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
202
204
|
setMeasurementLineLength(measurementId: number, length: number, wallDirection: string): void;
|
|
203
205
|
protected setEventHandlerObject(object: Object3D): void;
|
|
204
206
|
protected _readyForRender(): void;
|
|
205
|
-
protected notifyPlannerOnComponentSelectionCancel(isExternalObject: boolean): void;
|
|
207
|
+
protected notifyPlannerOnComponentSelectionCancel(isExternalObject: boolean, reason: CancelSelectionReasons): void;
|
|
206
208
|
}
|
|
207
209
|
export {};
|
|
@@ -176,6 +176,7 @@ export interface PlanInteractionHandler {
|
|
|
176
176
|
isUndoPossible(): boolean;
|
|
177
177
|
isRedoPossible(): boolean;
|
|
178
178
|
startInteraction(): void;
|
|
179
|
+
resumeInteraction(): void;
|
|
179
180
|
endInteraction(): void;
|
|
180
181
|
undo(): void;
|
|
181
182
|
redo(): void;
|
|
@@ -326,5 +327,5 @@ export interface PlanObjectPosition {
|
|
|
326
327
|
runtimeId: RuntimeId;
|
|
327
328
|
position2d: Position2;
|
|
328
329
|
}
|
|
329
|
-
export type CancelSelectionReasons = 'swap_object' | 'click_outside' | 'select_other' | 'double_click_wall' | 'unknown' | 'dock_component' | 'delete_object';
|
|
330
|
+
export type CancelSelectionReasons = 'swap_object' | 'click_outside' | 'select_other' | 'double_click_wall' | 'unknown' | 'dock_component' | 'delete_object' | 'selection_mode_changed';
|
|
330
331
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ServiceWorkerHmrPluginConfig {
|
|
2
|
+
inputFile: string;
|
|
3
|
+
outputFile: string;
|
|
4
|
+
}
|
|
5
|
+
declare const bundleSwPlugin: (config: ServiceWorkerHmrPluginConfig[]) => {
|
|
6
|
+
apply: string;
|
|
7
|
+
enforce: string;
|
|
8
|
+
configResolved(): void;
|
|
9
|
+
};
|
|
10
|
+
export default bundleSwPlugin;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CancelSelectionReasons } from '../../typings/planner';
|
|
1
2
|
export interface ExternalObjectGroupPosition {
|
|
2
3
|
pos: number[];
|
|
3
4
|
rotation?: number;
|
|
@@ -124,6 +125,7 @@ export interface ExternalObjectUiCallback {
|
|
|
124
125
|
onExternalObjectModuleSelected(groupId: string, rootModuleId: string | null, subModuleId: string | null): void;
|
|
125
126
|
/**
|
|
126
127
|
* "onExternalObjectSelectionCancel" is invoked when the selection of a group, root module or sub module is canceled.
|
|
128
|
+
* @param reason why the selection was canceled
|
|
127
129
|
*/
|
|
128
|
-
onExternalObjectSelectionCancel(): void;
|
|
130
|
+
onExternalObjectSelectionCancel(reason: CancelSelectionReasons): void;
|
|
129
131
|
}
|
|
@@ -60,6 +60,7 @@ export default class RoomlePlannerUiCallback extends UiCallback implements Exter
|
|
|
60
60
|
onSelectionChange: (selectionMode: SELECTION_MODE, objectType: CallbackObjectType, payload: SelectionPayload, payloadPromise: Promise<SelectionPayload>, planElementViewModel: PlanElementViewModel) => void;
|
|
61
61
|
/**
|
|
62
62
|
* When an item selection has been canceled
|
|
63
|
+
* @param reason why the selection was canceled
|
|
63
64
|
*/
|
|
64
65
|
onSelectionCancel: (reason: CancelSelectionReasons) => void;
|
|
65
66
|
/**
|
|
@@ -229,6 +230,7 @@ export default class RoomlePlannerUiCallback extends UiCallback implements Exter
|
|
|
229
230
|
onExternalObjectModuleSelected: (groupId: string, rootModuleId: string | null, subModuleId: string | null) => void;
|
|
230
231
|
/**
|
|
231
232
|
* documented in interface ExternalObjectUiCallback
|
|
233
|
+
* @param reason why the selection was canceled
|
|
232
234
|
*/
|
|
233
|
-
onExternalObjectSelectionCancel: () => void;
|
|
235
|
+
onExternalObjectSelectionCancel: (reason: CancelSelectionReasons) => void;
|
|
234
236
|
}
|
|
@@ -136,12 +136,12 @@ export default class RoomlePlanner implements KernelAccessCallbackI, RoomlePlann
|
|
|
136
136
|
*/
|
|
137
137
|
selectPlanObjectById(runtimeId: RuntimeId): Promise<void>;
|
|
138
138
|
/**
|
|
139
|
-
* Highlights
|
|
140
|
-
* If `
|
|
139
|
+
* Highlights one or more objects in the scene based on their runtime IDs.
|
|
140
|
+
* If `runtimeIds` is `null`, all highlighted objects will be unhighlighted.
|
|
141
141
|
*
|
|
142
|
-
* @param
|
|
142
|
+
* @param runtimeIds A single runtime ID, an array of runtime IDs, or null.
|
|
143
143
|
*/
|
|
144
|
-
|
|
144
|
+
highlightPlanElements(runtimeIds: number | number[] | null): void;
|
|
145
145
|
backToPlanner(): void;
|
|
146
146
|
showGUI(): void;
|
|
147
147
|
switchToConfigurator(): Promise<Configurator>;
|
|
@@ -5,7 +5,8 @@ import { SELECTION_MODE } from '../../../configurator-core/src/utils/selection-h
|
|
|
5
5
|
export declare const enum SELECTION_EVENT {
|
|
6
6
|
SELECT_PLAN_ELEMENT = 0,
|
|
7
7
|
DESELECT_PLAN_ELEMENT = 1,
|
|
8
|
-
SELECT_PLAN_ELEMENT_MULTI = 2
|
|
8
|
+
SELECT_PLAN_ELEMENT_MULTI = 2,
|
|
9
|
+
SELECTION_MODE_CHANGED = 3
|
|
9
10
|
}
|
|
10
11
|
export declare const isWallOrFloor: (planElementViewModel: PlanElementViewModel) => boolean;
|
|
11
12
|
export declare class PlannerSelectionHandlerEvent {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type PlannerSceneEventHandler from './planner-scene-event-handler';
|
|
2
|
+
import type PlanViewModel from '../view-model/plan-view-model';
|
|
3
|
+
import type PlanElementViewModel from '../../../common-core/src/view-model/plan-element-view-model';
|
|
4
|
+
import type { RoomleWebGLRenderer } from '../../../common-core/src/webgl/roomle-webgl-renderer';
|
|
5
|
+
export default class PlanElementHighlighter {
|
|
6
|
+
private _sceneEventHandler;
|
|
7
|
+
private _roomleRenderer;
|
|
8
|
+
private _planViewModel;
|
|
9
|
+
constructor(sceneEventHandler: PlannerSceneEventHandler, roomleRenderer: RoomleWebGLRenderer, planViewModel: PlanViewModel);
|
|
10
|
+
private _processViewModel;
|
|
11
|
+
private _processSelectedPlanElementIds;
|
|
12
|
+
private _highlightPlanElementsBase;
|
|
13
|
+
highlightPlanElements(runtimeIds?: number[]): void;
|
|
14
|
+
highlightPlanElement(planElementViewModel?: PlanElementViewModel): void;
|
|
15
|
+
clearHighlighting(): void;
|
|
16
|
+
}
|
|
@@ -52,6 +52,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
52
52
|
currentSelection: SelectionPayload;
|
|
53
53
|
private _paperBackground;
|
|
54
54
|
private _cameraState;
|
|
55
|
+
private _planElementHighlighter;
|
|
55
56
|
private _debugSpheres;
|
|
56
57
|
constructor(creator: string, offset: CanvasOffset, plannerCallback: RoomlePlannerCallback, mode: Enumify<typeof CAMERA_TYPE>);
|
|
57
58
|
get configuratorContext(): import("../../../common-core/src/webgl/configurator-context").default;
|
|
@@ -64,7 +65,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
64
65
|
private _onSelectionChange;
|
|
65
66
|
private _onSelectionCancel;
|
|
66
67
|
private _handleMeasurementLineDraggablePoints;
|
|
67
|
-
resetConfiguratorContext(): void;
|
|
68
|
+
resetConfiguratorContext(reason: CancelSelectionReasons): void;
|
|
68
69
|
protected _setupScene(offset?: CanvasOffset, transparent?: boolean): void;
|
|
69
70
|
protected onBeforeRender(): void;
|
|
70
71
|
protected _getInputManager(): InputManager;
|
|
@@ -110,8 +111,9 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
110
111
|
private _checkNumKey;
|
|
111
112
|
protected _onKeyUp(event: KeyboardEvent, cleanup?: boolean): void;
|
|
112
113
|
setMode(mode: Enumify<typeof CAMERA_TYPE>): void;
|
|
114
|
+
private _clearHighlighting;
|
|
115
|
+
highlightPlanElementsById(runtimeIds: number[] | null): void;
|
|
113
116
|
highlightPlanElementById(runtimeId: number | null): void;
|
|
114
|
-
private _highlightPlanElement;
|
|
115
117
|
destroy(): void;
|
|
116
118
|
planObjectConfigurationLoaded(plan: Plan, element: PlanElement, _success: boolean): void;
|
|
117
119
|
addMesh(_planElement: PlanElement, _material: any, _vertices: Float32Array, _indices: Int32Array, _uvCoords: Float32Array, _normals: Float32Array): void;
|
|
@@ -202,6 +204,6 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
202
204
|
setMeasurementLineLength(measurementId: number, length: number, wallDirection: string): void;
|
|
203
205
|
protected setEventHandlerObject(object: Object3D): void;
|
|
204
206
|
protected _readyForRender(): void;
|
|
205
|
-
protected notifyPlannerOnComponentSelectionCancel(isExternalObject: boolean): void;
|
|
207
|
+
protected notifyPlannerOnComponentSelectionCancel(isExternalObject: boolean, reason: CancelSelectionReasons): void;
|
|
206
208
|
}
|
|
207
209
|
export {};
|
|
@@ -176,6 +176,7 @@ export interface PlanInteractionHandler {
|
|
|
176
176
|
isUndoPossible(): boolean;
|
|
177
177
|
isRedoPossible(): boolean;
|
|
178
178
|
startInteraction(): void;
|
|
179
|
+
resumeInteraction(): void;
|
|
179
180
|
endInteraction(): void;
|
|
180
181
|
undo(): void;
|
|
181
182
|
redo(): void;
|
|
@@ -326,5 +327,5 @@ export interface PlanObjectPosition {
|
|
|
326
327
|
runtimeId: RuntimeId;
|
|
327
328
|
position2d: Position2;
|
|
328
329
|
}
|
|
329
|
-
export type CancelSelectionReasons = 'swap_object' | 'click_outside' | 'select_other' | 'double_click_wall' | 'unknown' | 'dock_component' | 'delete_object';
|
|
330
|
+
export type CancelSelectionReasons = 'swap_object' | 'click_outside' | 'select_other' | 'double_click_wall' | 'unknown' | 'dock_component' | 'delete_object' | 'selection_mode_changed';
|
|
330
331
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ServiceWorkerHmrPluginConfig {
|
|
2
|
+
inputFile: string;
|
|
3
|
+
outputFile: string;
|
|
4
|
+
}
|
|
5
|
+
declare const bundleSwPlugin: (config: ServiceWorkerHmrPluginConfig[]) => {
|
|
6
|
+
apply: string;
|
|
7
|
+
enforce: string;
|
|
8
|
+
configResolved(): void;
|
|
9
|
+
};
|
|
10
|
+
export default bundleSwPlugin;
|
package/lib/{dimensioning-helper-eca2350a.nomodule.js → dimensioning-helper-5ff4ec1b.nomodule.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=dimensioning-helper-
|
|
1
|
+
System.register(["./roomle-dependency-injection-ee9ba74c.nomodule.js","./main-thread-to-worker-2529fa31.nomodule.js","./TextGeometry-cd81779b.nomodule.js"],(function(t){var i,e,s,n,h,o,a,_,d,r,p,m,l,c,x,u,g,w,b,y,T,L,z;return{setters:[function(t){i=t.aW,e=t.H,s=t._,n=t.i,h=t.j,o=t.aX,a=t.ac},function(t){_=t.O,d=t.a,r=t.h,p=t.w,m=t.bo,l=t.B,c=t.z,x=t.Q,u=t.b9,g=t.K,w=t.u,b=t.G,y=t.b,T=t.bI,L=t.ad},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,height:.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 u(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 g,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-5ff4ec1b.nomodule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-5ff4ec1b.nomodule.js","sources":["../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-9dd2262895ccc1a9.json\""],"names":[],"mappings":"w4HAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{aW as normalizeRotation,H as dispose,_ as __decorate,i as inject,j as AsyncGuard,aX as AsyncDependencyLoader,ac as convertToTHREE}from"./roomle-dependency-injection-87e6c4d2.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,bI as Line3,ad as Box3}from"./main-thread-to-worker-ee3036b3.js";import{T as TextGeometry}from"./TextGeometry-ab643210.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,height:.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{aW as normalizeRotation,H as dispose,_ as __decorate,i as inject,j as AsyncGuard,aX as AsyncDependencyLoader,ac as convertToTHREE}from"./roomle-dependency-injection-1b6e21f3.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,bI as Line3,ad as Box3}from"./main-thread-to-worker-ee3036b3.js";import{T as TextGeometry}from"./TextGeometry-ab643210.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,height:.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-900aae2f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-900aae2f.js","sources":["../../packages/configurator-core/public/fonts/lato_regular_sub.json"],"sourcesContent":["export default \"static/lato_regular_sub-9dd2262895ccc1a9.json\""],"names":[],"mappings":"w7IAAe"}
|