@realsee/dnalogel 3.48.0 → 3.48.2
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/Objects/Base/index.d.ts +16 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +12 -1
- package/dist/Sculpt/Objects/Polygon/index.d.ts +12 -1
- package/dist/Sculpt/Objects/Polyline/index.d.ts +12 -1
- package/dist/Sculpt/index.d.ts +10 -3
- package/dist/index.cjs.js +57 -57
- package/dist/index.js +5011 -4885
- package/dist/index.umd.js +50 -50
- package/dist/shared-utils/promise/withResolvers.d.ts +10 -0
- package/dist/shared-utils/three/Magnifier.d.ts +1 -1
- package/dist/shared-utils/three/PointSelector/utils/PointSelectorHelper.d.ts +4 -1
- package/libs/Sculpt/Meshes/Line.js +15 -15
- package/libs/Sculpt/Meshes/Polygon.js +20 -20
- package/libs/Sculpt/Objects/Base/index.d.ts +16 -0
- package/libs/Sculpt/Objects/Base/index.js +58 -32
- package/libs/Sculpt/Objects/Box/index.js +31 -34
- package/libs/Sculpt/Objects/Circle/index.js +36 -39
- package/libs/Sculpt/Objects/Line/index.d.ts +12 -1
- package/libs/Sculpt/Objects/Line/index.js +104 -75
- package/libs/Sculpt/Objects/Point/index.js +13 -16
- package/libs/Sculpt/Objects/Polygon/index.d.ts +12 -1
- package/libs/Sculpt/Objects/Polygon/index.js +112 -84
- package/libs/Sculpt/Objects/Polyline/index.d.ts +12 -1
- package/libs/Sculpt/Objects/Polyline/index.js +97 -68
- package/libs/Sculpt/Objects/Prism/index.js +20 -23
- package/libs/Sculpt/Objects/Rectangle/index.js +36 -39
- package/libs/Sculpt/index.d.ts +10 -3
- package/libs/Sculpt/index.js +80 -65
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +127 -126
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/promise/withResolvers.d.ts +10 -0
- package/libs/shared-utils/promise/withResolvers.js +13 -0
- package/libs/shared-utils/tag.js +9 -9
- package/libs/shared-utils/three/Magnifier.d.ts +1 -1
- package/libs/shared-utils/three/Magnifier.js +12 -12
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.d.ts +4 -1
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +9 -9
- package/package.json +1 -1
|
@@ -57,13 +57,13 @@ export declare class Magnifier {
|
|
|
57
57
|
y: number;
|
|
58
58
|
}): void;
|
|
59
59
|
resetOffset(): void;
|
|
60
|
+
render(): void;
|
|
60
61
|
protected getRenderCenter(): THREE.Vector3 | {
|
|
61
62
|
x: number;
|
|
62
63
|
y: number;
|
|
63
64
|
};
|
|
64
65
|
private _appendTo;
|
|
65
66
|
private autoFixPCPosition;
|
|
66
|
-
private render;
|
|
67
67
|
private initStyle;
|
|
68
68
|
private getPanOffset;
|
|
69
69
|
private onPanstart;
|
|
@@ -84,6 +84,18 @@ class E {
|
|
|
84
84
|
resetOffset() {
|
|
85
85
|
this.offset = { x: 0, y: 0 }, this.canvas.style.transform = "translate3d(0px, 0px, 100px)";
|
|
86
86
|
}
|
|
87
|
+
render() {
|
|
88
|
+
if (!this.five.renderer || !this.containerDom)
|
|
89
|
+
return;
|
|
90
|
+
const { scale: t, context: e, width: i, height: s } = this, h = this.five.renderer.getSize(new l.Vector2()), [o, a] = (() => {
|
|
91
|
+
if (this.renderCenter instanceof l.Vector3) {
|
|
92
|
+
const v = this.renderCenter.clone().project(this.five.camera);
|
|
93
|
+
return [(v.x + 1) / 2 * h.x, (v.y + 1) / 2 * h.y];
|
|
94
|
+
} else
|
|
95
|
+
return [this.renderCenter.x, h.y - this.renderCenter.y];
|
|
96
|
+
})(), f = 1, c = i / t, g = s / t, y = f * t, u = this.five.getPixels(o - c / 2, a - c / 2, c, g, y), x = Math.floor(i * f), m = Math.floor(s * f);
|
|
97
|
+
D(u, x, m), (this.imageData.width !== x || this.imageData.height !== m) && (this.imageData = new ImageData(x, m)), this.imageData.data.set(u), e.putImageData(this.imageData, 0, 0), this.canvas.style.visibility = "visible";
|
|
98
|
+
}
|
|
87
99
|
getRenderCenter() {
|
|
88
100
|
return this.renderCenter;
|
|
89
101
|
}
|
|
@@ -113,18 +125,6 @@ class E {
|
|
|
113
125
|
})();
|
|
114
126
|
h < 183 ? (this.canvas.style.top = -e / 2 + "px", this.canvas.style.left = "90px") : a < 183 ? (this.canvas.style.top = "90px", this.canvas.style.left = -t / 2 + "px") : o < 183 ? (this.canvas.style.top = -e / 2 + "px", this.canvas.style.left = -t - 90 + "px") : (this.canvas.style.left = -t / 2 + "px", this.canvas.style.top = -e - 90 + "px"), this.canvas.style.transform = `translate3d(${h}px, ${a}px, 10px)`, this.offset = { x: h, y: a };
|
|
115
127
|
}
|
|
116
|
-
render() {
|
|
117
|
-
if (!this.five.renderer || !this.containerDom)
|
|
118
|
-
return;
|
|
119
|
-
const { scale: t, context: e, width: i, height: s } = this, h = this.five.renderer.getSize(new l.Vector2()), [o, a] = (() => {
|
|
120
|
-
if (this.renderCenter instanceof l.Vector3) {
|
|
121
|
-
const v = this.renderCenter.clone().project(this.five.camera);
|
|
122
|
-
return [(v.x + 1) / 2 * h.x, (v.y + 1) / 2 * h.y];
|
|
123
|
-
} else
|
|
124
|
-
return [this.renderCenter.x, h.y - this.renderCenter.y];
|
|
125
|
-
})(), f = 1, c = i / t, g = s / t, y = f * t, u = this.five.getPixels(o - c / 2, a - c / 2, c, g, y), x = Math.floor(i * f), m = Math.floor(s * f);
|
|
126
|
-
D(u, x, m), (this.imageData.width !== x || this.imageData.height !== m) && (this.imageData = new ImageData(x, m)), this.imageData.data.set(u), e.putImageData(this.imageData, 0, 0), this.canvas.style.visibility = "visible";
|
|
127
|
-
}
|
|
128
128
|
initStyle() {
|
|
129
129
|
const t = this.canvas;
|
|
130
130
|
t.classList.add("five-plugin__magnifier"), t.style.position = "absolute", t.style.pointerEvents = this.config.dragEnabled ? "all" : "none", t.style.borderRadius = "50%", t.style.zIndex = "99";
|
|
@@ -27,7 +27,10 @@ export declare class PointSelectorHelper {
|
|
|
27
27
|
position: PointIntersection | undefined;
|
|
28
28
|
magnifier: Magnifier | null;
|
|
29
29
|
pointHelper: PointHelperAbstract | null;
|
|
30
|
-
|
|
30
|
+
state: {
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
visible: boolean;
|
|
33
|
+
};
|
|
31
34
|
private group;
|
|
32
35
|
constructor(five: Five, options?: PointSelectorHelperConfig);
|
|
33
36
|
show: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var t = (a, i, e) => (
|
|
4
|
-
import * as
|
|
2
|
+
var p = (a, i, e) => i in a ? f(a, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[i] = e;
|
|
3
|
+
var t = (a, i, e) => (p(a, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
|
+
import * as m from "three";
|
|
5
5
|
import { Magnifier as u } from "../../Magnifier.js";
|
|
6
6
|
import { PointHelper as b } from "./PointHelper.js";
|
|
7
7
|
import { Subscribe as g } from "../../../Subscribe.js";
|
|
@@ -16,7 +16,7 @@ class P {
|
|
|
16
16
|
t(this, "magnifier", null);
|
|
17
17
|
t(this, "pointHelper", null);
|
|
18
18
|
t(this, "state", { enabled: !1, visible: !0 });
|
|
19
|
-
t(this, "group", new
|
|
19
|
+
t(this, "group", new m.Group());
|
|
20
20
|
t(this, "show", () => {
|
|
21
21
|
var i, e;
|
|
22
22
|
this.state.visible || (this.state.visible = !0, (i = this.pointHelper) == null || i.show(), (e = this.magnifier) == null || e.enable(), this.five.needsRender = !0);
|
|
@@ -31,21 +31,21 @@ class P {
|
|
|
31
31
|
return;
|
|
32
32
|
this.abortUpdateMagnifier(), this.position = i, e.emitEvent && this.hooks.emit("intersectionUpdate", i), (s = this.pointHelper) == null || s.updateWithIntersect(i);
|
|
33
33
|
const r = () => {
|
|
34
|
-
var
|
|
35
|
-
return (
|
|
34
|
+
var h;
|
|
35
|
+
return (h = this.magnifier) == null ? void 0 : h.renderWithPoint(i.point);
|
|
36
36
|
};
|
|
37
37
|
this.abortUpdateMagnifier = () => this.five.off("renderFrame", r), this.five.once("renderFrame", r), this.five.needsRender = !0;
|
|
38
38
|
});
|
|
39
39
|
t(this, "abortUpdateMagnifier", () => {
|
|
40
40
|
});
|
|
41
|
-
var s,
|
|
41
|
+
var s, h, n, l, d;
|
|
42
42
|
this.five = i, this.magnifier = (e == null ? void 0 : e.magnifier) !== void 0 ? e.magnifier : new u(i, (s = e == null ? void 0 : e.magnifierParams) != null ? s : { dragEnabled: !0 });
|
|
43
43
|
let r;
|
|
44
|
-
(e == null ? void 0 : e.pointHelper) === "default" || (e == null ? void 0 : e.pointHelper) === void 0 ? r = new b(i) : (e == null ? void 0 : e.pointHelper) === "highlight" ? r = new o(i) : r = e.pointHelper, this.pointHelper = r, this.group.name = "five-point-selector", this.five.scene.add(this.group), (d = this.magnifier) == null || d.appendTo((l = (
|
|
44
|
+
(e == null ? void 0 : e.pointHelper) === "default" || (e == null ? void 0 : e.pointHelper) === void 0 ? r = new b(i) : (e == null ? void 0 : e.pointHelper) === "highlight" ? r = new o(i) : r = e.pointHelper, this.pointHelper = r, this.group.name = "five-point-selector", this.five.scene.add(this.group), (d = this.magnifier) == null || d.appendTo((l = (n = e.container) != null ? n : (h = i.getElement()) == null ? void 0 : h.parentElement) != null ? l : document.body);
|
|
45
45
|
}
|
|
46
46
|
enable() {
|
|
47
47
|
var i;
|
|
48
|
-
this.state.enabled || (this.state.enabled = !0, this.pointHelper && this.group.add(this.pointHelper), (i = this.magnifier) == null || i.enable(), this.five.needsRender = !0, this.hooks.emit("enabled"));
|
|
48
|
+
this.state.enabled || (this.state.enabled = !0, this.pointHelper && (this.group.add(this.pointHelper), this.pointHelper.show()), (i = this.magnifier) == null || i.enable(), this.five.needsRender = !0, this.hooks.emit("enabled"));
|
|
49
49
|
}
|
|
50
50
|
disable() {
|
|
51
51
|
var i;
|