@realsee/dnalogel 3.44.5 → 3.46.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 +6 -0
- package/dist/Sculpt/Meshes/Area.d.ts +1 -1
- package/dist/Sculpt/Meshes/Box.d.ts +1 -1
- package/dist/Sculpt/Meshes/Circle.d.ts +1 -1
- package/dist/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +8 -2
- package/dist/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/dist/Sculpt/Meshes/Point.d.ts +1 -1
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Prism.d.ts +1 -1
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/dist/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +33 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +1 -1
- package/dist/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/dist/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/dist/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/dist/Sculpt/index.d.ts +5 -0
- package/dist/Sculpt/typings/index.d.ts +11 -6
- package/dist/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/dist/Sculpt/typings/utils.type.d.ts +2 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/dist/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/dist/index.cjs.js +56 -56
- package/dist/index.js +29820 -29686
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +150 -78
- package/libs/AreaMakerPlugin/index.js +76 -4
- package/libs/AreaMakerPlugin/utils/Item.js +190 -111
- package/libs/CSS3DRenderPlugin/Controller.js +89 -29
- package/libs/CSS3DRenderPlugin/index.js +75 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +132 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +181 -116
- package/libs/CruisePlugin/BaseController.js +121 -49
- package/libs/CruisePlugin/Move.js +73 -21
- package/libs/CruisePlugin/Work.js +98 -46
- package/libs/CruisePlugin/index.js +79 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +176 -104
- package/libs/CurrentPanoImagePlugin/index.js +76 -4
- package/libs/GuideLinePlugin/Controller.js +82 -30
- package/libs/GuideLinePlugin/GuideLineItem.js +82 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +81 -29
- package/libs/GuideLinePlugin/index.js +79 -27
- package/libs/ModelMakerPlugin/Controller.js +140 -83
- package/libs/ModelMakerPlugin/index.js +75 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +117 -57
- package/libs/ModelTVVideoPlugin/index.js +68 -8
- package/libs/Object3DHelperPlugin/Controller.js +54 -31
- package/libs/Object3DHelperPlugin/index.js +35 -13
- package/libs/PanoCompassPlugin/Controller.js +97 -42
- package/libs/PanoCompassPlugin/index.js +71 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +98 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +187 -115
- package/libs/PanoDoorLabelPlugin/index.js +76 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -89
- package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -127
- package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -73
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +167 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +110 -65
- package/libs/PanoMeasurePlugin/Model/area.js +114 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +78 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -46
- package/libs/PanoMeasurePlugin/index.js +77 -32
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +98 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +210 -150
- package/libs/PanoSpatialTagPlugin/index.js +66 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +133 -53
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +295 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +257 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +157 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +144 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +73 -3
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +109 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +105 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +113 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +132 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +136 -84
- package/libs/PanoTagPlugin/controller/index.js +113 -61
- package/libs/PanoTagPlugin/index.js +89 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +121 -41
- package/libs/PanoVideoPlugin/Controller.js +137 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +149 -69
- package/libs/PanoVideoPlugin/index.js +82 -10
- package/libs/PipelinePlugin/Controller.js +199 -128
- package/libs/PipelinePlugin/index.js +76 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +102 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +95 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +136 -56
- package/libs/Sculpt/Meshes/Area.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.js +16 -15
- package/libs/Sculpt/Meshes/Circle.d.ts +1 -1
- package/libs/Sculpt/Meshes/Circle.js +1 -1
- package/libs/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Cylinder.js +8 -7
- package/libs/Sculpt/Meshes/Line.d.ts +8 -2
- package/libs/Sculpt/Meshes/Line.js +93 -65
- package/libs/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/libs/Sculpt/Meshes/LineWithDots.js +26 -26
- package/libs/Sculpt/Meshes/Point.d.ts +1 -1
- package/libs/Sculpt/Meshes/Point.js +7 -6
- package/libs/Sculpt/Meshes/Polygon.js +1 -1
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Polyline.js +5 -4
- package/libs/Sculpt/Meshes/Prism.d.ts +1 -1
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/libs/Sculpt/Objects/Box/index.js +41 -43
- package/libs/Sculpt/Objects/Cylinder/index.js +35 -37
- package/libs/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/libs/Sculpt/Objects/Line/Editor.js +62 -0
- package/libs/Sculpt/Objects/Line/index.d.ts +33 -0
- package/libs/Sculpt/Objects/Line/index.js +107 -0
- package/libs/Sculpt/Objects/Point/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/libs/Sculpt/Objects/Polygon/Editor.js +5 -5
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/libs/Sculpt/Objects/Polygon/index.js +80 -80
- package/libs/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/libs/Sculpt/Objects/Polyline/Editor.js +10 -48
- package/libs/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/libs/Sculpt/Objects/Polyline/index.js +63 -58
- package/libs/Sculpt/Objects/Prism/index.js +56 -58
- package/libs/Sculpt/index.d.ts +5 -0
- package/libs/Sculpt/index.js +58 -48
- package/libs/Sculpt/typings/index.d.ts +11 -6
- package/libs/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/libs/Sculpt/typings/utils.type.d.ts +2 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +15 -14
- package/libs/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/libs/Sculpt/utils/three/rayOnLine.js +15 -14
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +131 -61
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +75 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +158 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +76 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +151 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +194 -192
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +23 -23
- package/libs/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/libs/shared-utils/Utils/WorkUtil.js +8 -7
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +6 -3
- package/libs/shared-utils/tag.js +38 -24
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +15 -15
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +1 -1
- package/dist/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- package/libs/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- /package/libs/Sculpt/{utils/color.js → typings/style.js} +0 -0
package/libs/Sculpt/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var _ = Object.defineProperty, x = Object.defineProperties;
|
|
2
|
+
var E = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var f = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var d = (
|
|
4
|
+
var L = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var d = (m, i, e) => i in m ? _(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e, r = (m, i) => {
|
|
6
6
|
for (var e in i || (i = {}))
|
|
7
|
-
|
|
7
|
+
L.call(i, e) && d(m, e, i[e]);
|
|
8
8
|
if (f)
|
|
9
9
|
for (var e of f(i))
|
|
10
|
-
O.call(i, e) && d(
|
|
11
|
-
return
|
|
12
|
-
}, w = (
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var l = (
|
|
10
|
+
O.call(i, e) && d(m, e, i[e]);
|
|
11
|
+
return m;
|
|
12
|
+
}, w = (m, i) => x(m, E(i));
|
|
13
|
+
var h = (m, i, e) => (d(m, typeof i != "symbol" ? i + "" : i, e), e);
|
|
14
|
+
var c = (m, i, e) => new Promise((t, o) => {
|
|
15
|
+
var l = (u) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
n(e.next(u));
|
|
18
18
|
} catch (y) {
|
|
19
19
|
o(y);
|
|
20
20
|
}
|
|
21
|
-
}, s = (
|
|
21
|
+
}, s = (u) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
n(e.throw(u));
|
|
24
24
|
} catch (y) {
|
|
25
25
|
o(y);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, n = (u) => u.done ? t(u.value) : Promise.resolve(u.value).then(l, s);
|
|
28
|
+
n((e = e.apply(m, i)).next());
|
|
29
29
|
});
|
|
30
30
|
import { globalModules as R } from "./utils/Modules/Global.js";
|
|
31
31
|
import { Subscribe as S } from "../shared-utils/Subscribe.js";
|
|
32
|
-
import { IObject3D as
|
|
32
|
+
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
36
|
import "@realsee/five/line";
|
|
37
37
|
import "../shared-utils/three/THREESphere.js";
|
|
38
38
|
import "animejs";
|
|
39
|
-
import { notNil as
|
|
39
|
+
import { notNil as H } from "../shared-utils/isNil.js";
|
|
40
40
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
41
|
-
import { recurveFindObject as
|
|
41
|
+
import { recurveFindObject as M } from "../shared-utils/three/recurveFindObject.js";
|
|
42
42
|
import { Polyline as g } from "./Objects/Polyline/index.js";
|
|
43
43
|
import { Point as P } from "./Objects/Point/index.js";
|
|
44
44
|
import { Polygon as I } from "./Objects/Polygon/index.js";
|
|
@@ -47,18 +47,19 @@ import { Rectangle as v } from "./Objects/Rectangle/index.js";
|
|
|
47
47
|
import { Circle as C } from "./Objects/Circle/index.js";
|
|
48
48
|
import { Cylinder as D } from "./Objects/Cylinder/index.js";
|
|
49
49
|
import { Box as j } from "./Objects/Box/index.js";
|
|
50
|
-
import { forReverseEach as
|
|
51
|
-
|
|
50
|
+
import { forReverseEach as k } from "../shared-utils/forReverseEach.js";
|
|
51
|
+
import { Line as B } from "./Objects/Line/index.js";
|
|
52
|
+
const a = class extends S {
|
|
52
53
|
constructor(e, t) {
|
|
53
54
|
super();
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
this.five = e, this.theme = t, this.group = new
|
|
55
|
+
h(this, "group");
|
|
56
|
+
h(this, "five");
|
|
57
|
+
h(this, "theme");
|
|
58
|
+
this.five = e, this.theme = t, this.group = new U(), this.group.name = "Sculpt", e.scene.add(this.group), a.modules.init(e), a.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: o }) => {
|
|
58
59
|
var s;
|
|
59
|
-
const l =
|
|
60
|
+
const l = M((s = o == null ? void 0 : o[0]) == null ? void 0 : s.object, (n) => n.isSculptObject);
|
|
60
61
|
return l ? this.emit("click", l) : !1;
|
|
61
|
-
}), window.__SCLUPT_DEBUG__ = this, window.__SCLUPT_MODULES_DEBUG__ =
|
|
62
|
+
}), window.__SCLUPT_DEBUG__ = this, window.__SCLUPT_MODULES_DEBUG__ = a.modules;
|
|
62
63
|
}
|
|
63
64
|
get data() {
|
|
64
65
|
return {
|
|
@@ -68,7 +69,7 @@ const p = class extends S {
|
|
|
68
69
|
} catch (t) {
|
|
69
70
|
return console.error(t), null;
|
|
70
71
|
}
|
|
71
|
-
}).filter(
|
|
72
|
+
}).filter(H)
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
get items() {
|
|
@@ -81,11 +82,11 @@ const p = class extends S {
|
|
|
81
82
|
var l;
|
|
82
83
|
this.clear();
|
|
83
84
|
const o = (l = e == null ? void 0 : e.items) == null ? void 0 : l.map((s) => {
|
|
84
|
-
var
|
|
85
|
-
const
|
|
86
|
-
style: r(r({}, (
|
|
85
|
+
var u;
|
|
86
|
+
const n = w(r({}, s), {
|
|
87
|
+
style: r(r({}, (u = this.theme) == null ? void 0 : u[s.type.toLowerCase()]), s.style)
|
|
87
88
|
});
|
|
88
|
-
return s.type === "Point" ? new P(
|
|
89
|
+
return s.type === "Point" ? new P(n, t) : s.type === "line" ? new B(n, t) : s.type === "Polyline" ? new g(n, t) : s.type === "Polygon" ? new I(n, t) : s.type === "Prism" ? new b(n, t) : s.type === "Rectangle" ? new v(n, t) : s.type === "Circle" ? new C(n, t) : s.type === "Cylinder" ? new D(n, t) : s.type === "Box" ? new j(n, t) : null;
|
|
89
90
|
});
|
|
90
91
|
this.group.add(...o), this.five.needsRender = !0;
|
|
91
92
|
}
|
|
@@ -101,23 +102,32 @@ const p = class extends S {
|
|
|
101
102
|
putObject(e) {
|
|
102
103
|
var l;
|
|
103
104
|
this.group.add(e);
|
|
104
|
-
const t =
|
|
105
|
+
const t = a.modules.object3DHelper, o = t.addObject3DHelper(e);
|
|
105
106
|
return (l = o == null ? void 0 : o.moveController) == null || l.moveByMouse(), t;
|
|
106
107
|
}
|
|
107
108
|
/**
|
|
108
109
|
* @description: 开始绘制点
|
|
109
110
|
*/
|
|
110
111
|
createPoint(e) {
|
|
111
|
-
return
|
|
112
|
+
return c(this, null, function* () {
|
|
112
113
|
var t;
|
|
113
114
|
return this.createItem(P, r(r({}, (t = this.theme) == null ? void 0 : t.point), e));
|
|
114
115
|
});
|
|
115
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* @description: 开始绘制线段
|
|
119
|
+
*/
|
|
120
|
+
createline(e) {
|
|
121
|
+
return c(this, null, function* () {
|
|
122
|
+
var t;
|
|
123
|
+
return this.createItem(B, r(r({}, (t = this.theme) == null ? void 0 : t.line), e));
|
|
124
|
+
});
|
|
125
|
+
}
|
|
116
126
|
/**
|
|
117
127
|
* @description: 开始绘制空间折线
|
|
118
128
|
*/
|
|
119
129
|
createPolyline(e) {
|
|
120
|
-
return
|
|
130
|
+
return c(this, null, function* () {
|
|
121
131
|
var t;
|
|
122
132
|
return this.createItem(g, r(r({}, (t = this.theme) == null ? void 0 : t.polyline), e));
|
|
123
133
|
});
|
|
@@ -126,7 +136,7 @@ const p = class extends S {
|
|
|
126
136
|
* @description: 开始绘制平面多边形
|
|
127
137
|
*/
|
|
128
138
|
createPolygon(e) {
|
|
129
|
-
return
|
|
139
|
+
return c(this, null, function* () {
|
|
130
140
|
var t;
|
|
131
141
|
return this.createItem(I, r(r({}, (t = this.theme) == null ? void 0 : t.polygon), e));
|
|
132
142
|
});
|
|
@@ -135,7 +145,7 @@ const p = class extends S {
|
|
|
135
145
|
* @description: 开始绘制多棱柱
|
|
136
146
|
*/
|
|
137
147
|
createPrism(e) {
|
|
138
|
-
return
|
|
148
|
+
return c(this, null, function* () {
|
|
139
149
|
var t;
|
|
140
150
|
return this.createItem(b, r(r({}, (t = this.theme) == null ? void 0 : t.prism), e));
|
|
141
151
|
});
|
|
@@ -144,7 +154,7 @@ const p = class extends S {
|
|
|
144
154
|
* @description: 开始绘制矩形
|
|
145
155
|
*/
|
|
146
156
|
createRectangle(e) {
|
|
147
|
-
return
|
|
157
|
+
return c(this, null, function* () {
|
|
148
158
|
var t;
|
|
149
159
|
return this.createItem(v, r(r({}, (t = this.theme) == null ? void 0 : t.rectangle), e));
|
|
150
160
|
});
|
|
@@ -153,7 +163,7 @@ const p = class extends S {
|
|
|
153
163
|
* @description: 开始绘制圆形
|
|
154
164
|
*/
|
|
155
165
|
createCircle(e) {
|
|
156
|
-
return
|
|
166
|
+
return c(this, null, function* () {
|
|
157
167
|
var t;
|
|
158
168
|
return this.createItem(C, r(r({}, (t = this.theme) == null ? void 0 : t.circle), e));
|
|
159
169
|
});
|
|
@@ -162,7 +172,7 @@ const p = class extends S {
|
|
|
162
172
|
* @description: 开始绘制圆柱
|
|
163
173
|
*/
|
|
164
174
|
createCylinder(e) {
|
|
165
|
-
return
|
|
175
|
+
return c(this, null, function* () {
|
|
166
176
|
var t;
|
|
167
177
|
return this.createItem(D, r(r({}, (t = this.theme) == null ? void 0 : t.cylinder), e));
|
|
168
178
|
});
|
|
@@ -171,7 +181,7 @@ const p = class extends S {
|
|
|
171
181
|
* @description: 开始绘制 Box
|
|
172
182
|
*/
|
|
173
183
|
createBox(e) {
|
|
174
|
-
return
|
|
184
|
+
return c(this, null, function* () {
|
|
175
185
|
var t;
|
|
176
186
|
return this.createItem(j, r(r({}, (t = this.theme) == null ? void 0 : t.box), e));
|
|
177
187
|
});
|
|
@@ -190,10 +200,10 @@ const p = class extends S {
|
|
|
190
200
|
* @description: 清空数据
|
|
191
201
|
*/
|
|
192
202
|
clear() {
|
|
193
|
-
|
|
203
|
+
k(this.items, (e) => e.delete()), this.five.needsRender = !0;
|
|
194
204
|
}
|
|
195
205
|
createItem(e, ...t) {
|
|
196
|
-
return
|
|
206
|
+
return c(this, null, function* () {
|
|
197
207
|
const o = new e();
|
|
198
208
|
return this.group.add(o), yield o.create(...t).catch((l) => {
|
|
199
209
|
console.error(l), this.group.remove(o);
|
|
@@ -201,10 +211,10 @@ const p = class extends S {
|
|
|
201
211
|
});
|
|
202
212
|
}
|
|
203
213
|
};
|
|
204
|
-
let
|
|
205
|
-
|
|
206
|
-
const
|
|
214
|
+
let p = a;
|
|
215
|
+
h(p, "modules", R);
|
|
216
|
+
const me = (m) => new p(m);
|
|
207
217
|
export {
|
|
208
|
-
|
|
209
|
-
|
|
218
|
+
p as Sculpt,
|
|
219
|
+
me as SculptPlugin
|
|
210
220
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { SimplifyDeep } from './SimplifyDeep';
|
|
2
1
|
import type { PartialDeep } from 'type-fest';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { SimplifyDeep } from './utils.type';
|
|
3
|
+
export type { SimplifyDeep };
|
|
5
4
|
import type { Point, PointImportData } from '../Objects/Point';
|
|
5
|
+
import type { Line, LineImportData } from '../Objects/Line';
|
|
6
|
+
import type { Polyline, PolylineImportData } from '../Objects/Polyline';
|
|
6
7
|
import type { Polygon, PolygonImportData } from '../Objects/Polygon';
|
|
7
8
|
import type { Prism, PrismImportData } from '../Objects/Prism';
|
|
8
9
|
import type { Rectangle, RectangleImportData } from '../Objects/Rectangle';
|
|
@@ -10,6 +11,7 @@ import type { Circle, CircleImportData } from '../Objects/Circle';
|
|
|
10
11
|
import type { Cylinder, CylinderImportData } from '../Objects/Cylinder';
|
|
11
12
|
import type { Box, BoxImportData } from '../Objects/Box';
|
|
12
13
|
import type { PointStyle } from '../Meshes/Point';
|
|
14
|
+
import type { LineMeshStyle } from '../Meshes/Line';
|
|
13
15
|
import type { PolylineStyle } from '../Meshes/Polyline';
|
|
14
16
|
import type { PrismStyle } from '../Meshes/Prism';
|
|
15
17
|
import type { RectangleWithEdgeMeshStyle as RectangleStyle } from '../Meshes/RectangleWithEdge';
|
|
@@ -27,8 +29,9 @@ export declare namespace SculptData {
|
|
|
27
29
|
type CylinderData = SimplifyDeep<CylinderImportData>;
|
|
28
30
|
type BoxData = SimplifyDeep<BoxImportData>;
|
|
29
31
|
}
|
|
30
|
-
export type { Polyline, PolylineImportData };
|
|
31
32
|
export type { Point, PointImportData };
|
|
33
|
+
export type { Line, LineImportData };
|
|
34
|
+
export type { Polyline, PolylineImportData };
|
|
32
35
|
export type { Polygon, PolygonImportData };
|
|
33
36
|
export type { Prism, PrismImportData };
|
|
34
37
|
export type { Rectangle, RectangleImportData };
|
|
@@ -36,6 +39,7 @@ export type { Circle, CircleImportData };
|
|
|
36
39
|
export type { Cylinder, CylinderImportData };
|
|
37
40
|
export type { Box, BoxImportData };
|
|
38
41
|
export type { PointStyle };
|
|
42
|
+
export type { LineMeshStyle };
|
|
39
43
|
export type { PolylineStyle };
|
|
40
44
|
export type { PrismStyle };
|
|
41
45
|
export type { RectangleStyle };
|
|
@@ -43,10 +47,11 @@ export type { CircleStyle };
|
|
|
43
47
|
export type { CylinderStyle };
|
|
44
48
|
export type { BoxStyle };
|
|
45
49
|
export type { AreaStyle };
|
|
46
|
-
export type BuiltInData = PolylineImportData | PointImportData | PolygonImportData | PrismImportData | RectangleImportData | CircleImportData | CylinderImportData | BoxImportData;
|
|
47
|
-
export type BuiltInItem = Polyline | Point | Polygon | Prism | Rectangle | Circle | Cylinder | Box;
|
|
50
|
+
export type BuiltInData = PolylineImportData | PointImportData | PolygonImportData | PrismImportData | RectangleImportData | CircleImportData | CylinderImportData | BoxImportData | LineImportData;
|
|
51
|
+
export type BuiltInItem = Polyline | Point | Polygon | Prism | Rectangle | Circle | Cylinder | Box | Line;
|
|
48
52
|
export type Theme = PartialDeep<{
|
|
49
53
|
point: PointStyle;
|
|
54
|
+
line: LineMeshStyle;
|
|
50
55
|
polyline: PolylineStyle;
|
|
51
56
|
polygon: AreaStyle;
|
|
52
57
|
prism: PrismStyle;
|
|
@@ -31,6 +31,13 @@ export type LineWidthStyle = {
|
|
|
31
31
|
*/
|
|
32
32
|
lineWidth?: number;
|
|
33
33
|
};
|
|
34
|
+
export type LimitPlaneConfig = {
|
|
35
|
+
/**
|
|
36
|
+
* @description 限制折线绘制的平面; `xoz` 限制在水平面; `y` 限制垂直面; `none` 不限制
|
|
37
|
+
* @default `none`
|
|
38
|
+
*/
|
|
39
|
+
limit: 'xoz' | 'y' | 'none';
|
|
40
|
+
};
|
|
34
41
|
export type OcclusionStyle = {
|
|
35
42
|
/**
|
|
36
43
|
* @description 是否以一种半透明的方式显示遮挡的部分
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type * as THREE from 'three';
|
|
2
2
|
import type { Merge, UnknownArray } from 'type-fest';
|
|
3
|
+
import type { ConditionalSimplifyDeep } from 'type-fest/source/conditional-simplify';
|
|
3
4
|
import type { IsNull, NonRecursiveType } from 'type-fest/source/internal';
|
|
5
|
+
export type SimplifyDeep<T> = ConditionalSimplifyDeep<T, THREE.Color | THREE.Vector3 | Function | Iterable<unknown>, object>;
|
|
4
6
|
export type ImportDataToExportData<T> = Merge<JsonData<T>, {
|
|
5
7
|
id: string | number;
|
|
6
8
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { type ColorStyle, type OpacityStyle, type OcclusionStyle } from '
|
|
2
|
+
import { type ColorStyle, type OpacityStyle, type OcclusionStyle } from '../../typings/style';
|
|
3
3
|
import { IObject3D } from '../../../shared-utils/three/IObject3D';
|
|
4
4
|
export type ColoredMeshStyle = OpacityStyle & ColorStyle & OcclusionStyle;
|
|
5
5
|
export default class ColoredMesh<TGeometry extends THREE.Geometry | THREE.BufferGeometry = THREE.Geometry | THREE.BufferGeometry> extends IObject3D {
|
|
@@ -9,28 +9,29 @@ var d = (i, t, e) => t in i ? g(i, t, { enumerable: !0, configurable: !0, writab
|
|
|
9
9
|
F.call(t, e) && d(i, e, t[e]);
|
|
10
10
|
return i;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var r = (i, t, e) => (d(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
13
13
|
import * as s from "three";
|
|
14
|
-
import { DEFAULT_COLOR as M } from "
|
|
14
|
+
import { DEFAULT_COLOR as M } from "../../typings/style.js";
|
|
15
15
|
import { IObject3D as B } from "../../../shared-utils/three/IObject3D.js";
|
|
16
16
|
import "hammerjs";
|
|
17
17
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
18
18
|
import "@realsee/five/line";
|
|
19
|
+
import "../Modules/Global.js";
|
|
19
20
|
import "../../../shared-utils/three/THREESphere.js";
|
|
20
21
|
import "animejs";
|
|
21
22
|
import { notNil as m } from "../../../shared-utils/isNil.js";
|
|
22
23
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
23
|
-
class
|
|
24
|
+
class _ extends B {
|
|
24
25
|
constructor(e) {
|
|
25
26
|
var h, y;
|
|
26
27
|
super();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
r(this, "name", "ColoredMesh");
|
|
29
|
+
r(this, "meshFont");
|
|
30
|
+
r(this, "meshBackground");
|
|
31
|
+
r(this, "paramsStyle", {});
|
|
32
|
+
r(this, "_geometry", new s.BufferGeometry());
|
|
32
33
|
this.paramsStyle = e != null ? e : {};
|
|
33
|
-
const
|
|
34
|
+
const c = new s.MeshBasicMaterial({
|
|
34
35
|
color: (h = e == null ? void 0 : e.color) != null ? h : M,
|
|
35
36
|
transparent: !0,
|
|
36
37
|
side: s.DoubleSide,
|
|
@@ -42,8 +43,8 @@ class R extends B {
|
|
|
42
43
|
side: s.DoubleSide,
|
|
43
44
|
depthTest: !1,
|
|
44
45
|
depthWrite: !1,
|
|
45
|
-
opacity: 0.3 / 0.5 *
|
|
46
|
-
}), o = new s.Mesh(this.geometry,
|
|
46
|
+
opacity: 0.3 / 0.5 * c.opacity
|
|
47
|
+
}), o = new s.Mesh(this.geometry, c), n = new s.Mesh(this.geometry, l);
|
|
47
48
|
o.name = "MeshFront", n.name = "MeshBackground", o.renderOrder = 1, n.renderOrder = 0, this.meshFont = o, this.meshBackground = n, this.add(o), this.setOcclusionVisibility({ occlusionVisibility: e == null ? void 0 : e.occlusionVisibility, occlusionMode: e == null ? void 0 : e.occlusionMode });
|
|
48
49
|
}
|
|
49
50
|
get color() {
|
|
@@ -69,10 +70,10 @@ class R extends B {
|
|
|
69
70
|
}
|
|
70
71
|
setOcclusionVisibility(e) {
|
|
71
72
|
var o, n, h;
|
|
72
|
-
const
|
|
73
|
-
m(l) && (l ?
|
|
73
|
+
const c = (n = (o = e.occlusionMode) != null ? o : this.paramsStyle.occlusionMode) != null ? n : "translucence", l = (h = e.occlusionVisibility) != null ? h : this.paramsStyle.occlusionVisibility;
|
|
74
|
+
m(l) && (l ? c === "depthTest" ? (this.meshFont.material.depthTest = !1, this.remove(this.meshBackground)) : c === "translucence" && (this.meshFont.material.depthTest = !0, this.addIfNotExists(this.meshBackground)) : (this.meshFont.material.depthTest = !0, this.remove(this.meshBackground)));
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
export {
|
|
77
|
-
|
|
78
|
+
_ as ColoredMesh
|
|
78
79
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
/**
|
|
3
3
|
* @description: 求射线与线段的交点(交点在线段上)
|
|
4
|
-
* @param {THREE.
|
|
5
|
-
* @param {THREE.
|
|
6
|
-
* @param {
|
|
7
|
-
* @param {boolean} clampToLine 是否限制交点在线段上,默认为true,不限制则可以相交在线段的延长线上
|
|
4
|
+
* @param {THREE.Raycaster} params.ray 射线
|
|
5
|
+
* @param {THREE.Line3} params.line 线段
|
|
6
|
+
* @param {boolean} params.clampToLine `true` 限制交点在线段上, `false` 可以相交在线段的延长线上;默认为`true`
|
|
8
7
|
*/
|
|
9
8
|
export declare function rayOnLine(params: {
|
|
10
|
-
cameraPosition: THREE.Vector3;
|
|
11
9
|
raycaster: THREE.Raycaster;
|
|
12
10
|
line: THREE.Line3;
|
|
13
11
|
clampToLine?: boolean;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import * as t from "three";
|
|
2
|
+
const y = new t.Vector3();
|
|
3
|
+
function O(p) {
|
|
4
|
+
var d;
|
|
5
|
+
const { raycaster: e, line: n, clampToLine: m = !0 } = p;
|
|
6
|
+
if (((d = e.camera) == null ? void 0 : d.type) === "OrthographicCamera") {
|
|
7
|
+
const o = e.ray.origin.clone();
|
|
8
|
+
return n.closestPointToPoint(o, !1, new t.Vector3());
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
return n.start.sub(
|
|
10
|
+
const a = new t.Plane().setFromNormalAndCoplanarPoint(e.ray.direction.clone().normalize(), e.ray.origin), r = a.projectPoint(n.start, new t.Vector3()), s = a.projectPoint(n.end, new t.Vector3()), l = new t.Line3(r, s), c = l.closestPointToPoint(e.ray.origin, m, y), P = c.distanceTo(s), T = c.distanceTo(r), i = l.distance();
|
|
11
|
+
if (P > T && P > i) {
|
|
12
|
+
const o = -c.distanceTo(r) / i, u = n.start.clone().sub(n.end).normalize();
|
|
13
|
+
return n.start.sub(u.clone().multiplyScalar(o * n.distance()));
|
|
13
14
|
} else {
|
|
14
|
-
const
|
|
15
|
-
return new
|
|
15
|
+
const o = c.distanceTo(r) / i;
|
|
16
|
+
return new t.Vector3().lerpVectors(n.start, n.end, o);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
O as rayOnLine
|
|
20
21
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
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
8
|
import "@realsee/five/line";
|
|
9
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
9
10
|
import "../shared-utils/three/THREESphere.js";
|
|
10
11
|
import "animejs";
|
|
11
12
|
import { FiveUtil as a } from "../shared-utils/Utils/FiveUtil.js";
|
|
12
|
-
import { absoluteUrl as
|
|
13
|
+
import { absoluteUrl as m } from "../shared-utils/url/absoluteUrl.js";
|
|
13
14
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
14
|
-
let
|
|
15
|
+
let x = class {
|
|
15
16
|
constructor(t, r) {
|
|
16
17
|
/**
|
|
17
18
|
* @realsee/dnalogel 版本号
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
i(this, "VERSION", "3.46.0");
|
|
21
|
+
i(this, "NAME");
|
|
22
|
+
i(this, "five");
|
|
23
|
+
i(this, "workUtil");
|
|
24
|
+
i(this, "fiveUtil");
|
|
24
25
|
/**
|
|
25
26
|
* @description: 插件事件钩子
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
i(this, "hooks", new l());
|
|
29
|
+
i(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
|
|
29
30
|
this.updateFive(t), r != null && r.staticPrefix && (this.staticPrefix = r.staticPrefix);
|
|
30
31
|
}
|
|
31
32
|
set workCode(t) {
|
|
@@ -47,11 +48,11 @@ let c = class {
|
|
|
47
48
|
* @description: 获取静态资源的url
|
|
48
49
|
*/
|
|
49
50
|
absoluteUrl(t) {
|
|
50
|
-
return
|
|
51
|
+
return m(this.staticPrefix, t);
|
|
51
52
|
}
|
|
52
53
|
onWorkCodeChange() {
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
x as Controller
|
|
57
58
|
};
|