@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.
Files changed (46) hide show
  1. package/dist/CruisePlugin/BaseController.d.ts +159 -0
  2. package/dist/CruisePlugin/Move.d.ts +40 -0
  3. package/dist/CruisePlugin/Work.d.ts +120 -0
  4. package/dist/CruisePlugin/index.d.ts +6 -4
  5. package/dist/CruisePlugin/typing.d.ts +2 -2
  6. package/dist/CruisePlugin/utils/getFiveStateOnCurve.d.ts +11 -0
  7. package/dist/GuideLinePlugin/Controller.d.ts +1 -6
  8. package/dist/index.cjs.js +54 -54
  9. package/dist/index.js +3565 -3466
  10. package/dist/index.umd.js +47 -47
  11. package/dist/shared-utils/five/fiveLoaded.d.ts +2 -0
  12. package/dist/shared-utils/five/fiveReady.d.ts +2 -0
  13. package/libs/CruisePlugin/BaseController.d.ts +159 -0
  14. package/libs/CruisePlugin/BaseController.js +231 -0
  15. package/libs/CruisePlugin/Move.d.ts +40 -0
  16. package/libs/CruisePlugin/Move.js +137 -0
  17. package/libs/CruisePlugin/Work.d.ts +120 -0
  18. package/libs/CruisePlugin/Work.js +598 -0
  19. package/libs/CruisePlugin/index.d.ts +6 -4
  20. package/libs/CruisePlugin/index.js +19 -12
  21. package/libs/CruisePlugin/typing.d.ts +2 -2
  22. package/libs/CruisePlugin/utils/getFiveStateOnCurve.d.ts +11 -0
  23. package/libs/CruisePlugin/utils/getFiveStateOnCurve.js +11 -0
  24. package/libs/GuideLinePlugin/Controller.d.ts +1 -6
  25. package/libs/GuideLinePlugin/Controller.js +49 -62
  26. package/libs/GuideLinePlugin/GuideLineItem/index.js +53 -43
  27. package/libs/GuideLinePlugin/GuideLineItem.js +14 -10
  28. package/libs/GuideLinePlugin/index.js +21 -17
  29. package/libs/base/BasePlugin.js +1 -1
  30. package/libs/index.js +126 -119
  31. package/libs/shared-utils/five/fiveLoaded.d.ts +2 -0
  32. package/libs/shared-utils/five/fiveLoaded.js +30 -0
  33. package/libs/shared-utils/five/fiveReady.d.ts +2 -0
  34. package/libs/shared-utils/five/fiveReady.js +28 -0
  35. package/libs/shared-utils/formatRad.d.ts +7 -0
  36. package/libs/shared-utils/formatRad.js +7 -0
  37. package/libs/shared-utils/logger.js +1 -1
  38. package/package.json +3 -3
  39. package/dist/CruisePlugin/Controller.d.ts +0 -171
  40. package/dist/CruisePlugin/utils/linerValue.d.ts +0 -1
  41. package/libs/CruisePlugin/Controller.d.ts +0 -171
  42. package/libs/CruisePlugin/Controller.js +0 -760
  43. /package/dist/{CruisePlugin/utils → shared-utils}/formatRad.d.ts +0 -0
  44. /package/dist/{CruisePlugin/utils/vectorToCoordinates.d.ts → shared-utils/vectorToCoordinate.d.ts} +0 -0
  45. /package/libs/{CruisePlugin/utils/vectorToCoordinates.d.ts → shared-utils/vectorToCoordinate.d.ts} +0 -0
  46. /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/Controller';
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 O = Object.defineProperty;
2
- var G = Object.getOwnPropertySymbols;
3
- var M = Object.prototype.hasOwnProperty, N = Object.prototype.propertyIsEnumerable;
4
- var c = (s, o, t) => o in s ? O(s, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[o] = t, f = (s, o) => {
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 (G)
8
- for (var t of G(o))
9
- N.call(o, t) && c(s, t, o[t]);
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 d = (s, o, t) => (c(s, typeof o != "symbol" ? o + "" : o, t), t);
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 P } from "../base/BasePluginWithData.js";
30
- import { equal as $ } from "../shared-utils/equal.js";
31
- import { GuideLineItem as k } from "./GuideLineItem/index.js";
32
- import x from "../CruisePlugin/Controller.js";
33
- import { objectAssignDeepExports as S } from "../vendor/object-assign-deep/objectAssignDeep.js";
34
- import * as T from "three";
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
- const V = "v1.1.0", b = "GuideLinePlugin", g = `${b}@${V}`, Kr = (s) => `${g}--${s}`;
202
- class Qr extends P {
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
- d(this, "version", V);
206
- d(this, "name", b);
207
- d(this, "cruisePlugin");
209
+ h(this, "name", b);
210
+ h(this, "cruisePlugin");
208
211
  /** GuideLineItem 索引 */
209
- d(this, "itemMap", /* @__PURE__ */ new Map());
210
- d(this, "state", {
212
+ h(this, "itemMap", /* @__PURE__ */ new Map());
213
+ h(this, "state", {
211
214
  visible: !1,
212
215
  enabled: !0
213
216
  });
214
- d(this, "data");
217
+ h(this, "data");
215
218
  /** 当新增一根线时,整体高度的偏移值 */
216
- d(this, "heightOffset", 0);
217
- d(this, "_config");
218
- d(this, "_disposed", !1);
219
- d(this, "disposedErrorLog", () => {
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 x(t, { useGuideLine: !1 }), Object.assign(window, { [`__${b}_DEBUG__`]: this });
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, w, I, E, y, L, D;
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: (w = r == null ? void 0 : r.unitWidth) != null ? w : 0.6,
242
- texture: { url: (I = r == null ? void 0 : r.arrowTextureUrl) != null ? I : this.staticPrefix + "/release/web/arrow6.b6ce0c62.png" }
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
- }, h = (y = (E = e.routes) == null ? void 0 : E.map((l) => {
247
+ }, d = (y = (E = e.routes) == null ? void 0 : E.map((l) => {
245
248
  var _;
246
- return S({}, n, { id: (_ = l.id) != null ? _ : Date.now(), pano_group: l.panoIndexList });
247
- })) != null ? y : [], A = (D = (L = e.lines) == null ? void 0 : L.map((l) => S({}, n, l))) != null ? D : [], C = [...h, ...A];
248
- yield this.waitFiveLoaded(), this.clear(), C.forEach((l) => {
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), $(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);
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 k({ five: this.five, id: i, plugin: this });
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 T.Vector3().fromArray(e).distanceTo(new T.Vector3().fromArray(r)) < 0.01;
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 h;
318
- return i((h = n.tag) == null ? void 0 : h.position) ? !a(r, n.tag.position) : !0;
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 h = m(p);
325
- h && t.push(p), p.plugin.setState({ enabled: h }, {});
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
- Qr as default,
362
- Kr as pluginFlag
348
+ te as default,
349
+ Zr as pluginFlag
363
350
  };
@@ -1,17 +1,17 @@
1
- var v = Object.defineProperty;
1
+ var S = Object.defineProperty;
2
2
  var w = Object.getOwnPropertySymbols;
3
- var S = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
4
- var d = (o, e, t) => e in o ? v(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, c = (o, e) => {
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
- S.call(e, t) && d(o, t, e[t]);
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) && d(o, t, e[t]);
9
+ b.call(e, t) && c(o, t, e[t]);
10
10
  return o;
11
11
  };
12
- var s = (o, e, t) => (d(o, typeof e != "symbol" ? e + "" : e, t), t);
13
- var g = (o, e, t) => new Promise((n, i) => {
14
- var p = (r) => {
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(p, l);
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 y } from "../GuideLineModeItem/index.js";
30
- import x from "../../CruisePlugin/Controller.js";
31
- import { logError as G } from "../../shared-utils/log.js";
32
- import { to as L } from "../../shared-utils/to.js";
33
- import { Subscribe as k } from "@realsee/five";
34
- import { changeMode as P } from "../../shared-utils/five/changeMode.js";
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 k());
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) => G("GuideLineItem: ", e));
47
- this.id = e.id, this.five = e.five, this.plugin = e.plugin, this.panoramaItem = new y(this.five, { mode: "panorama", plugin: this.plugin, parent: this }), this.modelItem = new y(this.five, { mode: "model", plugin: this.plugin, parent: this });
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, p = t.path, l = i, a = i, r = i;
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, c({ skipPanoGroup: h }, l));
61
+ n.setGeometryByPanoGroup(t.pano_group, g({ skipPanoGroup: h }, l));
61
62
  } else
62
- t.path && n.setGeometryByPath(p, l);
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 g(this, null, function* () {
76
- if (!this.panoramaItem.panoGroup)
77
- return;
78
- const t = c({ panoIndexList: this.panoramaItem.panoGroup }, e);
79
- this.hooks.emit("walkStart", { userAction: !0 });
80
- const [n] = yield L(M(this.five, t));
81
- if (this.hooks.emit("walkEnded", { userAction: !0 }), n)
82
- return this.logError(n.message);
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 M(o, e) {
87
- return g(this, null, function* () {
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 P(o, ["Panorama", { longitude: t.longitude, latitude: 0, panoIndex: e.panoIndexList[0] }]));
92
- const n = new x(o, { useGuideLine: !1 });
93
- yield n.load(e), yield new Promise((i, p) => {
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(u) {
98
- if (u !== "Panorama")
107
+ function r(p) {
108
+ if (p !== "Panorama")
99
109
  return f(new Error("mode not match"));
100
110
  }
101
- function m(u) {
111
+ function m(p) {
102
112
  const I = a[0];
103
- if (a = a.slice(1), u !== I)
104
- return f(new Error("panoIndex not match, wanted: " + I + ", got: " + u));
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(u) {
112
- h(), p(u);
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 O = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
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
- O as GuideLineItem$1
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 { GuideLineItem as Go } from "./GuideLineItem/index.js";
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 "../base/BasePluginWithData.js";
161
- import "./index.js";
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 "../shared-utils/nearlyEqual.js";
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
- Go as GuideLineItem
178
+ bo as GuideLineItem
175
179
  };
@@ -1,6 +1,6 @@
1
1
  import t from "./Controller.js";
2
- import { GuideLineItem$1 as st } from "./GuideLineItem/index.js";
3
- import { GuideLineModeItem$1 as xt } from "./GuideLineModeItem/index.js";
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/Controller.js";
30
- import "./index.js";
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/coordinatesAngle.js";
33
- import "../CruisePlugin/utils/coordinatesToVector.js";
34
- import "../CruisePlugin/utils/safeCall.js";
35
- import "../CruisePlugin/utils/vectorToCoordinates.js";
36
- import "../CruisePlugin/utils/formatRad.js";
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
- const at = (i, o) => new t(i, o);
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
- st as GuideLineItem,
176
- xt as GuideLineModeItem,
177
- at as GuideLinePlugin,
178
- at as default
179
+ $t as GuideLineItem,
180
+ gt as GuideLineModeItem,
181
+ It as GuideLinePlugin,
182
+ It as default
179
183
  };
@@ -14,7 +14,7 @@ let b = class {
14
14
  /**
15
15
  * @realsee/dnalogel 版本号
16
16
  */
17
- i(this, "VERSION", "3.6.0");
17
+ i(this, "VERSION", "3.7.0");
18
18
  i(this, "five");
19
19
  /**
20
20
  * 插件事件钩子