@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
@@ -0,0 +1,5 @@
1
+ import type { Five } from '@realsee/five';
2
+ export declare class BaseUtil {
3
+ five: Five;
4
+ constructor(five: Five);
5
+ }
@@ -0,0 +1,10 @@
1
+ import type { Five } from '@realsee/five';
2
+ import { BaseUtil } from './BaseUtil';
3
+ import { WorkUtil } from './WorkUtil';
4
+ export declare class FiveUtil extends BaseUtil {
5
+ workUtil: WorkUtil;
6
+ get version(): string;
7
+ get majorVersion(): number;
8
+ constructor(five: Five);
9
+ moveToPano(panoNumber: number, movePanoOptions: Parameters<Five['moveToPano']>[1]): Promise<void>;
10
+ }
@@ -0,0 +1,33 @@
1
+ import type { Five } from '@realsee/five';
2
+ import { BaseUtil } from './BaseUtil';
3
+ import * as THREE from 'three';
4
+ export declare class WorkUtil extends BaseUtil {
5
+ private _workCode;
6
+ /**
7
+ * @description: 设置插件当前的 workCode
8
+ */
9
+ set workCode(workCode: string);
10
+ /**
11
+ * @description: 获取插件当前的 workCode
12
+ */
13
+ get workCode(): string;
14
+ /**
15
+ * @description: 获取当前的 work
16
+ */
17
+ get work(): import("@realsee/five").Work;
18
+ get observers(): import("@realsee/five").WorkObserver[];
19
+ get transform(): THREE.Matrix4;
20
+ constructor(five: Five);
21
+ /**
22
+ * @description: 获取全景点坐标
23
+ */
24
+ getObserverPosition(observerIndex: number): THREE.Vector3 | undefined;
25
+ /**
26
+ * @description: 获取全景点位和模型的地面坐标
27
+ */
28
+ getObserverStandingPosition(observerIndex: number): THREE.Vector3 | undefined;
29
+ /**
30
+ * @description: 获取observer
31
+ */
32
+ getObserver(observerIndex: number): import("@realsee/five").WorkObserver;
33
+ }
@@ -4,9 +4,14 @@ import type { GuideLinePluginExportType } from '../GuideLinePlugin';
4
4
  import * as BasePlugin from '../base/BasePlugin';
5
5
  import type { PluginState, EventMap, MoveEffect } from './typing';
6
6
  import type { PartialDeep } from 'type-fest';
7
+ import { FiveUtil } from '../shared-utils/Utils/FiveUtil';
7
8
  export declare const pluginFlag: (name: string) => string;
8
9
  export default abstract class CruiseController<PluginData, Config = unknown> extends BasePlugin.Controller<PluginState, EventMap> {
9
10
  state: PluginState;
11
+ set workCode(workCode: string);
12
+ get workCode(): string;
13
+ protected fiveUtil: FiveUtil;
14
+ protected workUtil: import("../shared-utils/Utils/WorkUtil").WorkUtil;
10
15
  protected data?: PluginData & {
11
16
  id: string | number;
12
17
  };
@@ -1,34 +1,35 @@
1
1
  var c = Object.defineProperty;
2
2
  var f = Object.getOwnPropertySymbols;
3
3
  var v = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
4
- var u = (a, s, e) => s in a ? c(a, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[s] = e, g = (a, s) => {
4
+ var p = (a, s, e) => s in a ? c(a, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[s] = e, g = (a, s) => {
5
5
  for (var e in s || (s = {}))
6
- v.call(s, e) && u(a, e, s[e]);
6
+ v.call(s, e) && p(a, e, s[e]);
7
7
  if (f)
8
8
  for (var e of f(s))
9
- S.call(s, e) && u(a, e, s[e]);
9
+ S.call(s, e) && p(a, e, s[e]);
10
10
  return a;
11
11
  };
12
- var d = (a, s, e) => (u(a, typeof s != "symbol" ? s + "" : s, e), e);
13
- var p = (a, s, e) => new Promise((t, i) => {
14
- var r = (h) => {
12
+ var d = (a, s, e) => (p(a, typeof s != "symbol" ? s + "" : s, e), e);
13
+ var u = (a, s, e) => new Promise((i, t) => {
14
+ var r = (l) => {
15
15
  try {
16
- n(e.next(h));
17
- } catch (o) {
18
- i(o);
16
+ o(e.next(l));
17
+ } catch (n) {
18
+ t(n);
19
19
  }
20
- }, m = (h) => {
20
+ }, b = (l) => {
21
21
  try {
22
- n(e.throw(h));
23
- } catch (o) {
24
- i(o);
22
+ o(e.throw(l));
23
+ } catch (n) {
24
+ t(n);
25
25
  }
26
- }, n = (h) => h.done ? t(h.value) : Promise.resolve(h.value).then(r, m);
27
- n((e = e.apply(a, s)).next());
26
+ }, o = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(r, b);
27
+ o((e = e.apply(a, s)).next());
28
28
  });
29
- import { Controller as y } from "../base/BasePlugin.js";
30
- import { equal as L } from "../shared-utils/equal.js";
31
- import { objectAssignDeepExports as C } from "../vendor/object-assign-deep/objectAssignDeep.js";
29
+ import { Controller as w } from "../base/BasePlugin.js";
30
+ import { equal as C } from "../shared-utils/equal.js";
31
+ import { objectAssignDeepExports as y } from "../vendor/object-assign-deep/objectAssignDeep.js";
32
+ import { FiveUtil as L } from "../shared-utils/Utils/FiveUtil.js";
32
33
  import "../shared-utils/Subscribe.js";
33
34
  import "hammerjs";
34
35
  import "three";
@@ -51,10 +52,13 @@ import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
51
52
  import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
52
53
  import "../shared-utils/url/absoluteUrl.js";
53
54
  import "../shared-utils/isTruelyObject.js";
54
- const b = "CruisePlugin", l = `${b}`, R = (a) => `${l}--${a}`;
55
- class T extends y {
56
- constructor(e, t) {
57
- super(e, t);
55
+ import "../shared-utils/Utils/BaseUtil.js";
56
+ import "../shared-utils/Utils/WorkUtil.js";
57
+ import "../shared-utils/five/transformPosition.js";
58
+ const m = "CruisePlugin", h = `${m}`, ee = (a) => `${h}--${a}`;
59
+ class ie extends w {
60
+ constructor(e, i) {
61
+ super(e, i);
58
62
  d(this, "state", {
59
63
  visible: !0,
60
64
  enabled: !0,
@@ -62,6 +66,8 @@ class T extends y {
62
66
  playing: !1,
63
67
  speed: 1
64
68
  });
69
+ d(this, "fiveUtil", new L(this.five));
70
+ d(this, "workUtil", this.fiveUtil.workUtil);
65
71
  d(this, "data");
66
72
  d(this, "config");
67
73
  d(this, "pauseDataMap", /* @__PURE__ */ new Map());
@@ -72,15 +78,21 @@ class T extends y {
72
78
  });
73
79
  d(this, "GuideLine");
74
80
  d(this, "disposedErrorLog", () => {
75
- console.error(`${l} is disposed`);
81
+ console.error(`${h} is disposed`);
76
82
  });
77
83
  d(this, "disableWarnLog", () => {
78
- console.warn(`${l} is disabled`);
84
+ console.warn(`${h} is disabled`);
79
85
  });
80
86
  d(this, "disableErrorLog", () => {
81
- console.error(`${l} is disabled`);
87
+ console.error(`${h} is disabled`);
82
88
  });
83
- this.config = t, Object.assign(window, { [`__${b}_DEBUG__`]: this });
89
+ this.config = i, Object.assign(window, { [`__${m}_DEBUG__`]: this });
90
+ }
91
+ set workCode(e) {
92
+ this.fiveUtil.workUtil.workCode = e;
93
+ }
94
+ get workCode() {
95
+ return this.fiveUtil.workUtil.workCode;
84
96
  }
85
97
  /**
86
98
  * @description Play | Continue play. if have been paused, continue play from the pause position; if playing, do nothing
@@ -98,7 +110,7 @@ class T extends y {
98
110
  * @description Show guide line
99
111
  */
100
112
  show(e) {
101
- return p(this, null, function* () {
113
+ return u(this, null, function* () {
102
114
  this.setState({ visible: !0 }, e);
103
115
  });
104
116
  }
@@ -106,7 +118,7 @@ class T extends y {
106
118
  * @description Hide guide line
107
119
  */
108
120
  hide(e) {
109
- return p(this, null, function* () {
121
+ return u(this, null, function* () {
110
122
  this.setState({ visible: !1 }, e);
111
123
  });
112
124
  }
@@ -131,50 +143,50 @@ class T extends y {
131
143
  /**
132
144
  * @description Set state
133
145
  */
134
- setState(e, t) {
146
+ setState(e, i) {
135
147
  var r;
136
148
  if (this.state.disposed)
137
149
  return this.disposedErrorLog();
138
150
  if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
139
151
  return this.disableErrorLog();
140
- const i = g({}, this.state);
141
- this.state = C({}, this.state, e), e.disposed !== void 0 && e.disposed !== i.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== i.visible && this.handleVisible(e.visible, t == null ? void 0 : t.userAction), e.enabled !== void 0 && e.enabled !== i.enabled && this.handleEnable(e.enabled, t == null ? void 0 : t.userAction), e.playing !== void 0 && e.playing !== i.playing && this.changePlayState(e.playing, t), e.speed !== void 0 && e.speed !== i.speed && this.changeSpeed(e.speed), L(i, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: (r = t == null ? void 0 : t.userAction) != null ? r : !0 });
152
+ const t = g({}, this.state);
153
+ this.state = y({}, this.state, e), e.disposed !== void 0 && e.disposed !== t.disposed && e.disposed && this.handleDispose(), e.visible !== void 0 && e.visible !== t.visible && this.handleVisible(e.visible, i == null ? void 0 : i.userAction), e.enabled !== void 0 && e.enabled !== t.enabled && this.handleEnable(e.enabled, i == null ? void 0 : i.userAction), e.playing !== void 0 && e.playing !== t.playing && this.changePlayState(e.playing, i), e.speed !== void 0 && e.speed !== t.speed && this.changeSpeed(e.speed), C(t, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: t, userAction: (r = i == null ? void 0 : i.userAction) != null ? r : !0 });
142
154
  }
143
155
  /**
144
156
  * @description Clear pause data
145
157
  */
146
158
  clearPauseData() {
147
- var e, t;
159
+ var e, i;
148
160
  if ((e = this.data) != null && e.id)
149
- return this.pauseDataMap.delete((t = this.data) == null ? void 0 : t.id);
161
+ return this.pauseDataMap.delete((i = this.data) == null ? void 0 : i.id);
150
162
  }
151
- changePlayState(e, t) {
163
+ changePlayState(e, i) {
152
164
  this.actionIfStateIsEnabled(
153
165
  () => {
154
- var i;
155
- return this.hooks.emit("playStateChange", e ? "playing" : "pause", { userAction: (i = t == null ? void 0 : t.userAction) != null ? i : !0 });
166
+ var t;
167
+ return this.hooks.emit("playStateChange", e ? "playing" : "pause", { userAction: (t = i == null ? void 0 : i.userAction) != null ? t : !0 });
156
168
  }
157
- ), e ? this.handlePlay(t) : this.handlePause(t), this.state.playing = e;
169
+ ), e ? this.handlePlay(i) : this.handlePause(i), this.state.playing = e;
158
170
  }
159
- handleEnable(e, t = !0) {
160
- var i, r;
161
- e ? ((i = this.GuideLine) == null || i.enable(), this.hooks.emit("enable", { userAction: t })) : ((r = this.GuideLine) == null || r.disable(), this.changePlayState(!1, { userAction: t }), this.hooks.emit("disable", { userAction: t })), this.state.enabled = e;
171
+ handleEnable(e, i = !0) {
172
+ var t, r;
173
+ e ? ((t = this.GuideLine) == null || t.enable(), this.hooks.emit("enable", { userAction: i })) : ((r = this.GuideLine) == null || r.disable(), this.changePlayState(!1, { userAction: i }), this.hooks.emit("disable", { userAction: i })), this.state.enabled = e;
162
174
  }
163
- handleVisible(e, t = !0) {
164
- var i, r;
165
- e ? ((i = this.GuideLine) == null || i.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: t }))) : ((r = this.GuideLine) == null || r.hide(), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: t }))), this.state.visible = e;
175
+ handleVisible(e, i = !0) {
176
+ var t, r;
177
+ e ? ((t = this.GuideLine) == null || t.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: i }))) : ((r = this.GuideLine) == null || r.hide(), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: i }))), this.state.visible = e;
166
178
  }
167
179
  /**
168
180
  * @description: listen interupted by five gesture
169
181
  */
170
182
  addInterruptListener(e) {
171
- const t = () => {
183
+ const i = () => {
172
184
  this.privateState.modeChanging || e();
173
- }, i = (r) => {
174
- r !== "mouseMove" && (e(), this.five.off("gesture", i));
185
+ }, t = (r) => {
186
+ r !== "mouseMove" && (e(), this.five.off("gesture", t));
175
187
  };
176
- return this.five.on("gesture", i), this.five.once("wantsChangeMode", t), () => {
177
- this.five.off("gesture", i), this.five.off("wantsChangeMode", t);
188
+ return this.five.on("gesture", t), this.five.once("wantsChangeMode", i), () => {
189
+ this.five.off("gesture", t), this.five.off("wantsChangeMode", i);
178
190
  };
179
191
  }
180
192
  /**
@@ -198,8 +210,8 @@ class T extends y {
198
210
  * @description Set pause data
199
211
  */
200
212
  setPauseData() {
201
- var t;
202
- const e = (t = this.data) == null ? void 0 : t.id;
213
+ var i;
214
+ const e = (i = this.data) == null ? void 0 : i.id;
203
215
  if (e)
204
216
  return this.pauseDataMap.set(e, {
205
217
  fiveState: this.five.getCurrentState(),
@@ -220,13 +232,13 @@ class T extends y {
220
232
  /**
221
233
  * @description Action function if plugin is enable
222
234
  */
223
- actionIfStateIsEnabled(e, t) {
235
+ actionIfStateIsEnabled(e, i) {
224
236
  if (this.state.enabled)
225
237
  return e();
226
- t != null && t.warnLog && this.disableWarnLog();
238
+ i != null && i.warnLog && this.disableWarnLog();
227
239
  }
228
240
  }
229
241
  export {
230
- T as default,
231
- R as pluginFlag
242
+ ie as default,
243
+ ee as pluginFlag
232
244
  };
@@ -2,30 +2,30 @@ var C = Object.defineProperty, P = Object.defineProperties;
2
2
  var b = Object.getOwnPropertyDescriptors;
3
3
  var y = Object.getOwnPropertySymbols;
4
4
  var k = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
5
- var u = (r, t, e) => t in r ? C(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, d = (r, t) => {
6
- for (var e in t || (t = {}))
7
- k.call(t, e) && u(r, e, t[e]);
5
+ var u = (r, e, t) => e in r ? C(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, d = (r, e) => {
6
+ for (var t in e || (e = {}))
7
+ k.call(e, t) && u(r, t, e[t]);
8
8
  if (y)
9
- for (var e of y(t))
10
- O.call(t, e) && u(r, e, t[e]);
9
+ for (var t of y(e))
10
+ O.call(e, t) && u(r, t, e[t]);
11
11
  return r;
12
- }, c = (r, t) => P(r, b(t));
13
- var f = (r, t, e) => (u(r, typeof t != "symbol" ? t + "" : t, e), e);
14
- var S = (r, t, e) => new Promise((s, h) => {
12
+ }, c = (r, e) => P(r, b(e));
13
+ var f = (r, e, t) => (u(r, typeof e != "symbol" ? e + "" : e, t), t);
14
+ var S = (r, e, t) => new Promise((s, h) => {
15
15
  var o = (i) => {
16
16
  try {
17
- n(e.next(i));
17
+ n(t.next(i));
18
18
  } catch (a) {
19
19
  h(a);
20
20
  }
21
21
  }, p = (i) => {
22
22
  try {
23
- n(e.throw(i));
23
+ n(t.throw(i));
24
24
  } catch (a) {
25
25
  h(a);
26
26
  }
27
27
  }, n = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(o, p);
28
- n((e = e.apply(r, t)).next());
28
+ n((t = t.apply(r, e)).next());
29
29
  });
30
30
  import w from "./BaseController.js";
31
31
  import { objectAssignDeepExports as l } from "../vendor/object-assign-deep/objectAssignDeep.js";
@@ -42,6 +42,10 @@ import "../shared-utils/Subscribe.js";
42
42
  import "../shared-utils/url/absoluteUrl.js";
43
43
  import "../shared-utils/equal.js";
44
44
  import "../shared-utils/isTruelyObject.js";
45
+ import "../shared-utils/Utils/FiveUtil.js";
46
+ import "../shared-utils/Utils/BaseUtil.js";
47
+ import "../shared-utils/Utils/WorkUtil.js";
48
+ import "../shared-utils/five/transformPosition.js";
45
49
  import "../shared-utils/positionToVector3.js";
46
50
  import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
47
51
  import "three/examples/jsm/renderers/CSS3DRenderer";
@@ -57,17 +61,17 @@ import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
57
61
  import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
58
62
  import "../shared-utils/vectorToCoordinate.js";
59
63
  import "../shared-utils/formatRad.js";
60
- class re extends w {
61
- constructor(e, s) {
64
+ class nt extends w {
65
+ constructor(t, s) {
62
66
  var p;
63
- super(e, s);
67
+ super(t, s);
64
68
  f(this, "curve");
65
69
  f(this, "baseCurveOffset");
66
70
  f(this, "curveOffset");
67
71
  f(this, "playStartedTime", performance.now());
68
72
  f(this, "duration");
69
- f(this, "changeSpeed", (e, s = !0) => {
70
- this.state.speed = e, this.hooks.emit("speedChange", e, { userAction: s });
73
+ f(this, "changeSpeed", (t, s = !0) => {
74
+ this.state.speed = t, this.hooks.emit("speedChange", t, { userAction: s });
71
75
  });
72
76
  f(this, "moveToStart", () => {
73
77
  this.five.setState(c(d({}, g(this.curve, 0, this.curveOffset)), { mode: "Model" }));
@@ -78,8 +82,8 @@ class re extends w {
78
82
  f(this, "getDuration", () => this.getSpeededDuration(this.duration));
79
83
  f(this, "getProgress", () => {
80
84
  var i;
81
- const e = this.getPauseData();
82
- let s = (i = e == null ? void 0 : e.playedProgress) != null ? i : 0;
85
+ const t = this.getPauseData();
86
+ let s = (i = t == null ? void 0 : t.playedProgress) != null ? i : 0;
83
87
  (s < 0 || s >= 1) && (s = 0);
84
88
  const h = 1 - s, o = this.getDuration(), n = (performance.now() - this.playStartedTime) / o;
85
89
  return 1 - h + n;
@@ -96,9 +100,9 @@ class re extends w {
96
100
  };
97
101
  this.state = l({}, h, this.state), this.config = l({}, o, this.config), this.baseCurveOffset = l({ x: 0, y: 0, z: 0 }, { y: 2 }, (p = this.config) == null ? void 0 : p.offset);
98
102
  }
99
- load(e, s) {
103
+ load(t, s) {
100
104
  var p, n, i, a, m, v;
101
- if (this.handlePause(), this.clear(), this.data = d({ id: x() }, e), this.curve = this.data.path.curves[0], this.curveOffset = {
105
+ if (this.handlePause(), this.clear(), this.data = d({ id: x() }, t), this.curve = this.data.path.curves[0], this.curveOffset = {
102
106
  x: this.baseCurveOffset.x + ((n = (p = this.data.offset) == null ? void 0 : p.x) != null ? n : 0),
103
107
  y: this.baseCurveOffset.y + ((a = (i = this.data.offset) == null ? void 0 : i.y) != null ? a : 0),
104
108
  z: this.baseCurveOffset.z + ((v = (m = this.data.offset) == null ? void 0 : m.z) != null ? v : 0)
@@ -108,7 +112,7 @@ class re extends w {
108
112
  return this.duration = h / (this.state.config.speedConfig.moveSpeed / o), s ? this.setState(s) : (this.setState({ playing: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing), this.changeSpeed(this.state.speed)), Promise.resolve();
109
113
  }
110
114
  handlePlay() {
111
- return new Promise((e, s) => S(this, null, function* () {
115
+ return new Promise((t, s) => S(this, null, function* () {
112
116
  var i;
113
117
  this.hooks.emit("play", { userAction: !0 });
114
118
  const h = this.getPauseData();
@@ -123,7 +127,7 @@ class re extends w {
123
127
  const n = () => {
124
128
  const a = this.getProgress();
125
129
  if (a >= 1)
126
- this.five.off("renderFrame", n), this.setState({ playing: !1 }, { userAction: !1 }), this.hooks.emit("end"), this.hooks.emit("progressChange", 1), e("end");
130
+ this.five.off("renderFrame", n), this.setState({ playing: !1 }, { userAction: !1 }), this.hooks.emit("end"), this.hooks.emit("progressChange", 1), t("end");
127
131
  else if (this.state.playing === !1)
128
132
  this.five.off("renderFrame", n);
129
133
  else if (a >= 0) {
@@ -134,11 +138,11 @@ class re extends w {
134
138
  this.five.on("renderFrame", n);
135
139
  }));
136
140
  }
137
- handlePause(e) {
141
+ handlePause(t) {
138
142
  var s;
139
- this.state.playing = !1, this.hooks.emit("pause", { userAction: (s = e == null ? void 0 : e.userAction) != null ? s : !0 }), this.setPauseData();
143
+ this.state.playing = !1, this.hooks.emit("pause", { userAction: (s = t == null ? void 0 : t.userAction) != null ? s : !0 }), this.setPauseData();
140
144
  }
141
145
  }
142
146
  export {
143
- re as default
147
+ nt as default
144
148
  };
@@ -78,11 +78,7 @@ export default class WalkController extends CruiseController<PluginData, Config>
78
78
  protected setPauseData(): Map<string | number, {
79
79
  fiveState: Partial<State>;
80
80
  id?: string | number;
81
- playedProgress: number; /**
82
- * privateState.playing 和 state.playing 的区别:
83
- * state.playing 先为true,然后才 handleplay,handleplay方法内会检查privateState.playing,如果已经开始(privateState.playing === true),就不执行操作,如果为false,就执行操作
84
- * 其实就是加了一个不允许重复执行handleplay的逻辑
85
- */
81
+ playedProgress: number;
86
82
  duration?: number;
87
83
  }>;
88
84
  /**