@realsee/dnalogel 3.8.5 → 3.8.6
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 +3 -3
- package/dist/index.js +12 -6
- package/dist/index.umd.js +3 -3
- package/libs/CruisePlugin/Move.js +39 -33
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -2,30 +2,30 @@ var C = Object.defineProperty, P = Object.defineProperties;
|
|
|
2
2
|
var b = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var y = Object.getOwnPropertySymbols;
|
|
4
4
|
var k = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var u = (r, t, e) => t in r ? C(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, d = (r, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
k.call(t, e) &&
|
|
7
|
+
k.call(t, e) && u(r, e, t[e]);
|
|
8
8
|
if (y)
|
|
9
9
|
for (var e of y(t))
|
|
10
|
-
O.call(t, e) &&
|
|
11
|
-
return
|
|
12
|
-
}, c = (
|
|
13
|
-
var f = (
|
|
14
|
-
var S = (
|
|
15
|
-
var
|
|
10
|
+
O.call(t, e) && u(r, e, t[e]);
|
|
11
|
+
return r;
|
|
12
|
+
}, c = (r, t) => P(r, b(t));
|
|
13
|
+
var f = (r, t, e) => (u(r, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var S = (r, t, e) => new Promise((s, h) => {
|
|
15
|
+
var o = (i) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
n(e.next(i));
|
|
18
18
|
} catch (a) {
|
|
19
19
|
h(a);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, p = (i) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
n(e.throw(i));
|
|
24
24
|
} catch (a) {
|
|
25
25
|
h(a);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, n = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(o, p);
|
|
28
|
+
n((e = e.apply(r, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import w from "./BaseController.js";
|
|
31
31
|
import { objectAssignDeepExports as l } from "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
@@ -59,7 +59,7 @@ import "../shared-utils/vectorToCoordinate.js";
|
|
|
59
59
|
import "../shared-utils/formatRad.js";
|
|
60
60
|
class re extends w {
|
|
61
61
|
constructor(e, s) {
|
|
62
|
-
var
|
|
62
|
+
var p;
|
|
63
63
|
super(e, s);
|
|
64
64
|
f(this, "curve");
|
|
65
65
|
f(this, "baseCurveOffset");
|
|
@@ -70,16 +70,19 @@ class re extends w {
|
|
|
70
70
|
this.state.speed = e, this.hooks.emit("speedChange", e, { userAction: s });
|
|
71
71
|
});
|
|
72
72
|
f(this, "moveToStart", () => {
|
|
73
|
-
this.five.setState(c(
|
|
73
|
+
this.five.setState(c(d({}, g(this.curve, 0, this.curveOffset)), { mode: "Model" }));
|
|
74
74
|
});
|
|
75
75
|
f(this, "playFromStart", () => {
|
|
76
76
|
this.clearPauseData(), this.setState({ playing: !0 });
|
|
77
77
|
});
|
|
78
78
|
f(this, "getDuration", () => this.getSpeededDuration(this.duration));
|
|
79
79
|
f(this, "getProgress", () => {
|
|
80
|
-
var
|
|
81
|
-
const e = this.getPauseData()
|
|
82
|
-
|
|
80
|
+
var i;
|
|
81
|
+
const e = this.getPauseData();
|
|
82
|
+
let s = (i = e == null ? void 0 : e.playedProgress) != null ? i : 0;
|
|
83
|
+
(s < 0 || s >= 1) && (s = 0);
|
|
84
|
+
const h = 1 - s, o = this.getDuration(), n = (performance.now() - this.playStartedTime) / o;
|
|
85
|
+
return 1 - h + n;
|
|
83
86
|
});
|
|
84
87
|
const h = {
|
|
85
88
|
config: {
|
|
@@ -88,44 +91,47 @@ class re extends w {
|
|
|
88
91
|
moveSpeedUnit: "m/s"
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
|
-
},
|
|
94
|
+
}, o = {
|
|
92
95
|
allowBroke: !0
|
|
93
96
|
};
|
|
94
|
-
this.state = l({}, h, this.state), this.config = l({},
|
|
97
|
+
this.state = l({}, h, this.state), this.config = l({}, o, this.config), this.baseCurveOffset = l({ x: 0, y: 0, z: 0 }, { y: 2 }, (p = this.config) == null ? void 0 : p.offset);
|
|
95
98
|
}
|
|
96
99
|
load(e, s) {
|
|
97
|
-
var
|
|
98
|
-
if (this.handlePause(), this.clear(), this.data =
|
|
99
|
-
x: this.baseCurveOffset.x + ((
|
|
100
|
-
y: this.baseCurveOffset.y + ((a = (
|
|
100
|
+
var p, n, i, a, m, v;
|
|
101
|
+
if (this.handlePause(), this.clear(), this.data = d({ id: x() }, e), this.curve = this.data.path.curves[0], this.curveOffset = {
|
|
102
|
+
x: this.baseCurveOffset.x + ((n = (p = this.data.offset) == null ? void 0 : p.x) != null ? n : 0),
|
|
103
|
+
y: this.baseCurveOffset.y + ((a = (i = this.data.offset) == null ? void 0 : i.y) != null ? a : 0),
|
|
101
104
|
z: this.baseCurveOffset.z + ((v = (m = this.data.offset) == null ? void 0 : m.z) != null ? v : 0)
|
|
102
105
|
}, !this.curve)
|
|
103
106
|
throw new Error("curve is not defined");
|
|
104
|
-
const h = this.curve.getLength(),
|
|
105
|
-
return this.duration = h / (this.state.config.speedConfig.moveSpeed /
|
|
107
|
+
const h = this.curve.getLength(), o = this.state.config.speedConfig.moveSpeedUnit === "m/ms" ? 1 : 1e3;
|
|
108
|
+
return this.duration = h / (this.state.config.speedConfig.moveSpeed / o), s ? this.setState(s) : (this.setState({ playing: !1 }), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), this.changePlayState(this.state.playing), this.changeSpeed(this.state.speed)), Promise.resolve();
|
|
106
109
|
}
|
|
107
110
|
handlePlay() {
|
|
108
111
|
return new Promise((e, s) => S(this, null, function* () {
|
|
109
|
-
var
|
|
112
|
+
var i;
|
|
110
113
|
this.hooks.emit("play", { userAction: !0 });
|
|
111
|
-
const h = this.getPauseData()
|
|
112
|
-
|
|
114
|
+
const h = this.getPauseData();
|
|
115
|
+
let o = (i = h == null ? void 0 : h.playedProgress) != null ? i : 0;
|
|
116
|
+
(o < 0 || o >= 1) && (o = 0);
|
|
117
|
+
const p = g(this.curve, o, this.curveOffset);
|
|
118
|
+
if (this.hooks.emit("progressChange", o), this.five.setState(c(d({}, p), { mode: "Model" })), yield this.five.ready(), this.playStartedTime = performance.now(), this.config.allowBroke) {
|
|
113
119
|
const a = this.addInterruptListener(() => {
|
|
114
120
|
this.state.playing && (this.hooks.emit("broke"), this.handlePause(), a(), s(new Error("broke")));
|
|
115
121
|
});
|
|
116
122
|
}
|
|
117
|
-
const
|
|
123
|
+
const n = () => {
|
|
118
124
|
const a = this.getProgress();
|
|
119
125
|
if (a >= 1)
|
|
120
|
-
this.five.off("renderFrame",
|
|
126
|
+
this.five.off("renderFrame", n), this.setState({ playing: !1 }, { userAction: !1 }), this.hooks.emit("end"), this.hooks.emit("progressChange", 1), e("end");
|
|
121
127
|
else if (this.state.playing === !1)
|
|
122
|
-
this.five.off("renderFrame",
|
|
128
|
+
this.five.off("renderFrame", n);
|
|
123
129
|
else if (a >= 0) {
|
|
124
130
|
const m = g(this.curve, a, this.curveOffset);
|
|
125
131
|
this.hooks.emit("progressChange", a), this.five.setState(m, !0);
|
|
126
132
|
}
|
|
127
133
|
};
|
|
128
|
-
this.five.on("renderFrame",
|
|
134
|
+
this.five.on("renderFrame", n);
|
|
129
135
|
}));
|
|
130
136
|
}
|
|
131
137
|
handlePause(e) {
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.8.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.8.6",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
8
|
"description": "如视 VR 看房插件合集",
|
|
9
9
|
"private": false,
|
|
10
|
-
"version": "3.8.
|
|
10
|
+
"version": "3.8.6",
|
|
11
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
|