@giro3d/piero 1.0.0-beta.3 → 1.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components.cjs.js +3 -2
- package/dist/Components.cjs.js.map +1 -1
- package/dist/Components.es.js +3193 -1776
- package/dist/Components.es.js.map +1 -1
- package/dist/assets/piero.css +1 -1
- package/dist/index.cjs.js +7 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3041 -4078
- package/dist/index.es.js.map +1 -1
- package/dist/modules.cjs.js +1 -2
- package/dist/modules.cjs.js.map +1 -1
- package/dist/modules.es.js +732 -900
- package/dist/modules.es.js.map +1 -1
- package/dist/src/api/ViewApi.d.ts +2 -0
- package/dist/src/components/CoordinateInput.vue.d.ts +31 -0
- package/dist/src/modules/crossSectionAnalysis/CrossSection.vue.d.ts +1 -1
- package/dist/src/modules/crossSectionAnalysis/CrossSectionHelper.d.ts +4 -0
- package/dist/src/modules/crossSectionAnalysis/CrossSectionManager.d.ts +7 -0
- package/dist/src/modules/crossSectionAnalysis/store.d.ts +22 -2
- package/dist/src/services/CameraController.d.ts +3 -3
- package/dist/src/services/Giro3DManager.d.ts +2 -0
- package/dist/src/services/SceneCursorManager.d.ts +19 -0
- package/dist/src/utils/Types.d.ts +1 -0
- package/package.json +1 -1
package/dist/modules.es.js
CHANGED
|
@@ -1,76 +1,175 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { HttpError as
|
|
11
|
-
import
|
|
12
|
-
import { Components as
|
|
13
|
-
import
|
|
14
|
-
import { Map as
|
|
15
|
-
import
|
|
16
|
-
import { fromLonLat as
|
|
17
|
-
import { OSM as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
var Ce = Object.defineProperty;
|
|
2
|
+
var xe = (a, t, e) => t in a ? Ce(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var c = (a, t, e) => xe(a, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { K as Ie, a1 as se, P as Pe, V as F, I as q, O as Ee, a2 as K, a3 as ce, a4 as R, a5 as Se, i as J, a6 as oe, F as k, l as Te, t as $, G as ue, f as ee, M as Fe, n as ke, J as Me, a7 as Le, N as ie, U as W, W as De, _ as te, r as Be, X as Ne, a8 as de, a9 as Oe, aa as Ae, ab as ze, C as je, h as $e } from "./Components.es.js";
|
|
5
|
+
import { ac as Wn } from "./Components.es.js";
|
|
6
|
+
import { defineComponent as D, ref as I, createElementBlock as P, openBlock as v, createElementVNode as m, toDisplayString as pe, createCommentVNode as L, createBlock as V, shallowRef as Z, Fragment as Y, createVNode as T, unref as b, resolveComponent as He, normalizeClass as ae, withCtx as re, renderList as he, onMounted as Re, onUnmounted as Ve } from "vue";
|
|
7
|
+
import H from "@giro3d/giro3d/core/geographic/Coordinates";
|
|
8
|
+
import { defineStore as me } from "pinia";
|
|
9
|
+
import fe, { isEntity3D as ge } from "@giro3d/giro3d/entities/Entity3D";
|
|
10
|
+
import { HttpError as Ue } from "@giro3d/giro3d/utils/Fetcher";
|
|
11
|
+
import Ye from "@giro3d/giro3d/gui/EntityPanel";
|
|
12
|
+
import { Components as Ge, SimpleScene as We, SimpleRenderer as qe, SimpleCamera as Je, SimpleRaycaster as Ze, IfcPropertiesUtils as M, FragmentBoundingBox as Qe, FragmentManager as Xe, FragmentClassifier as Ke, FragmentIfcLoader as et, toCompositeID as tt, IfcCategoryMap as nt } from "openbim-components";
|
|
13
|
+
import st from "@giro3d/giro3d/gui/EntityInspector";
|
|
14
|
+
import { Map as ot, View as it } from "ol";
|
|
15
|
+
import at from "ol/layer/Tile";
|
|
16
|
+
import { fromLonLat as le } from "ol/proj";
|
|
17
|
+
import { OSM as rt } from "ol/source";
|
|
18
|
+
import lt from "@giro3d/giro3d/entities/PointCloud";
|
|
19
|
+
import ct from "@giro3d/giro3d/sources/PotreeSource";
|
|
20
|
+
import w from "shepherd.js";
|
|
21
|
+
const ut = { class: "input-group" }, dt = { class: "form-label" }, pt = { class: "input-group" }, ht = ["value"], mt = ["value"], ft = ["value"], gt = /* @__PURE__ */ D({
|
|
22
|
+
__name: "CoordinateInput",
|
|
23
|
+
props: {
|
|
24
|
+
cursorManager: {},
|
|
25
|
+
initialValue: {},
|
|
26
|
+
instance: {},
|
|
27
|
+
label: {},
|
|
28
|
+
showZ: { type: Boolean }
|
|
29
|
+
},
|
|
30
|
+
emits: ["update:coordinates"],
|
|
31
|
+
setup(a, { emit: t }) {
|
|
32
|
+
var g, C, _;
|
|
33
|
+
const e = a, n = I(((g = e.initialValue) == null ? void 0 : g.x) ?? 0), s = I(((C = e.initialValue) == null ? void 0 : C.y) ?? 0), o = I(((_ = e.initialValue) == null ? void 0 : _.z) ?? 0), i = t, l = new Pe(), d = I(!1), p = () => {
|
|
34
|
+
i(
|
|
35
|
+
"update:coordinates",
|
|
36
|
+
new H(se(e.instance).referenceCrs, n.value, s.value, o.value)
|
|
37
|
+
);
|
|
38
|
+
}, r = () => {
|
|
39
|
+
const y = se(e.instance);
|
|
40
|
+
d.value = !0;
|
|
41
|
+
const x = (G) => {
|
|
42
|
+
var B, N, O, ne;
|
|
43
|
+
const S = (N = (B = l.getFirstFeatureAt(y, G)) == null ? void 0 : B.at(0)) == null ? void 0 : N.point;
|
|
44
|
+
S && (n.value = S.x, s.value = S.y, o.value = S.z, (O = e.cursorManager) == null || O.setCursor("location"), (ne = e.cursorManager) == null || ne.setCursorLocation(S));
|
|
45
|
+
}, E = (G) => {
|
|
46
|
+
var B, N, O;
|
|
47
|
+
(B = e.cursorManager) == null || B.setCursor(null), y.domElement.removeEventListener("click", E), y.domElement.removeEventListener("mousemove", x), d.value = !1;
|
|
48
|
+
const S = (O = (N = l.getFirstFeatureAt(y, G)) == null ? void 0 : N.at(0)) == null ? void 0 : O.point;
|
|
49
|
+
S && (n.value = S.x, s.value = S.y, o.value = S.z, p());
|
|
50
|
+
};
|
|
51
|
+
y.domElement.addEventListener("mousemove", x), y.domElement.addEventListener("click", E);
|
|
52
|
+
};
|
|
53
|
+
function u(y) {
|
|
54
|
+
n.value = y, p();
|
|
55
|
+
}
|
|
56
|
+
function h(y) {
|
|
57
|
+
s.value = y, p();
|
|
58
|
+
}
|
|
59
|
+
function f(y) {
|
|
60
|
+
o.value = y, p();
|
|
61
|
+
}
|
|
62
|
+
return (y, x) => (v(), P("div", ut, [
|
|
63
|
+
m("label", dt, pe(e.label), 1),
|
|
64
|
+
m("div", pt, [
|
|
65
|
+
m("input", {
|
|
66
|
+
type: "number",
|
|
67
|
+
class: "form-control",
|
|
68
|
+
id: "plane-center-x",
|
|
69
|
+
value: n.value.toFixed(2),
|
|
70
|
+
onInput: x[0] || (x[0] = (E) => u(Number.parseFloat(E.target.value)))
|
|
71
|
+
}, null, 40, ht),
|
|
72
|
+
m("input", {
|
|
73
|
+
type: "number",
|
|
74
|
+
class: "form-control",
|
|
75
|
+
id: "plane-center-y",
|
|
76
|
+
value: s.value.toFixed(2),
|
|
77
|
+
onInput: x[1] || (x[1] = (E) => h(Number.parseFloat(E.target.value)))
|
|
78
|
+
}, null, 40, mt),
|
|
79
|
+
e.showZ === !0 ? (v(), P("input", {
|
|
80
|
+
key: 0,
|
|
81
|
+
type: "number",
|
|
82
|
+
class: "form-control",
|
|
83
|
+
id: "plane-center-z",
|
|
84
|
+
value: o.value.toFixed(2),
|
|
85
|
+
onInput: x[2] || (x[2] = (E) => f(Number.parseFloat(E.target.value)))
|
|
86
|
+
}, null, 40, ft)) : L("", !0),
|
|
87
|
+
e.instance != null ? (v(), V(Ie, {
|
|
88
|
+
key: 1,
|
|
89
|
+
title: "Pick point in scene",
|
|
90
|
+
icon: "fg-location",
|
|
91
|
+
disabled: d.value,
|
|
92
|
+
onClick: r,
|
|
93
|
+
class: "btn-primary"
|
|
94
|
+
}, null, 8, ["disabled"])) : L("", !0)
|
|
95
|
+
])
|
|
96
|
+
]));
|
|
97
|
+
}
|
|
98
|
+
}), ye = me("crossSection", () => {
|
|
99
|
+
const a = I(0), t = Z(), e = Z(), n = I(new F(0, 0, 0)), s = I(!1), o = I(!1);
|
|
100
|
+
function i(h) {
|
|
101
|
+
s.value = h;
|
|
102
|
+
}
|
|
103
|
+
function l(h) {
|
|
104
|
+
a.value = h;
|
|
105
|
+
}
|
|
106
|
+
function d(h) {
|
|
107
|
+
n.value = h;
|
|
108
|
+
}
|
|
109
|
+
function p(h) {
|
|
110
|
+
o.value = h;
|
|
111
|
+
}
|
|
112
|
+
function r(h) {
|
|
113
|
+
t.value = h;
|
|
114
|
+
}
|
|
115
|
+
function u(h) {
|
|
116
|
+
e.value = h;
|
|
31
117
|
}
|
|
32
118
|
return {
|
|
33
|
-
center:
|
|
34
|
-
|
|
119
|
+
center: n,
|
|
120
|
+
cursorManager: e,
|
|
121
|
+
enable: s,
|
|
122
|
+
instance: t,
|
|
35
123
|
orientation: a,
|
|
36
|
-
setCenter:
|
|
37
|
-
|
|
38
|
-
|
|
124
|
+
setCenter: d,
|
|
125
|
+
setCursorManager: u,
|
|
126
|
+
setEnabled: i,
|
|
127
|
+
setInstance: r,
|
|
128
|
+
setOrientation: l,
|
|
129
|
+
setShowHelper: p,
|
|
130
|
+
showHelper: o
|
|
39
131
|
};
|
|
40
|
-
}),
|
|
132
|
+
}), yt = { class: "input-group" }, bt = { class: "input-group" }, vt = { class: "input-group my-3" }, _t = ["value"], wt = { class: "input-group mb-3" }, Ct = ["value"], xt = /* @__PURE__ */ D({
|
|
41
133
|
__name: "CrossSection",
|
|
42
134
|
setup(a) {
|
|
43
|
-
const t =
|
|
44
|
-
function e(
|
|
45
|
-
t.setOrientation(
|
|
135
|
+
const t = ye();
|
|
136
|
+
function e(s) {
|
|
137
|
+
t.setOrientation(s);
|
|
46
138
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return (i, s) => (k(), D("div", null, [
|
|
56
|
-
x("div", mt, [
|
|
57
|
-
N(ue, {
|
|
58
|
-
"model-value": B(t).enable,
|
|
59
|
-
"onUpdate:modelValue": s[0] || (s[0] = (l) => B(t).setEnabled(l)),
|
|
139
|
+
const n = (s) => {
|
|
140
|
+
t.setCenter(s.toVector3());
|
|
141
|
+
};
|
|
142
|
+
return (s, o) => (v(), P(Y, null, [
|
|
143
|
+
m("div", yt, [
|
|
144
|
+
T(q, {
|
|
145
|
+
"model-value": b(t).enable,
|
|
146
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => b(t).setEnabled(i)),
|
|
60
147
|
id: "cross-section-enable",
|
|
61
|
-
title: "
|
|
148
|
+
title: "Enable cross-section"
|
|
62
149
|
}, null, 8, ["model-value"]),
|
|
63
|
-
|
|
150
|
+
o[4] || (o[4] = m("label", {
|
|
64
151
|
for: "cross-section-enable",
|
|
65
|
-
class: "form-label"
|
|
152
|
+
class: "form-check-label"
|
|
66
153
|
}, "Enable cross section", -1))
|
|
67
154
|
]),
|
|
68
|
-
|
|
69
|
-
|
|
155
|
+
m("div", bt, [
|
|
156
|
+
T(q, {
|
|
157
|
+
"model-value": b(t).showHelper,
|
|
158
|
+
"onUpdate:modelValue": o[1] || (o[1] = (i) => b(t).setShowHelper(i)),
|
|
159
|
+
id: "cross-section-helper-enable",
|
|
160
|
+
title: "Show plane helper"
|
|
161
|
+
}, null, 8, ["model-value"]),
|
|
162
|
+
o[5] || (o[5] = m("label", {
|
|
163
|
+
for: "cross-section-helper-enable",
|
|
164
|
+
class: "form-check-label"
|
|
165
|
+
}, "Show plane helper", -1))
|
|
166
|
+
]),
|
|
167
|
+
m("div", vt, [
|
|
168
|
+
o[6] || (o[6] = m("label", {
|
|
70
169
|
for: "plane-orientation-range",
|
|
71
|
-
class: "form-label"
|
|
170
|
+
class: "form-check-label"
|
|
72
171
|
}, "Plane orientation (0-360°)", -1)),
|
|
73
|
-
|
|
172
|
+
m("input", {
|
|
74
173
|
id: "plane-orientation-range",
|
|
75
174
|
title: "Altitude",
|
|
76
175
|
type: "range",
|
|
@@ -78,95 +177,116 @@ const _e = ye("crossSection", () => {
|
|
|
78
177
|
min: "0",
|
|
79
178
|
step: "0.1",
|
|
80
179
|
max: "360",
|
|
81
|
-
value:
|
|
82
|
-
onInput:
|
|
83
|
-
}, null, 40,
|
|
180
|
+
value: b(t).orientation,
|
|
181
|
+
onInput: o[2] || (o[2] = (i) => e(Number.parseFloat(i.target.value)))
|
|
182
|
+
}, null, 40, _t)
|
|
84
183
|
]),
|
|
85
|
-
|
|
86
|
-
|
|
184
|
+
m("div", wt, [
|
|
185
|
+
m("input", {
|
|
87
186
|
type: "number",
|
|
88
187
|
class: "form-control",
|
|
89
188
|
id: "plane-orientation-number",
|
|
90
189
|
step: "0.1",
|
|
91
|
-
value:
|
|
92
|
-
onInput:
|
|
93
|
-
}, null, 40,
|
|
190
|
+
value: b(t).orientation,
|
|
191
|
+
onInput: o[3] || (o[3] = (i) => e(Number.parseFloat(i.target.value)))
|
|
192
|
+
}, null, 40, Ct)
|
|
94
193
|
]),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}, null, 40, _t),
|
|
106
|
-
x("input", {
|
|
107
|
-
type: "number",
|
|
108
|
-
class: "form-control",
|
|
109
|
-
id: "plane-center-y",
|
|
110
|
-
value: B(t).center.y,
|
|
111
|
-
onInput: s[4] || (s[4] = (l) => o(Number.parseFloat(l.target.value)))
|
|
112
|
-
}, null, 40, wt)
|
|
113
|
-
])
|
|
114
|
-
])
|
|
115
|
-
]));
|
|
194
|
+
o[7] || (o[7] = m("hr", null, null, -1)),
|
|
195
|
+
b(t).instance != null ? (v(), V(gt, {
|
|
196
|
+
key: 0,
|
|
197
|
+
label: "Center",
|
|
198
|
+
"initial-value": b(t).center,
|
|
199
|
+
instance: b(t).instance,
|
|
200
|
+
"cursor-manager": b(t).cursorManager,
|
|
201
|
+
"onUpdate:coordinates": n
|
|
202
|
+
}, null, 8, ["initial-value", "instance", "cursor-manager"])) : L("", !0)
|
|
203
|
+
], 64));
|
|
116
204
|
}
|
|
117
205
|
});
|
|
118
|
-
class
|
|
206
|
+
class It extends Ee {
|
|
207
|
+
constructor() {
|
|
208
|
+
super();
|
|
209
|
+
const t = new K(
|
|
210
|
+
new ce(50, 100, 1, 10),
|
|
211
|
+
new R({
|
|
212
|
+
color: "#6bf904",
|
|
213
|
+
depthTest: !1,
|
|
214
|
+
depthWrite: !1,
|
|
215
|
+
wireframe: !0
|
|
216
|
+
})
|
|
217
|
+
), e = new Se(new F(0, 1, 0), new F(0, 0, 0), 200);
|
|
218
|
+
t.renderOrder = 999, t.rotateY(Math.PI / 2), this.add(t), this.add(e), this.updateMatrixWorld(!0);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
class Pt {
|
|
119
222
|
constructor(t) {
|
|
120
|
-
|
|
223
|
+
c(this, "_clippingPlanes", null);
|
|
224
|
+
c(this, "_helper");
|
|
225
|
+
c(this, "_instance");
|
|
226
|
+
c(this, "_store", ye());
|
|
121
227
|
this.context = t, t.events.addEventListener("ready", () => {
|
|
228
|
+
this._instance = t.view.getInstance();
|
|
122
229
|
const e = t.configuration.default_crs, n = t.configuration.analysis.cross_section;
|
|
123
|
-
this._store.setOrientation(n.orientation);
|
|
124
|
-
const
|
|
230
|
+
this._store.setCursorManager(t.view.getSceneCursorManager()), this._store.setInstance(t.view.getInstance()), this._store.setOrientation(n.orientation);
|
|
231
|
+
const s = n.pivot, o = new H(s.crs ?? e, s.x, s.y, 0).as(
|
|
125
232
|
e
|
|
126
233
|
);
|
|
127
|
-
this._store.setCenter(
|
|
128
|
-
|
|
234
|
+
this._store.setCenter(o.toVector3()), this._instance.addEventListener("entity-added", this.updateCrossSection.bind(this)), this._store.$onAction(({ after: i, name: l }) => {
|
|
235
|
+
i(() => {
|
|
129
236
|
switch (l) {
|
|
130
237
|
case "setCenter":
|
|
131
238
|
case "setEnabled":
|
|
132
239
|
case "setOrientation":
|
|
133
|
-
|
|
240
|
+
case "setShowHelper":
|
|
241
|
+
this.updateCrossSection(), this.updateHelper(), this.showHelper(this._store.showHelper);
|
|
134
242
|
break;
|
|
135
243
|
}
|
|
136
244
|
});
|
|
137
|
-
}), this.updateCrossSection();
|
|
245
|
+
}), this.updateCrossSection(), this.updateHelper(), this.showHelper(this._store.showHelper);
|
|
138
246
|
});
|
|
139
247
|
}
|
|
140
248
|
dispose() {
|
|
141
249
|
}
|
|
250
|
+
createHelperIfNecessary() {
|
|
251
|
+
this._store.showHelper && this._helper == null && this._instance && (this._helper = new It(), this._instance.add(this._helper).catch(console.error));
|
|
252
|
+
}
|
|
253
|
+
showHelper(t) {
|
|
254
|
+
this.createHelperIfNecessary(), this._helper && (this._helper.visible = t), this.updateHelper();
|
|
255
|
+
}
|
|
142
256
|
updateCrossSection() {
|
|
143
|
-
const t = [];
|
|
144
257
|
if (this._store.enable) {
|
|
145
|
-
const
|
|
146
|
-
t.push(
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
258
|
+
const t = [], e = J.DEG2RAD * this._store.orientation, n = Math.cos(e), s = Math.sin(e), o = new F(n, s, 0), i = new oe(o, 0).distanceToPoint(this._store.center), l = new oe(o, -i);
|
|
259
|
+
t.push(l), this._clippingPlanes = t;
|
|
260
|
+
} else
|
|
261
|
+
this._clippingPlanes = null;
|
|
262
|
+
this.updateEntities();
|
|
263
|
+
}
|
|
264
|
+
updateEntities() {
|
|
265
|
+
const t = this.context.view.getInstance();
|
|
266
|
+
for (const e of t.getEntities())
|
|
267
|
+
ge(e) && (e.clippingPlanes = this._clippingPlanes);
|
|
268
|
+
t.notifyChange();
|
|
269
|
+
}
|
|
270
|
+
updateHelper() {
|
|
271
|
+
var t, e, n, s;
|
|
272
|
+
this.createHelperIfNecessary(), (t = this._helper) == null || t.position.copy(this._store.center), (e = this._helper) == null || e.updateMatrixWorld(!0), (n = this._helper) == null || n.setRotationFromAxisAngle(
|
|
273
|
+
new F(0, 0, 1),
|
|
274
|
+
J.degToRad(this._store.orientation)
|
|
275
|
+
), (s = this._instance) == null || s.notifyChange();
|
|
156
276
|
}
|
|
157
277
|
}
|
|
158
|
-
class
|
|
278
|
+
class Bn {
|
|
159
279
|
constructor() {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
280
|
+
c(this, "id", "builtin-cross-section-analysis");
|
|
281
|
+
c(this, "name", "Cross section");
|
|
282
|
+
c(this, "_manager", null);
|
|
163
283
|
}
|
|
164
284
|
initialize(t) {
|
|
165
285
|
t.analysis.registerTool({
|
|
166
286
|
component: xt,
|
|
167
287
|
icon: "bi-circle-half",
|
|
168
288
|
name: "Cross section"
|
|
169
|
-
}), this._manager = new
|
|
289
|
+
}), this._manager = new Pt(t);
|
|
170
290
|
}
|
|
171
291
|
}
|
|
172
292
|
function Q(a) {
|
|
@@ -175,20 +295,20 @@ function Q(a) {
|
|
|
175
295
|
if ("source" in a.config && typeof a.config.source == "object" && "url" in a.config.source && typeof a.config.source.url == "string")
|
|
176
296
|
return a.config.source.url;
|
|
177
297
|
}
|
|
178
|
-
function
|
|
298
|
+
function Et(a) {
|
|
179
299
|
return Q(a) != null;
|
|
180
300
|
}
|
|
181
301
|
class Nn {
|
|
182
302
|
constructor() {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
303
|
+
c(this, "id", "builtin-download-dataset");
|
|
304
|
+
c(this, "name", "Download dataset");
|
|
305
|
+
c(this, "_context", null);
|
|
186
306
|
}
|
|
187
307
|
initialize(t) {
|
|
188
308
|
this._context = t, t.datasets.registerDatasetAction({
|
|
189
309
|
action: this.download.bind(this),
|
|
190
310
|
icon: "bi-download",
|
|
191
|
-
predicate:
|
|
311
|
+
predicate: Et,
|
|
192
312
|
title: "Download dataset"
|
|
193
313
|
});
|
|
194
314
|
}
|
|
@@ -198,20 +318,20 @@ class Nn {
|
|
|
198
318
|
console.warn("invalid");
|
|
199
319
|
return;
|
|
200
320
|
}
|
|
201
|
-
const n = this._context,
|
|
202
|
-
console.info(`download ${Q(t)}`),
|
|
203
|
-
if (!
|
|
204
|
-
throw new Error(`${
|
|
205
|
-
return
|
|
206
|
-
}).then((
|
|
207
|
-
Te.downloadBlob(
|
|
321
|
+
const n = this._context, s = new URL(e).pathname.split("/"), o = s[s.length - 1];
|
|
322
|
+
console.info(`download ${Q(t)}`), k.fetch(e).then((i) => {
|
|
323
|
+
if (!i.ok)
|
|
324
|
+
throw new Error(`${i.status} ${i.statusText}`);
|
|
325
|
+
return i.blob();
|
|
326
|
+
}).then((i) => {
|
|
327
|
+
Te.downloadBlob(i, o), n.notifications.pushNotification({
|
|
208
328
|
level: "success",
|
|
209
|
-
text:
|
|
329
|
+
text: o,
|
|
210
330
|
title: "Download successful"
|
|
211
331
|
});
|
|
212
|
-
}).catch((
|
|
213
|
-
console.error(
|
|
214
|
-
const l =
|
|
332
|
+
}).catch((i) => {
|
|
333
|
+
console.error(i);
|
|
334
|
+
const l = i instanceof Error ? i.message : "Download failed";
|
|
215
335
|
n.notifications.pushNotification({
|
|
216
336
|
level: "error",
|
|
217
337
|
text: l,
|
|
@@ -220,44 +340,44 @@ class Nn {
|
|
|
220
340
|
});
|
|
221
341
|
}
|
|
222
342
|
}
|
|
223
|
-
const
|
|
224
|
-
const a =
|
|
343
|
+
const be = me("floodingPlane", () => {
|
|
344
|
+
const a = I(0), t = I(!1);
|
|
225
345
|
function e() {
|
|
226
346
|
return a.value;
|
|
227
347
|
}
|
|
228
|
-
function n(
|
|
229
|
-
a.value =
|
|
348
|
+
function n(o) {
|
|
349
|
+
a.value = o;
|
|
230
350
|
}
|
|
231
|
-
function o
|
|
232
|
-
t.value =
|
|
351
|
+
function s(o) {
|
|
352
|
+
t.value = o;
|
|
233
353
|
}
|
|
234
|
-
return { enable: t, getHeight: e, setEnabled:
|
|
235
|
-
}),
|
|
354
|
+
return { enable: t, getHeight: e, setEnabled: s, setHeight: n };
|
|
355
|
+
}), St = { class: "input-group mb-3" }, Tt = { class: "input-group mb-3" }, Ft = ["value"], kt = { class: "input-group mb-3" }, Mt = ["value"], Lt = /* @__PURE__ */ D({
|
|
236
356
|
__name: "FloodingPlane",
|
|
237
357
|
setup(a) {
|
|
238
|
-
const t =
|
|
358
|
+
const t = be();
|
|
239
359
|
function e(n) {
|
|
240
360
|
t.setHeight(n);
|
|
241
361
|
}
|
|
242
|
-
return (n,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
"model-value":
|
|
246
|
-
"onUpdate:modelValue":
|
|
362
|
+
return (n, s) => (v(), P(Y, null, [
|
|
363
|
+
m("div", St, [
|
|
364
|
+
T(q, {
|
|
365
|
+
"model-value": b(t).enable,
|
|
366
|
+
"onUpdate:modelValue": s[0] || (s[0] = (o) => b(t).setEnabled(o)),
|
|
247
367
|
id: "flooding-plane-enable",
|
|
248
368
|
title: "foo"
|
|
249
369
|
}, null, 8, ["model-value"]),
|
|
250
|
-
|
|
370
|
+
s[3] || (s[3] = m("label", {
|
|
251
371
|
for: "flooding-plane-enable",
|
|
252
372
|
class: "form-label"
|
|
253
373
|
}, "Enable flooding plane", -1))
|
|
254
374
|
]),
|
|
255
|
-
|
|
256
|
-
|
|
375
|
+
m("div", Tt, [
|
|
376
|
+
s[5] || (s[5] = m("label", {
|
|
257
377
|
for: "flooding-altitude-range",
|
|
258
378
|
class: "form-label"
|
|
259
379
|
}, "Altitude", -1)),
|
|
260
|
-
|
|
380
|
+
m("input", {
|
|
261
381
|
id: "flooding-altitude-range",
|
|
262
382
|
title: "Altitude",
|
|
263
383
|
type: "range",
|
|
@@ -265,31 +385,31 @@ const we = ye("floodingPlane", () => {
|
|
|
265
385
|
min: "0",
|
|
266
386
|
step: "0.1",
|
|
267
387
|
max: "500",
|
|
268
|
-
value:
|
|
269
|
-
onInput:
|
|
270
|
-
}, null, 40,
|
|
271
|
-
|
|
272
|
-
|
|
388
|
+
value: b(t).getHeight(),
|
|
389
|
+
onInput: s[1] || (s[1] = (o) => e(Number.parseFloat(o.target.value)))
|
|
390
|
+
}, null, 40, Ft),
|
|
391
|
+
m("div", kt, [
|
|
392
|
+
m("input", {
|
|
273
393
|
type: "number",
|
|
274
394
|
class: "form-control",
|
|
275
395
|
id: "flooding-altitude-number",
|
|
276
396
|
step: "0.1",
|
|
277
|
-
value:
|
|
278
|
-
onInput:
|
|
279
|
-
}, null, 40,
|
|
280
|
-
|
|
397
|
+
value: b(t).getHeight(),
|
|
398
|
+
onInput: s[2] || (s[2] = (o) => e(Number.parseFloat(o.target.value)))
|
|
399
|
+
}, null, 40, Mt),
|
|
400
|
+
s[4] || (s[4] = m("span", { class: "input-group-text" }, "m", -1))
|
|
281
401
|
])
|
|
282
402
|
])
|
|
283
403
|
], 64));
|
|
284
404
|
}
|
|
285
405
|
});
|
|
286
|
-
class
|
|
406
|
+
class Dt {
|
|
287
407
|
constructor() {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.geometry = new
|
|
408
|
+
c(this, "geometry");
|
|
409
|
+
c(this, "material");
|
|
410
|
+
c(this, "object3D");
|
|
411
|
+
c(this, "_height");
|
|
412
|
+
this.geometry = new ce(1, 1, 1, 1), this.material = new R({ color: 43690, opacity: 0.5, transparent: !0 }), this.object3D = new K(this.geometry, this.material), this.object3D.renderOrder = 2, this.visible = !1, this._height = 0;
|
|
293
413
|
}
|
|
294
414
|
set height(t) {
|
|
295
415
|
this._height = t;
|
|
@@ -306,15 +426,15 @@ class Bt {
|
|
|
306
426
|
dispose() {
|
|
307
427
|
this.object3D.removeFromParent(), this.geometry.dispose(), this.material.dispose();
|
|
308
428
|
}
|
|
309
|
-
setPosition(t, e, n,
|
|
310
|
-
this.object3D.scale.set(
|
|
429
|
+
setPosition(t, e, n, s, o) {
|
|
430
|
+
this.object3D.scale.set(s, o, 1), this.object3D.position.set(t, e, n), this.object3D.updateMatrixWorld();
|
|
311
431
|
}
|
|
312
432
|
}
|
|
313
|
-
class
|
|
433
|
+
class Bt {
|
|
314
434
|
constructor(t) {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
435
|
+
c(this, "_context");
|
|
436
|
+
c(this, "_plane");
|
|
437
|
+
c(this, "_store", be());
|
|
318
438
|
this._context = t, this._plane = null, t.events.addEventListener("ready", () => {
|
|
319
439
|
this._store.$onAction(({ after: e, name: n }) => {
|
|
320
440
|
e(() => {
|
|
@@ -334,142 +454,142 @@ class Lt {
|
|
|
334
454
|
this._plane && (this._context.view.getInstance().remove(this._plane.object3D), this._plane.dispose());
|
|
335
455
|
}
|
|
336
456
|
async updatePlane() {
|
|
337
|
-
this._plane || (this._plane = new
|
|
338
|
-
const t = this._context.view.getBoundingBox(), e = t.getCenter(new
|
|
457
|
+
this._plane || (this._plane = new Dt(), await this._context.view.getInstance().add(this._plane.object3D));
|
|
458
|
+
const t = this._context.view.getBoundingBox(), e = t.getCenter(new F()), n = t.getSize(new F());
|
|
339
459
|
this._plane.visible = this._store.enable, this._plane.setPosition(e.x, e.y, this._store.getHeight(), n.x, n.y), this._context.view.getInstance().notifyChange();
|
|
340
460
|
}
|
|
341
461
|
}
|
|
342
|
-
class
|
|
462
|
+
class On {
|
|
343
463
|
constructor() {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
464
|
+
c(this, "id", "builtin-flooding-plane-analysis");
|
|
465
|
+
c(this, "name", "Flooding plane");
|
|
466
|
+
c(this, "_manager", null);
|
|
347
467
|
}
|
|
348
468
|
initialize(t) {
|
|
349
469
|
t.analysis.registerTool({
|
|
350
|
-
component:
|
|
470
|
+
component: Lt,
|
|
351
471
|
icon: "bi-layers-half",
|
|
352
472
|
name: "Flooding plane"
|
|
353
|
-
}), this._manager = new
|
|
473
|
+
}), this._manager = new Bt(t);
|
|
354
474
|
}
|
|
355
475
|
}
|
|
356
|
-
const
|
|
357
|
-
class
|
|
476
|
+
const Nt = /^(\d+\.\d+)\s*,\s*(\d+\.\d+)$/;
|
|
477
|
+
class Ot {
|
|
358
478
|
constructor() {
|
|
359
|
-
|
|
479
|
+
c(this, "name", "Go to coordinates");
|
|
360
480
|
}
|
|
361
481
|
search(t) {
|
|
362
|
-
const e =
|
|
482
|
+
const e = Nt.exec(t);
|
|
363
483
|
if (e) {
|
|
364
|
-
const n = Number.parseFloat(e[1]),
|
|
365
|
-
coordinates:
|
|
366
|
-
label: `${n.toFixed(6)}, ${
|
|
484
|
+
const n = Number.parseFloat(e[1]), s = Number.parseFloat(e[2]), i = {
|
|
485
|
+
coordinates: H.WGS84(n, s),
|
|
486
|
+
label: `${n.toFixed(6)}, ${s.toFixed(6)}`,
|
|
367
487
|
provider: this
|
|
368
488
|
};
|
|
369
|
-
return Promise.resolve([
|
|
489
|
+
return Promise.resolve([i]);
|
|
370
490
|
} else
|
|
371
491
|
return Promise.resolve([]);
|
|
372
492
|
}
|
|
373
493
|
}
|
|
374
|
-
class
|
|
494
|
+
class An {
|
|
375
495
|
constructor() {
|
|
376
|
-
|
|
377
|
-
|
|
496
|
+
c(this, "id", "builtin-coordinates-search");
|
|
497
|
+
c(this, "name", "Coordinates search");
|
|
378
498
|
}
|
|
379
499
|
initialize(t) {
|
|
380
|
-
t.search.registerProvider(new
|
|
500
|
+
t.search.registerProvider(new Ot());
|
|
381
501
|
}
|
|
382
502
|
}
|
|
383
|
-
const
|
|
384
|
-
class
|
|
503
|
+
const At = /[a-z]{3}/;
|
|
504
|
+
class zt {
|
|
385
505
|
constructor() {
|
|
386
|
-
|
|
506
|
+
c(this, "name", "Base adresse nationale (BAN)");
|
|
387
507
|
}
|
|
388
508
|
async search(t) {
|
|
389
|
-
if (!
|
|
509
|
+
if (!At.test(t))
|
|
390
510
|
return [];
|
|
391
511
|
try {
|
|
392
|
-
const n = (await
|
|
512
|
+
const n = (await k.fetchJson(
|
|
393
513
|
`https://api-adresse.data.gouv.fr/search/?q=${t}`
|
|
394
|
-
)).features.map((
|
|
395
|
-
const
|
|
514
|
+
)).features.map((s) => {
|
|
515
|
+
const o = s.properties, i = s.geometry, [l, d] = i.coordinates;
|
|
396
516
|
return {
|
|
397
|
-
coordinates: new
|
|
398
|
-
label:
|
|
517
|
+
coordinates: new H("EPSG:4326", l, d, 0),
|
|
518
|
+
label: o.label,
|
|
399
519
|
provider: this
|
|
400
520
|
};
|
|
401
521
|
});
|
|
402
|
-
return await
|
|
522
|
+
return await jt(n.map((s) => s.coordinates)), n;
|
|
403
523
|
} catch (e) {
|
|
404
|
-
if (e instanceof
|
|
524
|
+
if (e instanceof Ue)
|
|
405
525
|
return [];
|
|
406
526
|
throw e;
|
|
407
527
|
}
|
|
408
528
|
}
|
|
409
529
|
}
|
|
410
|
-
async function
|
|
530
|
+
async function jt(a) {
|
|
411
531
|
const t = new URL("https://data.geopf.fr/altimetrie/1.0/calcul/alti/rest/elevation.json");
|
|
412
532
|
t.searchParams.append("lon", a.map((n) => n.longitude).join("|")), t.searchParams.append("lat", a.map((n) => n.latitude).join("|")), t.searchParams.append("zonly", "true"), t.searchParams.append("resource", "ign_rge_alti_wld"), t.searchParams.append("delimiter", "|"), t.searchParams.append("indent", "false");
|
|
413
|
-
const e = await
|
|
533
|
+
const e = await k.fetchJson(t.toString());
|
|
414
534
|
for (let n = 0; n < a.length; n++)
|
|
415
535
|
a[n].setAltitude(e.elevations[n]);
|
|
416
536
|
return e;
|
|
417
537
|
}
|
|
418
|
-
class
|
|
538
|
+
class zn {
|
|
419
539
|
constructor() {
|
|
420
|
-
|
|
421
|
-
|
|
540
|
+
c(this, "id", "builtin-geocoding-ban");
|
|
541
|
+
c(this, "name", "Base adresse nationale");
|
|
422
542
|
}
|
|
423
543
|
initialize(t) {
|
|
424
|
-
t.search.registerProvider(new
|
|
544
|
+
t.search.registerProvider(new zt());
|
|
425
545
|
}
|
|
426
546
|
}
|
|
427
|
-
const
|
|
428
|
-
bbox: new
|
|
547
|
+
const A = new Fe(), $t = {
|
|
548
|
+
bbox: new R({
|
|
429
549
|
color: "#FFFF00",
|
|
430
550
|
depthTest: !0,
|
|
431
551
|
opacity: 0.2,
|
|
432
552
|
transparent: !0
|
|
433
553
|
}),
|
|
434
|
-
selection: new
|
|
554
|
+
selection: new R({
|
|
435
555
|
color: "#FF0000",
|
|
436
556
|
depthTest: !1,
|
|
437
557
|
opacity: 0.6,
|
|
438
558
|
transparent: !0
|
|
439
559
|
})
|
|
440
|
-
},
|
|
560
|
+
}, Ht = 4186316022, Rt = 781010003, Vt = 2655215786, Ut = 3242617779, Yt = 919958153, Gt = 1307041759, ve = 1451395588, _e = 1883228015, Wt = [ve, _e], qt = [
|
|
561
|
+
Ht,
|
|
441
562
|
Rt,
|
|
442
|
-
jt,
|
|
443
563
|
Vt,
|
|
444
564
|
Ut,
|
|
445
|
-
|
|
565
|
+
Yt,
|
|
446
566
|
Gt
|
|
447
|
-
],
|
|
567
|
+
], we = (a) => $(a) && a.isIFCPickResult, z = class z extends fe {
|
|
448
568
|
constructor(e) {
|
|
449
|
-
super(new
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
569
|
+
super(new ue());
|
|
570
|
+
c(this, "isIfcEntity", !0);
|
|
571
|
+
c(this, "isPickableFeatures", !0);
|
|
572
|
+
c(this, "type", "IfcEntity");
|
|
573
|
+
c(this, "_classificationCache");
|
|
574
|
+
c(this, "_components");
|
|
575
|
+
c(this, "_fragmentBoundingBox");
|
|
576
|
+
c(this, "_fragmentClassifier");
|
|
577
|
+
c(this, "_fragmentManager");
|
|
578
|
+
c(this, "_ifcSelection");
|
|
459
579
|
// Currently selected fragments
|
|
460
|
-
|
|
580
|
+
c(this, "_indexMap");
|
|
461
581
|
// Properties relationships
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
this._source = e, this._components = new
|
|
582
|
+
c(this, "_model");
|
|
583
|
+
c(this, "_source");
|
|
584
|
+
this._source = e, this._components = new Ge(), this._components.ui.enabled = !1, this._components.scene = new We(this._components), this._components.renderer = new qe(
|
|
465
585
|
this._components,
|
|
466
586
|
document.createElement("div")
|
|
467
|
-
), this._components.camera = new
|
|
587
|
+
), this._components.camera = new Je(this._components), this._components.raycaster = new Ze(this._components), this._components.init(), this._ifcSelection = { bbox: {}, selection: {} }, this._indexMap = {}, this._classificationCache = null, this._fragmentBoundingBox = null;
|
|
468
588
|
}
|
|
469
589
|
clearHighlight(e = "selection") {
|
|
470
590
|
for (const n of Object.keys(this._ifcSelection[e])) {
|
|
471
|
-
const
|
|
472
|
-
|
|
591
|
+
const s = this._fragmentManager.list[n], o = s == null ? void 0 : s.fragments[e];
|
|
592
|
+
o != null && o.mesh.removeFromParent();
|
|
473
593
|
}
|
|
474
594
|
this.notifyChange(this), this._ifcSelection[e] = {};
|
|
475
595
|
}
|
|
@@ -478,17 +598,17 @@ const V = new Fe(), Ot = {
|
|
|
478
598
|
const n = this._fragmentBoundingBox;
|
|
479
599
|
if (n === null)
|
|
480
600
|
throw new Error("Must call initClassification before getBoundingBoxById");
|
|
481
|
-
const
|
|
601
|
+
const s = this._fragmentManager;
|
|
482
602
|
n.reset();
|
|
483
|
-
const
|
|
484
|
-
if (!Object.keys(
|
|
603
|
+
const o = this._ifcSelection.bbox;
|
|
604
|
+
if (!Object.keys(o).length)
|
|
485
605
|
return;
|
|
486
|
-
for (const
|
|
487
|
-
const
|
|
488
|
-
n.addMesh(
|
|
606
|
+
for (const u of Object.keys(o)) {
|
|
607
|
+
const f = s.list[u].fragments.bbox;
|
|
608
|
+
n.addMesh(f.mesh);
|
|
489
609
|
}
|
|
490
|
-
const
|
|
491
|
-
return
|
|
610
|
+
const i = n.get(), { y: l, z: d } = i.min, { y: p, z: r } = i.max;
|
|
611
|
+
return i.min.y = -r, i.max.y = -d, i.min.z = l, i.max.z = p, i.translate(this._model.position), this.clearHighlight("bbox"), i;
|
|
492
612
|
}
|
|
493
613
|
getClassification() {
|
|
494
614
|
if (this._classificationCache === null)
|
|
@@ -496,44 +616,44 @@ const V = new Fe(), Ot = {
|
|
|
496
616
|
return this._classificationCache;
|
|
497
617
|
}
|
|
498
618
|
getProperties(e) {
|
|
499
|
-
const n = [],
|
|
500
|
-
if (!
|
|
619
|
+
const n = [], s = this._model.properties;
|
|
620
|
+
if (!s)
|
|
501
621
|
return [];
|
|
502
|
-
for (const
|
|
503
|
-
const
|
|
504
|
-
if (
|
|
622
|
+
for (const o of this._indexMap[e]) {
|
|
623
|
+
const i = s[o];
|
|
624
|
+
if (i == null)
|
|
505
625
|
continue;
|
|
506
|
-
const { name: l } =
|
|
626
|
+
const { name: l } = M.getEntityName(s, o);
|
|
507
627
|
if (l !== null) {
|
|
508
|
-
if (
|
|
509
|
-
const
|
|
510
|
-
if (
|
|
511
|
-
for (const
|
|
512
|
-
if (
|
|
628
|
+
if (i.type === ve) {
|
|
629
|
+
const d = M.getPsetProps(s, o);
|
|
630
|
+
if (d !== null)
|
|
631
|
+
for (const p of d) {
|
|
632
|
+
if (s[p] == null)
|
|
513
633
|
continue;
|
|
514
|
-
const
|
|
515
|
-
|
|
634
|
+
const u = this.getProperty(p);
|
|
635
|
+
u !== null && n.push({
|
|
516
636
|
parentName: l,
|
|
517
|
-
...
|
|
637
|
+
...u
|
|
518
638
|
});
|
|
519
639
|
}
|
|
520
|
-
} else if (
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
|
|
640
|
+
} else if (i.type === _e) {
|
|
641
|
+
const d = M.getQsetQuantities(
|
|
642
|
+
s,
|
|
643
|
+
o
|
|
524
644
|
);
|
|
525
|
-
if (
|
|
526
|
-
for (const
|
|
527
|
-
const { key:
|
|
528
|
-
|
|
529
|
-
|
|
645
|
+
if (d !== null)
|
|
646
|
+
for (const p of d) {
|
|
647
|
+
const { key: r } = M.getQuantityValue(
|
|
648
|
+
s,
|
|
649
|
+
p
|
|
530
650
|
);
|
|
531
|
-
if (
|
|
651
|
+
if (r === null)
|
|
532
652
|
continue;
|
|
533
|
-
const
|
|
534
|
-
|
|
653
|
+
const u = this.getProperty(p);
|
|
654
|
+
u !== null && n.push({
|
|
535
655
|
parentName: l,
|
|
536
|
-
...
|
|
656
|
+
...u
|
|
537
657
|
});
|
|
538
658
|
}
|
|
539
659
|
}
|
|
@@ -545,55 +665,55 @@ const V = new Fe(), Ot = {
|
|
|
545
665
|
const n = this._model.properties;
|
|
546
666
|
if (n === void 0)
|
|
547
667
|
return null;
|
|
548
|
-
const { name:
|
|
549
|
-
if (
|
|
668
|
+
const { name: s } = M.getEntityName(n, e);
|
|
669
|
+
if (s === null)
|
|
550
670
|
return null;
|
|
551
|
-
const { value:
|
|
552
|
-
return { name:
|
|
671
|
+
const { value: o } = M.getQuantityValue(n, e);
|
|
672
|
+
return { name: s, value: o };
|
|
553
673
|
}
|
|
554
|
-
highlight(e, n,
|
|
674
|
+
highlight(e, n, s) {
|
|
555
675
|
this._ifcSelection[e][n.uuid] = /* @__PURE__ */ new Set();
|
|
556
|
-
const
|
|
557
|
-
this._ifcSelection[e][n.uuid].add(
|
|
558
|
-
const
|
|
559
|
-
if (
|
|
560
|
-
const l =
|
|
561
|
-
for (let
|
|
562
|
-
const
|
|
563
|
-
|
|
676
|
+
const o = parseInt(s, 10);
|
|
677
|
+
this._ifcSelection[e][n.uuid].add(s), this.addComposites(e, n, o), this.regenerate(e, n.uuid);
|
|
678
|
+
const i = n.fragment.group;
|
|
679
|
+
if (i) {
|
|
680
|
+
const l = i.data[o][0];
|
|
681
|
+
for (let d = 0; d < l.length; d++) {
|
|
682
|
+
const p = l[d], r = i.keyFragments[p], u = this._fragmentManager.list[r];
|
|
683
|
+
r in this._ifcSelection[e] || (this._ifcSelection[e][r] = /* @__PURE__ */ new Set()), this._ifcSelection[e][r].add(s), this.addComposites(e, u.mesh, o), this.regenerate(e, r);
|
|
564
684
|
}
|
|
565
685
|
}
|
|
566
686
|
this.notifyChange(this);
|
|
567
687
|
}
|
|
568
688
|
highlightById(e, n = "selection") {
|
|
569
|
-
for (const
|
|
570
|
-
|
|
571
|
-
const
|
|
572
|
-
for (const l of e[
|
|
573
|
-
this._ifcSelection[n][
|
|
574
|
-
for (const l of
|
|
575
|
-
this.addComposites(n,
|
|
576
|
-
this.regenerate(n,
|
|
689
|
+
for (const s of Object.keys(e)) {
|
|
690
|
+
s in this._ifcSelection[n] || (this._ifcSelection[n][s] = /* @__PURE__ */ new Set());
|
|
691
|
+
const o = this._fragmentManager.list[s], i = /* @__PURE__ */ new Set();
|
|
692
|
+
for (const l of e[s])
|
|
693
|
+
this._ifcSelection[n][s].add(l), i.add(parseInt(l, 10));
|
|
694
|
+
for (const l of i)
|
|
695
|
+
this.addComposites(n, o.mesh, l);
|
|
696
|
+
this.regenerate(n, s);
|
|
577
697
|
}
|
|
578
698
|
this.notifyChange(this);
|
|
579
699
|
}
|
|
580
700
|
pick(e, n) {
|
|
581
|
-
return super.pick(e, n).map((
|
|
582
|
-
...
|
|
701
|
+
return super.pick(e, n).map((s) => ({
|
|
702
|
+
...s,
|
|
583
703
|
entity: this,
|
|
584
|
-
features:
|
|
704
|
+
features: s.features,
|
|
585
705
|
isIFCPickResult: !0,
|
|
586
|
-
object:
|
|
706
|
+
object: s.object
|
|
587
707
|
}));
|
|
588
708
|
}
|
|
589
709
|
pickFeaturesFrom(e) {
|
|
590
|
-
var o, i
|
|
710
|
+
var s, o, i;
|
|
591
711
|
const n = e.object;
|
|
592
712
|
if (n.fragment != null && e.instanceId != null && e.face) {
|
|
593
|
-
const l = n.fragment.getVertexBlockID(n.geometry, e.face.a),
|
|
594
|
-
if (
|
|
595
|
-
const
|
|
596
|
-
return e.features =
|
|
713
|
+
const l = n.fragment.getVertexBlockID(n.geometry, e.face.a), d = (s = n.fragment.getItemID(e.instanceId, l)) == null ? void 0 : s.replace(/\..*/, "");
|
|
714
|
+
if (d && ((i = (o = n.fragment.group) == null ? void 0 : o.properties) == null ? void 0 : i[d]) != null) {
|
|
715
|
+
const r = n.fragment.group.properties[d], h = [{ ifcProperties: this.getProperties(d), itemProperties: r }];
|
|
716
|
+
return e.features = h, h;
|
|
597
717
|
}
|
|
598
718
|
}
|
|
599
719
|
return [];
|
|
@@ -606,225 +726,225 @@ const V = new Fe(), Ot = {
|
|
|
606
726
|
]), this._classificationCache.length === 0 && (this._classificationCache = await this.regenerateClassification([
|
|
607
727
|
"entities"
|
|
608
728
|
/* ENTITY */
|
|
609
|
-
])), this._fragmentBoundingBox = await this._components.tools.get(
|
|
729
|
+
])), this._fragmentBoundingBox = await this._components.tools.get(Qe);
|
|
610
730
|
}
|
|
611
731
|
async preprocess() {
|
|
612
|
-
const e = await
|
|
613
|
-
this._fragmentManager = await this._components.tools.get(
|
|
614
|
-
const n = new
|
|
732
|
+
const e = await k.fetchArrayBuffer(this._source.url);
|
|
733
|
+
this._fragmentManager = await this._components.tools.get(Xe), this._fragmentClassifier = await this._components.tools.get(Ke);
|
|
734
|
+
const n = new et(this._components);
|
|
615
735
|
n.settings.webIfc.COORDINATE_TO_ORIGIN = !0, n.settings.webIfc.OPTIMIZE_PROFILES = !0;
|
|
616
|
-
const
|
|
617
|
-
this._model = await n.load(
|
|
618
|
-
const
|
|
736
|
+
const s = new Uint8Array(e);
|
|
737
|
+
this._model = await n.load(s, this._source.name), this._model.rotateX(Math.PI / 2);
|
|
738
|
+
const o = new F();
|
|
619
739
|
if (this._source.at)
|
|
620
|
-
this._source.at.toVector3(
|
|
740
|
+
this._source.at.toVector3(o), this._model.position.copy(o);
|
|
621
741
|
else {
|
|
622
742
|
const l = this._model.coordinationMatrix.clone().invert();
|
|
623
|
-
|
|
743
|
+
o.applyMatrix4(l), this._model.position.set(o.x, -o.z, o.y);
|
|
624
744
|
}
|
|
625
745
|
this._model.updateWorldMatrix(!0, !0), this._model.updateMatrix(), this._model.updateMatrixWorld(!0), this.initializeEntityIndexes(), this._fragmentClassifier.byStorey(this._model), this._fragmentClassifier.byEntity(this._model), await this.initClassification(), this.object3d.add(this._model), this.onObjectCreated(this._model);
|
|
626
|
-
const
|
|
627
|
-
ee(this, { filename:
|
|
746
|
+
const i = k.getContext(this._source.url);
|
|
747
|
+
ee(this, { filename: i.filename }), this.notifyChange(this.object3d);
|
|
628
748
|
}
|
|
629
|
-
addComposites(e, n,
|
|
749
|
+
addComposites(e, n, s) {
|
|
630
750
|
this.addHighlightToFragment(e, n.fragment);
|
|
631
|
-
const
|
|
632
|
-
if (
|
|
633
|
-
for (let
|
|
634
|
-
const l =
|
|
751
|
+
const o = n.fragment.composites[s];
|
|
752
|
+
if (o)
|
|
753
|
+
for (let i = 1; i < o; i++) {
|
|
754
|
+
const l = tt(s, i);
|
|
635
755
|
this._ifcSelection[e][n.uuid].add(l);
|
|
636
756
|
}
|
|
637
757
|
}
|
|
638
758
|
addHighlightToFragment(e, n) {
|
|
639
759
|
if (!(e in n.fragments)) {
|
|
640
|
-
const
|
|
641
|
-
n.blocks.count > 1 && (
|
|
760
|
+
const s = n.addFragment(e, [$t[e]]);
|
|
761
|
+
n.blocks.count > 1 && (s.setInstance(0, {
|
|
642
762
|
ids: Array.from(n.ids),
|
|
643
|
-
transform:
|
|
644
|
-
}),
|
|
763
|
+
transform: A
|
|
764
|
+
}), s.blocks.setVisibility(!1)), this._model.add(s.mesh), s.mesh.renderOrder = 30, s.mesh.frustumCulled = !1, s.mesh.name = e, s.mesh.updateMatrixWorld(!0);
|
|
645
765
|
}
|
|
646
766
|
}
|
|
647
767
|
initializeEntityIndexes() {
|
|
648
768
|
this._indexMap = {};
|
|
649
769
|
const e = this._model.properties;
|
|
650
770
|
if (e !== void 0)
|
|
651
|
-
for (const n of
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
for (const l of
|
|
656
|
-
this.setEntityIndex(l).add(
|
|
771
|
+
for (const n of qt)
|
|
772
|
+
M.getRelationMap(e, n, (s, o) => {
|
|
773
|
+
const i = e[s];
|
|
774
|
+
Wt.includes(i.type) || this.setEntityIndex(s);
|
|
775
|
+
for (const l of o)
|
|
776
|
+
this.setEntityIndex(l).add(s);
|
|
657
777
|
});
|
|
658
778
|
}
|
|
659
779
|
regenerate(e, n) {
|
|
660
780
|
this.updateFragmentFill(e, n);
|
|
661
781
|
}
|
|
662
782
|
async regenerateClassification(e, n = {}) {
|
|
663
|
-
const
|
|
664
|
-
if (
|
|
665
|
-
return
|
|
666
|
-
for (const
|
|
667
|
-
const
|
|
668
|
-
if (Object.keys(
|
|
669
|
-
const
|
|
783
|
+
const s = this._fragmentClassifier.get(), o = [], i = e[0], l = s[i];
|
|
784
|
+
if (i == null || l == null)
|
|
785
|
+
return o;
|
|
786
|
+
for (const d of Object.keys(l)) {
|
|
787
|
+
const p = { ...n, [i]: [d] }, r = await this._fragmentClassifier.find(p);
|
|
788
|
+
if (Object.keys(r).length > 0) {
|
|
789
|
+
const f = i[0].toUpperCase() + i.slice(1), g = await this.regenerateClassification(
|
|
670
790
|
e.slice(1),
|
|
671
|
-
|
|
791
|
+
p
|
|
672
792
|
);
|
|
673
|
-
|
|
793
|
+
o.push({ children: g, fragments: r, name: d, treeItemName: f });
|
|
674
794
|
}
|
|
675
795
|
}
|
|
676
|
-
return
|
|
796
|
+
return o;
|
|
677
797
|
}
|
|
678
798
|
setEntityIndex(e) {
|
|
679
799
|
return e in this._indexMap || (this._indexMap[e] = /* @__PURE__ */ new Set()), this._indexMap[e];
|
|
680
800
|
}
|
|
681
801
|
updateFragmentFill(e, n) {
|
|
682
|
-
const
|
|
683
|
-
if (
|
|
802
|
+
const s = this._ifcSelection[e][n], o = this._fragmentManager.list[n];
|
|
803
|
+
if (o == null)
|
|
684
804
|
return;
|
|
685
|
-
const
|
|
686
|
-
if (
|
|
805
|
+
const i = o.fragments[e];
|
|
806
|
+
if (i == null)
|
|
687
807
|
return;
|
|
688
|
-
const l =
|
|
808
|
+
const l = o.mesh.parent;
|
|
689
809
|
if (l == null)
|
|
690
810
|
return;
|
|
691
|
-
if (l.add(
|
|
692
|
-
|
|
693
|
-
ids: Array.from(
|
|
694
|
-
transform:
|
|
695
|
-
}),
|
|
811
|
+
if (l.add(i.mesh), i.blocks.count > 1)
|
|
812
|
+
o.getInstance(0, A), i.setInstance(0, {
|
|
813
|
+
ids: Array.from(o.ids),
|
|
814
|
+
transform: A
|
|
815
|
+
}), i.blocks.setVisibility(!0, s, !0);
|
|
696
816
|
else {
|
|
697
|
-
let
|
|
698
|
-
for (const
|
|
699
|
-
|
|
700
|
-
const { instanceID:
|
|
701
|
-
|
|
817
|
+
let p = 0;
|
|
818
|
+
for (const r of s) {
|
|
819
|
+
i.mesh.count = p + 1;
|
|
820
|
+
const { instanceID: u } = o.getInstanceAndBlockID(r);
|
|
821
|
+
o.getInstance(u, A), i.setInstance(p, { ids: [r], transform: A }), p++;
|
|
702
822
|
}
|
|
703
823
|
}
|
|
704
824
|
}
|
|
705
825
|
};
|
|
706
|
-
|
|
707
|
-
let
|
|
708
|
-
class
|
|
826
|
+
c(z, "isIFCEntity", (e) => $(e) && e.isIfcEntity), c(z, "isIFCPickResult", (e) => $(e) && z.isIFCEntity(e.entity));
|
|
827
|
+
let X = z;
|
|
828
|
+
class Jt extends st {
|
|
709
829
|
constructor(t, e, n) {
|
|
710
830
|
super(t, e, n, { visibility: !0 });
|
|
711
831
|
}
|
|
712
832
|
}
|
|
713
|
-
const
|
|
833
|
+
const Zt = { class: "d-flex" }, Qt = ["title"], Xt = ["id"], Kt = { class: "list-unstyled border-start" }, en = /* @__PURE__ */ D({
|
|
714
834
|
__name: "IfcSubtree",
|
|
715
835
|
props: {
|
|
716
836
|
classificationElement: {},
|
|
717
837
|
ifcEntity: {}
|
|
718
838
|
},
|
|
719
839
|
setup(a) {
|
|
720
|
-
const t = a, e =
|
|
721
|
-
function
|
|
840
|
+
const t = a, e = J.generateUUID(), n = `#${e}`, s = I(!1), o = ke(), l = Me().getModule(Le);
|
|
841
|
+
function d() {
|
|
722
842
|
if (l == null) {
|
|
723
843
|
console.warn("Cannot clip IFC element, ClippingBoxAnalysis module is not present");
|
|
724
844
|
return;
|
|
725
845
|
}
|
|
726
|
-
const
|
|
727
|
-
|
|
846
|
+
const u = t.ifcEntity.getBoundingBoxById(t.classificationElement.fragments);
|
|
847
|
+
u && !u.isEmpty() && l.setClippingBox(u);
|
|
728
848
|
}
|
|
729
|
-
function
|
|
730
|
-
|
|
849
|
+
function p() {
|
|
850
|
+
s.value = !0, t.ifcEntity.clearHighlight(), t.ifcEntity.highlightById(t.classificationElement.fragments), setTimeout(() => s.value = !1, 2e3);
|
|
731
851
|
}
|
|
732
|
-
function
|
|
733
|
-
const
|
|
734
|
-
|
|
852
|
+
function r() {
|
|
853
|
+
const u = t.ifcEntity.getBoundingBoxById(t.classificationElement.fragments);
|
|
854
|
+
u && !u.isEmpty() && o.lookTopDownAt(u);
|
|
735
855
|
}
|
|
736
|
-
return (
|
|
737
|
-
const
|
|
738
|
-
return
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
class:
|
|
856
|
+
return (u, h) => {
|
|
857
|
+
const f = He("IfcSubtree", !0);
|
|
858
|
+
return v(), P("div", null, [
|
|
859
|
+
m("div", Zt, [
|
|
860
|
+
m("span", {
|
|
861
|
+
class: ae([
|
|
742
862
|
"border rounded px-1 py-0 fw-normal",
|
|
743
|
-
|
|
863
|
+
s.value ? "text-danger border-danger" : "text-secondary border-secondary"
|
|
744
864
|
]),
|
|
745
|
-
title:
|
|
746
|
-
},
|
|
747
|
-
|
|
748
|
-
default:
|
|
749
|
-
|
|
865
|
+
title: u.classificationElement.treeItemName
|
|
866
|
+
}, pe(u.classificationElement.treeItemName), 11, Qt),
|
|
867
|
+
u.classificationElement.children.length > 0 ? (v(), V(ie, { key: 0 }, {
|
|
868
|
+
default: re(() => [
|
|
869
|
+
T(W, {
|
|
750
870
|
title: "Expand group",
|
|
751
871
|
icon: "bi-chevron-down",
|
|
752
872
|
"data-bs-toggle": "collapse",
|
|
753
873
|
"data-bs-target": n,
|
|
754
|
-
"aria-controls":
|
|
874
|
+
"aria-controls": b(e),
|
|
755
875
|
"aria-expanded": "true"
|
|
756
876
|
}, null, 8, ["aria-controls"])
|
|
757
877
|
]),
|
|
758
878
|
_: 1
|
|
759
|
-
})) :
|
|
760
|
-
|
|
761
|
-
class:
|
|
762
|
-
text:
|
|
763
|
-
title: `Zoom to ${
|
|
764
|
-
onClick:
|
|
879
|
+
})) : L("", !0),
|
|
880
|
+
T(De, {
|
|
881
|
+
class: ae(["label", s.value ? "text-danger-emphasis" : "text-muted"]),
|
|
882
|
+
text: u.classificationElement.name,
|
|
883
|
+
title: `Zoom to ${u.classificationElement.name}`,
|
|
884
|
+
onClick: r
|
|
765
885
|
}, null, 8, ["class", "text", "title"]),
|
|
766
|
-
|
|
767
|
-
default:
|
|
768
|
-
|
|
886
|
+
T(ie, { class: "ms-1" }, {
|
|
887
|
+
default: re(() => [
|
|
888
|
+
T(W, {
|
|
769
889
|
title: "Highlight",
|
|
770
890
|
icon: "bi-highlighter",
|
|
771
|
-
onClick:
|
|
891
|
+
onClick: p
|
|
772
892
|
}),
|
|
773
|
-
|
|
893
|
+
b(l) != null ? (v(), V(W, {
|
|
774
894
|
key: 0,
|
|
775
895
|
title: "Clip to",
|
|
776
896
|
icon: "bi-bounding-box",
|
|
777
|
-
onClick:
|
|
778
|
-
})) :
|
|
897
|
+
onClick: d
|
|
898
|
+
})) : L("", !0)
|
|
779
899
|
]),
|
|
780
900
|
_: 1
|
|
781
901
|
})
|
|
782
902
|
]),
|
|
783
|
-
|
|
903
|
+
u.classificationElement.children.length > 0 ? (v(), P("div", {
|
|
784
904
|
key: 0,
|
|
785
|
-
id:
|
|
905
|
+
id: b(e),
|
|
786
906
|
class: "collapse show"
|
|
787
907
|
}, [
|
|
788
|
-
|
|
789
|
-
(
|
|
790
|
-
|
|
908
|
+
m("ul", Kt, [
|
|
909
|
+
(v(!0), P(Y, null, he(u.classificationElement.children, (g, C) => (v(), P("li", { key: C }, [
|
|
910
|
+
T(f, {
|
|
791
911
|
"ifc-entity": t.ifcEntity,
|
|
792
|
-
"classification-element":
|
|
912
|
+
"classification-element": g
|
|
793
913
|
}, null, 8, ["ifc-entity", "classification-element"])
|
|
794
914
|
]))), 128))
|
|
795
915
|
])
|
|
796
|
-
], 8,
|
|
916
|
+
], 8, Xt)) : L("", !0)
|
|
797
917
|
]);
|
|
798
918
|
};
|
|
799
919
|
}
|
|
800
|
-
}),
|
|
920
|
+
}), tn = /* @__PURE__ */ te(en, [["__scopeId", "data-v-804ca598"]]), nn = { key: 0 }, sn = /* @__PURE__ */ D({
|
|
801
921
|
__name: "IfcPropertyView",
|
|
802
922
|
props: {
|
|
803
923
|
dataset: {}
|
|
804
924
|
},
|
|
805
925
|
setup(a) {
|
|
806
|
-
const t =
|
|
807
|
-
function
|
|
808
|
-
const
|
|
809
|
-
return
|
|
926
|
+
const t = Be(), e = a, n = Ne(e.dataset, "isPreloaded");
|
|
927
|
+
function s() {
|
|
928
|
+
const i = o();
|
|
929
|
+
return i == null ? null : i.getClassification();
|
|
810
930
|
}
|
|
811
|
-
function
|
|
812
|
-
const
|
|
813
|
-
return
|
|
931
|
+
function o() {
|
|
932
|
+
const i = t.getEntity(e.dataset);
|
|
933
|
+
return i ?? null;
|
|
814
934
|
}
|
|
815
|
-
return (
|
|
816
|
-
|
|
817
|
-
(
|
|
818
|
-
|
|
819
|
-
"ifc-entity":
|
|
820
|
-
"classification-element":
|
|
935
|
+
return (i, l) => b(n) ? (v(), P("div", nn, [
|
|
936
|
+
m("ul", null, [
|
|
937
|
+
(v(!0), P(Y, null, he(s(), (d, p) => (v(), P("li", { key: p }, [
|
|
938
|
+
T(tn, {
|
|
939
|
+
"ifc-entity": o(),
|
|
940
|
+
"classification-element": d
|
|
821
941
|
}, null, 8, ["ifc-entity", "classification-element"])
|
|
822
942
|
]))), 128))
|
|
823
943
|
])
|
|
824
|
-
])) :
|
|
944
|
+
])) : L("", !0);
|
|
825
945
|
}
|
|
826
|
-
}),
|
|
827
|
-
if (
|
|
946
|
+
}), on = /* @__PURE__ */ te(sn, [["__scopeId", "data-v-d2d82ae7"]]), an = (a) => {
|
|
947
|
+
if (we(a)) {
|
|
828
948
|
const t = a.object;
|
|
829
949
|
if (t.fragment != null && a.face && a.instanceId != null) {
|
|
830
950
|
const e = t.fragment.getVertexBlockID(t.geometry, a.face.a), n = t.fragment.getItemID(a.instanceId, e).replace(/\..*/, "");
|
|
@@ -832,483 +952,195 @@ const qt = { class: "d-flex" }, Zt = ["title"], Jt = ["id"], Xt = { class: "list
|
|
|
832
952
|
}
|
|
833
953
|
}
|
|
834
954
|
return null;
|
|
835
|
-
},
|
|
955
|
+
}, rn = (a) => ({
|
|
836
956
|
name: a.filename,
|
|
837
957
|
source: {
|
|
838
958
|
url: a.file
|
|
839
959
|
},
|
|
840
960
|
type: "ifc",
|
|
841
961
|
visible: !0
|
|
842
|
-
}),
|
|
843
|
-
var
|
|
844
|
-
if (!
|
|
962
|
+
}), ln = (a, t) => {
|
|
963
|
+
var d, p, r, u, h, f, g, C, _;
|
|
964
|
+
if (!we(a))
|
|
845
965
|
return;
|
|
846
|
-
const e = (
|
|
966
|
+
const e = (d = a.features) == null ? void 0 : d.at(0);
|
|
847
967
|
if (!e)
|
|
848
968
|
return;
|
|
849
969
|
t.has("IFC") || t.set("IFC", []);
|
|
850
|
-
const n = t.get("IFC"), { ifcProperties:
|
|
970
|
+
const n = t.get("IFC"), { ifcProperties: s, itemProperties: o } = e, i = "NULL", l = ((p = o.Name) == null ? void 0 : p.value) ?? i;
|
|
851
971
|
n.push({
|
|
852
972
|
key: "Site",
|
|
853
|
-
value: ((
|
|
973
|
+
value: ((u = (r = a.entity.object3d.userData) == null ? void 0 : r.dataset) == null ? void 0 : u.name) ?? i
|
|
854
974
|
}), n.push({
|
|
855
975
|
key: "IFCType",
|
|
856
|
-
value:
|
|
857
|
-
}), n.push({ key: "Name", value: l }), n.push({ key: "ID", value:
|
|
858
|
-
for (const { name:
|
|
859
|
-
t.has(
|
|
860
|
-
},
|
|
861
|
-
const t = a.dataset, e = t.config, n =
|
|
976
|
+
value: nt[o.type] ?? i
|
|
977
|
+
}), n.push({ key: "Name", value: l }), n.push({ key: "ID", value: o.expressID }), n.push({ key: "GlobalId", value: ((h = o.GlobalId) == null ? void 0 : h.value) ?? i }), ((f = o.Description) == null ? void 0 : f.value) != null && n.push({ key: "Description", value: o.Description.value }), ((g = o.PredefinedType) == null ? void 0 : g.value) != null && n.push({ key: "PredefinedType", value: o.PredefinedType.value }), ((C = o.ObjectType) == null ? void 0 : C.value) != null && n.push({ key: "ObjectType", value: o.ObjectType.value });
|
|
978
|
+
for (const { name: y, parentName: x, value: E } of s)
|
|
979
|
+
t.has(x) || t.set(x, []), (_ = t.get(x)) == null || _.push({ key: y, value: E });
|
|
980
|
+
}, cn = (a) => {
|
|
981
|
+
const t = a.dataset, e = t.config, n = de(e.source.position ?? t.get("position")), s = new X({
|
|
862
982
|
...e.source,
|
|
863
983
|
at: n,
|
|
864
984
|
name: t.name
|
|
865
985
|
});
|
|
866
|
-
return Promise.resolve(
|
|
986
|
+
return Promise.resolve(s);
|
|
867
987
|
};
|
|
868
|
-
class
|
|
988
|
+
class jn {
|
|
869
989
|
constructor() {
|
|
870
|
-
|
|
871
|
-
|
|
990
|
+
c(this, "id", "builtin-ifc-loader");
|
|
991
|
+
c(this, "name", "IFC");
|
|
872
992
|
}
|
|
873
993
|
async initialize(t) {
|
|
874
994
|
t.datasets.registerDatasetType("ifc", {
|
|
875
|
-
attributeExtractor:
|
|
876
|
-
entityBuilder:
|
|
995
|
+
attributeExtractor: ln,
|
|
996
|
+
entityBuilder: cn,
|
|
877
997
|
fileExtensions: ["ifc"],
|
|
878
|
-
highlight:
|
|
998
|
+
highlight: an,
|
|
879
999
|
icon: "bi-building",
|
|
880
|
-
loader:
|
|
1000
|
+
loader: rn,
|
|
881
1001
|
name: "IFC",
|
|
882
|
-
propertyView:
|
|
883
|
-
}),
|
|
1002
|
+
propertyView: on
|
|
1003
|
+
}), Ye.registerInspector("IfcEntity", Jt), await k.fetch("web-ifc.wasm").catch((e) => {
|
|
884
1004
|
console.warn("Could not load web-ifc.wasm", e);
|
|
885
1005
|
});
|
|
886
1006
|
}
|
|
887
1007
|
}
|
|
888
|
-
const
|
|
1008
|
+
const un = /* @__PURE__ */ D({
|
|
889
1009
|
__name: "OpenLayersMinimapComponent",
|
|
890
1010
|
props: {
|
|
891
1011
|
context: {}
|
|
892
1012
|
},
|
|
893
1013
|
setup(a) {
|
|
894
|
-
const t =
|
|
1014
|
+
const t = I(), e = Z(), n = a, s = [
|
|
895
1015
|
[3e4, 12],
|
|
896
1016
|
[5e4, 10],
|
|
897
1017
|
[1e5, 8],
|
|
898
1018
|
[4e5, 6],
|
|
899
1019
|
[8e5, 4]
|
|
900
1020
|
];
|
|
901
|
-
function i
|
|
902
|
-
for (const [l,
|
|
903
|
-
if (
|
|
904
|
-
return
|
|
905
|
-
return
|
|
1021
|
+
function o(i) {
|
|
1022
|
+
for (const [l, d] of s)
|
|
1023
|
+
if (i < l)
|
|
1024
|
+
return d;
|
|
1025
|
+
return s[s.length - 1][1];
|
|
906
1026
|
}
|
|
907
|
-
return
|
|
908
|
-
e.value = new
|
|
1027
|
+
return Re(() => {
|
|
1028
|
+
e.value = new ot({
|
|
909
1029
|
controls: [],
|
|
910
|
-
layers: [new
|
|
1030
|
+
layers: [new at({ source: new rt() })],
|
|
911
1031
|
target: t.value,
|
|
912
|
-
view: new
|
|
913
|
-
center:
|
|
1032
|
+
view: new it({
|
|
1033
|
+
center: le([4, 44]),
|
|
914
1034
|
projection: "EPSG:3857",
|
|
915
1035
|
zoom: 5
|
|
916
1036
|
})
|
|
917
1037
|
});
|
|
918
|
-
let
|
|
1038
|
+
let i = new F();
|
|
919
1039
|
const l = () => {
|
|
920
|
-
var
|
|
921
|
-
const
|
|
922
|
-
if (!
|
|
923
|
-
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
).as("EPSG:4326"),
|
|
929
|
-
|
|
1040
|
+
var f;
|
|
1041
|
+
const p = n.context.view.getInstance(), u = n.context.view.getCameraController().getCameraPosition(), h = u.camera.z;
|
|
1042
|
+
if (!u.camera.equals(i)) {
|
|
1043
|
+
i = u.camera.clone();
|
|
1044
|
+
const g = new H(
|
|
1045
|
+
p.referenceCrs,
|
|
1046
|
+
i.x,
|
|
1047
|
+
i.y
|
|
1048
|
+
).as("EPSG:4326"), C = o(h), _ = (f = e.value) == null ? void 0 : f.getView();
|
|
1049
|
+
_ == null || _.setCenter(le([g.longitude, g.latitude])), _ == null || _.setZoom(C);
|
|
930
1050
|
}
|
|
931
1051
|
};
|
|
932
1052
|
n.context.events.addEventListener("updated", l);
|
|
933
|
-
let
|
|
1053
|
+
let d = !1;
|
|
934
1054
|
t.value && (t.value.onclick = () => {
|
|
935
|
-
var
|
|
936
|
-
|
|
1055
|
+
var p, r, u, h;
|
|
1056
|
+
d = !d, d ? ((p = t.value) == null || p.classList.add("collapsed"), (r = t.value) == null || r.classList.remove("expanded")) : ((u = t.value) == null || u.classList.remove("collapsed"), (h = t.value) == null || h.classList.add("expanded"));
|
|
937
1057
|
});
|
|
938
|
-
}),
|
|
939
|
-
var
|
|
940
|
-
(
|
|
941
|
-
}), (
|
|
1058
|
+
}), Ve(() => {
|
|
1059
|
+
var i;
|
|
1060
|
+
(i = e.value) == null || i.dispose(), e.value = void 0;
|
|
1061
|
+
}), (i, l) => (v(), P("div", {
|
|
942
1062
|
ref_key: "target",
|
|
943
1063
|
ref: t,
|
|
944
1064
|
title: "Toggle minimap",
|
|
945
1065
|
class: "minimap expanded"
|
|
946
1066
|
}, null, 512));
|
|
947
1067
|
}
|
|
948
|
-
}),
|
|
949
|
-
class
|
|
1068
|
+
}), dn = /* @__PURE__ */ te(un, [["__scopeId", "data-v-38ee3c04"]]);
|
|
1069
|
+
class $n {
|
|
950
1070
|
constructor() {
|
|
951
|
-
|
|
952
|
-
|
|
1071
|
+
c(this, "id", "builtin-minimap-openlayers");
|
|
1072
|
+
c(this, "name", "Minimap");
|
|
953
1073
|
}
|
|
954
1074
|
initialize(t) {
|
|
955
1075
|
t.widgets.addWidget({
|
|
956
|
-
component:
|
|
1076
|
+
component: dn,
|
|
957
1077
|
id: "minimap-ol"
|
|
958
1078
|
});
|
|
959
1079
|
}
|
|
960
1080
|
}
|
|
961
|
-
const
|
|
962
|
-
let un = class extends Ae {
|
|
963
|
-
constructor(t) {
|
|
964
|
-
super(t), this.propertyNameMapping = {}, this.customPropertyMapping = {};
|
|
965
|
-
}
|
|
966
|
-
load(t, e, n, o) {
|
|
967
|
-
const i = this, s = new ze(this.manager);
|
|
968
|
-
s.setPath(this.path), s.setResponseType("arraybuffer"), s.setRequestHeader(this.requestHeader), s.setWithCredentials(this.withCredentials), s.load(t, function(l) {
|
|
969
|
-
try {
|
|
970
|
-
e(i.parse(l));
|
|
971
|
-
} catch (f) {
|
|
972
|
-
o ? o(f) : console.error(f), i.manager.itemError(t);
|
|
973
|
-
}
|
|
974
|
-
}, n, o);
|
|
975
|
-
}
|
|
976
|
-
setPropertyNameMapping(t) {
|
|
977
|
-
this.propertyNameMapping = t;
|
|
978
|
-
}
|
|
979
|
-
setCustomPropertyNameMapping(t) {
|
|
980
|
-
this.customPropertyMapping = t;
|
|
981
|
-
}
|
|
982
|
-
parse(t) {
|
|
983
|
-
function e(r, h = 0) {
|
|
984
|
-
const d = /^ply([\s\S]*)end_header(\r\n|\r|\n)/;
|
|
985
|
-
let u = "";
|
|
986
|
-
const g = d.exec(r);
|
|
987
|
-
g !== null && (u = g[1]);
|
|
988
|
-
const y = {
|
|
989
|
-
comments: [],
|
|
990
|
-
elements: [],
|
|
991
|
-
headerLength: h,
|
|
992
|
-
objInfo: ""
|
|
993
|
-
}, _ = u.split(/\r\n|\r|\n/);
|
|
994
|
-
let b;
|
|
995
|
-
function L(S, E) {
|
|
996
|
-
const C = { type: S[0] };
|
|
997
|
-
return C.type === "list" ? (C.name = S[3], C.countType = S[1], C.itemType = S[2]) : C.name = S[1], C.name in E && (C.name = E[C.name]), C;
|
|
998
|
-
}
|
|
999
|
-
for (let S = 0; S < _.length; S++) {
|
|
1000
|
-
let E = _[S];
|
|
1001
|
-
if (E = E.trim(), E === "") continue;
|
|
1002
|
-
const C = E.split(/\s+/), H = C.shift();
|
|
1003
|
-
switch (E = C.join(" "), H) {
|
|
1004
|
-
case "format":
|
|
1005
|
-
y.format = C[0], y.version = C[1];
|
|
1006
|
-
break;
|
|
1007
|
-
case "comment":
|
|
1008
|
-
y.comments.push(E);
|
|
1009
|
-
break;
|
|
1010
|
-
case "element":
|
|
1011
|
-
b !== void 0 && y.elements.push(b), b = {}, b.name = C[0], b.count = parseInt(C[1]), b.properties = [];
|
|
1012
|
-
break;
|
|
1013
|
-
case "property":
|
|
1014
|
-
b.properties.push(L(C, T.propertyNameMapping));
|
|
1015
|
-
break;
|
|
1016
|
-
case "obj_info":
|
|
1017
|
-
y.objInfo = E;
|
|
1018
|
-
break;
|
|
1019
|
-
default:
|
|
1020
|
-
console.log("unhandled", H, C);
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
return b !== void 0 && y.elements.push(b), y;
|
|
1024
|
-
}
|
|
1025
|
-
function n(r, h) {
|
|
1026
|
-
switch (h) {
|
|
1027
|
-
case "char":
|
|
1028
|
-
case "uchar":
|
|
1029
|
-
case "short":
|
|
1030
|
-
case "ushort":
|
|
1031
|
-
case "int":
|
|
1032
|
-
case "uint":
|
|
1033
|
-
case "int8":
|
|
1034
|
-
case "uint8":
|
|
1035
|
-
case "int16":
|
|
1036
|
-
case "uint16":
|
|
1037
|
-
case "int32":
|
|
1038
|
-
case "uint32":
|
|
1039
|
-
return parseInt(r);
|
|
1040
|
-
case "float":
|
|
1041
|
-
case "double":
|
|
1042
|
-
case "float32":
|
|
1043
|
-
case "float64":
|
|
1044
|
-
return parseFloat(r);
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
function o(r, h) {
|
|
1048
|
-
const d = {};
|
|
1049
|
-
for (let u = 0; u < r.length; u++) {
|
|
1050
|
-
if (h.empty()) return null;
|
|
1051
|
-
if (r[u].type === "list") {
|
|
1052
|
-
const g = [], y = n(h.next(), r[u].countType);
|
|
1053
|
-
for (let _ = 0; _ < y; _++) {
|
|
1054
|
-
if (h.empty()) return null;
|
|
1055
|
-
g.push(n(h.next(), r[u].itemType));
|
|
1056
|
-
}
|
|
1057
|
-
d[r[u].name] = g;
|
|
1058
|
-
} else
|
|
1059
|
-
d[r[u].name] = n(h.next(), r[u].type);
|
|
1060
|
-
}
|
|
1061
|
-
return d;
|
|
1062
|
-
}
|
|
1063
|
-
function i() {
|
|
1064
|
-
const r = {
|
|
1065
|
-
indices: [],
|
|
1066
|
-
vertices: [],
|
|
1067
|
-
normals: [],
|
|
1068
|
-
uvs: [],
|
|
1069
|
-
faceVertexUvs: [],
|
|
1070
|
-
colors: [],
|
|
1071
|
-
faceVertexColors: []
|
|
1072
|
-
};
|
|
1073
|
-
for (const h of Object.keys(T.customPropertyMapping))
|
|
1074
|
-
r[h] = [];
|
|
1075
|
-
return r;
|
|
1076
|
-
}
|
|
1077
|
-
function s(r) {
|
|
1078
|
-
const h = r.map((u) => u.name);
|
|
1079
|
-
function d(u) {
|
|
1080
|
-
for (let g = 0, y = u.length; g < y; g++) {
|
|
1081
|
-
const _ = u[g];
|
|
1082
|
-
if (h.includes(_)) return _;
|
|
1083
|
-
}
|
|
1084
|
-
return null;
|
|
1085
|
-
}
|
|
1086
|
-
return {
|
|
1087
|
-
attrX: d(["x", "px", "posx"]) || "x",
|
|
1088
|
-
attrY: d(["y", "py", "posy"]) || "y",
|
|
1089
|
-
attrZ: d(["z", "pz", "posz"]) || "z",
|
|
1090
|
-
attrNX: d(["nx", "normalx"]),
|
|
1091
|
-
attrNY: d(["ny", "normaly"]),
|
|
1092
|
-
attrNZ: d(["nz", "normalz"]),
|
|
1093
|
-
attrS: d(["s", "u", "texture_u", "tx"]),
|
|
1094
|
-
attrT: d(["t", "v", "texture_v", "ty"]),
|
|
1095
|
-
attrR: d(["red", "diffuse_red", "r", "diffuse_r"]),
|
|
1096
|
-
attrG: d(["green", "diffuse_green", "g", "diffuse_g"]),
|
|
1097
|
-
attrB: d(["blue", "diffuse_blue", "b", "diffuse_b"])
|
|
1098
|
-
};
|
|
1099
|
-
}
|
|
1100
|
-
function l(r, h) {
|
|
1101
|
-
const d = i(), u = /end_header\s+(\S[\s\S]*\S|\S)\s*$/;
|
|
1102
|
-
let g, y;
|
|
1103
|
-
(y = u.exec(r)) !== null ? g = y[1].split(/\s+/) : g = [];
|
|
1104
|
-
const _ = new dn(g);
|
|
1105
|
-
e: for (let b = 0; b < h.elements.length; b++) {
|
|
1106
|
-
const L = h.elements[b], S = s(L.properties);
|
|
1107
|
-
for (let E = 0; E < L.count; E++) {
|
|
1108
|
-
const C = o(L.properties, _);
|
|
1109
|
-
if (!C) break e;
|
|
1110
|
-
v(d, L.name, C, S);
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
return f(d);
|
|
1114
|
-
}
|
|
1115
|
-
function f(r) {
|
|
1116
|
-
let h = new Oe();
|
|
1117
|
-
r.indices.length > 0 && h.setIndex(r.indices), h.setAttribute("position", new z(r.vertices, 3)), r.normals.length > 0 && h.setAttribute("normal", new z(r.normals, 3)), r.uvs.length > 0 && h.setAttribute("uv", new z(r.uvs, 2)), r.colors.length > 0 && h.setAttribute("color", new z(r.colors, 3)), (r.faceVertexUvs.length > 0 || r.faceVertexColors.length > 0) && (h = h.toNonIndexed(), r.faceVertexUvs.length > 0 && h.setAttribute("uv", new z(r.faceVertexUvs, 2)), r.faceVertexColors.length > 0 && h.setAttribute("color", new z(r.faceVertexColors, 3)));
|
|
1118
|
-
for (const d of Object.keys(T.customPropertyMapping))
|
|
1119
|
-
r[d].length > 0 && h.setAttribute(
|
|
1120
|
-
d,
|
|
1121
|
-
new z(
|
|
1122
|
-
r[d],
|
|
1123
|
-
T.customPropertyMapping[d].length
|
|
1124
|
-
)
|
|
1125
|
-
);
|
|
1126
|
-
return h.computeBoundingSphere(), h;
|
|
1127
|
-
}
|
|
1128
|
-
function v(r, h, d, u) {
|
|
1129
|
-
if (h === "vertex") {
|
|
1130
|
-
r.vertices.push(d[u.attrX], d[u.attrY], d[u.attrZ]), u.attrNX !== null && u.attrNY !== null && u.attrNZ !== null && r.normals.push(d[u.attrNX], d[u.attrNY], d[u.attrNZ]), u.attrS !== null && u.attrT !== null && r.uvs.push(d[u.attrS], d[u.attrT]), u.attrR !== null && u.attrG !== null && u.attrB !== null && (M.setRGB(
|
|
1131
|
-
d[u.attrR] / 255,
|
|
1132
|
-
d[u.attrG] / 255,
|
|
1133
|
-
d[u.attrB] / 255,
|
|
1134
|
-
ie
|
|
1135
|
-
), r.colors.push(M.r, M.g, M.b));
|
|
1136
|
-
for (const g of Object.keys(T.customPropertyMapping))
|
|
1137
|
-
for (const y of T.customPropertyMapping[g])
|
|
1138
|
-
r[g].push(d[y]);
|
|
1139
|
-
} else if (h === "face") {
|
|
1140
|
-
const g = d.vertex_indices || d.vertex_index, y = d.texcoord;
|
|
1141
|
-
g.length === 3 ? (r.indices.push(g[0], g[1], g[2]), y && y.length === 6 && (r.faceVertexUvs.push(y[0], y[1]), r.faceVertexUvs.push(y[2], y[3]), r.faceVertexUvs.push(y[4], y[5]))) : g.length === 4 && (r.indices.push(g[0], g[1], g[3]), r.indices.push(g[1], g[2], g[3])), u.attrR !== null && u.attrG !== null && u.attrB !== null && (M.setRGB(
|
|
1142
|
-
d[u.attrR] / 255,
|
|
1143
|
-
d[u.attrG] / 255,
|
|
1144
|
-
d[u.attrB] / 255,
|
|
1145
|
-
ie
|
|
1146
|
-
), r.faceVertexColors.push(M.r, M.g, M.b), r.faceVertexColors.push(M.r, M.g, M.b), r.faceVertexColors.push(M.r, M.g, M.b));
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
function c(r, h) {
|
|
1150
|
-
const d = {};
|
|
1151
|
-
let u = 0;
|
|
1152
|
-
for (let g = 0; g < h.length; g++) {
|
|
1153
|
-
const y = h[g], _ = y.valueReader;
|
|
1154
|
-
if (y.type === "list") {
|
|
1155
|
-
const b = [], L = y.countReader.read(r + u);
|
|
1156
|
-
u += y.countReader.size;
|
|
1157
|
-
for (let S = 0; S < L; S++)
|
|
1158
|
-
b.push(_.read(r + u)), u += _.size;
|
|
1159
|
-
d[y.name] = b;
|
|
1160
|
-
} else
|
|
1161
|
-
d[y.name] = _.read(r + u), u += _.size;
|
|
1162
|
-
}
|
|
1163
|
-
return [d, u];
|
|
1164
|
-
}
|
|
1165
|
-
function m(r, h, d) {
|
|
1166
|
-
function u(g, y, _) {
|
|
1167
|
-
switch (y) {
|
|
1168
|
-
// corespondences for non-specific length types here match rply:
|
|
1169
|
-
case "int8":
|
|
1170
|
-
case "char":
|
|
1171
|
-
return { read: (b) => g.getInt8(b), size: 1 };
|
|
1172
|
-
case "uint8":
|
|
1173
|
-
case "uchar":
|
|
1174
|
-
return { read: (b) => g.getUint8(b), size: 1 };
|
|
1175
|
-
case "int16":
|
|
1176
|
-
case "short":
|
|
1177
|
-
return { read: (b) => g.getInt16(b, _), size: 2 };
|
|
1178
|
-
case "uint16":
|
|
1179
|
-
case "ushort":
|
|
1180
|
-
return { read: (b) => g.getUint16(b, _), size: 2 };
|
|
1181
|
-
case "int32":
|
|
1182
|
-
case "int":
|
|
1183
|
-
return { read: (b) => g.getInt32(b, _), size: 4 };
|
|
1184
|
-
case "uint32":
|
|
1185
|
-
case "uint":
|
|
1186
|
-
return { read: (b) => g.getUint32(b, _), size: 4 };
|
|
1187
|
-
case "float32":
|
|
1188
|
-
case "float":
|
|
1189
|
-
return { read: (b) => g.getFloat32(b, _), size: 4 };
|
|
1190
|
-
case "float64":
|
|
1191
|
-
case "double":
|
|
1192
|
-
return { read: (b) => g.getFloat64(b, _), size: 8 };
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
for (let g = 0, y = r.length; g < y; g++) {
|
|
1196
|
-
const _ = r[g];
|
|
1197
|
-
_.type === "list" ? (_.countReader = u(h, _.countType, d), _.valueReader = u(h, _.itemType, d)) : _.valueReader = u(h, _.type, d);
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
function w(r, h) {
|
|
1201
|
-
const d = i(), u = h.format === "binary_little_endian", g = new DataView(r, h.headerLength);
|
|
1202
|
-
let y, _ = 0;
|
|
1203
|
-
for (let b = 0; b < h.elements.length; b++) {
|
|
1204
|
-
const L = h.elements[b], S = L.properties, E = s(S);
|
|
1205
|
-
m(S, g, u);
|
|
1206
|
-
for (let C = 0; C < L.count; C++) {
|
|
1207
|
-
y = c(_, S), _ += y[1];
|
|
1208
|
-
const H = y[0];
|
|
1209
|
-
v(d, L.name, H, E);
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
return f(d);
|
|
1213
|
-
}
|
|
1214
|
-
function I(r) {
|
|
1215
|
-
let h = 0, d = !0, u = "";
|
|
1216
|
-
const g = [], y = new TextDecoder().decode(r.subarray(0, 5)), _ = /^ply\r\n/.test(y);
|
|
1217
|
-
do {
|
|
1218
|
-
const b = String.fromCharCode(r[h++]);
|
|
1219
|
-
b !== `
|
|
1220
|
-
` && b !== "\r" ? u += b : (u === "end_header" && (d = !1), u !== "" && (g.push(u), u = ""));
|
|
1221
|
-
} while (d && h < r.length);
|
|
1222
|
-
return _ === !0 && h++, { headerText: g.join("\r") + "\r", headerLength: h };
|
|
1223
|
-
}
|
|
1224
|
-
let P;
|
|
1225
|
-
const T = this;
|
|
1226
|
-
if (t instanceof ArrayBuffer) {
|
|
1227
|
-
const r = new Uint8Array(t), { headerText: h, headerLength: d } = I(r), u = e(h, d);
|
|
1228
|
-
if (u.format === "ascii") {
|
|
1229
|
-
const g = new TextDecoder().decode(r);
|
|
1230
|
-
P = l(g, u);
|
|
1231
|
-
} else
|
|
1232
|
-
P = w(t, u);
|
|
1233
|
-
} else
|
|
1234
|
-
P = l(t, e(t));
|
|
1235
|
-
return P;
|
|
1236
|
-
}
|
|
1237
|
-
};
|
|
1238
|
-
class dn {
|
|
1239
|
-
constructor(t) {
|
|
1240
|
-
this.arr = t, this.i = 0;
|
|
1241
|
-
}
|
|
1242
|
-
empty() {
|
|
1243
|
-
return this.i >= this.arr.length;
|
|
1244
|
-
}
|
|
1245
|
-
next() {
|
|
1246
|
-
return this.arr[this.i++];
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
const $ = class $ extends pe {
|
|
1081
|
+
const j = class j extends K {
|
|
1250
1082
|
constructor() {
|
|
1251
1083
|
super(...arguments);
|
|
1252
|
-
|
|
1253
|
-
|
|
1084
|
+
c(this, "isPickableFeatures", !0);
|
|
1085
|
+
c(this, "isPlyMesh", !0);
|
|
1254
1086
|
}
|
|
1255
1087
|
pickFeaturesFrom(e) {
|
|
1256
1088
|
if (this.geometry.hasAttribute("color") && e.face) {
|
|
1257
|
-
const n = this.geometry.getAttribute("color").array,
|
|
1258
|
-
n[
|
|
1259
|
-
n[
|
|
1260
|
-
n[
|
|
1089
|
+
const n = this.geometry.getAttribute("color").array, s = e.face, i = [{ color: new je(
|
|
1090
|
+
n[s.a * 3],
|
|
1091
|
+
n[s.a * 3 + 1],
|
|
1092
|
+
n[s.a * 3 + 2]
|
|
1261
1093
|
) }];
|
|
1262
|
-
return e.features =
|
|
1094
|
+
return e.features = i, i;
|
|
1263
1095
|
}
|
|
1264
1096
|
return [];
|
|
1265
1097
|
}
|
|
1266
1098
|
};
|
|
1267
|
-
|
|
1268
|
-
let
|
|
1269
|
-
class pn extends
|
|
1099
|
+
c(j, "isPlyMesh", (e) => $(e) && e.isPlyMesh), c(j, "isPlyPickResult", (e) => $(e) && j.isPlyMesh(e == null ? void 0 : e.object));
|
|
1100
|
+
let U = j;
|
|
1101
|
+
class pn extends fe {
|
|
1270
1102
|
constructor(e) {
|
|
1271
|
-
super(new
|
|
1272
|
-
|
|
1273
|
-
|
|
1103
|
+
super(new ue());
|
|
1104
|
+
c(this, "isPlyEntity", !0);
|
|
1105
|
+
c(this, "source");
|
|
1274
1106
|
this.source = e;
|
|
1275
1107
|
}
|
|
1276
1108
|
async preprocess() {
|
|
1277
|
-
const e = await
|
|
1278
|
-
side:
|
|
1109
|
+
const e = await k.fetchArrayBuffer(this.source.url), n = this.source.at.as(this.source.featureProjection).toVector3(), o = new Oe().parse(e), i = new Ae({
|
|
1110
|
+
side: ze
|
|
1279
1111
|
});
|
|
1280
|
-
|
|
1281
|
-
const l = new
|
|
1282
|
-
l.name = "plyModel",
|
|
1283
|
-
const
|
|
1284
|
-
ee(this, { filename:
|
|
1112
|
+
o.hasAttribute("color") && (i.vertexColors = !0), o.computeVertexNormals();
|
|
1113
|
+
const l = new U(o, i);
|
|
1114
|
+
l.name = "plyModel", o.computeBoundingBox(), l.position.copy(n), l.updateWorldMatrix(!0, !0), this.object3d.add(l), this.onObjectCreated(l);
|
|
1115
|
+
const d = k.getContext(this.source.url);
|
|
1116
|
+
ee(this, { filename: d.filename }), this.notifyChange(this.object3d);
|
|
1285
1117
|
}
|
|
1286
1118
|
}
|
|
1287
|
-
const
|
|
1288
|
-
const { dataset: t, instance: e } = a, n = t.config,
|
|
1119
|
+
const hn = (a) => {
|
|
1120
|
+
const { dataset: t, instance: e } = a, n = t.config, s = de(n.source.position ?? t.get("position")), o = new pn({
|
|
1289
1121
|
...n.source,
|
|
1290
|
-
at:
|
|
1122
|
+
at: s,
|
|
1291
1123
|
featureProjection: e.referenceCrs
|
|
1292
1124
|
});
|
|
1293
|
-
return Promise.resolve(
|
|
1294
|
-
},
|
|
1295
|
-
var
|
|
1296
|
-
if (!
|
|
1125
|
+
return Promise.resolve(o);
|
|
1126
|
+
}, mn = (a, t) => {
|
|
1127
|
+
var s;
|
|
1128
|
+
if (!U.isPlyPickResult(a))
|
|
1297
1129
|
return;
|
|
1298
|
-
const e = (
|
|
1130
|
+
const e = (s = a.features) == null ? void 0 : s.at(0);
|
|
1299
1131
|
if (!e)
|
|
1300
1132
|
return;
|
|
1301
1133
|
t.has("PLY") || t.set("PLY", []), t.get("PLY").push({ key: "Color", value: e.color });
|
|
1302
1134
|
};
|
|
1303
|
-
class
|
|
1135
|
+
class Hn {
|
|
1304
1136
|
constructor() {
|
|
1305
|
-
|
|
1306
|
-
|
|
1137
|
+
c(this, "id", "builtin-ply-loader");
|
|
1138
|
+
c(this, "name", "PLY");
|
|
1307
1139
|
}
|
|
1308
1140
|
initialize(t) {
|
|
1309
1141
|
t.datasets.registerDatasetType("ply", {
|
|
1310
|
-
attributeExtractor:
|
|
1311
|
-
entityBuilder:
|
|
1142
|
+
attributeExtractor: mn,
|
|
1143
|
+
entityBuilder: hn,
|
|
1312
1144
|
icon: "bi-file-earmark-binary",
|
|
1313
1145
|
name: "PLY"
|
|
1314
1146
|
});
|
|
@@ -1317,17 +1149,17 @@ class Un {
|
|
|
1317
1149
|
const fn = (a) => {
|
|
1318
1150
|
a.addEventListener("object-created", (t) => {
|
|
1319
1151
|
t.obj.traverse((n) => {
|
|
1320
|
-
var
|
|
1321
|
-
((
|
|
1152
|
+
var s;
|
|
1153
|
+
((s = n.userData) == null ? void 0 : s.class) === "IfcSpace" && (n.visible = !1);
|
|
1322
1154
|
});
|
|
1323
1155
|
});
|
|
1324
1156
|
};
|
|
1325
|
-
class
|
|
1157
|
+
class Rn {
|
|
1326
1158
|
constructor() {
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1159
|
+
c(this, "id", "builtin-post-process-entities");
|
|
1160
|
+
c(this, "name", "Post-process 3D Tiles");
|
|
1161
|
+
c(this, "_alreadyProcessedEntities", /* @__PURE__ */ new Set());
|
|
1162
|
+
c(this, "_processings", [fn]);
|
|
1331
1163
|
}
|
|
1332
1164
|
initialize(t) {
|
|
1333
1165
|
t.events.addEventListener("ready", () => {
|
|
@@ -1337,26 +1169,26 @@ class $n {
|
|
|
1337
1169
|
}
|
|
1338
1170
|
processEntities(t) {
|
|
1339
1171
|
for (const e of t.getEntities())
|
|
1340
|
-
this._alreadyProcessedEntities.has(e.id) || (
|
|
1172
|
+
this._alreadyProcessedEntities.has(e.id) || (ge(e) && this.processEntity(e, t), this._alreadyProcessedEntities.add(e.id));
|
|
1341
1173
|
}
|
|
1342
1174
|
processEntity(t, e) {
|
|
1343
1175
|
const n = { instance: e };
|
|
1344
|
-
for (const
|
|
1345
|
-
|
|
1176
|
+
for (const s of this._processings)
|
|
1177
|
+
s(t, n);
|
|
1346
1178
|
}
|
|
1347
1179
|
}
|
|
1348
1180
|
const gn = (a) => {
|
|
1349
|
-
const t = a.dataset.config, e = new
|
|
1350
|
-
source: new
|
|
1181
|
+
const t = a.dataset.config, e = new lt({
|
|
1182
|
+
source: new ct({ url: `${t.source.url}/${t.source.filename}` })
|
|
1351
1183
|
});
|
|
1352
1184
|
return ee(e, {
|
|
1353
1185
|
filename: t.source.url
|
|
1354
1186
|
}), Promise.resolve(e);
|
|
1355
1187
|
};
|
|
1356
|
-
class
|
|
1188
|
+
class Vn {
|
|
1357
1189
|
constructor() {
|
|
1358
|
-
|
|
1359
|
-
|
|
1190
|
+
c(this, "id", "builtin-potree-loader");
|
|
1191
|
+
c(this, "name", "Potree");
|
|
1360
1192
|
}
|
|
1361
1193
|
initialize(t) {
|
|
1362
1194
|
t.datasets.registerDatasetType("potree", {
|
|
@@ -1366,54 +1198,54 @@ class Gn {
|
|
|
1366
1198
|
});
|
|
1367
1199
|
}
|
|
1368
1200
|
}
|
|
1369
|
-
class
|
|
1201
|
+
class Un {
|
|
1370
1202
|
constructor() {
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1203
|
+
c(this, "id", "builtin-tour");
|
|
1204
|
+
c(this, "name", "Tour");
|
|
1205
|
+
c(this, "_camera", null);
|
|
1206
|
+
c(this, "_cameraCallback", null);
|
|
1207
|
+
c(this, "_context", null);
|
|
1208
|
+
c(this, "_tours", null);
|
|
1377
1209
|
}
|
|
1378
1210
|
initialize(t) {
|
|
1379
1211
|
this._context = t, t.events.addEventListener("ready", this.start.bind(this));
|
|
1380
1212
|
}
|
|
1381
1213
|
buildTours() {
|
|
1382
|
-
const t = this._camera, e = new
|
|
1214
|
+
const t = this._camera, e = new w.Tour({
|
|
1383
1215
|
tourName: "main",
|
|
1384
1216
|
useModalOverlay: !0
|
|
1385
|
-
}), n = new
|
|
1217
|
+
}), n = new w.Tour({
|
|
1386
1218
|
tourName: "navigating",
|
|
1387
1219
|
useModalOverlay: !0
|
|
1388
|
-
}),
|
|
1220
|
+
}), s = new w.Tour({
|
|
1389
1221
|
tourName: "analyzing",
|
|
1390
1222
|
useModalOverlay: !0
|
|
1391
|
-
}),
|
|
1223
|
+
}), o = [
|
|
1392
1224
|
{ action: () => {
|
|
1393
|
-
var
|
|
1394
|
-
return (
|
|
1225
|
+
var r;
|
|
1226
|
+
return (r = w.activeTour) == null ? void 0 : r.next();
|
|
1395
1227
|
}, text: "Next" },
|
|
1396
1228
|
{ action: () => {
|
|
1397
|
-
var
|
|
1398
|
-
return (
|
|
1229
|
+
var r;
|
|
1230
|
+
return (r = w.activeTour) == null ? void 0 : r.cancel();
|
|
1399
1231
|
}, secondary: !0, text: "Exit" }
|
|
1400
|
-
],
|
|
1401
|
-
var
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1232
|
+
], i = () => {
|
|
1233
|
+
var _, y;
|
|
1234
|
+
const r = (_ = w.activeTour) == null ? void 0 : _.getCurrentStep(), u = r == null ? void 0 : r.getElement(), h = u == null ? void 0 : u.querySelector(".shepherd-text"), f = (y = w.activeTour) == null ? void 0 : y.steps;
|
|
1235
|
+
if (r == null || u == null || h == null || f == null)
|
|
1404
1236
|
return;
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1409
|
-
}, l = async (
|
|
1410
|
-
const
|
|
1411
|
-
if (
|
|
1412
|
-
return
|
|
1413
|
-
const
|
|
1414
|
-
document.querySelector(
|
|
1237
|
+
const g = document.createElement("div");
|
|
1238
|
+
g.className = "progress mt-3", g.setAttribute("role", "progressbar"), g.style.height = "2px";
|
|
1239
|
+
const C = document.createElement("div");
|
|
1240
|
+
C.className = "progress-bar bg-success", C.style.width = `${100 * (f.indexOf(r) / f.length)}%`, g.appendChild(C), h.appendChild(g);
|
|
1241
|
+
}, l = async (r, u) => new Promise((h) => {
|
|
1242
|
+
const f = document.getElementById(r);
|
|
1243
|
+
if (f && !f.classList.contains("active") && f.click(), document.querySelector(u))
|
|
1244
|
+
return h(document.querySelector(u));
|
|
1245
|
+
const g = new MutationObserver(() => {
|
|
1246
|
+
document.querySelector(u) && (g.disconnect(), h(document.querySelector(u)));
|
|
1415
1247
|
});
|
|
1416
|
-
|
|
1248
|
+
g.observe(document.body, {
|
|
1417
1249
|
childList: !0,
|
|
1418
1250
|
subtree: !0
|
|
1419
1251
|
});
|
|
@@ -1422,22 +1254,22 @@ class Yn {
|
|
|
1422
1254
|
buttons: [
|
|
1423
1255
|
{
|
|
1424
1256
|
action: () => {
|
|
1425
|
-
var
|
|
1426
|
-
(
|
|
1257
|
+
var r;
|
|
1258
|
+
(r = w.activeTour) == null || r.complete(), n.show(0);
|
|
1427
1259
|
},
|
|
1428
1260
|
text: "Navigating"
|
|
1429
1261
|
},
|
|
1430
1262
|
{
|
|
1431
1263
|
action: () => {
|
|
1432
|
-
var
|
|
1433
|
-
(
|
|
1264
|
+
var r;
|
|
1265
|
+
(r = w.activeTour) == null || r.complete(), s.show(0);
|
|
1434
1266
|
},
|
|
1435
1267
|
text: "Analyzing data"
|
|
1436
1268
|
},
|
|
1437
1269
|
{
|
|
1438
1270
|
action: () => {
|
|
1439
|
-
var
|
|
1440
|
-
return (
|
|
1271
|
+
var r;
|
|
1272
|
+
return (r = w.activeTour) == null ? void 0 : r.cancel();
|
|
1441
1273
|
},
|
|
1442
1274
|
secondary: !0,
|
|
1443
1275
|
text: "Exit"
|
|
@@ -1448,25 +1280,25 @@ class Yn {
|
|
|
1448
1280
|
text: "<p>Welcome to <strong>Piero</strong>, the Giro3D application.<br/>We can guide you through the different features.</p>",
|
|
1449
1281
|
title: "Welcome!",
|
|
1450
1282
|
when: {
|
|
1451
|
-
show:
|
|
1283
|
+
show: i
|
|
1452
1284
|
}
|
|
1453
1285
|
}), n.addStep({
|
|
1454
1286
|
attachTo: {
|
|
1455
1287
|
element: "#main-view",
|
|
1456
1288
|
on: "bottom"
|
|
1457
1289
|
},
|
|
1458
|
-
buttons:
|
|
1290
|
+
buttons: o,
|
|
1459
1291
|
id: "view",
|
|
1460
1292
|
text: "<p>This is the <b>main view</b>.</p><p>Giro3D natively supports a broad range of data sources, from 2D raster and vector data, to 3D point clouds and tilesets.</p><p>Piero adds support for CityJSON and IFC files.</p>",
|
|
1461
1293
|
when: {
|
|
1462
|
-
show:
|
|
1294
|
+
show: i
|
|
1463
1295
|
}
|
|
1464
1296
|
}), n.addStep({
|
|
1465
1297
|
attachTo: {
|
|
1466
1298
|
element: "#main-view",
|
|
1467
1299
|
on: "bottom"
|
|
1468
1300
|
},
|
|
1469
|
-
buttons:
|
|
1301
|
+
buttons: o,
|
|
1470
1302
|
id: "navigate",
|
|
1471
1303
|
text: '<p>This application integrates <a href="https://github.com/yomotsu/camera-controls">camera-controls</a>, a camera control for three.js.</p><p><b>Click</b> to move the camera. <b>Right-click</b> to rotate around a point. <b>Scroll</b> to zoom in or out.</p>',
|
|
1472
1304
|
when: {
|
|
@@ -1474,11 +1306,11 @@ class Yn {
|
|
|
1474
1306
|
this._cameraCallback && t.removeEventListener("interaction-end", this._cameraCallback), this._cameraCallback = null;
|
|
1475
1307
|
},
|
|
1476
1308
|
show: () => {
|
|
1477
|
-
let
|
|
1309
|
+
let r = 0;
|
|
1478
1310
|
this._cameraCallback = () => {
|
|
1479
|
-
var
|
|
1480
|
-
|
|
1481
|
-
}, t.addEventListener("interaction-end", this._cameraCallback),
|
|
1311
|
+
var u;
|
|
1312
|
+
r += 1, r > 2 && ((u = w.activeTour) == null || u.next());
|
|
1313
|
+
}, t.addEventListener("interaction-end", this._cameraCallback), i();
|
|
1482
1314
|
}
|
|
1483
1315
|
}
|
|
1484
1316
|
}), n.addStep({
|
|
@@ -1487,11 +1319,11 @@ class Yn {
|
|
|
1487
1319
|
on: "right"
|
|
1488
1320
|
},
|
|
1489
1321
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1490
|
-
buttons:
|
|
1322
|
+
buttons: o,
|
|
1491
1323
|
id: "toolbar-layers",
|
|
1492
1324
|
text: "<p>Giro3D supports multiple datasets.</p><p>You can toggle datasets as you wish with the <b>Datasets</b> panel.</p>",
|
|
1493
1325
|
when: {
|
|
1494
|
-
show:
|
|
1326
|
+
show: i
|
|
1495
1327
|
}
|
|
1496
1328
|
}), n.addStep({
|
|
1497
1329
|
attachTo: {
|
|
@@ -1499,11 +1331,11 @@ class Yn {
|
|
|
1499
1331
|
on: "right"
|
|
1500
1332
|
},
|
|
1501
1333
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1502
|
-
buttons:
|
|
1334
|
+
buttons: o,
|
|
1503
1335
|
id: "basemaps",
|
|
1504
1336
|
text: "<p><b>Basemaps</b> are color and elevation layers that make the basic shape and aspect of the <b>Map</b>.</p>",
|
|
1505
1337
|
when: {
|
|
1506
|
-
show:
|
|
1338
|
+
show: i
|
|
1507
1339
|
}
|
|
1508
1340
|
}), n.addStep({
|
|
1509
1341
|
attachTo: {
|
|
@@ -1511,11 +1343,11 @@ class Yn {
|
|
|
1511
1343
|
on: "right"
|
|
1512
1344
|
},
|
|
1513
1345
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1514
|
-
buttons:
|
|
1346
|
+
buttons: o,
|
|
1515
1347
|
id: "overlays",
|
|
1516
1348
|
text: "<p><b>Overlays</b> are vector layers in various formats (WFS, GML, GeoJSON...).</p>",
|
|
1517
1349
|
when: {
|
|
1518
|
-
show:
|
|
1350
|
+
show: i
|
|
1519
1351
|
}
|
|
1520
1352
|
}), n.addStep({
|
|
1521
1353
|
attachTo: {
|
|
@@ -1523,11 +1355,11 @@ class Yn {
|
|
|
1523
1355
|
on: "right"
|
|
1524
1356
|
},
|
|
1525
1357
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1526
|
-
buttons:
|
|
1358
|
+
buttons: o,
|
|
1527
1359
|
id: "layers",
|
|
1528
1360
|
text: "<p>The <b>Datasets</b> panel contains all 3D objects in the scene.</><p>You can toggle their visibility and delete them.<p><p>Most objects leverage Giro3D's adaptive resolution to optimize their display.</p>",
|
|
1529
1361
|
when: {
|
|
1530
|
-
show:
|
|
1362
|
+
show: i
|
|
1531
1363
|
}
|
|
1532
1364
|
}), n.addStep({
|
|
1533
1365
|
attachTo: {
|
|
@@ -1535,22 +1367,22 @@ class Yn {
|
|
|
1535
1367
|
on: "right"
|
|
1536
1368
|
},
|
|
1537
1369
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1538
|
-
buttons:
|
|
1370
|
+
buttons: o,
|
|
1539
1371
|
id: "adddata",
|
|
1540
1372
|
text: "<p>You can add your own data from your computer by <b>dragging the file</b> into this page.</p><p>While you won't benefit from Giro3D's tiling mechanism, this can be a great way to quickly visualize datasets up to 100MB.</p><p>This application supports CityJSONs, IFCs, LAS/LAZs, CSV pointclouds, and simple GeoJSON features.</p>",
|
|
1541
1373
|
when: {
|
|
1542
|
-
show:
|
|
1374
|
+
show: i
|
|
1543
1375
|
}
|
|
1544
1376
|
}), n.addStep({
|
|
1545
1377
|
attachTo: {
|
|
1546
1378
|
element: "#main-view",
|
|
1547
1379
|
on: "bottom"
|
|
1548
1380
|
},
|
|
1549
|
-
buttons:
|
|
1381
|
+
buttons: o,
|
|
1550
1382
|
id: "attributes",
|
|
1551
1383
|
text: "<p>By clicking on any feature on the map, you can see its <strong>Attribute table</strong>. Clickable features display a cursor when hovered.</p>",
|
|
1552
1384
|
when: {
|
|
1553
|
-
show:
|
|
1385
|
+
show: i
|
|
1554
1386
|
}
|
|
1555
1387
|
}), n.addStep({
|
|
1556
1388
|
attachTo: {
|
|
@@ -1560,15 +1392,15 @@ class Yn {
|
|
|
1560
1392
|
buttons: [
|
|
1561
1393
|
{
|
|
1562
1394
|
action: () => {
|
|
1563
|
-
var
|
|
1564
|
-
(
|
|
1395
|
+
var r;
|
|
1396
|
+
(r = w.activeTour) == null || r.complete(), s.show(0);
|
|
1565
1397
|
},
|
|
1566
1398
|
text: "Analyzing data"
|
|
1567
1399
|
},
|
|
1568
1400
|
{
|
|
1569
1401
|
action: () => {
|
|
1570
|
-
var
|
|
1571
|
-
return (
|
|
1402
|
+
var r;
|
|
1403
|
+
return (r = w.activeTour) == null ? void 0 : r.complete();
|
|
1572
1404
|
},
|
|
1573
1405
|
secondary: !0,
|
|
1574
1406
|
text: "Exit"
|
|
@@ -1577,69 +1409,69 @@ class Yn {
|
|
|
1577
1409
|
id: "widgets",
|
|
1578
1410
|
text: "Giro3D is highly extensible. Here we added a widget to search and navigate to locations based on the French address database.",
|
|
1579
1411
|
when: {
|
|
1580
|
-
show:
|
|
1412
|
+
show: i
|
|
1581
1413
|
}
|
|
1582
|
-
}),
|
|
1414
|
+
}), s.addStep({
|
|
1583
1415
|
attachTo: {
|
|
1584
1416
|
element: "#annotations-fieldset",
|
|
1585
1417
|
on: "right"
|
|
1586
1418
|
},
|
|
1587
1419
|
beforeShowPromise: () => l("toolbar-annotations", "#annotations-fieldset"),
|
|
1588
|
-
buttons:
|
|
1420
|
+
buttons: o,
|
|
1589
1421
|
id: "annotation",
|
|
1590
1422
|
text: "<p>You can <strong>annotate</strong> any data displayed using Giro3D native tools.<br>Select the <strong>geometry</strong> of your annotation, and <strong>click</strong> on the scene to add points. <strong>Right-click</strong> to end the shape.</p>",
|
|
1591
1423
|
when: {
|
|
1592
|
-
show:
|
|
1424
|
+
show: i
|
|
1593
1425
|
}
|
|
1594
|
-
}),
|
|
1426
|
+
}), s.addStep({
|
|
1595
1427
|
attachTo: {
|
|
1596
1428
|
element: "#annotations-fieldset",
|
|
1597
1429
|
on: "right"
|
|
1598
1430
|
},
|
|
1599
1431
|
beforeShowPromise: () => l("toolbar-annotations", "#annotations-fieldset"),
|
|
1600
|
-
buttons:
|
|
1432
|
+
buttons: o,
|
|
1601
1433
|
id: "annotations",
|
|
1602
1434
|
text: "You can download your annotations as GeoJSON files. You can also upload your own by dragging them into this panel.",
|
|
1603
1435
|
when: {
|
|
1604
|
-
show:
|
|
1436
|
+
show: i
|
|
1605
1437
|
}
|
|
1606
|
-
}),
|
|
1438
|
+
}), $e("measurements") && s.addStep({
|
|
1607
1439
|
attachTo: {
|
|
1608
1440
|
element: "#panel-container",
|
|
1609
1441
|
on: "right"
|
|
1610
1442
|
},
|
|
1611
1443
|
beforeShowPromise: () => l("toolbar-measures", "#measures-fieldset"),
|
|
1612
|
-
buttons:
|
|
1444
|
+
buttons: o,
|
|
1613
1445
|
id: "measurements",
|
|
1614
1446
|
text: "You can add <strong>measurements</strong> to easily get distances betwween objects.<br>Once started, moving the mouse will display the measure. <strong>Click</strong> to save the measurement. <strong>Right-click</strong> to end.",
|
|
1615
1447
|
when: {
|
|
1616
|
-
show:
|
|
1448
|
+
show: i
|
|
1617
1449
|
}
|
|
1618
|
-
}),
|
|
1450
|
+
}), s.addStep({
|
|
1619
1451
|
attachTo: {
|
|
1620
1452
|
element: "#panel-container",
|
|
1621
1453
|
on: "right"
|
|
1622
1454
|
},
|
|
1623
1455
|
beforeShowPromise: () => l("toolbar-analysis", "#panel-container .card"),
|
|
1624
1456
|
buttons: [{ action: () => {
|
|
1625
|
-
var
|
|
1626
|
-
return (
|
|
1457
|
+
var r;
|
|
1458
|
+
return (r = w.activeTour) == null ? void 0 : r.complete();
|
|
1627
1459
|
}, text: "Done!" }],
|
|
1628
1460
|
id: "analysis",
|
|
1629
1461
|
text: "In the <strong>Analysis</strong> panel you'll find some advanced analysis tools.",
|
|
1630
1462
|
when: {
|
|
1631
|
-
show:
|
|
1463
|
+
show: i
|
|
1632
1464
|
}
|
|
1633
1465
|
});
|
|
1634
|
-
const
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1637
|
-
},
|
|
1638
|
-
const
|
|
1639
|
-
let
|
|
1640
|
-
|
|
1466
|
+
const d = () => {
|
|
1467
|
+
const r = new URL(document.URL);
|
|
1468
|
+
r.searchParams.delete("tourStep"), r.searchParams.set("tour", "none"), window.history.replaceState({}, "", r.toString());
|
|
1469
|
+
}, p = (r) => {
|
|
1470
|
+
const u = new URL(document.URL);
|
|
1471
|
+
let h = "main";
|
|
1472
|
+
r.tour.id.startsWith("navigating") ? h = "navigating" : r.tour.id.startsWith("analyzing") && (h = "analyzing"), u.searchParams.set("tour", h), u.searchParams.set("tourStep", r.step.id), window.history.replaceState({}, "", u.toString());
|
|
1641
1473
|
};
|
|
1642
|
-
return e.on("cancel",
|
|
1474
|
+
return e.on("cancel", d), e.on("complete", d), e.on("show", p), n.on("cancel", d), n.on("complete", d), n.on("show", p), s.on("cancel", d), s.on("complete", d), s.on("show", p), { analyzingTour: s, mainTour: e, navigatingTour: n };
|
|
1643
1475
|
}
|
|
1644
1476
|
getTours() {
|
|
1645
1477
|
return this._tours || (this._tours = this.buildTours()), this._tours;
|
|
@@ -1653,25 +1485,25 @@ class Yn {
|
|
|
1653
1485
|
throw new Error("module is not initialized");
|
|
1654
1486
|
const { analyzingTour: t, mainTour: e, navigatingTour: n } = this.getTours();
|
|
1655
1487
|
this._camera = this._context.view.getCameraController();
|
|
1656
|
-
const
|
|
1657
|
-
if (
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1488
|
+
const s = new URL(document.URL), o = s.searchParams.get("tour") ?? "main";
|
|
1489
|
+
if (o !== "none") {
|
|
1490
|
+
const i = s.searchParams.get("tourStep") ?? 0;
|
|
1491
|
+
o === "navigating" ? n.show(i) : o === "analyzing" ? t.show(i) : e.show(i);
|
|
1660
1492
|
}
|
|
1661
1493
|
}
|
|
1662
1494
|
}
|
|
1663
1495
|
export {
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1496
|
+
Wn as ClippingBoxAnalysis,
|
|
1497
|
+
An as CoordinatesSearch,
|
|
1498
|
+
Bn as CrossSectionAnalysis,
|
|
1667
1499
|
Nn as DownloadDataset,
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1500
|
+
On as FloodingPlaneAnalysis,
|
|
1501
|
+
zn as FrenchBanGeocoder,
|
|
1502
|
+
jn as IFCLoader,
|
|
1503
|
+
$n as OpenLayersMinimap,
|
|
1504
|
+
Hn as PLYLoader,
|
|
1505
|
+
Rn as PostProcessEntities,
|
|
1506
|
+
Vn as PotreeLoader,
|
|
1507
|
+
Un as Tour
|
|
1676
1508
|
};
|
|
1677
1509
|
//# sourceMappingURL=modules.es.js.map
|