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