@realsee/dnalogel 2.1.0-alpha.18 → 2.1.0-alpha.19

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 (203) hide show
  1. package/dist/index.cjs.js +58 -58
  2. package/dist/index.es.js +5814 -8139
  3. package/dist/index.js +20871 -0
  4. package/dist/index.umd.js +50 -50
  5. package/docs/assets/search.js +1 -1
  6. package/docs/classes/CruisePluginController.html +15 -15
  7. package/docs/classes/Magnifier.html +4 -4
  8. package/docs/classes/ModelRoomLabelController.html +4 -4
  9. package/docs/classes/Object3DHelperController.html +22 -0
  10. package/docs/classes/PaintBrush.html +8 -0
  11. package/docs/classes/PanoTagPluginController.html +160 -0
  12. package/docs/enums/CameraMovementEffect.html +2 -2
  13. package/docs/enums/ContentType.html +15 -0
  14. package/docs/enums/DIRECTION.html +1 -1
  15. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  16. package/docs/enums/DimensionType.html +1 -0
  17. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  18. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  19. package/docs/enums/LinkType.html +1 -0
  20. package/docs/enums/PaintBrushTypeEnum.html +1 -0
  21. package/docs/enums/PointType.html +1 -0
  22. package/docs/enums/Rotation.html +2 -2
  23. package/docs/index.html +2 -2
  24. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -0
  25. package/docs/interfaces/CSS3DRenderPluginState.html +3 -0
  26. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  27. package/docs/interfaces/FloorplanBounding.html +4 -4
  28. package/docs/interfaces/FloorplanData.html +2 -2
  29. package/docs/interfaces/FloorplanEntrance.html +7 -7
  30. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  31. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  32. package/docs/interfaces/FloorplanFloorData.html +2 -2
  33. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  34. package/docs/interfaces/FloorplanObserver.html +2 -2
  35. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  36. package/docs/interfaces/FloorplanPosition.html +2 -2
  37. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  38. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  39. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  40. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  41. package/docs/interfaces/FloorplanServerData.html +2 -2
  42. package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
  43. package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
  44. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  45. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  46. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  47. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  48. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  49. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  50. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  51. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  52. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  53. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  54. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  55. package/docs/interfaces/LineJson.html +1 -1
  56. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  57. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  58. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  59. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  60. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  61. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  62. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  63. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  64. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  65. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  66. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  67. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  68. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  69. package/docs/interfaces/Object3DHelperState.html +1 -0
  70. package/docs/interfaces/OpenParameter.html +2 -2
  71. package/docs/interfaces/PaintBrushAction.html +13 -0
  72. package/docs/interfaces/PaintBrushConfigs.html +1 -0
  73. package/docs/interfaces/PaintBrushState.html +1 -0
  74. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  75. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  76. package/docs/interfaces/PanoMeasureParameterType.html +2 -2
  77. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  78. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  79. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  80. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
  81. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
  82. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
  83. package/docs/interfaces/PanoRulerProPluginState.html +1 -1
  84. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  85. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  86. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  87. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  88. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  89. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  90. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  91. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  92. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  93. package/docs/interfaces/Point.html +1 -1
  94. package/docs/interfaces/PointJson.html +1 -1
  95. package/docs/interfaces/Room.html +1 -1
  96. package/docs/interfaces/RoomInfo.html +1 -1
  97. package/docs/interfaces/RoomLabel.html +7 -7
  98. package/docs/interfaces/RoomRules.html +1 -1
  99. package/docs/interfaces/Rooms.html +1 -1
  100. package/docs/interfaces/Scissor.html +14 -0
  101. package/docs/interfaces/TagConfig.html +11 -0
  102. package/docs/interfaces/Tags.html +5 -0
  103. package/docs/modules.html +25 -20
  104. package/libs/CSS3DRenderPlugin/CSS3DRender.js +5 -3
  105. package/libs/CSS3DRenderPlugin/Controller.d.ts +3 -2
  106. package/libs/CSS3DRenderPlugin/Controller.js +23 -21
  107. package/libs/CSS3DRenderPlugin/index.js +3 -4
  108. package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +29 -30
  109. package/libs/CSS3DRenderPlugin/utils/centerPoint.d.ts +1 -1
  110. package/libs/CSS3DRenderPlugin/utils/centerPoint.js +7 -4
  111. package/libs/CruisePlugin/Controller.d.ts +3 -1
  112. package/libs/CruisePlugin/Controller.js +158 -150
  113. package/libs/CruisePlugin/index.js +1 -1
  114. package/libs/CruisePlugin/typing.d.ts +5 -0
  115. package/libs/GuideLinePlugin/Controller.d.ts +6 -1
  116. package/libs/GuideLinePlugin/Controller.js +53 -37
  117. package/libs/GuideLinePlugin/index.d.ts +2 -2
  118. package/libs/GuideLinePlugin/index.js +5 -5
  119. package/libs/GuideLinePlugin/typing.d.ts +3 -0
  120. package/libs/GuideLinePlugin/utils/getArrowMaterial.d.ts +2 -2
  121. package/libs/GuideLinePlugin/utils/getArrowMaterial.js +6 -7
  122. package/libs/GuideLinePlugin/utils/getLineGeometries.d.ts +8 -6
  123. package/libs/GuideLinePlugin/utils/getLineGeometries.js +72 -72
  124. package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  125. package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  126. package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +8 -0
  127. package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  128. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  129. package/libs/ModelTVVideoPlugin/Plugin.d.ts +1 -1
  130. package/libs/ModelTVVideoPlugin/Plugin.js +129 -139
  131. package/libs/ModelTVVideoPlugin/index.js +14 -5
  132. package/libs/ModelTVVideoPlugin/typings.js +0 -1
  133. package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +1 -1
  134. package/libs/ModelTVVideoPlugin/utils/parseData.js +12 -8
  135. package/libs/Object3DHelperPlugin/Controller.js +10 -11
  136. package/libs/Object3DHelperPlugin/index.js +8 -9
  137. package/libs/Object3DHelperPlugin/mocks/addObject3D.d.ts +2 -0
  138. package/libs/Object3DHelperPlugin/mocks/objects.d.ts +7 -0
  139. package/libs/PanoCompassPlugin/Controller.js +13 -14
  140. package/libs/PanoCompassPlugin/index.js +4 -5
  141. package/libs/PanoDoorLabelPlugin/BaseController.js +24 -23
  142. package/libs/PanoDoorLabelPlugin/Controller.js +3 -2
  143. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  144. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  145. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  146. package/libs/PanoSpatialTagPlugin/Plugin.js +3 -4
  147. package/libs/PanoSpatialTagPlugin/index.js +3 -4
  148. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
  149. package/libs/PanoTagPlugin/Assets/Icon.d.ts +2 -0
  150. package/libs/PanoTagPlugin/Components/Common/Media.js +1024 -3363
  151. package/libs/PanoTagPlugin/controller/TagCacheController.js +1 -1
  152. package/libs/PanoTagPlugin/controller/TagComputer.js +2 -2
  153. package/libs/PanoTagPlugin/controller/index.js +7 -8
  154. package/libs/PanoTagPlugin/index.js +13 -14
  155. package/libs/PanoTagPlugin/mocks/mock1.d.ts +168 -0
  156. package/libs/PanoTagPlugin/mocks/mock2.d.ts +233 -0
  157. package/libs/PanoTagPlugin/mocks/mock3.d.ts +22 -0
  158. package/libs/PanoTagPlugin/mocks/mock4.d.ts +56 -0
  159. package/libs/PanoTagPlugin/mocks/mock5.d.ts +13 -0
  160. package/libs/PanoTagPlugin/mocks/mock6.d.ts +16 -0
  161. package/libs/PanoTagPlugin/mocks/mock7.d.ts +22 -0
  162. package/libs/PanoTagPlugin/utils/constants.d.ts +3 -0
  163. package/libs/PanoTagPlugin/utils/nullishCoalescing.d.ts +2 -0
  164. package/libs/{TagComputer.8a257a9e.js → TagComputer.5bd7014b.js} +0 -0
  165. package/libs/base/BasePlugin.d.ts +8 -2
  166. package/libs/base/BasePlugin.js +11 -10
  167. package/libs/base/BasePluginWithData.js +1 -1
  168. package/libs/floorplan/Assets/compass.d.ts +1 -0
  169. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
  170. package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
  171. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
  172. package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
  173. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
  174. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
  175. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
  176. package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
  177. package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  178. package/libs/floorplan/index.js +1 -1
  179. package/libs/index.d.ts +0 -1
  180. package/libs/index.js +89 -92
  181. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -1
  182. package/libs/shared-utils/Object3DHelper/index.js +1 -1
  183. package/libs/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  184. package/libs/shared-utils/Object3DHelper/utils/negateScale.d.ts +2 -0
  185. package/libs/shared-utils/Preloader.d.ts +6 -0
  186. package/libs/shared-utils/Subscribe.d.ts +0 -1
  187. package/libs/shared-utils/Subscribe.js +5 -6
  188. package/libs/shared-utils/debounce.d.ts +6 -0
  189. package/libs/shared-utils/formatRad.d.ts +7 -0
  190. package/libs/shared-utils/getRandomColor.d.ts +1 -0
  191. package/libs/shared-utils/logger.d.ts +16 -0
  192. package/libs/shared-utils/math/evenNumber.d.ts +3 -0
  193. package/libs/shared-utils/math/rad2Deg.d.ts +1 -0
  194. package/libs/shared-utils/px2rem.d.ts +1 -0
  195. package/libs/shared-utils/three/getExtraModelLoader.d.ts +6 -0
  196. package/libs/shared-utils/three/getNormal.d.ts +2 -0
  197. package/libs/shared-utils/three/getTextureLoader.d.ts +6 -0
  198. package/libs/shared-utils/three/loadFbxObj.d.ts +2 -0
  199. package/libs/shared-utils/vectorTocoordinates.d.ts +7 -0
  200. package/libs/typings/utils.type.d.ts +2 -0
  201. package/package.json +6 -4
  202. package/docs/interfaces/CSS3DRenderPluginExportType.html +0 -4
  203. package/libs/shared-utils/three/centerPoint.js +0 -7
@@ -1,10 +1,10 @@
1
- var L = Object.defineProperty;
2
- var F = (v, p, e) => p in v ? L(v, p, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[p] = e;
3
- var g = (v, p, e) => (F(v, typeof p != "symbol" ? p + "" : p, e), e);
4
- import { Controller as C } from "../base/BasePluginWithData.js";
5
- import { GuideLinePlugin as D } from "../GuideLinePlugin/index.js";
6
- import S from "../shared-utils/uuid.js";
7
- import { coordinatesAngle as M } from "./utils/coordinatesAngle.js";
1
+ var E = Object.defineProperty;
2
+ var L = (y, g, e) => g in y ? E(y, g, { enumerable: !0, configurable: !0, writable: !0, value: e }) : y[g] = e;
3
+ var p = (y, g, e) => (L(y, typeof g != "symbol" ? g + "" : g, e), e);
4
+ import { Controller as F } from "../base/BasePluginWithData.js";
5
+ import { GuideLinePlugin as M } from "../GuideLinePlugin/index.js";
6
+ import I from "../shared-utils/uuid.js";
7
+ import { coordinatesAngle as D } from "./utils/coordinatesAngle.js";
8
8
  import { safeCall as G } from "./utils/safeCall.js";
9
9
  import K from "../shared-utils/equal.js";
10
10
  import { vectorToCoordinates as U } from "./utils/vectorToCoordinates.js";
@@ -12,7 +12,7 @@ import * as T from "three";
12
12
  import A from "./utils/linerValue.js";
13
13
  import { sleep as O } from "./utils/sleep.js";
14
14
  import "../base/BasePlugin.js";
15
- import "@realsee/five";
15
+ import "../shared-utils/Subscribe.js";
16
16
  import "../GuideLinePlugin/Controller.js";
17
17
  import "../GuideLinePlugin/utils/getLineGeometries.js";
18
18
  import "../GuideLinePlugin/utils/getArrowMaterial.js";
@@ -20,17 +20,17 @@ import "../shared-utils/isNil.js";
20
20
  import "./utils/coordinatesToVector.js";
21
21
  import "../shared-utils/isTruelyObject.js";
22
22
  import "./utils/formatRad.js";
23
- const w = "v1.0.6", E = "CruisePlugin", I = `${E}@${w}`, ne = (v) => `${I}--${v}`, x = () => {
24
- console.error(`${I} is disposed`);
23
+ const x = "v1.0.6", C = "CruisePlugin", b = `${C}@${x}`, ne = (y) => `${b}--${y}`, w = () => {
24
+ console.error(`${b} is disposed`);
25
25
  }, V = () => {
26
- console.warn(`${I} is disabled`);
26
+ console.warn(`${b} is disabled`);
27
27
  }, Q = () => {
28
- console.error(`${I} is disabled`);
28
+ console.error(`${b} is disabled`);
29
29
  }, k = /* @__PURE__ */ new Map();
30
- class $ extends C {
31
- constructor(e) {
32
- super(e);
33
- g(this, "state", {
30
+ class $ extends F {
31
+ constructor(e, t) {
32
+ super(e, t);
33
+ p(this, "state", {
34
34
  visible: !0,
35
35
  enabled: !0,
36
36
  disposed: !1,
@@ -45,53 +45,55 @@ class $ extends C {
45
45
  }
46
46
  }
47
47
  });
48
- g(this, "data");
49
- g(this, "privateState", {
48
+ p(this, "data");
49
+ p(this, "config");
50
+ p(this, "privateState", {
50
51
  playing: !1,
51
52
  currentPlayQueue: [],
52
53
  currentPlayKeyframe: null,
53
54
  broke: !1,
54
- disposers: []
55
+ disposers: [],
56
+ modeChanging: !1
55
57
  });
56
- g(this, "GuideLine");
57
- Object.assign(window, { [`__${E}_DEBUG__`]: this });
58
- const t = this.setFiveLinearUpdateCamera.bind(this), i = this.setFiveOriginUpdateCamera.bind(this);
59
- this.hooks.on("play", t), this.hooks.on("broke", i), this.hooks.on("end", i), this.hooks.on("pause", i), this.privateState.disposers.push(() => {
60
- this.hooks.off("play", t), this.hooks.off("broke", i), this.hooks.off("end", i), this.hooks.off("pause", i);
58
+ p(this, "GuideLine");
59
+ this.config = t, Object.assign(window, { [`__${C}_DEBUG__`]: this });
60
+ const i = this.setFiveLinearUpdateCamera.bind(this), a = this.setFiveOriginUpdateCamera.bind(this);
61
+ this.hooks.on("play", i), this.hooks.on("broke", a), this.hooks.on("end", a), this.hooks.on("pause", a), this.privateState.disposers.push(() => {
62
+ this.hooks.off("play", i), this.hooks.off("broke", a), this.hooks.off("end", a), this.hooks.off("pause", a);
61
63
  });
62
64
  }
63
65
  async load(e, t, i) {
64
- var o, f, h, u, l;
66
+ var o, m, f, l, u;
65
67
  if (this.state.disposed)
66
- return x();
67
- this.privateState.fiveOriginGetProgress || (f = (o = this.five.controller) == null ? void 0 : o.cameraMotion) != null && f.getProgress || (await this.waitFiveLoaded(), this.privateState.fiveOriginGetProgress = (u = (h = this.five.controller) == null ? void 0 : h.cameraMotion) == null ? void 0 : u.getProgress), this.clear();
68
- const r = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, d = await this.formatData(e);
69
- this.data = d, this.hooks.emit("dataChange", d, r);
68
+ return w();
69
+ this.privateState.fiveOriginGetProgress || (m = (o = this.five.controller) == null ? void 0 : o.cameraMotion) != null && m.getProgress || (await this.waitFiveLoaded(), this.privateState.fiveOriginGetProgress = (l = (f = this.five.controller) == null ? void 0 : f.cameraMotion) == null ? void 0 : l.getProgress), this.clear();
70
+ const a = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, d = await this.formatData(e);
71
+ this.data = d, this.hooks.emit("dataChange", d, a);
70
72
  let s = [], n;
71
- const a = this.data.keyframes.filter((c) => c.data.panoIndex !== void 0);
72
- a.filter((c, m) => {
73
- var y;
74
- return c.data.panoIndex !== ((y = a[m - 1]) == null ? void 0 : y.data.panoIndex);
75
- }).map((c) => c.data.panoIndex).forEach((c) => {
76
- var y, P;
77
- const m = (y = this.five.work.observers[c]) == null ? void 0 : y.floorIndex;
78
- if (m !== void 0)
79
- if (n === m) {
80
- const b = s.length - 1;
81
- s[b] = [...(P = s[b]) != null ? P : [], c];
73
+ const r = this.data.keyframes.filter((h) => h.data.panoIndex !== void 0);
74
+ r.filter((h, c) => {
75
+ var v;
76
+ return h.data.panoIndex !== ((v = r[c - 1]) == null ? void 0 : v.data.panoIndex);
77
+ }).map((h) => h.data.panoIndex).forEach((h) => {
78
+ var v, P;
79
+ const c = (v = this.five.work.observers[h]) == null ? void 0 : v.floorIndex;
80
+ if (c !== void 0)
81
+ if (n === c) {
82
+ const S = s.length - 1;
83
+ s[S] = [...(P = s[S]) != null ? P : [], h];
82
84
  } else {
83
- n = m;
84
- const b = s.length;
85
- s[b] = [c];
85
+ n = c;
86
+ const S = s.length;
87
+ s[S] = [h];
86
88
  }
87
- }), this.GuideLine || (this.GuideLine = D(this.five)), (l = this.GuideLine) == null || l.load({ routes: s.map((c) => ({ panoIndexList: c })) }), this.setState({ playing: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing), this.changeSpeed(this.state.speed), t && this.setState(t, { userAction: i }), console.log(`${I} loaded`, d), this.hooks.emit("dataLoaded", d);
89
+ }), this.GuideLine || (this.GuideLine = M(this.five, this.config)), (u = this.GuideLine) == null || u.load({ routes: s.map((h) => ({ panoIndexList: h })) }), this.setState({ playing: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing), this.changeSpeed(this.state.speed), t && this.setState(t, { userAction: i }), console.log(`${b} loaded`, d), this.hooks.emit("dataLoaded", d);
88
90
  }
89
91
  play(e) {
90
92
  this.setState({ playing: !0 }, e);
91
93
  }
92
94
  playFrom(e) {
93
- const { index: t, id: i, userAction: r } = e;
94
- this.state.playing && this.setState({ playing: !1 }, { userAction: r }), this.setState({ playing: !0 }, { userAction: r, playFromIndex: t, playFromId: i });
95
+ const { index: t, id: i, userAction: a } = e;
96
+ this.state.playing && this.setState({ playing: !1 }, { userAction: a }), this.setState({ playing: !0 }, { userAction: a, playFromIndex: t, playFromId: i });
95
97
  }
96
98
  playFromStart(e) {
97
99
  return this.playFrom({ ...e, index: 0 });
@@ -115,60 +117,60 @@ class $ extends C {
115
117
  this.setState({ disposed: !0 });
116
118
  }
117
119
  setState(e, t) {
118
- var r;
120
+ var a;
119
121
  if (this.state.disposed)
120
- return x();
122
+ return w();
121
123
  if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
122
124
  return Q();
123
125
  const i = { ...this.state };
124
- this.state = { ...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, t == null ? void 0 : t.userAction), K(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 });
126
+ this.state = { ...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, t == null ? void 0 : t.userAction), K(i, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: (a = t == null ? void 0 : t.userAction) != null ? a : !0 });
125
127
  }
126
128
  async formatData(e) {
127
129
  this.five.work || await this.waitFiveLoaded();
128
130
  const t = this.five.work.observers, i = (() => {
129
- const r = e;
130
- return typeof r == "object" && r !== null && r.version && r.data ? r.data : r;
131
+ const a = e;
132
+ return typeof a == "object" && a !== null && a.version && a.data ? a.data : a;
131
133
  })();
132
134
  if (i.keyframes)
133
135
  return {
134
- keyframesId: S(),
135
- keyframes: i.keyframes.map((r, d) => {
136
- var a;
137
- const s = i.keyframes[d + 1], n = (() => !s || s.start === void 0 || r.end === void 0 ? 0 : s.start - r.end)();
138
- return { id: (a = r.uuid) != null ? a : S(), moveIndex: d, stay: n, index: d, ...r };
136
+ keyframesId: I(),
137
+ keyframes: i.keyframes.map((a, d) => {
138
+ var r;
139
+ const s = i.keyframes[d + 1], n = (() => !s || s.start === void 0 || a.end === void 0 ? 0 : s.start - a.end)();
140
+ return { id: (r = a.uuid) != null ? r : I(), moveIndex: d, stay: n, index: d, ...a };
139
141
  })
140
142
  };
141
143
  if (i.panoIndexList) {
142
- let r = [];
144
+ let a = [];
143
145
  const { moveEffect: d, moveToFirstPanoEffect: s } = i;
144
- return this.privateState.moveToFirstPanoEffect = s, i.panoIndexList.filter((n, a) => n !== i.panoIndexList[a - 1]).forEach((n, a) => {
146
+ return this.privateState.moveToFirstPanoEffect = s, i.panoIndexList.forEach((n, r) => {
145
147
  const o = (() => {
146
- var c, m, y, P;
147
- const f = i.panoIndexList[a + 1];
148
- if (f === void 0)
148
+ var h, c, v, P;
149
+ const m = i.panoIndexList.slice(r).find((S) => S !== n);
150
+ if (m === void 0)
149
151
  return;
150
- const h = (c = t[n]) == null ? void 0 : c.position, u = (m = t[f]) == null ? void 0 : m.position;
151
- if (!u || !h || ((y = t[n]) == null ? void 0 : y.floorIndex) !== ((P = t[f]) == null ? void 0 : P.floorIndex))
152
+ const f = (h = t[n]) == null ? void 0 : h.position, l = (c = t[m]) == null ? void 0 : c.position;
153
+ if (!l || !f || ((v = t[n]) == null ? void 0 : v.floorIndex) !== ((P = t[m]) == null ? void 0 : P.floorIndex))
152
154
  return;
153
- const l = new T.Vector3().subVectors(u, h);
154
- return U(l);
155
+ const u = new T.Vector3().subVectors(l, f);
156
+ return U(u);
155
157
  })();
156
- i.moveType === void 0 || i.moveType === "justMove" ? r.push({
157
- moveIndex: a,
158
+ i.moveType === void 0 || i.moveType === "justMove" ? a.push({
159
+ moveIndex: r,
158
160
  stay: i.stay,
159
161
  data: { effect: "Move", panoIndex: n, moveEffect: d, ...o != null ? o : {} }
160
- }) : i.moveType === "moveAndRotate" && (r.push({ moveIndex: a, stay: i.stay, data: { effect: "Move", panoIndex: n, moveEffect: d } }), o && r.push({ moveIndex: a, stay: i.stay, data: { effect: "Rotate", panoIndex: n, ...o } }));
161
- }), { keyframesId: S(), keyframes: r.map((n, a) => ({ id: S(), index: a, ...n })) };
162
+ }) : i.moveType === "moveAndRotate" && (a.push({ moveIndex: r, stay: i.stay, data: { effect: "Move", panoIndex: n, moveEffect: d } }), o && a.push({ moveIndex: r, stay: i.stay, data: { effect: "Rotate", panoIndex: n, ...o } }));
163
+ }), { keyframesId: I(), keyframes: a.map((n, r) => ({ id: I(), index: r, ...n })) };
162
164
  } else
163
165
  throw new Error("format error: data no keyframes or no panoIndexList");
164
166
  }
165
167
  handleEnable(e, t = !0) {
166
- var i, r;
167
- 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;
168
+ var i, a;
169
+ e ? ((i = this.GuideLine) == null || i.enable(), this.hooks.emit("enable", { userAction: t })) : ((a = this.GuideLine) == null || a.disable(), this.changePlayState(!1, { userAction: t }), this.hooks.emit("disable", { userAction: t })), this.state.enabled = e;
168
170
  }
169
171
  handleVisible(e, t = !0) {
170
- var i, r;
171
- 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;
172
+ var i, a;
173
+ e ? ((i = this.GuideLine) == null || i.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: t }))) : ((a = this.GuideLine) == null || a.hide(), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: t }))), this.state.visible = e;
172
174
  }
173
175
  changePlayState(e, t) {
174
176
  this.actionIfStateIsEnabled(
@@ -179,68 +181,71 @@ class $ extends C {
179
181
  ), e ? this.handlePlay(t) : this.handlePause(t), this.state.playing = e;
180
182
  }
181
183
  async handlePlay(e) {
182
- var u;
183
- const { data: t, state: i, privateState: r, hooks: d } = this;
184
- if (r.playing || !(t != null && t.keyframes) || (t == null ? void 0 : t.keyframes.length) === 0)
184
+ var l;
185
+ const { data: t, state: i, privateState: a, hooks: d } = this;
186
+ if (a.playing || !(t != null && t.keyframes) || (t == null ? void 0 : t.keyframes.length) === 0)
185
187
  return;
186
- const s = S();
187
- r.playId = s, r.playing = !0, r.broke = !1;
188
- const n = t.keyframes, a = this.getPauseData();
189
- (e == null ? void 0 : e.notEmitEvent) !== !0 && d.emit("play", { userAction: (u = e == null ? void 0 : e.userAction) != null ? u : !0 });
188
+ const s = I();
189
+ a.playId = s, a.playing = !0, a.broke = !1;
190
+ const n = t.keyframes, r = this.getPauseData();
191
+ (e == null ? void 0 : e.notEmitEvent) !== !0 && d.emit("play", { userAction: (l = e == null ? void 0 : e.userAction) != null ? l : !0 });
190
192
  let o = !1;
191
- const h = await (async () => {
192
- var l, c;
193
+ const f = await (async () => {
194
+ var u, h;
193
195
  if ((e == null ? void 0 : e.playFromIndex) !== void 0)
194
196
  return e.playFromIndex;
195
197
  if ((e == null ? void 0 : e.playFromId) !== void 0)
196
- return (l = this.data) == null ? void 0 : l.keyframes.findIndex((m) => m.id === e.playFromId);
197
- if (a != null && a.keyframeId) {
198
- const m = (c = this.data) == null ? void 0 : c.keyframes.find((y) => y.id === a.keyframeId);
199
- if (a != null && a.fiveState && await this.move(a.fiveState, { moveEffect: r.moveToFirstPanoEffect }), m) {
200
- if (m.data.effect === "Move")
201
- return m.index;
202
- if (m.data.effect === "Rotate") {
203
- const y = a.duration !== void 0 ? a.duration * (1 - a.playedProgress) : void 0;
204
- return await this.playKeyframe(m, { duration: y }), o = !0, m.index + 1;
198
+ return (u = this.data) == null ? void 0 : u.keyframes.findIndex((c) => c.id === e.playFromId);
199
+ if (r != null && r.keyframeId) {
200
+ const c = (h = this.data) == null ? void 0 : h.keyframes.find((v) => v.id === r.keyframeId);
201
+ if (r != null && r.fiveState && await this.move(r.fiveState, { moveEffect: a.moveToFirstPanoEffect }), c) {
202
+ if (c.data.effect === "Move")
203
+ return c.index;
204
+ if (c.data.effect === "Rotate") {
205
+ const v = r.duration !== void 0 ? r.duration * (1 - r.playedProgress) : void 0;
206
+ return await this.playKeyframe(c, { duration: v }), o = !0, c.index + 1;
205
207
  }
206
208
  }
207
209
  }
208
210
  })();
209
211
  this.clearPauseData();
210
- for (const l of n) {
211
- if (r.broke || !i.playing || !r.playing || s !== r.playId)
212
+ for (const u of n) {
213
+ if (a.broke || !i.playing || !a.playing || s !== a.playId)
212
214
  return;
213
- if (!(h !== void 0 && l.index < h))
215
+ if (!(f !== void 0 && u.index < f))
214
216
  try {
215
- d.emit("playIndexChange", l.index, l), await this.playKeyframe(l, {
216
- moveEffect: o === !1 ? r.moveToFirstPanoEffect : void 0,
217
+ d.emit("playIndexChange", u.index, u), await this.playKeyframe(u, {
218
+ moveEffect: o === !1 ? a.moveToFirstPanoEffect : void 0,
217
219
  duration: 800
218
- }), l.stay && await O(l.stay), o === !1 && (o = !0);
220
+ }), u.stay && await O(u.stay), o === !1 && (o = !0);
219
221
  } catch {
220
222
  return Promise.resolve("broke");
221
223
  }
222
224
  }
223
- i.playing && s === r.playId && (this.setState({ playing: !1 }, { userAction: !1 }), d.emit("end"), this.clearPauseData());
225
+ i.playing && s === a.playId && (this.setState({ playing: !1 }, { userAction: !1 }), d.emit("end"), this.clearPauseData());
224
226
  }
225
227
  handlePause(e) {
226
228
  var d;
227
- const { state: t, privateState: i, hooks: r } = this;
228
- t.playing = !1, i.playing !== !1 && (i.playing = !1, this.setPauseData(), i.broke || this.forceInteruptUpdateCamera(), (e == null ? void 0 : e.notEmitEvent) !== !0 && r.emit("pause", { userAction: (d = e == null ? void 0 : e.userAction) != null ? d : !0 }));
229
+ const { state: t, privateState: i, hooks: a } = this;
230
+ t.playing = !1, i.playing !== !1 && (i.playing = !1, this.setPauseData(), i.broke || this.forceInteruptUpdateCamera(), (e == null ? void 0 : e.notEmitEvent) !== !0 && a.emit("pause", { userAction: (d = e == null ? void 0 : e.userAction) != null ? d : !0 }));
229
231
  }
230
232
  async playKeyframe(e, t) {
231
- var r;
233
+ var a;
232
234
  const { privateState: i } = this;
233
- return ((r = this.privateState.currentPlayKeyframe) == null ? void 0 : r.keyframe.id) !== e.id && (this.privateState.currentPlayKeyframe = { keyframe: e }), i.currentPlayQueue.push(this.getPlayPromise(e, t)), this.actionPromiseQueue();
235
+ return ((a = this.privateState.currentPlayKeyframe) == null ? void 0 : a.keyframe.id) !== e.id && (this.privateState.currentPlayKeyframe = { keyframe: e }), i.currentPlayQueue.push(this.getPlayPromise(e, t)), this.actionPromiseQueue();
234
236
  }
235
237
  addInterruptListener(e) {
236
- return this.five.once("gesture", e), this.five.once("modeChange", e), () => {
237
- this.five.off("gesture", e), this.five.once("modeChange", e);
238
+ const t = () => {
239
+ this.privateState.modeChanging || e();
240
+ }, i = e;
241
+ return this.five.once("gesture", i), this.five.once("wantsChangeMode", t), () => {
242
+ this.five.off("gesture", i), this.five.once("wantsChangeMode", t);
238
243
  };
239
244
  }
240
245
  async getPlayPromise(e, t) {
241
- var r;
246
+ var a;
242
247
  const i = e.data;
243
- if ((r = t == null ? void 0 : t.duration) != null || e.start !== void 0 && e.end !== void 0 && e.end - e.start, !!i)
248
+ if ((a = t == null ? void 0 : t.duration) != null || e.start !== void 0 && e.end !== void 0 && e.end - e.start, !!i)
244
249
  return new Promise((d, s) => {
245
250
  let n = !1;
246
251
  this.addInterruptListener(() => {
@@ -250,18 +255,18 @@ class $ extends C {
250
255
  try {
251
256
  if (n)
252
257
  return;
253
- const a = () => {
258
+ const r = () => {
254
259
  d(), n = !0;
255
260
  };
256
261
  switch (i.effect) {
257
262
  case "Move":
258
- this.move(i, t).then(a);
263
+ this.move(i, t).then(r);
259
264
  break;
260
265
  case "Rotate":
261
- this.rotate(i, t).then(a);
266
+ this.rotate(i, t).then(r);
262
267
  break;
263
268
  default:
264
- this.rotate(i, t).then(a);
269
+ this.rotate(i, t).then(r);
265
270
  }
266
271
  } catch {
267
272
  }
@@ -274,12 +279,12 @@ class $ extends C {
274
279
  t();
275
280
  return;
276
281
  }
277
- const r = e.currentPlayQueue.shift();
278
- if (!r) {
282
+ const a = e.currentPlayQueue.shift();
283
+ if (!a) {
279
284
  t();
280
285
  return;
281
286
  }
282
- r.then(t, i);
287
+ a.then(t, i);
283
288
  }).then(() => e.currentPlayQueue.length === 0 ? Promise.resolve() : this.actionPromiseQueue());
284
289
  }
285
290
  async move(e, t) {
@@ -298,65 +303,68 @@ class $ extends C {
298
303
  await this.updateCamera(e, t == null ? void 0 : t.duration);
299
304
  }
300
305
  async updateCamera(e, t = 800) {
301
- const { five: i, privateState: r, state: d } = this;
306
+ const { five: i, privateState: a, state: d } = this;
302
307
  let s = t;
303
308
  const n = (() => {
304
- var h, u;
305
- const o = (h = d.config) == null ? void 0 : h.speedConfig, f = (u = e.rotateSpeed) != null ? u : o == null ? void 0 : o.rotateSpeed;
309
+ var f, l;
310
+ const o = (f = d.config) == null ? void 0 : f.speedConfig, m = (l = e.rotateSpeed) != null ? l : o == null ? void 0 : o.rotateSpeed;
306
311
  if ((o == null ? void 0 : o.rotateSpeedUnit) === void 0)
307
- return f;
308
- if (f !== void 0)
309
- return o.rotateSpeedUnit === "rad/ms" ? f : f / 1e3;
312
+ return m;
313
+ if (m !== void 0)
314
+ return o.rotateSpeedUnit === "rad/ms" ? m : m / 1e3;
310
315
  })();
311
316
  if (n) {
312
317
  const o = this.five.getCurrentState();
313
- s = M(o, e) / n;
318
+ s = D(o, e) / n;
314
319
  }
315
- r.currentPlayKeyframe && (r.currentPlayKeyframe.originDuration = s);
316
- const a = this.getSpeededDuration(s);
320
+ a.currentPlayKeyframe && (a.currentPlayKeyframe.originDuration = s);
321
+ const r = this.getSpeededDuration(s);
317
322
  return new Promise((o) => {
318
- G(() => i.updateCamera(e, a)), setTimeout(() => o(), a);
323
+ G(() => i.updateCamera(e, r)), setTimeout(() => o(), r);
319
324
  });
320
325
  }
321
326
  async changePano(e, t) {
322
- var o;
323
- const { five: i, privateState: r, state: d } = this;
327
+ var m;
328
+ const { five: i, privateState: a, state: d } = this;
324
329
  if (typeof e.panoIndex != "number" || e.panoIndex === i.panoIndex)
325
330
  return;
326
- let s = (o = t == null ? void 0 : t.duration) != null ? o : 800;
327
- const n = (() => {
328
- var u, l;
329
- const f = (u = d.config) == null ? void 0 : u.speedConfig, h = (l = e.moveSpeed) != null ? l : f == null ? void 0 : f.moveSpeed;
331
+ i.getCurrentState().mode;
332
+ const s = i.getCurrentState().mode !== "Panorama";
333
+ s && (this.privateState.modeChanging = !0);
334
+ let n = (m = t == null ? void 0 : t.duration) != null ? m : 800;
335
+ const r = (() => {
336
+ var u, h;
337
+ const f = (u = d.config) == null ? void 0 : u.speedConfig, l = (h = e.moveSpeed) != null ? h : f == null ? void 0 : f.moveSpeed;
330
338
  if ((f == null ? void 0 : f.moveSpeedUnit) === void 0)
331
- return h;
332
- if (h !== void 0)
333
- return f.moveSpeedUnit === "m/ms" ? h : h / 1e3;
339
+ return l;
340
+ if (l !== void 0)
341
+ return f.moveSpeedUnit === "m/ms" ? l : l / 1e3;
334
342
  })();
335
- if (n && typeof i.panoIndex == "number" && typeof e.panoIndex == "number") {
336
- const f = i.work.observers[i.panoIndex].position, h = i.work.observers[e.panoIndex].position;
337
- s = f.distanceTo(h) / n;
343
+ if (r && typeof i.panoIndex == "number" && typeof e.panoIndex == "number") {
344
+ const f = i.work.observers[i.panoIndex].position, l = i.work.observers[e.panoIndex].position;
345
+ n = f.distanceTo(l) / r;
338
346
  }
339
- r.currentPlayKeyframe && (r.currentPlayKeyframe.originDuration = s);
340
- const a = this.getSpeededDuration(s);
341
- return new Promise((f) => {
342
- var h, u, l;
347
+ a.currentPlayKeyframe && (a.currentPlayKeyframe.originDuration = n);
348
+ const o = this.getSpeededDuration(n);
349
+ await new Promise((f) => {
350
+ var l, u, h;
343
351
  i.moveToPano(e.panoIndex, {
344
352
  latitude: e.latitude,
345
353
  longitude: e.longitude,
346
354
  fov: e.fov,
347
- duration: a,
348
- effect: (l = (u = t == null ? void 0 : t.moveEffect) != null ? u : (h = this.state.config) == null ? void 0 : h.moveEffect) != null ? l : e.moveEffect,
355
+ duration: o,
356
+ effect: (h = (u = t == null ? void 0 : t.moveEffect) != null ? u : (l = this.state.config) == null ? void 0 : l.moveEffect) != null ? h : e.moveEffect,
349
357
  moveCancelCallback: () => f(),
350
358
  moveEndCallback: () => f()
351
- });
352
- });
359
+ }), s && i.once("panoArrived", () => f());
360
+ }), s && (this.privateState.modeChanging = !1);
353
361
  }
354
362
  changeSpeed(e, t = !0) {
355
- const { state: i, privateState: r, hooks: d } = this, { currentPlayKeyframe: s } = r;
363
+ const { state: i, privateState: a, hooks: d } = this, { currentPlayKeyframe: s } = a;
356
364
  if (d.emit("speedChange", e, { userAction: t }), i.playing && s)
357
365
  try {
358
- const n = s.originDuration !== void 0 ? s.originDuration * (1 - this.getProgress()) : void 0, a = this.playKeyframe(s.keyframe, { duration: n });
359
- r.currentPlayQueue.push(a);
366
+ const n = s.originDuration !== void 0 ? s.originDuration * (1 - this.getProgress()) : void 0, r = this.playKeyframe(s.keyframe, { duration: n });
367
+ a.currentPlayQueue.push(r);
360
368
  } catch {
361
369
  }
362
370
  }
@@ -367,7 +375,7 @@ class $ extends C {
367
375
  return this.five.controller.cameraMotion.progress;
368
376
  }
369
377
  async changeMode(e, t) {
370
- e.mode && e.mode !== this.five.currentMode && await this.five.changeMode(e.mode, e, t);
378
+ e.mode && e.mode !== this.five.currentMode && (this.privateState.modeChanging = !0, console.log("this.privateState.modeChanging", this.privateState.modeChanging), await this.five.changeMode(e.mode, e, t), this.privateState.modeChanging = !1);
371
379
  }
372
380
  forceInteruptUpdateCamera() {
373
381
  this.five.updateCamera({}, 0);
@@ -378,12 +386,12 @@ class $ extends C {
378
386
  return k.get((t = this.data) == null ? void 0 : t.keyframesId);
379
387
  }
380
388
  setPauseData() {
381
- var e, t, i, r;
389
+ var e, t, i, a;
382
390
  if ((e = this.data) != null && e.keyframesId)
383
391
  return k.set((t = this.data) == null ? void 0 : t.keyframesId, {
384
392
  keyframeId: (i = this.privateState.currentPlayKeyframe) == null ? void 0 : i.keyframe.id,
385
393
  fiveState: this.five.getCurrentState(),
386
- duration: (r = this.privateState.currentPlayKeyframe) == null ? void 0 : r.originDuration,
394
+ duration: (a = this.privateState.currentPlayKeyframe) == null ? void 0 : a.originDuration,
387
395
  playedProgress: this.getProgress()
388
396
  });
389
397
  }
@@ -425,7 +433,7 @@ class $ extends C {
425
433
  !this.privateState.fiveOriginGetProgress || (this.five.controller.cameraMotion.getProgress = this.privateState.fiveOriginGetProgress);
426
434
  }
427
435
  }
428
- g($, "PluginVersion", w);
436
+ p($, "PluginVersion", x);
429
437
  export {
430
438
  $ as default,
431
439
  ne as pluginFlag
@@ -2,7 +2,7 @@ import o from "./Controller.js";
2
2
  import { default as v } from "./Controller.js";
3
3
  import "../base/BasePluginWithData.js";
4
4
  import "../base/BasePlugin.js";
5
- import "@realsee/five";
5
+ import "../shared-utils/Subscribe.js";
6
6
  import "../GuideLinePlugin/index.js";
7
7
  import "../GuideLinePlugin/Controller.js";
8
8
  import "three";
@@ -1,6 +1,7 @@
1
1
  import type { MovePanoOptions, Pose, State } from '@realsee/five';
2
2
  import type CruisePlugin from '.';
3
3
  import type * as BasePluginWithData from '../base/BasePluginWithData';
4
+ import type { Route } from '../GuideLinePlugin/typing';
4
5
  declare type FivePoseAndState = Partial<Pose> & Partial<State>;
5
6
  export declare type MoveEffect = MovePanoOptions['effect'];
6
7
  export declare type CruiseData = {
@@ -56,6 +57,10 @@ export interface PluginServerData extends BasePluginWithData.ServerData {
56
57
  moveType?: 'justMove' | 'moveAndRotate';
57
58
  /** 停留时长 */
58
59
  stay?: number;
60
+ /** 传递给 GuildPlugin 的参数 */
61
+ guildPluginOptions?: {
62
+ route: Omit<Route, 'panoIndexList'>;
63
+ };
59
64
  /** for ts check, no care */
60
65
  keyframes?: undefined;
61
66
  };
@@ -1,6 +1,7 @@
1
1
  import * as BasePluginWithData from '../base/BasePluginWithData';
2
2
  import type { Five } from '@realsee/five';
3
3
  import type { EventMap, PluginData, PluginServerData, PluginState } from './typing';
4
+ import type { Config } from '../base/BasePlugin';
4
5
  export declare const pluginFlag: (name: string) => string;
5
6
  export default class Controller extends BasePluginWithData.Controller<PluginState, EventMap, PluginServerData, PluginData> {
6
7
  static lasestVersion: string;
@@ -11,7 +12,7 @@ export default class Controller extends BasePluginWithData.Controller<PluginStat
11
12
  };
12
13
  protected data?: PluginData;
13
14
  private linesGroup?;
14
- constructor(five: Five);
15
+ constructor(five: Five, config?: Config);
15
16
  load(serverData: PluginServerData | PluginData, state?: PluginState, userAction?: boolean): Promise<void>;
16
17
  formatData(serverData: any): Promise<PluginData>;
17
18
  show(options?: {
@@ -43,4 +44,8 @@ export default class Controller extends BasePluginWithData.Controller<PluginStat
43
44
  private getLine;
44
45
  private disposedErrorLog;
45
46
  private actionWhenEnabled;
47
+ /**
48
+ * @description: Wait for five model ready
49
+ */
50
+ private waitFiveModelLoaded;
46
51
  }