@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.
- package/dist/index.cjs.js +58 -58
- package/dist/index.es.js +5814 -8139
- package/dist/index.js +20871 -0
- package/dist/index.umd.js +50 -50
- package/docs/assets/search.js +1 -1
- package/docs/classes/CruisePluginController.html +15 -15
- package/docs/classes/Magnifier.html +4 -4
- package/docs/classes/ModelRoomLabelController.html +4 -4
- package/docs/classes/Object3DHelperController.html +22 -0
- package/docs/classes/PaintBrush.html +8 -0
- package/docs/classes/PanoTagPluginController.html +160 -0
- package/docs/enums/CameraMovementEffect.html +2 -2
- package/docs/enums/ContentType.html +15 -0
- package/docs/enums/DIRECTION.html +1 -1
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/DimensionType.html +1 -0
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
- package/docs/enums/LinkType.html +1 -0
- package/docs/enums/PaintBrushTypeEnum.html +1 -0
- package/docs/enums/PointType.html +1 -0
- package/docs/enums/Rotation.html +2 -2
- package/docs/index.html +2 -2
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -0
- package/docs/interfaces/CSS3DRenderPluginState.html +3 -0
- package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/FloorplanBounding.html +4 -4
- package/docs/interfaces/FloorplanData.html +2 -2
- package/docs/interfaces/FloorplanEntrance.html +7 -7
- package/docs/interfaces/FloorplanExtraObject.html +3 -3
- package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
- package/docs/interfaces/FloorplanFloorData.html +2 -2
- package/docs/interfaces/FloorplanImagePosition.html +2 -2
- package/docs/interfaces/FloorplanObserver.html +2 -2
- package/docs/interfaces/FloorplanOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanPosition.html +2 -2
- package/docs/interfaces/FloorplanRoomItem.html +6 -6
- package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
- package/docs/interfaces/FloorplanServerBounding.html +4 -4
- package/docs/interfaces/FloorplanServerComputedData.html +1 -1
- package/docs/interfaces/FloorplanServerData.html +2 -2
- package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
- package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
- package/docs/interfaces/FloorplanServerEntrance.html +7 -7
- package/docs/interfaces/FloorplanServerFloorData.html +2 -2
- package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
- package/docs/interfaces/FloorplanServerObserver.html +2 -2
- package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
- package/docs/interfaces/FloorplanServerPosition.html +2 -2
- package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
- package/docs/interfaces/ItemLabelPluginData.html +1 -1
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/LineJson.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
- package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/ModelViewPluginExportType.html +1 -1
- package/docs/interfaces/Object3DHelperState.html +1 -0
- package/docs/interfaces/OpenParameter.html +2 -2
- package/docs/interfaces/PaintBrushAction.html +13 -0
- package/docs/interfaces/PaintBrushConfigs.html +1 -0
- package/docs/interfaces/PaintBrushState.html +1 -0
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
- package/docs/interfaces/PanoMeasureParameterType.html +2 -2
- package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
- package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
- package/docs/interfaces/PanoRulerProPluginState.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
- package/docs/interfaces/Point.html +1 -1
- package/docs/interfaces/PointJson.html +1 -1
- package/docs/interfaces/Room.html +1 -1
- package/docs/interfaces/RoomInfo.html +1 -1
- package/docs/interfaces/RoomLabel.html +7 -7
- package/docs/interfaces/RoomRules.html +1 -1
- package/docs/interfaces/Rooms.html +1 -1
- package/docs/interfaces/Scissor.html +14 -0
- package/docs/interfaces/TagConfig.html +11 -0
- package/docs/interfaces/Tags.html +5 -0
- package/docs/modules.html +25 -20
- package/libs/CSS3DRenderPlugin/CSS3DRender.js +5 -3
- package/libs/CSS3DRenderPlugin/Controller.d.ts +3 -2
- package/libs/CSS3DRenderPlugin/Controller.js +23 -21
- package/libs/CSS3DRenderPlugin/index.js +3 -4
- package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +29 -30
- package/libs/CSS3DRenderPlugin/utils/centerPoint.d.ts +1 -1
- package/libs/CSS3DRenderPlugin/utils/centerPoint.js +7 -4
- package/libs/CruisePlugin/Controller.d.ts +3 -1
- package/libs/CruisePlugin/Controller.js +158 -150
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/CruisePlugin/typing.d.ts +5 -0
- package/libs/GuideLinePlugin/Controller.d.ts +6 -1
- package/libs/GuideLinePlugin/Controller.js +53 -37
- package/libs/GuideLinePlugin/index.d.ts +2 -2
- package/libs/GuideLinePlugin/index.js +5 -5
- package/libs/GuideLinePlugin/typing.d.ts +3 -0
- package/libs/GuideLinePlugin/utils/getArrowMaterial.d.ts +2 -2
- package/libs/GuideLinePlugin/utils/getArrowMaterial.js +6 -7
- package/libs/GuideLinePlugin/utils/getLineGeometries.d.ts +8 -6
- package/libs/GuideLinePlugin/utils/getLineGeometries.js +72 -72
- package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
- package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
- package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +8 -0
- package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
- package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
- package/libs/ModelTVVideoPlugin/Plugin.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/Plugin.js +129 -139
- package/libs/ModelTVVideoPlugin/index.js +14 -5
- package/libs/ModelTVVideoPlugin/typings.js +0 -1
- package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +1 -1
- package/libs/ModelTVVideoPlugin/utils/parseData.js +12 -8
- package/libs/Object3DHelperPlugin/Controller.js +10 -11
- package/libs/Object3DHelperPlugin/index.js +8 -9
- package/libs/Object3DHelperPlugin/mocks/addObject3D.d.ts +2 -0
- package/libs/Object3DHelperPlugin/mocks/objects.d.ts +7 -0
- package/libs/PanoCompassPlugin/Controller.js +13 -14
- package/libs/PanoCompassPlugin/index.js +4 -5
- package/libs/PanoDoorLabelPlugin/BaseController.js +24 -23
- package/libs/PanoDoorLabelPlugin/Controller.js +3 -2
- package/libs/PanoDoorLabelPlugin/index.js +4 -3
- package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
- package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
- package/libs/PanoSpatialTagPlugin/Plugin.js +3 -4
- package/libs/PanoSpatialTagPlugin/index.js +3 -4
- package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
- package/libs/PanoTagPlugin/Assets/Icon.d.ts +2 -0
- package/libs/PanoTagPlugin/Components/Common/Media.js +1024 -3363
- package/libs/PanoTagPlugin/controller/TagCacheController.js +1 -1
- package/libs/PanoTagPlugin/controller/TagComputer.js +2 -2
- package/libs/PanoTagPlugin/controller/index.js +7 -8
- package/libs/PanoTagPlugin/index.js +13 -14
- package/libs/PanoTagPlugin/mocks/mock1.d.ts +168 -0
- package/libs/PanoTagPlugin/mocks/mock2.d.ts +233 -0
- package/libs/PanoTagPlugin/mocks/mock3.d.ts +22 -0
- package/libs/PanoTagPlugin/mocks/mock4.d.ts +56 -0
- package/libs/PanoTagPlugin/mocks/mock5.d.ts +13 -0
- package/libs/PanoTagPlugin/mocks/mock6.d.ts +16 -0
- package/libs/PanoTagPlugin/mocks/mock7.d.ts +22 -0
- package/libs/PanoTagPlugin/utils/constants.d.ts +3 -0
- package/libs/PanoTagPlugin/utils/nullishCoalescing.d.ts +2 -0
- package/libs/{TagComputer.8a257a9e.js → TagComputer.5bd7014b.js} +0 -0
- package/libs/base/BasePlugin.d.ts +8 -2
- package/libs/base/BasePlugin.js +11 -10
- package/libs/base/BasePluginWithData.js +1 -1
- package/libs/floorplan/Assets/compass.d.ts +1 -0
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
- package/libs/floorplan/index.js +1 -1
- package/libs/index.d.ts +0 -1
- package/libs/index.js +89 -92
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -1
- package/libs/shared-utils/Object3DHelper/index.js +1 -1
- package/libs/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/utils/negateScale.d.ts +2 -0
- package/libs/shared-utils/Preloader.d.ts +6 -0
- package/libs/shared-utils/Subscribe.d.ts +0 -1
- package/libs/shared-utils/Subscribe.js +5 -6
- package/libs/shared-utils/debounce.d.ts +6 -0
- package/libs/shared-utils/formatRad.d.ts +7 -0
- package/libs/shared-utils/getRandomColor.d.ts +1 -0
- package/libs/shared-utils/logger.d.ts +16 -0
- package/libs/shared-utils/math/evenNumber.d.ts +3 -0
- package/libs/shared-utils/math/rad2Deg.d.ts +1 -0
- package/libs/shared-utils/px2rem.d.ts +1 -0
- package/libs/shared-utils/three/getExtraModelLoader.d.ts +6 -0
- package/libs/shared-utils/three/getNormal.d.ts +2 -0
- package/libs/shared-utils/three/getTextureLoader.d.ts +6 -0
- package/libs/shared-utils/three/loadFbxObj.d.ts +2 -0
- package/libs/shared-utils/vectorTocoordinates.d.ts +7 -0
- package/libs/typings/utils.type.d.ts +2 -0
- package/package.json +6 -4
- package/docs/interfaces/CSS3DRenderPluginExportType.html +0 -4
- package/libs/shared-utils/three/centerPoint.js +0 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Controller as
|
|
5
|
-
import { GuideLinePlugin as
|
|
6
|
-
import
|
|
7
|
-
import { coordinatesAngle as
|
|
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 "
|
|
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
|
|
24
|
-
console.error(`${
|
|
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(`${
|
|
26
|
+
console.warn(`${b} is disabled`);
|
|
27
27
|
}, Q = () => {
|
|
28
|
-
console.error(`${
|
|
28
|
+
console.error(`${b} is disabled`);
|
|
29
29
|
}, k = /* @__PURE__ */ new Map();
|
|
30
|
-
class $ extends
|
|
31
|
-
constructor(e) {
|
|
32
|
-
super(e);
|
|
33
|
-
|
|
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
|
-
|
|
49
|
-
|
|
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
|
-
|
|
57
|
-
Object.assign(window, { [`__${
|
|
58
|
-
const
|
|
59
|
-
this.hooks.on("play",
|
|
60
|
-
this.hooks.off("play",
|
|
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,
|
|
66
|
+
var o, m, f, l, u;
|
|
65
67
|
if (this.state.disposed)
|
|
66
|
-
return
|
|
67
|
-
this.privateState.fiveOriginGetProgress || (
|
|
68
|
-
const
|
|
69
|
-
this.data = d, this.hooks.emit("dataChange", d,
|
|
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
|
|
72
|
-
|
|
73
|
-
var
|
|
74
|
-
return
|
|
75
|
-
}).map((
|
|
76
|
-
var
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
79
|
-
if (n ===
|
|
80
|
-
const
|
|
81
|
-
s[
|
|
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 =
|
|
84
|
-
const
|
|
85
|
-
s[
|
|
85
|
+
n = c;
|
|
86
|
+
const S = s.length;
|
|
87
|
+
s[S] = [h];
|
|
86
88
|
}
|
|
87
|
-
}), this.GuideLine || (this.GuideLine =
|
|
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:
|
|
94
|
-
this.state.playing && this.setState({ playing: !1 }, { userAction:
|
|
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
|
|
120
|
+
var a;
|
|
119
121
|
if (this.state.disposed)
|
|
120
|
-
return
|
|
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: (
|
|
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
|
|
130
|
-
return typeof
|
|
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:
|
|
135
|
-
keyframes: i.keyframes.map((
|
|
136
|
-
var
|
|
137
|
-
const s = i.keyframes[d + 1], n = (() => !s || s.start === void 0 ||
|
|
138
|
-
return { id: (
|
|
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
|
|
144
|
+
let a = [];
|
|
143
145
|
const { moveEffect: d, moveToFirstPanoEffect: s } = i;
|
|
144
|
-
return this.privateState.moveToFirstPanoEffect = s, i.panoIndexList.
|
|
146
|
+
return this.privateState.moveToFirstPanoEffect = s, i.panoIndexList.forEach((n, r) => {
|
|
145
147
|
const o = (() => {
|
|
146
|
-
var
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
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
|
|
151
|
-
if (!
|
|
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
|
|
154
|
-
return U(
|
|
155
|
+
const u = new T.Vector3().subVectors(l, f);
|
|
156
|
+
return U(u);
|
|
155
157
|
})();
|
|
156
|
-
i.moveType === void 0 || i.moveType === "justMove" ?
|
|
157
|
-
moveIndex:
|
|
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" && (
|
|
161
|
-
}), { keyframesId:
|
|
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,
|
|
167
|
-
e ? ((i = this.GuideLine) == null || i.enable(), this.hooks.emit("enable", { userAction: t })) : ((
|
|
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,
|
|
171
|
-
e ? ((i = this.GuideLine) == null || i.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: t }))) : ((
|
|
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
|
|
183
|
-
const { data: t, state: i, privateState:
|
|
184
|
-
if (
|
|
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 =
|
|
187
|
-
|
|
188
|
-
const n = t.keyframes,
|
|
189
|
-
(e == null ? void 0 : e.notEmitEvent) !== !0 && d.emit("play", { userAction: (
|
|
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
|
|
192
|
-
var
|
|
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 (
|
|
197
|
-
if (
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
if (
|
|
201
|
-
return
|
|
202
|
-
if (
|
|
203
|
-
const
|
|
204
|
-
return await this.playKeyframe(
|
|
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
|
|
211
|
-
if (
|
|
212
|
+
for (const u of n) {
|
|
213
|
+
if (a.broke || !i.playing || !a.playing || s !== a.playId)
|
|
212
214
|
return;
|
|
213
|
-
if (!(
|
|
215
|
+
if (!(f !== void 0 && u.index < f))
|
|
214
216
|
try {
|
|
215
|
-
d.emit("playIndexChange",
|
|
216
|
-
moveEffect: o === !1 ?
|
|
217
|
+
d.emit("playIndexChange", u.index, u), await this.playKeyframe(u, {
|
|
218
|
+
moveEffect: o === !1 ? a.moveToFirstPanoEffect : void 0,
|
|
217
219
|
duration: 800
|
|
218
|
-
}),
|
|
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 ===
|
|
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:
|
|
228
|
-
t.playing = !1, i.playing !== !1 && (i.playing = !1, this.setPauseData(), i.broke || this.forceInteruptUpdateCamera(), (e == null ? void 0 : e.notEmitEvent) !== !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
|
|
233
|
+
var a;
|
|
232
234
|
const { privateState: i } = this;
|
|
233
|
-
return ((
|
|
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
|
-
|
|
237
|
-
this.
|
|
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
|
|
246
|
+
var a;
|
|
242
247
|
const i = e.data;
|
|
243
|
-
if ((
|
|
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
|
|
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(
|
|
263
|
+
this.move(i, t).then(r);
|
|
259
264
|
break;
|
|
260
265
|
case "Rotate":
|
|
261
|
-
this.rotate(i, t).then(
|
|
266
|
+
this.rotate(i, t).then(r);
|
|
262
267
|
break;
|
|
263
268
|
default:
|
|
264
|
-
this.rotate(i, t).then(
|
|
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
|
|
278
|
-
if (!
|
|
282
|
+
const a = e.currentPlayQueue.shift();
|
|
283
|
+
if (!a) {
|
|
279
284
|
t();
|
|
280
285
|
return;
|
|
281
286
|
}
|
|
282
|
-
|
|
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:
|
|
306
|
+
const { five: i, privateState: a, state: d } = this;
|
|
302
307
|
let s = t;
|
|
303
308
|
const n = (() => {
|
|
304
|
-
var
|
|
305
|
-
const o = (
|
|
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
|
|
308
|
-
if (
|
|
309
|
-
return o.rotateSpeedUnit === "rad/ms" ?
|
|
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 =
|
|
318
|
+
s = D(o, e) / n;
|
|
314
319
|
}
|
|
315
|
-
|
|
316
|
-
const
|
|
320
|
+
a.currentPlayKeyframe && (a.currentPlayKeyframe.originDuration = s);
|
|
321
|
+
const r = this.getSpeededDuration(s);
|
|
317
322
|
return new Promise((o) => {
|
|
318
|
-
G(() => i.updateCamera(e,
|
|
323
|
+
G(() => i.updateCamera(e, r)), setTimeout(() => o(), r);
|
|
319
324
|
});
|
|
320
325
|
}
|
|
321
326
|
async changePano(e, t) {
|
|
322
|
-
var
|
|
323
|
-
const { five: i, privateState:
|
|
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
|
-
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
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
|
|
332
|
-
if (
|
|
333
|
-
return f.moveSpeedUnit === "m/ms" ?
|
|
339
|
+
return l;
|
|
340
|
+
if (l !== void 0)
|
|
341
|
+
return f.moveSpeedUnit === "m/ms" ? l : l / 1e3;
|
|
334
342
|
})();
|
|
335
|
-
if (
|
|
336
|
-
const f = i.work.observers[i.panoIndex].position,
|
|
337
|
-
|
|
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
|
-
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
var
|
|
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:
|
|
348
|
-
effect: (
|
|
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:
|
|
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,
|
|
359
|
-
|
|
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,
|
|
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: (
|
|
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
|
-
|
|
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 "
|
|
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
|
}
|