@realsee/dnalogel 3.40.0-alpha.0 → 3.40.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/dist/GuideLinePlugin/typing.d.ts +0 -1
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
- package/dist/index.cjs.js +67 -71
- package/dist/index.js +5851 -5938
- package/dist/index.umd.js +61 -65
- package/dist/shared-utils/three/blink.d.ts +10 -3
- package/libs/CruisePlugin/Move.js +2 -3
- package/libs/CruisePlugin/Work.js +2 -3
- package/libs/CruisePlugin/index.js +6 -7
- package/libs/GuideLinePlugin/Controller.js +4 -5
- package/libs/GuideLinePlugin/GuideLineItem.js +2 -3
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +59 -76
- package/libs/GuideLinePlugin/GuideLineModeItem.js +2 -3
- package/libs/GuideLinePlugin/index.js +6 -7
- package/libs/GuideLinePlugin/typing.d.ts +0 -1
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +57 -116
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +125 -126
- package/libs/shared-utils/index.js +30 -29
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/blink.d.ts +10 -3
- package/libs/shared-utils/three/blink.js +85 -92
- package/package.json +2 -2
- package/dist/shared-utils/math/intersecting.d.ts +0 -25
- package/libs/shared-utils/math/intersecting.d.ts +0 -25
- package/libs/shared-utils/math/intersecting.js +0 -25
|
@@ -1,106 +1,99 @@
|
|
|
1
1
|
var R = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var
|
|
9
|
-
x.call(
|
|
10
|
-
return
|
|
2
|
+
var T = Object.getOwnPropertySymbols;
|
|
3
|
+
var L = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var H = (a, t, r) => t in a ? R(a, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : a[t] = r, E = (a, t) => {
|
|
5
|
+
for (var r in t || (t = {}))
|
|
6
|
+
L.call(t, r) && H(a, r, t[r]);
|
|
7
|
+
if (T)
|
|
8
|
+
for (var r of T(t))
|
|
9
|
+
x.call(t, r) && H(a, r, t[r]);
|
|
10
|
+
return a;
|
|
11
11
|
};
|
|
12
|
-
var E = (e, a, t) => new Promise((r, s) => {
|
|
13
|
-
var l = (y) => {
|
|
14
|
-
try {
|
|
15
|
-
v(t.next(y));
|
|
16
|
-
} catch (i) {
|
|
17
|
-
s(i);
|
|
18
|
-
}
|
|
19
|
-
}, c = (y) => {
|
|
20
|
-
try {
|
|
21
|
-
v(t.throw(y));
|
|
22
|
-
} catch (i) {
|
|
23
|
-
s(i);
|
|
24
|
-
}
|
|
25
|
-
}, v = (y) => y.done ? r(y.value) : Promise.resolve(y.value).then(l, c);
|
|
26
|
-
v((t = t.apply(e, a)).next());
|
|
27
|
-
});
|
|
28
12
|
import D from "animejs";
|
|
29
|
-
import { toArray as
|
|
30
|
-
const f = /* @__PURE__ */ new Map(),
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
f.has(
|
|
35
|
-
opacity:
|
|
13
|
+
import { toArray as g } from "../util.js";
|
|
14
|
+
const f = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
|
|
15
|
+
function k(a) {
|
|
16
|
+
g(a).forEach((r) => {
|
|
17
|
+
var l, s;
|
|
18
|
+
f.has(r) || (r instanceof HTMLElement ? f.set(r, {
|
|
19
|
+
opacity: r.style.opacity === "" ? void 0 : r.style.opacity,
|
|
36
20
|
visible: {
|
|
37
|
-
display:
|
|
38
|
-
visibility:
|
|
21
|
+
display: r.style.display,
|
|
22
|
+
visibility: r.style.visibility
|
|
39
23
|
}
|
|
40
|
-
}) :
|
|
41
|
-
opacity: (
|
|
42
|
-
transparent: (s =
|
|
43
|
-
visible:
|
|
24
|
+
}) : r.isObject3D && f.set(r, {
|
|
25
|
+
opacity: (l = r.material) == null ? void 0 : l.opacity,
|
|
26
|
+
transparent: (s = r.material) == null ? void 0 : s.transparent,
|
|
27
|
+
visible: r.visible
|
|
44
28
|
}));
|
|
45
29
|
});
|
|
46
30
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
31
|
+
function S(a) {
|
|
32
|
+
console.log("restoring object state"), g(a).forEach((r) => {
|
|
33
|
+
const l = f.get(r);
|
|
34
|
+
l && (r instanceof HTMLElement && (r.style.opacity = l.opacity === void 0 ? "" : l.opacity, r.style.display = l.visible.display, r.style.visibility = l.visible.visibility), r.isObject3D && (r.visible = l.visible, r.material && (r.material.opacity = l.opacity, r.material.transparent = l.transparent)), f.delete(r));
|
|
51
35
|
});
|
|
52
36
|
}
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
r.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
37
|
+
function w(a, t) {
|
|
38
|
+
var p;
|
|
39
|
+
const r = (p = t == null ? void 0 : t.traverseTHREEObject) != null ? p : !0;
|
|
40
|
+
let l = g(a);
|
|
41
|
+
const s = [];
|
|
42
|
+
l.forEach((y) => {
|
|
43
|
+
y instanceof HTMLElement ? s.push(y) : y.isObject3D && (r ? (s.push(y), y.traverse((c) => {
|
|
44
|
+
c && s.push(c);
|
|
45
|
+
})) : s.push(y));
|
|
46
|
+
}), l = [...new Set(s)], k(l);
|
|
47
|
+
const e = D(E({
|
|
48
|
+
targets: l,
|
|
49
|
+
duration: 300,
|
|
50
|
+
easing: "linear",
|
|
51
|
+
direction: "alternate",
|
|
52
|
+
loop: 4,
|
|
53
|
+
autoplay: !1,
|
|
54
|
+
update: (y) => {
|
|
55
|
+
var c;
|
|
56
|
+
y.animatables.forEach((d) => {
|
|
57
|
+
var M;
|
|
58
|
+
const u = d.target;
|
|
59
|
+
if (!f.has(u))
|
|
60
|
+
return;
|
|
61
|
+
const h = Number((M = f.get(u).opacity) != null ? M : 1) * (100 - y.progress) / 100;
|
|
62
|
+
u instanceof HTMLElement ? u.style.opacity = String(h) : u.material && (u.material.opacity = h, u.material.transparent = !0);
|
|
63
|
+
}), (c = t == null ? void 0 : t.updateRender) == null || c.call(t);
|
|
64
|
+
}
|
|
65
|
+
}, t));
|
|
66
|
+
e.preComplete = () => {
|
|
67
|
+
e != null && e.completed || (e == null || e.pause(), S(l), setTimeout(() => {
|
|
68
|
+
var y;
|
|
69
|
+
return (y = t == null ? void 0 : t.updateRender) == null ? void 0 : y.call(t);
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
const i = v.get(a);
|
|
73
|
+
return i == null || i.pause(), i == null || i.seek(0), v.set(a, e), e.play(), e.finished.then(() => {
|
|
74
|
+
var y;
|
|
75
|
+
S(l), setTimeout(() => {
|
|
76
|
+
v.get(a) === e && v.delete(a);
|
|
77
|
+
}, 1e3), (y = t == null ? void 0 : t.updateRender) == null || y.call(t);
|
|
78
|
+
}), e;
|
|
85
79
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}, a));
|
|
101
|
-
});
|
|
80
|
+
function q(a, t) {
|
|
81
|
+
return w(a, E({
|
|
82
|
+
update: (r) => {
|
|
83
|
+
var l;
|
|
84
|
+
r.animatables.forEach((s) => {
|
|
85
|
+
var c, d;
|
|
86
|
+
const e = s.target;
|
|
87
|
+
if (!f.has(e))
|
|
88
|
+
return;
|
|
89
|
+
const i = f.get(e), y = ((d = (c = i == null ? void 0 : i.opacity) != null ? c : t == null ? void 0 : t.maxOpacity) != null ? d : 1) * (r.progress / 100);
|
|
90
|
+
e instanceof HTMLElement ? (e.style.opacity = String(y), e.style.visibility = "visible") : e.isObject3D && (g(a).includes(e) && (e.visible = !0), e.material && (e.material.opacity = y, e.material.transparent = !0));
|
|
91
|
+
}), (l = t == null ? void 0 : t.updateRender) == null || l.call(t);
|
|
92
|
+
}
|
|
93
|
+
}, t));
|
|
102
94
|
}
|
|
103
95
|
export {
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
v as animeMap,
|
|
97
|
+
w as blink,
|
|
98
|
+
q as reblink
|
|
106
99
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/dnalogel",
|
|
3
|
-
"version": "3.40.0
|
|
3
|
+
"version": "3.40.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./libs/index.js",
|
|
6
6
|
"types": "./libs/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build:dist": "NODE_ENV=production BUILD_MODULE=dist vite build -m production",
|
|
25
25
|
"build:components": "NODE_ENV=production BUILD_MODULE=components vite build -m production",
|
|
26
26
|
"docs": "typedoc --options ./typedoc.json",
|
|
27
|
-
"prepublishOnly": "run-p build",
|
|
27
|
+
"prepublishOnly": "run-p build docs",
|
|
28
28
|
"postpublish": "cnpm sync @realsee/dnalogel"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description 两条二维线段是否相交,不考虑端点重合的情况
|
|
3
|
-
*/
|
|
4
|
-
export declare function lineIsIntersecting(line1: {
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
}[], line2: {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
}[]): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @description 两条二维折线段的交点,不考虑端点重合的情况
|
|
13
|
-
*/
|
|
14
|
-
export declare function findIntersectingOfLines(line1: {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
}[], line2: {
|
|
18
|
-
x: number;
|
|
19
|
-
y: number;
|
|
20
|
-
}[]): {
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
line1RelativeIndex: number;
|
|
24
|
-
line2RelativeIndex: number;
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description 两条二维线段是否相交,不考虑端点重合的情况
|
|
3
|
-
*/
|
|
4
|
-
export declare function lineIsIntersecting(line1: {
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
}[], line2: {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
}[]): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @description 两条二维折线段的交点,不考虑端点重合的情况
|
|
13
|
-
*/
|
|
14
|
-
export declare function findIntersectingOfLines(line1: {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
}[], line2: {
|
|
18
|
-
x: number;
|
|
19
|
-
y: number;
|
|
20
|
-
}[]): {
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
line1RelativeIndex: number;
|
|
24
|
-
line2RelativeIndex: number;
|
|
25
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
function u(x, e) {
|
|
2
|
-
const t = x[0], r = x[1], y = e[0], n = e[1];
|
|
3
|
-
var s = (n.x - y.x) * (t.y - y.y) - (n.y - y.y) * (t.x - y.x), c = (r.x - t.x) * (t.y - y.y) - (r.y - t.y) * (t.x - y.x), a = (n.y - y.y) * (r.x - t.x) - (n.x - y.x) * (r.y - t.y);
|
|
4
|
-
if (a !== 0) {
|
|
5
|
-
var f = s / a, o = c / a;
|
|
6
|
-
if (0 <= f && f <= 1 && 0 <= o && o <= 1)
|
|
7
|
-
return !0;
|
|
8
|
-
}
|
|
9
|
-
return !1;
|
|
10
|
-
}
|
|
11
|
-
function v(x, e) {
|
|
12
|
-
for (let t = 0; t < x.length - 1; t++)
|
|
13
|
-
for (let r = 0; r < e.length - 1; r++)
|
|
14
|
-
if (u([x[t], x[t + 1]], [e[r], e[r + 1]]))
|
|
15
|
-
return {
|
|
16
|
-
x: (x[t].x + x[t + 1].x) / 2,
|
|
17
|
-
y: (x[t].y + x[t + 1].y) / 2,
|
|
18
|
-
line1RelativeIndex: t,
|
|
19
|
-
line2RelativeIndex: r
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
v as findIntersectingOfLines,
|
|
24
|
-
u as lineIsIntersecting
|
|
25
|
-
};
|