@roomle/web-sdk 2.68.0-alpha.3 → 2.68.0-bo-mvp.1
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/.releaserc.json +5 -0
- package/lib/{TextGeometry-2f1b3194.js → TextGeometry-d3349d80.js} +2 -2
- package/lib/{TextGeometry-2f1b3194.js.map → TextGeometry-d3349d80.js.map} +1 -1
- package/lib/{TextGeometry-885c93d0.nomodule.js → TextGeometry-f2af7f22.nomodule.js} +2 -2
- package/lib/{TextGeometry-885c93d0.nomodule.js.map → TextGeometry-f2af7f22.nomodule.js.map} +1 -1
- package/lib/{banana-for-scale-766afca3.js → banana-for-scale-552c72ee.js} +2 -2
- package/lib/{banana-for-scale-766afca3.js.map → banana-for-scale-552c72ee.js.map} +1 -1
- package/lib/{banana-for-scale-3e9bafe3.nomodule.js → banana-for-scale-78fc3756.nomodule.js} +2 -2
- package/lib/{banana-for-scale-3e9bafe3.nomodule.js.map → banana-for-scale-78fc3756.nomodule.js.map} +1 -1
- package/lib/{budgeteer-measure-69d8c571.js → budgeteer-measure-c3a1fb68.js} +2 -2
- package/lib/{budgeteer-measure-69d8c571.js.map → budgeteer-measure-c3a1fb68.js.map} +1 -1
- package/lib/budgeteer-measure.nomodule.js +1 -1
- package/lib/{component-dimensioning-020239a1.js → component-dimensioning-4bf651ea.js} +2 -2
- package/lib/component-dimensioning-4bf651ea.js.map +1 -0
- package/lib/{component-dimensioning-d22d3a07.nomodule.js → component-dimensioning-babc0b0f.nomodule.js} +2 -2
- package/lib/component-dimensioning-babc0b0f.nomodule.js.map +1 -0
- package/lib/{component-raycast-helper-5417c0aa.nomodule.js → component-raycast-helper-02060f77.nomodule.js} +2 -2
- package/lib/component-raycast-helper-02060f77.nomodule.js.map +1 -0
- package/lib/{component-raycast-helper-898ca519.js → component-raycast-helper-b700ff42.js} +2 -2
- package/lib/component-raycast-helper-b700ff42.js.map +1 -0
- package/lib/configurator-5a33f41a.nomodule.js +2 -0
- package/lib/configurator-5a33f41a.nomodule.js.map +1 -0
- package/lib/configurator-985c945d.js +2 -0
- package/lib/configurator-985c945d.js.map +1 -0
- package/lib/configurator-main-368b91f9.js +2 -0
- package/lib/configurator-main-368b91f9.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{continuous-drawing-helper-599fd21c.nomodule.js → continuous-drawing-helper-01461035.nomodule.js} +2 -2
- package/lib/continuous-drawing-helper-01461035.nomodule.js.map +1 -0
- package/lib/{continuous-drawing-helper-96149278.js → continuous-drawing-helper-9332c310.js} +2 -2
- package/lib/continuous-drawing-helper-9332c310.js.map +1 -0
- package/lib/definitions/common-core/src/view-model/plan-object-view-model.d.ts +2 -12
- package/lib/definitions/configurator-core/src/export/production-manager-export.d.ts +35 -0
- package/lib/definitions/configurator-core/src/roomle-configurator.d.ts +5 -0
- package/lib/definitions/planner-core/src/roomle-planner-ui-callback.d.ts +3 -3
- package/lib/definitions/planner-core/src/webgl/planner-scene-manager.d.ts +1 -2
- package/lib/definitions/typings/planner.d.ts +3 -27
- package/lib/{dimensioning-helper-2b9ce398.js → dimensioning-helper-34e02cf8.js} +2 -2
- package/lib/{dimensioning-helper-2b9ce398.js.map → dimensioning-helper-34e02cf8.js.map} +1 -1
- package/lib/{dimensioning-helper-bcd8b86c.nomodule.js → dimensioning-helper-fcd50150.nomodule.js} +2 -2
- package/lib/{dimensioning-helper-bcd8b86c.nomodule.js.map → dimensioning-helper-fcd50150.nomodule.js.map} +1 -1
- package/lib/glb-viewer-4a398e47.nomodule.js +2 -0
- package/lib/glb-viewer-4a398e47.nomodule.js.map +1 -0
- package/lib/glb-viewer-740070e6.js +2 -0
- package/lib/glb-viewer-740070e6.js.map +1 -0
- package/lib/glb-viewer-main-2d6f5fec.js +2 -0
- package/lib/glb-viewer-main-2d6f5fec.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/{default-light-setting-a894ca75.js → jszip.min-0a57f629.js} +2 -2
- package/lib/jszip.min-0a57f629.js.map +1 -0
- package/lib/{default-light-setting-8d6222a1.nomodule.js → jszip.min-be9beafb.nomodule.js} +2 -2
- package/lib/jszip.min-be9beafb.nomodule.js.map +1 -0
- package/lib/legacy/{TextGeometry-3d9fa5f8.legacy.js → TextGeometry-94df4bb7.legacy.js} +2 -2
- package/lib/legacy/{TextGeometry-3d9fa5f8.legacy.js.map → TextGeometry-94df4bb7.legacy.js.map} +1 -1
- package/lib/legacy/{banana-for-scale-ef322243.legacy.js → banana-for-scale-f5206195.legacy.js} +2 -2
- package/lib/legacy/{banana-for-scale-ef322243.legacy.js.map → banana-for-scale-f5206195.legacy.js.map} +1 -1
- package/lib/legacy/budgeteer-measure.legacy.js +1 -1
- package/lib/legacy/{component-dimensioning-e0380962.legacy.js → component-dimensioning-131e2fe3.legacy.js} +2 -2
- package/lib/legacy/component-dimensioning-131e2fe3.legacy.js.map +1 -0
- package/lib/legacy/{component-raycast-helper-a12e51ba.legacy.js → component-raycast-helper-048f34e5.legacy.js} +2 -2
- package/lib/legacy/component-raycast-helper-048f34e5.legacy.js.map +1 -0
- package/lib/legacy/configurator-113bf0bc.legacy.js +2 -0
- package/lib/legacy/configurator-113bf0bc.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{continuous-drawing-helper-a723245e.legacy.js → continuous-drawing-helper-721e94bc.legacy.js} +2 -2
- package/lib/legacy/continuous-drawing-helper-721e94bc.legacy.js.map +1 -0
- package/lib/legacy/{dimensioning-helper-5f67cb85.legacy.js → dimensioning-helper-b114266d.legacy.js} +2 -2
- package/lib/legacy/{dimensioning-helper-5f67cb85.legacy.js.map → dimensioning-helper-b114266d.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-4d440ac4.legacy.js +2 -0
- package/lib/legacy/glb-viewer-4d440ac4.legacy.js.map +1 -0
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{default-light-setting-f09bbb74.legacy.js → jszip.min-47b5cc15.legacy.js} +2 -2
- package/lib/legacy/jszip.min-47b5cc15.legacy.js.map +1 -0
- package/lib/legacy/{main-thread-to-worker-53273087.legacy.js → main-thread-to-worker-46067bf4.legacy.js} +2 -2
- package/lib/legacy/{main-thread-to-worker-53273087.legacy.js.map → main-thread-to-worker-46067bf4.legacy.js.map} +1 -1
- package/lib/legacy/{material-viewer-19f63735.legacy.js → material-viewer-3e59215f.legacy.js} +2 -2
- package/lib/legacy/material-viewer-3e59215f.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/planner-f0425c8e.legacy.js +2 -0
- package/lib/legacy/{planner-dc8353f3.legacy.js.map → planner-f0425c8e.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/roomle-configurator-37ede96d.legacy.js +2 -0
- package/lib/legacy/roomle-configurator-37ede96d.legacy.js.map +1 -0
- package/lib/legacy/{roomle-dependency-injection-5dcb2fd0.legacy.js → roomle-dependency-injection-43f311f0.legacy.js} +3 -3
- package/lib/legacy/{roomle-dependency-injection-5dcb2fd0.legacy.js.map → roomle-dependency-injection-43f311f0.legacy.js.map} +1 -1
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/{scene-manager-ba7807c6.legacy.js → scene-manager-3b8e4f10.legacy.js} +2 -2
- package/lib/legacy/{scene-manager-ba7807c6.legacy.js.map → scene-manager-3b8e4f10.legacy.js.map} +1 -1
- package/lib/legacy/{script-loader-58dd7d94.legacy.js → script-loader-57076a15.legacy.js} +2 -2
- package/lib/legacy/script-loader-57076a15.legacy.js.map +1 -0
- package/lib/legacy/{stats-helper-0306d5f9.legacy.js → stats-helper-4a51b366.legacy.js} +2 -2
- package/lib/legacy/stats-helper-4a51b366.legacy.js.map +1 -0
- package/lib/legacy/{tools-core-4f1f30dd.legacy.js → tools-core-f668ade5.legacy.js} +2 -2
- package/lib/legacy/tools-core-f668ade5.legacy.js.map +1 -0
- package/lib/{main-thread-to-worker-a8fb30c0.nomodule.js → main-thread-to-worker-22c550e2.nomodule.js} +2 -2
- package/lib/{main-thread-to-worker-a8fb30c0.nomodule.js.map → main-thread-to-worker-22c550e2.nomodule.js.map} +1 -1
- package/lib/{main-thread-to-worker-9f925ba4.js → main-thread-to-worker-6dba7605.js} +2 -2
- package/lib/{main-thread-to-worker-9f925ba4.js.map → main-thread-to-worker-6dba7605.js.map} +1 -1
- package/lib/{material-viewer-142fe936.js → material-viewer-65568814.js} +2 -2
- package/lib/material-viewer-65568814.js.map +1 -0
- package/lib/{material-viewer-368e4a9b.nomodule.js → material-viewer-8e4baeb5.nomodule.js} +2 -2
- package/lib/material-viewer-8e4baeb5.nomodule.js.map +1 -0
- package/lib/material-viewer-main-3ba91df0.js +2 -0
- package/lib/material-viewer-main-3ba91df0.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{planner-7a09d481.js → planner-47ce1645.nomodule.js} +2 -2
- package/lib/{planner-43218153.nomodule.js.map → planner-47ce1645.nomodule.js.map} +1 -1
- package/lib/planner-f23bafa1.js +2 -0
- package/lib/{planner-7a09d481.js.map → planner-f23bafa1.js.map} +1 -1
- package/lib/planner-main-a558ea6d.js +2 -0
- package/lib/planner-main-a558ea6d.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/roomle-configurator-ab3493da.js +2 -0
- package/lib/roomle-configurator-ab3493da.js.map +1 -0
- package/lib/roomle-configurator-b7568f41.nomodule.js +2 -0
- package/lib/roomle-configurator-b7568f41.nomodule.js.map +1 -0
- package/lib/{roomle-dependency-injection-5c76aaf6.nomodule.js → roomle-dependency-injection-b9ab3391.nomodule.js} +3 -3
- package/lib/{roomle-dependency-injection-5c76aaf6.nomodule.js.map → roomle-dependency-injection-b9ab3391.nomodule.js.map} +1 -1
- package/lib/{roomle-dependency-injection-9da9be26.js → roomle-dependency-injection-c76f3322.js} +3 -3
- package/lib/{roomle-dependency-injection-9da9be26.js.map → roomle-dependency-injection-c76f3322.js.map} +1 -1
- package/lib/{roomle-sdk-f0a68798.js → roomle-sdk-5af97cf5.js} +2 -2
- package/lib/roomle-sdk-5af97cf5.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/{scene-manager-efc03587.nomodule.js → scene-manager-73cc2559.nomodule.js} +2 -2
- package/lib/{scene-manager-efc03587.nomodule.js.map → scene-manager-73cc2559.nomodule.js.map} +1 -1
- package/lib/{scene-manager-0f4e05e4.js → scene-manager-bb2d4783.js} +2 -2
- package/lib/{scene-manager-0f4e05e4.js.map → scene-manager-bb2d4783.js.map} +1 -1
- package/lib/{script-loader-f8df2d2b.js → script-loader-39fddd00.js} +2 -2
- package/lib/script-loader-39fddd00.js.map +1 -0
- package/lib/{script-loader-9f05119e.nomodule.js → script-loader-3b74b23f.nomodule.js} +2 -2
- package/lib/script-loader-3b74b23f.nomodule.js.map +1 -0
- package/lib/{stats-helper-9153459d.nomodule.js → stats-helper-4d3767b8.nomodule.js} +2 -2
- package/lib/stats-helper-4d3767b8.nomodule.js.map +1 -0
- package/lib/{stats-helper-0bd9e31b.js → stats-helper-eb07f667.js} +2 -2
- package/lib/stats-helper-eb07f667.js.map +1 -0
- package/lib/{tools-core-c4c90204.nomodule.js → tools-core-2ff31890.nomodule.js} +2 -2
- package/lib/tools-core-2ff31890.nomodule.js.map +1 -0
- package/lib/{tools-core-f4265b90.js → tools-core-d6d9ab2d.js} +2 -2
- package/lib/tools-core-d6d9ab2d.js.map +1 -0
- package/package.json +2 -2
- package/lib/component-dimensioning-020239a1.js.map +0 -1
- package/lib/component-dimensioning-d22d3a07.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-5417c0aa.nomodule.js.map +0 -1
- package/lib/component-raycast-helper-898ca519.js.map +0 -1
- package/lib/configurator-376456db.js +0 -2
- package/lib/configurator-376456db.js.map +0 -1
- package/lib/configurator-b3a80f8c.nomodule.js +0 -2
- package/lib/configurator-b3a80f8c.nomodule.js.map +0 -1
- package/lib/configurator-main-28d824cd.js +0 -2
- package/lib/configurator-main-28d824cd.js.map +0 -1
- package/lib/continuous-drawing-helper-599fd21c.nomodule.js.map +0 -1
- package/lib/continuous-drawing-helper-96149278.js.map +0 -1
- package/lib/default-light-setting-8d6222a1.nomodule.js.map +0 -1
- package/lib/default-light-setting-a894ca75.js.map +0 -1
- package/lib/glb-viewer-93c9139c.js +0 -2
- package/lib/glb-viewer-93c9139c.js.map +0 -1
- package/lib/glb-viewer-f94ff2f7.nomodule.js +0 -2
- package/lib/glb-viewer-f94ff2f7.nomodule.js.map +0 -1
- package/lib/glb-viewer-main-9fd2d74f.js +0 -2
- package/lib/glb-viewer-main-9fd2d74f.js.map +0 -1
- package/lib/legacy/component-dimensioning-e0380962.legacy.js.map +0 -1
- package/lib/legacy/component-raycast-helper-a12e51ba.legacy.js.map +0 -1
- package/lib/legacy/configurator-d36d28ed.legacy.js +0 -2
- package/lib/legacy/configurator-d36d28ed.legacy.js.map +0 -1
- package/lib/legacy/continuous-drawing-helper-a723245e.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-f09bbb74.legacy.js.map +0 -1
- package/lib/legacy/glb-viewer-8843c14a.legacy.js +0 -2
- package/lib/legacy/glb-viewer-8843c14a.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-19f63735.legacy.js.map +0 -1
- package/lib/legacy/planner-dc8353f3.legacy.js +0 -2
- package/lib/legacy/roomle-configurator-c24d9b70.legacy.js +0 -2
- package/lib/legacy/roomle-configurator-c24d9b70.legacy.js.map +0 -1
- package/lib/legacy/script-loader-58dd7d94.legacy.js.map +0 -1
- package/lib/legacy/stats-helper-0306d5f9.legacy.js.map +0 -1
- package/lib/legacy/tools-core-4f1f30dd.legacy.js.map +0 -1
- package/lib/material-viewer-142fe936.js.map +0 -1
- package/lib/material-viewer-368e4a9b.nomodule.js.map +0 -1
- package/lib/material-viewer-main-2036b52c.js +0 -2
- package/lib/material-viewer-main-2036b52c.js.map +0 -1
- package/lib/planner-43218153.nomodule.js +0 -2
- package/lib/planner-main-d8ab0c33.js +0 -2
- package/lib/planner-main-d8ab0c33.js.map +0 -1
- package/lib/roomle-configurator-78313030.js +0 -2
- package/lib/roomle-configurator-78313030.js.map +0 -1
- package/lib/roomle-configurator-922c12e6.nomodule.js +0 -2
- package/lib/roomle-configurator-922c12e6.nomodule.js.map +0 -1
- package/lib/roomle-sdk-f0a68798.js.map +0 -1
- package/lib/script-loader-9f05119e.nomodule.js.map +0 -1
- package/lib/script-loader-f8df2d2b.js.map +0 -1
- package/lib/stats-helper-0bd9e31b.js.map +0 -1
- package/lib/stats-helper-9153459d.nomodule.js.map +0 -1
- package/lib/tools-core-c4c90204.nomodule.js.map +0 -1
- package/lib/tools-core-f4265b90.js.map +0 -1
package/.releaserc.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bP as ExtrudeGeometry}from"./main-thread-to-worker-
|
|
2
|
-
//# sourceMappingURL=TextGeometry-
|
|
1
|
+
import{bP as ExtrudeGeometry}from"./main-thread-to-worker-6dba7605.js";class TextGeometry extends ExtrudeGeometry{constructor(e,t={}){const o=t.font;if(void 0===o)super();else{const s=o.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(s,t)}this.type="TextGeometry"}}export{TextGeometry as T};
|
|
2
|
+
//# sourceMappingURL=TextGeometry-d3349d80.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextGeometry-
|
|
1
|
+
{"version":3,"file":"TextGeometry-d3349d80.js","sources":["../../node_modules/three/examples/jsm/geometries/TextGeometry.js"],"sourcesContent":["/**\n * Text = 3D Text\n *\n * parameters = {\n * font: <THREE.Font>, // font\n *\n * size: <float>, // size of the text\n * height: <float>, // thickness to extrude text\n * curveSegments: <int>, // number of points on the curves\n *\n * bevelEnabled: <bool>, // turn on bevel\n * bevelThickness: <float>, // how deep into text bevel goes\n * bevelSize: <float>, // how far from text outline (including bevelOffset) is bevel\n * bevelOffset: <float> // how far from text outline does bevel start\n * }\n */\n\nimport {\n\tExtrudeGeometry\n} from 'three';\n\nclass TextGeometry extends ExtrudeGeometry {\n\n\tconstructor( text, parameters = {} ) {\n\n\t\tconst font = parameters.font;\n\n\t\tif ( font === undefined ) {\n\n\t\t\tsuper(); // generate default extrude geometry\n\n\t\t} else {\n\n\t\t\tconst shapes = font.generateShapes( text, parameters.size );\n\n\t\t\t// translate parameters to ExtrudeGeometry API\n\n\t\t\tparameters.depth = parameters.height !== undefined ? parameters.height : 50;\n\n\t\t\t// defaults\n\n\t\t\tif ( parameters.bevelThickness === undefined ) parameters.bevelThickness = 10;\n\t\t\tif ( parameters.bevelSize === undefined ) parameters.bevelSize = 8;\n\t\t\tif ( parameters.bevelEnabled === undefined ) parameters.bevelEnabled = false;\n\n\t\t\tsuper( shapes, parameters );\n\n\t\t}\n\n\t\tthis.type = 'TextGeometry';\n\n\t}\n\n}\n\n\nexport { TextGeometry };\n"],"names":["TextGeometry","ExtrudeGeometry","[object Object]","text","parameters","font","undefined","super","shapes","generateShapes","size","depth","height","bevelThickness","bevelSize","bevelEnabled","this","type"],"mappings":"uEAqBA,MAAMA,qBAAqBC,gBAE1BC,YAAaC,EAAMC,EAAa,IAE/B,MAAMC,EAAOD,EAAWC,KAExB,QAAcC,IAATD,EAEJE,YAEM,CAEN,MAAMC,EAASH,EAAKI,eAAgBN,EAAMC,EAAWM,MAIrDN,EAAWO,WAA8BL,IAAtBF,EAAWQ,OAAuBR,EAAWQ,OAAS,QAItCN,IAA9BF,EAAWS,iBAA+BT,EAAWS,eAAiB,SAC7CP,IAAzBF,EAAWU,YAA0BV,EAAWU,UAAY,QAChCR,IAA5BF,EAAWW,eAA6BX,EAAWW,cAAe,GAEvER,MAAOC,EAAQJ,GAIhBY,KAAKC,KAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-thread-to-worker-
|
|
2
|
-
//# sourceMappingURL=TextGeometry-
|
|
1
|
+
System.register(["./main-thread-to-worker-22c550e2.nomodule.js"],(function(e){var t;return{setters:[function(e){t=e.bP}],execute:function(){e("T",class extends t{constructor(e,t={}){const s=t.font;if(void 0===s)super();else{const i=s.generateShapes(e,t.size);t.depth=void 0!==t.height?t.height:50,void 0===t.bevelThickness&&(t.bevelThickness=10),void 0===t.bevelSize&&(t.bevelSize=8),void 0===t.bevelEnabled&&(t.bevelEnabled=!1),super(i,t)}this.type="TextGeometry"}})}}}));
|
|
2
|
+
//# sourceMappingURL=TextGeometry-f2af7f22.nomodule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextGeometry-
|
|
1
|
+
{"version":3,"file":"TextGeometry-f2af7f22.nomodule.js","sources":["../../node_modules/three/examples/jsm/geometries/TextGeometry.js"],"sourcesContent":["/**\n * Text = 3D Text\n *\n * parameters = {\n * font: <THREE.Font>, // font\n *\n * size: <float>, // size of the text\n * height: <float>, // thickness to extrude text\n * curveSegments: <int>, // number of points on the curves\n *\n * bevelEnabled: <bool>, // turn on bevel\n * bevelThickness: <float>, // how deep into text bevel goes\n * bevelSize: <float>, // how far from text outline (including bevelOffset) is bevel\n * bevelOffset: <float> // how far from text outline does bevel start\n * }\n */\n\nimport {\n\tExtrudeGeometry\n} from 'three';\n\nclass TextGeometry extends ExtrudeGeometry {\n\n\tconstructor( text, parameters = {} ) {\n\n\t\tconst font = parameters.font;\n\n\t\tif ( font === undefined ) {\n\n\t\t\tsuper(); // generate default extrude geometry\n\n\t\t} else {\n\n\t\t\tconst shapes = font.generateShapes( text, parameters.size );\n\n\t\t\t// translate parameters to ExtrudeGeometry API\n\n\t\t\tparameters.depth = parameters.height !== undefined ? parameters.height : 50;\n\n\t\t\t// defaults\n\n\t\t\tif ( parameters.bevelThickness === undefined ) parameters.bevelThickness = 10;\n\t\t\tif ( parameters.bevelSize === undefined ) parameters.bevelSize = 8;\n\t\t\tif ( parameters.bevelEnabled === undefined ) parameters.bevelEnabled = false;\n\n\t\t\tsuper( shapes, parameters );\n\n\t\t}\n\n\t\tthis.type = 'TextGeometry';\n\n\t}\n\n}\n\n\nexport { TextGeometry };\n"],"names":["exports","ExtrudeGeometry","[object Object]","text","parameters","font","undefined","super","shapes","generateShapes","size","depth","height","bevelThickness","bevelSize","bevelEnabled","this","type"],"mappings":"4IAqDAA,EAAA,IAhCA,cAA2BC,EAE1BC,YAAaC,EAAMC,EAAa,IAE/B,MAAMC,EAAOD,EAAWC,KAExB,QAAcC,IAATD,EAEJE,YAEM,CAEN,MAAMC,EAASH,EAAKI,eAAgBN,EAAMC,EAAWM,MAIrDN,EAAWO,WAA8BL,IAAtBF,EAAWQ,OAAuBR,EAAWQ,OAAS,QAItCN,IAA9BF,EAAWS,iBAA+BT,EAAWS,eAAiB,SAC7CP,IAAzBF,EAAWU,YAA0BV,EAAWU,UAAY,QAChCR,IAA5BF,EAAWW,eAA6BX,EAAWW,cAAe,GAEvER,MAAOC,EAAQJ,GAIhBY,KAAKC,KAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{aB as ScenePluginDefaultImplementation,_ as __decorate,i as inject}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=banana-for-scale-
|
|
1
|
+
import{aB as ScenePluginDefaultImplementation,_ as __decorate,i as inject}from"./roomle-dependency-injection-c76f3322.js";import{g as getAssetPath,a as Vector3}from"./main-thread-to-worker-6dba7605.js";class BananaForScale extends ScenePluginDefaultImplementation{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(getAssetPath()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e.scene,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new Vector3),a=this._bounds.getCenter(new Vector3).clone();a.x-=e.x/2+.18,a.z+=e.z/2+.05,a.y=0;let n=.03;this._banana.scale.copy(new Vector3(n,n,n)),this._banana.rotation.y=.6,this._banana.position.copy(a)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,a){super.clearScene(e,a),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}__decorate([inject],BananaForScale.prototype,"_staticItemLoader",void 0);export{BananaForScale as default};
|
|
2
|
+
//# sourceMappingURL=banana-for-scale-552c72ee.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banana-for-scale-
|
|
1
|
+
{"version":3,"file":"banana-for-scale-552c72ee.js","sources":["../../packages/configurator-core/public/geometry/banana_div2.glb"],"sourcesContent":["export default \"static/banana_div2-1351c98ec2986be1.glb\""],"names":[],"mappings":"gVAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=banana-for-scale-
|
|
1
|
+
System.register(["./roomle-dependency-injection-b9ab3391.nomodule.js","./main-thread-to-worker-22c550e2.nomodule.js"],(function(e){var n,t,a,s,i;return{setters:[function(e){n=e.aB,t=e._,a=e.i},function(e){s=e.g,i=e.a}],execute:function(){class o extends n{setScene(e){this._scene=e,this._staticItemLoader.loadGLB(s()+"static/banana_div2-1351c98ec2986be1.glb").then(e=>{this._banana=e.scene,this.updateBounds(null)})}updateBounds(e){if(e&&(this._bounds=e),this._bounds){if(this._banana){const e=this._bounds.getSize(new i),n=this._bounds.getCenter(new i).clone();n.x-=e.x/2+.18,n.z+=e.z/2+.05,n.y=0;let t=.03;this._banana.scale.copy(new i(t,t,t)),this._banana.rotation.y=.6,this._banana.position.copy(n)}this._scene.children.includes(this._banana)||this.addToScene()}}clearScene(e,n){super.clearScene(e,n),this.removeFromScene()}addToScene(){this._scene&&this._banana&&this._scene.add(this._banana)}removeFromScene(){this._scene&&this._banana&&this._scene.remove(this._banana)}}e("default",o),t([a],o.prototype,"_staticItemLoader",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=banana-for-scale-78fc3756.nomodule.js.map
|
package/lib/{banana-for-scale-3e9bafe3.nomodule.js.map → banana-for-scale-78fc3756.nomodule.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"banana-for-scale-
|
|
1
|
+
{"version":3,"file":"banana-for-scale-78fc3756.nomodule.js","sources":["../../packages/configurator-core/public/geometry/banana_div2.glb"],"sourcesContent":["export default \"static/banana_div2-1351c98ec2986be1.glb\""],"names":[],"mappings":"6TAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{M as MainThreadToWorker,g as getAssetPath}from"./main-thread-to-worker-
|
|
2
|
-
//# sourceMappingURL=budgeteer-measure-
|
|
1
|
+
import{M as MainThreadToWorker,g as getAssetPath}from"./main-thread-to-worker-6dba7605.js";import{g as getAllParameters}from"./query-params-helper-a271f9dc.js";new class{_addIframe(){const e="website-to-measure";if(document.getElementById(e))return void console.error("Iframe already added! Check how this can happen");const r=getAllParameters();if(!r.checkUrl)return void console.error("CAN NOT MEASURE WITHOUT A URL, add checkUrl queryParam. To encode call BudgeteerMeasure.encodeUrl(url: string)");let t=this.decodeUrl(r.checkUrl);const o=window.location.origin;if(!t.startsWith(o))return void console.error("CAN ONLY MEASURE SAME ORIGIN PLEASE CHECK",{origin:o,src:t});const a=getAllParameters(t),i=Object.keys(a).length?"&":"?";a._measureTraffic||(t+=i+"_measureTraffic=true");const s=document.createElement("iframe");s.id=e,s.src=t,document.body.appendChild(s)}_isAlreadyActive(){return navigator.serviceWorker.controller&&-1!==navigator.serviceWorker.controller.scriptURL.indexOf("budgeteer.sw")&&"activated"===navigator.serviceWorker.controller.state}_handleActiveSw(){this._mainThreadToWorker.setEventPoster(navigator.serviceWorker.controller),this._addIframe(),this._alreadyAdded=!0}constructor(){this._inLimbo=!1,this._alreadyAdded=!1,window.addEventListener("beforeunload",()=>this._inLimbo=!0),this._mainThreadToWorker=new MainThreadToWorker(this,navigator.serviceWorker),this._isAlreadyActive()?this._handleActiveSw():navigator.serviceWorker.register(getAssetPath()+"static/budgeteer.sw-a4a226d2fc19672e.js",{scope:"../../"}).then(e=>{this._isAlreadyActive()&&this._handleActiveSw()},e=>console.error("Budgeteer registration failed: ",e)),navigator.serviceWorker.addEventListener("controllerchange",()=>this._mainThreadToWorker.setEventPoster(navigator.serviceWorker.controller)),window.BudgeteerMeasure={encodeUrl:this.encodeUrl}}encodeUrl(e){return encodeURIComponent(e)}decodeUrl(e){return decodeURIComponent(e)}onCommand(e){if(!this._inLimbo)switch(e){case 6:this._alreadyAdded||this._addIframe()}}};
|
|
2
|
+
//# sourceMappingURL=budgeteer-measure-c3a1fb68.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budgeteer-measure-
|
|
1
|
+
{"version":3,"file":"budgeteer-measure-c3a1fb68.js","sources":["../../packages/workers/generated/budgeteer.sw.js"],"sourcesContent":["export default \"static/budgeteer.sw-a4a226d2fc19672e.js\""],"names":[],"mappings":"w8CAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-thread-to-worker-
|
|
1
|
+
System.register(["./main-thread-to-worker-22c550e2.nomodule.js","./query-params-helper-c231e1b8.nomodule.js"],(function(){var e,r,t;return{setters:[function(t){e=t.M,r=t.g},function(e){t=e.g}],execute:function(){new class{_addIframe(){const e="website-to-measure";if(document.getElementById(e))return void console.error("Iframe already added! Check how this can happen");const r=t();if(!r.checkUrl)return void console.error("CAN NOT MEASURE WITHOUT A URL, add checkUrl queryParam. To encode call BudgeteerMeasure.encodeUrl(url: string)");let o=this.decodeUrl(r.checkUrl);const i=window.location.origin;if(!o.startsWith(i))return void console.error("CAN ONLY MEASURE SAME ORIGIN PLEASE CHECK",{origin:i,src:o});const n=t(o),a=Object.keys(n).length?"&":"?";n._measureTraffic||(o+=a+"_measureTraffic=true");const s=document.createElement("iframe");s.id=e,s.src=o,document.body.appendChild(s)}_isAlreadyActive(){return navigator.serviceWorker.controller&&-1!==navigator.serviceWorker.controller.scriptURL.indexOf("budgeteer.sw")&&"activated"===navigator.serviceWorker.controller.state}_handleActiveSw(){this._mainThreadToWorker.setEventPoster(navigator.serviceWorker.controller),this._addIframe(),this._alreadyAdded=!0}constructor(){this._inLimbo=!1,this._alreadyAdded=!1,window.addEventListener("beforeunload",()=>this._inLimbo=!0),this._mainThreadToWorker=new e(this,navigator.serviceWorker),this._isAlreadyActive()?this._handleActiveSw():navigator.serviceWorker.register(r()+"static/budgeteer.sw-a4a226d2fc19672e.js",{scope:"../../"}).then(e=>{this._isAlreadyActive()&&this._handleActiveSw()},e=>console.error("Budgeteer registration failed: ",e)),navigator.serviceWorker.addEventListener("controllerchange",()=>this._mainThreadToWorker.setEventPoster(navigator.serviceWorker.controller)),window.BudgeteerMeasure={encodeUrl:this.encodeUrl}}encodeUrl(e){return encodeURIComponent(e)}decodeUrl(e){return decodeURIComponent(e)}onCommand(e){if(!this._inLimbo)switch(e){case 6:this._alreadyAdded||this._addIframe()}}}}}}));
|
|
2
2
|
//# sourceMappingURL=budgeteer-measure.nomodule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as __decorate,i as inject}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-dimensioning-
|
|
1
|
+
import{_ as __decorate,i as inject}from"./roomle-dependency-injection-c76f3322.js";import{O as Object3D,a as Vector3,u as LineBasicMaterial,h as MeshBasicMaterial,w as DoubleSide,bn as MeshPhongMaterial,B as BufferGeometry,G as Line,z as Mesh,b as BufferAttribute,Q as Quaternion,aY as Line3,bb as PlaneGeometry}from"./main-thread-to-worker-6dba7605.js";import{T as TextGeometry}from"./TextGeometry-d3349d80.js";const LINE_MATERIAL="component_dimensioning_line_material",PLANE_MATERIAL="component_dimensioning_plane_material",TEXT_MATERIAL="component_dimensioning_text_material";class ComponentDimensioning extends Object3D{constructor(e,i,t,n){super(),this._center=i.getCenter(new Vector3),this._size=i.getSize(new Vector3),this._origin=this._center.clone().sub(this._size.clone().multiplyScalar(.5)),this._dimensioning=e,this._level=this._dimensioning.maxLevel-this._dimensioning.level,this._font=t,this._cameraPosition=n,this._init()}_initMaterials(){this._cacheHolder.materialCache.has(LINE_MATERIAL)?this._lineMaterial=this._cacheHolder.materialCache.get(LINE_MATERIAL):(this._lineMaterial=new LineBasicMaterial({color:3618615}),this._cacheHolder.materialCache.set(LINE_MATERIAL,this._lineMaterial)),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(){this._initMaterials();let e=new BufferGeometry;this._line=new Line(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.type.value,this._text=new Mesh(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.type.value,this._plane=new Mesh(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.type.value;let i,t=new BufferGeometry,n=Math.round(Math.max(this._size.y,this._size.x,this._size.z)),s=Math.abs(this._dimensioning.to-this._dimensioning.from),o=.025+(n<4?0:.005*n);s<.3&&(o*=.5+s);let a={font:this._font,size:o,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},h=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*s),r=new TextGeometry(h,a);r.computeBoundingBox();let _=r.boundingBox.getSize(new Vector3).y;0===this._dimensioning.type.value&&(i=this._getXEdge(_),this._addXEdgeSideLines(_)),1===this._dimensioning.type.value&&(i=this._getYEdge(_),this._addYEdgeSideLines(_)),2===this._dimensioning.type.value&&(i=this._getZEdge(_),this._addZEdgeSideLines(_));let d=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];if(t.setAttribute("position",new BufferAttribute(new Float32Array(d),3)),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=r,0===this._dimensioning.type.value&&this._addText(i,r,new Quaternion,new Vector3(0,.04,0)),1===this._dimensioning.type.value){let e=new Quaternion,t=this._getXSign()>0?Math.PI/2:Math.PI/2*3;e.setFromAxisAngle(new Vector3(0,0,1),t),this._addText(i,r,e,new Vector3(.04,0,0))}if(2===this._dimensioning.type.value){let e=this._getXSign()>0?Math.PI/2:Math.PI/2*3,t=(new Quaternion).setFromAxisAngle(new Vector3(-1,0,0),Math.PI/2),n=(new Quaternion).setFromAxisAngle(new Vector3(0,0,1),e);this._addText(i,r,t.multiply(n),new Vector3(.04,0,0))}}_getXEdge(e){let i=this._size.y+.05+(.06+e)*this._level;const t=new Vector3(0,this._origin.y,this._origin.z);let n=t.clone().add(new Vector3(this._dimensioning.from,i,0)),s=t.clone().add(new Vector3(this._dimensioning.to,i,0));return new Line3(n,s)}_addXEdgeSideLines(e){let i=this._size.y+.05+(.06+e)*(this._level-.5),t=this._size.y+.05+(.06+e)*this._level;const n=new Vector3(0,this._origin.y,this._origin.z);let s=n.clone().add(new Vector3(this._dimensioning.from,i,0)),o=n.clone().add(new Vector3(this._dimensioning.from,t,0)),a=n.clone().add(new Vector3(this._dimensioning.to,i,0)),h=n.clone().add(new Vector3(this._dimensioning.to,t,0));this._addLine(s,o),this._addLine(a,h)}_getZEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new Vector3(this._origin.x,this._origin.y,0);let n=t.clone().add(new Vector3(i,0,this._dimensioning.from)),s=t.clone().add(new Vector3(i,0,this._dimensioning.to));return new Line3(n,s)}_addZEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const s=new Vector3(this._origin.x,this._origin.y,0);let o=s.clone().add(new Vector3(t,0,this._dimensioning.from)),a=s.clone().add(new Vector3(n,0,this._dimensioning.from)),h=s.clone().add(new Vector3(t,0,this._dimensioning.to)),r=s.clone().add(new Vector3(n,0,this._dimensioning.to));this._addLine(o,a),this._addLine(h,r)}_getYEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new Vector3(this._origin.x,0,this._origin.z);let n=t.clone().add(new Vector3(i,this._dimensioning.from,0)),s=t.clone().add(new Vector3(i,this._dimensioning.to,0));return new Line3(n,s)}_addYEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const s=new Vector3(this._origin.x,0,this._origin.z);let o=s.clone().add(new Vector3(t,this._dimensioning.from,0)),a=s.clone().add(new Vector3(n,this._dimensioning.from,0)),h=s.clone().add(new Vector3(t,this._dimensioning.to,0)),r=s.clone().add(new Vector3(n,this._dimensioning.to,0));this._addLine(o,a),this._addLine(h,r)}_addLine(e,i){let t=new BufferGeometry,n=[e.x,e.y,e.z,i.x,i.y,i.z];t.setAttribute("position",new BufferAttribute(new Float32Array(n),3)),this.add(new Line(t,this._lineMaterial))}_addText(e,i,t,n){let s=e.getCenter(new Vector3);n.x*=this._getXSign(),s.add(n);let o=i.boundingBox.getSize(new Vector3);i.center(),this._text.position.copy(s),this._text.quaternion.copy(t),this.add(this._text);let a=new PlaneGeometry(o.x+.02,o.y+.02,32);a.center(),this._plane.geometry=a,this._plane.position.copy(s),this._plane.quaternion.copy(t),this.add(this._plane)}_getXSign(){return this._cameraPosition.x>=0?1:-1}}__decorate([inject],ComponentDimensioning.prototype,"_cacheHolder",void 0),__decorate([inject],ComponentDimensioning.prototype,"_unitFormatter",void 0);export{ComponentDimensioning as default};
|
|
2
|
+
//# sourceMappingURL=component-dimensioning-4bf651ea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dimensioning-4bf651ea.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=component-dimensioning-
|
|
1
|
+
System.register(["./roomle-dependency-injection-b9ab3391.nomodule.js","./main-thread-to-worker-22c550e2.nomodule.js","./TextGeometry-f2af7f22.nomodule.js"],(function(e){var i,t,n,s,o,a,h,d,_,l,r,g,m,c,w,p;return{setters:[function(e){i=e._,t=e.i},function(e){n=e.O,s=e.a,o=e.u,a=e.h,h=e.w,d=e.bn,_=e.B,l=e.G,r=e.z,g=e.b,m=e.Q,c=e.aY,w=e.bb},function(e){p=e.T}],execute:function(){const u="component_dimensioning_line_material",x="component_dimensioning_plane_material",y="component_dimensioning_text_material";class v extends n{constructor(e,i,t,n){super(),this._center=i.getCenter(new s),this._size=i.getSize(new s),this._origin=this._center.clone().sub(this._size.clone().multiplyScalar(.5)),this._dimensioning=e,this._level=this._dimensioning.maxLevel-this._dimensioning.level,this._font=t,this._cameraPosition=n,this._init()}_initMaterials(){this._cacheHolder.materialCache.has(u)?this._lineMaterial=this._cacheHolder.materialCache.get(u):(this._lineMaterial=new o({color:3618615}),this._cacheHolder.materialCache.set(u,this._lineMaterial)),this._cacheHolder.materialCache.has(x)?this._planeMaterial=this._cacheHolder.materialCache.get(x):(this._planeMaterial=new a({color:16777215,side:h,opacity:.8,transparent:!0}),this._cacheHolder.materialCache.set(x,this._planeMaterial)),this._cacheHolder.materialCache.has(y)?this._textMaterial=this._cacheHolder.materialCache.get(y):(this._textMaterial=new d({color:3618615}),this._cacheHolder.materialCache.set(y,this._textMaterial))}_init(){this._initMaterials();let e=new _;this._line=new l(e,this._lineMaterial),this._line.name="component dimension line "+this._dimensioning.type.value,this._text=new r(e,this._textMaterial),this._text.name="component dimension text "+this._dimensioning.type.value,this._plane=new r(e,this._planeMaterial),this._plane.name="component dimension plane "+this._dimensioning.type.value;let i,t=new _,n=Math.round(Math.max(this._size.y,this._size.x,this._size.z)),o=Math.abs(this._dimensioning.to-this._dimensioning.from),a=.025+(n<4?0:.005*n);o<.3&&(a*=.5+o);let h={font:this._font,size:a,height:.001,curveSegments:2,bevelEnabled:!0,bevelThickness:.001,bevelSize:.001},d=this._dimensioning.label?this._dimensioning.label:this._unitFormatter.formatMMValueToUnitString(1e3*o),c=new p(d,h);c.computeBoundingBox();let w=c.boundingBox.getSize(new s).y;0===this._dimensioning.type.value&&(i=this._getXEdge(w),this._addXEdgeSideLines(w)),1===this._dimensioning.type.value&&(i=this._getYEdge(w),this._addYEdgeSideLines(w)),2===this._dimensioning.type.value&&(i=this._getZEdge(w),this._addZEdgeSideLines(w));let u=[i.start.x,i.start.y,i.start.z,i.end.x,i.end.y,i.end.z];if(t.setAttribute("position",new g(new Float32Array(u),3)),this._line.geometry.dispose(),this._line.geometry=t,this.add(this._line),this._text.geometry=c,0===this._dimensioning.type.value&&this._addText(i,c,new m,new s(0,.04,0)),1===this._dimensioning.type.value){let e=new m,t=this._getXSign()>0?Math.PI/2:Math.PI/2*3;e.setFromAxisAngle(new s(0,0,1),t),this._addText(i,c,e,new s(.04,0,0))}if(2===this._dimensioning.type.value){let e=this._getXSign()>0?Math.PI/2:Math.PI/2*3,t=(new m).setFromAxisAngle(new s(-1,0,0),Math.PI/2),n=(new m).setFromAxisAngle(new s(0,0,1),e);this._addText(i,c,t.multiply(n),new s(.04,0,0))}}_getXEdge(e){let i=this._size.y+.05+(.06+e)*this._level;const t=new s(0,this._origin.y,this._origin.z);let n=t.clone().add(new s(this._dimensioning.from,i,0)),o=t.clone().add(new s(this._dimensioning.to,i,0));return new c(n,o)}_addXEdgeSideLines(e){let i=this._size.y+.05+(.06+e)*(this._level-.5),t=this._size.y+.05+(.06+e)*this._level;const n=new s(0,this._origin.y,this._origin.z);let o=n.clone().add(new s(this._dimensioning.from,i,0)),a=n.clone().add(new s(this._dimensioning.from,t,0)),h=n.clone().add(new s(this._dimensioning.to,i,0)),d=n.clone().add(new s(this._dimensioning.to,t,0));this._addLine(o,a),this._addLine(h,d)}_getZEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new s(this._origin.x,this._origin.y,0);let n=t.clone().add(new s(i,0,this._dimensioning.from)),o=t.clone().add(new s(i,0,this._dimensioning.to));return new c(n,o)}_addZEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const o=new s(this._origin.x,this._origin.y,0);let a=o.clone().add(new s(t,0,this._dimensioning.from)),h=o.clone().add(new s(n,0,this._dimensioning.from)),d=o.clone().add(new s(t,0,this._dimensioning.to)),_=o.clone().add(new s(n,0,this._dimensioning.to));this._addLine(a,h),this._addLine(d,_)}_getYEdge(e){let i=(this._getXSign()>0?this._size.x:0)+.05+(.06+e)*this._level;i*=this._getXSign();const t=new s(this._origin.x,0,this._origin.z);let n=t.clone().add(new s(i,this._dimensioning.from,0)),o=t.clone().add(new s(i,this._dimensioning.to,0));return new c(n,o)}_addYEdgeSideLines(e){let i=this._getXSign()>0?this._size.x:0,t=i+.05+(.06+e)*(this._level-.5),n=i+.05+(.06+e)*this._level;t*=this._getXSign(),n*=this._getXSign();const o=new s(this._origin.x,0,this._origin.z);let a=o.clone().add(new s(t,this._dimensioning.from,0)),h=o.clone().add(new s(n,this._dimensioning.from,0)),d=o.clone().add(new s(t,this._dimensioning.to,0)),_=o.clone().add(new s(n,this._dimensioning.to,0));this._addLine(a,h),this._addLine(d,_)}_addLine(e,i){let t=new _,n=[e.x,e.y,e.z,i.x,i.y,i.z];t.setAttribute("position",new g(new Float32Array(n),3)),this.add(new l(t,this._lineMaterial))}_addText(e,i,t,n){let o=e.getCenter(new s);n.x*=this._getXSign(),o.add(n);let a=i.boundingBox.getSize(new s);i.center(),this._text.position.copy(o),this._text.quaternion.copy(t),this.add(this._text);let h=new w(a.x+.02,a.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(o),this._plane.quaternion.copy(t),this.add(this._plane)}_getXSign(){return this._cameraPosition.x>=0?1:-1}}e("default",v),i([t],v.prototype,"_cacheHolder",void 0),i([t],v.prototype,"_unitFormatter",void 0)}}}));
|
|
2
|
+
//# sourceMappingURL=component-dimensioning-babc0b0f.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dimensioning-babc0b0f.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./main-thread-to-worker-
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
System.register(["./main-thread-to-worker-22c550e2.nomodule.js","./roomle-dependency-injection-b9ab3391.nomodule.js"],(function(e){var t,i,n,s,a,r,c,o,l;return{setters:[function(e){t=e.bw,i=e.bL,n=e.z,s=e.v,a=e.ad,r=e.a,c=e.bM,o=e.k},function(e){l=e.a0}],execute:function(){e("default",class{constructor(){this._nonTransparentComponent=null,this._raycaster=new t,this._raycaster.near=.1,this._raycaster.layers.enable(3)}init(e,t){this._scene=e,this._camera=t,this.checkComponentVisibility=i(this.checkComponentVisibility,100).bind(this),this.checkPreviewVisibility=i(this.checkPreviewVisibility,100).bind(this)}changeMaterialsOnSelect(e,t,i=!1){t!==this._nonTransparentComponent&&(this._nonTransparentComponent=t,this._changeMaterialsOnSelect(e,t,i))}_changeMaterialsOnSelect(e,t,i=!1){if(e.children.length>0&&e.children.forEach(s=>{const a=t&&e.id===t.id||i,r=!(s instanceof n);this._changeMaterialsOnSelect(s,t,(!a||!r)&&a)}),t)e instanceof n&&e.material instanceof s&&!e.userData.oldMaterial&&(e.userData.oldMaterial=e.material,e.material=e.material.clone(),i||l(e,{opacity:.2,transparent:!0}));else if(e.userData.oldMaterial&&e instanceof n&&e.material instanceof s){const{opacity:t,transparent:i}=e.userData.oldMaterial;l(e,{opacity:t,transparent:i}),e.userData.oldMaterial=void 0}}isComponentVisible(e){const t=[];e.traverse(e=>t.push(e.uuid));const i=(new a).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 s=[];return this._raycaster.intersectObjects(this._scene.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._scene,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._scene,null):this.changeMaterialsOnSelect(this._scene,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 a;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._scene,null):this.changeMaterialsOnSelect(this._scene,{id:-1}))}})}}}));
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-02060f77.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-02060f77.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bw as Raycaster,bL as throttle,z as Mesh,v as MeshStandardMaterial,ad as Box3,a as Vector3,bM as Frustum,k as Matrix4}from"./main-thread-to-worker-
|
|
2
|
-
//# sourceMappingURL=component-raycast-helper-
|
|
1
|
+
import{bw as Raycaster,bL as throttle,z as Mesh,v as MeshStandardMaterial,ad as Box3,a as Vector3,bM as Frustum,k as Matrix4}from"./main-thread-to-worker-6dba7605.js";import{a0 as transitionTransparencyOfMaterial}from"./roomle-dependency-injection-c76f3322.js";class ComponentRaycastHelper{constructor(){this._nonTransparentComponent=null,this._raycaster=new Raycaster,this._raycaster.near=.1,this._raycaster.layers.enable(3)}init(e,t){this._scene=e,this._camera=t,this.checkComponentVisibility=throttle(this.checkComponentVisibility,100).bind(this),this.checkPreviewVisibility=throttle(this.checkPreviewVisibility,100).bind(this)}changeMaterialsOnSelect(e,t,i=!1){t!==this._nonTransparentComponent&&(this._nonTransparentComponent=t,this._changeMaterialsOnSelect(e,t,i))}_changeMaterialsOnSelect(e,t,i=!1){if(e.children.length>0&&e.children.forEach(a=>{const s=t&&e.id===t.id||i,n=!(a instanceof Mesh);this._changeMaterialsOnSelect(a,t,(!s||!n)&&s)}),t)e instanceof Mesh&&e.material instanceof MeshStandardMaterial&&!e.userData.oldMaterial&&(e.userData.oldMaterial=e.material,e.material=e.material.clone(),i||transitionTransparencyOfMaterial(e,{opacity:.2,transparent:!0}));else if(e.userData.oldMaterial&&e instanceof Mesh&&e.material instanceof MeshStandardMaterial){const{opacity:t,transparent:i}=e.userData.oldMaterial;transitionTransparencyOfMaterial(e,{opacity:t,transparent:i}),e.userData.oldMaterial=void 0}}isComponentVisible(e){const t=[];e.traverse(e=>t.push(e.uuid));const i=(new Box3).setFromObject(e).getCenter(new Vector3),a=(new Vector3).subVectors(i,this._camera.position).normalize();this._raycaster.set(this._camera.position,a),this._raycaster.far=this._camera.position.distanceTo(i);const s=[];return this._raycaster.intersectObjects(this._scene.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._scene,null)}checkComponentVisibility(e,t){if(!e.hasSelection())return;const i=t.getComponentsForIds(e.getSelectedRuntimeComponentIds());if(i.length>1)return;const a=i[0];this.isComponentVisible(a)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,a)}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,i=(new Matrix4).multiplyMatrices(this._camera.projectionMatrix,this._camera.matrixWorldInverse),a=new Box3;return t.setFromProjectionMatrix(i),e.map(e=>(e=>{const i=a.setFromObject(e).getCenter(new Vector3);return t.containsPoint(i)})(e)).reduce((e,t)=>e&&t)}checkPreviewVisibility(e){e.hasPreviewLines()||(this.areAllPreviewsVisible(e)?this.changeMaterialsOnSelect(this._scene,null):this.changeMaterialsOnSelect(this._scene,{id:-1}))}}export{ComponentRaycastHelper as default};
|
|
2
|
+
//# sourceMappingURL=component-raycast-helper-b700ff42.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-raycast-helper-b700ff42.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./script-loader-3b74b23f.nomodule.js","./roomle-dependency-injection-b9ab3391.nomodule.js","./scene-manager-73cc2559.nomodule.js","./component-raycast-helper-02060f77.nomodule.js","./roomle-configurator-b7568f41.nomodule.js","./query-params-helper-c231e1b8.nomodule.js","./main-thread-to-worker-22c550e2.nomodule.js","./jszip.min-be9beafb.nomodule.js"],(function(e){var n,o,t,r,c,i,a,s,l,u,p,d,f,m;return{setters:[function(e){n=e.S,o=e.M},function(e){t=e.D,r=e.L,c=e.R,i=e.a,a=e.C,s=e.b,l=e.A},function(e){u=e.C,p=e.a},function(e){d=e.default},function(e){f=e.C,m=e.R},function(){},function(){},function(){}],execute:function(){const g=[new t("logger",r),new t("rapi-access",c),new t("script-loader",n),new t("camera-control-3d",u),new t("camera-control",p),new t("data-syncer",i),new t("configurator-scene-manager",f,1),new t("configurator-view-model",a,1),new t("component-raycast-helper",d,0)];e("Configurator",class extends o{setupDependencies(){s.setup(g),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||{};l.init({kernelInstance:n,kernelContainer:o,planObjectId:t})}getApi(){return this._configurator}bootFinished(){this._configurator=new m(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}})}}}));
|
|
2
|
+
//# sourceMappingURL=configurator-5a33f41a.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-5a33f41a.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{S as ScriptLoader,M as Main}from"./script-loader-39fddd00.js";import{D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,a as DataSyncer,C as ConfiguratorViewModel,b as RoomleDependencyInjection,A as AppContext}from"./roomle-dependency-injection-c76f3322.js";import{C as CameraControl3D,a as CameraControl}from"./scene-manager-bb2d4783.js";import ComponentRaycastHelper from"./component-raycast-helper-b700ff42.js";import{C as ConfiguratorSceneManager,R as RoomleConfigurator}from"./roomle-configurator-ab3493da.js";import"./query-params-helper-a271f9dc.js";import"./main-thread-to-worker-6dba7605.js";import"./jszip.min-0a57f629.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-985c945d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-985c945d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Configurator}from"./configurator-985c945d.js";import"./script-loader-39fddd00.js";import"./query-params-helper-a271f9dc.js";import"./roomle-dependency-injection-c76f3322.js";import"./main-thread-to-worker-6dba7605.js";import"./scene-manager-bb2d4783.js";import"./component-raycast-helper-b700ff42.js";import"./roomle-configurator-ab3493da.js";import"./jszip.min-0a57f629.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-368b91f9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-main-368b91f9.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./configurator-
|
|
1
|
+
System.register(["./configurator-5a33f41a.nomodule.js","./script-loader-3b74b23f.nomodule.js","./query-params-helper-c231e1b8.nomodule.js","./roomle-dependency-injection-b9ab3391.nomodule.js","./main-thread-to-worker-22c550e2.nomodule.js","./scene-manager-73cc2559.nomodule.js","./component-raycast-helper-02060f77.nomodule.js","./roomle-configurator-b7568f41.nomodule.js","./jszip.min-be9beafb.nomodule.js"],(function(){var e;return{setters:[function(n){e=n.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let n=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
|
|
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-b9ab3391.nomodule.js","./main-thread-to-worker-22c550e2.nomodule.js"],(function(e){var i,t,r,n,s;return{setters:[function(e){i=e.a5},function(e){t=e.a_,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-01461035.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-01461035.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a5 as convertToTHREE}from"./roomle-dependency-injection-
|
|
2
|
-
//# sourceMappingURL=continuous-drawing-helper-
|
|
1
|
+
import{a5 as convertToTHREE}from"./roomle-dependency-injection-c76f3322.js";import{a_ as RingGeometry,h as MeshBasicMaterial,w as DoubleSide,z as Mesh}from"./main-thread-to-worker-6dba7605.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-9332c310.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-drawing-helper-9332c310.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -3,20 +3,10 @@ import type { Nullable } from '../../../typings/helper';
|
|
|
3
3
|
import type { PlanObject } from '../../../typings/planner';
|
|
4
4
|
import type { Position2, Position3 } from '../common-interfaces';
|
|
5
5
|
import PlanElementViewModel from './plan-element-view-model';
|
|
6
|
-
import { Vector3 } from 'three';
|
|
6
|
+
import type { Vector3 } from 'three';
|
|
7
7
|
type ObjectWallDimensionDefinition<Vector2Type = Vector3 | Position2, Vector3Type = Vector3 | Position3> = MeasurementBase<Vector2Type, Vector3Type>;
|
|
8
8
|
export type ObjectWallDimension = ObjectWallDimensionDefinition<Vector3, Vector3>;
|
|
9
9
|
export type ObjectToWallDimensionTransferable = ObjectWallDimensionDefinition<Position2, Position3>;
|
|
10
|
-
interface ObjectMeasurements {
|
|
11
|
-
rectMeasurements: ObjectWallDimension[];
|
|
12
|
-
objectMeasurements: ObjectWallDimension[];
|
|
13
|
-
objectToWallsMeasurements: ObjectWallDimension[];
|
|
14
|
-
}
|
|
15
|
-
export interface ObjectMeasurementsTransferable {
|
|
16
|
-
rectMeasurements: ObjectToWallDimensionTransferable[];
|
|
17
|
-
objectMeasurements: ObjectToWallDimensionTransferable[];
|
|
18
|
-
objectToWallsMeasurements: ObjectToWallDimensionTransferable[];
|
|
19
|
-
}
|
|
20
10
|
export declare const objectToWallDimensionToTransferable: (objectWallDimension: ObjectWallDimension) => ObjectToWallDimensionTransferable;
|
|
21
11
|
export default class PlanObjectViewModel extends PlanElementViewModel {
|
|
22
12
|
private _initDone;
|
|
@@ -28,7 +18,7 @@ export default class PlanObjectViewModel extends PlanElementViewModel {
|
|
|
28
18
|
isInitDone(): Promise<void>;
|
|
29
19
|
getPlanObject(): PlanObject;
|
|
30
20
|
getSize(): Vector3;
|
|
31
|
-
|
|
21
|
+
getObjectToWallsMeasurements(): Nullable<ObjectWallDimension[]>;
|
|
32
22
|
update(): void;
|
|
33
23
|
}
|
|
34
24
|
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface PmEntityDefinition {
|
|
2
|
+
attributes: Record<string, any>;
|
|
3
|
+
modules: PmEntityDefinition[];
|
|
4
|
+
}
|
|
5
|
+
interface PmDefinition {
|
|
6
|
+
entities: PmEntityDefinition[];
|
|
7
|
+
materialIds: Set<string>;
|
|
8
|
+
materials?: Record<string, any>;
|
|
9
|
+
textures?: Record<string, any>;
|
|
10
|
+
}
|
|
11
|
+
export declare class ProductionManagerExport {
|
|
12
|
+
private getMaterials?;
|
|
13
|
+
private exportImages?;
|
|
14
|
+
private date?;
|
|
15
|
+
imageFolderName: string;
|
|
16
|
+
private materialAttributes;
|
|
17
|
+
constructor(parameter?: any, getMaterials?: (materialIds: string[]) => Promise<any[]>);
|
|
18
|
+
convertTcExportData(tcExportData: any): Promise<PmDefinition>;
|
|
19
|
+
addMaterialsToDefinition(pmDefinition: PmDefinition): Promise<void>;
|
|
20
|
+
addTexturesToDefinition(pmDefinition: PmDefinition): void;
|
|
21
|
+
convertMaterialIdToImageName(materialId: string, url: string): string;
|
|
22
|
+
private getDiffuseMap;
|
|
23
|
+
private convertTcArticle;
|
|
24
|
+
createExportXml(pmDefinition: PmDefinition, customerData?: string): string;
|
|
25
|
+
private getDummyCustomerData;
|
|
26
|
+
private getDummyEntityData;
|
|
27
|
+
private createXMLDocument;
|
|
28
|
+
private createExportXMLDocument;
|
|
29
|
+
private createEntities;
|
|
30
|
+
private createEntity;
|
|
31
|
+
private createParameter;
|
|
32
|
+
private createImages;
|
|
33
|
+
private createImage;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -654,6 +654,7 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
654
654
|
getTools(): Promise<RoomleToolsCore>;
|
|
655
655
|
exportImageFromCamera(filename?: string): void;
|
|
656
656
|
calcPartsPriceSum(partList: KernelPartList): Promise<KernelPartListPrice>;
|
|
657
|
+
generateBlueOceanPoCJSON(): Promise<any>;
|
|
657
658
|
generateProductionServiceExport(defaultExportDefinition?: string): Promise<any>;
|
|
658
659
|
generateTCExport(defaultExportDefinition?: string): Promise<any>;
|
|
659
660
|
generateIMOSiXExport(defaultExportDefinition?: string): Promise<any>;
|
|
@@ -664,5 +665,9 @@ export default class RoomleConfigurator implements GlobalAPI, Context, KernelUti
|
|
|
664
665
|
rotation?: number;
|
|
665
666
|
maxLightSources?: number;
|
|
666
667
|
}): void;
|
|
668
|
+
createProductManagerExportPoC(defaultExportDefinition?: string, send?: (content: any) => void | null): Promise<any>;
|
|
669
|
+
getFileFromUrl(url: string, fileNmame: string, defaultType: string): Promise<File>;
|
|
670
|
+
downloadProductManagerExportPoC(defaultExportDefinition?: string): Promise<any>;
|
|
671
|
+
postProductManagerExportPoC(defaultExportDefinition?: string, requestData?: Record<string, string>): Promise<any>;
|
|
667
672
|
}
|
|
668
673
|
export {};
|
|
@@ -10,7 +10,7 @@ import type PlanElementViewModel from '../../common-core/src/view-model/plan-ele
|
|
|
10
10
|
import type { Enumify } from '../../common-core/src/types';
|
|
11
11
|
import type { CallbackObjectType } from './utils/planner-scene-manager';
|
|
12
12
|
import type { ConstructionMeasurementsTransferable } from './view-model/construction-plan-object-view-model';
|
|
13
|
-
import type {
|
|
13
|
+
import type { ObjectToWallDimensionTransferable } from '../../common-core/src/view-model/plan-object-view-model';
|
|
14
14
|
export interface SelectionPayload {
|
|
15
15
|
item?: RapiItem;
|
|
16
16
|
configuration?: RapiConfiguration;
|
|
@@ -97,9 +97,9 @@ export default class RoomlePlannerUiCallback extends UiCallback {
|
|
|
97
97
|
* This function gets called when the camera has stopped moving,
|
|
98
98
|
* allowing for the calculation of the dimensions of plan element position.
|
|
99
99
|
* It is also called when the element is selected or dragged on the plan.
|
|
100
|
-
* @param
|
|
100
|
+
* @param objectToWallsMeasurements The measurements of plan element related to the walls.
|
|
101
101
|
*/
|
|
102
|
-
|
|
102
|
+
onUpdateObjectToWallsMeasurements: (objectToWallsMeasurements: ObjectToWallDimensionTransferable[]) => void;
|
|
103
103
|
/**
|
|
104
104
|
* This function gets called when the camera is moving and thus the wall dimensions should not be shown
|
|
105
105
|
*/
|
|
@@ -133,8 +133,7 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
133
133
|
private _sendPlanObjectPositions;
|
|
134
134
|
private _updateMeasurementPositions;
|
|
135
135
|
private _sendElementMeasurements;
|
|
136
|
-
private
|
|
137
|
-
private transformMeasurements;
|
|
136
|
+
private _sendObjectToWallsMeasurements;
|
|
138
137
|
private _sendConstructionElementDimensions;
|
|
139
138
|
private _sendWallDimensions;
|
|
140
139
|
enableWallDrawing(): void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { ConfiguratorKernelClass, KernelCube, KernelEnum, KernelObjectPtrList, KernelPlanObject, KernelVector3,
|
|
1
|
+
import type { ConfiguratorKernelClass, KernelCube, KernelEnum, KernelObjectPtrList, KernelPlanObject, KernelVector3, ObjectGroupPtr, RuntimeId } from './kernel';
|
|
2
2
|
import type { DrawingType, KernelPlanObjectList, PlanObjectList, ResizingAnchor, WallExtensionType, WALL_SIDES } from './planner-kernel-container';
|
|
3
3
|
import type { Position2 } from '../common-core/src/common-interfaces';
|
|
4
4
|
import type { Enumify } from '../common-core/src/types';
|
|
5
|
-
import
|
|
6
|
-
declare const EmsArray: typeof ems.EmsArray;
|
|
5
|
+
import type { EmsArray } from './ems';
|
|
7
6
|
export interface EMSReference {
|
|
8
7
|
jsObject: any;
|
|
9
8
|
delete(): any;
|
|
@@ -32,34 +31,12 @@ export interface PlanElement extends KernelObject {
|
|
|
32
31
|
getMeshCenter(): KernelVector3;
|
|
33
32
|
getId(): number;
|
|
34
33
|
}
|
|
35
|
-
export interface RectangleReferencePoints {
|
|
36
|
-
bottom: KernelVector3;
|
|
37
|
-
bottomLeft: KernelVector3;
|
|
38
|
-
bottomRight: KernelVector3;
|
|
39
|
-
center: KernelVector3;
|
|
40
|
-
left: KernelVector3;
|
|
41
|
-
right: KernelVector3;
|
|
42
|
-
top: KernelVector3;
|
|
43
|
-
topLeft: KernelVector3;
|
|
44
|
-
topRight: KernelVector3;
|
|
45
|
-
}
|
|
46
34
|
export interface ObjectToWallLine {
|
|
47
35
|
angle: number;
|
|
48
36
|
endPoint: KernelVector3;
|
|
49
37
|
length: number;
|
|
50
38
|
startPoint: KernelVector3;
|
|
51
39
|
}
|
|
52
|
-
declare class PointArray extends EmsArray<KernelVector3f> {
|
|
53
|
-
}
|
|
54
|
-
declare class ObjectToWallLineArray extends EmsArray<ObjectToWallLine> {
|
|
55
|
-
}
|
|
56
|
-
export interface Rectangle {
|
|
57
|
-
angle: number;
|
|
58
|
-
center: KernelVector3f;
|
|
59
|
-
cornerPoints: PointArray;
|
|
60
|
-
referencePoints: RectangleReferencePoints;
|
|
61
|
-
size: KernelVector3f;
|
|
62
|
-
}
|
|
63
40
|
export interface PlanObject extends PlanElement {
|
|
64
41
|
size: KernelVector3;
|
|
65
42
|
rotation: number;
|
|
@@ -72,8 +49,7 @@ export interface PlanObject extends PlanElement {
|
|
|
72
49
|
getCatalogItemId(): string;
|
|
73
50
|
getConfigurationRuntimeId(): number;
|
|
74
51
|
getObjectType(): string;
|
|
75
|
-
getWallDistances():
|
|
76
|
-
getRectangle(): Rectangle;
|
|
52
|
+
getWallDistances(): EmsArray<ObjectToWallLine>;
|
|
77
53
|
}
|
|
78
54
|
export interface WallSide {
|
|
79
55
|
value: Enumify<typeof WALL_SIDES>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as dispose,_ as __decorate,i as inject,ae as AsyncGuard,aA as AsyncDependencyLoader}from"./roomle-dependency-injection-9da9be26.js";import{O as Object3D,a as Vector3,h as MeshBasicMaterial,w as DoubleSide,bn as MeshPhongMaterial,B as BufferGeometry,z as Mesh,Q as Quaternion,bb as PlaneGeometry,u as LineBasicMaterial,G as Line,b as BufferAttribute,aY as Line3,ad as Box3}from"./main-thread-to-worker-9f925ba4.js";import{T as TextGeometry}from"./TextGeometry-2f1b3194.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,s){this._position.copy(e),this._dimensioningType=t,this._cameraPosition=s,this._label=i;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new 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=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,t,i){let s=new 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),this._text.quaternion.copy(t);let h=new PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._cameraPosition=new Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,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._heightLine=new Line(t,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._depthLine=new Line(t,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new 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._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,0,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._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,1,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._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(s,2,n,this._cameraPosition)}updateBounds(e){if(!e)return;this._dimensions=e.getSize(new Vector3),this._lineBounds=e.clone();let t=this._lineBounds.min.y<0?this._lineBounds.min.y:0;t-=.01,this._lineBounds.expandByVector(new Vector3(.05,t,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),t.add(this._widthText),e.add(this._heightLine),t.add(this._heightText),e.add(this._depthLine),t.add(this._depthText))}removeFromScene(e,t){e.remove(this._widthLine),t.remove(this._widthText),e.remove(this._heightLine),t.remove(this._heightText),e.remove(this._depthLine),t.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new Line3(new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new Line3(new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new Line3(new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export{DimensioningHelper as default};
|
|
2
|
-
//# sourceMappingURL=dimensioning-helper-
|
|
1
|
+
import{o as dispose,_ as __decorate,i as inject,ae as AsyncGuard,aA as AsyncDependencyLoader}from"./roomle-dependency-injection-c76f3322.js";import{O as Object3D,a as Vector3,h as MeshBasicMaterial,w as DoubleSide,bn as MeshPhongMaterial,B as BufferGeometry,z as Mesh,Q as Quaternion,bb as PlaneGeometry,u as LineBasicMaterial,G as Line,b as BufferAttribute,aY as Line3,ad as Box3}from"./main-thread-to-worker-6dba7605.js";import{T as TextGeometry}from"./TextGeometry-d3349d80.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,s){this._position.copy(e),this._dimensioningType=t,this._cameraPosition=s,this._label=i;const n=this._cameraPosition.distanceTo(this._text.position),h=Math.max(.01,n/100),o=Math.max(5e-4,n/5e3);this._parameters.bevelThickness=o,this._parameters.bevelSize=o,this._parameters.size=h,this._textGeometry=new 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=Math.atan2(this._cameraPosition.x-this._position.x,this._cameraPosition.z-this._position.z);this._text.rotation.y=e,this._plane.rotation.y=e}}_updateText(e,t,i){let s=new 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),this._text.quaternion.copy(t);let h=new PlaneGeometry(n.x+.02,n.y+.02,32);h.center(),this._plane.geometry=h,this._plane.position.copy(s),this._plane.quaternion.copy(t)}_getXSign(){return!this._cameraPosition||this._cameraPosition.x>=0?1:-1}dispose(){dispose(this)}}__decorate([inject],TextWithBackground.prototype,"_cacheHolder",void 0);class DimensioningHelper{constructor(e){this._cameraPosition=new Vector3,this._textUpdated=!1,this._topDimensions=!1,this._initialized=new AsyncGuard,this._enabled=!1,this._dimensionsVisible=!1,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._heightLine=new Line(t,this._lineMaterial),this._heightLine.userData.ignoreComponentRaycast=!0,this._heightLine.name="dimension height line",this._depthLine=new Line(t,this._lineMaterial),this._depthLine.userData.ignoreComponentRaycast=!0,this._depthLine.name="dimension depth line",this._planeMaterial=new MeshBasicMaterial({color:16777215,side:DoubleSide,opacity:.8,transparent:!0}),AsyncDependencyLoader.loadFont("static/rubik_regular_sub-2dd2d5cca49018c5.json").then(e=>{this._font=e,this._loaded()})}_loaded(){this.update(!1),this.addToScene(this._scene,this._uiScene),this._initialized.resolve()}_performUpdate(e){this._enabled&&(this._lineBounds||e)&&this._font&&(this._updateHeight(),this._updateWidth(),this._updateDepth())}_updateWidth(){let e=new 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._widthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.x);this._widthText.update(s,0,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._heightText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.y);this._heightText.update(s,1,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._depthText.topDown=this._topDimensions;const n=this._unitFormatter.formatMMValueToUnitString(1e3*this._dimensions.z);this._depthText.update(s,2,n,this._cameraPosition)}updateBounds(e){if(!e)return;this._dimensions=e.getSize(new Vector3),this._lineBounds=e.clone();let t=this._lineBounds.min.y<0?this._lineBounds.min.y:0;t-=.01,this._lineBounds.expandByVector(new Vector3(.05,t,.05)),this._textUpdated=!1,this.update()}update(e=!1){this._enabled&&!this._dimensionsVisible&&(this._dimensionsVisible=!0,this._visibilityChangedCallback()),this._performUpdate(e)}addToScene(e,t){this._widthText&&this._widthLine&&this._heightText&&this._heightLine&&this._heightText&&this._heightLine&&(e.add(this._widthLine),t.add(this._widthText),e.add(this._heightLine),t.add(this._heightText),e.add(this._depthLine),t.add(this._depthText))}removeFromScene(e,t){e.remove(this._widthLine),t.remove(this._widthText),e.remove(this._heightLine),t.remove(this._heightText),e.remove(this._depthLine),t.remove(this._depthText)}_getWidthEdge(){return this._cameraPosition.z>=0?new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z))}_getDepthEdge(){return this._cameraPosition.x>=0?new Line3(new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z)):new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z))}_getHeightEdge(){return this._cameraPosition.x>=0&&this._cameraPosition.z>=0?new Line3(new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.max.z),new Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x<0&&this._cameraPosition.z>=0?new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.max.z),new Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.max.z)):this._cameraPosition.x>=0&&this._cameraPosition.z<0?new Line3(new Vector3(this._lineBounds.max.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.max.x,this._lineBounds.max.y,this._lineBounds.min.z)):new Line3(new Vector3(this._lineBounds.min.x,this._lineBounds.min.y,this._lineBounds.min.z),new Vector3(this._lineBounds.min.x,this._lineBounds.max.y,this._lineBounds.min.z))}onDimensionsVisibilityChanged(e){this._onChange=e}enableTopDimensions(){this.enableDimensions(),this._topDimensions=!0,this._heightLine.visible=!1,this._heightText.visible=!1,this.update(!0)}disableTopDimensions(){this._topDimensions=!1,this._heightLine.visible=!0,this._heightText.visible=!0,this.disableDimensions()}enableDimensions(){this._enabled=!0,this.update(!0),this.addToScene(this._scene,this._uiScene)}disableDimensions(){this._enabled=!1,this._dimensionsVisible&&(this._dimensionsVisible=!1,this._visibilityChangedCallback()),this.removeFromScene(this._scene,this._uiScene)}_visibilityChangedCallback(){this._onChange&&this._onChange(this._dimensionsVisible)}_clear(){this._lineMaterial.dispose(),this._planeMaterial.dispose(),this._widthLine.geometry.dispose(),this._heightLine.geometry.dispose(),this._depthLine.geometry.dispose(),this._heightText.dispose(),this._heightText.dispose(),this._depthText.dispose()}getBoundingBox(){const e=new Box3;return e.expandByObject(this._widthLine),e.expandByObject(this._widthText),e.expandByObject(this._heightLine),e.expandByObject(this._heightText),e.expandByObject(this._depthLine),e.expandByObject(this._depthText),e}setVisibility(e){this._heightLine&&this._widthLine&&this._depthLine&&this._heightText&&this._widthText&&this._depthText&&(this._heightLine.visible=e,this._heightText.visible=e,this._widthLine.visible=e,this._widthText.visible=e,this._depthLine.visible=e,this._depthText.visible=e)}moveCameraStart(e){this.setVisibility(!1),this._cameraPosition=e,this.update()}moveCameraEnd(e){this.setVisibility(!0),this._cameraPosition=e,this.update()}clearScene(e){this._clear()}setScene(e){this._scene=e}setUiScene(e){this._uiScene=e}needsUiScene(){return!0}isInitialized(){return this._initialized.wait()}areDimensionsEnabled(){return this._enabled}}__decorate([inject],DimensioningHelper.prototype,"_unitFormatter",void 0);export{DimensioningHelper as default};
|
|
2
|
+
//# sourceMappingURL=dimensioning-helper-34e02cf8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimensioning-helper-
|
|
1
|
+
{"version":3,"file":"dimensioning-helper-34e02cf8.js","sources":["../../packages/configurator-core/public/fonts/rubik_regular_sub.json"],"sourcesContent":["export default \"static/rubik_regular_sub-2dd2d5cca49018c5.json\""],"names":[],"mappings":"wnIAAe"}
|