@realsee/dnalogel 3.50.16 → 3.50.18-alpha.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.
- package/CHANGELOG.md +3 -0
- package/README.md +116 -0
- package/dist/ModelMakerPlugin/Controller.d.ts +2 -0
- package/dist/Sculpt/utils/export.d.ts +18 -0
- package/dist/index.cjs.js +207 -207
- package/dist/index.js +34867 -34776
- package/dist/index.umd.js +211 -211
- package/dist/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/tag.d.ts +41 -2
- package/dist/shared-utils/three/temp.d.ts +2 -2
- package/libs/AreaMakerPlugin/Controller.js +100 -46
- package/libs/AreaMakerPlugin/index.js +64 -10
- package/libs/AreaMakerPlugin/utils/Item.js +156 -100
- package/libs/CSS3DRenderPlugin/Controller.js +93 -44
- package/libs/CSS3DRenderPlugin/index.js +62 -13
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +105 -49
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +130 -77
- package/libs/CruisePlugin/BaseController.js +143 -89
- package/libs/CruisePlugin/Move.js +83 -39
- package/libs/CruisePlugin/Work.js +95 -51
- package/libs/CruisePlugin/index.js +66 -22
- package/libs/CurrentPanoImagePlugin/Controller.js +139 -85
- package/libs/CurrentPanoImagePlugin/index.js +63 -9
- package/libs/GuideLinePlugin/Controller.js +57 -13
- package/libs/GuideLinePlugin/GuideLineItem.js +63 -19
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +6 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +58 -14
- package/libs/GuideLinePlugin/index.js +66 -22
- package/libs/ModelMakerPlugin/Controller.d.ts +2 -0
- package/libs/ModelMakerPlugin/Controller.js +190 -129
- package/libs/ModelMakerPlugin/index.js +63 -21
- package/libs/ModelMakerPlugin/item/baseItem.js +4 -2
- package/libs/ModelMakerPlugin/item/boxItem.js +5 -3
- package/libs/ModelMakerPlugin/item/polygonItem.js +9 -7
- package/libs/ModelMakerPlugin/item/prismItem.js +5 -3
- package/libs/ModelTVVideoPlugin/Plugin.js +96 -47
- package/libs/ModelTVVideoPlugin/index.js +55 -6
- package/libs/Object3DHelperPlugin/Controller.js +42 -25
- package/libs/Object3DHelperPlugin/index.js +28 -12
- package/libs/PanoCompassPlugin/Controller.js +92 -44
- package/libs/PanoCompassPlugin/index.js +63 -15
- package/libs/PanoDoorLabelPlugin/BaseController.js +79 -25
- package/libs/PanoDoorLabelPlugin/Controller.js +132 -78
- package/libs/PanoDoorLabelPlugin/index.js +63 -9
- package/libs/PanoMeasurePlugin/Components/Controller0.js +126 -77
- package/libs/PanoMeasurePlugin/Components/Controller1.js +139 -90
- package/libs/PanoMeasurePlugin/Controller/EditController.js +120 -71
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +120 -70
- package/libs/PanoMeasurePlugin/Controller/index.js +132 -86
- package/libs/PanoMeasurePlugin/Model/area.js +72 -22
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +56 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +64 -15
- package/libs/PanoMeasurePlugin/index.js +62 -16
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +57 -2
- package/libs/PanoRulerProPlugin/Controller.js +88 -33
- package/libs/PanoRulerProPlugin/RulerItems.js +146 -91
- package/libs/PanoRulerProPlugin/index.js +64 -9
- package/libs/PanoSpatialTagPlugin/Plugin.js +177 -128
- package/libs/PanoSpatialTagPlugin/index.js +53 -4
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +116 -60
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +192 -136
- package/libs/PanoTagPlugin/Components/Tag/index.js +194 -139
- package/libs/PanoTagPlugin/Components/TagContainer.js +112 -57
- package/libs/PanoTagPlugin/Components/TagItem.js +204 -149
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +157 -101
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +75 -20
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +86 -31
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +93 -37
- package/libs/PanoTagPlugin/controller/TagRender.js +62 -18
- package/libs/PanoTagPlugin/controller/TagUtil.js +123 -79
- package/libs/PanoTagPlugin/controller/index.js +110 -72
- package/libs/PanoTagPlugin/index.js +72 -28
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +77 -21
- package/libs/PanoVideoPlugin/Controller.js +95 -41
- package/libs/PanoVideoPlugin/VideoMeshController.js +119 -63
- package/libs/PanoVideoPlugin/index.js +66 -12
- package/libs/PipelinePlugin/Controller.js +173 -119
- package/libs/PipelinePlugin/index.js +63 -9
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +70 -14
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +58 -2
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +98 -42
- package/libs/Sculpt/Meshes/Box.js +3 -2
- package/libs/Sculpt/Meshes/Cylinder.js +10 -6
- package/libs/Sculpt/Meshes/Line.js +43 -38
- package/libs/Sculpt/Meshes/LineWithDots.js +14 -10
- package/libs/Sculpt/Meshes/Point.js +24 -20
- package/libs/Sculpt/Meshes/Polygon.js +5 -2
- package/libs/Sculpt/Meshes/Prism.js +19 -16
- package/libs/Sculpt/Objects/Line/Editor.js +6 -5
- package/libs/Sculpt/index.js +15 -14
- package/libs/Sculpt/utils/export.d.ts +18 -0
- package/libs/Sculpt/utils/export.js +21 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +26 -22
- package/libs/base/BasePlugin.js +14 -10
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +146 -94
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +62 -10
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +109 -56
- package/libs/floorplan/ModelFloorplanPlugin/index.js +62 -9
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +116 -63
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +62 -9
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +105 -52
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +62 -9
- package/libs/floorplan/index.js +4 -0
- package/libs/index.js +208 -206
- package/libs/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
- package/libs/shared-utils/five/fiveEveryReadyListener.js +15 -0
- package/libs/shared-utils/five/index.js +6 -2
- package/libs/shared-utils/five/lookObject.js +31 -27
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +19 -17
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +41 -2
- package/libs/shared-utils/tag.js +139 -86
- package/libs/shared-utils/three/index.js +4 -0
- package/libs/shared-utils/three/temp.d.ts +2 -2
- package/libs/shared-utils/three/temp.js +4 -4
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
var c = Object.defineProperty;
|
|
2
2
|
var u = Object.getOwnPropertySymbols;
|
|
3
3
|
var v = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
v.call(
|
|
4
|
+
var l = (s, r, t) => r in s ? c(s, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[r] = t, f = (s, r) => {
|
|
5
|
+
for (var t in r || (r = {}))
|
|
6
|
+
v.call(r, t) && l(s, t, r[t]);
|
|
7
7
|
if (u)
|
|
8
|
-
for (var
|
|
9
|
-
S.call(
|
|
10
|
-
return
|
|
8
|
+
for (var t of u(r))
|
|
9
|
+
S.call(r, t) && l(s, t, r[t]);
|
|
10
|
+
return s;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
var o = (s, r, t) => (l(s, typeof r != "symbol" ? r + "" : r, t), t);
|
|
13
|
+
var n = (s, r, t) => new Promise((i, e) => {
|
|
14
|
+
var a = (p) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
16
|
+
d(t.next(p));
|
|
17
|
+
} catch (h) {
|
|
18
|
+
e(h);
|
|
19
19
|
}
|
|
20
|
-
}, b = (
|
|
20
|
+
}, b = (p) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
22
|
+
d(t.throw(p));
|
|
23
|
+
} catch (h) {
|
|
24
|
+
e(h);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, d = (p) => p.done ? i(p.value) : Promise.resolve(p.value).then(a, b);
|
|
27
|
+
d((t = t.apply(s, r)).next());
|
|
28
28
|
});
|
|
29
29
|
import { Controller as y } from "../base/BasePlugin.js";
|
|
30
30
|
import "../shared-utils/tag.js";
|
|
@@ -38,6 +38,10 @@ import "../shared-utils/three/core/Sphere.js";
|
|
|
38
38
|
import "animejs";
|
|
39
39
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
40
40
|
import { equal as L } from "../shared-utils/equal.js";
|
|
41
|
+
import "../Sculpt/Meshes/Polygon.js";
|
|
42
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
43
|
+
import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
44
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
41
45
|
import { objectAssignDeepExports as C } from "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
42
46
|
import "../shared-utils/Subscribe.js";
|
|
43
47
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
@@ -49,7 +53,10 @@ import "../shared-utils/url/absoluteUrl.js";
|
|
|
49
53
|
import "../shared-utils/positionToVector3.js";
|
|
50
54
|
import "../shared-utils/five/vector3ToScreen.js";
|
|
51
55
|
import "../shared-utils/three/temp.js";
|
|
56
|
+
import "../shared-utils/three/core/Raycaster.js";
|
|
52
57
|
import "../shared-utils/dom/resizeObserver.js";
|
|
58
|
+
import "../shared-utils/five/fiveEveryReadyListener.js";
|
|
59
|
+
import "../shared-utils/throttle.js";
|
|
53
60
|
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
54
61
|
import "../shared-utils/three/Magnifier.js";
|
|
55
62
|
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
@@ -81,77 +88,124 @@ import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
|
81
88
|
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
82
89
|
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
83
90
|
import "../vendor/three/build/three.module.js";
|
|
91
|
+
import "../shared-utils/three/generatePolygonGeometry.js";
|
|
92
|
+
import "../shared-utils/three/earcut3D.js";
|
|
93
|
+
import "earcut";
|
|
94
|
+
import "../shared-utils/three/getNormal.js";
|
|
95
|
+
import "../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
96
|
+
import "../Sculpt/utils/three/ColoredMesh.js";
|
|
97
|
+
import "../shared-utils/three/geometryUtil.js";
|
|
98
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
99
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
100
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
101
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
102
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
103
|
+
import "../shared-utils/three/boundingBox.js";
|
|
104
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
105
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
106
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
107
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
108
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
109
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
110
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
111
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
112
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
113
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
114
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
115
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
116
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
117
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
118
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
119
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
120
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
121
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
122
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
123
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
124
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
125
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
126
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
127
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
128
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
129
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
130
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
131
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
132
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
133
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
134
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
135
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
136
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
137
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
84
138
|
import "../shared-utils/isTruelyObject.js";
|
|
85
|
-
const g = "CruisePlugin",
|
|
86
|
-
class
|
|
87
|
-
constructor(
|
|
88
|
-
super(
|
|
89
|
-
|
|
139
|
+
const g = "CruisePlugin", m = `${g}`, Ii = (s) => `${m}--${s}`;
|
|
140
|
+
class wi extends y {
|
|
141
|
+
constructor(t, i) {
|
|
142
|
+
super(t, i);
|
|
143
|
+
o(this, "state", {
|
|
90
144
|
visible: !0,
|
|
91
145
|
enabled: !0,
|
|
92
146
|
disposed: !1,
|
|
93
147
|
playing: !1,
|
|
94
148
|
speed: 1
|
|
95
149
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
150
|
+
o(this, "data");
|
|
151
|
+
o(this, "config");
|
|
152
|
+
o(this, "pauseDataMap", /* @__PURE__ */ new Map());
|
|
153
|
+
o(this, "privateState", {
|
|
100
154
|
playing: !1,
|
|
101
155
|
broke: !1,
|
|
102
156
|
modeChanging: !1
|
|
103
157
|
});
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
console.error(`${
|
|
158
|
+
o(this, "GuideLine");
|
|
159
|
+
o(this, "disposedErrorLog", () => {
|
|
160
|
+
console.error(`${m} is disposed`);
|
|
107
161
|
});
|
|
108
|
-
|
|
109
|
-
console.warn(`${
|
|
162
|
+
o(this, "disableWarnLog", () => {
|
|
163
|
+
console.warn(`${m} is disabled`);
|
|
110
164
|
});
|
|
111
|
-
|
|
112
|
-
console.error(`${
|
|
165
|
+
o(this, "disableErrorLog", () => {
|
|
166
|
+
console.error(`${m} is disabled`);
|
|
113
167
|
});
|
|
114
|
-
this.config =
|
|
168
|
+
this.config = i, Object.assign(window, { [`__${g}_DEBUG__`]: this });
|
|
115
169
|
}
|
|
116
170
|
/**
|
|
117
171
|
* @description Play | Continue play. if have been paused, continue play from the pause position; if playing, do nothing
|
|
118
172
|
*/
|
|
119
|
-
play(
|
|
120
|
-
this.setState({ playing: !0 },
|
|
173
|
+
play(t) {
|
|
174
|
+
this.setState({ playing: !0 }, t);
|
|
121
175
|
}
|
|
122
176
|
/**
|
|
123
177
|
* @description Pause
|
|
124
178
|
*/
|
|
125
|
-
pause(
|
|
126
|
-
this.setState({ playing: !1 },
|
|
179
|
+
pause(t) {
|
|
180
|
+
this.setState({ playing: !1 }, t);
|
|
127
181
|
}
|
|
128
182
|
/**
|
|
129
183
|
* @description Show guide line
|
|
130
184
|
*/
|
|
131
|
-
show(
|
|
132
|
-
return
|
|
133
|
-
this.setState({ visible: !0 },
|
|
185
|
+
show(t) {
|
|
186
|
+
return n(this, null, function* () {
|
|
187
|
+
this.setState({ visible: !0 }, t);
|
|
134
188
|
});
|
|
135
189
|
}
|
|
136
190
|
/**
|
|
137
191
|
* @description Hide guide line
|
|
138
192
|
*/
|
|
139
|
-
hide(
|
|
140
|
-
return
|
|
141
|
-
this.setState({ visible: !1 },
|
|
193
|
+
hide(t) {
|
|
194
|
+
return n(this, null, function* () {
|
|
195
|
+
this.setState({ visible: !1 }, t);
|
|
142
196
|
});
|
|
143
197
|
}
|
|
144
198
|
/**
|
|
145
199
|
* @description Enable
|
|
146
200
|
*/
|
|
147
|
-
enable(
|
|
148
|
-
this.setState({ enabled: !0 },
|
|
201
|
+
enable(t) {
|
|
202
|
+
this.setState({ enabled: !0 }, t);
|
|
149
203
|
}
|
|
150
204
|
/**
|
|
151
205
|
* @description Disable
|
|
152
206
|
*/
|
|
153
|
-
disable(
|
|
154
|
-
this.setState({ enabled: !1 },
|
|
207
|
+
disable(t) {
|
|
208
|
+
this.setState({ enabled: !1 }, t);
|
|
155
209
|
}
|
|
156
210
|
/**
|
|
157
211
|
* @description Dispose
|
|
@@ -162,57 +216,57 @@ class we extends y {
|
|
|
162
216
|
/**
|
|
163
217
|
* @description Set state
|
|
164
218
|
*/
|
|
165
|
-
setState(
|
|
166
|
-
var
|
|
219
|
+
setState(t, i) {
|
|
220
|
+
var a;
|
|
167
221
|
if (this.state.disposed)
|
|
168
222
|
return this.disposedErrorLog();
|
|
169
|
-
if (!this.state.enabled &&
|
|
223
|
+
if (!this.state.enabled && t.enabled !== !0 && t.disposed !== !0)
|
|
170
224
|
return this.disableErrorLog();
|
|
171
|
-
const
|
|
172
|
-
this.state = C({}, this.state,
|
|
225
|
+
const e = f({}, this.state);
|
|
226
|
+
this.state = C({}, this.state, t), t.disposed !== void 0 && t.disposed !== e.disposed && t.disposed && this.handleDispose(), t.visible !== void 0 && t.visible !== e.visible && this.handleVisible(t.visible, i == null ? void 0 : i.userAction), t.enabled !== void 0 && t.enabled !== e.enabled && this.handleEnable(t.enabled, i == null ? void 0 : i.userAction), t.playing !== void 0 && t.playing !== e.playing && this.changePlayState(t.playing, i), t.speed !== void 0 && t.speed !== e.speed && this.changeSpeed(t.speed), L(e, this.state, { deep: !0 }) || this.hooks.emit("stateChange", { state: this.state, prevState: e, userAction: (a = i == null ? void 0 : i.userAction) != null ? a : !0 });
|
|
173
227
|
}
|
|
174
228
|
/**
|
|
175
229
|
* @description Clear pause data
|
|
176
230
|
*/
|
|
177
231
|
clearPauseData() {
|
|
178
|
-
var
|
|
179
|
-
if ((
|
|
180
|
-
return this.pauseDataMap.delete((
|
|
232
|
+
var t, i;
|
|
233
|
+
if ((t = this.data) != null && t.id)
|
|
234
|
+
return this.pauseDataMap.delete((i = this.data) == null ? void 0 : i.id);
|
|
181
235
|
}
|
|
182
|
-
changePlayState(
|
|
236
|
+
changePlayState(t, i) {
|
|
183
237
|
this.actionIfStateIsEnabled(
|
|
184
238
|
() => {
|
|
185
|
-
var
|
|
186
|
-
return this.hooks.emit("playStateChange",
|
|
239
|
+
var e;
|
|
240
|
+
return this.hooks.emit("playStateChange", t ? "playing" : "pause", { userAction: (e = i == null ? void 0 : i.userAction) != null ? e : !0 });
|
|
187
241
|
}
|
|
188
|
-
),
|
|
242
|
+
), t ? this.handlePlay(i) : this.handlePause(i), this.state.playing = t;
|
|
189
243
|
}
|
|
190
|
-
handleEnable(
|
|
191
|
-
var
|
|
192
|
-
|
|
244
|
+
handleEnable(t, i = !0) {
|
|
245
|
+
var e, a;
|
|
246
|
+
t ? ((e = this.GuideLine) == null || e.enable(), this.hooks.emit("enable", { userAction: i })) : ((a = this.GuideLine) == null || a.disable(), this.changePlayState(!1, { userAction: i }), this.hooks.emit("disable", { userAction: i })), this.state.enabled = t;
|
|
193
247
|
}
|
|
194
|
-
handleVisible(
|
|
195
|
-
var
|
|
196
|
-
|
|
248
|
+
handleVisible(t, i = !0) {
|
|
249
|
+
var e, a;
|
|
250
|
+
t ? ((e = this.GuideLine) == null || e.show(), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: i }))) : ((a = this.GuideLine) == null || a.hide(), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: i }))), this.state.visible = t;
|
|
197
251
|
}
|
|
198
252
|
/**
|
|
199
253
|
* @description: listen interupted by five gesture
|
|
200
254
|
*/
|
|
201
|
-
addInterruptListener(
|
|
202
|
-
const
|
|
203
|
-
this.privateState.modeChanging ||
|
|
204
|
-
},
|
|
205
|
-
|
|
255
|
+
addInterruptListener(t) {
|
|
256
|
+
const i = () => {
|
|
257
|
+
this.privateState.modeChanging || t();
|
|
258
|
+
}, e = (a) => {
|
|
259
|
+
a !== "mouseMove" && (t(), this.five.off("gesture", e));
|
|
206
260
|
};
|
|
207
|
-
return this.five.on("gesture",
|
|
208
|
-
this.five.off("gesture",
|
|
261
|
+
return this.five.on("gesture", e), this.five.once("wantsChangeMode", i), () => {
|
|
262
|
+
this.five.off("gesture", e), this.five.off("wantsChangeMode", i);
|
|
209
263
|
};
|
|
210
264
|
}
|
|
211
265
|
/**
|
|
212
266
|
* @description Get duration by speed
|
|
213
267
|
*/
|
|
214
|
-
getSpeededDuration(
|
|
215
|
-
return
|
|
268
|
+
getSpeededDuration(t) {
|
|
269
|
+
return t / this.state.speed;
|
|
216
270
|
}
|
|
217
271
|
/**
|
|
218
272
|
* @description Force interupt five updateCamera
|
|
@@ -221,18 +275,18 @@ class we extends y {
|
|
|
221
275
|
this.five.updateCamera({}, 0);
|
|
222
276
|
}
|
|
223
277
|
getPauseData() {
|
|
224
|
-
var
|
|
225
|
-
if ((
|
|
278
|
+
var t;
|
|
279
|
+
if ((t = this.data) != null && t.id)
|
|
226
280
|
return this.pauseDataMap.get(this.data.id);
|
|
227
281
|
}
|
|
228
282
|
/**
|
|
229
283
|
* @description Set pause data
|
|
230
284
|
*/
|
|
231
285
|
setPauseData() {
|
|
232
|
-
var
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
return this.pauseDataMap.set(
|
|
286
|
+
var i;
|
|
287
|
+
const t = (i = this.data) == null ? void 0 : i.id;
|
|
288
|
+
if (t)
|
|
289
|
+
return this.pauseDataMap.set(t, {
|
|
236
290
|
fiveState: this.five.getCurrentState(),
|
|
237
291
|
playedProgress: this.getProgress()
|
|
238
292
|
});
|
|
@@ -245,19 +299,19 @@ class we extends y {
|
|
|
245
299
|
}
|
|
246
300
|
// TODO
|
|
247
301
|
handleDispose() {
|
|
248
|
-
var
|
|
249
|
-
this.setState({ playing: !1 }), this.clearPauseData(), this.clear(), (
|
|
302
|
+
var t;
|
|
303
|
+
this.setState({ playing: !1 }), this.clearPauseData(), this.clear(), (t = this.GuideLine) == null || t.dispose(), this.GuideLine = void 0;
|
|
250
304
|
}
|
|
251
305
|
/**
|
|
252
306
|
* @description Action function if plugin is enable
|
|
253
307
|
*/
|
|
254
|
-
actionIfStateIsEnabled(
|
|
308
|
+
actionIfStateIsEnabled(t, i) {
|
|
255
309
|
if (this.state.enabled)
|
|
256
|
-
return
|
|
257
|
-
|
|
310
|
+
return t();
|
|
311
|
+
i != null && i.warnLog && this.disableWarnLog();
|
|
258
312
|
}
|
|
259
313
|
}
|
|
260
314
|
export {
|
|
261
|
-
|
|
262
|
-
|
|
315
|
+
wi as default,
|
|
316
|
+
Ii as pluginFlag
|
|
263
317
|
};
|
|
@@ -2,30 +2,30 @@ var T = Object.defineProperty, x = Object.defineProperties;
|
|
|
2
2
|
var D = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var k = Object.getOwnPropertySymbols;
|
|
4
4
|
var E = Object.prototype.hasOwnProperty, F = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var d = (
|
|
5
|
+
var d = (m, i, t) => i in m ? T(m, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[i] = t, u = (m, i) => {
|
|
6
6
|
for (var t in i || (i = {}))
|
|
7
|
-
E.call(i, t) && d(
|
|
7
|
+
E.call(i, t) && d(m, t, i[t]);
|
|
8
8
|
if (k)
|
|
9
9
|
for (var t of k(i))
|
|
10
|
-
F.call(i, t) && d(
|
|
11
|
-
return
|
|
12
|
-
}, c = (
|
|
13
|
-
var n = (
|
|
14
|
-
var w = (
|
|
15
|
-
var
|
|
10
|
+
F.call(i, t) && d(m, t, i[t]);
|
|
11
|
+
return m;
|
|
12
|
+
}, c = (m, i) => x(m, D(i));
|
|
13
|
+
var n = (m, i, t) => (d(m, typeof i != "symbol" ? i + "" : i, t), t);
|
|
14
|
+
var w = (m, i, t) => new Promise((r, p) => {
|
|
15
|
+
var e = (o) => {
|
|
16
16
|
try {
|
|
17
17
|
a(t.next(o));
|
|
18
18
|
} catch (s) {
|
|
19
|
-
|
|
19
|
+
p(s);
|
|
20
20
|
}
|
|
21
21
|
}, h = (o) => {
|
|
22
22
|
try {
|
|
23
23
|
a(t.throw(o));
|
|
24
24
|
} catch (s) {
|
|
25
|
-
|
|
25
|
+
p(s);
|
|
26
26
|
}
|
|
27
|
-
}, a = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(
|
|
28
|
-
a((t = t.apply(
|
|
27
|
+
}, a = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(e, h);
|
|
28
|
+
a((t = t.apply(m, i)).next());
|
|
29
29
|
});
|
|
30
30
|
import z from "./BaseController.js";
|
|
31
31
|
import { objectAssignDeepExports as g } from "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
@@ -41,6 +41,10 @@ import "../shared-utils/three/core/Sphere.js";
|
|
|
41
41
|
import "animejs";
|
|
42
42
|
import { uuid as A } from "../shared-utils/uuid.js";
|
|
43
43
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
44
|
+
import "../Sculpt/Meshes/Polygon.js";
|
|
45
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
46
|
+
import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
47
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
44
48
|
import { getFiveStateOnCurve as v } from "./utils/getFiveStateOnCurve.js";
|
|
45
49
|
import M from "../GuideLinePlugin/index.js";
|
|
46
50
|
import "../base/BasePlugin.js";
|
|
@@ -55,7 +59,10 @@ import "../shared-utils/equal.js";
|
|
|
55
59
|
import "../shared-utils/isTruelyObject.js";
|
|
56
60
|
import "../shared-utils/five/vector3ToScreen.js";
|
|
57
61
|
import "../shared-utils/three/temp.js";
|
|
62
|
+
import "../shared-utils/three/core/Raycaster.js";
|
|
58
63
|
import "../shared-utils/dom/resizeObserver.js";
|
|
64
|
+
import "../shared-utils/five/fiveEveryReadyListener.js";
|
|
65
|
+
import "../shared-utils/throttle.js";
|
|
59
66
|
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
60
67
|
import "../shared-utils/three/Magnifier.js";
|
|
61
68
|
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
@@ -87,11 +94,57 @@ import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
|
87
94
|
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
88
95
|
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
89
96
|
import "../vendor/three/build/three.module.js";
|
|
97
|
+
import "../shared-utils/three/generatePolygonGeometry.js";
|
|
98
|
+
import "../shared-utils/three/earcut3D.js";
|
|
99
|
+
import "earcut";
|
|
100
|
+
import "../shared-utils/three/getNormal.js";
|
|
101
|
+
import "../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
102
|
+
import "../Sculpt/utils/three/ColoredMesh.js";
|
|
103
|
+
import "../shared-utils/three/geometryUtil.js";
|
|
104
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
105
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
106
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
107
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
108
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
109
|
+
import "../shared-utils/three/boundingBox.js";
|
|
110
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
111
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
112
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
113
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
114
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
115
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
116
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
117
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
118
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
119
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
120
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
121
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
122
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
123
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
124
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
125
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
126
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
127
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
128
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
129
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
130
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
131
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
132
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
133
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
134
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
135
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
136
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
137
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
138
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
139
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
140
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
141
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
142
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
143
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
90
144
|
import "../shared-utils/vectorToCoordinate.js";
|
|
91
145
|
import "../shared-utils/formatRad.js";
|
|
92
146
|
import "../GuideLinePlugin/Controller.js";
|
|
93
147
|
import "../base/BasePluginWithData.js";
|
|
94
|
-
import "../shared-utils/five/fiveModelLoad.js";
|
|
95
148
|
import "../GuideLinePlugin/GuideLineItem/index.js";
|
|
96
149
|
import "../GuideLinePlugin/GuideLineModeItem/index.js";
|
|
97
150
|
import "../shared-utils/log.js";
|
|
@@ -196,7 +249,6 @@ import "../shared-utils/three/loadVideoTexture.js";
|
|
|
196
249
|
import "../shared-utils/device.js";
|
|
197
250
|
import "../shared-utils/three/getPositionsByObjectFit.js";
|
|
198
251
|
import "../shared-utils/three/FragmentTransparencyMaterial.js";
|
|
199
|
-
import "../shared-utils/three/getNormal.js";
|
|
200
252
|
import "../PanoTagPlugin/controller/Tag/BaseTag.js";
|
|
201
253
|
import "../PanoTagPlugin/utils/tag/calculateTagConfig.js";
|
|
202
254
|
import "../shared-utils/typescript/entries.js";
|
|
@@ -216,14 +268,6 @@ import "../PanoTagPlugin/utils/normalPositionToPositions.js";
|
|
|
216
268
|
import "../vendor/svelte/store/index.js";
|
|
217
269
|
import "../CSS3DRenderPlugin/index.js";
|
|
218
270
|
import "../CSS3DRenderPlugin/Controller.js";
|
|
219
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
220
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
221
|
-
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
222
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
223
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
224
|
-
import "../shared-utils/five/FiveDomEvents.js";
|
|
225
|
-
import "../shared-utils/five/calculateThreeMouse.js";
|
|
226
|
-
import "../shared-utils/three/core/Raycaster.js";
|
|
227
271
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
228
272
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
229
273
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
@@ -243,7 +287,7 @@ import "./utils/coordinatesToVector.js";
|
|
|
243
287
|
import "./utils/safeCall.js";
|
|
244
288
|
import "./utils/sleep.js";
|
|
245
289
|
import "../shared-utils/five/fiveLoaded.js";
|
|
246
|
-
class
|
|
290
|
+
class Am extends z {
|
|
247
291
|
constructor(t, r) {
|
|
248
292
|
var h;
|
|
249
293
|
super(t, r);
|
|
@@ -267,25 +311,25 @@ class Bo extends z {
|
|
|
267
311
|
const t = this.getPauseData();
|
|
268
312
|
let r = (o = t == null ? void 0 : t.playedProgress) != null ? o : 0;
|
|
269
313
|
(r < 0 || r >= 1) && (r = 0);
|
|
270
|
-
const
|
|
271
|
-
return 1 -
|
|
314
|
+
const p = 1 - r, e = this.getDuration(), a = (performance.now() - this.playStartedTime) / e;
|
|
315
|
+
return 1 - p + a;
|
|
272
316
|
});
|
|
273
|
-
const
|
|
317
|
+
const p = {
|
|
274
318
|
config: {
|
|
275
319
|
speedConfig: {
|
|
276
320
|
moveSpeed: 2,
|
|
277
321
|
moveSpeedUnit: "m/s"
|
|
278
322
|
}
|
|
279
323
|
}
|
|
280
|
-
},
|
|
324
|
+
}, e = {
|
|
281
325
|
allowBroke: !0
|
|
282
326
|
};
|
|
283
|
-
this.state = g({},
|
|
327
|
+
this.state = g({}, p, this.state), this.config = g({}, e, this.config), this.baseCurveOffset = g({ x: 0, y: 0, z: 0 }, { y: 2 }, (h = this.config) == null ? void 0 : h.offset);
|
|
284
328
|
}
|
|
285
329
|
load(t, r) {
|
|
286
330
|
var a, o, s, f, y, S, C, P, b;
|
|
287
331
|
this.handlePause(), this.clear(), this.data = u({ id: A() }, t);
|
|
288
|
-
const
|
|
332
|
+
const p = (() => {
|
|
289
333
|
if (this.data.path instanceof L.Curve)
|
|
290
334
|
return this.data.path.curves[0];
|
|
291
335
|
{
|
|
@@ -295,16 +339,16 @@ class Bo extends z {
|
|
|
295
339
|
return new L.CatmullRomCurve3(l, void 0, "catmullrom", 0.5);
|
|
296
340
|
}
|
|
297
341
|
})();
|
|
298
|
-
if (!
|
|
342
|
+
if (!p)
|
|
299
343
|
return;
|
|
300
|
-
if (this.curve =
|
|
344
|
+
if (this.curve = p, this.curveOffset = {
|
|
301
345
|
x: this.baseCurveOffset.x + ((o = (a = this.data.offset) == null ? void 0 : a.x) != null ? o : 0),
|
|
302
346
|
y: this.baseCurveOffset.y + ((f = (s = this.data.offset) == null ? void 0 : s.y) != null ? f : 0),
|
|
303
347
|
z: this.baseCurveOffset.z + ((S = (y = this.data.offset) == null ? void 0 : y.z) != null ? S : 0)
|
|
304
348
|
}, !this.curve)
|
|
305
349
|
throw new Error("curve is not defined");
|
|
306
|
-
const
|
|
307
|
-
if (this.duration =
|
|
350
|
+
const e = this.curve.getLength(), h = this.state.config.speedConfig.moveSpeedUnit === "m/ms" ? 1 : 1e3;
|
|
351
|
+
if (this.duration = e / (this.state.config.speedConfig.moveSpeed / h), Array.isArray(this.data.path)) {
|
|
308
352
|
const l = this.data.path.map(O).map((G) => G.toArray());
|
|
309
353
|
!this.GuideLine && (((C = this.config) == null ? void 0 : C.useGuideLine) !== !1 && t.useGuildLine || (P = this.config) != null && P.useGuideLine && t.useGuildLine !== !1) && (this.GuideLine = M(this.five, this.config)), (b = this.GuideLine) == null || b.load({
|
|
310
354
|
lines: [
|
|
@@ -322,11 +366,11 @@ class Bo extends z {
|
|
|
322
366
|
return new Promise((t, r) => w(this, null, function* () {
|
|
323
367
|
var o;
|
|
324
368
|
this.hooks.emit("play", { userAction: !0 });
|
|
325
|
-
const
|
|
326
|
-
let
|
|
327
|
-
(
|
|
328
|
-
const h = v(this.curve,
|
|
329
|
-
if (this.hooks.emit("progressChange",
|
|
369
|
+
const p = this.getPauseData();
|
|
370
|
+
let e = (o = p == null ? void 0 : p.playedProgress) != null ? o : 0;
|
|
371
|
+
(e < 0 || e >= 1) && (e = 0);
|
|
372
|
+
const h = v(this.curve, e, this.curveOffset);
|
|
373
|
+
if (this.hooks.emit("progressChange", e), this.five.setState(c(u({}, h), { mode: "Model" })), yield this.five.ready(), this.playStartedTime = performance.now(), this.config.allowBroke) {
|
|
330
374
|
const s = this.addInterruptListener(() => {
|
|
331
375
|
this.state.playing && (this.hooks.emit("broke"), this.handlePause(), s(), r(new Error("broke")));
|
|
332
376
|
});
|
|
@@ -351,5 +395,5 @@ class Bo extends z {
|
|
|
351
395
|
}
|
|
352
396
|
}
|
|
353
397
|
export {
|
|
354
|
-
|
|
398
|
+
Am as default
|
|
355
399
|
};
|