@realsee/dnalogel 4.0.0-webgpu.3 → 4.0.0-webgpu.4
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/floorplan.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +270 -35
- package/dist/index.js.map +1 -0
- package/dist/internal/{BasePlugin-CT5K8m36.js → BasePlugin-DC5m72La.js} +3 -3
- package/dist/internal/{BasePlugin-CT5K8m36.js.map → BasePlugin-DC5m72La.js.map} +1 -1
- package/dist/internal/BasePluginWithData-D_0W46_q.js +7 -0
- package/dist/internal/{BasePluginWithData-9z4tpAT4.js.map → BasePluginWithData-D_0W46_q.js.map} +1 -1
- package/dist/internal/{BetterTween-BX0aTvP1.js → BetterTween-DmptqE8m.js} +2 -2
- package/dist/internal/{BetterTween-BX0aTvP1.js.map → BetterTween-DmptqE8m.js.map} +1 -1
- package/dist/internal/{CSS3DRenderPlugin-ccSpcvwd.js → CSS3DRenderPlugin-CEatgl0m.js} +3 -3
- package/dist/internal/CSS3DRenderPlugin-CEatgl0m.js.map +1 -0
- package/dist/internal/{Controller-Csut_kcH.js → Controller-D6o4OGWJ.js} +8 -8
- package/dist/internal/{Controller-Csut_kcH.js.map → Controller-D6o4OGWJ.js.map} +1 -1
- package/dist/internal/{FiveDomEvents-3H9NvDOz.js → FiveDomEvents-BUBLFzti.js} +2 -2
- package/dist/internal/{FiveDomEvents-3H9NvDOz.js.map → FiveDomEvents-BUBLFzti.js.map} +1 -1
- package/dist/internal/FivePuppet-C6QmVY70.js +67 -0
- package/dist/internal/FivePuppet-C6QmVY70.js.map +1 -0
- package/dist/internal/{PointHelper-D565h9b_.js → PointHelper-DIhgdjY2.js} +48 -48
- package/dist/internal/{PointHelper-D565h9b_.js.map → PointHelper-DIhgdjY2.js.map} +1 -1
- package/dist/internal/{Polygon-CBGvYUfJ.js → Polygon-D3xIL1Pl.js} +30 -30
- package/dist/internal/{Polygon-CBGvYUfJ.js.map → Polygon-D3xIL1Pl.js.map} +1 -1
- package/dist/internal/{Prism-Dm5ESkgg.js → Prism-CJlyAEAU.js} +13 -13
- package/dist/internal/{Prism-Dm5ESkgg.js.map → Prism-CJlyAEAU.js.map} +1 -1
- package/dist/internal/{Rectangle-D-zkDycu.js → Rectangle-BpL9lNKU.js} +118 -129
- package/dist/internal/Rectangle-BpL9lNKU.js.map +1 -0
- package/dist/internal/{Work-DF8j5GnL.js → Work-BE4AgdwH.js} +9 -9
- package/dist/internal/{Work-DF8j5GnL.js.map → Work-BE4AgdwH.js.map} +1 -1
- package/dist/internal/{animationFrame-XGKHIeQK.js → animationFrame-CacKXN8l.js} +14 -3
- package/dist/internal/animationFrame-CacKXN8l.js.map +1 -0
- package/dist/internal/{area-maker-Bd9l2pIp.js → area-maker-Bnhx4SkH.js} +4 -4
- package/dist/internal/{area-maker-Bd9l2pIp.js.map → area-maker-Bnhx4SkH.js.map} +1 -1
- package/dist/internal/{boundingBox-DvCor5Hd.js → boundingBox-CIqXgNXW.js} +2 -2
- package/dist/internal/{boundingBox-DvCor5Hd.js.map → boundingBox-CIqXgNXW.js.map} +1 -1
- package/dist/internal/{camera-movement-CwI7UqUk.js → camera-movement-C1pwfMk_.js} +2 -2
- package/dist/internal/camera-movement-C1pwfMk_.js.map +1 -0
- package/dist/internal/{changeMode-BVGYCoqu.js → changeMode-D_I2AOjH.js} +2 -2
- package/dist/internal/{changeMode-BVGYCoqu.js.map → changeMode-D_I2AOjH.js.map} +1 -1
- package/dist/internal/{controller-BWkZT0l1.js → controller-DIDtFrBE.js} +1991 -2050
- package/dist/internal/controller-DIDtFrBE.js.map +1 -0
- package/dist/internal/{cruise-C3F0eNQ-.js → cruise-B50Tcq66.js} +2 -2
- package/dist/internal/{cruise-C3F0eNQ-.js.map → cruise-B50Tcq66.js.map} +1 -1
- package/dist/internal/{current-pano-image-DKUWluR-.js → current-pano-image-BCFr6njt.js} +4 -4
- package/dist/internal/{current-pano-image-DKUWluR-.js.map → current-pano-image-BCFr6njt.js.map} +1 -1
- package/dist/internal/{defaultUrls-CjKkS9k9.js → defaultUrls-CfMtGzqM.js} +14 -3
- package/dist/internal/defaultUrls-CfMtGzqM.js.map +1 -0
- package/dist/internal/{fire-scene-CczaBz2_.js → fire-scene-BzZGvyh_.js} +9 -4
- package/dist/internal/fire-scene-BzZGvyh_.js.map +1 -0
- package/dist/internal/{fiveModelLoad-mg-TnpnM.js → fiveModelLoad-BUIBYxzp.js} +2 -2
- package/dist/internal/{fiveModelLoad-mg-TnpnM.js.map → fiveModelLoad-BUIBYxzp.js.map} +1 -1
- package/dist/internal/{floorplan-KWlIsTvO.js → floorplan-C8BGw87S.js} +5 -5
- package/dist/internal/{floorplan-KWlIsTvO.js.map → floorplan-C8BGw87S.js.map} +1 -1
- package/dist/internal/{generatePolygonGeometry-B_5JFq8y.js → generatePolygonGeometry-BOnzdCaG.js} +181 -178
- package/dist/internal/generatePolygonGeometry-BOnzdCaG.js.map +1 -0
- package/dist/internal/{lookObject-wesf8xt6.js → lookObject-DuRab5wf.js} +2 -2
- package/dist/internal/{lookObject-wesf8xt6.js.map → lookObject-DuRab5wf.js.map} +1 -1
- package/dist/internal/{measure-BX6boAC7.js → measure-B4jFwdQ6.js} +5 -5
- package/dist/internal/{measure-BX6boAC7.js.map → measure-B4jFwdQ6.js.map} +1 -1
- package/dist/internal/{model-chassis-compass-InVNmOAQ.js → model-chassis-compass-C6NTVMLo.js} +2 -2
- package/dist/internal/{model-chassis-compass-InVNmOAQ.js.map → model-chassis-compass-C6NTVMLo.js.map} +1 -1
- package/dist/internal/{model-entry-door-guide-wZbyY77a.js → model-entry-door-guide-DnGTLY2s.js} +2 -2
- package/dist/internal/{model-entry-door-guide-wZbyY77a.js.map → model-entry-door-guide-DnGTLY2s.js.map} +1 -1
- package/dist/internal/{model-maker-uO8xlTuO.js → model-maker-B1mnDdKY.js} +15 -15
- package/dist/internal/{model-maker-uO8xlTuO.js.map → model-maker-B1mnDdKY.js.map} +1 -1
- package/dist/internal/{model-tv-video-DzXb2JRf.js → model-tv-video-BP-7HoDC.js} +2 -2
- package/dist/internal/{model-tv-video-DzXb2JRf.js.map → model-tv-video-BP-7HoDC.js.map} +1 -1
- package/dist/internal/{model-view-CBeeMM98.js → model-view-BWUU0-uq.js} +2 -2
- package/dist/internal/{model-view-CBeeMM98.js.map → model-view-BWUU0-uq.js.map} +1 -1
- package/dist/internal/object3d-helper-CbRRhnLV.js +7 -0
- package/dist/internal/{object3d-helper-DDYsVPN6.js.map → object3d-helper-CbRRhnLV.js.map} +1 -1
- package/dist/internal/{pano-compass-jSr629BP.js → pano-compass-BRTM0dCc.js} +7 -7
- package/dist/internal/{pano-compass-jSr629BP.js.map → pano-compass-BRTM0dCc.js.map} +1 -1
- package/dist/internal/{pano-door-label-DKoYIKLa.js → pano-door-label-BLjYGZrr.js} +3 -3
- package/dist/internal/{pano-door-label-DKoYIKLa.js.map → pano-door-label-BLjYGZrr.js.map} +1 -1
- package/dist/internal/{pano-measure-DW9mdx1O.js → pano-measure-BIgCWkVJ.js} +14 -14
- package/dist/internal/{pano-measure-DW9mdx1O.js.map → pano-measure-BIgCWkVJ.js.map} +1 -1
- package/dist/internal/{pano-ruler-pro-D7q0Ob21.js → pano-ruler-pro-D9yTbHJz.js} +2 -2
- package/dist/internal/{pano-ruler-pro-D7q0Ob21.js.map → pano-ruler-pro-D9yTbHJz.js.map} +1 -1
- package/dist/internal/{pano-spatial-tag-D0qn-__S.js → pano-spatial-tag-B7Gxn3BS.js} +3 -3
- package/dist/internal/{pano-spatial-tag-D0qn-__S.js.map → pano-spatial-tag-B7Gxn3BS.js.map} +1 -1
- package/dist/internal/{pano-tag-BW5MXXws.js → pano-tag-Bchz-jED.js} +2 -2
- package/dist/internal/{pano-tag-BW5MXXws.js.map → pano-tag-Bchz-jED.js.map} +1 -1
- package/dist/internal/{pano-video-Bmud_CAn.js → pano-video-BufYQMqo.js} +3 -3
- package/dist/internal/{pano-video-Bmud_CAn.js.map → pano-video-BufYQMqo.js.map} +1 -1
- package/dist/internal/{pipeline-DDqgb1gw.js → pipeline-t_3IMXKB.js} +4 -4
- package/dist/internal/{pipeline-DDqgb1gw.js.map → pipeline-t_3IMXKB.js.map} +1 -1
- package/dist/internal/{sculpt-BNkLJR6p.js → sculpt-BCK4PMwL.js} +64 -63
- package/dist/internal/{sculpt-BNkLJR6p.js.map → sculpt-BCK4PMwL.js.map} +1 -1
- package/dist/internal/tagPosition-DA9YguT8.js +176 -0
- package/dist/internal/tagPosition-DA9YguT8.js.map +1 -0
- package/dist/internal/withResolvers-DVr4bnnk.js +15 -0
- package/dist/internal/withResolvers-DVr4bnnk.js.map +1 -0
- package/dist/plugins/area-maker.js +1 -1
- package/dist/plugins/camera-movement.js +1 -1
- package/dist/plugins/cruise.js +2 -2
- package/dist/plugins/css3d-render.js +1 -1
- package/dist/plugins/current-pano-image.js +1 -1
- package/dist/plugins/digital-performance.d.ts +1 -1
- package/dist/plugins/digital-performance.js +1 -1
- package/dist/plugins/fire-scene.d.ts +1 -1
- package/dist/plugins/fire-scene.js +1 -1
- package/dist/plugins/guide-line.js +1 -1
- package/dist/plugins/measure.js +1 -1
- package/dist/plugins/model-chassis-compass.js +1 -1
- package/dist/plugins/model-entry-door-guide.js +1 -1
- package/dist/plugins/model-maker.d.ts +1 -1
- package/dist/plugins/model-maker.js +1 -1
- package/dist/plugins/model-tv-video.js +1 -1
- package/dist/plugins/model-view.js +1 -1
- package/dist/plugins/object3d-helper.d.ts +1 -1
- package/dist/plugins/object3d-helper.js +3 -1
- package/dist/plugins/pano-compass.js +1 -1
- package/dist/plugins/pano-door-label.js +1 -1
- package/dist/plugins/pano-measure.js +1 -1
- package/dist/plugins/pano-ruler-pro.js +1 -1
- package/dist/plugins/pano-spatial-tag.js +1 -1
- package/dist/plugins/pano-tag.d.ts +1 -1
- package/dist/plugins/pano-tag.js +4 -1
- package/dist/plugins/pano-video.js +1 -1
- package/dist/plugins/pipeline.js +1 -1
- package/dist/plugins/sculpt.d.ts +1 -1
- package/dist/plugins/sculpt.js +7 -1
- package/dist/types/public/index.d.ts +2 -0
- package/dist/types/public/plugins/digital-performance.d.ts +1 -0
- package/dist/types/public/plugins/fire-scene.d.ts +1 -0
- package/dist/types/public/plugins/model-maker.d.ts +1 -0
- package/dist/types/public/plugins/object3d-helper.d.ts +1 -0
- package/dist/types/public/plugins/pano-tag.d.ts +2 -0
- package/dist/types/public/plugins/sculpt.d.ts +8 -0
- package/dist/types/public/utils.d.ts +5 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +16 -50
- package/package.json +1 -1
- package/dist/internal/BasePluginWithData-9z4tpAT4.js +0 -7
- package/dist/internal/CSS3DRenderPlugin-ccSpcvwd.js.map +0 -1
- package/dist/internal/Rectangle-D-zkDycu.js.map +0 -1
- package/dist/internal/animationFrame-XGKHIeQK.js.map +0 -1
- package/dist/internal/blink-DD_0mH-m.js +0 -113
- package/dist/internal/blink-DD_0mH-m.js.map +0 -1
- package/dist/internal/camera-movement-CwI7UqUk.js.map +0 -1
- package/dist/internal/controller-BWkZT0l1.js.map +0 -1
- package/dist/internal/defaultUrls-CjKkS9k9.js.map +0 -1
- package/dist/internal/fire-scene-CczaBz2_.js.map +0 -1
- package/dist/internal/generatePolygonGeometry-B_5JFq8y.js.map +0 -1
- package/dist/internal/object3d-helper-DDYsVPN6.js +0 -7
- package/dist/utils.js.map +0 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as e } from "./Subscribe-DLlAl88n.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { i as t } from "./PointHelper-DIhgdjY2.js";
|
|
3
|
+
import { C as n, c as r } from "./generatePolygonGeometry-BOnzdCaG.js";
|
|
4
4
|
import { i } from "./util-vGeVT4oo.js";
|
|
5
5
|
import { n as a, t as o } from "./getNormal-BatLuzsS.js";
|
|
6
6
|
import { n as s } from "./isNil-CQNA0Sbe.js";
|
|
7
7
|
import { t as c } from "./rayOnLine-CrCXTByv.js";
|
|
8
|
-
import { a as l, c as u, d, f, i as p, l as m,
|
|
9
|
-
import {
|
|
10
|
-
import { i as
|
|
8
|
+
import { a as l, c as u, d, f, i as p, l as m, n as h, o as g, p as _, r as v, s as y, t as b, u as x } from "./Rectangle-BpL9lNKU.js";
|
|
9
|
+
import { t as S } from "./withResolvers-DVr4bnnk.js";
|
|
10
|
+
import { i as C, n as w, r as T } from "./Polygon-D3xIL1Pl.js";
|
|
11
|
+
import { i as E, r as D, t as O } from "./Prism-CJlyAEAU.js";
|
|
11
12
|
import { t as k } from "./recurveFindObject-1BZIH2bj.js";
|
|
12
13
|
import * as A from "three/webgpu";
|
|
13
14
|
//#region src/Sculpt/Objects/Polyline/Editor.ts
|
|
@@ -34,7 +35,7 @@ var j = class extends u {
|
|
|
34
35
|
get data() {
|
|
35
36
|
return {
|
|
36
37
|
...this.baseData,
|
|
37
|
-
points:
|
|
38
|
+
points: g(this.applyObjectMatrixWorld(this.polyLineMesh.points)),
|
|
38
39
|
style: {
|
|
39
40
|
lineColor: new A.Color(this.polyLineMesh.lineColor).getHex(),
|
|
40
41
|
lineWidth: this.polyLineMesh.lineWidth,
|
|
@@ -78,7 +79,7 @@ var j = class extends u {
|
|
|
78
79
|
function N(e, t, n) {
|
|
79
80
|
let r = e.parent;
|
|
80
81
|
if (!r) return;
|
|
81
|
-
let { promise: i, resolve: a, reject: o } =
|
|
82
|
+
let { promise: i, resolve: a, reject: o } = S(), s = n?.limit ?? "none", c = new D(e.style);
|
|
82
83
|
r.add(c);
|
|
83
84
|
let l = new D({
|
|
84
85
|
...e.style,
|
|
@@ -86,31 +87,31 @@ function N(e, t, n) {
|
|
|
86
87
|
lengthEnable: !1
|
|
87
88
|
});
|
|
88
89
|
r.add(l), t.enable();
|
|
89
|
-
let u = [], d, p, m
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
|
|
90
|
+
let u = [], d, f, p, m = [], h = () => u.length > 0, g = () => m.length > 0, _ = () => {
|
|
91
|
+
h() && (m.push(u.pop()), e.setPoints(u), b(p), t.pointSelectorHelper.magnifier.render());
|
|
92
|
+
}, v = () => {
|
|
93
|
+
g() && (u.push(m.pop()), e.setPoints(u), b(p), t.pointSelectorHelper.magnifier.render());
|
|
94
|
+
}, y = (t) => {
|
|
95
|
+
m.length = 0;
|
|
95
96
|
let n = u.length === 0 ? t.point : d.clone();
|
|
96
97
|
u.push(n), e.setPoints(u);
|
|
97
|
-
},
|
|
98
|
+
}, b = (e) => {
|
|
98
99
|
let n = () => {
|
|
99
100
|
c.setPoints([]), l.setPoints([]), d = null;
|
|
100
101
|
};
|
|
101
|
-
if (!e || (
|
|
102
|
+
if (!e || (p = e, !u?.length)) return n();
|
|
102
103
|
let r = u.at(-1).clone();
|
|
103
|
-
s === "none" ? (d = e.point, c.setPoints([r, d])) : s === "xoz" ? (
|
|
104
|
+
s === "none" ? (d = e.point, c.setPoints([r, d])) : s === "xoz" ? (f ??= new A.Plane().setFromNormalAndCoplanarPoint(new A.Vector3(0, 1, 0), u[0]), t.plane = f, d = f.projectPoint(e.point, new A.Vector3()), c.setPoints([r, d]), l.setPoints([d, e.point])) : s === "y" && (u.length === 1 ? (d = e.point, c.setPoints([r, d])) : (f ??= new A.Plane().setFromCoplanarPoints(u[0], u[1], new A.Vector3(0, 1, 0).add(u[0])), t.plane = f, d = f.projectPoint(e.point, new A.Vector3()), c.setPoints([r, d]), l.setPoints([d, e.point])));
|
|
104
105
|
};
|
|
105
|
-
return t.on("select",
|
|
106
|
-
if (t.off("select",
|
|
106
|
+
return t.on("select", y), t.on("intersectionUpdate", b), t.on("disable", () => {
|
|
107
|
+
if (t.off("select", y), t.off("intersectionUpdate", b), t.plane = null, r.remove(c), r.remove(l), u.length < 2) return r.remove(e), o(/* @__PURE__ */ Error("Cancelled"));
|
|
107
108
|
a();
|
|
108
109
|
}), {
|
|
109
110
|
finished: i,
|
|
110
|
-
canUndo:
|
|
111
|
-
canRedo:
|
|
112
|
-
undo:
|
|
113
|
-
redo:
|
|
111
|
+
canUndo: h,
|
|
112
|
+
canRedo: g,
|
|
113
|
+
undo: _,
|
|
114
|
+
redo: v
|
|
114
115
|
};
|
|
115
116
|
}
|
|
116
117
|
//#endregion
|
|
@@ -139,7 +140,7 @@ var P = class extends m {
|
|
|
139
140
|
get data() {
|
|
140
141
|
return {
|
|
141
142
|
...this.baseData,
|
|
142
|
-
point:
|
|
143
|
+
point: g(this.applyObjectMatrixWorld(this.pointMesh.position)),
|
|
143
144
|
style: {
|
|
144
145
|
color: this.pointMesh.color.getHex(),
|
|
145
146
|
size: this.pointMesh.size
|
|
@@ -185,7 +186,7 @@ function I(e, t) {
|
|
|
185
186
|
}
|
|
186
187
|
//#endregion
|
|
187
188
|
//#region src/Sculpt/Editors/PrismMeshEditor.ts
|
|
188
|
-
var L = class extends
|
|
189
|
+
var L = class extends x {
|
|
189
190
|
constructor(e) {
|
|
190
191
|
super(e, () => ({
|
|
191
192
|
positionFrom: () => e.worldCenter,
|
|
@@ -227,8 +228,8 @@ var L = class extends S {
|
|
|
227
228
|
get data() {
|
|
228
229
|
return {
|
|
229
230
|
...this.baseData,
|
|
230
|
-
points:
|
|
231
|
-
heightPoint:
|
|
231
|
+
points: g(this.applyObjectMatrixWorld(this.prismMesh.bottomPositions, this.prismMesh)),
|
|
232
|
+
heightPoint: g(this.applyObjectMatrixWorld(this.prismMesh.topPosition, this.prismMesh)),
|
|
232
233
|
style: {
|
|
233
234
|
color: this.prismMesh.color.getHex(),
|
|
234
235
|
lineWidth: this.prismMesh.lineWidth,
|
|
@@ -284,7 +285,7 @@ async function z(e, t, n) {
|
|
|
284
285
|
}
|
|
285
286
|
//#endregion
|
|
286
287
|
//#region src/Sculpt/Editors/CircleMeshEditor.ts
|
|
287
|
-
var B = class extends
|
|
288
|
+
var B = class extends x {
|
|
288
289
|
constructor(e) {
|
|
289
290
|
super(e, () => ({ yAxis: () => e.normal }));
|
|
290
291
|
}
|
|
@@ -356,8 +357,8 @@ var H = class extends w {
|
|
|
356
357
|
get data() {
|
|
357
358
|
return {
|
|
358
359
|
...this.baseData,
|
|
359
|
-
center:
|
|
360
|
-
normal:
|
|
360
|
+
center: g(this.applyObjectMatrixWorld(this.circleMesh.center, this.circleMesh)),
|
|
361
|
+
normal: g(this.circleMesh.normal.clone().applyQuaternion(this.circleMesh.quaternion)),
|
|
361
362
|
radius: this.circleMesh.radius,
|
|
362
363
|
style: { color: this.circleMesh.color.getHex() }
|
|
363
364
|
};
|
|
@@ -495,7 +496,7 @@ var K = class extends a {
|
|
|
495
496
|
let n = new A.Quaternion().setFromUnitVectors(new A.Vector3(0, 1, 0), this.normal.clone().normalize());
|
|
496
497
|
this.edgeMesh.position.copy(new A.Vector3().lerpVectors(t, e, .5)), this.edgeMesh.quaternion.copy(n);
|
|
497
498
|
}
|
|
498
|
-
}, q = class extends
|
|
499
|
+
}, q = class extends x {
|
|
499
500
|
constructor(e) {
|
|
500
501
|
super(e, () => {
|
|
501
502
|
let t = () => {
|
|
@@ -541,8 +542,8 @@ var K = class extends a {
|
|
|
541
542
|
get data() {
|
|
542
543
|
return {
|
|
543
544
|
...this.baseData,
|
|
544
|
-
bottomCenter:
|
|
545
|
-
topCenter:
|
|
545
|
+
bottomCenter: g(this.applyObjectMatrixWorld(this.cylinderMesh.bottomCenter, this.cylinderMesh)),
|
|
546
|
+
topCenter: g(this.applyObjectMatrixWorld(this.cylinderMesh.topCenter, this.cylinderMesh)),
|
|
546
547
|
radius: this.cylinderMesh.radius,
|
|
547
548
|
style: { color: this.cylinderMesh.color.getHex() }
|
|
548
549
|
};
|
|
@@ -604,14 +605,14 @@ var Z = class extends d {
|
|
|
604
605
|
type = "Line";
|
|
605
606
|
lineMesh;
|
|
606
607
|
get editor() {
|
|
607
|
-
return this._editor ||= new
|
|
608
|
+
return this._editor ||= new y(this), this._editor;
|
|
608
609
|
}
|
|
609
610
|
_editor;
|
|
610
611
|
creatingObject;
|
|
611
612
|
get data() {
|
|
612
613
|
return {
|
|
613
614
|
...this.baseData,
|
|
614
|
-
points:
|
|
615
|
+
points: g(this.applyObjectMatrixWorld(this.lineMesh.points)),
|
|
615
616
|
style: {
|
|
616
617
|
lineColor: new A.Color(this.lineMesh.color).getHex(),
|
|
617
618
|
lineWidth: this.lineMesh.lineWidth,
|
|
@@ -655,7 +656,7 @@ var Z = class extends d {
|
|
|
655
656
|
function Q(e, t, n) {
|
|
656
657
|
let i = e.parent;
|
|
657
658
|
if (!i) return;
|
|
658
|
-
let { promise: a, resolve: o, reject: s } =
|
|
659
|
+
let { promise: a, resolve: o, reject: s } = S(), l = n?.limit ?? "none", u = new r(e.style);
|
|
659
660
|
i.add(u);
|
|
660
661
|
let d = new r({
|
|
661
662
|
...e.style,
|
|
@@ -663,38 +664,38 @@ function Q(e, t, n) {
|
|
|
663
664
|
lengthEnable: !1
|
|
664
665
|
});
|
|
665
666
|
i.add(d), t.enable();
|
|
666
|
-
let
|
|
667
|
-
|
|
668
|
-
},
|
|
669
|
-
|
|
670
|
-
},
|
|
667
|
+
let f = [], p, m, h, g = [], _ = () => f.length > 0, v = () => g.length > 0, y = () => {
|
|
668
|
+
_() && (g.push(f.pop()), e.setPoints(f), C(h), t.pointSelectorHelper.magnifier.render());
|
|
669
|
+
}, b = () => {
|
|
670
|
+
v() && (f.push(g.pop()), e.setPoints(f), C(h), t.pointSelectorHelper.magnifier.render());
|
|
671
|
+
}, x = (t) => {
|
|
671
672
|
if (!t) return;
|
|
672
|
-
|
|
673
|
-
let n =
|
|
674
|
-
|
|
673
|
+
g.length = 0;
|
|
674
|
+
let n = f.length === 0 ? t.point : p.clone();
|
|
675
|
+
f.push(n), e.setPoints(f), f.length === 2 && (w(), o());
|
|
675
676
|
}, C = (e) => {
|
|
676
677
|
let n = () => {
|
|
677
678
|
u.setPoints([]), d.setPoints([]), t.pointSelectorHelper.magnifier.render();
|
|
678
679
|
};
|
|
679
|
-
if (!
|
|
680
|
-
|
|
681
|
-
let r =
|
|
682
|
-
l === "none" ? (
|
|
680
|
+
if (!f?.length || !e) return n();
|
|
681
|
+
h = e;
|
|
682
|
+
let r = f.at(-1).clone();
|
|
683
|
+
l === "none" ? (p = e.point, u.setPoints([r, p])) : l === "xoz" ? (t.plane = m, m ??= new A.Plane().setFromNormalAndCoplanarPoint(new A.Vector3(0, 1, 0), f[0]), p = m.projectPoint(e.point, new A.Vector3()), u.setPoints([r, p]), d.setPoints([p, e.point])) : l === "y" && (e.isVirtual ? (p = c({
|
|
683
684
|
raycaster: e.raycaster,
|
|
684
|
-
line: new A.Line3(
|
|
685
|
+
line: new A.Line3(f[0].clone(), new A.Vector3(0, 1, 0).add(f[0])),
|
|
685
686
|
clampToLine: !1
|
|
686
|
-
}), d.setPoints([])) : (
|
|
687
|
+
}), d.setPoints([])) : (p = new A.Line3(f[0].clone(), new A.Vector3(0, 1, 0).add(f[0])).closestPointToPoint(e.point, !1, new A.Vector3()), d.setPoints([p, e.point])), u.setPoints([r, p]));
|
|
687
688
|
}, w = () => {
|
|
688
|
-
t.off("select",
|
|
689
|
+
t.off("select", x), t.off("intersectionUpdate", C), t.off("disable", T), t.plane = null, t.disable(), i?.remove(u, d);
|
|
689
690
|
}, T = () => {
|
|
690
|
-
w(),
|
|
691
|
+
w(), f.length !== 2 && i?.remove(e), s(/* @__PURE__ */ Error("Cancelled"));
|
|
691
692
|
};
|
|
692
|
-
return t.on("select",
|
|
693
|
+
return t.on("select", x), t.on("intersectionUpdate", C), t.on("disable", T), {
|
|
693
694
|
finished: a,
|
|
694
|
-
canUndo:
|
|
695
|
-
canRedo:
|
|
696
|
-
undo:
|
|
697
|
-
redo:
|
|
695
|
+
canUndo: _,
|
|
696
|
+
canRedo: v,
|
|
697
|
+
undo: y,
|
|
698
|
+
redo: b
|
|
698
699
|
};
|
|
699
700
|
}
|
|
700
701
|
//#endregion
|
|
@@ -729,7 +730,7 @@ var $ = class extends e {
|
|
|
729
730
|
dragEnabled: !0
|
|
730
731
|
},
|
|
731
732
|
...r
|
|
732
|
-
}, this.group = new a(), this.group.name = "Sculpt", n(this.group, this.five), e.scene.add(this.group), this.modules = new
|
|
733
|
+
}, this.group = new a(), this.group.name = "Sculpt", n(this.group, this.five), e.scene.add(this.group), this.modules = new f(e, this.config), _(this.group, this.modules);
|
|
733
734
|
let i = e.getElement();
|
|
734
735
|
this.initialTabIndex = i.tabIndex, i.tabIndex < 0 && (i.tabIndex = 0), i.addEventListener("pointerdown", this.focusScene), i.addEventListener("keydown", this.onKeyDown), e.on("dispose", this.dispose), this.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: e, origDomEvent: t }) => {
|
|
735
736
|
let n = k(e?.[0]?.object, (e) => e.isSculptObject);
|
|
@@ -771,7 +772,7 @@ var $ = class extends e {
|
|
|
771
772
|
...e.style
|
|
772
773
|
}
|
|
773
774
|
};
|
|
774
|
-
return e.type === "Point" ? new F(this.modules, n, t) : e.type === "Line" || e.type === "line" ? new Z(this.modules, n, t) : e.type === "Polyline" ? new M(this.modules, n, t) : e.type === "Polygon" ? new
|
|
775
|
+
return e.type === "Point" ? new F(this.modules, n, t) : e.type === "Line" || e.type === "line" ? new Z(this.modules, n, t) : e.type === "Polyline" ? new M(this.modules, n, t) : e.type === "Polygon" ? new v(this.modules, n, t) : e.type === "Prism" ? new R(this.modules, n, t) : e.type === "Rectangle" ? new b(this.modules, n, t) : e.type === "Circle" ? new W(this.modules, n, t) : e.type === "Cylinder" ? new J(this.modules, n, t) : e.type === "Box" ? new h(this.modules, n, t) : null;
|
|
775
776
|
});
|
|
776
777
|
this.group.add(...r), this.five.needsRender = !0;
|
|
777
778
|
}
|
|
@@ -801,7 +802,7 @@ var $ = class extends e {
|
|
|
801
802
|
}, t.__onWillAddPoint = (e, t) => {
|
|
802
803
|
let n = this.creatingItem;
|
|
803
804
|
this.emit("polygon.experimental_point_will_add", n, e, t);
|
|
804
|
-
}, e[0] = t, this.createItem(
|
|
805
|
+
}, e[0] = t, this.createItem(v, ...e);
|
|
805
806
|
}
|
|
806
807
|
async createPrism(...e) {
|
|
807
808
|
Object.assign(e[0] ?? {}, this.theme?.prism, e[0]);
|
|
@@ -815,7 +816,7 @@ var $ = class extends e {
|
|
|
815
816
|
}, e[0] = t, this.createItem(R, ...e);
|
|
816
817
|
}
|
|
817
818
|
async createRectangle(...e) {
|
|
818
|
-
return Object.assign(e[0] ?? {}, this.theme?.rectangle, e[0]), this.createItem(
|
|
819
|
+
return Object.assign(e[0] ?? {}, this.theme?.rectangle, e[0]), this.createItem(b, ...e);
|
|
819
820
|
}
|
|
820
821
|
async createCircle(...e) {
|
|
821
822
|
return Object.assign(e[0] ?? {}, this.theme?.circle, e[0]), this.createItem(W, ...e);
|
|
@@ -824,7 +825,7 @@ var $ = class extends e {
|
|
|
824
825
|
return Object.assign(e[0] ?? {}, this.theme?.cylinder, e[0]), this.createItem(J, ...e);
|
|
825
826
|
}
|
|
826
827
|
async createBox(...e) {
|
|
827
|
-
return Object.assign(e[0] ?? {}, this.theme?.box, e[0]), this.createItem(
|
|
828
|
+
return Object.assign(e[0] ?? {}, this.theme?.box, e[0]), this.createItem(h, ...e);
|
|
828
829
|
}
|
|
829
830
|
canUndo() {
|
|
830
831
|
if (this.creatingItem) return this.creatingItem.canUndo();
|
|
@@ -874,6 +875,6 @@ function te(e) {
|
|
|
874
875
|
return e instanceof O;
|
|
875
876
|
}
|
|
876
877
|
//#endregion
|
|
877
|
-
export {
|
|
878
|
+
export { I as a, Q as i, $ as n, ee as r, te as t };
|
|
878
879
|
|
|
879
|
-
//# sourceMappingURL=sculpt-
|
|
880
|
+
//# sourceMappingURL=sculpt-BCK4PMwL.js.map
|