@realsee/dnalogel 3.40.4 → 3.41.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/dist/GuideLinePlugin/typing.d.ts +1 -0
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +5 -0
- package/dist/index.cjs.js +57 -53
- package/dist/index.js +4170 -4067
- package/dist/index.umd.js +50 -46
- package/dist/shared-utils/math/intersecting.d.ts +25 -0
- package/libs/CruisePlugin/Move.js +3 -2
- package/libs/CruisePlugin/Work.js +3 -2
- package/libs/CruisePlugin/index.js +7 -6
- package/libs/GuideLinePlugin/Controller.js +5 -4
- package/libs/GuideLinePlugin/GuideLineItem.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +74 -57
- package/libs/GuideLinePlugin/GuideLineModeItem.js +3 -2
- package/libs/GuideLinePlugin/index.js +7 -6
- package/libs/GuideLinePlugin/typing.d.ts +1 -0
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +5 -0
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +123 -57
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +126 -125
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/intersecting.d.ts +25 -0
- package/libs/shared-utils/math/intersecting.js +25 -0
- package/package.json +2 -2
|
@@ -1,85 +1,151 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Vector3 as
|
|
3
|
-
import { polylineNormals as
|
|
1
|
+
import * as r from "three";
|
|
2
|
+
import { Vector3 as ot } from "three";
|
|
3
|
+
import { polylineNormals as at } from "../../vendor/polyline-normals/index.js";
|
|
4
|
+
import { lineIsIntersecting as lt, findIntersectingOfLines as ut } from "../../shared-utils/math/intersecting.js";
|
|
4
5
|
import "../../vendor/polyline-miter-util/index.js";
|
|
5
6
|
import "../../vendor/gl-vec2/add.js";
|
|
6
7
|
import "../../vendor/gl-vec2/set.js";
|
|
7
8
|
import "../../vendor/gl-vec2/normalize.js";
|
|
8
9
|
import "../../vendor/gl-vec2/subtract.js";
|
|
9
10
|
import "../../vendor/gl-vec2/dot.js";
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
return { geometry: new
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
11
|
+
const ft = 2, ht = 3, mt = 3, pt = 2;
|
|
12
|
+
function Lt(i) {
|
|
13
|
+
const O = i.width, N = i.unitLength, b = O / 2, F = i.path;
|
|
14
|
+
if (F.length === 0)
|
|
15
|
+
return { geometry: new r.BufferGeometry(), maxV: 0, curvePath: null, curvePoints: null };
|
|
16
|
+
const P = new r.CurvePath();
|
|
17
|
+
F.forEach((t) => {
|
|
18
|
+
const n = dt(t);
|
|
19
|
+
n && P.add(n);
|
|
19
20
|
});
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const q = Math.ceil(P.getLength() * 100);
|
|
22
|
+
P.arcLengthDivisions = q;
|
|
23
|
+
const I = P.getPoints(q), d = I.length;
|
|
24
|
+
if (d <= 2)
|
|
25
|
+
return { geometry: new r.BufferGeometry(), maxV: 0, curvePath: null, curvePoints: null };
|
|
26
|
+
const st = at(I.map((t) => [t.x, t.z])), ct = (d - 1) * ft * ht, j = 2 * d, it = j * mt, rt = j * pt, y = new Uint32Array(ct), e = new Float32Array(it), T = new Float32Array(rt), J = P.getLength();
|
|
27
|
+
let R = 0, K = 0, Q = {};
|
|
28
|
+
const k = i.path[0].points.map((t) => new r.Vector3().fromArray(t)), W = i.path[0].panoIndexList ? [...i.path[0].panoIndexList] : void 0, tt = (() => {
|
|
25
29
|
const t = [];
|
|
26
|
-
for (let
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
30
|
+
for (let s = 0; s < k.length; s++) {
|
|
31
|
+
const u = k[s];
|
|
32
|
+
if (s === 0)
|
|
29
33
|
t.push(0);
|
|
30
34
|
else {
|
|
31
|
-
const
|
|
32
|
-
t.push(
|
|
35
|
+
const f = k[s - 1];
|
|
36
|
+
t.push(u.distanceTo(f) + t[s - 1]);
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
|
-
const
|
|
36
|
-
for (let
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
+
const n = t.at(-1), p = [];
|
|
40
|
+
for (let s = 0; s < t.length; s++) {
|
|
41
|
+
const u = t[s], f = s === 0 ? 0 : t[s - 1], E = s === t.length - 1 ? n : t[s + 1], a = u - Math.min(0.3, (u - f) / 2), l = u + Math.min(0.3, (E - u) / 2);
|
|
42
|
+
p.push([J * (a / n), J * (l / n)]);
|
|
39
43
|
}
|
|
40
|
-
return
|
|
44
|
+
return p;
|
|
41
45
|
})();
|
|
42
|
-
let
|
|
43
|
-
for (let t = 0; t <
|
|
44
|
-
const [
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
46
|
+
let G = [];
|
|
47
|
+
for (let t = 0; t < d; t++) {
|
|
48
|
+
const [n, p] = st[t][0], s = I[t], { x: u, y: f, z: E } = s, a = new ot(u + n * b, f + 0.05, E + p * b);
|
|
49
|
+
e[t * 6 + 0] = a.x, e[t * 6 + 1] = a.y, e[t * 6 + 2] = a.z;
|
|
50
|
+
const l = new ot(u - n * b, f + 0.05, E - p * b);
|
|
51
|
+
e[t * 6 + 3] = l.x, e[t * 6 + 4] = l.y, e[t * 6 + 5] = l.z, R += t > 0 ? I[t - 1].clone().sub(I[t]).length() : 0;
|
|
52
|
+
const w = R / N;
|
|
53
|
+
K = w, T[t * 4 + 0] = 0, T[t * 4 + 1] = w, T[t * 4 + 2] = 1, T[t * 4 + 3] = w;
|
|
54
|
+
const _ = new r.Vector3().lerpVectors(a, l, 0.5);
|
|
55
|
+
if (i.skipPositions && i.skipPositions.some((L) => L.distanceTo(_) < 0.26))
|
|
52
56
|
continue;
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
distance:
|
|
57
|
+
const h = k[0];
|
|
58
|
+
if (i.useAutoDepthTest && h && W) {
|
|
59
|
+
const C = W[0], [L, g] = tt[0];
|
|
60
|
+
if (R > L && R < g && G.push({
|
|
61
|
+
distance: h.distanceTo(_),
|
|
58
62
|
index: t
|
|
59
|
-
}),
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
+
}), R >= g || t === d - 1) {
|
|
64
|
+
const U = Math.min(...G.map((M) => M.distance)), c = G.find((M) => M.distance === U);
|
|
65
|
+
if (G = [], k.shift(), W.shift(), tt.shift(), c)
|
|
66
|
+
Q[C] = c.index;
|
|
63
67
|
else {
|
|
64
|
-
console.error(`can not find the min distance ${
|
|
68
|
+
console.error(`can not find the min distance ${C}`);
|
|
65
69
|
continue;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
|
-
t !==
|
|
73
|
+
t !== d - 1 && (y[t * 6 + 0] = t * 2 + 0, y[t * 6 + 1] = t * 2 + 2, y[t * 6 + 2] = t * 2 + 1, y[t * 6 + 3] = t * 2 + 2, y[t * 6 + 4] = t * 2 + 3, y[t * 6 + 5] = t * 2 + 1);
|
|
70
74
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
75
|
+
const x = [];
|
|
76
|
+
let H;
|
|
77
|
+
const Z = [];
|
|
78
|
+
for (let t = 0; t < d - 1; t++) {
|
|
79
|
+
if (H !== void 0 && t <= H)
|
|
80
|
+
continue;
|
|
81
|
+
const n = t + 1, p = {
|
|
82
|
+
x: e[t * 6 + 0],
|
|
83
|
+
y: e[t * 6 + 2]
|
|
84
|
+
}, s = {
|
|
85
|
+
x: e[t * 6 + 3],
|
|
86
|
+
y: e[t * 6 + 5]
|
|
87
|
+
}, u = {
|
|
88
|
+
x: e[n * 6 + 0],
|
|
89
|
+
y: e[n * 6 + 2]
|
|
90
|
+
}, f = {
|
|
91
|
+
x: e[n * 6 + 3],
|
|
92
|
+
y: e[n * 6 + 5]
|
|
93
|
+
}, E = lt([p, s], [u, f]);
|
|
94
|
+
if (E && x.push(t), !E && x.length) {
|
|
95
|
+
x.push(t);
|
|
96
|
+
const a = new r.Vector2(p.x, p.y).distanceTo(new r.Vector2(u.x, u.y)), l = new r.Vector2(s.x, s.y).distanceTo(new r.Vector2(f.x, f.y)), w = [], _ = [], h = Math.max(0, x[0] - N * 200), C = x[0];
|
|
97
|
+
for (let c = h; c < C; c++)
|
|
98
|
+
a < l ? w.push({ x: e[c * 6 + 0], y: e[c * 6 + 2] }) : w.push({ x: e[c * 6 + 3], y: e[c * 6 + 5] });
|
|
99
|
+
const L = x.at(-1), g = x.at(-1) + N * 200;
|
|
100
|
+
for (let c = L; c < g; c++)
|
|
101
|
+
a < l ? _.push({ x: e[c * 6 + 0], y: e[c * 6 + 2] }) : _.push({ x: e[c * 6 + 3], y: e[c * 6 + 5] });
|
|
102
|
+
const U = ut(w, _);
|
|
103
|
+
if (U) {
|
|
104
|
+
const {
|
|
105
|
+
line1RelativeIndex: c,
|
|
106
|
+
line2RelativeIndex: M,
|
|
107
|
+
x: et,
|
|
108
|
+
y: nt
|
|
109
|
+
} = U, A = h + c, v = L + M + 2;
|
|
110
|
+
for (let o = A; o < v; o++)
|
|
111
|
+
a < l ? (e[o * 6 + 0] = et, e[o * 6 + 2] = nt) : (e[o * 6 + 3] = et, e[o * 6 + 5] = nt), H = o;
|
|
112
|
+
let V, Y, X, z, m;
|
|
113
|
+
a < l ? (V = e[h * 6 + 1], Y = e[A * 6 + 1], X = e[v * 6 + 1], z = e[g * 6 + 1], m = (Y + X) / 2) : (V = e[h * 6 + 4], Y = e[A * 6 + 4], X = e[v * 6 + 4], z = e[g * 6 + 4], m = (Y + X) / 2);
|
|
114
|
+
for (let o = h; o < A; o++) {
|
|
115
|
+
const $ = A - h, D = (o - h) / $;
|
|
116
|
+
a < l ? e[o * 6 + 1] = V + (m - V) * D : e[o * 6 + 4] = V + (m - V) * D;
|
|
117
|
+
}
|
|
118
|
+
for (let o = A; o < v; o++)
|
|
119
|
+
a < l ? e[o * 6 + 1] = m : e[o * 6 + 4] = m;
|
|
120
|
+
for (let o = v; o < g; o++) {
|
|
121
|
+
const $ = g - v, D = (o - v + 1) / $;
|
|
122
|
+
a < l ? e[o * 6 + 1] = m + (z - m) * D : e[o * 6 + 4] = m + (z - m) * D;
|
|
123
|
+
}
|
|
124
|
+
Z.push({
|
|
125
|
+
start: A,
|
|
126
|
+
end: v
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
x.length = 0;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const B = new Float32Array(j);
|
|
133
|
+
Z.forEach((t) => {
|
|
134
|
+
for (let n = 0; n < d - 1; n++)
|
|
135
|
+
n >= t.start && n <= t.end ? (B[n * 2 + 0] = 1, B[n * 2 + 1] = 1) : B[n] !== 1 && (B[n * 2 + 0] = 0, B[n * 2 + 1] = 0);
|
|
136
|
+
});
|
|
137
|
+
const S = new r.BufferGeometry();
|
|
138
|
+
return S.setAttribute("position", new r.BufferAttribute(e, 3)), S.setAttribute("uv", new r.BufferAttribute(T, 2)), S.setIndex(new r.BufferAttribute(y, 1)), { geometry: S, maxV: K, animationWillError: Z, curvePath: P, curvePoints: I, panoMap: Q, totalLength: R };
|
|
73
139
|
}
|
|
74
|
-
function
|
|
75
|
-
if (
|
|
76
|
-
const
|
|
77
|
-
return new
|
|
140
|
+
function dt(i) {
|
|
141
|
+
if (xt(i)) {
|
|
142
|
+
const O = [i.closed, i.curve_type, i.tension], N = i.points.map((F) => new r.Vector3().fromArray(F));
|
|
143
|
+
return new r.CatmullRomCurve3(N, ...O);
|
|
78
144
|
}
|
|
79
145
|
}
|
|
80
|
-
function
|
|
81
|
-
return
|
|
146
|
+
function xt(i) {
|
|
147
|
+
return i.type === "CatmullRomCurve3";
|
|
82
148
|
}
|
|
83
149
|
export {
|
|
84
|
-
|
|
150
|
+
Lt as createLineGeometry
|
|
85
151
|
};
|
package/libs/base/BasePlugin.js
CHANGED
package/libs/index.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { consoleVersion as o } from "./shared-utils/logger.js";
|
|
2
2
|
import { autoFixOffscreenCanvas as r } from "./shared-utils/offscreenCanvas.js";
|
|
3
|
-
import { PaintBrush as
|
|
4
|
-
import { PaintBrushTypeEnum as
|
|
5
|
-
import { ModelViewPlugin as
|
|
6
|
-
import { CSS3DRenderPlugin as
|
|
7
|
-
import { PanoCursorRaycasterPlugin as
|
|
8
|
-
import { ModelRoomLabelPlugin as
|
|
9
|
-
import { FLOOR_PLAN_ATTACHED_TO as
|
|
10
|
-
import { ModelFloorplanPlugin as
|
|
11
|
-
import { MapviewFloorplanPlugin as
|
|
12
|
-
import { TopviewFloorplanPlugin as
|
|
13
|
-
import { PanoFloorplanRadarPlugin as
|
|
14
|
-
import { FLOOR_TYPE_MAP as
|
|
15
|
-
import { ModelChassisCompassPlugin as
|
|
16
|
-
import { ModelEntryDoorGuidePlugin as
|
|
17
|
-
import { CameraMovementPlugin as
|
|
18
|
-
import { CameraMovementEffect as
|
|
19
|
-
import { PanoRulerPlugin as
|
|
20
|
-
import { PanoRulerProPlugin as
|
|
21
|
-
import { PanoCompassPlugin as
|
|
22
|
-
import { PanoMeasurePlugin as
|
|
23
|
-
import { PanoSpatialTagPlugin as
|
|
24
|
-
import { modelItemLabelPluginServerParams as
|
|
25
|
-
import { ModelTVVideoPlugin as
|
|
26
|
-
import { DIRECTION as
|
|
27
|
-
import { itemLabelPluginServerParams as
|
|
28
|
-
import { PanoDoorLabelPlugin as
|
|
29
|
-
import { GuideLinePlugin as
|
|
30
|
-
import { CruisePlugin as
|
|
31
|
-
import { PanoTagPlugin as
|
|
32
|
-
import { Object3DHelperPlugin as
|
|
33
|
-
import { PanoVideoPlugin as
|
|
34
|
-
import { PipelinePlugin as
|
|
35
|
-
import { AreaMakerPlugin as
|
|
36
|
-
import { CurrentPanoImagePlugin as
|
|
37
|
-
import { Sculpt as
|
|
38
|
-
import { ModelMakerPlugin as
|
|
39
|
-
import { index as
|
|
40
|
-
import { CSS3DRender as
|
|
41
|
-
import { Model as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { Polyline as
|
|
45
|
-
import { Magnifier as
|
|
46
|
-
import { DISPLAY_STRATEGY_TYPE as
|
|
47
|
-
import { ModelItemLabelPlugin as
|
|
48
|
-
import { ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE as
|
|
49
|
-
import { Plugin as
|
|
50
|
-
import { GuideLineItem$1 as
|
|
51
|
-
import { GuideLineModeItem$1 as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { typing as
|
|
55
|
-
import { default as
|
|
56
|
-
import { defaultGlobalConfig as
|
|
57
|
-
import { ContentType as
|
|
58
|
-
import { Object3DHelperController as
|
|
59
|
-
import { typings as
|
|
3
|
+
import { PaintBrush as ml } from "./components/PaintBrush/index.js";
|
|
4
|
+
import { PaintBrushTypeEnum as el } from "./components/PaintBrush/typings.js";
|
|
5
|
+
import { ModelViewPlugin as nl } from "./ModelViewPlugin/Plugin.js";
|
|
6
|
+
import { CSS3DRenderPlugin as Pl } from "./CSS3DRenderPlugin/index.js";
|
|
7
|
+
import { PanoCursorRaycasterPlugin as fl } from "./PanoCursorRaycasterPlugin/index.js";
|
|
8
|
+
import { ModelRoomLabelPlugin as gl, modelRoomLabelPluginServerParams as sl } from "./ModelRoomLabelPlugin/index.js";
|
|
9
|
+
import { FLOOR_PLAN_ATTACHED_TO as Ml } from "./floorplan/constant.js";
|
|
10
|
+
import { ModelFloorplanPlugin as Ll } from "./floorplan/ModelFloorplanPlugin/index.js";
|
|
11
|
+
import { MapviewFloorplanPlugin as _l } from "./floorplan/MapviewFloorplanPlugin/index.js";
|
|
12
|
+
import { TopviewFloorplanPlugin as Il } from "./floorplan/TopviewFloorplanPlugin/index.js";
|
|
13
|
+
import { PanoFloorplanRadarPlugin as Sl } from "./floorplan/PanoFloorplanRadarPlugin/index.js";
|
|
14
|
+
import { FLOOR_TYPE_MAP as yl, ROOM_FETILE_TYPE_MAP as Al, ROOM_TYPE_MAP as Dl } from "./floorplan/typings/floorplanServerData.js";
|
|
15
|
+
import { ModelChassisCompassPlugin as bl } from "./ModelChassisCompassPlugin/Plugin.js";
|
|
16
|
+
import { ModelEntryDoorGuidePlugin as Fl } from "./ModelEntryDoorGuidePlugin/Plugin.js";
|
|
17
|
+
import { CameraMovementPlugin as cl } from "./CameraMovementPlugin/CameraMovementPlugin.js";
|
|
18
|
+
import { CameraMovementEffect as Nl, Rotation as hl } from "./CameraMovementPlugin/typing.js";
|
|
19
|
+
import { PanoRulerPlugin as wl } from "./PanoRulerPlugin/Plugin.js";
|
|
20
|
+
import { PanoRulerProPlugin as Hl } from "./PanoRulerProPlugin/index.js";
|
|
21
|
+
import { PanoCompassPlugin as jl } from "./PanoCompassPlugin/index.js";
|
|
22
|
+
import { PanoMeasurePlugin as Wl } from "./PanoMeasurePlugin/index.js";
|
|
23
|
+
import { PanoSpatialTagPlugin as zl } from "./PanoSpatialTagPlugin/Plugin.js";
|
|
24
|
+
import { modelItemLabelPluginServerParams as Kl } from "./ModelItemLabelPlugin/index.js";
|
|
25
|
+
import { ModelTVVideoPlugin as Xl } from "./ModelTVVideoPlugin/Plugin.js";
|
|
26
|
+
import { DIRECTION as on } from "./ModelTVVideoPlugin/typings.js";
|
|
27
|
+
import { itemLabelPluginServerParams as tn } from "./ItemLabelPlugin/index.js";
|
|
28
|
+
import { PanoDoorLabelPlugin as pn } from "./PanoDoorLabelPlugin/index.js";
|
|
29
|
+
import { GuideLinePlugin as ln } from "./GuideLinePlugin/index.js";
|
|
30
|
+
import { CruisePlugin as an, MovePlugin as Pn } from "./CruisePlugin/index.js";
|
|
31
|
+
import { PanoTagPlugin as fn } from "./PanoTagPlugin/index.js";
|
|
32
|
+
import { Object3DHelperPlugin as gn } from "./Object3DHelperPlugin/index.js";
|
|
33
|
+
import { PanoVideoPlugin as dn } from "./PanoVideoPlugin/index.js";
|
|
34
|
+
import { PipelinePlugin as Tn } from "./PipelinePlugin/index.js";
|
|
35
|
+
import { AreaMakerPlugin as Cn } from "./AreaMakerPlugin/index.js";
|
|
36
|
+
import { CurrentPanoImagePlugin as En } from "./CurrentPanoImagePlugin/index.js";
|
|
37
|
+
import { Sculpt as Rn, SculptPlugin as Sn } from "./Sculpt/index.js";
|
|
38
|
+
import { ModelMakerPlugin as yn } from "./ModelMakerPlugin/index.js";
|
|
39
|
+
import { index as Dn } from "./shared-utils/index.js";
|
|
40
|
+
import { CSS3DRender as bn } from "./CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
41
|
+
import { Model as Fn } from "./PanoMeasurePlugin/Model/index.js";
|
|
42
|
+
import { default as cn } from "./PanoMeasurePlugin/Model/point.js";
|
|
43
|
+
import { default as Nn } from "./PanoMeasurePlugin/Model/line.js";
|
|
44
|
+
import { Polyline as kn } from "./PanoMeasurePlugin/Model/polyline.js";
|
|
45
|
+
import { Magnifier as Bn } from "./shared-utils/three/Magnifier.js";
|
|
46
|
+
import { DISPLAY_STRATEGY_TYPE as Un } from "./ModelItemLabelPlugin/typings.js";
|
|
47
|
+
import { ModelItemLabelPlugin as $n } from "./ModelItemLabelPlugin/ModelItemLabelPlugin.js";
|
|
48
|
+
import { ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE as qn } from "./ItemLabelPlugin/typings.js";
|
|
49
|
+
import { Plugin as Jn } from "./ItemLabelPlugin/Plugin.js";
|
|
50
|
+
import { GuideLineItem$1 as Qn } from "./GuideLinePlugin/GuideLineItem/index.js";
|
|
51
|
+
import { GuideLineModeItem$1 as Zn } from "./GuideLinePlugin/GuideLineModeItem/index.js";
|
|
52
|
+
import { default as ra, default as ta } from "./CruisePlugin/Work.js";
|
|
53
|
+
import { default as ma } from "./CruisePlugin/Move.js";
|
|
54
|
+
import { typing as ea } from "./CruisePlugin/typing/index.js";
|
|
55
|
+
import { default as na, pluginFlag as aa } from "./PanoTagPlugin/controller/index.js";
|
|
56
|
+
import { defaultGlobalConfig as ua } from "./PanoTagPlugin/typings/tag/TagConfig.js";
|
|
57
|
+
import { ContentType as xa, DimensionType as ga, PointType as sa } from "./PanoTagPlugin/Archive/deprecated.js";
|
|
58
|
+
import { Object3DHelperController as Ma, PLUGIN as Ta } from "./Object3DHelperPlugin/Controller.js";
|
|
59
|
+
import { typings as Ca } from "./PanoVideoPlugin/typings/index.js";
|
|
60
60
|
import "./components/PaintBrush/Controller.js";
|
|
61
61
|
import "./components/PaintBrush/utils.js";
|
|
62
62
|
import "./components/PaintBrush/tween.js";
|
|
@@ -265,6 +265,7 @@ import "./vendor/gl-vec2/set.js";
|
|
|
265
265
|
import "./vendor/gl-vec2/normalize.js";
|
|
266
266
|
import "./vendor/gl-vec2/subtract.js";
|
|
267
267
|
import "./vendor/gl-vec2/dot.js";
|
|
268
|
+
import "./shared-utils/math/intersecting.js";
|
|
268
269
|
import "./shared-utils/five/mode.js";
|
|
269
270
|
import "./PanoTagPlugin/utils/addDebugPoints.js";
|
|
270
271
|
import "./PanoTagPlugin/utils/tag/tagCheck.js";
|
|
@@ -488,72 +489,72 @@ import "./shared-utils/three/getIntersect.js";
|
|
|
488
489
|
r();
|
|
489
490
|
o();
|
|
490
491
|
export {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
492
|
+
Cn as AreaMakerPlugin,
|
|
493
|
+
bn as CSS3DRender,
|
|
494
|
+
Pl as CSS3DRenderPlugin,
|
|
495
|
+
Nl as CameraMovementEffect,
|
|
496
|
+
cl as CameraMovementPlugin,
|
|
497
|
+
xa as ContentType,
|
|
498
|
+
an as CruisePlugin,
|
|
499
|
+
ra as CruisePluginController,
|
|
500
|
+
ea as CruisePluginTypes,
|
|
501
|
+
En as CurrentPanoImagePlugin,
|
|
502
|
+
on as DIRECTION,
|
|
503
|
+
Un as DISPLAY_STRATEGY_TYPE,
|
|
504
|
+
ga as DimensionType,
|
|
505
|
+
Ml as FLOOR_PLAN_ATTACHED_TO,
|
|
506
|
+
yl as FLOOR_TYPE_MAP,
|
|
507
|
+
Qn as GuideLineItem,
|
|
508
|
+
Zn as GuideLineModeItem,
|
|
509
|
+
ln as GuideLinePlugin,
|
|
510
|
+
qn as ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE,
|
|
511
|
+
Jn as ItemLabelPlugin,
|
|
512
|
+
Bn as Magnifier,
|
|
513
|
+
_l as MapviewFloorplanPlugin,
|
|
514
|
+
bl as ModelChassisCompassPlugin,
|
|
515
|
+
Fl as ModelEntryDoorGuidePlugin,
|
|
516
|
+
Ll as ModelFloorplanPlugin,
|
|
517
|
+
$n as ModelItemLabelPlugin,
|
|
518
|
+
yn as ModelMakerPlugin,
|
|
519
|
+
gl as ModelRoomLabelPlugin,
|
|
520
|
+
Xl as ModelTVVideoPlugin,
|
|
521
|
+
nl as ModelViewPlugin,
|
|
522
|
+
ma as MoveController,
|
|
523
|
+
Pn as MovePlugin,
|
|
524
|
+
Ma as Object3DHelperController,
|
|
525
|
+
gn as Object3DHelperPlugin,
|
|
526
|
+
Ta as PLUGIN,
|
|
527
|
+
ml as PaintBrush,
|
|
528
|
+
el as PaintBrushTypeEnum,
|
|
529
|
+
jl as PanoCompassPlugin,
|
|
530
|
+
fl as PanoCursorRaycasterPlugin,
|
|
531
|
+
pn as PanoDoorLabelPlugin,
|
|
532
|
+
Sl as PanoFloorplanRadarPlugin,
|
|
533
|
+
Wl as PanoMeasurePlugin,
|
|
534
|
+
Nn as PanoMeasurePluginLine,
|
|
535
|
+
Fn as PanoMeasurePluginModel,
|
|
536
|
+
cn as PanoMeasurePluginPoint,
|
|
537
|
+
kn as PanoMeasurePluginPolyline,
|
|
538
|
+
wl as PanoRulerPlugin,
|
|
539
|
+
Hl as PanoRulerProPlugin,
|
|
540
|
+
zl as PanoSpatialTagPlugin,
|
|
541
|
+
fn as PanoTagPlugin,
|
|
542
|
+
na as PanoTagPluginController,
|
|
543
|
+
dn as PanoVideoPlugin,
|
|
544
|
+
Ca as PanoVideoPluginType,
|
|
545
|
+
Tn as PipelinePlugin,
|
|
546
|
+
sa as PointType,
|
|
547
|
+
Al as ROOM_FETILE_TYPE_MAP,
|
|
548
|
+
Dl as ROOM_TYPE_MAP,
|
|
549
|
+
hl as Rotation,
|
|
550
|
+
Rn as Sculpt,
|
|
551
|
+
Sn as SculptPlugin,
|
|
552
|
+
Il as TopviewFloorplanPlugin,
|
|
553
|
+
Dn as Util,
|
|
554
|
+
ta as WalkController,
|
|
555
|
+
ua as defaultGlobalConfig,
|
|
556
|
+
tn as itemLabelPluginServerParams,
|
|
557
|
+
Kl as modelItemLabelPluginServerParams,
|
|
558
|
+
sl as modelRoomLabelPluginServerParams,
|
|
559
|
+
aa as pluginFlag
|
|
559
560
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.41.0",
|
|
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",
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/dnalogel",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.41.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",
|
|
28
28
|
"postpublish": "cnpm sync @realsee/dnalogel"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|