@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,12 +1,12 @@
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) => {
1
+ var S = Object.defineProperty;
2
+ var _ = Object.getOwnPropertySymbols;
3
+ var V = Object.prototype.hasOwnProperty, M = Object.prototype.propertyIsEnumerable;
4
+ var c = (s, o, t) => o in s ? S(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
- M.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]);
6
+ V.call(o, t) && c(s, t, o[t]);
7
+ if (_)
8
+ for (var t of _(o))
9
+ M.call(o, t) && c(s, t, o[t]);
10
10
  return s;
11
11
  };
12
12
  var h = (s, o, t) => (c(s, typeof o != "symbol" ? o + "" : o, t), t);
@@ -26,13 +26,14 @@ 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 k } from "../base/BasePluginWithData.js";
30
- import { equal as x } from "../shared-utils/equal.js";
31
- import { GuideLineItem as N } from "./GuideLineItem/index.js";
32
- import $ from "../CruisePlugin/Work.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";
29
+ import { Controller as O } from "../base/BasePluginWithData.js";
30
+ import { equal as U } from "../shared-utils/equal.js";
31
+ import { GuideLineItem as x } from "./GuideLineItem/index.js";
32
+ import N from "../CruisePlugin/Work.js";
33
+ import { objectAssignDeepExports as C } from "../vendor/object-assign-deep/objectAssignDeep.js";
34
+ import * as T from "three";
35
+ import { waitFiveLoaded as W } from "../shared-utils/five/fiveLoaded.js";
36
+ import { WorkUtil as $ } from "../shared-utils/Utils/WorkUtil.js";
36
37
  import "../base/BasePlugin.js";
37
38
  import "../shared-utils/Subscribe.js";
38
39
  import "hammerjs";
@@ -185,6 +186,7 @@ import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
185
186
  import "../shared-utils/three/GLTFLoader.js";
186
187
  import "@realsee/five/gltf-loader";
187
188
  import "../shared-utils/five/fiveModelLoad.js";
189
+ import "../PanoTagPlugin/utils/DebugUtil.js";
188
190
  import "./Components/Tag.js";
189
191
  import "./utils/index.js";
190
192
  import "../shared-utils/to.js";
@@ -192,6 +194,8 @@ import "../shared-utils/five/changeMode.js";
192
194
  import "../shared-utils/nearlyEqual.js";
193
195
  import "../CruisePlugin/Move.js";
194
196
  import "../CruisePlugin/BaseController.js";
197
+ import "../shared-utils/Utils/FiveUtil.js";
198
+ import "../shared-utils/Utils/BaseUtil.js";
195
199
  import "../CruisePlugin/utils/getFiveStateOnCurve.js";
196
200
  import "../shared-utils/vectorToCoordinate.js";
197
201
  import "../shared-utils/formatRad.js";
@@ -201,12 +205,13 @@ import "../CruisePlugin/utils/coordinatesAngle.js";
201
205
  import "../CruisePlugin/utils/coordinatesToVector.js";
202
206
  import "../CruisePlugin/utils/safeCall.js";
203
207
  import "../CruisePlugin/utils/sleep.js";
204
- const b = "GuideLinePlugin", g = `${b}`, Yr = (s) => `${g}--${s}`;
205
- class Zr extends k {
208
+ const b = "GuideLinePlugin", g = `${b}`, ee = (s) => `${g}--${s}`;
209
+ class oe extends O {
206
210
  constructor(t, i) {
207
211
  super(t, i);
208
212
  h(this, "name", b);
209
213
  h(this, "cruisePlugin");
214
+ h(this, "workUtils", new $(this.five));
210
215
  /** GuideLineItem 索引 */
211
216
  h(this, "itemMap", /* @__PURE__ */ new Map());
212
217
  h(this, "state", {
@@ -221,7 +226,13 @@ class Zr extends k {
221
226
  h(this, "disposedErrorLog", () => {
222
227
  console.error(`${g} is disposed`);
223
228
  });
224
- this._config = i != null ? i : {}, this.cruisePlugin = new $(t), Object.assign(window, { [`__${b}_DEBUG__`]: this });
229
+ this._config = i != null ? i : {}, this.cruisePlugin = new N(t), Object.assign(window, { [`__${b}_DEBUG__`]: this });
230
+ }
231
+ set workCode(t) {
232
+ this.workUtils.workCode = t;
233
+ }
234
+ get workCode() {
235
+ return this.workUtils.workCode;
225
236
  }
226
237
  get config() {
227
238
  return this._config;
@@ -231,7 +242,7 @@ class Zr extends k {
231
242
  }
232
243
  load(t, i, a = !0) {
233
244
  return u(this, null, function* () {
234
- var v, I, w, E, y, D, L;
245
+ var v, w, I, E, y, D, k;
235
246
  if (this.disposed)
236
247
  return;
237
248
  const m = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, e = yield this.formatData(t);
@@ -240,14 +251,14 @@ class Zr extends k {
240
251
  panorama_style: {
241
252
  visible: !!(!e.lines && e.routes),
242
253
  unit_length: (v = r == null ? void 0 : r.unitHeight) != null ? v : 0.4,
243
- width: (I = r == null ? void 0 : r.unitWidth) != null ? I : 0.6,
244
- texture: { url: (w = r == null ? void 0 : r.arrowTextureUrl) != null ? w : this.staticPrefix + "/release/web/arrow6.b6ce0c62.png" }
254
+ width: (w = r == null ? void 0 : r.unitWidth) != null ? w : 0.6,
255
+ texture: { url: (I = r == null ? void 0 : r.arrowTextureUrl) != null ? I : this.staticPrefix + "/release/web/arrow-white.5c2c79a5.png" }
245
256
  }
246
257
  }, d = (y = (E = e.routes) == null ? void 0 : E.map((l) => {
247
- var _;
248
- return A({}, n, { id: (_ = l.id) != null ? _ : Date.now(), pano_group: l.panoIndexList });
249
- })) != null ? y : [], S = (L = (D = e.lines) == null ? void 0 : D.map((l) => A({}, n, l))) != null ? L : [], V = [...d, ...S];
250
- yield P(this.five), this.clear(), V.forEach((l) => {
258
+ var L;
259
+ return C({}, n, { id: (L = l.id) != null ? L : Date.now(), pano_group: l.panoIndexList });
260
+ })) != null ? y : [], A = (k = (D = e.lines) == null ? void 0 : D.map((l) => C({}, n, l))) != null ? k : [], G = [...d, ...A];
261
+ yield W(this.five), this.clear(), G.forEach((l) => {
251
262
  this.addGuideLineItem(l);
252
263
  }), 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);
253
264
  });
@@ -286,13 +297,13 @@ class Zr extends k {
286
297
  if (this.disposed)
287
298
  return this.disposedErrorLog();
288
299
  const a = f({}, this.state);
289
- 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), x(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);
300
+ 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), U(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
301
  }
291
302
  /** 添加一个 GuideLineItem */
292
303
  addGuideLineItem(t) {
293
304
  const i = t.render_id || t.id, a = this.itemMap.get(i);
294
305
  a && this.removeGuideLineItem(a);
295
- const m = new N({ five: this.five, id: i, plugin: this });
306
+ const m = new x({ five: this.five, id: i, plugin: this });
296
307
  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;
297
308
  }
298
309
  /** 获取 Plugin 内的 GuideLineItem */
@@ -310,7 +321,7 @@ class Zr extends k {
310
321
  return Array.isArray(e) && e.every((r) => typeof r == "number");
311
322
  }
312
323
  function a(e, r) {
313
- return new G.Vector3().fromArray(e).distanceTo(new G.Vector3().fromArray(r)) < 0.01;
324
+ return new T.Vector3().fromArray(e).distanceTo(new T.Vector3().fromArray(r)) < 0.01;
314
325
  }
315
326
  function m(e) {
316
327
  var p;
@@ -344,6 +355,6 @@ class Zr extends k {
344
355
  }
345
356
  }
346
357
  export {
347
- Zr as default,
348
- Yr as pluginFlag
358
+ oe as default,
359
+ ee as pluginFlag
349
360
  };
@@ -5,7 +5,7 @@ import "@realsee/five";
5
5
  import "../shared-utils/five/changeMode.js";
6
6
  import "../CruisePlugin/Move.js";
7
7
  import "../CruisePlugin/Work.js";
8
- import { GuideLineItem as ao } from "./GuideLineItem/index.js";
8
+ import { GuideLineItem as ho } from "./GuideLineItem/index.js";
9
9
  import "three";
10
10
  import "./utils/createLineGeometry.js";
11
11
  import "../vendor/polyline-normals/index.js";
@@ -76,6 +76,8 @@ import "../PanoTagPlugin/utils/tag/adaptConfig.js";
76
76
  import "../shared-utils/typescript/entries.js";
77
77
  import "../shared-utils/url/getUrl.js";
78
78
  import "../shared-utils/five/transformPosition.js";
79
+ import "../shared-utils/Utils/WorkUtil.js";
80
+ import "../shared-utils/Utils/BaseUtil.js";
79
81
  import "../shared-utils/five/getFloorIndex.js";
80
82
  import "../shared-utils/safeObj.js";
81
83
  import "../PanoTagPlugin/Components/TagContainer.js";
@@ -156,12 +158,14 @@ import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
156
158
  import "../shared-utils/three/GLTFLoader.js";
157
159
  import "@realsee/five/gltf-loader";
158
160
  import "../shared-utils/five/fiveModelLoad.js";
161
+ import "../PanoTagPlugin/utils/DebugUtil.js";
159
162
  import "./Components/Tag.js";
160
163
  import "./utils/index.js";
161
164
  import "../shared-utils/nearlyEqual.js";
162
165
  import "../CruisePlugin/BaseController.js";
163
166
  import "../shared-utils/equal.js";
164
167
  import "../shared-utils/isTruelyObject.js";
168
+ import "../shared-utils/Utils/FiveUtil.js";
165
169
  import "../CruisePlugin/utils/getFiveStateOnCurve.js";
166
170
  import "../shared-utils/vectorToCoordinate.js";
167
171
  import "../shared-utils/formatRad.js";
@@ -174,5 +178,5 @@ import "../CruisePlugin/utils/coordinatesToVector.js";
174
178
  import "../CruisePlugin/utils/safeCall.js";
175
179
  import "../CruisePlugin/utils/sleep.js";
176
180
  export {
177
- ao as GuideLineItem
181
+ ho as GuideLineItem
178
182
  };
@@ -2,26 +2,26 @@ var P = Object.defineProperty, V = Object.defineProperties;
2
2
  var T = Object.getOwnPropertyDescriptors;
3
3
  var k = Object.getOwnPropertySymbols;
4
4
  var F = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
5
- var b = (h, e, t) => e in h ? P(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t, u = (h, e) => {
5
+ var v = (h, e, t) => e in h ? P(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t, d = (h, e) => {
6
6
  for (var t in e || (e = {}))
7
- F.call(e, t) && b(h, t, e[t]);
7
+ F.call(e, t) && v(h, t, e[t]);
8
8
  if (k)
9
9
  for (var t of k(e))
10
- L.call(e, t) && b(h, t, e[t]);
10
+ L.call(e, t) && v(h, t, e[t]);
11
11
  return h;
12
12
  }, p = (h, e) => V(h, T(e));
13
- var i = (h, e, t) => (b(h, typeof e != "symbol" ? e + "" : e, t), t);
13
+ var i = (h, e, t) => (v(h, typeof e != "symbol" ? e + "" : e, t), t);
14
14
  import * as n from "three";
15
- import { logWarning as x, logError as S } from "../../shared-utils/log.js";
16
- import { createLineGeometry as U } from "../utils/createLineGeometry.js";
17
- import { isPanoramaLike as M, isModelLike as _ } from "../../shared-utils/five/mode.js";
15
+ import { logWarning as S, logError as U } from "../../shared-utils/log.js";
16
+ import { createLineGeometry as x } from "../utils/createLineGeometry.js";
17
+ import { isPanoramaLike as M, isModelLike as O } from "../../shared-utils/five/mode.js";
18
18
  import "hammerjs";
19
19
  import "@realsee/five";
20
20
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
21
21
  import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
22
22
  import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
23
- import { BetterTween as O, tweenProgress as G } from "../../shared-utils/animationFrame/BetterTween.js";
24
- import { loadTexture as A } from "../../shared-utils/three/loadTexture.js";
23
+ import { BetterTween as _, tweenProgress as A } from "../../shared-utils/animationFrame/BetterTween.js";
24
+ import { loadTexture as G } from "../../shared-utils/three/loadTexture.js";
25
25
  import w from "../../PanoTagPlugin/controller/index.js";
26
26
  import E from "../Components/Tag.js";
27
27
  import { filterAdjacentDistinct as B } from "../utils/index.js";
@@ -155,8 +155,8 @@ class N {
155
155
  i(this, "plugin");
156
156
  i(this, "textureHasLoaded", !1);
157
157
  i(this, "disposed", !1);
158
- i(this, "flowAnime", new O({ progress: 0 }).to({ progress: 1 }).duration(1500).repeat(1 / 0));
159
- i(this, "flickerAnime", G(300).yoyo(!0).repeat(5));
158
+ i(this, "flowAnime", new _({ progress: 0 }).to({ progress: 1 }).duration(1500).repeat(1 / 0));
159
+ i(this, "flickerAnime", A(300).yoyo(!0).repeat(5));
160
160
  /** 缓存 panoGroup 中每个点距离起点的长度 */
161
161
  i(this, "cacheLengths", []);
162
162
  /** 为了让多条路线在高度上错开,每个路线都需要有个额外的 offset */
@@ -175,7 +175,7 @@ class N {
175
175
  });
176
176
  /** 模型状态变更 */
177
177
  i(this, "onFiveModeChange", (e) => {
178
- this.modeVisible = this.mode === "panorama" ? M(e) : _(e), this.updateVisible();
178
+ this.modeVisible = this.mode === "panorama" ? M(e) : O(e), this.updateVisible();
179
179
  });
180
180
  i(this, "onFiveModelShownFloorChange", (e) => {
181
181
  this.floorVisible = e === null || this.visibleFloorIndexes === null || this.visibleFloorIndexes.includes(e), this.updateVisible();
@@ -190,17 +190,17 @@ class N {
190
190
  this.mesh.material.uniforms.vOffset.value = t, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
191
191
  });
192
192
  i(this, "onFlickerAnimeUpdate", (e) => {
193
- var s, a, o, d;
193
+ var s, o, a, l;
194
194
  const { progress: t } = e, r = 1 - t;
195
- this.mesh.material.uniforms.flicker.value = r, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0, this.startTagContainer.tag && y(this.startTagContainer.tag) && ((o = this.startTagContainer.app) == null || o.$set(p(u({}, this.startTagContainer.tag.data), {
195
+ this.mesh.material.uniforms.flicker.value = r, this.mesh.material.uniformsNeedUpdate = !0, this.five.needsRender = !0, this.startTagContainer.tag && y(this.startTagContainer.tag) && ((a = this.startTagContainer.app) == null || a.$set(p(d({}, this.startTagContainer.tag.data), {
196
196
  opacity: r,
197
197
  name: this.name,
198
- distance: Math.round((a = (s = this.curvePath) == null ? void 0 : s.getLength()) != null ? a : 0)
199
- }))), this.endTagContainer.tag && y(this.endTagContainer.tag) && ((d = this.endTagContainer.app) == null || d.$set(p(u({}, this.endTagContainer.tag.data), { opacity: r })));
198
+ distance: Math.round((o = (s = this.curvePath) == null ? void 0 : s.getLength()) != null ? o : 0)
199
+ }))), this.endTagContainer.tag && y(this.endTagContainer.tag) && ((l = this.endTagContainer.app) == null || l.$set(p(d({}, this.endTagContainer.tag.data), { opacity: r })));
200
200
  });
201
- i(this, "logWarning", (e) => x("GuideLineModeItem: ", e));
202
- i(this, "logError", (e) => S("GuideLineModeItem: ", e));
203
- var a, o;
201
+ i(this, "logWarning", (e) => S("GuideLineModeItem: ", e));
202
+ i(this, "logError", (e) => U("GuideLineModeItem: ", e));
203
+ var o, a;
204
204
  this.five = e, this.mode = t.mode, this.plugin = t.plugin, this.parent = t.parent, this.startTagContainer = { tag: null, plugin: new w(this.five) }, this.endTagContainer = { tag: null, plugin: new w(this.five) };
205
205
  const r = new n.BufferGeometry(), s = new n.ShaderMaterial({
206
206
  vertexShader: R,
@@ -221,7 +221,7 @@ class N {
221
221
  vOffset: { value: 0 }
222
222
  }
223
223
  });
224
- this.mesh = new n.Mesh(r, s), this.mesh.name = "GuideLineModeItem", this.mode === "panorama" && (this.parent.hooks.on("walkStart", this.onWalkAnimationStart), this.parent.hooks.on("walkEnded", this.onWalkAnimationEnd)), this.updateVisible(), this.onFiveModeChange(this.five.getCurrentState().mode), this.onFiveModelShownFloorChange((o = (a = this.five.model) == null ? void 0 : a.shownFloor) != null ? o : null), this.flowAnime.onUpdate(this.onFlowAnimeUpdate), this.flickerAnime.onUpdate(this.onFlickerAnimeUpdate), this.parent.hooks.on("show", this.updateVisible), this.parent.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("show", this.updateVisible), this.plugin.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("enable", this.updateVisible), this.plugin.hooks.on("disable", this.updateVisible), this.plugin.hooks.on("dispose", this.dispose), this.five.on("modeChange", this.onFiveModeChange), this.five.on("modelShownFloorChange", this.onFiveModelShownFloorChange);
224
+ this.mesh = new n.Mesh(r, s), this.mesh.name = "GuideLineModeItem", this.mode === "panorama" && (this.parent.hooks.on("walkStart", this.onWalkAnimationStart), this.parent.hooks.on("walkEnded", this.onWalkAnimationEnd)), this.updateVisible(), this.onFiveModeChange(this.five.getCurrentState().mode), this.onFiveModelShownFloorChange((a = (o = this.five.model) == null ? void 0 : o.shownFloor) != null ? a : null), this.flowAnime.onUpdate(this.onFlowAnimeUpdate), this.flickerAnime.onUpdate(this.onFlickerAnimeUpdate), this.parent.hooks.on("show", this.updateVisible), this.parent.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("show", this.updateVisible), this.plugin.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("enable", this.updateVisible), this.plugin.hooks.on("disable", this.updateVisible), this.plugin.hooks.on("dispose", this.dispose), this.five.on("modeChange", this.onFiveModeChange), this.five.on("modelShownFloorChange", this.onFiveModelShownFloorChange);
225
225
  }
226
226
  get panoGroup() {
227
227
  return this._panoGroup;
@@ -270,28 +270,28 @@ class N {
270
270
  return this.logError("setPathByPanoGroup: work is not ready");
271
271
  const r = B(e);
272
272
  if (this._panoGroup = r, (t == null ? void 0 : t.skipPanoGroup) !== void 0) {
273
- const a = t.skipPanoGroup ? r.map((o) => this.five.work.observers[o]).map((o) => o.standingPosition.clone()) : null;
274
- this.skippedPositions = a;
273
+ const o = t.skipPanoGroup ? r.map((a) => this.plugin.workUtils.getObserverStandingPosition(a)) : null;
274
+ this.skippedPositions = o;
275
275
  }
276
276
  const s = this.getPathFromPanoGroup(r, this.five.work, t);
277
277
  this.path = s, this.setGeometryByPath(s, t);
278
278
  }
279
279
  /** 通过路径设置线条形状 */
280
280
  setGeometryByPath(e, t) {
281
- var f, v, C;
281
+ var c, b, C;
282
282
  if (this.disposed)
283
283
  return this.logError("disposed");
284
- const r = (f = t == null ? void 0 : t.scale) != null ? f : this.scale, s = (v = t == null ? void 0 : t.width) != null ? v : this.width, a = (C = t == null ? void 0 : t.unit_length) != null ? C : this.unitLength;
285
- this.scale = r, this.width = s, this.unitLength = a;
286
- const { geometry: o, maxU: d, curvePath: g, curvePoints: m } = U({
284
+ const r = (c = t == null ? void 0 : t.scale) != null ? c : this.scale, s = (b = t == null ? void 0 : t.width) != null ? b : this.width, o = (C = t == null ? void 0 : t.unit_length) != null ? C : this.unitLength;
285
+ this.scale = r, this.width = s, this.unitLength = o;
286
+ const { geometry: a, maxU: l, curvePath: u, curvePoints: g } = x({
287
287
  path: e,
288
288
  width: s * r,
289
- unitLength: a * r,
289
+ unitLength: o * r,
290
290
  skipPositions: this.skippedPositions
291
291
  });
292
- this._curvePath = g, this._curvePoints = m, this.mesh.geometry = o, this.mesh.material.needsUpdate = !0, this.mesh.material.uniforms.maxU.value = d, this.five.needsRender = !0;
293
- const l = e, c = u(u({}, this.geometryStyle), t);
294
- this.path = l, this.geometryStyle = c;
292
+ this._curvePath = u, this._curvePoints = g, this.mesh.geometry = a, this.mesh.material.needsUpdate = !0, this.mesh.material.uniforms.maxU.value = l, this.five.needsRender = !0;
293
+ const m = e, f = d(d({}, this.geometryStyle), t);
294
+ this.path = m, this.geometryStyle = f;
295
295
  }
296
296
  /** 设置线条材质 */
297
297
  setMartial(e) {
@@ -299,24 +299,24 @@ class N {
299
299
  if (this.disposed)
300
300
  return this.logError("disposed");
301
301
  (e == null ? void 0 : e.visible) !== void 0 && this.setDefaultVisible(e.visible), (e == null ? void 0 : e.color) !== void 0 && this.setColor(e.color), (e == null ? void 0 : e.opacity) !== void 0 && this.setOpacity(e.opacity), ((r = e == null ? void 0 : e.texture) == null ? void 0 : r.url) !== void 0 && this.setTextureUrl(e.texture.url), (e == null ? void 0 : e.background_color) !== void 0 && this.setBackgroundColor(e.background_color), (e == null ? void 0 : e.background_opacity) !== void 0 && this.setBackgroundOpacity(e.background_opacity), (e == null ? void 0 : e.border_color) !== void 0 && this.setBorderColor(e.border_color), (e == null ? void 0 : e.border_opacity) !== void 0 && this.setBorderOpacity(e.border_opacity);
302
- const t = u(u({}, this.materialStyle), e);
302
+ const t = d(d({}, this.materialStyle), e);
303
303
  this.materialStyle = t;
304
304
  }
305
305
  /** 设置模型状态 */
306
306
  setMeshStyle(e) {
307
307
  if (e != null && e.translate) {
308
- const s = new n.Vector3(), a = new n.Vector3().fromArray(e.translate);
309
- a.y += this.heightOffset, s.add(a), this.mesh.position.copy(s), r(this.startTagContainer, a), r(this.endTagContainer, a);
308
+ const s = new n.Vector3(), o = new n.Vector3().fromArray(e.translate);
309
+ o.y += this.heightOffset, s.add(o), this.mesh.position.copy(s), r(this.startTagContainer, o), r(this.endTagContainer, o);
310
310
  }
311
- const t = u(u({}, this.meshStyle), e);
311
+ const t = d(d({}, this.meshStyle), e);
312
312
  this.meshStyle = t;
313
- function r(s, a) {
313
+ function r(s, o) {
314
314
  if (!s.tag)
315
315
  return;
316
- const o = new n.Vector3().fromArray(s.tag.position);
317
- o.add(a);
318
- const d = o.toArray();
319
- s.plugin.changeTagById(s.tag.id, { position: d });
316
+ const a = new n.Vector3().fromArray(s.tag.position);
317
+ a.add(o);
318
+ const l = a.toArray();
319
+ s.plugin.changeTagById(s.tag.id, { position: l });
320
320
  }
321
321
  }
322
322
  /** 设置 Y 轴上的偏移量,为了让多条路线在高度上错开,每个路线都需要有个额外的 offset */
@@ -370,7 +370,7 @@ class N {
370
370
  setTextureUrl(e) {
371
371
  if (this.disposed)
372
372
  return this.logError("disposed");
373
- this.textureUrl = e, A(e).then((t) => {
373
+ this.textureUrl = e, G(e).then((t) => {
374
374
  this.disposed || this.textureUrl === e && (t.wrapT = n.RepeatWrapping, this.textureHasLoaded = !0, this.mesh.material.uniforms.map.value = t, this.mesh.material.uniformsNeedUpdate = !0, this.mesh.material.needsUpdate = !0, this.five.needsRender = !0, this.updateVisible());
375
375
  });
376
376
  }
@@ -402,42 +402,42 @@ class N {
402
402
  return this.disposed ? this.logError("disposed") : this.cacheLengths.length !== 0 ? this.cacheLengths[e] : (this.cacheLengths = this.getPanoGroupLengths(), this.cacheLengths[e]);
403
403
  }
404
404
  getPanoGroupLengths() {
405
- var m;
405
+ var u;
406
406
  if (!this.curvePoints || !this.curvePath)
407
407
  return [];
408
- const e = this.panoGroup.map((l) => this.five.work.observers[l]), t = this.curvePoints.length, r = this.curvePath.getLength(), s = t - 1, a = r / s, o = (m = this.curvePath.getLengths(s)) != null ? m : [], d = [];
409
- let g = 0;
410
- for (let l = 0; l < t; l++) {
411
- const c = this.curvePoints[l], f = e[g];
408
+ const e = this.curvePoints.length, t = this.curvePath.getLength(), r = e - 1, s = t / r, o = (u = this.curvePath.getLengths(r)) != null ? u : [], a = [];
409
+ let l = 0;
410
+ for (let g = 0; g < e; g++) {
411
+ const m = this.curvePoints[g], f = this.plugin.workUtils.getObserverStandingPosition(l);
412
412
  if (!f)
413
413
  break;
414
- f.standingPosition.clone().setY(0).distanceTo(c.clone().setY(0)) < a && (d.push(o[l]), g += 1);
414
+ f.clone().setY(0).distanceTo(m.clone().setY(0)) < s && (a.push(o[g]), l += 1);
415
415
  }
416
- return d;
416
+ return a;
417
417
  }
418
418
  setTag(e, t) {
419
419
  const r = this.curvePath, s = e === "start" ? this.startTagContainer : this.endTagContainer;
420
420
  if (!(t != null && t.data))
421
421
  return s.plugin.clearTags();
422
- const o = I({}, {
422
+ const a = I({}, {
423
423
  contentType: "Custom",
424
424
  stickType: "2DPoint",
425
425
  config: { visibleConfig: { visibleFiveMode: ["Floorplan", "Mapview"], followModelVisibility: !1 } },
426
426
  style: { point: { enabled: !1 } },
427
427
  data: {}
428
428
  }, t);
429
- s.tag = o, y(o) && (s.tag.element = (g) => {
430
- var c, f;
431
- (c = s.app) == null || c.$destroy();
432
- const m = e === "start" ? p(u({}, o.data), { name: this.name, distance: Math.round((f = r.getLength()) != null ? f : 0), i18n: this.plugin.config.i18n }) : o.data, l = new E({ target: g, intro: !0, props: m });
433
- return s.app = l, () => l.$destroy();
429
+ s.tag = a, y(a) && (s.tag.element = (u) => {
430
+ var f, c;
431
+ (f = s.app) == null || f.$destroy();
432
+ const g = e === "start" ? p(d({}, a.data), { name: this.name, distance: Math.round((c = r.getLength()) != null ? c : 0), i18n: this.plugin.config.i18n }) : a.data, m = new E({ target: u, intro: !0, props: g });
433
+ return s.app = m, () => m.$destroy();
434
434
  }), s.plugin.load({ tagList: [s.tag] });
435
- const d = this.meshStyle.translate;
436
- if (d && o.position) {
437
- const g = new n.Vector3().fromArray(o.position), m = new n.Vector3().fromArray(d);
438
- g.add(m), g.y += this.heightOffset;
439
- const l = g.toArray();
440
- s.plugin.changeTagById(s.tag.id, { position: l });
435
+ const l = this.meshStyle.translate;
436
+ if (l && a.position) {
437
+ const u = new n.Vector3().fromArray(a.position), g = new n.Vector3().fromArray(l);
438
+ u.add(g), u.y += this.heightOffset;
439
+ const m = u.toArray();
440
+ s.plugin.changeTagById(s.tag.id, { position: m });
441
441
  }
442
442
  }
443
443
  doShow() {
@@ -450,8 +450,8 @@ class N {
450
450
  getPathFromPanoGroup(e, t, r) {
451
451
  if (e.length < 2)
452
452
  return [];
453
- const a = e.map((o) => t.observers[o]).map((o) => o.standingPosition.toArray());
454
- return [u({ type: "CatmullRomCurve3", points: a }, r)];
453
+ const s = e.map((o) => this.plugin.workUtils.getObserverStandingPosition(o).toArray());
454
+ return [d({ type: "CatmullRomCurve3", points: s }, r)];
455
455
  }
456
456
  }
457
457
  function y(h) {
@@ -13,7 +13,7 @@ import "../PanoTagPlugin/controller/index.js";
13
13
  import "./Components/Tag.js";
14
14
  import "./utils/index.js";
15
15
  import "../vendor/object-assign-deep/objectAssignDeep.js";
16
- import { GuideLineModeItem as Xi } from "./GuideLineModeItem/index.js";
16
+ import { GuideLineModeItem as _i } from "./GuideLineModeItem/index.js";
17
17
  import "../vendor/polyline-normals/index.js";
18
18
  import "../vendor/polyline-miter-util/index.js";
19
19
  import "../vendor/gl-vec2/add.js";
@@ -73,6 +73,8 @@ import "../PanoTagPlugin/utils/tag/adaptConfig.js";
73
73
  import "../shared-utils/typescript/entries.js";
74
74
  import "../shared-utils/url/getUrl.js";
75
75
  import "../shared-utils/five/transformPosition.js";
76
+ import "../shared-utils/Utils/WorkUtil.js";
77
+ import "../shared-utils/Utils/BaseUtil.js";
76
78
  import "../shared-utils/five/getFloorIndex.js";
77
79
  import "../shared-utils/safeObj.js";
78
80
  import "../PanoTagPlugin/Components/TagContainer.js";
@@ -153,6 +155,7 @@ import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
153
155
  import "../shared-utils/three/GLTFLoader.js";
154
156
  import "@realsee/five/gltf-loader";
155
157
  import "../shared-utils/five/fiveModelLoad.js";
158
+ import "../PanoTagPlugin/utils/DebugUtil.js";
156
159
  export {
157
- Xi as GuideLineModeItem
160
+ _i as GuideLineModeItem
158
161
  };
@@ -1,6 +1,6 @@
1
1
  import t from "./Controller.js";
2
- import { GuideLineItem$1 as Mt } from "./GuideLineItem/index.js";
3
- import { GuideLineModeItem$1 as ct } from "./GuideLineModeItem/index.js";
2
+ import { GuideLineItem$1 as wt } from "./GuideLineItem/index.js";
3
+ import { GuideLineModeItem$1 as Pt } from "./GuideLineModeItem/index.js";
4
4
  import "../base/BasePluginWithData.js";
5
5
  import "../base/BasePlugin.js";
6
6
  import "../shared-utils/Subscribe.js";
@@ -38,6 +38,10 @@ import "../shared-utils/vectorToCoordinate.js";
38
38
  import "../shared-utils/formatRad.js";
39
39
  import "../CruisePlugin/BaseController.js";
40
40
  import "../vendor/object-assign-deep/objectAssignDeep.js";
41
+ import "../shared-utils/Utils/FiveUtil.js";
42
+ import "../shared-utils/Utils/BaseUtil.js";
43
+ import "../shared-utils/Utils/WorkUtil.js";
44
+ import "../shared-utils/five/transformPosition.js";
41
45
  import "../shared-utils/log.js";
42
46
  import "./utils/createLineGeometry.js";
43
47
  import "../vendor/polyline-normals/index.js";
@@ -86,7 +90,6 @@ import "../shared-utils/five/calculateThreeMouse.js";
86
90
  import "../PanoTagPlugin/utils/tag/adaptConfig.js";
87
91
  import "../shared-utils/typescript/entries.js";
88
92
  import "../shared-utils/url/getUrl.js";
89
- import "../shared-utils/five/transformPosition.js";
90
93
  import "../shared-utils/five/getFloorIndex.js";
91
94
  import "../shared-utils/safeObj.js";
92
95
  import "../PanoTagPlugin/Components/TagContainer.js";
@@ -166,6 +169,7 @@ import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
166
169
  import "../shared-utils/three/GLTFLoader.js";
167
170
  import "@realsee/five/gltf-loader";
168
171
  import "../shared-utils/five/fiveModelLoad.js";
172
+ import "../PanoTagPlugin/utils/DebugUtil.js";
169
173
  import "./Components/Tag.js";
170
174
  import "./utils/index.js";
171
175
  import "../shared-utils/to.js";
@@ -173,10 +177,10 @@ import "../shared-utils/five/changeMode.js";
173
177
  import "../shared-utils/nearlyEqual.js";
174
178
  import "../CruisePlugin/Move.js";
175
179
  import "../CruisePlugin/utils/getFiveStateOnCurve.js";
176
- const st = (i, o) => new t(i, o);
180
+ const $t = (i, o) => new t(i, o);
177
181
  export {
178
- Mt as GuideLineItem,
179
- ct as GuideLineModeItem,
180
- st as GuideLinePlugin,
181
- st as default
182
+ wt as GuideLineItem,
183
+ Pt as GuideLineModeItem,
184
+ $t as GuideLinePlugin,
185
+ $t as default
182
186
  };
@@ -1,18 +1,18 @@
1
- var $ = Object.defineProperty, w = Object.defineProperties;
1
+ var A = Object.defineProperty, $ = Object.defineProperties;
2
2
  var E = Object.getOwnPropertyDescriptors;
3
- var k = Object.getOwnPropertySymbols;
3
+ var T = Object.getOwnPropertySymbols;
4
4
  var L = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
5
- var M = (b, e, i) => e in b ? $(b, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : b[e] = i, x = (b, e) => {
5
+ var M = (b, e, i) => e in b ? A(b, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : b[e] = i, x = (b, e) => {
6
6
  for (var i in e || (e = {}))
7
7
  L.call(e, i) && M(b, i, e[i]);
8
- if (k)
9
- for (var i of k(e))
8
+ if (T)
9
+ for (var i of T(e))
10
10
  _.call(e, i) && M(b, i, e[i]);
11
11
  return b;
12
- }, D = (b, e) => w(b, E(e));
12
+ }, U = (b, e) => $(b, E(e));
13
13
  import * as F from "three";
14
- import { is3DTag as z, isMediaModelTag as R } from "../utils/tag/tagCheck.js";
15
- import { getTagCenterPosition as C, getTagPosition as O } from "../utils/tagPosition.js";
14
+ import { is3DTag as O, isMediaModelTag as D } from "../utils/tag/tagCheck.js";
15
+ import { getTagCenterPosition as C, getTagPosition as z } from "../utils/tagPosition.js";
16
16
  import { checkRange as h } from "../utils/checkRange.js";
17
17
  import { isPanoramaLike as y, isModelLike as Z } from "../../shared-utils/five/mode.js";
18
18
  import "hammerjs";
@@ -23,7 +23,7 @@ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
23
23
  import { notNil as q } from "../../shared-utils/isNil.js";
24
24
  import { TagUtil as H } from "./TagUtil.js";
25
25
  import { getFloorIndex as N } from "../../shared-utils/five/getFloorIndex.js";
26
- import { safeObj as U } from "../../shared-utils/safeObj.js";
26
+ import { safeObj as R } from "../../shared-utils/safeObj.js";
27
27
  import { toArray as W } from "../../shared-utils/util.js";
28
28
  import "../../shared-utils/three/centerPoint.js";
29
29
  import "../../shared-utils/positionToVector3.js";
@@ -64,9 +64,11 @@ import "../utils/tag/adaptConfig.js";
64
64
  import "../../shared-utils/typescript/entries.js";
65
65
  import "../../shared-utils/url/getUrl.js";
66
66
  import "../../shared-utils/five/transformPosition.js";
67
+ import "../../shared-utils/Utils/WorkUtil.js";
68
+ import "../../shared-utils/Utils/BaseUtil.js";
67
69
  const I = new F.Raycaster();
68
70
  I.params.Points.threshold = 0.1;
69
- class Je extends H {
71
+ class Qe extends H {
70
72
  constructor(e) {
71
73
  super(e);
72
74
  }
@@ -131,7 +133,7 @@ class Je extends H {
131
133
  reason: `distance is not in visibleDistance. distance: ${l}, visibleDistance: ${n.visibleDistance}`
132
134
  };
133
135
  }
134
- if (y(o) && n.angleRange && z(e)) {
136
+ if (y(o) && n.angleRange && O(e)) {
135
137
  s.push("angleRange");
136
138
  const l = this.getAngle(e);
137
139
  if (h(l, n.angleRange) === !1)
@@ -216,7 +218,7 @@ class Je extends H {
216
218
  }).map((r) => ({ tag: r, id: r.id, tagConfig: this.getTagConfig(r).unfoldedConfig })).filter(({ tag: r, tagConfig: a }) => {
217
219
  var u, m;
218
220
  return !(typeof a == "function" || a.keep || a.autoUnfold === !1 || ((u = a.autoUnfold) == null ? void 0 : u.enable) === !1 || ((m = a.autoUnfold) == null ? void 0 : m.strategy) !== "MinimumDistance");
219
- }).map((r) => D(x({}, r), { distance: this.getDistance(r.tag) })).filter(({ distance: r, tagConfig: a }) => {
221
+ }).map((r) => U(x({}, r), { distance: this.getDistance(r.tag) })).filter(({ distance: r, tagConfig: a }) => {
220
222
  const u = a.autoUnfold.distance;
221
223
  return !(u && h(r, u) === !1);
222
224
  }).sort((r, a) => r.distance - a.distance).findIndex((r) => r.id === e.id);
@@ -265,14 +267,14 @@ class Je extends H {
265
267
  /** 通过射线检测标签可用性 */
266
268
  getTagEnableByIntersect(e, i) {
267
269
  var n, r, a, u, m;
268
- const f = U(U((n = this.getTagConfig(e).visibleConfig) != null ? n : {}).intersectRaycaster), t = i != null ? i : this.five.getCurrentState().panoIndex, o = y(this.five.getCurrentState().mode) ? this.getObserverPosition(t) : this.five.camera.position;
270
+ const f = R(R((n = this.getTagConfig(e).visibleConfig) != null ? n : {}).intersectRaycaster), t = i != null ? i : this.five.getCurrentState().panoIndex, o = y(this.five.getCurrentState().mode) ? this.workUtil.getObserverPosition(t) : this.five.camera.position;
269
271
  if (o === void 0)
270
272
  return { value: !1, reason: { type: "startPosition is undefined", fivePanoIndex: t } };
271
273
  const d = W(
272
274
  (() => {
273
275
  var g;
274
276
  const v = (g = f.checkPoints) != null ? g : "center";
275
- return v === "center" ? C(e) : v === "corner" ? O(e) : Array.isArray(v) ? v : [];
277
+ return v === "center" ? C(e) : v === "corner" ? z(e) : Array.isArray(v) ? v : [];
276
278
  })()
277
279
  );
278
280
  let s = 0, c = 0;
@@ -280,13 +282,13 @@ class Je extends H {
280
282
  const g = new F.Vector3().subVectors(v, o).normalize();
281
283
  I.set(o, g);
282
284
  const P = o.distanceTo(v), [l] = this.five.model.intersectRaycaster(I), p = (() => {
283
- if (!R(e))
285
+ if (!D(e))
284
286
  return;
285
- const V = this.tags.filter(R).map((A) => {
286
- var T;
287
- return (T = A.model) == null ? void 0 : T.object;
288
- }).filter(q), [B] = I.intersectObjects(V, !0);
289
- return B;
287
+ const V = this.tags.filter(D).map((B) => {
288
+ var k;
289
+ return (k = B.model) == null ? void 0 : k.object;
290
+ }).filter(q), [w] = I.intersectObjects(V, !0);
291
+ return w;
290
292
  })(), S = (r = f.distanceAccuracy) != null ? r : 0.01;
291
293
  Math.min((a = l == null ? void 0 : l.distance) != null ? a : 1 / 0, (u = p == null ? void 0 : p.distance) != null ? u : 1 / 0) + S >= P ? s++ : c++;
292
294
  const j = (m = f.needPassed) != null ? m : 1;
@@ -307,11 +309,11 @@ class Je extends H {
307
309
  var o, d, s, c, n, r, a;
308
310
  let i = 0;
309
311
  const f = (o = e.fiveState) == null ? void 0 : o.panoIndex;
310
- f !== void 0 ? i = (d = this.work.observers[f]) == null ? void 0 : d.floorIndex : i = N(this.work, (a = (r = (c = (s = e.model) == null ? void 0 : s.object) == null ? void 0 : c.position) != null ? r : (n = e.mediaPlane) == null ? void 0 : n.position) != null ? a : C(e));
312
+ f !== void 0 ? i = (d = this.workUtil.getObserver(f)) == null ? void 0 : d.floorIndex : i = N(this.workUtil.work, (a = (r = (c = (s = e.model) == null ? void 0 : s.object) == null ? void 0 : c.position) != null ? r : (n = e.mediaPlane) == null ? void 0 : n.position) != null ? a : C(e));
311
313
  const t = this.five.model.shownFloor;
312
314
  return t === null || t === i;
313
315
  }
314
316
  }
315
317
  export {
316
- Je as TagComputer
318
+ Qe as TagComputer
317
319
  };