@realsee/dnalogel 3.11.0 → 3.12.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 (45) hide show
  1. package/dist/CruisePlugin/BaseController.d.ts +5 -0
  2. package/dist/CruisePlugin/Work.d.ts +1 -5
  3. package/dist/GuideLinePlugin/Controller.d.ts +4 -0
  4. package/dist/PanoTagPlugin/controller/TagUtil.d.ts +2 -3
  5. package/dist/PanoTagPlugin/controller/index.d.ts +1 -0
  6. package/dist/PanoTagPlugin/utils/DebugUtil.d.ts +6 -0
  7. package/dist/base/BasePlugin.d.ts +1 -1
  8. package/dist/index.cjs.js +52 -52
  9. package/dist/index.js +3178 -3067
  10. package/dist/index.umd.js +44 -44
  11. package/dist/shared-utils/Utils/BaseUtil.d.ts +5 -0
  12. package/dist/shared-utils/Utils/FiveUtil.d.ts +10 -0
  13. package/dist/shared-utils/Utils/WorkUtil.d.ts +33 -0
  14. package/libs/CruisePlugin/BaseController.d.ts +5 -0
  15. package/libs/CruisePlugin/BaseController.js +66 -54
  16. package/libs/CruisePlugin/Move.js +29 -25
  17. package/libs/CruisePlugin/Work.d.ts +1 -5
  18. package/libs/CruisePlugin/Work.js +133 -129
  19. package/libs/CruisePlugin/index.js +10 -6
  20. package/libs/GuideLinePlugin/Controller.d.ts +4 -0
  21. package/libs/GuideLinePlugin/Controller.js +41 -30
  22. package/libs/GuideLinePlugin/GuideLineItem.js +6 -2
  23. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +61 -61
  24. package/libs/GuideLinePlugin/GuideLineModeItem.js +5 -2
  25. package/libs/GuideLinePlugin/index.js +12 -8
  26. package/libs/PanoTagPlugin/controller/TagComputer.js +24 -22
  27. package/libs/PanoTagPlugin/controller/TagRender.js +4 -2
  28. package/libs/PanoTagPlugin/controller/TagUtil.d.ts +2 -3
  29. package/libs/PanoTagPlugin/controller/TagUtil.js +92 -100
  30. package/libs/PanoTagPlugin/controller/index.d.ts +1 -0
  31. package/libs/PanoTagPlugin/controller/index.js +32 -26
  32. package/libs/PanoTagPlugin/index.js +14 -11
  33. package/libs/PanoTagPlugin/utils/DebugUtil.d.ts +6 -0
  34. package/libs/PanoTagPlugin/utils/DebugUtil.js +25 -0
  35. package/libs/base/BasePlugin.d.ts +1 -1
  36. package/libs/base/BasePlugin.js +2 -2
  37. package/libs/index.js +125 -121
  38. package/libs/shared-utils/Utils/BaseUtil.d.ts +5 -0
  39. package/libs/shared-utils/Utils/BaseUtil.js +12 -0
  40. package/libs/shared-utils/Utils/FiveUtil.d.ts +10 -0
  41. package/libs/shared-utils/Utils/FiveUtil.js +27 -0
  42. package/libs/shared-utils/Utils/WorkUtil.d.ts +33 -0
  43. package/libs/shared-utils/Utils/WorkUtil.js +68 -0
  44. package/libs/shared-utils/logger.js +1 -1
  45. package/package.json +1 -1
@@ -1,41 +1,41 @@
1
- var D = Object.defineProperty, C = Object.defineProperties;
2
- var K = Object.getOwnPropertyDescriptors;
3
- var E = Object.getOwnPropertySymbols;
4
- var L = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
5
- var I = (h, l, t) => l in h ? D(h, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[l] = t, g = (h, l) => {
1
+ var b = Object.defineProperty, E = Object.defineProperties;
2
+ var F = Object.getOwnPropertyDescriptors;
3
+ var w = Object.getOwnPropertySymbols;
4
+ var D = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
5
+ var I = (h, l, t) => l in h ? b(h, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[l] = t, g = (h, l) => {
6
6
  for (var t in l || (l = {}))
7
- L.call(l, t) && I(h, t, l[t]);
8
- if (E)
9
- for (var t of E(l))
10
- T.call(l, t) && I(h, t, l[t]);
7
+ D.call(l, t) && I(h, t, l[t]);
8
+ if (w)
9
+ for (var t of w(l))
10
+ C.call(l, t) && I(h, t, l[t]);
11
11
  return h;
12
- }, x = (h, l) => C(h, K(l));
12
+ }, x = (h, l) => E(h, F(l));
13
13
  var k = (h, l, t) => (I(h, typeof l != "symbol" ? l + "" : l, t), t);
14
14
  var y = (h, l, t) => new Promise((e, r) => {
15
- var i = (d) => {
15
+ var i = (n) => {
16
16
  try {
17
- s(t.next(d));
17
+ m(t.next(n));
18
18
  } catch (o) {
19
19
  r(o);
20
20
  }
21
- }, n = (d) => {
21
+ }, s = (n) => {
22
22
  try {
23
- s(t.throw(d));
23
+ m(t.throw(n));
24
24
  } catch (o) {
25
25
  r(o);
26
26
  }
27
- }, s = (d) => d.done ? e(d.value) : Promise.resolve(d.value).then(i, n);
28
- s((t = t.apply(h, l)).next());
27
+ }, m = (n) => n.done ? e(n.value) : Promise.resolve(n.value).then(i, s);
28
+ m((t = t.apply(h, l)).next());
29
29
  });
30
- import { GuideLinePlugin as M } from "../GuideLinePlugin/index.js";
30
+ import { GuideLinePlugin as K } from "../GuideLinePlugin/index.js";
31
31
  import { uuid as S } from "../shared-utils/uuid.js";
32
- import { coordinatesAngle as A } from "./utils/coordinatesAngle.js";
33
- import { safeCall as G } from "./utils/safeCall.js";
34
- import * as O from "three";
35
- import { sleep as Q } from "./utils/sleep.js";
36
- import { waitFiveLoaded as U } from "../shared-utils/five/fiveLoaded.js";
37
- import { vectorToCoordinates as _ } from "../shared-utils/vectorToCoordinate.js";
38
- import R from "./BaseController.js";
32
+ import { coordinatesAngle as L } from "./utils/coordinatesAngle.js";
33
+ import { safeCall as T } from "./utils/safeCall.js";
34
+ import * as U from "three";
35
+ import { sleep as O } from "./utils/sleep.js";
36
+ import { waitFiveLoaded as M } from "../shared-utils/five/fiveLoaded.js";
37
+ import { vectorToCoordinates as A } from "../shared-utils/vectorToCoordinate.js";
38
+ import G from "./BaseController.js";
39
39
  import "../GuideLinePlugin/Controller.js";
40
40
  import "../base/BasePluginWithData.js";
41
41
  import "../base/BasePlugin.js";
@@ -113,6 +113,8 @@ import "../PanoTagPlugin/utils/tag/adaptConfig.js";
113
113
  import "../shared-utils/typescript/entries.js";
114
114
  import "../shared-utils/url/getUrl.js";
115
115
  import "../shared-utils/five/transformPosition.js";
116
+ import "../shared-utils/Utils/WorkUtil.js";
117
+ import "../shared-utils/Utils/BaseUtil.js";
116
118
  import "../shared-utils/five/getFloorIndex.js";
117
119
  import "../shared-utils/safeObj.js";
118
120
  import "../PanoTagPlugin/Components/TagContainer.js";
@@ -192,6 +194,7 @@ import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
192
194
  import "../shared-utils/three/GLTFLoader.js";
193
195
  import "@realsee/five/gltf-loader";
194
196
  import "../shared-utils/five/fiveModelLoad.js";
197
+ import "../PanoTagPlugin/utils/DebugUtil.js";
195
198
  import "../GuideLinePlugin/Components/Tag.js";
196
199
  import "../GuideLinePlugin/utils/index.js";
197
200
  import "../shared-utils/to.js";
@@ -199,10 +202,11 @@ import "../shared-utils/five/changeMode.js";
199
202
  import "../shared-utils/nearlyEqual.js";
200
203
  import "./Move.js";
201
204
  import "./utils/getFiveStateOnCurve.js";
205
+ import "../shared-utils/Utils/FiveUtil.js";
202
206
  import "../shared-utils/formatRad.js";
203
207
  import "./Work.js";
204
208
  import "./utils/coordinatesToVector.js";
205
- class tr extends R {
209
+ class er extends G {
206
210
  constructor(t, e) {
207
211
  super(t, e);
208
212
  k(this, "state", {
@@ -234,30 +238,30 @@ class tr extends R {
234
238
  */
235
239
  load(t, e, r) {
236
240
  return y(this, null, function* () {
237
- var a, m;
241
+ var a, p;
238
242
  if (this.state.disposed)
239
243
  return this.disposedErrorLog();
240
244
  this.clear();
241
- const i = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, n = yield this.formatData(t);
242
- this.data = g({ id: n.keyframesId }, n), this.hooks.emit("dataChange", n, i);
243
- let s = [], d;
244
- const o = this.data.keyframes.filter((p) => p.data.panoIndex !== void 0);
245
- o.filter((p, f) => {
246
- var u;
247
- return p.data.panoIndex !== ((u = o[f - 1]) == null ? void 0 : u.data.panoIndex);
248
- }).map((p) => p.data.panoIndex).forEach((p) => {
249
- var u, v;
250
- const f = (u = this.five.work.observers[p]) == null ? void 0 : u.floorIndex;
251
- if (f !== void 0)
252
- if (d === f) {
253
- const c = s.length - 1;
254
- s[c] = [...(v = s[c]) != null ? v : [], p];
245
+ const i = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, s = yield this.formatData(t);
246
+ this.data = g({ id: s.keyframesId }, s), this.hooks.emit("dataChange", s, i);
247
+ let m = [], n;
248
+ const o = this.data.keyframes.filter((d) => d.data.panoIndex !== void 0);
249
+ o.filter((d, u) => {
250
+ var f;
251
+ return d.data.panoIndex !== ((f = o[u - 1]) == null ? void 0 : f.data.panoIndex);
252
+ }).map((d) => d.data.panoIndex).forEach((d) => {
253
+ var f, v;
254
+ const u = (f = this.workUtil.getObserver(d)) == null ? void 0 : f.floorIndex;
255
+ if (u !== void 0)
256
+ if (n === u) {
257
+ const c = m.length - 1;
258
+ m[c] = [...(v = m[c]) != null ? v : [], d];
255
259
  } else {
256
- d = f;
257
- const c = s.length;
258
- s[c] = [p];
260
+ n = u;
261
+ const c = m.length;
262
+ m[c] = [d];
259
263
  }
260
- }), !this.GuideLine && ((a = this.config) == null ? void 0 : a.useGuideLine) !== !1 && n.useGuildLine !== !1 && (this.GuideLine = M(this.five, this.config)), (m = this.GuideLine) == null || m.load({ routes: s.map((p) => ({ panoIndexList: p })), config: n.guildPluginOptions }), e ? this.setState(e, { userAction: r }) : (this.setState({ playing: !1 }, { userAction: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing, { userAction: !1 }), this.changeSpeed(this.state.speed)), this.clearPauseData(), console.debug("WORKPLUGIN loaded", n), this.hooks.emit("dataLoaded", n);
264
+ }), !this.GuideLine && ((a = this.config) == null ? void 0 : a.useGuideLine) !== !1 && s.useGuildLine !== !1 && (this.GuideLine = K(this.five, this.config)), (p = this.GuideLine) == null || p.load({ routes: m.map((d) => ({ panoIndexList: d })), config: s.guildPluginOptions }), e ? this.setState(e, { userAction: r }) : (this.setState({ playing: !1 }, { userAction: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing, { userAction: !1 }), this.changeSpeed(this.state.speed)), this.clearPauseData(), console.debug("WORKPLUGIN loaded", s), this.hooks.emit("dataLoaded", s);
261
265
  });
262
266
  }
263
267
  /**
@@ -280,45 +284,45 @@ class tr extends R {
280
284
  */
281
285
  formatData(t) {
282
286
  return y(this, null, function* () {
283
- this.five.work || (yield U(this.five));
284
- const e = this.five.work.observers, r = (() => {
285
- const i = t;
286
- return typeof i == "object" && i !== null && i.version && i.data ? i.data : i;
287
+ this.five.work || (yield M(this.five));
288
+ const e = (() => {
289
+ const r = t;
290
+ return typeof r == "object" && r !== null && r.version && r.data ? r.data : r;
287
291
  })();
288
- if (r.keyframes)
292
+ if (e.keyframes)
289
293
  return {
290
294
  keyframesId: S(),
291
- keyframes: r.keyframes.map((i, n) => {
292
- var o;
293
- const s = r.keyframes[n + 1], d = (() => !s || s.start === void 0 || i.end === void 0 ? 0 : s.start - i.end)();
294
- return x(g({ id: (o = i.uuid) != null ? o : S(), moveIndex: n, stay: d, index: n }, i), { guildPluginOptions: r.guildPluginOptions });
295
+ keyframes: e.keyframes.map((r, i) => {
296
+ var n;
297
+ const s = e.keyframes[i + 1], m = (() => !s || s.start === void 0 || r.end === void 0 ? 0 : s.start - r.end)();
298
+ return x(g({ id: (n = r.uuid) != null ? n : S(), moveIndex: i, stay: m, index: i }, r), { guildPluginOptions: e.guildPluginOptions });
295
299
  })
296
300
  };
297
- if (r.panoIndexList) {
298
- let i = [];
299
- const { moveEffect: n, moveToFirstPanoEffect: s, moveToFirstPanoDuration: d } = r;
300
- return this.privateState.moveToFirstPanoEffect = s, this.privateState.moveToFirstPanoDuration = d, r.panoIndexList.forEach((o, a) => {
301
- const m = (() => {
302
- var c, P, w, b;
303
- const p = r.panoIndexList.slice(a).find((F) => F !== o);
301
+ if (e.panoIndexList) {
302
+ let r = [];
303
+ const { moveEffect: i, moveToFirstPanoEffect: s, moveToFirstPanoDuration: m } = e;
304
+ return this.privateState.moveToFirstPanoEffect = s, this.privateState.moveToFirstPanoDuration = m, e.panoIndexList.forEach((n, o) => {
305
+ const a = (() => {
306
+ var v, c;
307
+ const p = e.panoIndexList.slice(o).find((P) => P !== n);
304
308
  if (p === void 0)
305
309
  return;
306
- const f = (c = e[o]) == null ? void 0 : c.position, u = (P = e[p]) == null ? void 0 : P.position;
307
- if (!u || !f || ((w = e[o]) == null ? void 0 : w.floorIndex) !== ((b = e[p]) == null ? void 0 : b.floorIndex))
310
+ const d = this.workUtil.getObserverPosition(n), u = this.workUtil.getObserverPosition(p);
311
+ if (!u || !d || ((v = this.workUtil.getObserver(n)) == null ? void 0 : v.floorIndex) !== ((c = this.workUtil.getObserver(p)) == null ? void 0 : c.floorIndex))
308
312
  return;
309
- const v = new O.Vector3().subVectors(u, f);
310
- return _(v.normalize());
313
+ const f = new U.Vector3().subVectors(u, d);
314
+ return A(f.normalize());
311
315
  })();
312
- r.moveType === void 0 || r.moveType === "justMove" ? i.push({
313
- moveIndex: a,
314
- stay: r.stay,
315
- data: g({ effect: "Move", panoIndex: o, moveEffect: n }, m != null ? m : {})
316
- }) : r.moveType === "moveAndRotate" && (i.push({ moveIndex: a, stay: r.stay, data: { effect: "Move", panoIndex: o, moveEffect: n } }), m && i.push({ moveIndex: a, stay: r.stay, data: g({ effect: "Rotate", panoIndex: o }, m) }));
316
+ e.moveType === void 0 || e.moveType === "justMove" ? r.push({
317
+ moveIndex: o,
318
+ stay: e.stay,
319
+ data: g({ effect: "Move", panoIndex: n, moveEffect: i }, a != null ? a : {})
320
+ }) : e.moveType === "moveAndRotate" && (r.push({ moveIndex: o, stay: e.stay, data: { effect: "Move", panoIndex: n, moveEffect: i } }), a && r.push({ moveIndex: o, stay: e.stay, data: g({ effect: "Rotate", panoIndex: n }, a) }));
317
321
  }), {
318
322
  keyframesId: S(),
319
- keyframes: i.map((o, a) => g({ id: S(), index: a }, o)),
320
- guildPluginOptions: r.guildPluginOptions,
321
- useGuildLine: r.useGuildLine
323
+ keyframes: r.map((n, o) => g({ id: S(), index: o }, n)),
324
+ guildPluginOptions: e.guildPluginOptions,
325
+ useGuildLine: e.useGuildLine
322
326
  };
323
327
  } else
324
328
  throw new Error("format error: data no keyframes or no panoIndexList");
@@ -332,21 +336,21 @@ class tr extends R {
332
336
  // eslint-disable-next-line complexity
333
337
  handlePlay(t) {
334
338
  return y(this, null, function* () {
335
- var f;
336
- const { data: e, state: r, privateState: i, hooks: n } = this;
339
+ var u;
340
+ const { data: e, state: r, privateState: i, hooks: s } = this;
337
341
  if (i.playing || !(e != null && e.keyframes) || (e == null ? void 0 : e.keyframes.length) === 0)
338
342
  return;
339
- const s = S();
340
- i.playId = s, i.playing = !0, i.broke = !1;
341
- const d = e.keyframes, o = this.getPauseData();
342
- (t == null ? void 0 : t.notEmitEvent) !== !0 && n.emit("play", { userAction: (f = t == null ? void 0 : t.userAction) != null ? f : !0 });
343
+ const m = S();
344
+ i.playId = m, i.playing = !0, i.broke = !1;
345
+ const n = e.keyframes, o = this.getPauseData();
346
+ (t == null ? void 0 : t.notEmitEvent) !== !0 && s.emit("play", { userAction: (u = t == null ? void 0 : t.userAction) != null ? u : !0 });
343
347
  let a = !1;
344
- const p = yield (() => y(this, null, function* () {
345
- var u, v;
348
+ const d = yield (() => y(this, null, function* () {
349
+ var f, v;
346
350
  if ((t == null ? void 0 : t.playFromIndex) !== void 0)
347
351
  return t.playFromIndex;
348
352
  if ((t == null ? void 0 : t.playFromId) !== void 0)
349
- return (u = this.data) == null ? void 0 : u.keyframes.findIndex((c) => c.id === t.playFromId);
353
+ return (f = this.data) == null ? void 0 : f.keyframes.findIndex((c) => c.id === t.playFromId);
350
354
  if (o != null && o.id) {
351
355
  const c = (v = this.data) == null ? void 0 : v.keyframes.find((P) => P.id === o.id);
352
356
  if (o != null && o.fiveState && (yield this.move(o.fiveState, {
@@ -363,40 +367,40 @@ class tr extends R {
363
367
  }
364
368
  }))();
365
369
  this.clearPauseData();
366
- for (const u of d) {
367
- if (i.broke || !r.playing || !i.playing || s !== i.playId)
370
+ for (const f of n) {
371
+ if (i.broke || !r.playing || !i.playing || m !== i.playId)
368
372
  return;
369
- if (!(p !== void 0 && u.index < p))
373
+ if (!(d !== void 0 && f.index < d))
370
374
  try {
371
- n.emit("playIndexChange", u.index, u), yield this.playKeyframe(u, {
375
+ s.emit("playIndexChange", f.index, f), yield this.playKeyframe(f, {
372
376
  moveEffect: a === !1 ? i.moveToFirstPanoEffect : void 0,
373
377
  duration: a === !1 && typeof i.moveToFirstPanoDuration == "number" ? i.moveToFirstPanoDuration : void 0
374
- }), u.stay && (yield Q(u.stay)), a === !1 && (a = !0);
378
+ }), f.stay && (yield O(f.stay)), a === !1 && (a = !0);
375
379
  } catch (v) {
376
380
  return console.error(v), Promise.resolve("broke");
377
381
  }
378
382
  }
379
- r.playing && s === i.playId && (this.setState({ playing: !1 }, { userAction: !1 }), n.emit("end"), this.clearPauseData());
383
+ r.playing && m === i.playId && (this.setState({ playing: !1 }, { userAction: !1 }), s.emit("end"), this.clearPauseData());
380
384
  });
381
385
  }
382
386
  /**
383
387
  * @description: Pause and record pause state
384
388
  */
385
389
  handlePause(t) {
386
- var n;
390
+ var s;
387
391
  const { state: e, privateState: r, hooks: i } = this;
388
- e.playing = !1, r.playing !== !1 && (r.playing = !1, (t == null ? void 0 : t.userAction) !== !1 && this.setPauseData(), r.broke || this.forceInteruptUpdateCamera(), (t == null ? void 0 : t.notEmitEvent) !== !0 && i.emit("pause", { userAction: (n = t == null ? void 0 : t.userAction) != null ? n : !0 }));
392
+ e.playing = !1, r.playing !== !1 && (r.playing = !1, (t == null ? void 0 : t.userAction) !== !1 && this.setPauseData(), r.broke || this.forceInteruptUpdateCamera(), (t == null ? void 0 : t.notEmitEvent) !== !0 && i.emit("pause", { userAction: (s = t == null ? void 0 : t.userAction) != null ? s : !0 }));
389
393
  }
390
394
  /**
391
395
  * @description: Change play speed
392
396
  */
393
397
  changeSpeed(t, e = !0) {
394
- const { state: r, privateState: i, hooks: n } = this, { currentPlayKeyframe: s } = i;
395
- if (n.emit("speedChange", t, { userAction: e }), r.playing && s)
398
+ const { state: r, privateState: i, hooks: s } = this, { currentPlayKeyframe: m } = i;
399
+ if (s.emit("speedChange", t, { userAction: e }), r.playing && m)
396
400
  try {
397
- const d = s.originDuration !== void 0 ? s.originDuration * (1 - this.getProgress()) : void 0, o = this.playKeyframe(s.keyframe, { duration: d });
401
+ const n = m.originDuration !== void 0 ? m.originDuration * (1 - this.getProgress()) : void 0, o = this.playKeyframe(m.keyframe, { duration: n });
398
402
  i.currentPlayQueue.push(o);
399
- } catch (d) {
403
+ } catch (n) {
400
404
  }
401
405
  }
402
406
  /**
@@ -439,20 +443,20 @@ class tr extends R {
439
443
  */
440
444
  getPlayPromise(r) {
441
445
  return y(this, arguments, function* (t, e = {}) {
442
- var n;
446
+ var s;
443
447
  const i = t.data;
444
- if (e.duration = (n = e.duration) != null ? n : t.start !== void 0 && t.end !== void 0 ? t.end - t.start : void 0, !!i)
445
- return new Promise((s, d) => {
448
+ if (e.duration = (s = e.duration) != null ? s : t.start !== void 0 && t.end !== void 0 ? t.end - t.start : void 0, !!i)
449
+ return new Promise((m, n) => {
446
450
  let o = !1;
447
451
  this.addInterruptListener(() => {
448
452
  if (!o)
449
- return this.hooks.emit("broke"), this.privateState.broke = !0, this.setState({ playing: !1 }), o = !0, d(new Error("play is interupted"));
453
+ return this.hooks.emit("broke"), this.privateState.broke = !0, this.setState({ playing: !1 }), o = !0, n(new Error("play is interupted"));
450
454
  });
451
455
  try {
452
456
  if (o)
453
457
  return;
454
458
  const a = () => {
455
- s(), o = !0;
459
+ m(), o = !0;
456
460
  };
457
461
  switch (i.effect) {
458
462
  case "Move":
@@ -519,26 +523,26 @@ class tr extends R {
519
523
  */
520
524
  updateCamera(r) {
521
525
  return y(this, arguments, function* (t, e = {}) {
522
- const { five: i, privateState: n, state: s } = this, d = (() => {
523
- var f, u;
524
- const m = (f = s.config) == null ? void 0 : f.speedConfig, p = (u = t.rotateSpeed) != null ? u : m == null ? void 0 : m.rotateSpeed;
525
- if ((m == null ? void 0 : m.rotateSpeedUnit) === void 0)
526
- return p;
527
- if (p !== void 0)
528
- return m.rotateSpeedUnit === "rad/ms" ? p : p / 1e3;
526
+ const { five: i, privateState: s, state: m } = this, n = (() => {
527
+ var u, f;
528
+ const p = (u = m.config) == null ? void 0 : u.speedConfig, d = (f = t.rotateSpeed) != null ? f : p == null ? void 0 : p.rotateSpeed;
529
+ if ((p == null ? void 0 : p.rotateSpeedUnit) === void 0)
530
+ return d;
531
+ if (d !== void 0)
532
+ return p.rotateSpeedUnit === "rad/ms" ? d : d / 1e3;
529
533
  })(), o = (() => {
530
534
  if (e.duration)
531
535
  return e.duration;
532
- if (d) {
533
- const m = this.five.getCurrentState();
534
- return A(m, t) / d;
536
+ if (n) {
537
+ const p = this.five.getCurrentState();
538
+ return L(p, t) / n;
535
539
  }
536
540
  return 800;
537
541
  })();
538
- n.currentPlayKeyframe && (n.currentPlayKeyframe.originDuration = o);
542
+ s.currentPlayKeyframe && (s.currentPlayKeyframe.originDuration = o);
539
543
  const a = this.getSpeededDuration(o);
540
- return new Promise((m) => {
541
- G(() => i.updateCamera(t, a)), setTimeout(() => m(), a);
544
+ return new Promise((p) => {
545
+ T(() => i.updateCamera(t, a)), setTimeout(() => p(), a);
542
546
  });
543
547
  });
544
548
  }
@@ -547,39 +551,39 @@ class tr extends R {
547
551
  */
548
552
  changePano(t, e) {
549
553
  return y(this, null, function* () {
550
- const { five: r, privateState: i, state: n } = this;
554
+ const { five: r, privateState: i, state: s } = this;
551
555
  if (typeof t.panoIndex != "number" || t.panoIndex === r.panoIndex)
552
556
  return;
553
- const s = r.getCurrentState().mode !== "Panorama";
554
- s && (this.privateState.modeChanging = !0);
555
- const d = (() => {
556
- var p, f;
557
- const a = (p = n.config) == null ? void 0 : p.speedConfig, m = (f = t.moveSpeed) != null ? f : a == null ? void 0 : a.moveSpeed;
557
+ const m = r.getCurrentState().mode !== "Panorama";
558
+ m && (this.privateState.modeChanging = !0);
559
+ const n = (() => {
560
+ var d, u;
561
+ const a = (d = s.config) == null ? void 0 : d.speedConfig, p = (u = t.moveSpeed) != null ? u : a == null ? void 0 : a.moveSpeed;
558
562
  if ((a == null ? void 0 : a.moveSpeedUnit) === void 0)
559
- return m;
560
- if (m !== void 0)
561
- return a.moveSpeedUnit === "m/ms" ? m : m / 1e3;
563
+ return p;
564
+ if (p !== void 0)
565
+ return a.moveSpeedUnit === "m/ms" ? p : p / 1e3;
562
566
  })(), o = (() => {
563
567
  if (e != null && e.duration)
564
568
  return e.duration;
565
- if (d && typeof r.panoIndex == "number" && typeof t.panoIndex == "number") {
566
- const a = r.work.observers[r.panoIndex].position, m = r.work.observers[t.panoIndex].position;
567
- return a.distanceTo(m) / d;
569
+ if (n && typeof r.panoIndex == "number" && typeof t.panoIndex == "number") {
570
+ const a = this.workUtil.getObserverPosition(r.panoIndex), p = this.workUtil.getObserverPosition(t.panoIndex);
571
+ return a && p ? a.distanceTo(p) / n : 800;
568
572
  }
569
573
  return 800;
570
574
  })();
571
575
  i.currentPlayKeyframe && (i.currentPlayKeyframe.originDuration = o), yield new Promise((a) => {
572
- var m, p, f;
573
- r.moveToPano(t.panoIndex, {
576
+ var p, d, u;
577
+ this.fiveUtil.moveToPano(t.panoIndex, {
574
578
  latitude: t.latitude,
575
579
  longitude: t.longitude,
576
580
  fov: t.fov,
577
581
  duration: this.getSpeededDuration(o),
578
- effect: (f = (p = e == null ? void 0 : e.moveEffect) != null ? p : (m = this.state.config) == null ? void 0 : m.moveEffect) != null ? f : t.moveEffect,
582
+ effect: (u = (d = e == null ? void 0 : e.moveEffect) != null ? d : (p = this.state.config) == null ? void 0 : p.moveEffect) != null ? u : t.moveEffect,
579
583
  moveCancelCallback: () => a(),
580
584
  moveEndCallback: () => a()
581
- }), s && r.once("panoArrived", () => a());
582
- }), s && (this.privateState.modeChanging = !1);
585
+ }), m && r.once("panoArrived", () => a());
586
+ }), m && (this.privateState.modeChanging = !1);
583
587
  });
584
588
  }
585
589
  /**
@@ -592,5 +596,5 @@ class tr extends R {
592
596
  }
593
597
  }
594
598
  export {
595
- tr as default
599
+ er as default
596
600
  };
@@ -1,4 +1,4 @@
1
- import { typing as dt } from "./typing/index.js";
1
+ import { typing as bt } from "./typing/index.js";
2
2
  import t from "./Work.js";
3
3
  import i from "./Move.js";
4
4
  import "../GuideLinePlugin/index.js";
@@ -80,6 +80,8 @@ import "../PanoTagPlugin/utils/tag/adaptConfig.js";
80
80
  import "../shared-utils/typescript/entries.js";
81
81
  import "../shared-utils/url/getUrl.js";
82
82
  import "../shared-utils/five/transformPosition.js";
83
+ import "../shared-utils/Utils/WorkUtil.js";
84
+ import "../shared-utils/Utils/BaseUtil.js";
83
85
  import "../shared-utils/five/getFloorIndex.js";
84
86
  import "../shared-utils/safeObj.js";
85
87
  import "../PanoTagPlugin/Components/TagContainer.js";
@@ -160,6 +162,7 @@ import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
160
162
  import "../shared-utils/three/GLTFLoader.js";
161
163
  import "@realsee/five/gltf-loader";
162
164
  import "../shared-utils/five/fiveModelLoad.js";
165
+ import "../PanoTagPlugin/utils/DebugUtil.js";
163
166
  import "../GuideLinePlugin/Components/Tag.js";
164
167
  import "../GuideLinePlugin/utils/index.js";
165
168
  import "../shared-utils/to.js";
@@ -173,14 +176,15 @@ import "./utils/sleep.js";
173
176
  import "../shared-utils/vectorToCoordinate.js";
174
177
  import "../shared-utils/formatRad.js";
175
178
  import "./BaseController.js";
179
+ import "../shared-utils/Utils/FiveUtil.js";
176
180
  import "./utils/getFiveStateOnCurve.js";
177
- const wt = (o, r) => new t(o, r), xt = (o, r) => new i(o, r);
181
+ const dt = (o, r) => new t(o, r), kt = (o, r) => new i(o, r);
178
182
  export {
179
- wt as CruisePlugin,
183
+ dt as CruisePlugin,
180
184
  t as CruisePluginController,
181
- dt as CruisePluginTypes,
185
+ bt as CruisePluginTypes,
182
186
  i as MoveController,
183
- xt as MovePlugin,
187
+ kt as MovePlugin,
184
188
  t as WalkController,
185
- wt as default
189
+ dt as default
186
190
  };
@@ -5,10 +5,14 @@ import type * as PluginType from './typing';
5
5
  import type { Config } from '../base/BasePlugin';
6
6
  import { GuideLineItem } from './GuideLineItem';
7
7
  import CruisePluginController from '../CruisePlugin/Work';
8
+ import { WorkUtil } from '../shared-utils/Utils/WorkUtil';
8
9
  export declare const pluginFlag: (name: string) => string;
9
10
  export default class Controller extends BasePluginWithData.Controller<PluginState, EventMap, PluginServerData, PluginData> {
10
11
  readonly name = "GuideLinePlugin";
11
12
  readonly cruisePlugin: CruisePluginController;
13
+ set workCode(workCode: string);
14
+ get workCode(): string;
15
+ workUtils: WorkUtil;
12
16
  /** GuideLineItem 索引 */
13
17
  readonly itemMap: Map<string | number, GuideLineItem>;
14
18
  get config(): Config;