@roomle/web-sdk 2.107.0-alpha.5 → 2.107.0-alpha.7
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/ConfiguratorKernel.wasm +0 -0
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/definitions/common-core/src/cameracontrol/planner-3d-camera-behaviour.d.ts +1 -1
- package/lib/{planner-lPdLVjIT.mjs → planner-B3Bt-cWy.mjs} +86 -80
- package/lib/planner-B3Bt-cWy.mjs.map +1 -0
- package/lib/planner-D7lLZxgW.js +155 -0
- package/lib/planner-D7lLZxgW.js.map +1 -0
- package/lib/planner.js +1 -1
- package/lib/planner.nomodule.js +1 -1
- package/lib/roomle-sdk.js +1 -1
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/static/roomle-core-hsc/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/RoomleServiceCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/RoomleToolsCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleServiceCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/package.json +1 -1
- package/lib/planner-D9BgIEJQ.js +0 -155
- package/lib/planner-D9BgIEJQ.js.map +0 -1
- package/lib/planner-lPdLVjIT.mjs.map +0 -1
|
Binary file
|
package/lib/RoomleCore.wasm
CHANGED
|
Binary file
|
package/lib/RoomleToolsCore.wasm
CHANGED
|
Binary file
|
|
@@ -15,7 +15,7 @@ export default class Planner3dCameraBehaviour extends PlannerCameraBehaviour {
|
|
|
15
15
|
updateCameraOnPlanElementDraggedOutsidePlanBounds(bounds: Box3): void;
|
|
16
16
|
updateCameraOnPlanElementInsertedInsideCurrentCameraView(bounds: Box3): void;
|
|
17
17
|
updateCameraOnPlanElementRemoved(bounds: Box3): void;
|
|
18
|
-
updateCameraOnBackToPlanner(
|
|
18
|
+
updateCameraOnBackToPlanner(bounds: Box3, startCameraParams: CameraParameter, endCameraParams: CameraParameter): Promise<void>;
|
|
19
19
|
resetCameraOnEnableWallDrawing(bounds: Box3): void;
|
|
20
20
|
externalApiMoveCamera(cameraParameter: CameraParameter): Promise<void>;
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { V as v, _ as bt, $ as oe, H as L, an as Pt, ao as Se, ap as It, a0 as Ot, aq as wt, ar as D, as as x, at as He, au as O, av as Ye, aw as be, ax as Pe, P as Ve, M as T, q as S, ay as w, az as Ie, aA as W, aB as
|
|
2
|
-
import { L as Cn, c as bn, d as N, B as Pn, C as F, e as
|
|
3
|
-
import { S as wn, I as vn, R as Sn, b as K, O as I, C as
|
|
1
|
+
import { V as v, _ as bt, $ as oe, H as L, an as Pt, ao as Se, ap as It, a0 as Ot, aq as wt, ar as D, as as x, at as He, au as O, av as Ye, aw as be, ax as Pe, P as Ve, M as T, q as S, ay as w, az as Ie, aA as W, aB as Z, aC as B, aD as G, aE as vt, aF as St, aG as Mt, v as X, W as ge, aH as U, aI as J, aJ as _e, aK as Me, aL as Et, aM as yt, aN as Re, aO as ne, j as p, aP as Dt, aQ as ht, aR as m, aS as At, aT as Rt, aU as Lt, ab as xt, e as Ee, g as V, aV as se, aW as jt, aX as Xe, aY as ye, aZ as Ht, ag as De, a_ as Fe, B as C, a$ as le, b0 as te, b1 as Tt, b2 as ce, b3 as kt, b4 as Ue, b5 as Bt, ac as Gt, b6 as Ft, b7 as Ut, b8 as Wt, b9 as Nt, ba as Kt, bb as Oe, bc as zt, bd as Vt, be as we, bf as $t, a9 as Ze, bg as Jt, bh as qt, bi as Yt, bj as We, bk as Ne, bl as Xt, bm as Zt, bn as Qt, bo as en, bp as tn, bq as me, br as Qe, bs as Ke, bt as et, a2 as nn, C as an, bu as tt, f as Ae, i as sn, bv as rn, bw as on, Y as ln, D as $, b as nt, x as cn, bx as hn, a as dn, c as un, d as gn, r as _n, z as mn, R as pn, K as fn } from "./main-CMu7hOEO.mjs";
|
|
2
|
+
import { L as Cn, c as bn, d as N, B as Pn, C as F, e as Q, b as ee, I as In, f as On } from "./camera-behaviour-BLMduSEn.mjs";
|
|
3
|
+
import { S as wn, I as vn, R as Sn, b as K, O as I, C as Mn, P as En, c as at, G as yn, a as Dn } from "./configurator-scene-manager-DbsYS4rm.mjs";
|
|
4
4
|
import { C as b } from "./main-thread-to-worker-ByNW4PfN.mjs";
|
|
5
5
|
import { G as An } from "./glb-viewer-camera-behaviour-DQ2sVbku.mjs";
|
|
6
6
|
import { S as Rn } from "./script-loader-BzwDLtbS.mjs";
|
|
@@ -191,7 +191,7 @@ var jn = Object.defineProperty, Te = (r, e, t, n) => {
|
|
|
191
191
|
for (var a = void 0, s = r.length - 1, i; s >= 0; s--)
|
|
192
192
|
(i = r[s]) && (a = i(e, t, a) || a);
|
|
193
193
|
return a && jn(e, t, a), a;
|
|
194
|
-
},
|
|
194
|
+
}, M = /* @__PURE__ */ ((r) => (r[r.SELECT_PLAN_ELEMENT = 0] = "SELECT_PLAN_ELEMENT", r[r.DESELECT_PLAN_ELEMENT = 1] = "DESELECT_PLAN_ELEMENT", r[r.STATE_CHANGED = 2] = "STATE_CHANGED", r[r.HOVER_ON = 3] = "HOVER_ON", r[r.HOVER_OFF = 4] = "HOVER_OFF", r[r.DRAW = 5] = "DRAW", r[r.DRAWING_START = 6] = "DRAWING_START", r[r.DRAWING_END = 7] = "DRAWING_END", r[r.BEFORE_DRAG_START = 8] = "BEFORE_DRAG_START", r[r.DRAG_START = 9] = "DRAG_START", r[r.DRAG_MOVE = 10] = "DRAG_MOVE", r[r.DRAG_END = 11] = "DRAG_END", r[r.DRAG_CANCEL = 12] = "DRAG_CANCEL", r[r.INTERACTION = 13] = "INTERACTION", r[r.CLICK_OUTSIDE = 14] = "CLICK_OUTSIDE", r[r.SELECTION_MODE_CHANGED = 15] = "SELECTION_MODE_CHANGED", r[r.ADD_MEASUREMENT_LINE_START = 16] = "ADD_MEASUREMENT_LINE_START", r[r.ADD_MEASUREMENT_LINE_END = 17] = "ADD_MEASUREMENT_LINE_END", r[r.DRAG_MEASUREMENT_LINE = 18] = "DRAG_MEASUREMENT_LINE", r[r.ACTIVATE_PLAN_ELEMENT = 19] = "ACTIVATE_PLAN_ELEMENT", r))(M || {}), Y = /* @__PURE__ */ ((r) => (r[r.IDLE = 0] = "IDLE", r[r.DRAG = 1] = "DRAG", r[r.ROTATE = 2] = "ROTATE", r[r.DRAW = 3] = "DRAW", r[r.MEASURE = 4] = "MEASURE", r))(Y || {});
|
|
195
195
|
class z {
|
|
196
196
|
constructor(e) {
|
|
197
197
|
const { planElementViewModel: t, resetCamera: n, state: a, oldState: s, reason: i } = e;
|
|
@@ -524,11 +524,11 @@ class fe extends wn {
|
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
_doubleClickElement(e, t = Ie.UNKNOWN, n) {
|
|
527
|
-
if (!this._isDrawingEnabled || !(e instanceof
|
|
527
|
+
if (!this._isDrawingEnabled || !(e instanceof Z) && !(e instanceof x))
|
|
528
528
|
return;
|
|
529
529
|
this._debug && console.log("double click", e.getId()), e instanceof x && this._plannerSelectionHandler.cancelSelection("double_click_wall");
|
|
530
530
|
let a;
|
|
531
|
-
e instanceof
|
|
531
|
+
e instanceof Z ? a = e.getPlanElement().getCenter() : n && (a = w(
|
|
532
532
|
new v(n.x, 0, n.z)
|
|
533
533
|
)), this._isCurrentlyDrawing ? this.endWallDrawing(null, a) : this._startWallDrawing(null, a, t);
|
|
534
534
|
}
|
|
@@ -585,7 +585,7 @@ class fe extends wn {
|
|
|
585
585
|
) && !this._dragIn || this._state !== 0) && !this._isDrawingEnabled || (this.dispatchEvent(
|
|
586
586
|
8
|
|
587
587
|
/* BEFORE_DRAG_START */
|
|
588
|
-
), St(
|
|
588
|
+
), St(Mt.DRAG).then(() => {
|
|
589
589
|
if (this._inputManager.isMouseUp()) {
|
|
590
590
|
this.setState(
|
|
591
591
|
0
|
|
@@ -625,16 +625,20 @@ class fe extends wn {
|
|
|
625
625
|
} else if (e instanceof W)
|
|
626
626
|
this._dragMeasurementLine(e, t);
|
|
627
627
|
else {
|
|
628
|
-
const s = e instanceof
|
|
628
|
+
const s = e instanceof Z || e instanceof x, i = e.getPlanElement();
|
|
629
629
|
if (this._planViewModel.cameraType === b.CAMERA_2D && !this._dragIn || s) {
|
|
630
|
-
const
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
630
|
+
const l = X(
|
|
631
|
+
i.getCenter()
|
|
632
|
+
), c = w(
|
|
633
|
+
t.clone().sub(l)
|
|
634
|
+
);
|
|
635
|
+
c.z = 0, n.moveElementBy(
|
|
636
|
+
i,
|
|
637
|
+
c
|
|
634
638
|
);
|
|
635
639
|
} else
|
|
636
640
|
n.moveElementTo(
|
|
637
|
-
|
|
641
|
+
i,
|
|
638
642
|
w(t)
|
|
639
643
|
);
|
|
640
644
|
}
|
|
@@ -756,7 +760,7 @@ class fe extends wn {
|
|
|
756
760
|
e && !t ? this._raycastHelper.enableOnWallSnapping() : this._raycastHelper.disableOnWallSnapping();
|
|
757
761
|
}
|
|
758
762
|
enableWallDrawing() {
|
|
759
|
-
return this._isDrawingEnabled = !0, this._drawingGroup = new
|
|
763
|
+
return this._isDrawingEnabled = !0, this._drawingGroup = new Me(), this._drawingGroup.name = "Drawing", this._drawingGroup.add(this._createFloorMeshWithHandler()), this._inputManager.addEventListener(
|
|
760
764
|
O.MOVE,
|
|
761
765
|
this._drawWallOnMouseMove,
|
|
762
766
|
this
|
|
@@ -812,7 +816,7 @@ class fe extends wn {
|
|
|
812
816
|
}
|
|
813
817
|
async _startWallDrawing(e, t, n) {
|
|
814
818
|
(e && e.type === Ie.TOUCH || n === Ie.TOUCH) && (await this._initMobileDrawing(), this._continuousDrawingHelper.update()), this.planInteractionHandler.startInteraction();
|
|
815
|
-
const { x: a, y: s } = t || this._getIntersectionPointWithScene(e), i = this._initData?.featureFlags?.drawPreviewMode ===
|
|
819
|
+
const { x: a, y: s } = t || this._getIntersectionPointWithScene(e), i = this._initData?.featureFlags?.drawPreviewMode === Et.VECTOR;
|
|
816
820
|
this.planInteractionHandler.beginDrawing(
|
|
817
821
|
{ x: a, y: s, z: 0 },
|
|
818
822
|
i
|
|
@@ -949,7 +953,7 @@ class fe extends wn {
|
|
|
949
953
|
this._lastDragPosition = t.clone();
|
|
950
954
|
return;
|
|
951
955
|
}
|
|
952
|
-
const a = t.clone().sub(this._lastDragPosition), i =
|
|
956
|
+
const a = t.clone().sub(this._lastDragPosition), i = X(n.getCenter()).add(a);
|
|
953
957
|
this.planInteractionHandler.moveElementTo(
|
|
954
958
|
n,
|
|
955
959
|
w(i)
|
|
@@ -1334,7 +1338,7 @@ const kn = async (r, e) => {
|
|
|
1334
1338
|
i.configurationRuntimeId
|
|
1335
1339
|
))
|
|
1336
1340
|
s.push([
|
|
1337
|
-
|
|
1341
|
+
Ee(i.configurationHash),
|
|
1338
1342
|
i
|
|
1339
1343
|
]), t.push(V(i));
|
|
1340
1344
|
else if (i.configurationType?.value !== se.EXTERNAL) {
|
|
@@ -1507,7 +1511,9 @@ class he extends pe {
|
|
|
1507
1511
|
this.cameraControl.adjustToBoundsWithoutChangingDistance(e);
|
|
1508
1512
|
}
|
|
1509
1513
|
async updateCameraOnBackToPlanner(e, t, n) {
|
|
1510
|
-
|
|
1514
|
+
if (!n)
|
|
1515
|
+
return;
|
|
1516
|
+
this.cameraControl.setObjectRotation(0), Math.abs(0 - n.targetX) <= 0.01 && Math.abs(0 - n.targetY) <= 0.01 && Math.abs(0 - n.targetZ) <= 0.01 ? await this.cameraControl.updateAndReset(e, !0) : await this._cameraControl.setToState(t, n);
|
|
1511
1517
|
}
|
|
1512
1518
|
resetCameraOnEnableWallDrawing(e) {
|
|
1513
1519
|
this.cameraControl.updateAndReset(e, !0);
|
|
@@ -1794,12 +1800,12 @@ const $n = "rml_plans", de = {
|
|
|
1794
1800
|
INTERIOR: "interior",
|
|
1795
1801
|
EXTERIOR: "exterior"
|
|
1796
1802
|
}, rt = (r) => ["altKey", "ctrlKey", "shiftKey", "metaKey"].reduce((e, t) => (r[t] && e++, e), 0);
|
|
1797
|
-
class re extends
|
|
1803
|
+
class re extends Mn {
|
|
1798
1804
|
constructor(e, t, n, a) {
|
|
1799
1805
|
super(e, t, a), this._itemsLoadingStatePromises = [], this._staticItemGuard = new Fe(), this._completelyLoaded = !1, this._configurableItemGuard = new Fe(), this._planCompletelyLoadedGuard = new Fe(), this.currentSelection = null, this._paperBackground = null, this._cameraState = null, this._debugSpheres = {
|
|
1800
|
-
wallPoints: new
|
|
1801
|
-
constructionElementsPoints: new
|
|
1802
|
-
floorPoints: new
|
|
1806
|
+
wallPoints: new Me(),
|
|
1807
|
+
constructionElementsPoints: new Me(),
|
|
1808
|
+
floorPoints: new Me()
|
|
1803
1809
|
}, this._stopRendering = !0, this._configureInRoom = !!this._initData.configureInRoom, this._configuratorContext.baseContext = C.PLANNER, this._roomlePlannerCallback = n, this._plannerMeshGenerator.maxAnisotropy = this._renderer.capabilities.getMaxAnisotropy(), this._plannerMeshGenerator.maxTextures = this._renderer.capabilities.maxTextures, this._plannerSceneEventHandler = new fe(
|
|
1804
1810
|
e,
|
|
1805
1811
|
this._scene,
|
|
@@ -1810,21 +1816,21 @@ class re extends En {
|
|
|
1810
1816
|
this._roomleRenderer,
|
|
1811
1817
|
this._getViewModel()
|
|
1812
1818
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1813
|
-
|
|
1819
|
+
M.STATE_CHANGED,
|
|
1814
1820
|
({ state: s, oldState: i }) => {
|
|
1815
1821
|
i === Y.ROTATE && s !== i && this._roomlePlannerUiCallback.onRotationCancel(), s === Y.ROTATE || s === Y.DRAG || s === Y.MEASURE || s === Y.DRAW ? (this.cameraBehaviour.cameraControl.lock(), this._onCameraMove()) : (this.cameraBehaviour.cameraControl.unlock(), this._onCameraIdle());
|
|
1816
1822
|
},
|
|
1817
1823
|
this
|
|
1818
1824
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1819
|
-
|
|
1825
|
+
M.INTERACTION,
|
|
1820
1826
|
() => this._renderWithoutShadowsAndAO(),
|
|
1821
1827
|
this
|
|
1822
1828
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1823
|
-
|
|
1829
|
+
M.ACTIVATE_PLAN_ELEMENT,
|
|
1824
1830
|
(s) => this._activateElement(s),
|
|
1825
1831
|
this
|
|
1826
1832
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1827
|
-
|
|
1833
|
+
M.SELECT_PLAN_ELEMENT,
|
|
1828
1834
|
(s) => {
|
|
1829
1835
|
this._activateElement(s);
|
|
1830
1836
|
const i = s.planElementViewModel;
|
|
@@ -1834,25 +1840,25 @@ class re extends En {
|
|
|
1834
1840
|
},
|
|
1835
1841
|
this
|
|
1836
1842
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1837
|
-
|
|
1843
|
+
M.DESELECT_PLAN_ELEMENT,
|
|
1838
1844
|
({ planElementViewModel: s, reason: i }) => {
|
|
1839
1845
|
this._planElementHighlighter.clearHighlighting(), this._onSelectionCancel(s, i), this._roomlePlannerUiCallback.onSelectionCancel(i), this._renderWithoutShadowsAndAO();
|
|
1840
1846
|
},
|
|
1841
1847
|
this
|
|
1842
1848
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1843
|
-
|
|
1849
|
+
M.BEFORE_DRAG_START,
|
|
1844
1850
|
() => {
|
|
1845
1851
|
this.cameraBehaviour.cameraControl.lock();
|
|
1846
1852
|
},
|
|
1847
1853
|
this
|
|
1848
1854
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1849
|
-
|
|
1855
|
+
M.DRAG_START,
|
|
1850
1856
|
({ planElementViewModel: s }) => {
|
|
1851
1857
|
this._getKernelAccess().planInteractionHandler.startInteraction(), this._sendElementMeasurements(), s instanceof x && this._sendWallDimensions(), this._requestRender(), this._dragStartBounds = this.getBounds();
|
|
1852
1858
|
},
|
|
1853
1859
|
this
|
|
1854
1860
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1855
|
-
|
|
1861
|
+
M.DRAG_MOVE,
|
|
1856
1862
|
({ planElementViewModel: s }) => {
|
|
1857
1863
|
this.cameraBehaviour.cameraControl.checkNearFarDistance(
|
|
1858
1864
|
s.getPosition()
|
|
@@ -1860,7 +1866,7 @@ class re extends En {
|
|
|
1860
1866
|
},
|
|
1861
1867
|
this
|
|
1862
1868
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1863
|
-
|
|
1869
|
+
M.DRAG_END,
|
|
1864
1870
|
async ({ planElementViewModel: s }) => {
|
|
1865
1871
|
const i = this._getKernelAccess().planInteractionHandler;
|
|
1866
1872
|
i.endInteraction(), this.cameraBehaviour.cameraControl.unlock();
|
|
@@ -1881,7 +1887,7 @@ class re extends En {
|
|
|
1881
1887
|
te.MOVED,
|
|
1882
1888
|
c.length ? c[0] : { ...l, data: null }
|
|
1883
1889
|
);
|
|
1884
|
-
const h = s instanceof x || s instanceof W || s instanceof
|
|
1890
|
+
const h = s instanceof x || s instanceof W || s instanceof Z;
|
|
1885
1891
|
!this._cameraBehaviourState.isWithinPlanBounds(
|
|
1886
1892
|
s.getPosition(),
|
|
1887
1893
|
this.getBounds()
|
|
@@ -1891,41 +1897,41 @@ class re extends En {
|
|
|
1891
1897
|
},
|
|
1892
1898
|
this
|
|
1893
1899
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1894
|
-
|
|
1900
|
+
M.DRAG_CANCEL,
|
|
1895
1901
|
() => {
|
|
1896
1902
|
this.cameraBehaviour.cameraControl.unlock();
|
|
1897
1903
|
},
|
|
1898
1904
|
this
|
|
1899
1905
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1900
|
-
|
|
1906
|
+
M.ADD_MEASUREMENT_LINE_START,
|
|
1901
1907
|
() => {
|
|
1902
1908
|
this.cameraBehaviour.cameraControl.lock();
|
|
1903
1909
|
},
|
|
1904
1910
|
this
|
|
1905
1911
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1906
|
-
|
|
1912
|
+
M.DRAG_MEASUREMENT_LINE,
|
|
1907
1913
|
() => {
|
|
1908
1914
|
this._roomlePlannerUiCallback.onUpdateMeasurementLineDimensions([]);
|
|
1909
1915
|
},
|
|
1910
1916
|
this
|
|
1911
1917
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1912
|
-
|
|
1918
|
+
M.ADD_MEASUREMENT_LINE_END,
|
|
1913
1919
|
() => {
|
|
1914
1920
|
this.cameraBehaviour.cameraControl.unlock(), this._roomlePlannerUiCallback.onMeasurementLineStateChange(!1);
|
|
1915
1921
|
},
|
|
1916
1922
|
this
|
|
1917
1923
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1918
|
-
|
|
1924
|
+
M.DRAWING_START,
|
|
1919
1925
|
() => {
|
|
1920
1926
|
this._setKernelZoomFactor(), this._renderWithoutShadowsAndAO(), this._roomleRenderer?.setGroundShadow(!1);
|
|
1921
1927
|
},
|
|
1922
1928
|
this
|
|
1923
1929
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1924
|
-
|
|
1930
|
+
M.DRAW,
|
|
1925
1931
|
() => this._renderWithoutShadowsAndAO(),
|
|
1926
1932
|
this
|
|
1927
1933
|
), this._plannerSceneEventHandler.addEventListener(
|
|
1928
|
-
|
|
1934
|
+
M.DRAWING_END,
|
|
1929
1935
|
() => {
|
|
1930
1936
|
this._renderWithoutShadowsAndAO(), this._roomleRenderer?.setGroundShadow(!0);
|
|
1931
1937
|
},
|
|
@@ -1971,7 +1977,7 @@ class re extends En {
|
|
|
1971
1977
|
}
|
|
1972
1978
|
}
|
|
1973
1979
|
_getViewModel() {
|
|
1974
|
-
return this._viewModel || (this._viewModel = new
|
|
1980
|
+
return this._viewModel || (this._viewModel = new En(this._creator_), this._viewModel.setRequestRenderCallback(() => this._renderEverything()), this._viewModel.setRequestRenderSceneUpdateCallback(
|
|
1975
1981
|
() => this._roomleRenderer?.clearCache()
|
|
1976
1982
|
), this._viewModel.setInvalidateRenderCallback(
|
|
1977
1983
|
() => this._roomleRenderer?.forceShadowUpdates(!0)
|
|
@@ -2079,7 +2085,7 @@ class re extends En {
|
|
|
2079
2085
|
ce(t),
|
|
2080
2086
|
s,
|
|
2081
2087
|
e
|
|
2082
|
-
), (e instanceof x || e instanceof
|
|
2088
|
+
), (e instanceof x || e instanceof Z) && (this._getViewModel().getNodePlanObjectViewModels().forEach((i) => i.show()), this._updateNodeSize()), this._renderWithoutShadowsAndAO();
|
|
2083
2089
|
}
|
|
2084
2090
|
_onSelectionCancel(e, t) {
|
|
2085
2091
|
this._getViewModel().getNodePlanObjectViewModels().forEach((n) => n.hide()), this._renderWithoutShadowsAndAO(), this.resetConfiguratorContext(t), this.cancelComponentSelection(!1, t), this._handleMeasurementLineDraggablePoints(e), this.currentSelection = null;
|
|
@@ -2219,7 +2225,7 @@ class re extends En {
|
|
|
2219
2225
|
this._cameraBehaviourState
|
|
2220
2226
|
)
|
|
2221
2227
|
), this._resetCameraPosition(e), this._getViewModel().showAll(), this.setEventHandlerObject(this._scene), this.enablePlannerEvents();
|
|
2222
|
-
const n = this.cameraBehaviour.cameraControl instanceof F || this.cameraBehaviour.cameraControl instanceof
|
|
2228
|
+
const n = this.cameraBehaviour.cameraControl instanceof F || this.cameraBehaviour.cameraControl instanceof Q;
|
|
2223
2229
|
this._getViewModel().setCameraType(
|
|
2224
2230
|
n ? b.CAMERA_3D : b.CAMERA_2D
|
|
2225
2231
|
), this.disableConfiguratorEvents(), this._roomleRenderer?.switchToPlanner(
|
|
@@ -2368,7 +2374,7 @@ class re extends En {
|
|
|
2368
2374
|
t();
|
|
2369
2375
|
}
|
|
2370
2376
|
removePlanObjectFromScene(e) {
|
|
2371
|
-
(e instanceof x || e instanceof
|
|
2377
|
+
(e instanceof x || e instanceof Z) && this._sendWallDimensions(), e instanceof W && this._sendMeasurementLineDimension(), this._scene.remove(e.getContainer()), e.clear(), this.updateEnvironment(this.getBounds(), !0), !(e instanceof x || e instanceof W || e instanceof Z) && this._configuratorContext.baseContext === C.PLANNER && this.plannerCameraBehaviour.updateCameraOnPlanElementRemoved(
|
|
2372
2378
|
this.getBounds()
|
|
2373
2379
|
), this._renderEverything();
|
|
2374
2380
|
}
|
|
@@ -2429,7 +2435,7 @@ class re extends En {
|
|
|
2429
2435
|
}
|
|
2430
2436
|
switchTo2D() {
|
|
2431
2437
|
if (!(this.cameraBehaviour?.cameraControl instanceof N)) {
|
|
2432
|
-
this.cameraBehaviour?.cameraControl instanceof
|
|
2438
|
+
this.cameraBehaviour?.cameraControl instanceof Q && this._getCameraControlFirstPerson().cleanUp(), this._roomleRenderer?.setCameraType(b.CAMERA_2D), this._plannerSceneEventHandler?.enable();
|
|
2433
2439
|
for (const e of this._getViewModel().getWallPlanObjectViewModels())
|
|
2434
2440
|
e.show();
|
|
2435
2441
|
this._getViewModel().setCameraType(b.CAMERA_2D).then(() => this._planElementHighlighter.highlightPlanElement()), this._roomleRenderer?.switchToPlanner(le.Mode2D), this._renderEverything(), this._changeCameraBehaviour(
|
|
@@ -2449,7 +2455,7 @@ class re extends En {
|
|
|
2449
2455
|
), this._onCameraMove(), this.plannerCameraBehaviour.resetCameraOnSwitchTo3d(this.getBounds()), this._addCameraControlListener(), this._setCeiling(), this._roomlePlannerUiCallback.onCameraChanged(b.CAMERA_3D));
|
|
2450
2456
|
}
|
|
2451
2457
|
switchToFirstPerson() {
|
|
2452
|
-
this.cameraBehaviour?.cameraControl instanceof
|
|
2458
|
+
this.cameraBehaviour?.cameraControl instanceof Q || (this._roomleRenderer?.setCameraType(b.CAMERA_FP), this._plannerSceneEventHandler?.disable(), this._plannerMeshGenerator.wallMeshes.forEach(
|
|
2453
2459
|
(e) => Kt(e.material, !1, !1)
|
|
2454
2460
|
), this._getViewModel().getWallPlanObjectViewModels().forEach((e) => {
|
|
2455
2461
|
e.show();
|
|
@@ -2464,37 +2470,37 @@ class re extends En {
|
|
|
2464
2470
|
}
|
|
2465
2471
|
_setCameraControlListeners() {
|
|
2466
2472
|
super._setCameraControlListeners(), this.cameraBehaviour instanceof pe && (this.cameraBehaviour.cameraControl.addEventListener(
|
|
2467
|
-
|
|
2473
|
+
ee.IDLE,
|
|
2468
2474
|
() => {
|
|
2469
2475
|
this._onCameraIdle();
|
|
2470
2476
|
},
|
|
2471
2477
|
this
|
|
2472
2478
|
), this.cameraBehaviour.cameraControl.addEventListener(
|
|
2473
|
-
|
|
2479
|
+
ee.ORBIT_MOVE,
|
|
2474
2480
|
() => {
|
|
2475
2481
|
this._onCameraMove();
|
|
2476
2482
|
},
|
|
2477
2483
|
this
|
|
2478
2484
|
), this.cameraBehaviour.cameraControl.addEventListener(
|
|
2479
|
-
|
|
2485
|
+
ee.MOVING,
|
|
2480
2486
|
() => {
|
|
2481
2487
|
this._onCameraMove();
|
|
2482
2488
|
},
|
|
2483
2489
|
this
|
|
2484
2490
|
), this.cameraBehaviour.cameraControl.addEventListener(
|
|
2485
|
-
|
|
2491
|
+
ee.ZOOM_IN,
|
|
2486
2492
|
() => {
|
|
2487
2493
|
this._onCameraMove();
|
|
2488
2494
|
},
|
|
2489
2495
|
this
|
|
2490
2496
|
), this.cameraBehaviour.cameraControl.addEventListener(
|
|
2491
|
-
|
|
2497
|
+
ee.ZOOM_OUT,
|
|
2492
2498
|
() => {
|
|
2493
2499
|
this._onCameraMove();
|
|
2494
2500
|
},
|
|
2495
2501
|
this
|
|
2496
2502
|
), this.cameraBehaviour.cameraControl.addEventListener(
|
|
2497
|
-
|
|
2503
|
+
ee.ZOOM_CHANGE,
|
|
2498
2504
|
() => {
|
|
2499
2505
|
this._onCameraZoomChange();
|
|
2500
2506
|
},
|
|
@@ -2509,7 +2515,7 @@ class re extends En {
|
|
|
2509
2515
|
e && isFinite(e) && e >= 0 && this._getKernelAccess().planInteractionHandler?.setZoomFactor(e), this._plannerSceneEventHandler?.setKernelZoomFactor(e);
|
|
2510
2516
|
}
|
|
2511
2517
|
_setCeiling() {
|
|
2512
|
-
this._getViewModel() && (this.cameraBehaviour.cameraControl instanceof
|
|
2518
|
+
this._getViewModel() && (this.cameraBehaviour.cameraControl instanceof Q ? this._getViewModel().getCeilingGroup().visible = !0 : this._getViewModel().getCeilingGroup().visible = !1);
|
|
2513
2519
|
}
|
|
2514
2520
|
cameraBehaviourChanged() {
|
|
2515
2521
|
super.cameraBehaviourChanged(), this._plannerSceneEventHandler?.setCamera(
|
|
@@ -3181,7 +3187,7 @@ class re extends En {
|
|
|
3181
3187
|
}
|
|
3182
3188
|
}
|
|
3183
3189
|
setSceneEvents(e) {
|
|
3184
|
-
this.cameraBehaviour.cameraControl instanceof
|
|
3190
|
+
this.cameraBehaviour.cameraControl instanceof Q || (e.construction !== void 0 && this._plannerSceneEventHandler?.enableConstructionEvents(
|
|
3185
3191
|
e.construction
|
|
3186
3192
|
), e.objects !== void 0 && this._plannerSceneEventHandler?.enableObjectEvents(e.objects));
|
|
3187
3193
|
}
|
|
@@ -3201,7 +3207,7 @@ class re extends En {
|
|
|
3201
3207
|
super.disableEvents(), this.disablePlannerEvents();
|
|
3202
3208
|
}
|
|
3203
3209
|
enableEvents() {
|
|
3204
|
-
super.enableEvents(), this._configuratorContext.baseContext === C.PLANNER && !(this.cameraBehaviour.cameraControl instanceof
|
|
3210
|
+
super.enableEvents(), this._configuratorContext.baseContext === C.PLANNER && !(this.cameraBehaviour.cameraControl instanceof Q) && this.enablePlannerEvents();
|
|
3205
3211
|
}
|
|
3206
3212
|
resetCameraPositionToStart() {
|
|
3207
3213
|
this.plannerCameraBehaviour.externalApiResetCameraPosition(
|
|
@@ -3279,8 +3285,8 @@ class re extends En {
|
|
|
3279
3285
|
e.getPlanElement(),
|
|
3280
3286
|
!0
|
|
3281
3287
|
);
|
|
3282
|
-
const a = e.getPlanElement().getCenter(), s =
|
|
3283
|
-
|
|
3288
|
+
const a = e.getPlanElement().getCenter(), s = X(t).sub(
|
|
3289
|
+
X(a)
|
|
3284
3290
|
);
|
|
3285
3291
|
n.moveElementBy(
|
|
3286
3292
|
e.getPlanElement(),
|
|
@@ -3291,7 +3297,7 @@ class re extends En {
|
|
|
3291
3297
|
), this._sendPlanObjectPositions();
|
|
3292
3298
|
}
|
|
3293
3299
|
moveElementsPosition(e, t) {
|
|
3294
|
-
const n = new this._plannerKernelAccess.kernelContainer.PlanObjectPtrList(), a =
|
|
3300
|
+
const n = new this._plannerKernelAccess.kernelContainer.PlanObjectPtrList(), a = X(t).sub(
|
|
3295
3301
|
e[e.length - 1].getPosition()
|
|
3296
3302
|
);
|
|
3297
3303
|
e.forEach(
|
|
@@ -3326,7 +3332,7 @@ class re extends En {
|
|
|
3326
3332
|
);
|
|
3327
3333
|
if (!o)
|
|
3328
3334
|
return;
|
|
3329
|
-
const l =
|
|
3335
|
+
const l = X(o.startPoint), c = X(o.endPoint), h = l.clone().sub(c).normalize(), u = (n - o.length) / 1e3, d = a.getPosition().clone().add(h.multiplyScalar(u));
|
|
3330
3336
|
this._getKernelAccess().planInteractionHandler.moveElementTo(
|
|
3331
3337
|
s,
|
|
3332
3338
|
w(d)
|
|
@@ -4903,10 +4909,10 @@ class $e {
|
|
|
4903
4909
|
}, this._globalCallback.onFetchExternalData = this._onFetchExternalData.bind(this);
|
|
4904
4910
|
}
|
|
4905
4911
|
async _onCheckExternalCache(e) {
|
|
4906
|
-
if (e === "/tags/" +
|
|
4912
|
+
if (e === "/tags/" + Ee(lt)) {
|
|
4907
4913
|
const t = await this._processedArticles();
|
|
4908
4914
|
return this._tagIds = [...t.keys()].sort((n, a) => n.localeCompare(a)), Promise.resolve({
|
|
4909
|
-
tag: { id:
|
|
4915
|
+
tag: { id: Ee(lt), tags: this._tagIds, sort: 1 }
|
|
4910
4916
|
});
|
|
4911
4917
|
}
|
|
4912
4918
|
for (const t of this._tagIds) {
|
|
@@ -4936,7 +4942,7 @@ class $e {
|
|
|
4936
4942
|
async _processedArticles() {
|
|
4937
4943
|
let e = await this._articlesPromise;
|
|
4938
4944
|
return e.articles && (e = e.articles), e.reduce((t, n) => {
|
|
4939
|
-
const a = n.category || "Uncategorized", s =
|
|
4945
|
+
const a = n.category || "Uncategorized", s = Ee(a.toLowerCase());
|
|
4940
4946
|
t.has(s) || t.set(s, {
|
|
4941
4947
|
id: s,
|
|
4942
4948
|
label: a,
|
|
@@ -4985,20 +4991,20 @@ ut([
|
|
|
4985
4991
|
], $e.prototype, "_configuratorViewModel");
|
|
4986
4992
|
class Qn {
|
|
4987
4993
|
}
|
|
4988
|
-
const R = (...r) => console.log("[HI]", "API Callback:", ...r), ie = (...r) => console.log("[HI]", "Message:", ...r),
|
|
4994
|
+
const R = (...r) => console.log("[HI]", "API Callback:", ...r), ie = (...r) => console.log("[HI]", "Message:", ...r), E = (...r) => console.log("[HI]", "API Call:", ...r);
|
|
4989
4995
|
class ea {
|
|
4990
4996
|
constructor(e) {
|
|
4991
4997
|
this._roomlePlanner = e;
|
|
4992
4998
|
}
|
|
4993
4999
|
loadMasterData(e) {
|
|
4994
|
-
|
|
5000
|
+
E("loadExternalObjectLibrary"), this._roomlePlanner.loadExternalObjectLibrary(e);
|
|
4995
5001
|
}
|
|
4996
5002
|
async loadPosGroups(e, t, n, a = []) {
|
|
4997
5003
|
const s = Array.isArray(e) ? e : [e];
|
|
4998
5004
|
let i = "";
|
|
4999
5005
|
for (const o of s)
|
|
5000
5006
|
i += ` '${o.id}'`;
|
|
5001
|
-
|
|
5007
|
+
E(`loadExternalObjectGroup${i}`), await this._roomlePlanner.loadExternalObjectGroup(
|
|
5002
5008
|
s,
|
|
5003
5009
|
t,
|
|
5004
5010
|
n,
|
|
@@ -5006,13 +5012,13 @@ class ea {
|
|
|
5006
5012
|
);
|
|
5007
5013
|
}
|
|
5008
5014
|
async selectGroup(e) {
|
|
5009
|
-
|
|
5015
|
+
E(`selectExternalObjectGroup '${e}'`), await this._roomlePlanner.selectExternalObjectGroup(e);
|
|
5010
5016
|
}
|
|
5011
5017
|
async selectRoot(e) {
|
|
5012
|
-
|
|
5018
|
+
E(`selectExternalObjectRootModule '${e}'`), await this._roomlePlanner.selectExternalObjectRootModule(e);
|
|
5013
5019
|
}
|
|
5014
5020
|
async selectModule(e, t) {
|
|
5015
|
-
|
|
5021
|
+
E(
|
|
5016
5022
|
`selectExternalObjectSubModule '${e}' '${t}'`
|
|
5017
5023
|
), await this._roomlePlanner.selectExternalObjectSubModule(
|
|
5018
5024
|
e,
|
|
@@ -5020,7 +5026,7 @@ class ea {
|
|
|
5020
5026
|
);
|
|
5021
5027
|
}
|
|
5022
5028
|
async openCloseGroup(e, t, n, a) {
|
|
5023
|
-
|
|
5029
|
+
E(
|
|
5024
5030
|
`openCloseExternalObject '${e}' '${t}' ${n ? "open" : "close"}`
|
|
5025
5031
|
), await this._roomlePlanner.openOrCloseGeometryOfExternalObject(
|
|
5026
5032
|
e,
|
|
@@ -5030,21 +5036,21 @@ class ea {
|
|
|
5030
5036
|
);
|
|
5031
5037
|
}
|
|
5032
5038
|
async deleteGroup(e, t = !1) {
|
|
5033
|
-
|
|
5039
|
+
E(`removeExternalObjectGroup '${e}' ${t}`), await this._roomlePlanner.removeExternalObjectGroup(e, t);
|
|
5034
5040
|
}
|
|
5035
5041
|
deleteRootModule(e) {
|
|
5036
|
-
return
|
|
5042
|
+
return E(`removeExternalObjectRootModule '${e}'`), this._roomlePlanner.removeExternalObjectRootModule(e), Promise.resolve();
|
|
5037
5043
|
}
|
|
5038
5044
|
async getPosDataOfAllGroups() {
|
|
5039
5045
|
const e = await this._roomlePlanner.getExternalObjectGroups(), t = e.map((n) => n.id);
|
|
5040
|
-
return
|
|
5046
|
+
return E(`getPosDataOfAllGroups => '${t}'`), e;
|
|
5041
5047
|
}
|
|
5042
5048
|
async getRoomInformation() {
|
|
5043
5049
|
const e = await this._roomlePlanner.getExternalRoomInformation();
|
|
5044
|
-
return
|
|
5050
|
+
return E("getRoomInformation"), e;
|
|
5045
5051
|
}
|
|
5046
5052
|
async generatePlanSnapshot() {
|
|
5047
|
-
|
|
5053
|
+
E("saveExternalObjectSnapshot"), E("saveCurrentPlanSnapshot");
|
|
5048
5054
|
const [e, t] = await Promise.all([
|
|
5049
5055
|
this._roomlePlanner.saveExternalObjectSnapshot(),
|
|
5050
5056
|
this._roomlePlanner.saveCurrentPlanSnapshot()
|
|
@@ -5052,20 +5058,20 @@ class ea {
|
|
|
5052
5058
|
ie("Group ID", e?.id), ie("Plan ID", t.id);
|
|
5053
5059
|
}
|
|
5054
5060
|
async saveExternalObjectSnapshot() {
|
|
5055
|
-
return
|
|
5061
|
+
return E("saveExternalObjectSnapshot"), this._roomlePlanner.saveExternalObjectSnapshot();
|
|
5056
5062
|
}
|
|
5057
5063
|
async saveCurrentPlanSnapshot() {
|
|
5058
|
-
return
|
|
5064
|
+
return E("saveCurrentPlanSnapshot"), this._roomlePlanner.saveCurrentPlanSnapshot();
|
|
5059
5065
|
}
|
|
5060
5066
|
async renderPosDataImage(e) {
|
|
5061
5067
|
const t = Array.isArray(e) ? e : [e];
|
|
5062
5068
|
let n = "";
|
|
5063
5069
|
for (const a of t)
|
|
5064
5070
|
n += ` '${a.id}'`;
|
|
5065
|
-
|
|
5071
|
+
E(`renderImagesOfExternalObjectGroup${n}`), await this._roomlePlanner.renderImagesOfExternalObjectGroup(t);
|
|
5066
5072
|
}
|
|
5067
5073
|
async downloadGlb() {
|
|
5068
|
-
|
|
5074
|
+
E("saveExternalObjectSnapshot");
|
|
5069
5075
|
const e = await this._roomlePlanner.saveExternalObjectSnapshot();
|
|
5070
5076
|
if (!e) {
|
|
5071
5077
|
ie("No plan snapshot available to download GLB.");
|
|
@@ -5160,7 +5166,7 @@ class ta {
|
|
|
5160
5166
|
try {
|
|
5161
5167
|
const a = this._groupMap.get(e.groupId);
|
|
5162
5168
|
if (a) {
|
|
5163
|
-
this._setGroupPosition(a, e), this._setGroupContour(a, e);
|
|
5169
|
+
this._setGroupPosition(a, e), this._setGroupContour(a, e), this._setRootModulesPosition(a, e);
|
|
5164
5170
|
const s = a.posDataJson;
|
|
5165
5171
|
s.roots = s.roots.filter(
|
|
5166
5172
|
(o) => o.id !== t
|
|
@@ -5859,7 +5865,7 @@ class ga extends Qn {
|
|
|
5859
5865
|
l,
|
|
5860
5866
|
c.id
|
|
5861
5867
|
);
|
|
5862
|
-
|
|
5868
|
+
E(`checks '${h}'`);
|
|
5863
5869
|
}
|
|
5864
5870
|
return Promise.resolve();
|
|
5865
5871
|
},
|
|
@@ -5994,4 +6000,4 @@ class Sa extends mn {
|
|
|
5994
6000
|
export {
|
|
5995
6001
|
Sa as Planner
|
|
5996
6002
|
};
|
|
5997
|
-
//# sourceMappingURL=planner-
|
|
6003
|
+
//# sourceMappingURL=planner-B3Bt-cWy.mjs.map
|