@realsee/dnalogel 3.49.4 → 3.49.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/dist/Sculpt/Objects/Base/index.d.ts +4 -0
- package/dist/Sculpt/index.d.ts +3 -1
- package/dist/Sculpt/typings/index.d.ts +10 -11
- package/dist/Sculpt/utils/Modules/Cursor.d.ts +8 -0
- package/dist/index.cjs.js +153 -153
- package/dist/index.js +3258 -3232
- package/dist/index.umd.js +161 -161
- package/dist/shared-utils/five/FiveDomEvents.d.ts +2 -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.js +3 -2
- package/libs/GuideLinePlugin/index.js +7 -6
- package/libs/ModelMakerPlugin/Controller.js +3 -2
- package/libs/ModelMakerPlugin/index.js +3 -2
- package/libs/ModelMakerPlugin/item/baseItem.js +6 -5
- package/libs/ModelMakerPlugin/item/boxItem.js +3 -2
- package/libs/ModelMakerPlugin/item/polygonItem.js +3 -2
- package/libs/ModelMakerPlugin/item/prismItem.js +3 -2
- package/libs/ModelMakerPlugin/utils/getFiveDomEvent.js +3 -2
- package/libs/PanoTagPlugin/controller/TagRender.js +3 -2
- package/libs/PanoTagPlugin/controller/TagUtil.js +3 -2
- package/libs/PanoTagPlugin/controller/index.js +6 -5
- package/libs/PanoTagPlugin/index.js +12 -11
- package/libs/Sculpt/Objects/Base/index.d.ts +4 -0
- package/libs/Sculpt/Objects/Base/index.js +28 -20
- package/libs/Sculpt/index.d.ts +3 -1
- package/libs/Sculpt/index.js +74 -74
- package/libs/Sculpt/typings/index.d.ts +10 -11
- package/libs/Sculpt/utils/Modules/Cursor.d.ts +8 -0
- package/libs/Sculpt/utils/Modules/Cursor.js +24 -13
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/five/FiveDomEvents.d.ts +2 -0
- package/libs/shared-utils/five/FiveDomEvents.js +73 -65
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
package/libs/Sculpt/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
var U = Object.defineProperty, _ = Object.defineProperties;
|
|
2
2
|
var x = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var f = Object.getOwnPropertySymbols;
|
|
4
4
|
var E = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var y = (m, i, e) => i in m ? U(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
|
-
E.call(i, e) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
L.call(i, e) &&
|
|
7
|
+
E.call(i, e) && y(m, e, i[e]);
|
|
8
|
+
if (f)
|
|
9
|
+
for (var e of f(i))
|
|
10
|
+
L.call(i, e) && y(m, e, i[e]);
|
|
11
11
|
return m;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var l = (
|
|
12
|
+
}, g = (m, i) => _(m, x(i));
|
|
13
|
+
var a = (m, i, e) => (y(m, typeof i != "symbol" ? i + "" : i, e), e);
|
|
14
|
+
var u = (m, i, e) => new Promise((t, n) => {
|
|
15
|
+
var l = (c) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
n(
|
|
17
|
+
s(e.next(c));
|
|
18
|
+
} catch (d) {
|
|
19
|
+
n(d);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, o = (c) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
n(
|
|
23
|
+
s(e.throw(c));
|
|
24
|
+
} catch (d) {
|
|
25
|
+
n(d);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, s = (c) => c.done ? t(c.value) : Promise.resolve(c.value).then(l, o);
|
|
28
|
+
s((e = e.apply(m, i)).next());
|
|
29
29
|
});
|
|
30
30
|
import { globalModules as O } from "./utils/Modules/Global.js";
|
|
31
31
|
import { Subscribe as S } from "../shared-utils/Subscribe.js";
|
|
32
|
-
import { IObject3D as
|
|
32
|
+
import { IObject3D as k } from "../shared-utils/three/IObject3D.js";
|
|
33
33
|
import "three";
|
|
34
34
|
import "hammerjs";
|
|
35
35
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
@@ -38,46 +38,46 @@ import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
|
38
38
|
import "../shared-utils/tag.js";
|
|
39
39
|
import "../shared-utils/three/core/Sphere.js";
|
|
40
40
|
import "animejs";
|
|
41
|
-
import { notNil as
|
|
41
|
+
import { notNil as H } from "../shared-utils/isNil.js";
|
|
42
42
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
43
|
-
import { recurveFindObject as
|
|
44
|
-
import { Polyline as
|
|
45
|
-
import { Point as
|
|
46
|
-
import { Polygon as
|
|
43
|
+
import { recurveFindObject as M } from "../shared-utils/three/recurveFindObject.js";
|
|
44
|
+
import { Polyline as I } from "./Objects/Polyline/index.js";
|
|
45
|
+
import { Point as w } from "./Objects/Point/index.js";
|
|
46
|
+
import { Polygon as P } from "./Objects/Polygon/index.js";
|
|
47
47
|
import { Prism as v } from "./Objects/Prism/index.js";
|
|
48
|
-
import { Rectangle as
|
|
49
|
-
import { Circle as
|
|
50
|
-
import { Cylinder as
|
|
51
|
-
import { Box as
|
|
52
|
-
import { forReverseEach as
|
|
53
|
-
import { Line as
|
|
54
|
-
import { hotkeys as
|
|
55
|
-
const
|
|
48
|
+
import { Rectangle as b } from "./Objects/Rectangle/index.js";
|
|
49
|
+
import { Circle as C } from "./Objects/Circle/index.js";
|
|
50
|
+
import { Cylinder as R } from "./Objects/Cylinder/index.js";
|
|
51
|
+
import { Box as D } from "./Objects/Box/index.js";
|
|
52
|
+
import { forReverseEach as z } from "../shared-utils/forReverseEach.js";
|
|
53
|
+
import { Line as j } from "./Objects/Line/index.js";
|
|
54
|
+
import { hotkeys as B } from "../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
55
|
+
const h = class extends S {
|
|
56
56
|
constructor(e, t) {
|
|
57
57
|
super();
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
a(this, "group");
|
|
59
|
+
a(this, "theme");
|
|
60
|
+
a(this, "five");
|
|
61
|
+
a(this, "creatingItem", null);
|
|
62
62
|
/**
|
|
63
63
|
* @description: 撤销
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
a(this, "undo", () => {
|
|
66
66
|
var e;
|
|
67
67
|
console.log("undo"), (e = this.creatingItem) == null || e.undo(), this.five.needsRender = !0;
|
|
68
68
|
});
|
|
69
69
|
/**
|
|
70
70
|
* @description: 重做
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
a(this, "redo", () => {
|
|
73
73
|
var e;
|
|
74
74
|
console.log("redo"), (e = this.creatingItem) == null || e.redo(), this.five.needsRender = !0;
|
|
75
75
|
});
|
|
76
|
-
this.five = e, this.theme = t, this.group = new
|
|
76
|
+
this.five = e, this.theme = t, this.group = new k(), this.group.name = "Sculpt", e.scene.add(this.group), h.modules.init(e), B("ctrl+z", this.undo), B("ctrl+shift+z", this.redo), h.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: n, origDomEvent: l }) => {
|
|
77
77
|
var s;
|
|
78
|
-
const
|
|
79
|
-
return
|
|
80
|
-
}), window.__SCULPT_DEBUG__ = this, window.__SCULPT_MODULES_DEBUG__ =
|
|
78
|
+
const o = M((s = n == null ? void 0 : n[0]) == null ? void 0 : s.object, (c) => c.isSculptObject);
|
|
79
|
+
return o ? this.emit("click", l, o) : !1;
|
|
80
|
+
}), window.__SCULPT_DEBUG__ = this, window.__SCULPT_MODULES_DEBUG__ = h.modules;
|
|
81
81
|
}
|
|
82
82
|
get data() {
|
|
83
83
|
return {
|
|
@@ -87,7 +87,7 @@ const a = class extends S {
|
|
|
87
87
|
} catch (t) {
|
|
88
88
|
return console.error(t), null;
|
|
89
89
|
}
|
|
90
|
-
}).filter(
|
|
90
|
+
}).filter(H)
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
get items() {
|
|
@@ -99,12 +99,12 @@ const a = class extends S {
|
|
|
99
99
|
load(e, t) {
|
|
100
100
|
var l;
|
|
101
101
|
this.clear();
|
|
102
|
-
const n = (l = e == null ? void 0 : e.items) == null ? void 0 : l.map((
|
|
103
|
-
var
|
|
104
|
-
const
|
|
105
|
-
style: r(r({}, (
|
|
102
|
+
const n = (l = e == null ? void 0 : e.items) == null ? void 0 : l.map((o) => {
|
|
103
|
+
var c;
|
|
104
|
+
const s = g(r({}, o), {
|
|
105
|
+
style: r(r({}, (c = this.theme) == null ? void 0 : c[o.type.toLowerCase()]), o.style)
|
|
106
106
|
});
|
|
107
|
-
return
|
|
107
|
+
return o.type === "Point" ? new w(s, t) : o.type === "line" ? new j(s, t) : o.type === "Polyline" ? new I(s, t) : o.type === "Polygon" ? new P(s, t) : o.type === "Prism" ? new v(s, t) : o.type === "Rectangle" ? new b(s, t) : o.type === "Circle" ? new C(s, t) : o.type === "Cylinder" ? new R(s, t) : o.type === "Box" ? new D(s, t) : null;
|
|
108
108
|
});
|
|
109
109
|
this.group.add(...n), this.five.needsRender = !0;
|
|
110
110
|
}
|
|
@@ -120,50 +120,50 @@ const a = class extends S {
|
|
|
120
120
|
putObject(e) {
|
|
121
121
|
var l;
|
|
122
122
|
this.group.add(e);
|
|
123
|
-
const t =
|
|
123
|
+
const t = h.modules.object3DHelper, n = t.addObject3DHelper(e);
|
|
124
124
|
return (l = n == null ? void 0 : n.moveController) == null || l.moveByMouse(), t;
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* @description: 开始绘制点
|
|
128
128
|
*/
|
|
129
129
|
createPoint(e) {
|
|
130
|
-
return
|
|
130
|
+
return u(this, null, function* () {
|
|
131
131
|
var t;
|
|
132
|
-
return this.createItem(
|
|
132
|
+
return this.createItem(w, r(r({}, (t = this.theme) == null ? void 0 : t.point), e));
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
136
136
|
* @description: 开始绘制线段
|
|
137
137
|
*/
|
|
138
138
|
createline(e) {
|
|
139
|
-
return
|
|
139
|
+
return u(this, null, function* () {
|
|
140
140
|
var t;
|
|
141
|
-
return this.createItem(
|
|
141
|
+
return this.createItem(j, r(r({}, (t = this.theme) == null ? void 0 : t.line), e));
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
145
|
* @description: 开始绘制空间折线
|
|
146
146
|
*/
|
|
147
147
|
createPolyline(e) {
|
|
148
|
-
return
|
|
148
|
+
return u(this, null, function* () {
|
|
149
149
|
var t;
|
|
150
|
-
return this.createItem(
|
|
150
|
+
return this.createItem(I, r(r({}, (t = this.theme) == null ? void 0 : t.polyline), e));
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* @description: 开始绘制平面多边形
|
|
155
155
|
*/
|
|
156
156
|
createPolygon(e) {
|
|
157
|
-
return
|
|
157
|
+
return u(this, null, function* () {
|
|
158
158
|
var t;
|
|
159
|
-
return this.createItem(
|
|
159
|
+
return this.createItem(P, r(r({}, (t = this.theme) == null ? void 0 : t.polygon), e));
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
/**
|
|
163
163
|
* @description: 开始绘制多棱柱
|
|
164
164
|
*/
|
|
165
165
|
createPrism(e) {
|
|
166
|
-
return
|
|
166
|
+
return u(this, null, function* () {
|
|
167
167
|
var t;
|
|
168
168
|
return this.createItem(v, r(r({}, (t = this.theme) == null ? void 0 : t.prism), e));
|
|
169
169
|
});
|
|
@@ -172,36 +172,36 @@ const a = class extends S {
|
|
|
172
172
|
* @description: 开始绘制矩形
|
|
173
173
|
*/
|
|
174
174
|
createRectangle(e) {
|
|
175
|
-
return
|
|
175
|
+
return u(this, null, function* () {
|
|
176
176
|
var t;
|
|
177
|
-
return this.createItem(
|
|
177
|
+
return this.createItem(b, r(r({}, (t = this.theme) == null ? void 0 : t.rectangle), e));
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
181
|
* @description: 开始绘制圆形
|
|
182
182
|
*/
|
|
183
183
|
createCircle(e) {
|
|
184
|
-
return
|
|
184
|
+
return u(this, null, function* () {
|
|
185
185
|
var t;
|
|
186
|
-
return this.createItem(
|
|
186
|
+
return this.createItem(C, r(r({}, (t = this.theme) == null ? void 0 : t.circle), e));
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
190
|
* @description: 开始绘制圆柱
|
|
191
191
|
*/
|
|
192
192
|
createCylinder(e) {
|
|
193
|
-
return
|
|
193
|
+
return u(this, null, function* () {
|
|
194
194
|
var t;
|
|
195
|
-
return this.createItem(
|
|
195
|
+
return this.createItem(R, r(r({}, (t = this.theme) == null ? void 0 : t.cylinder), e));
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
199
|
* @description: 开始绘制 Box
|
|
200
200
|
*/
|
|
201
201
|
createBox(e) {
|
|
202
|
-
return
|
|
202
|
+
return u(this, null, function* () {
|
|
203
203
|
var t;
|
|
204
|
-
return this.createItem(
|
|
204
|
+
return this.createItem(D, r(r({}, (t = this.theme) == null ? void 0 : t.box), e));
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
canUndo() {
|
|
@@ -216,10 +216,10 @@ const a = class extends S {
|
|
|
216
216
|
* @description: 清空数据
|
|
217
217
|
*/
|
|
218
218
|
clear() {
|
|
219
|
-
|
|
219
|
+
z(this.items, (e) => e.delete()), this.five.needsRender = !0;
|
|
220
220
|
}
|
|
221
221
|
createItem(e, ...t) {
|
|
222
|
-
return
|
|
222
|
+
return u(this, null, function* () {
|
|
223
223
|
this.creatingItem && (this.creatingItem.stopCreating(), this.creatingItem = null);
|
|
224
224
|
const n = new e();
|
|
225
225
|
return this.creatingItem = n, this.group.add(n), yield n.create(...t).then((...l) => (this.creatingItem = null, l)).catch((l) => {
|
|
@@ -228,10 +228,10 @@ const a = class extends S {
|
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
let
|
|
232
|
-
|
|
233
|
-
const
|
|
231
|
+
let p = h;
|
|
232
|
+
a(p, "modules", O);
|
|
233
|
+
const ae = (m) => new p(m);
|
|
234
234
|
export {
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
p as Sculpt,
|
|
236
|
+
ae as SculptPlugin
|
|
237
237
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { PartialDeep } from 'type-fest';
|
|
2
1
|
import type { SimplifyDeep } from './utils.type';
|
|
3
2
|
export type { SimplifyDeep };
|
|
4
3
|
import type { Point, PointImportData } from '../Objects/Point';
|
|
@@ -49,14 +48,14 @@ export type { BoxStyle };
|
|
|
49
48
|
export type { AreaStyle };
|
|
50
49
|
export type BuiltInData = PolylineImportData | PointImportData | PolygonImportData | PrismImportData | RectangleImportData | CircleImportData | CylinderImportData | BoxImportData | LineImportData;
|
|
51
50
|
export type BuiltInItem = Polyline | Point | Polygon | Prism | Rectangle | Circle | Cylinder | Box | Line;
|
|
52
|
-
export type Theme =
|
|
53
|
-
point: PointStyle
|
|
54
|
-
line: LineMeshStyle
|
|
55
|
-
polyline: PolylineStyle
|
|
56
|
-
polygon: AreaStyle
|
|
57
|
-
prism: PrismStyle
|
|
58
|
-
rectangle: RectangleStyle
|
|
59
|
-
circle: CircleStyle
|
|
60
|
-
cylinder: CylinderStyle
|
|
61
|
-
box: BoxStyle
|
|
51
|
+
export type Theme = Partial<{
|
|
52
|
+
point: Partial<PointStyle>;
|
|
53
|
+
line: Partial<LineMeshStyle>;
|
|
54
|
+
polyline: Partial<PolylineStyle>;
|
|
55
|
+
polygon: Partial<AreaStyle>;
|
|
56
|
+
prism: Partial<PrismStyle>;
|
|
57
|
+
rectangle: Partial<RectangleStyle>;
|
|
58
|
+
circle: Partial<CircleStyle>;
|
|
59
|
+
cylinder: Partial<CylinderStyle>;
|
|
60
|
+
box: Partial<BoxStyle>;
|
|
62
61
|
}>;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
type CursorType = 'auto' | 'pen' | 'pen-forbidden' | 'pen-crosshair' | 'pne-polygon' | 'pen-circle' | 'crosshair-rectangle' | 'crosshair-circle';
|
|
2
2
|
export declare class Cursor {
|
|
3
3
|
private container;
|
|
4
|
+
private deleteButton?;
|
|
4
5
|
constructor(container: HTMLElement);
|
|
5
6
|
/**
|
|
6
7
|
* @param type - The type of the cursor.
|
|
7
8
|
*/
|
|
8
9
|
setType(type: CursorType): void;
|
|
10
|
+
showDeleteButton(params: {
|
|
11
|
+
clientX: number;
|
|
12
|
+
clientY: number;
|
|
13
|
+
container: HTMLElement;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}): HTMLElement;
|
|
16
|
+
removeDeleteButton(): void;
|
|
9
17
|
tip(tip: string): () => void;
|
|
10
18
|
closeTip(): void;
|
|
11
19
|
reset(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var I = (l, t, i) => t in l ? c(l, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : l[t] = i;
|
|
3
|
+
var s = (l, t, i) => (I(l, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
|
+
const d = {
|
|
5
5
|
auto: "",
|
|
6
6
|
pen: "",
|
|
7
7
|
"pen-forbidden": "",
|
|
@@ -11,19 +11,30 @@ const n = {
|
|
|
11
11
|
"crosshair-rectangle": "",
|
|
12
12
|
"crosshair-circle": ""
|
|
13
13
|
};
|
|
14
|
-
class
|
|
15
|
-
constructor(
|
|
16
|
-
|
|
17
|
-
this
|
|
14
|
+
class p {
|
|
15
|
+
constructor(t) {
|
|
16
|
+
s(this, "container");
|
|
17
|
+
s(this, "deleteButton");
|
|
18
|
+
this.container = t;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* @param type - The type of the cursor.
|
|
21
22
|
*/
|
|
22
|
-
setType(
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
setType(t) {
|
|
24
|
+
const i = d[t];
|
|
25
|
+
i ? this.container.style.cursor = `url(${i}), auto` : this.container.style.cursor = t;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
showDeleteButton(t) {
|
|
28
|
+
const { clientX: i, clientY: n, container: o, onClick: r } = t;
|
|
29
|
+
let e = this.deleteButton;
|
|
30
|
+
return e || (e = document.createElement("div"), e.style.position = "absolute", e.style.width = "20px", e.style.height = "20px", e.style.transform = "translate(-50%, -40px)", e.style.borderRadius = "50%", e.style.cursor = "pointer", e.style.zIndex = "9999", e.style.cursor = "pointer", e.style.userSelect = "none", e.style.display = "flex", e.style.alignItems = "center", e.style.justifyContent = "center", e.style.backgroundImage = "url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTciIGhlaWdodD0iMjUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIxMC43MDYlIiB5MT0iNDIuNzQ0JSIgeDI9Ijg5LjA2NCUiIHkyPSI1Ny4yMDglIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9IjAiIG9mZnNldD0iMCUiLz48c3RvcCBzdG9wLWNvbG9yPSIjRkZGIiBzdG9wLW9wYWNpdHk9Ii4zMDgiIG9mZnNldD0iNDkuNTY5JSIvPjxzdG9wIHN0b3AtY29sb3I9IiNGRkYiIHN0b3Atb3BhY2l0eT0iMCIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iLS4yNSIgeT0iLS4yNSIgd2lkdGg9IjU3LjUiIGhlaWdodD0iMjMuNSIgcng9IjExLjI1IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDEpIiBmaWxsPSIjMkMyQzJDIiBzdHJva2U9InVybCgjcHJlZml4X19hKSIgc3Ryb2tlLXdpZHRoPSIuNSIgZmlsbC1ydWxlPSJldmVub2RkIiBmaWxsLW9wYWNpdHk9Ii4zMDMiLz48L3N2Zz4=)", e.innerHTML = '<svg width="16px" height="17px" viewBox="0 0 16 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient x1="22.185491%" y1="100%" x2="66.8316686%" y2="6.67239121%" id="1"><stop stop-color="#FFFCFC" stop-opacity="0.6"></stop><stop stop-color="#FFFFFF" offset="100%"></stop></linearGradient></defs> <path fill="url(#1)" fill-rule="nonzero" transform="translate(2.16 2.16)" d="M11.2979686,2.71818182 C11.611378,2.71818182 11.8654465,2.97561809 11.8654465,3.29318182 C11.8654465,3.58428191 11.6519584,3.82485822 11.374972,3.86293275 L11.2979686,3.86818182 L10.464,3.868 L9.7236795,10.6246222 C9.64153248,11.3737453 9.04854423,11.9512142 8.32013277,12.0165596 L8.18206028,12.0227273 L3.68338622,12.0227273 C2.89302127,12.0227273 2.22904821,11.4205655 2.141767,10.6246222 L2.141767,10.6246222 L1.4,3.868 L0.567477876,3.86818182 C0.254068499,3.86818182 0,3.61074555 0,3.29318182 C0,3.00208173 0.213488114,2.76150541 0.49047449,2.72343089 L0.567477876,2.71818182 L11.2979686,2.71818182 Z M9.322,3.868 L2.542,3.868 L3.26978106,10.4976259 C3.28762252,10.6603274 3.39528004,10.7928487 3.53932022,10.8467307 L3.61412483,10.866894 L3.68338622,10.8727273 L8.18206028,10.8727273 C8.39410941,10.8727273 8.57224853,10.7111717 8.59566544,10.4976259 L8.59566544,10.4976259 L9.322,3.868 Z M8.16824216,0 C8.48165153,0 8.73572003,0.257436269 8.73572003,0.575 C8.73572003,0.866100087 8.52223192,1.1066764 8.24524554,1.14475093 L8.16824216,1.15 L3.69720434,1.15 C3.38379497,1.15 3.12972647,0.892563731 3.12972647,0.575 C3.12972647,0.283899913 3.34321458,0.0433235966 3.62020096,0.00524907226 L3.69720434,0 L8.16824216,0 Z"></path></svg>'), this.deleteButton = e, o.appendChild(e), e.style.left = `${i}px`, e.style.top = `${n}px`, e.onclick = () => {
|
|
31
|
+
o.removeChild(e), r();
|
|
32
|
+
}, e;
|
|
33
|
+
}
|
|
34
|
+
removeDeleteButton() {
|
|
35
|
+
this.deleteButton && this.deleteButton.remove();
|
|
36
|
+
}
|
|
37
|
+
tip(t) {
|
|
27
38
|
return () => this.closeTip();
|
|
28
39
|
}
|
|
29
40
|
closeTip() {
|
|
@@ -33,5 +44,5 @@ class a {
|
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
export {
|
|
36
|
-
|
|
47
|
+
p as Cursor
|
|
37
48
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -93,6 +93,7 @@ export declare class FiveDomEvents {
|
|
|
93
93
|
private config;
|
|
94
94
|
private get model();
|
|
95
95
|
private lastMouseDownEvent;
|
|
96
|
+
private lastTouchEvent;
|
|
96
97
|
constructor(five: Five, config?: EventHandlerConfig);
|
|
97
98
|
/**
|
|
98
99
|
* @description: added 时自动绑定事件,removed时自动解绑事件,也就是说只有物体在场景中的时候才会触发事件
|
|
@@ -119,6 +120,7 @@ export declare class FiveDomEvents {
|
|
|
119
120
|
private handleDomEvent;
|
|
120
121
|
private handleMouseEvent;
|
|
121
122
|
private handleMousedown;
|
|
123
|
+
private handleTouchStart;
|
|
122
124
|
private handleMouseup;
|
|
123
125
|
private handleMousemove;
|
|
124
126
|
private onDomEvent;
|