@realsee/dnalogel 3.6.0 → 3.7.0
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/CruisePlugin/BaseController.d.ts +159 -0
- package/dist/CruisePlugin/Move.d.ts +40 -0
- package/dist/CruisePlugin/Work.d.ts +120 -0
- package/dist/CruisePlugin/index.d.ts +6 -4
- package/dist/CruisePlugin/typing.d.ts +2 -2
- package/dist/CruisePlugin/utils/getFiveStateOnCurve.d.ts +11 -0
- package/dist/GuideLinePlugin/Controller.d.ts +1 -6
- package/dist/index.cjs.js +54 -54
- package/dist/index.js +3565 -3466
- package/dist/index.umd.js +47 -47
- package/dist/shared-utils/five/fiveLoaded.d.ts +2 -0
- package/dist/shared-utils/five/fiveReady.d.ts +2 -0
- package/libs/CruisePlugin/BaseController.d.ts +159 -0
- package/libs/CruisePlugin/BaseController.js +231 -0
- package/libs/CruisePlugin/Move.d.ts +40 -0
- package/libs/CruisePlugin/Move.js +137 -0
- package/libs/CruisePlugin/Work.d.ts +120 -0
- package/libs/CruisePlugin/Work.js +598 -0
- package/libs/CruisePlugin/index.d.ts +6 -4
- package/libs/CruisePlugin/index.js +19 -12
- package/libs/CruisePlugin/typing.d.ts +2 -2
- package/libs/CruisePlugin/utils/getFiveStateOnCurve.d.ts +11 -0
- package/libs/CruisePlugin/utils/getFiveStateOnCurve.js +11 -0
- package/libs/GuideLinePlugin/Controller.d.ts +1 -6
- package/libs/GuideLinePlugin/Controller.js +49 -62
- package/libs/GuideLinePlugin/GuideLineItem/index.js +53 -43
- package/libs/GuideLinePlugin/GuideLineItem.js +14 -10
- package/libs/GuideLinePlugin/index.js +21 -17
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +126 -119
- package/libs/shared-utils/five/fiveLoaded.d.ts +2 -0
- package/libs/shared-utils/five/fiveLoaded.js +30 -0
- package/libs/shared-utils/five/fiveReady.d.ts +2 -0
- package/libs/shared-utils/five/fiveReady.js +28 -0
- package/libs/shared-utils/formatRad.d.ts +7 -0
- package/libs/shared-utils/formatRad.js +7 -0
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +3 -3
- package/dist/CruisePlugin/Controller.d.ts +0 -171
- package/dist/CruisePlugin/utils/linerValue.d.ts +0 -1
- package/libs/CruisePlugin/Controller.d.ts +0 -171
- package/libs/CruisePlugin/Controller.js +0 -760
- /package/dist/{CruisePlugin/utils → shared-utils}/formatRad.d.ts +0 -0
- /package/dist/{CruisePlugin/utils/vectorToCoordinates.d.ts → shared-utils/vectorToCoordinate.d.ts} +0 -0
- /package/libs/{CruisePlugin/utils/vectorToCoordinates.d.ts → shared-utils/vectorToCoordinate.d.ts} +0 -0
- /package/libs/{CruisePlugin/utils/vectorToCoordinates.js → shared-utils/vectorToCoordinate.js} +0 -0
|
@@ -82,7 +82,7 @@ export interface PluginState extends BasePluginWithData.State {
|
|
|
82
82
|
speed: number;
|
|
83
83
|
config?: {
|
|
84
84
|
/** 速度配置 */
|
|
85
|
-
speedConfig?: {
|
|
85
|
+
speedConfig?: Partial<{
|
|
86
86
|
/** 旋转速度 */
|
|
87
87
|
rotateSpeed: number;
|
|
88
88
|
/** 旋转速度单位 */
|
|
@@ -91,7 +91,7 @@ export interface PluginState extends BasePluginWithData.State {
|
|
|
91
91
|
moveSpeed: number;
|
|
92
92
|
/** 移动速度单位 */
|
|
93
93
|
moveSpeedUnit: 'm/s' | 'm/ms';
|
|
94
|
-
}
|
|
94
|
+
}>;
|
|
95
95
|
/** five 走点动画 */
|
|
96
96
|
moveEffect?: MoveEffect;
|
|
97
97
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare function getFiveStateOnCurve(curve: THREE.Curve<THREE.Vector3>, progress: number, curveOffset: Partial<{
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
z: number;
|
|
6
|
+
}>): {
|
|
7
|
+
offset: THREE.Vector3;
|
|
8
|
+
longitude: number;
|
|
9
|
+
latitude: number;
|
|
10
|
+
distance: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as g from "three";
|
|
2
|
+
import { vectorToCoordinates as f } from "../../shared-utils/vectorToCoordinate.js";
|
|
3
|
+
import "../../shared-utils/formatRad.js";
|
|
4
|
+
function A(o, n, t) {
|
|
5
|
+
var e, i, r;
|
|
6
|
+
const a = new g.Vector3().fromArray([(e = t.x) != null ? e : 0, (i = t.y) != null ? i : 0, (r = t.z) != null ? r : 0]), c = o.getPointAt(n).clone().add(a), d = o.getTangentAt(n), { longitude: m, latitude: s } = f(d);
|
|
7
|
+
return { offset: c.clone(), longitude: m, latitude: s, distance: 0 };
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
A as getFiveStateOnCurve
|
|
11
|
+
};
|
|
@@ -4,10 +4,9 @@ import type { EventMap, PluginData, PluginServerData, PluginState } from './typi
|
|
|
4
4
|
import type * as PluginType from './typing';
|
|
5
5
|
import type { Config } from '../base/BasePlugin';
|
|
6
6
|
import { GuideLineItem } from './GuideLineItem';
|
|
7
|
-
import CruisePluginController from '../CruisePlugin/
|
|
7
|
+
import CruisePluginController from '../CruisePlugin/Move';
|
|
8
8
|
export declare const pluginFlag: (name: string) => string;
|
|
9
9
|
export default class Controller extends BasePluginWithData.Controller<PluginState, EventMap, PluginServerData, PluginData> {
|
|
10
|
-
readonly version = "v1.1.0";
|
|
11
10
|
readonly name = "GuideLinePlugin";
|
|
12
11
|
readonly cruisePlugin: CruisePluginController;
|
|
13
12
|
/** GuideLineItem 索引 */
|
|
@@ -60,9 +59,5 @@ export default class Controller extends BasePluginWithData.Controller<PluginStat
|
|
|
60
59
|
private handleEnable;
|
|
61
60
|
private handleVisible;
|
|
62
61
|
private disposedErrorLog;
|
|
63
|
-
/**
|
|
64
|
-
* @description: Wait for five model ready
|
|
65
|
-
*/
|
|
66
|
-
private waitFiveLoaded;
|
|
67
62
|
private getDataWithoutVersion;
|
|
68
63
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var M = Object.prototype.hasOwnProperty,
|
|
4
|
-
var c = (s, o, t) => o in s ?
|
|
1
|
+
var C = Object.defineProperty;
|
|
2
|
+
var T = Object.getOwnPropertySymbols;
|
|
3
|
+
var M = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var c = (s, o, t) => o in s ? C(s, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[o] = t, f = (s, o) => {
|
|
5
5
|
for (var t in o || (o = {}))
|
|
6
6
|
M.call(o, t) && c(s, t, o[t]);
|
|
7
|
-
if (
|
|
8
|
-
for (var t of
|
|
9
|
-
|
|
7
|
+
if (T)
|
|
8
|
+
for (var t of T(o))
|
|
9
|
+
O.call(o, t) && c(s, t, o[t]);
|
|
10
10
|
return s;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var h = (s, o, t) => (c(s, typeof o != "symbol" ? o + "" : o, t), t);
|
|
13
13
|
var u = (s, o, t) => new Promise((i, a) => {
|
|
14
14
|
var m = (p) => {
|
|
15
15
|
try {
|
|
@@ -26,12 +26,13 @@ var u = (s, o, t) => new Promise((i, a) => {
|
|
|
26
26
|
}, r = (p) => p.done ? i(p.value) : Promise.resolve(p.value).then(m, e);
|
|
27
27
|
r((t = t.apply(s, o)).next());
|
|
28
28
|
});
|
|
29
|
-
import { Controller as
|
|
30
|
-
import { equal as
|
|
31
|
-
import { GuideLineItem as
|
|
32
|
-
import
|
|
33
|
-
import { objectAssignDeepExports as
|
|
34
|
-
import * as
|
|
29
|
+
import { Controller as x } from "../base/BasePluginWithData.js";
|
|
30
|
+
import { equal as N } from "../shared-utils/equal.js";
|
|
31
|
+
import { GuideLineItem as $ } from "./GuideLineItem/index.js";
|
|
32
|
+
import k from "../CruisePlugin/Move.js";
|
|
33
|
+
import { objectAssignDeepExports as A } from "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
34
|
+
import * as G from "three";
|
|
35
|
+
import { waitFiveLoaded as P } from "../shared-utils/five/fiveLoaded.js";
|
|
35
36
|
import "../base/BasePlugin.js";
|
|
36
37
|
import "../shared-utils/Subscribe.js";
|
|
37
38
|
import "hammerjs";
|
|
@@ -189,37 +190,39 @@ import "./utils/index.js";
|
|
|
189
190
|
import "../shared-utils/to.js";
|
|
190
191
|
import "../shared-utils/five/changeMode.js";
|
|
191
192
|
import "../shared-utils/nearlyEqual.js";
|
|
193
|
+
import "../CruisePlugin/Work.js";
|
|
192
194
|
import "./index.js";
|
|
193
195
|
import "./Controller.js";
|
|
194
196
|
import "../CruisePlugin/utils/coordinatesAngle.js";
|
|
195
197
|
import "../CruisePlugin/utils/coordinatesToVector.js";
|
|
196
198
|
import "../CruisePlugin/utils/safeCall.js";
|
|
197
|
-
import "../CruisePlugin/utils/vectorToCoordinates.js";
|
|
198
|
-
import "../CruisePlugin/utils/formatRad.js";
|
|
199
|
-
import "../CruisePlugin/utils/linerValue.js";
|
|
200
199
|
import "../CruisePlugin/utils/sleep.js";
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
import "../shared-utils/vectorToCoordinate.js";
|
|
201
|
+
import "../shared-utils/formatRad.js";
|
|
202
|
+
import "../CruisePlugin/BaseController.js";
|
|
203
|
+
import "../CruisePlugin/utils/getFiveStateOnCurve.js";
|
|
204
|
+
import "../shared-utils/five/fiveReady.js";
|
|
205
|
+
const b = "GuideLinePlugin", g = `${b}`, Zr = (s) => `${g}--${s}`;
|
|
206
|
+
class te extends x {
|
|
203
207
|
constructor(t, i) {
|
|
204
208
|
super(t, i);
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
d(this, "cruisePlugin");
|
|
209
|
+
h(this, "name", b);
|
|
210
|
+
h(this, "cruisePlugin");
|
|
208
211
|
/** GuideLineItem 索引 */
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
h(this, "itemMap", /* @__PURE__ */ new Map());
|
|
213
|
+
h(this, "state", {
|
|
211
214
|
visible: !1,
|
|
212
215
|
enabled: !0
|
|
213
216
|
});
|
|
214
|
-
|
|
217
|
+
h(this, "data");
|
|
215
218
|
/** 当新增一根线时,整体高度的偏移值 */
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
h(this, "heightOffset", 0);
|
|
220
|
+
h(this, "_config");
|
|
221
|
+
h(this, "_disposed", !1);
|
|
222
|
+
h(this, "disposedErrorLog", () => {
|
|
220
223
|
console.error(`${g} is disposed`);
|
|
221
224
|
});
|
|
222
|
-
this._config = i != null ? i : {}, this.cruisePlugin = new
|
|
225
|
+
this._config = i != null ? i : {}, this.cruisePlugin = new k(t), Object.assign(window, { [`__${b}_DEBUG__`]: this });
|
|
223
226
|
}
|
|
224
227
|
get config() {
|
|
225
228
|
return this._config;
|
|
@@ -229,7 +232,7 @@ class Qr extends P {
|
|
|
229
232
|
}
|
|
230
233
|
load(t, i, a = !0) {
|
|
231
234
|
return u(this, null, function* () {
|
|
232
|
-
var v,
|
|
235
|
+
var v, I, w, E, y, D, L;
|
|
233
236
|
if (this.disposed)
|
|
234
237
|
return;
|
|
235
238
|
const m = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, e = yield this.formatData(t);
|
|
@@ -238,14 +241,14 @@ class Qr extends P {
|
|
|
238
241
|
panorama_style: {
|
|
239
242
|
visible: !!(!e.lines && e.routes),
|
|
240
243
|
unit_length: (v = r == null ? void 0 : r.unitHeight) != null ? v : 0.4,
|
|
241
|
-
width: (
|
|
242
|
-
texture: { url: (
|
|
244
|
+
width: (I = r == null ? void 0 : r.unitWidth) != null ? I : 0.6,
|
|
245
|
+
texture: { url: (w = r == null ? void 0 : r.arrowTextureUrl) != null ? w : this.staticPrefix + "/release/web/arrow6.b6ce0c62.png" }
|
|
243
246
|
}
|
|
244
|
-
},
|
|
247
|
+
}, d = (y = (E = e.routes) == null ? void 0 : E.map((l) => {
|
|
245
248
|
var _;
|
|
246
|
-
return
|
|
247
|
-
})) != null ? y : [],
|
|
248
|
-
yield this.
|
|
249
|
+
return A({}, n, { id: (_ = l.id) != null ? _ : Date.now(), pano_group: l.panoIndexList });
|
|
250
|
+
})) != null ? y : [], S = (L = (D = e.lines) == null ? void 0 : D.map((l) => A({}, n, l))) != null ? L : [], V = [...d, ...S];
|
|
251
|
+
yield P(this.five), this.clear(), V.forEach((l) => {
|
|
249
252
|
this.addGuideLineItem(l);
|
|
250
253
|
}), this.updateTagsEnable(), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), i && this.setState(i, { userAction: a }), this.hooks.emit("dataLoaded", e), console.debug(`${g} loaded`, e);
|
|
251
254
|
});
|
|
@@ -284,13 +287,13 @@ class Qr extends P {
|
|
|
284
287
|
if (this.disposed)
|
|
285
288
|
return this.disposedErrorLog();
|
|
286
289
|
const a = f({}, this.state);
|
|
287
|
-
this.state = f(f({}, this.state), t), t.visible !== void 0 && t.visible !== a.visible && this.handleVisible(t.visible, i == null ? void 0 : i.userAction), t.enabled !== void 0 && t.enabled !== a.enabled && this.handleEnable(t.enabled, i == null ? void 0 : i.userAction),
|
|
290
|
+
this.state = f(f({}, this.state), t), t.visible !== void 0 && t.visible !== a.visible && this.handleVisible(t.visible, i == null ? void 0 : i.userAction), t.enabled !== void 0 && t.enabled !== a.enabled && this.handleEnable(t.enabled, i == null ? void 0 : i.userAction), N(a, this.state, { deep: !0 }) || (this.hooks.emit("stateChange", { state: this.state, prevState: a, userAction: (m = i == null ? void 0 : i.userAction) != null ? m : !0 }), this.five.needsRender = !0);
|
|
288
291
|
}
|
|
289
292
|
/** 添加一个 GuideLineItem */
|
|
290
293
|
addGuideLineItem(t) {
|
|
291
294
|
const i = t.render_id || t.id, a = this.itemMap.get(i);
|
|
292
295
|
a && this.removeGuideLineItem(a);
|
|
293
|
-
const m = new
|
|
296
|
+
const m = new $({ five: this.five, id: i, plugin: this });
|
|
294
297
|
return this.itemMap.set(i, m), t && m.setData(t), this.heightOffset += 1e-4, m.modelItem.setHeightOffset(this.heightOffset), m.panoramaItem.setHeightOffset(this.heightOffset), m;
|
|
295
298
|
}
|
|
296
299
|
/** 获取 Plugin 内的 GuideLineItem */
|
|
@@ -308,21 +311,21 @@ class Qr extends P {
|
|
|
308
311
|
return Array.isArray(e) && e.every((r) => typeof r == "number");
|
|
309
312
|
}
|
|
310
313
|
function a(e, r) {
|
|
311
|
-
return new
|
|
314
|
+
return new G.Vector3().fromArray(e).distanceTo(new G.Vector3().fromArray(r)) < 0.01;
|
|
312
315
|
}
|
|
313
316
|
function m(e) {
|
|
314
317
|
var p;
|
|
315
318
|
const r = (p = e.tag) == null ? void 0 : p.position;
|
|
316
319
|
return i(r) ? t.every((n) => {
|
|
317
|
-
var
|
|
318
|
-
return i((
|
|
320
|
+
var d;
|
|
321
|
+
return i((d = n.tag) == null ? void 0 : d.position) ? !a(r, n.tag.position) : !0;
|
|
319
322
|
}) : !1;
|
|
320
323
|
}
|
|
321
324
|
this.itemMap.forEach((e) => {
|
|
322
325
|
const r = e.modelItem.startTagContainer, p = e.modelItem.endTagContainer, n = m(r);
|
|
323
326
|
n && t.push(r), r.plugin.setState({ enabled: n }, {});
|
|
324
|
-
const
|
|
325
|
-
|
|
327
|
+
const d = m(p);
|
|
328
|
+
d && t.push(p), p.plugin.setState({ enabled: d }, {});
|
|
326
329
|
});
|
|
327
330
|
}
|
|
328
331
|
/** 清空所有 GuideLineItem */
|
|
@@ -337,27 +340,11 @@ class Qr extends P {
|
|
|
337
340
|
handleVisible(t, i = !0) {
|
|
338
341
|
this.state.enabled && this.hooks.emit(t ? "show" : "hide", { userAction: i });
|
|
339
342
|
}
|
|
340
|
-
/**
|
|
341
|
-
* @description: Wait for five model ready
|
|
342
|
-
*/
|
|
343
|
-
waitFiveLoaded() {
|
|
344
|
-
return u(this, null, function* () {
|
|
345
|
-
return new Promise((t) => {
|
|
346
|
-
if (this.five.work) {
|
|
347
|
-
t();
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
this.five.once("loaded", () => {
|
|
351
|
-
t();
|
|
352
|
-
});
|
|
353
|
-
});
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
343
|
getDataWithoutVersion(t) {
|
|
357
344
|
return typeof t == "object" && t !== null && t.version && t.data ? t.data : t;
|
|
358
345
|
}
|
|
359
346
|
}
|
|
360
347
|
export {
|
|
361
|
-
|
|
362
|
-
|
|
348
|
+
te as default,
|
|
349
|
+
Zr as pluginFlag
|
|
363
350
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var S = Object.defineProperty;
|
|
2
2
|
var w = Object.getOwnPropertySymbols;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var k = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var c = (o, e, t) => e in o ? S(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, g = (o, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
|
-
|
|
6
|
+
k.call(e, t) && c(o, t, e[t]);
|
|
7
7
|
if (w)
|
|
8
8
|
for (var t of w(e))
|
|
9
|
-
b.call(e, t) &&
|
|
9
|
+
b.call(e, t) && c(o, t, e[t]);
|
|
10
10
|
return o;
|
|
11
11
|
};
|
|
12
|
-
var s = (o, e, t) => (
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
var s = (o, e, t) => (c(o, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
|
+
var d = (o, e, t) => new Promise((n, i) => {
|
|
14
|
+
var u = (r) => {
|
|
15
15
|
try {
|
|
16
16
|
a(t.next(r));
|
|
17
17
|
} catch (m) {
|
|
@@ -23,15 +23,16 @@ var g = (o, e, t) => new Promise((n, i) => {
|
|
|
23
23
|
} catch (m) {
|
|
24
24
|
i(m);
|
|
25
25
|
}
|
|
26
|
-
}, a = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(
|
|
26
|
+
}, a = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(u, l);
|
|
27
27
|
a((t = t.apply(o, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import { GuideLineModeItem as
|
|
30
|
-
import x from "../../
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
29
|
+
import { GuideLineModeItem as v } from "../GuideLineModeItem/index.js";
|
|
30
|
+
import { logError as x } from "../../shared-utils/log.js";
|
|
31
|
+
import { to as y } from "../../shared-utils/to.js";
|
|
32
|
+
import { Subscribe as G } from "@realsee/five";
|
|
33
|
+
import { changeMode as L } from "../../shared-utils/five/changeMode.js";
|
|
34
|
+
import P from "../../CruisePlugin/Move.js";
|
|
35
|
+
import M from "../../CruisePlugin/Work.js";
|
|
35
36
|
class C {
|
|
36
37
|
constructor(e) {
|
|
37
38
|
s(this, "id");
|
|
@@ -39,12 +40,12 @@ class C {
|
|
|
39
40
|
s(this, "isGuideLine", !0);
|
|
40
41
|
s(this, "panoramaItem");
|
|
41
42
|
s(this, "modelItem");
|
|
42
|
-
s(this, "hooks", new
|
|
43
|
+
s(this, "hooks", new G());
|
|
43
44
|
s(this, "_visible", !0);
|
|
44
45
|
s(this, "plugin");
|
|
45
46
|
s(this, "five");
|
|
46
|
-
s(this, "logError", (e) =>
|
|
47
|
-
this.id = e.id, this.five = e.five, this.plugin = e.plugin, this.panoramaItem = new
|
|
47
|
+
s(this, "logError", (e) => x("GuideLineItem: ", e));
|
|
48
|
+
this.id = e.id, this.five = e.five, this.plugin = e.plugin, this.panoramaItem = new v(this.five, { mode: "panorama", plugin: this.plugin, parent: this }), this.modelItem = new v(this.five, { mode: "model", plugin: this.plugin, parent: this });
|
|
48
49
|
}
|
|
49
50
|
get visible() {
|
|
50
51
|
return this._visible;
|
|
@@ -54,12 +55,12 @@ class C {
|
|
|
54
55
|
}
|
|
55
56
|
setDataByMode(e, t) {
|
|
56
57
|
var m;
|
|
57
|
-
const n = e === "panorama" ? this.panoramaItem : this.modelItem, i = e === "panorama" ? t.panorama_style : t.model_style,
|
|
58
|
+
const n = e === "panorama" ? this.panoramaItem : this.modelItem, i = e === "panorama" ? t.panorama_style : t.model_style, u = t.path, l = i, a = i, r = i;
|
|
58
59
|
if (t.pano_group) {
|
|
59
60
|
const h = e === "panorama";
|
|
60
|
-
n.setGeometryByPanoGroup(t.pano_group,
|
|
61
|
+
n.setGeometryByPanoGroup(t.pano_group, g({ skipPanoGroup: h }, l));
|
|
61
62
|
} else
|
|
62
|
-
t.path && n.setGeometryByPath(
|
|
63
|
+
t.path && n.setGeometryByPath(u, l);
|
|
63
64
|
n.name = t.name, n.setMeshStyle(r), n.setMartial(a), n.setVisibleFloorIndexes((m = t.visible_floor_indexes) != null ? m : null), n.setStartTag(i == null ? void 0 : i.start_tag), n.setEndTag(i == null ? void 0 : i.end_tag);
|
|
64
65
|
}
|
|
65
66
|
show() {
|
|
@@ -72,44 +73,53 @@ class C {
|
|
|
72
73
|
this.panoramaItem.dispose(), this.modelItem.dispose();
|
|
73
74
|
}
|
|
74
75
|
walk(e) {
|
|
75
|
-
return
|
|
76
|
-
if (!this.panoramaItem.panoGroup)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
return d(this, null, function* () {
|
|
77
|
+
if (this.hooks.emit("walkStart", { userAction: !0 }), this.panoramaItem.panoGroup.length) {
|
|
78
|
+
const t = g({ panoIndexList: this.panoramaItem.panoGroup }, e), [n] = yield y(A(this.five, t));
|
|
79
|
+
if (n)
|
|
80
|
+
return this.logError(n.message);
|
|
81
|
+
} else {
|
|
82
|
+
const t = { path: this.panoramaItem.curvePath }, [n] = yield y(E(this.five, t));
|
|
83
|
+
if (n)
|
|
84
|
+
return this.logError(n.message);
|
|
85
|
+
}
|
|
86
|
+
this.hooks.emit("walkEnded", { userAction: !0 });
|
|
83
87
|
});
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
90
|
+
function E(o, e) {
|
|
91
|
+
return d(this, null, function* () {
|
|
92
|
+
const t = new P(o);
|
|
93
|
+
yield t.load(e), t.playFromStart();
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function A(o, e) {
|
|
97
|
+
return d(this, null, function* () {
|
|
88
98
|
if (e.panoIndexList.length === 0)
|
|
89
99
|
return;
|
|
90
100
|
const t = o.getCurrentState();
|
|
91
|
-
t.mode !== "Panorama" && (yield
|
|
92
|
-
const n = new
|
|
93
|
-
yield n.load(e), yield new Promise((i,
|
|
101
|
+
t.mode !== "Panorama" && (yield L(o, ["Panorama", { longitude: t.longitude, latitude: 0, panoIndex: e.panoIndexList[0] }]));
|
|
102
|
+
const n = new M(o);
|
|
103
|
+
yield n.load(e), yield new Promise((i, u) => {
|
|
94
104
|
const l = o.getCurrentState();
|
|
95
105
|
let a = e.panoIndexList.slice();
|
|
96
106
|
l.panoIndex === a[0] && m(l.panoIndex), n.playFromStart();
|
|
97
|
-
function r(
|
|
98
|
-
if (
|
|
107
|
+
function r(p) {
|
|
108
|
+
if (p !== "Panorama")
|
|
99
109
|
return f(new Error("mode not match"));
|
|
100
110
|
}
|
|
101
|
-
function m(
|
|
111
|
+
function m(p) {
|
|
102
112
|
const I = a[0];
|
|
103
|
-
if (a = a.slice(1),
|
|
104
|
-
return f(new Error("panoIndex not match, wanted: " + I + ", got: " +
|
|
113
|
+
if (a = a.slice(1), p !== I)
|
|
114
|
+
return f(new Error("panoIndex not match, wanted: " + I + ", got: " + p));
|
|
105
115
|
if (a.length === 0)
|
|
106
116
|
return _();
|
|
107
117
|
}
|
|
108
118
|
function h() {
|
|
109
119
|
o.off("modeChange", r), o.off("panoArrived", m);
|
|
110
120
|
}
|
|
111
|
-
function f(
|
|
112
|
-
h(), p
|
|
121
|
+
function f(p) {
|
|
122
|
+
h(), u(p);
|
|
113
123
|
}
|
|
114
124
|
function _() {
|
|
115
125
|
h(), i();
|
|
@@ -118,11 +128,11 @@ function M(o, e) {
|
|
|
118
128
|
});
|
|
119
129
|
});
|
|
120
130
|
}
|
|
121
|
-
const
|
|
131
|
+
const V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
122
132
|
__proto__: null,
|
|
123
133
|
GuideLineItem: C
|
|
124
134
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
125
135
|
export {
|
|
126
136
|
C as GuideLineItem,
|
|
127
|
-
|
|
137
|
+
V as GuideLineItem$1
|
|
128
138
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "./GuideLineModeItem/index.js";
|
|
2
|
-
import "../CruisePlugin/Controller.js";
|
|
3
2
|
import "../shared-utils/log.js";
|
|
4
3
|
import "../shared-utils/to.js";
|
|
5
4
|
import "@realsee/five";
|
|
6
5
|
import "../shared-utils/five/changeMode.js";
|
|
7
|
-
import
|
|
6
|
+
import "../CruisePlugin/Move.js";
|
|
7
|
+
import "../CruisePlugin/Work.js";
|
|
8
|
+
import { GuideLineItem as bo } from "./GuideLineItem/index.js";
|
|
8
9
|
import "three";
|
|
9
10
|
import "./utils/createLineGeometry.js";
|
|
10
11
|
import "../vendor/polyline-normals/index.js";
|
|
@@ -157,19 +158,22 @@ import "@realsee/five/gltf-loader";
|
|
|
157
158
|
import "../shared-utils/five/fiveModelLoad.js";
|
|
158
159
|
import "./Components/Tag.js";
|
|
159
160
|
import "./utils/index.js";
|
|
160
|
-
import "../
|
|
161
|
-
import "
|
|
162
|
-
import "./Controller.js";
|
|
161
|
+
import "../shared-utils/nearlyEqual.js";
|
|
162
|
+
import "../CruisePlugin/BaseController.js";
|
|
163
163
|
import "../shared-utils/equal.js";
|
|
164
164
|
import "../shared-utils/isTruelyObject.js";
|
|
165
|
-
import "../
|
|
165
|
+
import "../CruisePlugin/utils/getFiveStateOnCurve.js";
|
|
166
|
+
import "../shared-utils/vectorToCoordinate.js";
|
|
167
|
+
import "../shared-utils/formatRad.js";
|
|
168
|
+
import "../shared-utils/five/fiveReady.js";
|
|
169
|
+
import "./index.js";
|
|
170
|
+
import "./Controller.js";
|
|
171
|
+
import "../base/BasePluginWithData.js";
|
|
172
|
+
import "../shared-utils/five/fiveLoaded.js";
|
|
166
173
|
import "../CruisePlugin/utils/coordinatesAngle.js";
|
|
167
174
|
import "../CruisePlugin/utils/coordinatesToVector.js";
|
|
168
175
|
import "../CruisePlugin/utils/safeCall.js";
|
|
169
|
-
import "../CruisePlugin/utils/vectorToCoordinates.js";
|
|
170
|
-
import "../CruisePlugin/utils/formatRad.js";
|
|
171
|
-
import "../CruisePlugin/utils/linerValue.js";
|
|
172
176
|
import "../CruisePlugin/utils/sleep.js";
|
|
173
177
|
export {
|
|
174
|
-
|
|
178
|
+
bo as GuideLineItem
|
|
175
179
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "./Controller.js";
|
|
2
|
-
import { GuideLineItem$1 as
|
|
3
|
-
import { GuideLineModeItem$1 as
|
|
2
|
+
import { GuideLineItem$1 as $t } from "./GuideLineItem/index.js";
|
|
3
|
+
import { GuideLineModeItem$1 as gt } from "./GuideLineModeItem/index.js";
|
|
4
4
|
import "../base/BasePluginWithData.js";
|
|
5
5
|
import "../base/BasePlugin.js";
|
|
6
6
|
import "../shared-utils/Subscribe.js";
|
|
@@ -26,16 +26,15 @@ import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
|
26
26
|
import "../shared-utils/url/absoluteUrl.js";
|
|
27
27
|
import "../shared-utils/equal.js";
|
|
28
28
|
import "../shared-utils/isTruelyObject.js";
|
|
29
|
-
import "../CruisePlugin/
|
|
30
|
-
import "
|
|
29
|
+
import "../CruisePlugin/Move.js";
|
|
30
|
+
import "../CruisePlugin/BaseController.js";
|
|
31
|
+
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
31
32
|
import "../shared-utils/uuid.js";
|
|
32
|
-
import "../CruisePlugin/utils/
|
|
33
|
-
import "../
|
|
34
|
-
import "../
|
|
35
|
-
import "../
|
|
36
|
-
import "../
|
|
37
|
-
import "../CruisePlugin/utils/linerValue.js";
|
|
38
|
-
import "../CruisePlugin/utils/sleep.js";
|
|
33
|
+
import "../CruisePlugin/utils/getFiveStateOnCurve.js";
|
|
34
|
+
import "../shared-utils/vectorToCoordinate.js";
|
|
35
|
+
import "../shared-utils/formatRad.js";
|
|
36
|
+
import "../shared-utils/five/fiveReady.js";
|
|
37
|
+
import "../shared-utils/five/fiveLoaded.js";
|
|
39
38
|
import "../shared-utils/log.js";
|
|
40
39
|
import "./utils/createLineGeometry.js";
|
|
41
40
|
import "../vendor/polyline-normals/index.js";
|
|
@@ -50,7 +49,6 @@ import "../shared-utils/animationFrame/BetterTween.js";
|
|
|
50
49
|
import "../shared-utils/animationFrame/index.js";
|
|
51
50
|
import "../shared-utils/three/loadTexture.js";
|
|
52
51
|
import "../PanoTagPlugin/controller/index.js";
|
|
53
|
-
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
54
52
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
55
53
|
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
56
54
|
import "../PanoTagPlugin/utils/debounce.js";
|
|
@@ -170,10 +168,16 @@ import "./utils/index.js";
|
|
|
170
168
|
import "../shared-utils/to.js";
|
|
171
169
|
import "../shared-utils/five/changeMode.js";
|
|
172
170
|
import "../shared-utils/nearlyEqual.js";
|
|
173
|
-
|
|
171
|
+
import "../CruisePlugin/Work.js";
|
|
172
|
+
import "./index.js";
|
|
173
|
+
import "../CruisePlugin/utils/coordinatesAngle.js";
|
|
174
|
+
import "../CruisePlugin/utils/coordinatesToVector.js";
|
|
175
|
+
import "../CruisePlugin/utils/safeCall.js";
|
|
176
|
+
import "../CruisePlugin/utils/sleep.js";
|
|
177
|
+
const It = (i, o) => new t(i, o);
|
|
174
178
|
export {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
$t as GuideLineItem,
|
|
180
|
+
gt as GuideLineModeItem,
|
|
181
|
+
It as GuideLinePlugin,
|
|
182
|
+
It as default
|
|
179
183
|
};
|