@realsee/dnalogel 3.49.9 → 3.49.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/index.cjs.js +4 -4
- package/dist/index.js +8 -9
- package/dist/index.umd.js +4 -4
- package/dist/shared-utils/three/PointSelector/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Line/index.js +2 -0
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/PointSelector/index.d.ts +1 -1
- package/libs/shared-utils/three/PointSelector/index.js +12 -15
- package/package.json +1 -1
|
@@ -102,6 +102,8 @@ function K(n, t, e) {
|
|
|
102
102
|
}, D = () => {
|
|
103
103
|
M() && (i.push(m.pop()), n.setPoints(i), g(v), t.pointSelectorHelper.magnifier.render());
|
|
104
104
|
}, E = (r) => {
|
|
105
|
+
if (!r)
|
|
106
|
+
return;
|
|
105
107
|
m.length = 0;
|
|
106
108
|
const u = i.length === 0 ? r.point : h.clone();
|
|
107
109
|
i.push(u), n.setPoints(i), i.length === 2 && (x(), P());
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.49.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.49.10",
|
|
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",
|
|
@@ -16,11 +16,11 @@ import { isTouchDevice as v } from "../../isTouchDevice.js";
|
|
|
16
16
|
import M from "hammerjs";
|
|
17
17
|
import * as d from "three";
|
|
18
18
|
import { Subscribe as N } from "../../Subscribe.js";
|
|
19
|
-
import { getIntersectByRaycaster as F, getVirtualIntersectByRaycaster as
|
|
20
|
-
import { getRaycasterByNdcPosition as
|
|
19
|
+
import { getIntersectByRaycaster as F, getVirtualIntersectByRaycaster as L } from "../../five/getPosition.js";
|
|
20
|
+
import { getRaycasterByNdcPosition as U } from "../../five/getRaycasterByNdcPosition.js";
|
|
21
21
|
import { CURSOR_NOT_ALLOW_URL as P } from "./utils/contents.js";
|
|
22
|
-
const
|
|
23
|
-
class
|
|
22
|
+
const C = new d.Vector3(), u = () => !1;
|
|
23
|
+
class k extends N {
|
|
24
24
|
constructor(e, t) {
|
|
25
25
|
var a, o, c;
|
|
26
26
|
super();
|
|
@@ -73,11 +73,8 @@ class G extends N {
|
|
|
73
73
|
i(this, "onLeave", () => {
|
|
74
74
|
this.pointSelectorHelper.hide(), this.outOfFive = !0, this.emit("intersectionUpdate", null);
|
|
75
75
|
});
|
|
76
|
-
i(this, "
|
|
77
|
-
|
|
78
|
-
clientX: e.center.x,
|
|
79
|
-
clientY: e.center.y
|
|
80
|
-
}), this.select();
|
|
76
|
+
i(this, "onClick", () => {
|
|
77
|
+
this.select();
|
|
81
78
|
});
|
|
82
79
|
/**
|
|
83
80
|
* 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
|
|
@@ -117,11 +114,11 @@ class G extends N {
|
|
|
117
114
|
*/
|
|
118
115
|
i(this, "updateByNdcPosition", (e) => {
|
|
119
116
|
var h, a;
|
|
120
|
-
const t =
|
|
117
|
+
const t = U(this.five, e), r = F(this.five, t);
|
|
121
118
|
if (r)
|
|
122
119
|
return this.updatePointSelectorHelperIntersect(r), this.lastIntersection = r, !0;
|
|
123
120
|
if (this.plane) {
|
|
124
|
-
const o = t.ray.intersectPlane(this.plane,
|
|
121
|
+
const o = t.ray.intersectPlane(this.plane, C);
|
|
125
122
|
if (o) {
|
|
126
123
|
const c = {
|
|
127
124
|
distance: this.five.camera.position.distanceTo(o),
|
|
@@ -137,7 +134,7 @@ class G extends N {
|
|
|
137
134
|
if (this.actionIfNoModelUnderMouse === "lastPoint")
|
|
138
135
|
return this.updatePointSelectorHelperIntersect(this.lastIntersection), !0;
|
|
139
136
|
if (this.actionIfNoModelUnderMouse === "virtualPoint") {
|
|
140
|
-
const o =
|
|
137
|
+
const o = L(t, (h = this.lastIntersection) == null ? void 0 : h.distance);
|
|
141
138
|
return o.face = new d.Face3(0, 0, 0, (a = this.lastIntersection) == null ? void 0 : a.face.normal), o.isVirtual = !0, this.lastIntersection = o, this.updatePointSelectorHelperIntersect(o), !0;
|
|
142
139
|
} else if (this.actionIfNoModelUnderMouse === "disable")
|
|
143
140
|
return this.updatePointSelectorHelperIntersect(null), !1;
|
|
@@ -227,14 +224,14 @@ class G extends N {
|
|
|
227
224
|
const e = this.five.getElement();
|
|
228
225
|
if (!e)
|
|
229
226
|
throw new Error("five element not found");
|
|
230
|
-
this.hammer || (this.hammer = new M(e)), this.mode === "cursor" ? (this.five.on("wantsMoveToPano", u), this.five.on("wantsChangeMode", u), this.five.on("wantsTapGesture", u), e.addEventListener("mousemove", this.updateByMousePosition), v || e.addEventListener("wheel", this.onMouseWheel), e.addEventListener("
|
|
227
|
+
this.hammer || (this.hammer = new M(e)), this.mode === "cursor" ? (this.five.on("wantsMoveToPano", u), this.five.on("wantsChangeMode", u), this.five.on("wantsTapGesture", u), e.addEventListener("mousemove", this.updateByMousePosition), v || e.addEventListener("wheel", this.onMouseWheel), e.addEventListener("click", this.onClick), e.addEventListener("mouseenter", this.onEnter), e.addEventListener("mouseout", this.onLeave), this.five.on("wantsPanGesture", this.onFiveWantsPanGesture), this.hammer.on("pan", this.onPan), this.hammer.on("press", this.onPress), this.hammer.on("panend", this.onPanEnd)) : this.mode === "fixed" && (this.five.on("panoArrived", this.renderScreenCenter), this.five.on("panGesture", this.renderScreenCenter), this.five.on("interiaPan", this.renderScreenCenter), this.renderScreenCenter(), this.pointSelectorHelper.show()), this.pointSelectorHelper.hooks.on("intersectionUpdate", this.emitIntersectionUpdate), this.lastFiveHelperVisible = this.five.helperVisible, this.five.helperVisible = !1, this.emit("enable");
|
|
231
228
|
}
|
|
232
229
|
disable() {
|
|
233
230
|
if (!this.enabled)
|
|
234
231
|
return;
|
|
235
232
|
this.enabled = !1, this.pointSelectorHelper.disable(), this.five.getElement().style.cursor = "";
|
|
236
233
|
const e = this.five.getElement();
|
|
237
|
-
this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", u), this.five.off("wantsChangeMode", u), this.five.off("wantsTapGesture", u), this.five.helperVisible = this.lastFiveHelperVisible, e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("wheel", this.onMouseWheel), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave),
|
|
234
|
+
this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", u), this.five.off("wantsChangeMode", u), this.five.off("wantsTapGesture", u), this.five.helperVisible = this.lastFiveHelperVisible, e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("wheel", this.onMouseWheel), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave), e == null || e.removeEventListener("click", this.onClick), this.hammer.off("pan", this.onPan), this.hammer.off("press", this.onPress), this.hammer.off("panend", this.onPanEnd), this.five.off("panoArrived", this.renderScreenCenter), this.five.off("panGesture", this.renderScreenCenter), this.five.off("interiaPan", this.renderScreenCenter), this.pointSelectorHelper.hooks.off("intersectionUpdate", this.emitIntersectionUpdate), this.emit("disable");
|
|
238
235
|
}
|
|
239
236
|
dispose() {
|
|
240
237
|
this.disable(), this.pointSelectorHelper.dispose();
|
|
@@ -244,5 +241,5 @@ class G extends N {
|
|
|
244
241
|
}
|
|
245
242
|
}
|
|
246
243
|
export {
|
|
247
|
-
|
|
244
|
+
k as PointSelector
|
|
248
245
|
};
|