@giro3d/piero 1.0.0-beta.3 → 1.0.0-beta.5
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 +3379 -4381
- 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 +748 -905
- 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/components/StatusBar.vue.d.ts +7 -9
- 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/stores/search.d.ts +4 -1
- 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 w, 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 x 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 f, _, E;
|
|
33
|
+
const e = a, n = I(((f = e.initialValue) == null ? void 0 : f.x) ?? 0), s = I(((_ = e.initialValue) == null ? void 0 : _.y) ?? 0), o = I(((E = e.initialValue) == null ? void 0 : E.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 C = (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
|
+
}, v = (G) => {
|
|
46
|
+
var B, N, O;
|
|
47
|
+
(B = e.cursorManager) == null || B.setCursor(null), y.domElement.removeEventListener("click", v), y.domElement.removeEventListener("mousemove", C), 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", C), y.domElement.addEventListener("click", v);
|
|
52
|
+
};
|
|
53
|
+
function u(y) {
|
|
54
|
+
n.value = y, p();
|
|
55
|
+
}
|
|
56
|
+
function h(y) {
|
|
57
|
+
s.value = y, p();
|
|
58
|
+
}
|
|
59
|
+
function g(y) {
|
|
60
|
+
o.value = y, p();
|
|
61
|
+
}
|
|
62
|
+
return (y, C) => (w(), 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: C[0] || (C[0] = (v) => u(Number.parseFloat(v.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: C[1] || (C[1] = (v) => h(Number.parseFloat(v.target.value)))
|
|
78
|
+
}, null, 40, mt),
|
|
79
|
+
e.showZ === !0 ? (w(), 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: C[2] || (C[2] = (v) => g(Number.parseFloat(v.target.value)))
|
|
86
|
+
}, null, 40, ft)) : L("", !0),
|
|
87
|
+
e.instance != null ? (w(), 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(
|
|
46
|
-
}
|
|
47
|
-
function n(i) {
|
|
48
|
-
const s = t.center.clone();
|
|
49
|
-
s.setX(i), t.setCenter(s);
|
|
135
|
+
const t = ye();
|
|
136
|
+
function e(s) {
|
|
137
|
+
t.setOrientation(s);
|
|
50
138
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
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) => (w(), 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 ? (w(), 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) => (w(), 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 g = s.list[u].fragments.bbox;
|
|
608
|
+
n.addMesh(g.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 g = i[0].toUpperCase() + i.slice(1), f = await this.regenerateClassification(
|
|
670
790
|
e.slice(1),
|
|
671
|
-
|
|
791
|
+
p
|
|
672
792
|
);
|
|
673
|
-
|
|
793
|
+
o.push({ children: f, fragments: r, name: d, treeItemName: g });
|
|
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 g = He("IfcSubtree", !0);
|
|
858
|
+
return w(), 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 ? (w(), 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 ? (w(), 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 ? (w(), 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
|
+
(w(!0), P(Y, null, he(u.classificationElement.children, (f, _) => (w(), P("li", { key: _ }, [
|
|
910
|
+
T(g, {
|
|
791
911
|
"ifc-entity": t.ifcEntity,
|
|
792
|
-
"classification-element":
|
|
912
|
+
"classification-element": f
|
|
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) ? (w(), P("div", nn, [
|
|
936
|
+
m("ul", null, [
|
|
937
|
+
(w(!0), P(Y, null, he(s(), (d, p) => (w(), 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,206 @@ 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, g, f, _, E;
|
|
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 }), ((g = o.Description) == null ? void 0 : g.value) != null && n.push({ key: "Description", value: o.Description.value }), ((f = o.PredefinedType) == null ? void 0 : f.value) != null && n.push({ key: "PredefinedType", value: o.PredefinedType.value }), ((_ = o.ObjectType) == null ? void 0 : _.value) != null && n.push({ key: "ObjectType", value: o.ObjectType.value });
|
|
978
|
+
for (const { name: y, parentName: C, value: v } of s)
|
|
979
|
+
t.has(C) || t.set(C, []), (E = t.get(C)) == null || E.push({ key: y, value: v });
|
|
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
|
-
[8e5, 4]
|
|
1019
|
+
[8e5, 4],
|
|
1020
|
+
[16e5, 3],
|
|
1021
|
+
[3e6, 1]
|
|
900
1022
|
];
|
|
901
|
-
function i
|
|
902
|
-
for (const [l,
|
|
903
|
-
if (
|
|
904
|
-
return
|
|
905
|
-
return
|
|
1023
|
+
function o(i) {
|
|
1024
|
+
for (const [l, d] of s)
|
|
1025
|
+
if (i < l)
|
|
1026
|
+
return d;
|
|
1027
|
+
return s[s.length - 1][1];
|
|
906
1028
|
}
|
|
907
|
-
return
|
|
908
|
-
|
|
1029
|
+
return Re(() => {
|
|
1030
|
+
const i = new at({
|
|
1031
|
+
source: new rt()
|
|
1032
|
+
});
|
|
1033
|
+
e.value = new ot({
|
|
909
1034
|
controls: [],
|
|
910
|
-
layers: [
|
|
1035
|
+
layers: [i],
|
|
911
1036
|
target: t.value,
|
|
912
|
-
view: new
|
|
913
|
-
center:
|
|
1037
|
+
view: new it({
|
|
1038
|
+
center: le([4, 44]),
|
|
914
1039
|
projection: "EPSG:3857",
|
|
915
1040
|
zoom: 5
|
|
916
1041
|
})
|
|
917
1042
|
});
|
|
918
|
-
let
|
|
919
|
-
const
|
|
920
|
-
var
|
|
921
|
-
const
|
|
922
|
-
if (!
|
|
923
|
-
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
).as("EPSG:4326"),
|
|
929
|
-
|
|
1043
|
+
let l = new F(), d;
|
|
1044
|
+
const p = () => {
|
|
1045
|
+
var E;
|
|
1046
|
+
const h = n.context.view.getInstance(), f = n.context.view.getCameraController().getCameraPosition(), _ = f.camera.z;
|
|
1047
|
+
if (!f.camera.equals(l)) {
|
|
1048
|
+
l = f.camera.clone();
|
|
1049
|
+
const y = new H(
|
|
1050
|
+
h.referenceCrs,
|
|
1051
|
+
l.x,
|
|
1052
|
+
l.y
|
|
1053
|
+
).as("EPSG:4326"), C = o(_), v = (E = e.value) == null ? void 0 : E.getView();
|
|
1054
|
+
v == null || v.setCenter(le([y.longitude, y.latitude])), v == null || v.setZoom(C);
|
|
930
1055
|
}
|
|
931
1056
|
};
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1057
|
+
let r = !1;
|
|
1058
|
+
const u = () => {
|
|
1059
|
+
clearTimeout(d), r || (d = setTimeout(p, 200));
|
|
1060
|
+
};
|
|
1061
|
+
n.context.events.addEventListener("updated", u), t.value && (t.value.onclick = () => {
|
|
1062
|
+
var h, g, f, _;
|
|
1063
|
+
r = !r, r ? ((h = t.value) == null || h.classList.add("collapsed"), (g = t.value) == null || g.classList.remove("expanded")) : ((f = t.value) == null || f.classList.remove("collapsed"), (_ = t.value) == null || _.classList.add("expanded"));
|
|
937
1064
|
});
|
|
938
|
-
}),
|
|
939
|
-
var
|
|
940
|
-
(
|
|
941
|
-
}), (
|
|
1065
|
+
}), Ve(() => {
|
|
1066
|
+
var i;
|
|
1067
|
+
(i = e.value) == null || i.dispose(), e.value = void 0;
|
|
1068
|
+
}), (i, l) => (w(), P("div", {
|
|
942
1069
|
ref_key: "target",
|
|
943
1070
|
ref: t,
|
|
944
1071
|
title: "Toggle minimap",
|
|
945
1072
|
class: "minimap expanded"
|
|
946
|
-
},
|
|
1073
|
+
}, [...l[0] || (l[0] = [
|
|
1074
|
+
m("div", { class: "crosshair position-absolute top-50 start-50 translate-middle" }, [
|
|
1075
|
+
m("i", { class: "bi bi-crosshair" })
|
|
1076
|
+
], -1)
|
|
1077
|
+
])], 512));
|
|
947
1078
|
}
|
|
948
|
-
}),
|
|
949
|
-
class
|
|
1079
|
+
}), dn = /* @__PURE__ */ te(un, [["__scopeId", "data-v-aada3678"]]);
|
|
1080
|
+
class $n {
|
|
950
1081
|
constructor() {
|
|
951
|
-
|
|
952
|
-
|
|
1082
|
+
c(this, "id", "builtin-minimap-openlayers");
|
|
1083
|
+
c(this, "name", "Minimap");
|
|
953
1084
|
}
|
|
954
1085
|
initialize(t) {
|
|
955
1086
|
t.widgets.addWidget({
|
|
956
|
-
component:
|
|
1087
|
+
component: dn,
|
|
957
1088
|
id: "minimap-ol"
|
|
958
1089
|
});
|
|
959
1090
|
}
|
|
960
1091
|
}
|
|
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 {
|
|
1092
|
+
const j = class j extends K {
|
|
1250
1093
|
constructor() {
|
|
1251
1094
|
super(...arguments);
|
|
1252
|
-
|
|
1253
|
-
|
|
1095
|
+
c(this, "isPickableFeatures", !0);
|
|
1096
|
+
c(this, "isPlyMesh", !0);
|
|
1254
1097
|
}
|
|
1255
1098
|
pickFeaturesFrom(e) {
|
|
1256
1099
|
if (this.geometry.hasAttribute("color") && e.face) {
|
|
1257
|
-
const n = this.geometry.getAttribute("color").array,
|
|
1258
|
-
n[
|
|
1259
|
-
n[
|
|
1260
|
-
n[
|
|
1100
|
+
const n = this.geometry.getAttribute("color").array, s = e.face, i = [{ color: new je(
|
|
1101
|
+
n[s.a * 3],
|
|
1102
|
+
n[s.a * 3 + 1],
|
|
1103
|
+
n[s.a * 3 + 2]
|
|
1261
1104
|
) }];
|
|
1262
|
-
return e.features =
|
|
1105
|
+
return e.features = i, i;
|
|
1263
1106
|
}
|
|
1264
1107
|
return [];
|
|
1265
1108
|
}
|
|
1266
1109
|
};
|
|
1267
|
-
|
|
1268
|
-
let
|
|
1269
|
-
class pn extends
|
|
1110
|
+
c(j, "isPlyMesh", (e) => $(e) && e.isPlyMesh), c(j, "isPlyPickResult", (e) => $(e) && j.isPlyMesh(e == null ? void 0 : e.object));
|
|
1111
|
+
let U = j;
|
|
1112
|
+
class pn extends fe {
|
|
1270
1113
|
constructor(e) {
|
|
1271
|
-
super(new
|
|
1272
|
-
|
|
1273
|
-
|
|
1114
|
+
super(new ue());
|
|
1115
|
+
c(this, "isPlyEntity", !0);
|
|
1116
|
+
c(this, "source");
|
|
1274
1117
|
this.source = e;
|
|
1275
1118
|
}
|
|
1276
1119
|
async preprocess() {
|
|
1277
|
-
const e = await
|
|
1278
|
-
side:
|
|
1120
|
+
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({
|
|
1121
|
+
side: ze
|
|
1279
1122
|
});
|
|
1280
|
-
|
|
1281
|
-
const l = new
|
|
1282
|
-
l.name = "plyModel",
|
|
1283
|
-
const
|
|
1284
|
-
ee(this, { filename:
|
|
1123
|
+
o.hasAttribute("color") && (i.vertexColors = !0), o.computeVertexNormals();
|
|
1124
|
+
const l = new U(o, i);
|
|
1125
|
+
l.name = "plyModel", o.computeBoundingBox(), l.position.copy(n), l.updateWorldMatrix(!0, !0), this.object3d.add(l), this.onObjectCreated(l);
|
|
1126
|
+
const d = k.getContext(this.source.url);
|
|
1127
|
+
ee(this, { filename: d.filename }), this.notifyChange(this.object3d);
|
|
1285
1128
|
}
|
|
1286
1129
|
}
|
|
1287
|
-
const
|
|
1288
|
-
const { dataset: t, instance: e } = a, n = t.config,
|
|
1130
|
+
const hn = (a) => {
|
|
1131
|
+
const { dataset: t, instance: e } = a, n = t.config, s = de(n.source.position ?? t.get("position")), o = new pn({
|
|
1289
1132
|
...n.source,
|
|
1290
|
-
at:
|
|
1133
|
+
at: s,
|
|
1291
1134
|
featureProjection: e.referenceCrs
|
|
1292
1135
|
});
|
|
1293
|
-
return Promise.resolve(
|
|
1294
|
-
},
|
|
1295
|
-
var
|
|
1296
|
-
if (!
|
|
1136
|
+
return Promise.resolve(o);
|
|
1137
|
+
}, mn = (a, t) => {
|
|
1138
|
+
var s;
|
|
1139
|
+
if (!U.isPlyPickResult(a))
|
|
1297
1140
|
return;
|
|
1298
|
-
const e = (
|
|
1141
|
+
const e = (s = a.features) == null ? void 0 : s.at(0);
|
|
1299
1142
|
if (!e)
|
|
1300
1143
|
return;
|
|
1301
1144
|
t.has("PLY") || t.set("PLY", []), t.get("PLY").push({ key: "Color", value: e.color });
|
|
1302
1145
|
};
|
|
1303
|
-
class
|
|
1146
|
+
class Hn {
|
|
1304
1147
|
constructor() {
|
|
1305
|
-
|
|
1306
|
-
|
|
1148
|
+
c(this, "id", "builtin-ply-loader");
|
|
1149
|
+
c(this, "name", "PLY");
|
|
1307
1150
|
}
|
|
1308
1151
|
initialize(t) {
|
|
1309
1152
|
t.datasets.registerDatasetType("ply", {
|
|
1310
|
-
attributeExtractor:
|
|
1311
|
-
entityBuilder:
|
|
1153
|
+
attributeExtractor: mn,
|
|
1154
|
+
entityBuilder: hn,
|
|
1312
1155
|
icon: "bi-file-earmark-binary",
|
|
1313
1156
|
name: "PLY"
|
|
1314
1157
|
});
|
|
@@ -1317,17 +1160,17 @@ class Un {
|
|
|
1317
1160
|
const fn = (a) => {
|
|
1318
1161
|
a.addEventListener("object-created", (t) => {
|
|
1319
1162
|
t.obj.traverse((n) => {
|
|
1320
|
-
var
|
|
1321
|
-
((
|
|
1163
|
+
var s;
|
|
1164
|
+
((s = n.userData) == null ? void 0 : s.class) === "IfcSpace" && (n.visible = !1);
|
|
1322
1165
|
});
|
|
1323
1166
|
});
|
|
1324
1167
|
};
|
|
1325
|
-
class
|
|
1168
|
+
class Rn {
|
|
1326
1169
|
constructor() {
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1170
|
+
c(this, "id", "builtin-post-process-entities");
|
|
1171
|
+
c(this, "name", "Post-process 3D Tiles");
|
|
1172
|
+
c(this, "_alreadyProcessedEntities", /* @__PURE__ */ new Set());
|
|
1173
|
+
c(this, "_processings", [fn]);
|
|
1331
1174
|
}
|
|
1332
1175
|
initialize(t) {
|
|
1333
1176
|
t.events.addEventListener("ready", () => {
|
|
@@ -1337,26 +1180,26 @@ class $n {
|
|
|
1337
1180
|
}
|
|
1338
1181
|
processEntities(t) {
|
|
1339
1182
|
for (const e of t.getEntities())
|
|
1340
|
-
this._alreadyProcessedEntities.has(e.id) || (
|
|
1183
|
+
this._alreadyProcessedEntities.has(e.id) || (ge(e) && this.processEntity(e, t), this._alreadyProcessedEntities.add(e.id));
|
|
1341
1184
|
}
|
|
1342
1185
|
processEntity(t, e) {
|
|
1343
1186
|
const n = { instance: e };
|
|
1344
|
-
for (const
|
|
1345
|
-
|
|
1187
|
+
for (const s of this._processings)
|
|
1188
|
+
s(t, n);
|
|
1346
1189
|
}
|
|
1347
1190
|
}
|
|
1348
1191
|
const gn = (a) => {
|
|
1349
|
-
const t = a.dataset.config, e = new
|
|
1350
|
-
source: new
|
|
1192
|
+
const t = a.dataset.config, e = new lt({
|
|
1193
|
+
source: new ct({ url: `${t.source.url}/${t.source.filename}` })
|
|
1351
1194
|
});
|
|
1352
1195
|
return ee(e, {
|
|
1353
1196
|
filename: t.source.url
|
|
1354
1197
|
}), Promise.resolve(e);
|
|
1355
1198
|
};
|
|
1356
|
-
class
|
|
1199
|
+
class Vn {
|
|
1357
1200
|
constructor() {
|
|
1358
|
-
|
|
1359
|
-
|
|
1201
|
+
c(this, "id", "builtin-potree-loader");
|
|
1202
|
+
c(this, "name", "Potree");
|
|
1360
1203
|
}
|
|
1361
1204
|
initialize(t) {
|
|
1362
1205
|
t.datasets.registerDatasetType("potree", {
|
|
@@ -1366,54 +1209,54 @@ class Gn {
|
|
|
1366
1209
|
});
|
|
1367
1210
|
}
|
|
1368
1211
|
}
|
|
1369
|
-
class
|
|
1212
|
+
class Un {
|
|
1370
1213
|
constructor() {
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1214
|
+
c(this, "id", "builtin-tour");
|
|
1215
|
+
c(this, "name", "Tour");
|
|
1216
|
+
c(this, "_camera", null);
|
|
1217
|
+
c(this, "_cameraCallback", null);
|
|
1218
|
+
c(this, "_context", null);
|
|
1219
|
+
c(this, "_tours", null);
|
|
1377
1220
|
}
|
|
1378
1221
|
initialize(t) {
|
|
1379
1222
|
this._context = t, t.events.addEventListener("ready", this.start.bind(this));
|
|
1380
1223
|
}
|
|
1381
1224
|
buildTours() {
|
|
1382
|
-
const t = this._camera, e = new
|
|
1225
|
+
const t = this._camera, e = new x.Tour({
|
|
1383
1226
|
tourName: "main",
|
|
1384
1227
|
useModalOverlay: !0
|
|
1385
|
-
}), n = new
|
|
1228
|
+
}), n = new x.Tour({
|
|
1386
1229
|
tourName: "navigating",
|
|
1387
1230
|
useModalOverlay: !0
|
|
1388
|
-
}),
|
|
1231
|
+
}), s = new x.Tour({
|
|
1389
1232
|
tourName: "analyzing",
|
|
1390
1233
|
useModalOverlay: !0
|
|
1391
|
-
}),
|
|
1234
|
+
}), o = [
|
|
1392
1235
|
{ action: () => {
|
|
1393
|
-
var
|
|
1394
|
-
return (
|
|
1236
|
+
var r;
|
|
1237
|
+
return (r = x.activeTour) == null ? void 0 : r.next();
|
|
1395
1238
|
}, text: "Next" },
|
|
1396
1239
|
{ action: () => {
|
|
1397
|
-
var
|
|
1398
|
-
return (
|
|
1240
|
+
var r;
|
|
1241
|
+
return (r = x.activeTour) == null ? void 0 : r.cancel();
|
|
1399
1242
|
}, secondary: !0, text: "Exit" }
|
|
1400
|
-
],
|
|
1401
|
-
var
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1243
|
+
], i = () => {
|
|
1244
|
+
var E, y;
|
|
1245
|
+
const r = (E = x.activeTour) == null ? void 0 : E.getCurrentStep(), u = r == null ? void 0 : r.getElement(), h = u == null ? void 0 : u.querySelector(".shepherd-text"), g = (y = x.activeTour) == null ? void 0 : y.steps;
|
|
1246
|
+
if (r == null || u == null || h == null || g == null)
|
|
1404
1247
|
return;
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1409
|
-
}, l = async (
|
|
1410
|
-
const
|
|
1411
|
-
if (
|
|
1412
|
-
return
|
|
1413
|
-
const
|
|
1414
|
-
document.querySelector(
|
|
1248
|
+
const f = document.createElement("div");
|
|
1249
|
+
f.className = "progress mt-3", f.setAttribute("role", "progressbar"), f.style.height = "2px";
|
|
1250
|
+
const _ = document.createElement("div");
|
|
1251
|
+
_.className = "progress-bar bg-success", _.style.width = `${100 * (g.indexOf(r) / g.length)}%`, f.appendChild(_), h.appendChild(f);
|
|
1252
|
+
}, l = async (r, u) => new Promise((h) => {
|
|
1253
|
+
const g = document.getElementById(r);
|
|
1254
|
+
if (g && !g.classList.contains("active") && g.click(), document.querySelector(u))
|
|
1255
|
+
return h(document.querySelector(u));
|
|
1256
|
+
const f = new MutationObserver(() => {
|
|
1257
|
+
document.querySelector(u) && (f.disconnect(), h(document.querySelector(u)));
|
|
1415
1258
|
});
|
|
1416
|
-
|
|
1259
|
+
f.observe(document.body, {
|
|
1417
1260
|
childList: !0,
|
|
1418
1261
|
subtree: !0
|
|
1419
1262
|
});
|
|
@@ -1422,22 +1265,22 @@ class Yn {
|
|
|
1422
1265
|
buttons: [
|
|
1423
1266
|
{
|
|
1424
1267
|
action: () => {
|
|
1425
|
-
var
|
|
1426
|
-
(
|
|
1268
|
+
var r;
|
|
1269
|
+
(r = x.activeTour) == null || r.complete(), n.show(0);
|
|
1427
1270
|
},
|
|
1428
1271
|
text: "Navigating"
|
|
1429
1272
|
},
|
|
1430
1273
|
{
|
|
1431
1274
|
action: () => {
|
|
1432
|
-
var
|
|
1433
|
-
(
|
|
1275
|
+
var r;
|
|
1276
|
+
(r = x.activeTour) == null || r.complete(), s.show(0);
|
|
1434
1277
|
},
|
|
1435
1278
|
text: "Analyzing data"
|
|
1436
1279
|
},
|
|
1437
1280
|
{
|
|
1438
1281
|
action: () => {
|
|
1439
|
-
var
|
|
1440
|
-
return (
|
|
1282
|
+
var r;
|
|
1283
|
+
return (r = x.activeTour) == null ? void 0 : r.cancel();
|
|
1441
1284
|
},
|
|
1442
1285
|
secondary: !0,
|
|
1443
1286
|
text: "Exit"
|
|
@@ -1448,25 +1291,25 @@ class Yn {
|
|
|
1448
1291
|
text: "<p>Welcome to <strong>Piero</strong>, the Giro3D application.<br/>We can guide you through the different features.</p>",
|
|
1449
1292
|
title: "Welcome!",
|
|
1450
1293
|
when: {
|
|
1451
|
-
show:
|
|
1294
|
+
show: i
|
|
1452
1295
|
}
|
|
1453
1296
|
}), n.addStep({
|
|
1454
1297
|
attachTo: {
|
|
1455
1298
|
element: "#main-view",
|
|
1456
1299
|
on: "bottom"
|
|
1457
1300
|
},
|
|
1458
|
-
buttons:
|
|
1301
|
+
buttons: o,
|
|
1459
1302
|
id: "view",
|
|
1460
1303
|
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
1304
|
when: {
|
|
1462
|
-
show:
|
|
1305
|
+
show: i
|
|
1463
1306
|
}
|
|
1464
1307
|
}), n.addStep({
|
|
1465
1308
|
attachTo: {
|
|
1466
1309
|
element: "#main-view",
|
|
1467
1310
|
on: "bottom"
|
|
1468
1311
|
},
|
|
1469
|
-
buttons:
|
|
1312
|
+
buttons: o,
|
|
1470
1313
|
id: "navigate",
|
|
1471
1314
|
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
1315
|
when: {
|
|
@@ -1474,11 +1317,11 @@ class Yn {
|
|
|
1474
1317
|
this._cameraCallback && t.removeEventListener("interaction-end", this._cameraCallback), this._cameraCallback = null;
|
|
1475
1318
|
},
|
|
1476
1319
|
show: () => {
|
|
1477
|
-
let
|
|
1320
|
+
let r = 0;
|
|
1478
1321
|
this._cameraCallback = () => {
|
|
1479
|
-
var
|
|
1480
|
-
|
|
1481
|
-
}, t.addEventListener("interaction-end", this._cameraCallback),
|
|
1322
|
+
var u;
|
|
1323
|
+
r += 1, r > 2 && ((u = x.activeTour) == null || u.next());
|
|
1324
|
+
}, t.addEventListener("interaction-end", this._cameraCallback), i();
|
|
1482
1325
|
}
|
|
1483
1326
|
}
|
|
1484
1327
|
}), n.addStep({
|
|
@@ -1487,11 +1330,11 @@ class Yn {
|
|
|
1487
1330
|
on: "right"
|
|
1488
1331
|
},
|
|
1489
1332
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1490
|
-
buttons:
|
|
1333
|
+
buttons: o,
|
|
1491
1334
|
id: "toolbar-layers",
|
|
1492
1335
|
text: "<p>Giro3D supports multiple datasets.</p><p>You can toggle datasets as you wish with the <b>Datasets</b> panel.</p>",
|
|
1493
1336
|
when: {
|
|
1494
|
-
show:
|
|
1337
|
+
show: i
|
|
1495
1338
|
}
|
|
1496
1339
|
}), n.addStep({
|
|
1497
1340
|
attachTo: {
|
|
@@ -1499,11 +1342,11 @@ class Yn {
|
|
|
1499
1342
|
on: "right"
|
|
1500
1343
|
},
|
|
1501
1344
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1502
|
-
buttons:
|
|
1345
|
+
buttons: o,
|
|
1503
1346
|
id: "basemaps",
|
|
1504
1347
|
text: "<p><b>Basemaps</b> are color and elevation layers that make the basic shape and aspect of the <b>Map</b>.</p>",
|
|
1505
1348
|
when: {
|
|
1506
|
-
show:
|
|
1349
|
+
show: i
|
|
1507
1350
|
}
|
|
1508
1351
|
}), n.addStep({
|
|
1509
1352
|
attachTo: {
|
|
@@ -1511,11 +1354,11 @@ class Yn {
|
|
|
1511
1354
|
on: "right"
|
|
1512
1355
|
},
|
|
1513
1356
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1514
|
-
buttons:
|
|
1357
|
+
buttons: o,
|
|
1515
1358
|
id: "overlays",
|
|
1516
1359
|
text: "<p><b>Overlays</b> are vector layers in various formats (WFS, GML, GeoJSON...).</p>",
|
|
1517
1360
|
when: {
|
|
1518
|
-
show:
|
|
1361
|
+
show: i
|
|
1519
1362
|
}
|
|
1520
1363
|
}), n.addStep({
|
|
1521
1364
|
attachTo: {
|
|
@@ -1523,11 +1366,11 @@ class Yn {
|
|
|
1523
1366
|
on: "right"
|
|
1524
1367
|
},
|
|
1525
1368
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1526
|
-
buttons:
|
|
1369
|
+
buttons: o,
|
|
1527
1370
|
id: "layers",
|
|
1528
1371
|
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
1372
|
when: {
|
|
1530
|
-
show:
|
|
1373
|
+
show: i
|
|
1531
1374
|
}
|
|
1532
1375
|
}), n.addStep({
|
|
1533
1376
|
attachTo: {
|
|
@@ -1535,22 +1378,22 @@ class Yn {
|
|
|
1535
1378
|
on: "right"
|
|
1536
1379
|
},
|
|
1537
1380
|
beforeShowPromise: () => l("toolbar-datasets", "#datasets-drop-zone"),
|
|
1538
|
-
buttons:
|
|
1381
|
+
buttons: o,
|
|
1539
1382
|
id: "adddata",
|
|
1540
1383
|
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
1384
|
when: {
|
|
1542
|
-
show:
|
|
1385
|
+
show: i
|
|
1543
1386
|
}
|
|
1544
1387
|
}), n.addStep({
|
|
1545
1388
|
attachTo: {
|
|
1546
1389
|
element: "#main-view",
|
|
1547
1390
|
on: "bottom"
|
|
1548
1391
|
},
|
|
1549
|
-
buttons:
|
|
1392
|
+
buttons: o,
|
|
1550
1393
|
id: "attributes",
|
|
1551
1394
|
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
1395
|
when: {
|
|
1553
|
-
show:
|
|
1396
|
+
show: i
|
|
1554
1397
|
}
|
|
1555
1398
|
}), n.addStep({
|
|
1556
1399
|
attachTo: {
|
|
@@ -1560,15 +1403,15 @@ class Yn {
|
|
|
1560
1403
|
buttons: [
|
|
1561
1404
|
{
|
|
1562
1405
|
action: () => {
|
|
1563
|
-
var
|
|
1564
|
-
(
|
|
1406
|
+
var r;
|
|
1407
|
+
(r = x.activeTour) == null || r.complete(), s.show(0);
|
|
1565
1408
|
},
|
|
1566
1409
|
text: "Analyzing data"
|
|
1567
1410
|
},
|
|
1568
1411
|
{
|
|
1569
1412
|
action: () => {
|
|
1570
|
-
var
|
|
1571
|
-
return (
|
|
1413
|
+
var r;
|
|
1414
|
+
return (r = x.activeTour) == null ? void 0 : r.complete();
|
|
1572
1415
|
},
|
|
1573
1416
|
secondary: !0,
|
|
1574
1417
|
text: "Exit"
|
|
@@ -1577,69 +1420,69 @@ class Yn {
|
|
|
1577
1420
|
id: "widgets",
|
|
1578
1421
|
text: "Giro3D is highly extensible. Here we added a widget to search and navigate to locations based on the French address database.",
|
|
1579
1422
|
when: {
|
|
1580
|
-
show:
|
|
1423
|
+
show: i
|
|
1581
1424
|
}
|
|
1582
|
-
}),
|
|
1425
|
+
}), s.addStep({
|
|
1583
1426
|
attachTo: {
|
|
1584
1427
|
element: "#annotations-fieldset",
|
|
1585
1428
|
on: "right"
|
|
1586
1429
|
},
|
|
1587
1430
|
beforeShowPromise: () => l("toolbar-annotations", "#annotations-fieldset"),
|
|
1588
|
-
buttons:
|
|
1431
|
+
buttons: o,
|
|
1589
1432
|
id: "annotation",
|
|
1590
1433
|
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
1434
|
when: {
|
|
1592
|
-
show:
|
|
1435
|
+
show: i
|
|
1593
1436
|
}
|
|
1594
|
-
}),
|
|
1437
|
+
}), s.addStep({
|
|
1595
1438
|
attachTo: {
|
|
1596
1439
|
element: "#annotations-fieldset",
|
|
1597
1440
|
on: "right"
|
|
1598
1441
|
},
|
|
1599
1442
|
beforeShowPromise: () => l("toolbar-annotations", "#annotations-fieldset"),
|
|
1600
|
-
buttons:
|
|
1443
|
+
buttons: o,
|
|
1601
1444
|
id: "annotations",
|
|
1602
1445
|
text: "You can download your annotations as GeoJSON files. You can also upload your own by dragging them into this panel.",
|
|
1603
1446
|
when: {
|
|
1604
|
-
show:
|
|
1447
|
+
show: i
|
|
1605
1448
|
}
|
|
1606
|
-
}),
|
|
1449
|
+
}), $e("measurements") && s.addStep({
|
|
1607
1450
|
attachTo: {
|
|
1608
1451
|
element: "#panel-container",
|
|
1609
1452
|
on: "right"
|
|
1610
1453
|
},
|
|
1611
1454
|
beforeShowPromise: () => l("toolbar-measures", "#measures-fieldset"),
|
|
1612
|
-
buttons:
|
|
1455
|
+
buttons: o,
|
|
1613
1456
|
id: "measurements",
|
|
1614
1457
|
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
1458
|
when: {
|
|
1616
|
-
show:
|
|
1459
|
+
show: i
|
|
1617
1460
|
}
|
|
1618
|
-
}),
|
|
1461
|
+
}), s.addStep({
|
|
1619
1462
|
attachTo: {
|
|
1620
1463
|
element: "#panel-container",
|
|
1621
1464
|
on: "right"
|
|
1622
1465
|
},
|
|
1623
1466
|
beforeShowPromise: () => l("toolbar-analysis", "#panel-container .card"),
|
|
1624
1467
|
buttons: [{ action: () => {
|
|
1625
|
-
var
|
|
1626
|
-
return (
|
|
1468
|
+
var r;
|
|
1469
|
+
return (r = x.activeTour) == null ? void 0 : r.complete();
|
|
1627
1470
|
}, text: "Done!" }],
|
|
1628
1471
|
id: "analysis",
|
|
1629
1472
|
text: "In the <strong>Analysis</strong> panel you'll find some advanced analysis tools.",
|
|
1630
1473
|
when: {
|
|
1631
|
-
show:
|
|
1474
|
+
show: i
|
|
1632
1475
|
}
|
|
1633
1476
|
});
|
|
1634
|
-
const
|
|
1635
|
-
const
|
|
1636
|
-
|
|
1637
|
-
},
|
|
1638
|
-
const
|
|
1639
|
-
let
|
|
1640
|
-
|
|
1477
|
+
const d = () => {
|
|
1478
|
+
const r = new URL(document.URL);
|
|
1479
|
+
r.searchParams.delete("tourStep"), r.searchParams.set("tour", "none"), window.history.replaceState({}, "", r.toString());
|
|
1480
|
+
}, p = (r) => {
|
|
1481
|
+
const u = new URL(document.URL);
|
|
1482
|
+
let h = "main";
|
|
1483
|
+
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
1484
|
};
|
|
1642
|
-
return e.on("cancel",
|
|
1485
|
+
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
1486
|
}
|
|
1644
1487
|
getTours() {
|
|
1645
1488
|
return this._tours || (this._tours = this.buildTours()), this._tours;
|
|
@@ -1653,25 +1496,25 @@ class Yn {
|
|
|
1653
1496
|
throw new Error("module is not initialized");
|
|
1654
1497
|
const { analyzingTour: t, mainTour: e, navigatingTour: n } = this.getTours();
|
|
1655
1498
|
this._camera = this._context.view.getCameraController();
|
|
1656
|
-
const
|
|
1657
|
-
if (
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1499
|
+
const s = new URL(document.URL), o = s.searchParams.get("tour") ?? "main";
|
|
1500
|
+
if (o !== "none") {
|
|
1501
|
+
const i = s.searchParams.get("tourStep") ?? 0;
|
|
1502
|
+
o === "navigating" ? n.show(i) : o === "analyzing" ? t.show(i) : e.show(i);
|
|
1660
1503
|
}
|
|
1661
1504
|
}
|
|
1662
1505
|
}
|
|
1663
1506
|
export {
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1507
|
+
Wn as ClippingBoxAnalysis,
|
|
1508
|
+
An as CoordinatesSearch,
|
|
1509
|
+
Bn as CrossSectionAnalysis,
|
|
1667
1510
|
Nn as DownloadDataset,
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1511
|
+
On as FloodingPlaneAnalysis,
|
|
1512
|
+
zn as FrenchBanGeocoder,
|
|
1513
|
+
jn as IFCLoader,
|
|
1514
|
+
$n as OpenLayersMinimap,
|
|
1515
|
+
Hn as PLYLoader,
|
|
1516
|
+
Rn as PostProcessEntities,
|
|
1517
|
+
Vn as PotreeLoader,
|
|
1518
|
+
Un as Tour
|
|
1676
1519
|
};
|
|
1677
1520
|
//# sourceMappingURL=modules.es.js.map
|