@realsee/dnalogel 3.47.9 → 3.47.11
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 +6 -0
- package/dist/Sculpt/Meshes/Line.d.ts +1 -0
- package/dist/Sculpt/Meshes/Polyline.d.ts +1 -0
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +1 -0
- package/dist/index.cjs.js +57 -57
- package/dist/index.js +3236 -3222
- package/dist/index.umd.js +50 -50
- package/libs/AreaMakerPlugin/Controller.js +14 -13
- package/libs/AreaMakerPlugin/index.js +15 -14
- package/libs/AreaMakerPlugin/utils/Item.js +15 -14
- package/libs/CSS3DRenderPlugin/Controller.js +12 -11
- package/libs/CSS3DRenderPlugin/index.js +18 -17
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +12 -11
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +26 -25
- package/libs/CruisePlugin/BaseController.js +17 -16
- package/libs/CruisePlugin/Move.js +20 -19
- package/libs/CruisePlugin/Work.js +15 -14
- package/libs/CruisePlugin/index.js +19 -18
- package/libs/CurrentPanoImagePlugin/Controller.js +14 -13
- package/libs/CurrentPanoImagePlugin/index.js +16 -15
- package/libs/GuideLinePlugin/Controller.js +17 -16
- package/libs/GuideLinePlugin/GuideLineItem.js +15 -14
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +5 -3
- package/libs/GuideLinePlugin/GuideLineModeItem.js +15 -14
- package/libs/GuideLinePlugin/index.js +19 -18
- package/libs/ModelMakerPlugin/Controller.js +13 -12
- package/libs/ModelMakerPlugin/index.js +15 -14
- package/libs/ModelTVVideoPlugin/Plugin.js +37 -36
- package/libs/ModelTVVideoPlugin/index.js +13 -12
- package/libs/Object3DHelperPlugin/Controller.js +14 -13
- package/libs/Object3DHelperPlugin/index.js +18 -17
- package/libs/PanoCompassPlugin/Controller.js +15 -14
- package/libs/PanoCompassPlugin/index.js +16 -15
- package/libs/PanoDoorLabelPlugin/BaseController.js +15 -14
- package/libs/PanoDoorLabelPlugin/Controller.js +15 -14
- package/libs/PanoDoorLabelPlugin/index.js +16 -15
- package/libs/PanoMeasurePlugin/Components/Controller0.js +12 -11
- package/libs/PanoMeasurePlugin/Components/Controller1.js +12 -11
- package/libs/PanoMeasurePlugin/Controller/EditController.js +12 -11
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +13 -12
- package/libs/PanoMeasurePlugin/Controller/index.js +10 -9
- package/libs/PanoMeasurePlugin/Model/area.js +12 -11
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +12 -11
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +12 -11
- package/libs/PanoMeasurePlugin/index.js +21 -20
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +12 -11
- package/libs/PanoSpatialTagPlugin/Plugin.js +14 -13
- package/libs/PanoSpatialTagPlugin/index.js +11 -10
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +14 -13
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +13 -12
- package/libs/PanoTagPlugin/Components/Tag/index.js +13 -12
- package/libs/PanoTagPlugin/Components/TagContainer.js +13 -12
- package/libs/PanoTagPlugin/Components/TagItem.js +13 -12
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +34 -33
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +13 -12
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +13 -12
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +15 -14
- package/libs/PanoTagPlugin/controller/TagRender.js +12 -11
- package/libs/PanoTagPlugin/controller/TagUtil.js +13 -12
- package/libs/PanoTagPlugin/controller/index.js +22 -16
- package/libs/PanoTagPlugin/index.js +21 -20
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +14 -13
- package/libs/PanoVideoPlugin/Controller.js +15 -14
- package/libs/PanoVideoPlugin/VideoMeshController.js +30 -29
- package/libs/PanoVideoPlugin/index.js +18 -17
- package/libs/PipelinePlugin/Controller.js +14 -13
- package/libs/PipelinePlugin/index.js +16 -15
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +21 -20
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +15 -14
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +13 -12
- package/libs/Sculpt/Meshes/Box.js +11 -9
- package/libs/Sculpt/Meshes/Cylinder.js +17 -15
- package/libs/Sculpt/Meshes/Line.d.ts +1 -0
- package/libs/Sculpt/Meshes/Line.js +84 -78
- package/libs/Sculpt/Meshes/Point.js +14 -12
- package/libs/Sculpt/Meshes/Polyline.d.ts +1 -0
- package/libs/Sculpt/Meshes/Polyline.js +69 -74
- package/libs/Sculpt/Meshes/Rectangle.js +6 -4
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +1 -0
- package/libs/Sculpt/Objects/Base/index.js +5 -5
- package/libs/Sculpt/Objects/Line/Editor.js +17 -15
- package/libs/Sculpt/Objects/Polygon/index.js +22 -22
- package/libs/Sculpt/Objects/Rectangle/Editor.js +2 -2
- package/libs/Sculpt/Objects/Rectangle/index.js +79 -69
- package/libs/Sculpt/index.js +15 -14
- package/libs/Sculpt/utils/three/ColoredMesh.js +6 -4
- package/libs/base/BasePlugin.js +16 -14
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +13 -12
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +16 -15
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +13 -12
- package/libs/floorplan/ModelFloorplanPlugin/index.js +16 -15
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +15 -14
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +16 -15
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +13 -12
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +16 -15
- package/libs/floorplan/index.js +3 -1
- package/libs/index.js +12 -12
- package/libs/shared-utils/five/index.js +5 -3
- package/libs/shared-utils/five/lookObject.js +20 -18
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.js +4 -1
- package/libs/shared-utils/three/applyObjectMatrixWorld.js +4 -6
- package/libs/shared-utils/three/index.js +3 -1
- package/package.json +1 -1
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
2
|
var d = (s, e, t) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var o = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { BaseEditor as p } from "../Base/Editor.js";
|
|
5
|
-
import { Sculpt as
|
|
5
|
+
import { Sculpt as n } from "../../index.js";
|
|
6
6
|
import { PointMesh as a } from "../../Meshes/Point.js";
|
|
7
7
|
import { getIntersectByRaycaster as h } from "../../../shared-utils/five/getPosition.js";
|
|
8
8
|
import "three";
|
|
9
9
|
import "hammerjs";
|
|
10
10
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
11
|
-
import "
|
|
11
|
+
import "@realsee/five/line";
|
|
12
|
+
import "../../../shared-utils/tag.js";
|
|
13
|
+
import "../../utils/Modules/Global.js";
|
|
12
14
|
import "../../../shared-utils/three/THREESphere.js";
|
|
13
15
|
import "animejs";
|
|
14
|
-
import { notNil as
|
|
16
|
+
import { notNil as m } from "../../../shared-utils/isNil.js";
|
|
15
17
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
16
|
-
class
|
|
18
|
+
class l extends p {
|
|
17
19
|
constructor(t) {
|
|
18
20
|
super(t);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
o(this, "draggingPoints", []);
|
|
22
|
+
o(this, "onDragstart", (t) => {
|
|
21
23
|
const i = t.target;
|
|
22
24
|
this.draggingPoints = this.pointMeshes.filter((r) => r.position.equals(i.position));
|
|
23
25
|
});
|
|
24
|
-
|
|
26
|
+
o(this, "onDragend", (t) => {
|
|
25
27
|
this.draggingPoints = [];
|
|
26
28
|
});
|
|
27
29
|
}
|
|
@@ -32,22 +34,22 @@ class m extends p {
|
|
|
32
34
|
return this.children;
|
|
33
35
|
}
|
|
34
36
|
enable() {
|
|
35
|
-
super.enable(), this.points.filter(
|
|
37
|
+
super.enable(), this.points.filter(m).forEach((t) => {
|
|
36
38
|
const i = new a();
|
|
37
|
-
i.visible = !1, i.position.copy(t), i.draggable = !0,
|
|
39
|
+
i.visible = !1, i.position.copy(t), i.draggable = !0, n.modules.fiveDomEvents.addEventListener(i, "drag", this.onDrag), n.modules.fiveDomEvents.addEventListener(i, "dragstart", this.onDragstart), n.modules.fiveDomEvents.addEventListener(i, "dragend", this.onDragend), this.add(i);
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
disable() {
|
|
41
43
|
super.disable(), this.removeChildren();
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
|
-
class
|
|
46
|
+
class q extends l {
|
|
45
47
|
constructor(t) {
|
|
46
48
|
super(t);
|
|
47
|
-
|
|
49
|
+
o(this, "onDrag", (t) => {
|
|
48
50
|
if (!this.draggingPoints || this.draggingPoints.length === 0)
|
|
49
51
|
return;
|
|
50
|
-
const i = h(
|
|
52
|
+
const i = h(n.modules.five, t.raycaster);
|
|
51
53
|
this.draggingPoints.forEach((r) => r.position.copy(i.point)), this.originObject.lineMesh.setPoints(this.pointMeshes.map((r) => r.position));
|
|
52
54
|
});
|
|
53
55
|
}
|
|
@@ -56,6 +58,6 @@ class B extends m {
|
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
q as LineEditor,
|
|
62
|
+
l as LineEditorAbstract
|
|
61
63
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
var F = Object.defineProperty, L = Object.defineProperties;
|
|
2
2
|
var N = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var j = Object.getOwnPropertySymbols;
|
|
4
4
|
var O = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var w = (s, e, t) => e in s ? F(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, c = (s, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
O.call(e, t) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
U.call(e, t) &&
|
|
7
|
+
O.call(e, t) && w(s, t, e[t]);
|
|
8
|
+
if (j)
|
|
9
|
+
for (var t of j(e))
|
|
10
|
+
U.call(e, t) && w(s, t, e[t]);
|
|
11
11
|
return s;
|
|
12
12
|
}, y = (s, e) => L(s, N(e));
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var M = (s, e, t) => (w(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
|
+
var T = (s, e, t) => new Promise((f, d) => {
|
|
15
15
|
var n = (l) => {
|
|
16
16
|
try {
|
|
17
17
|
a(t.next(l));
|
|
@@ -38,14 +38,14 @@ const D = new m.Vector3();
|
|
|
38
38
|
class X extends z {
|
|
39
39
|
constructor(t, f) {
|
|
40
40
|
super(t, f);
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
M(this, "type", "Polygon");
|
|
42
|
+
M(this, "areaMesh");
|
|
43
43
|
this.editor = new B(this), t && (this.areaMesh = new V(c(c({}, t.style), t)), this.add(this.areaMesh)), k("esc", () => {
|
|
44
44
|
this.stopCreating();
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
get data() {
|
|
48
|
-
return y(c({}, this.baseData), {
|
|
48
|
+
return this.updateMatrixWorld(), y(c({}, this.baseData), {
|
|
49
49
|
points: H(this.applyObjectMatrixWorld(this.areaMesh.points)),
|
|
50
50
|
style: {
|
|
51
51
|
color: this.areaMesh.color.getHex(),
|
|
@@ -63,7 +63,7 @@ class X extends z {
|
|
|
63
63
|
(t = this.areaMesh) == null || t.unhighlight();
|
|
64
64
|
}
|
|
65
65
|
create(t) {
|
|
66
|
-
return
|
|
66
|
+
return T(this, null, function* () {
|
|
67
67
|
this.children.forEach((d) => {
|
|
68
68
|
d.parent === this && this.remove(d);
|
|
69
69
|
}), this.children.length = 0;
|
|
@@ -74,37 +74,37 @@ class X extends z {
|
|
|
74
74
|
}
|
|
75
75
|
function I(s, e, t) {
|
|
76
76
|
return new Promise((f, d) => {
|
|
77
|
-
var
|
|
77
|
+
var C;
|
|
78
78
|
const n = s.parent;
|
|
79
79
|
if (!n) {
|
|
80
80
|
d(new Error("No container"));
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
const P = (
|
|
83
|
+
const P = (C = t == null ? void 0 : t.limit) != null ? C : "none", a = new A(s.style);
|
|
84
84
|
n == null || n.add(a);
|
|
85
85
|
const l = new A(y(c({}, s.style), { dashed: !0, lengthEnable: !1 }));
|
|
86
86
|
n == null || n.add(l), e.enable();
|
|
87
87
|
const o = [];
|
|
88
|
-
let i, r,
|
|
89
|
-
const
|
|
88
|
+
let i, r, u = !1;
|
|
89
|
+
const v = (h) => {
|
|
90
90
|
const p = o.length === 0 ? h.point : i.clone();
|
|
91
|
-
o.push(p), s.setPoints(o, { closed: !1 }),
|
|
91
|
+
o.push(p), s.setPoints(o, { closed: !1 }), u && (E(), f());
|
|
92
92
|
}, b = (h) => {
|
|
93
93
|
if (!(o != null && o.length) || !h)
|
|
94
94
|
return;
|
|
95
95
|
const p = o.at(-1).clone();
|
|
96
96
|
if (o.length < 3 && (P === "none" ? (i = h.point, a.setPoints([p, i])) : P === "xoz" ? (r = r != null ? r : new m.Plane().setFromNormalAndCoplanarPoint(new m.Vector3(0, 1, 0), o[0]), e.plane = r, i = r.projectPoint(h.point, D), a.setPoints([p, i]), l.setPoints([i, h.point])) : P === "y" && (o.length === 1 ? (i = h.point, a.setPoints([p, i])) : (r = r != null ? r : new m.Plane().setFromCoplanarPoints(o[0], o[1], new m.Vector3(0, 1, 0).add(o[0])), e.plane = r, i = r.projectPoint(h.point, D), a.setPoints([p, i]), l.setPoints([i, h.point])))), o.length >= 3) {
|
|
97
97
|
i = s.projectPoint(h.point);
|
|
98
|
-
const g = o[0],
|
|
99
|
-
g.distanceTo(i) <
|
|
98
|
+
const g = o[0], W = 0.2;
|
|
99
|
+
g.distanceTo(i) < W || g.distanceTo(h.point) < W ? (i = g, h.point.copy(g), e.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 }), u = !0) : u = !1, a.setPoints([p, i]), l.setPoints([i, h.point]);
|
|
100
100
|
}
|
|
101
101
|
o.length >= 2 && s.setPoints([...o, i], { closed: !1 });
|
|
102
102
|
}, E = () => {
|
|
103
|
-
e.off("select",
|
|
104
|
-
},
|
|
103
|
+
e.off("select", v), e.off("intersectionUpdate", b), e.off("disable", x), e.plane = null, e.disable(), n == null || n.remove(a, l);
|
|
104
|
+
}, x = () => {
|
|
105
105
|
E(), n == null || n.remove(s, l, a), d(new Error("Cancelled"));
|
|
106
106
|
};
|
|
107
|
-
e.on("select",
|
|
107
|
+
e.on("select", v), e.on("intersectionUpdate", b), e.on("disable", x);
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
export {
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var U = Object.defineProperty, k = Object.defineProperties;
|
|
2
|
+
var B = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var A = Object.getOwnPropertySymbols;
|
|
4
|
+
var I = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var E = (s, t, e) => t in s ? U(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, d = (s, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
7
|
+
I.call(t, e) && E(s, e, t[e]);
|
|
8
|
+
if (A)
|
|
9
|
+
for (var e of A(t))
|
|
10
|
+
_.call(t, e) && E(s, e, t[e]);
|
|
11
11
|
return s;
|
|
12
|
-
}, u = (s, t) =>
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
}, u = (s, t) => k(s, B(t));
|
|
13
|
+
var L = (s, t, e) => (E(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var D = (s, t, e) => new Promise((c, w) => {
|
|
15
|
+
var a = (o) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
g(e.next(o));
|
|
18
|
+
} catch (h) {
|
|
19
|
+
w(h);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, m = (o) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
g(e.throw(o));
|
|
24
|
+
} catch (h) {
|
|
25
|
+
w(h);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, g = (o) => o.done ? c(o.value) : Promise.resolve(o.value).then(a, m);
|
|
28
|
+
g((e = e.apply(s, t)).next());
|
|
29
29
|
});
|
|
30
|
-
import { hotkeys as
|
|
31
|
-
import { BaseObject as
|
|
32
|
-
import * as
|
|
33
|
-
import { PolylineWithDotsMesh as
|
|
34
|
-
import { RectangleEditor as
|
|
35
|
-
import { RectangleWithEdgeMesh as
|
|
36
|
-
const
|
|
37
|
-
class S extends
|
|
38
|
-
constructor(e,
|
|
39
|
-
super(e,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
this.config.canEdit && (this.editor = new
|
|
30
|
+
import { hotkeys as j } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
|
+
import { BaseObject as q } from "../Base/index.js";
|
|
32
|
+
import * as r from "three";
|
|
33
|
+
import { PolylineWithDotsMesh as M } from "../../Meshes/Polyline.js";
|
|
34
|
+
import { RectangleEditor as G } from "./Editor.js";
|
|
35
|
+
import { RectangleWithEdgeMesh as H } from "../../Meshes/RectangleWithEdge.js";
|
|
36
|
+
const P = new r.Vector3();
|
|
37
|
+
class S extends q {
|
|
38
|
+
constructor(e, c) {
|
|
39
|
+
super(e, c);
|
|
40
|
+
L(this, "type", "Rectangle");
|
|
41
|
+
L(this, "rectangleMesh");
|
|
42
|
+
this.config.canEdit && (this.editor = new G(this)), e && (this.rectangleMesh = new H(d(d({}, e.style), e)), this.add(this.rectangleMesh)), j("esc", () => {
|
|
43
43
|
this.stopCreating();
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -62,51 +62,61 @@ class S extends j {
|
|
|
62
62
|
(e = this.rectangleMesh) == null || e.unhighlight();
|
|
63
63
|
}
|
|
64
64
|
create(e) {
|
|
65
|
-
return
|
|
65
|
+
return D(this, null, function* () {
|
|
66
66
|
this.removeChildren();
|
|
67
|
-
const
|
|
68
|
-
this.rectangleMesh =
|
|
67
|
+
const c = new H(e);
|
|
68
|
+
this.rectangleMesh = c, this.add(this.rectangleMesh), yield J(this.rectangleMesh, this.pointSelector, e);
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
function J(s, t, e) {
|
|
73
|
-
return new Promise((
|
|
74
|
-
var
|
|
75
|
-
const
|
|
76
|
-
if (!
|
|
77
|
-
return
|
|
78
|
-
const
|
|
79
|
-
|
|
73
|
+
return new Promise((c, w) => {
|
|
74
|
+
var N, T;
|
|
75
|
+
const a = s.parent;
|
|
76
|
+
if (!a)
|
|
77
|
+
return w(new Error("No container"));
|
|
78
|
+
const m = (N = e == null ? void 0 : e.limit) != null ? N : "none", g = (T = e == null ? void 0 : e.drawMethod) != null ? T : "diagonal", o = new M(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), h = new M(u(d({}, s.style), { dashed: !0, lengthEnable: !1 })), y = new M(u(d({}, s.style), { dashed: !1, lengthEnable: !1 }));
|
|
79
|
+
a.add(o, y, h), t.enable();
|
|
80
80
|
const n = [];
|
|
81
|
-
let
|
|
82
|
-
const
|
|
83
|
-
n.push(
|
|
84
|
-
}, x = (
|
|
85
|
-
var
|
|
86
|
-
if (!(
|
|
81
|
+
let i = new r.Vector3(), v = new r.Vector3();
|
|
82
|
+
const f = new r.Plane(), C = () => {
|
|
83
|
+
n.push(i.clone()), n.length === 1 ? (m === "xoz" && f.setFromNormalAndCoplanarPoint(new r.Vector3(0, 1, 0), n[0]), m === "none" && f.setFromNormalAndCoplanarPoint(v, n[0])) : n.length === 2 ? m === "y" ? (b(), c()) : y.setPoints([n[0], n[1]]) : n.length === 3 && (b(), c());
|
|
84
|
+
}, x = (l) => {
|
|
85
|
+
var W;
|
|
86
|
+
if (!(l != null && l.raycaster))
|
|
87
87
|
return;
|
|
88
|
-
const
|
|
89
|
-
if (n.length === 0)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
88
|
+
const O = (W = n.at(-1)) == null ? void 0 : W.clone();
|
|
89
|
+
if (n.length === 0) {
|
|
90
|
+
i = l.point.clone(), v = l.face.normal;
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (n.length === 1 && m === "y") {
|
|
94
|
+
const p = new r.Line3(new r.Vector3(0, 1, 0).add(n[0]), new r.Vector3(0, -1, 0).add(n[0])).closestPointToPoint(l.point, !1, P);
|
|
95
|
+
s.setPoints([n[0], p, l.point]);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (n.length === 1) {
|
|
99
|
+
f ? (i = l.raycaster.ray.intersectPlane(f, P), h.setPoints([i, l.point])) : i = l.point.clone(), o.setPoints([O, i]);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (n.length === 2) {
|
|
103
|
+
a.remove(o);
|
|
104
|
+
const z = l.raycaster.ray.intersectPlane(f, P);
|
|
105
|
+
if (g === "diagonal") {
|
|
106
|
+
const p = n[0].distanceTo(n[1]) / 2, V = new r.Vector3().lerpVectors(n[0], n[1], 0.5), F = new r.Vector3().subVectors(z, V).normalize();
|
|
107
|
+
i = new r.Vector3().addVectors(V, F.multiplyScalar(p)), s.setPoints([n[0], i, n[1]]);
|
|
108
|
+
} else if (g === "vertex") {
|
|
109
|
+
const p = P.crossVectors(n[0].clone().sub(n[1]), f.normal).normalize();
|
|
110
|
+
i = new r.Line3(n[1].clone().add(p), n[1].clone().sub(p)).closestPointToPoint(l.point, !1, P), s.setPoints([n[0], n[1], i]);
|
|
101
111
|
}
|
|
102
|
-
|
|
112
|
+
return;
|
|
103
113
|
}
|
|
114
|
+
}, b = () => {
|
|
115
|
+
t.off("select", C), t.off("intersectionUpdate", x), t.off("disable", R), t.disable(), a == null || a.remove(o, y, h);
|
|
104
116
|
}, R = () => {
|
|
105
|
-
|
|
106
|
-
}, N = () => {
|
|
107
|
-
R(), r == null || r.remove(s), f(new Error("Cancelled"));
|
|
117
|
+
b(), a == null || a.remove(s), w(new Error("Cancelled"));
|
|
108
118
|
};
|
|
109
|
-
t.on("select", C), t.on("intersectionUpdate", x), t.on("disable",
|
|
119
|
+
t.on("select", C), t.on("intersectionUpdate", x), t.on("disable", R);
|
|
110
120
|
});
|
|
111
121
|
}
|
|
112
122
|
export {
|
package/libs/Sculpt/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var d = (m, i, e) => i in m ? _(m, i, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
O.call(i, e) && d(m, e, i[e]);
|
|
11
11
|
return m;
|
|
12
12
|
}, w = (m, i) => x(m, E(i));
|
|
13
|
-
var
|
|
13
|
+
var a = (m, i, e) => (d(m, typeof i != "symbol" ? i + "" : i, e), e);
|
|
14
14
|
var c = (m, i, e) => new Promise((t, o) => {
|
|
15
15
|
var l = (u) => {
|
|
16
16
|
try {
|
|
@@ -33,7 +33,8 @@ import { IObject3D as U } from "../shared-utils/three/IObject3D.js";
|
|
|
33
33
|
import "three";
|
|
34
34
|
import "hammerjs";
|
|
35
35
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
36
|
-
import "
|
|
36
|
+
import "@realsee/five/line";
|
|
37
|
+
import "../shared-utils/tag.js";
|
|
37
38
|
import "../shared-utils/three/THREESphere.js";
|
|
38
39
|
import "animejs";
|
|
39
40
|
import { notNil as H } from "../shared-utils/isNil.js";
|
|
@@ -49,17 +50,17 @@ import { Cylinder as D } from "./Objects/Cylinder/index.js";
|
|
|
49
50
|
import { Box as j } from "./Objects/Box/index.js";
|
|
50
51
|
import { forReverseEach as k } from "../shared-utils/forReverseEach.js";
|
|
51
52
|
import { Line as B } from "./Objects/Line/index.js";
|
|
52
|
-
const
|
|
53
|
+
const p = class extends S {
|
|
53
54
|
constructor(e, t) {
|
|
54
55
|
super();
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.five = e, this.theme = t, this.group = new U(), this.group.name = "Sculpt", e.scene.add(this.group),
|
|
56
|
+
a(this, "group");
|
|
57
|
+
a(this, "five");
|
|
58
|
+
a(this, "theme");
|
|
59
|
+
this.five = e, this.theme = t, this.group = new U(), this.group.name = "Sculpt", e.scene.add(this.group), p.modules.init(e), p.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: o }) => {
|
|
59
60
|
var s;
|
|
60
61
|
const l = M((s = o == null ? void 0 : o[0]) == null ? void 0 : s.object, (n) => n.isSculptObject);
|
|
61
62
|
return l ? this.emit("click", l) : !1;
|
|
62
|
-
}), window.__SCLUPT_DEBUG__ = this, window.__SCLUPT_MODULES_DEBUG__ =
|
|
63
|
+
}), window.__SCLUPT_DEBUG__ = this, window.__SCLUPT_MODULES_DEBUG__ = p.modules;
|
|
63
64
|
}
|
|
64
65
|
get data() {
|
|
65
66
|
return {
|
|
@@ -102,7 +103,7 @@ const a = class extends S {
|
|
|
102
103
|
putObject(e) {
|
|
103
104
|
var l;
|
|
104
105
|
this.group.add(e);
|
|
105
|
-
const t =
|
|
106
|
+
const t = p.modules.object3DHelper, o = t.addObject3DHelper(e);
|
|
106
107
|
return (l = o == null ? void 0 : o.moveController) == null || l.moveByMouse(), t;
|
|
107
108
|
}
|
|
108
109
|
/**
|
|
@@ -211,10 +212,10 @@ const a = class extends S {
|
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
214
|
};
|
|
214
|
-
let
|
|
215
|
-
h
|
|
216
|
-
const
|
|
215
|
+
let h = p;
|
|
216
|
+
a(h, "modules", R);
|
|
217
|
+
const le = (m) => new h(m);
|
|
217
218
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
h as Sculpt,
|
|
220
|
+
le as SculptPlugin
|
|
220
221
|
};
|
|
@@ -12,15 +12,17 @@ var u = (i, e, t) => e in i ? g(i, e, { enumerable: !0, configurable: !0, writab
|
|
|
12
12
|
var n = (i, e, t) => (u(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
13
|
import * as s from "three";
|
|
14
14
|
import { DEFAULT_COLOR as F } from "../../typings/style.js";
|
|
15
|
-
import { IObject3D as
|
|
15
|
+
import { IObject3D as p } from "../../../shared-utils/three/IObject3D.js";
|
|
16
16
|
import "hammerjs";
|
|
17
17
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
18
|
-
import "
|
|
18
|
+
import "@realsee/five/line";
|
|
19
|
+
import "../../../shared-utils/tag.js";
|
|
20
|
+
import "../Modules/Global.js";
|
|
19
21
|
import "../../../shared-utils/three/THREESphere.js";
|
|
20
22
|
import "animejs";
|
|
21
23
|
import { notNil as y } from "../../../shared-utils/isNil.js";
|
|
22
24
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
23
|
-
class
|
|
25
|
+
class x extends p {
|
|
24
26
|
constructor(t) {
|
|
25
27
|
var h, m;
|
|
26
28
|
super();
|
|
@@ -82,5 +84,5 @@ class R extends B {
|
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
export {
|
|
85
|
-
|
|
87
|
+
x as ColoredMesh
|
|
86
88
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
var o = Object.defineProperty;
|
|
2
|
-
var s = (
|
|
3
|
-
var
|
|
2
|
+
var s = (e, t, r) => t in e ? o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var i = (e, t, r) => (s(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
4
|
import { Subscribe as l } from "../shared-utils/Subscribe.js";
|
|
5
5
|
import "three";
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
8
|
-
import "
|
|
8
|
+
import "@realsee/five/line";
|
|
9
|
+
import "../shared-utils/tag.js";
|
|
10
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
9
11
|
import "../shared-utils/three/THREESphere.js";
|
|
10
12
|
import "animejs";
|
|
11
13
|
import { FiveUtil as a } from "../shared-utils/Utils/FiveUtil.js";
|
|
12
|
-
import { absoluteUrl as
|
|
14
|
+
import { absoluteUrl as m } from "../shared-utils/url/absoluteUrl.js";
|
|
13
15
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
14
|
-
let
|
|
16
|
+
let P = class {
|
|
15
17
|
constructor(t, r) {
|
|
16
18
|
/**
|
|
17
19
|
* @realsee/dnalogel 版本号
|
|
18
20
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
i(this, "VERSION", "3.47.11");
|
|
22
|
+
i(this, "NAME");
|
|
23
|
+
i(this, "five");
|
|
24
|
+
i(this, "workUtil");
|
|
25
|
+
i(this, "fiveUtil");
|
|
24
26
|
/**
|
|
25
27
|
* @description: 插件事件钩子
|
|
26
28
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
i(this, "hooks", new l());
|
|
30
|
+
i(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
|
|
29
31
|
this.updateFive(t), r != null && r.staticPrefix && (this.staticPrefix = r.staticPrefix);
|
|
30
32
|
}
|
|
31
33
|
set workCode(t) {
|
|
@@ -47,11 +49,11 @@ let c = class {
|
|
|
47
49
|
* @description: 获取静态资源的url
|
|
48
50
|
*/
|
|
49
51
|
absoluteUrl(t) {
|
|
50
|
-
return
|
|
52
|
+
return m(this.staticPrefix, t);
|
|
51
53
|
}
|
|
52
54
|
onWorkCodeChange() {
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
P as Controller
|
|
57
59
|
};
|
|
@@ -42,7 +42,9 @@ import { changeModelCanvasOpacity as A } from "../../shared-utils/changeModelCan
|
|
|
42
42
|
import { FloorplanErrorType as c, SHOW_ANIME_DURATION as H } from "../utils/constant.js";
|
|
43
43
|
import "hammerjs";
|
|
44
44
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
45
|
-
import "
|
|
45
|
+
import "@realsee/five/line";
|
|
46
|
+
import "../../shared-utils/tag.js";
|
|
47
|
+
import "../../Sculpt/utils/Modules/Global.js";
|
|
46
48
|
import "../../shared-utils/three/THREESphere.js";
|
|
47
49
|
import "animejs";
|
|
48
50
|
import { isNil as U } from "../../shared-utils/isNil.js";
|
|
@@ -87,21 +89,15 @@ import "../../shared-utils/five/getFiveModel.js";
|
|
|
87
89
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
88
90
|
import "../../shared-utils/nearlyEqual.js";
|
|
89
91
|
import "../../shared-utils/five/changeMode.js";
|
|
90
|
-
import "../../Sculpt/typings/style.js";
|
|
91
|
-
import "../../shared-utils/five/FiveLine.js";
|
|
92
|
-
import "@realsee/five/line";
|
|
93
92
|
import "../../shared-utils/positionToVector3.js";
|
|
94
|
-
import "../../shared-utils/three/IObject3D.js";
|
|
95
|
-
import "../../shared-utils/three/centerPoint.js";
|
|
96
|
-
import "../../shared-utils/tag.js";
|
|
97
93
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
98
94
|
import "../../shared-utils/three/temp.js";
|
|
99
|
-
import "../../Sculpt/utils/Modules/Global.js";
|
|
100
95
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
101
96
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
102
97
|
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
103
98
|
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
104
99
|
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
100
|
+
import "../../shared-utils/three/IObject3D.js";
|
|
105
101
|
import "../../shared-utils/three/boundingBox.js";
|
|
106
102
|
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
107
103
|
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
@@ -114,6 +110,7 @@ import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
|
114
110
|
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
115
111
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
116
112
|
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
113
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
117
114
|
import "../../shared-utils/three/getObjectVisible.js";
|
|
118
115
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
119
116
|
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
@@ -153,12 +150,16 @@ import "../../shared-utils/three/Assets/index.js";
|
|
|
153
150
|
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
154
151
|
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
155
152
|
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
153
|
+
import "../../Sculpt/Meshes/Line.js";
|
|
154
|
+
import "../../Sculpt/typings/style.js";
|
|
155
|
+
import "../../shared-utils/five/FiveLine.js";
|
|
156
|
+
import "../../Sculpt/utils/removeAllTag.js";
|
|
157
|
+
import "../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
158
|
+
import "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
156
159
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
157
160
|
import "../../shared-utils/isTouchDevice.js";
|
|
158
161
|
import "../../shared-utils/five/getPosition.js";
|
|
159
162
|
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
160
|
-
import "../../Sculpt/utils/removeAllTag.js";
|
|
161
|
-
import "../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
162
163
|
function W(d) {
|
|
163
164
|
const { latitude: n, longitude: t } = d, e = Math.abs(n - Math.PI / 2) > 5 * Math.PI / 180, i = t > 5 * (Math.PI / 180) && t < 355 * (Math.PI / 180);
|
|
164
165
|
return e || i;
|
|
@@ -167,7 +168,7 @@ function G(d) {
|
|
|
167
168
|
const { latitude: n, longitude: t } = d, e = Math.abs(n - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
|
|
168
169
|
return e && i;
|
|
169
170
|
}
|
|
170
|
-
class
|
|
171
|
+
class fi extends O {
|
|
171
172
|
constructor(t, e) {
|
|
172
173
|
var a, m;
|
|
173
174
|
super(t);
|
|
@@ -502,5 +503,5 @@ class pi extends O {
|
|
|
502
503
|
}
|
|
503
504
|
}
|
|
504
505
|
export {
|
|
505
|
-
|
|
506
|
+
fi as Controller
|
|
506
507
|
};
|