@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
package/dist/internal/{generatePolygonGeometry-B_5JFq8y.js → generatePolygonGeometry-BOnzdCaG.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./getFiveModel-CZVrrU1D.js";
|
|
2
|
-
import { t } from "./fiveModelLoad-
|
|
2
|
+
import { n as t } from "./fiveModelLoad-BUIBYxzp.js";
|
|
3
3
|
import { i as n, n as r, r as i, t as a } from "./util-vGeVT4oo.js";
|
|
4
4
|
import { n as o, t as s } from "./getNormal-BatLuzsS.js";
|
|
5
5
|
import { t as c } from "./FiveUtil-DyTBRHpM.js";
|
|
@@ -8,16 +8,16 @@ import { t as d } from "./throttle-YRIkRKaX.js";
|
|
|
8
8
|
import { n as f } from "./isNil-CQNA0Sbe.js";
|
|
9
9
|
import { n as p, r as m, t as h } from "./Line2-CDxLMjGj.js";
|
|
10
10
|
import * as g from "three/webgpu";
|
|
11
|
-
import { Vector2 as
|
|
11
|
+
import { Vector2 as ee, Vector3 as _ } from "three/webgpu";
|
|
12
12
|
//#region src/shared-utils/five/getFiveFromParentChain.ts
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
|
|
13
|
+
var v = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
function y(e, t) {
|
|
15
|
+
v.set(e, t);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function b(e) {
|
|
18
18
|
let t = e;
|
|
19
19
|
for (; t;) {
|
|
20
|
-
let e =
|
|
20
|
+
let e = v.get(t);
|
|
21
21
|
if (e) return e;
|
|
22
22
|
t = t.parent;
|
|
23
23
|
}
|
|
@@ -53,7 +53,7 @@ function ae(e) {
|
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/shared-utils/tag.ts
|
|
56
|
-
var oe = new
|
|
56
|
+
var oe = new ee(), S = class {
|
|
57
57
|
container;
|
|
58
58
|
visible = !1;
|
|
59
59
|
enabled = !1;
|
|
@@ -207,7 +207,7 @@ function ce(e, t) {
|
|
|
207
207
|
}
|
|
208
208
|
//#endregion
|
|
209
209
|
//#region src/Sculpt/utils/Meshes/getLengthHTML.ts
|
|
210
|
-
function
|
|
210
|
+
function C(e, t) {
|
|
211
211
|
if (!document.getElementById("LineLengthTagStyle")) {
|
|
212
212
|
let e = document.createElement("style");
|
|
213
213
|
e.id = "LineLengthTagStyle", document.head.appendChild(e), e.innerHTML = "\n .LineLengthTag {\n cursor: default;\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: Arial-BoldMT;\n font-weight: BoldMT;\n color: #041066;\n letter-spacing: 0;\n line-height: 20px;\n background-color: #FFFFFF;\n border-radius: 12px;\n padding: 2px 8px;\n left: 50%;\n transform: translate(-50%, -50%);\n white-space: nowrap;\n word-break: keep-all;\n --distance-scale: 1; /* Default scale if not provided */\n transition: font-size 0.5s ease; /* Smooth transition for font size */\n }\n \n /* sm screen */\n @media screen and (max-width: 499px) {\n .LineLengthTag {\n font-size: calc(12px + (14px - 12px) * var(--distance-scale));\n }\n }\n \n /* md screen */\n @media screen and (min-width: 500px) and (max-width: 929px) {\n .LineLengthTag {\n font-size: calc(12px + (14px - 12px) * var(--distance-scale));\n }\n }\n \n /* lg screen */\n @media screen and (min-width: 930px) and (max-width: 1365px) {\n .LineLengthTag {\n font-size: calc(14px + (16px - 14px) * var(--distance-scale));\n }\n }\n \n /* xl screen */\n @media screen and (min-width: 1366px) and (max-width: 2549px) {\n .LineLengthTag {\n font-size: calc(14px + (16px - 14px) * var(--distance-scale));\n }\n }\n \n /* xxl screen */\n @media screen and (min-width: 2550px) {\n .LineLengthTag {\n font-size: calc(0.875rem + (1rem - 0.875rem) * var(--distance-scale));\n }\n }\n ";
|
|
@@ -221,24 +221,24 @@ function le(e, t) {
|
|
|
221
221
|
}
|
|
222
222
|
//#endregion
|
|
223
223
|
//#region src/shared-utils/three/applyObjectMatrixWorld.ts
|
|
224
|
-
function
|
|
224
|
+
function w(e, t) {
|
|
225
225
|
let n = a(t).map((t) => e.localToWorld(t.clone()));
|
|
226
226
|
return Array.isArray(t) ? n : n[0];
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function le(e, t) {
|
|
229
229
|
let n = a(t).map((t) => e.worldToLocal(t.clone()));
|
|
230
230
|
return Array.isArray(t) ? n : n[0];
|
|
231
231
|
}
|
|
232
232
|
//#endregion
|
|
233
233
|
//#region src/shared-utils/three/core/LineMaterial2.ts
|
|
234
|
-
var
|
|
234
|
+
var ue = class extends p {
|
|
235
235
|
constructor(e = {}) {
|
|
236
236
|
super(e);
|
|
237
237
|
}
|
|
238
238
|
};
|
|
239
239
|
//#endregion
|
|
240
240
|
//#region src/Sculpt/utils/unit.ts
|
|
241
|
-
function
|
|
241
|
+
function de(e, t) {
|
|
242
242
|
let n = Math.floor(e + 1e-9), r = e - n;
|
|
243
243
|
if (Math.abs(r) < 1e-9) return String(n);
|
|
244
244
|
let i = Math.round(r * t);
|
|
@@ -247,7 +247,7 @@ function fe(e, t) {
|
|
|
247
247
|
let a = `${i}/${t}`;
|
|
248
248
|
return n === 0 ? a : `${n}-${a}`;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function fe(e, t = "m", n = 2) {
|
|
251
251
|
let r;
|
|
252
252
|
if (t === "m") return r = e.toFixed(n), parseFloat(r) === 0 ? void 0 : r + "m";
|
|
253
253
|
if (t === "mm") return r = (e * 1e3).toFixed(0), r === "0" ? void 0 : r + "mm";
|
|
@@ -255,10 +255,10 @@ function pe(e, t = "m", n = 2) {
|
|
|
255
255
|
let t = n === 4 || n === 8 || n === 16 ? n : 1, r = e / .0254, i = Math.round(r * t) / t;
|
|
256
256
|
if (i === 0) return;
|
|
257
257
|
let a = Math.floor(i / 12), o = i - a * 12;
|
|
258
|
-
return Math.abs(o - 12) < 1e-9 && (a += 1, o = 0), `${a}′${
|
|
258
|
+
return Math.abs(o - 12) < 1e-9 && (a += 1, o = 0), `${a}′${de(o, t)}″`;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function pe(e, t = "m") {
|
|
262
262
|
let n;
|
|
263
263
|
if (t === "m") return n = e.toFixed(2), n === "0.00" ? void 0 : n + "m²";
|
|
264
264
|
if (t === "mm") return n = (e * 1e3 * 1e3).toFixed(0), n === "0" ? void 0 : n + "mm²";
|
|
@@ -269,7 +269,7 @@ function me(e, t = "m") {
|
|
|
269
269
|
}
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/Sculpt/utils/renderDom.ts
|
|
272
|
-
var
|
|
272
|
+
var T = class e {
|
|
273
273
|
static cacheObject = /* @__PURE__ */ new Set();
|
|
274
274
|
static checkDomEveryFrameIsRunning = !1;
|
|
275
275
|
static checkDom(e) {
|
|
@@ -286,7 +286,7 @@ var w = class e {
|
|
|
286
286
|
};
|
|
287
287
|
//#endregion
|
|
288
288
|
//#region src/shared-utils/three/setObjectOriginSortBounds.ts
|
|
289
|
-
function
|
|
289
|
+
function me(e, t) {
|
|
290
290
|
if (!e.getAttribute("position")) {
|
|
291
291
|
for (let e of t) delete e.boundingSphere;
|
|
292
292
|
return;
|
|
@@ -337,7 +337,7 @@ var he = class extends o {
|
|
|
337
337
|
}
|
|
338
338
|
highlighted = !1;
|
|
339
339
|
get five() {
|
|
340
|
-
return
|
|
340
|
+
return b(this);
|
|
341
341
|
}
|
|
342
342
|
set geometry(e) {
|
|
343
343
|
this._geometry = e, this.line1 && (this.line1.geometry = e), this.line2 && (this.line2.geometry = e), this.line1?.computeLineDistances(), this.syncOriginSortBounds();
|
|
@@ -365,7 +365,7 @@ var he = class extends o {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
syncOriginSortBounds() {
|
|
368
|
-
this.originSort && this.line1 && this.line2 &&
|
|
368
|
+
this.originSort && this.line1 && this.line2 && me(this.line1.geometry, [this.line1, this.line2]);
|
|
369
369
|
}
|
|
370
370
|
line1;
|
|
371
371
|
line2;
|
|
@@ -405,20 +405,20 @@ var he = class extends o {
|
|
|
405
405
|
...t,
|
|
406
406
|
dashed: !1,
|
|
407
407
|
depthTest: !0
|
|
408
|
-
}), r = new
|
|
408
|
+
}), r = new ue({
|
|
409
409
|
...t,
|
|
410
410
|
dashed: !0,
|
|
411
411
|
depthTest: !1
|
|
412
412
|
});
|
|
413
413
|
this.line1 = new h(this.geometry, n), this.line2 = new h(this.geometry, r), this.line1.renderOrder = 2, this.line2.renderOrder = 2, this.line1.name = "line1", this.line2.name = "line2", this.add(this.line1), this.initFiveListeners(), e && this.setStyle(e), e?.points && this.setPoints(e.points), this.addEventListener("removed", () => {
|
|
414
|
-
this.removeFiveListeners(),
|
|
414
|
+
this.removeFiveListeners(), T.cacheObject.delete(this), T.checkDom(this);
|
|
415
415
|
}), this.addEventListener("added", () => {
|
|
416
|
-
this.initFiveListeners(),
|
|
417
|
-
}),
|
|
416
|
+
this.initFiveListeners(), T.cacheObject.add(this);
|
|
417
|
+
}), T.checkDomEveryFrame();
|
|
418
418
|
}
|
|
419
419
|
updateMatrixWorld(e) {
|
|
420
420
|
if (super.updateMatrixWorld(e), this.points) {
|
|
421
|
-
let e =
|
|
421
|
+
let e = w(this, this.points)?.map((e) => e.toArray().join(",")).join(",");
|
|
422
422
|
e !== this.lastRenderDomItem && (this.updateDomItems(), this.lastRenderDomItem = e);
|
|
423
423
|
}
|
|
424
424
|
}
|
|
@@ -495,7 +495,7 @@ var he = class extends o {
|
|
|
495
495
|
};
|
|
496
496
|
if (!this.points || this.points.length < 2 || !this.paramsStyle.lengthEnable && !this.paramsStyle.tip) return t();
|
|
497
497
|
if (!this.five) return console.error("Five not found");
|
|
498
|
-
let n = this.points.map((e, t) => t === 0 ? null : [this.points[t - 1], e]).filter(f).map((e) =>
|
|
498
|
+
let n = this.points.map((e, t) => t === 0 ? null : [this.points[t - 1], e]).filter(f).map((e) => w(this, e));
|
|
499
499
|
n.forEach(([t, n], i) => {
|
|
500
500
|
let a = r(t, n);
|
|
501
501
|
this.doms[i] = this.doms[i] ?? (() => {
|
|
@@ -525,14 +525,14 @@ var he = class extends o {
|
|
|
525
525
|
let n = t.offsetWidth;
|
|
526
526
|
return document.body.removeChild(t), n;
|
|
527
527
|
}, d = 0, f = u(e);
|
|
528
|
-
a > 0 && f > a && (d = -20), this.doms[i].container.innerHTML =
|
|
528
|
+
a > 0 && f > a && (d = -20), this.doms[i].container.innerHTML = C(e, {
|
|
529
529
|
style: `${l} ${this.paramsStyle.cssStyle || ""}`,
|
|
530
530
|
offsetY: d
|
|
531
531
|
});
|
|
532
532
|
} else this.doms[i].container.innerHTML = "";
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
|
-
this.paramsStyle.tip ? o(this.paramsStyle.tip, e) : o(
|
|
535
|
+
this.paramsStyle.tip ? o(this.paramsStyle.tip, e) : o(fe(t.distanceTo(n), this.paramsStyle.lengthUnit, this.paramsStyle.precision) || null, e);
|
|
536
536
|
}), this.doms.length > n.length && (this.doms.slice(n.length).forEach((e) => e.destroy()), this.doms.length = n.length);
|
|
537
537
|
}
|
|
538
538
|
onCameraUpdate = () => {
|
|
@@ -545,11 +545,14 @@ var he = class extends o {
|
|
|
545
545
|
//#endregion
|
|
546
546
|
//#region src/shared-utils/three/geometryUtil.ts
|
|
547
547
|
function ge(e) {
|
|
548
|
-
|
|
548
|
+
return ye(e).reduce((e, [t, n, r]) => e + E(t, n, r), 0);
|
|
549
|
+
}
|
|
550
|
+
function _e(e) {
|
|
551
|
+
let t = ye(e);
|
|
549
552
|
if (t.length === 0) return;
|
|
550
|
-
let n = 0, r = new
|
|
553
|
+
let n = 0, r = new _();
|
|
551
554
|
for (let [e, i, a] of t) {
|
|
552
|
-
let t = E(e, i, a), o =
|
|
555
|
+
let t = E(e, i, a), o = ve(e, i, a, t);
|
|
553
556
|
n += t, r.add(o);
|
|
554
557
|
}
|
|
555
558
|
if (!(n <= 0 || !Number.isFinite(n))) return r = r.divideScalar(n), {
|
|
@@ -560,24 +563,24 @@ function ge(e) {
|
|
|
560
563
|
function E(e, t, n) {
|
|
561
564
|
return t.clone().sub(e).cross(n.clone().sub(e)).length() / 2;
|
|
562
565
|
}
|
|
563
|
-
function
|
|
566
|
+
function ve(e, t, n, i) {
|
|
564
567
|
let a = i ?? E(e, t, n);
|
|
565
568
|
return r(e, t, n).multiplyScalar(a);
|
|
566
569
|
}
|
|
567
|
-
function
|
|
570
|
+
function ye(e) {
|
|
568
571
|
let t = e.getAttribute("position"), n = e.getIndex()?.array;
|
|
569
572
|
if (!t) return [];
|
|
570
573
|
let r = n ?? Array.from({ length: t.count }, (e, t) => t), i = [];
|
|
571
574
|
for (let e = 0; e + 2 < r.length; e += 3) {
|
|
572
|
-
let n = r[e], a = r[e + 1], o = r[e + 2], s = new
|
|
575
|
+
let n = r[e], a = r[e + 1], o = r[e + 2], s = new _().fromArray([
|
|
573
576
|
t.getX(n),
|
|
574
577
|
t.getY(n),
|
|
575
578
|
t.getZ(n)
|
|
576
|
-
]), c = new
|
|
579
|
+
]), c = new _().fromArray([
|
|
577
580
|
t.getX(a),
|
|
578
581
|
t.getY(a),
|
|
579
582
|
t.getZ(a)
|
|
580
|
-
]), l = new
|
|
583
|
+
]), l = new _().fromArray([
|
|
581
584
|
t.getX(o),
|
|
582
585
|
t.getY(o),
|
|
583
586
|
t.getZ(o)
|
|
@@ -592,14 +595,14 @@ function _e(e) {
|
|
|
592
595
|
}
|
|
593
596
|
//#endregion
|
|
594
597
|
//#region ../node_modules/earcut/src/earcut.js
|
|
595
|
-
var
|
|
596
|
-
function
|
|
598
|
+
var D = /* @__PURE__ */ new Set(), O = !1;
|
|
599
|
+
function be(e, t, n = 2) {
|
|
597
600
|
let r = t && t.length, i = r ? t[0] * n : e.length;
|
|
598
|
-
|
|
599
|
-
let a =
|
|
601
|
+
D.size && D.clear();
|
|
602
|
+
let a = xe(e, 0, i, n, !0), o = [];
|
|
600
603
|
if (!a || a.next === a.prev) return o;
|
|
601
604
|
let s = 0, c = 0, l = 0;
|
|
602
|
-
if (r && (a =
|
|
605
|
+
if (r && (a = Ee(e, t, a, n)), e.length > 80 * n) {
|
|
603
606
|
s = e[0], c = e[1];
|
|
604
607
|
let t = s, r = c;
|
|
605
608
|
for (let a = n; a < i; a += n) {
|
|
@@ -608,78 +611,78 @@ function ve(e, t, n = 2) {
|
|
|
608
611
|
}
|
|
609
612
|
l = Math.max(t - s, r - c), l = l === 0 ? 0 : 32767 / l;
|
|
610
613
|
}
|
|
611
|
-
return
|
|
614
|
+
return A(a, o, s, c, l), o;
|
|
612
615
|
}
|
|
613
|
-
function
|
|
616
|
+
function xe(e, t, n, r, i) {
|
|
614
617
|
let a = null;
|
|
615
|
-
if (i ===
|
|
616
|
-
else for (let i = n - r; i >= t; i -= r) a =
|
|
617
|
-
return a &&
|
|
618
|
+
if (i === Ge(e, t, n, r) > 0) for (let i = t; i < n; i += r) a = We(i / r | 0, e[i], e[i + 1], a);
|
|
619
|
+
else for (let i = n - r; i >= t; i -= r) a = We(i / r | 0, e[i], e[i + 1], a);
|
|
620
|
+
return a && K(a, a.next) && (Y(a), a = a.next), a;
|
|
618
621
|
}
|
|
619
|
-
function
|
|
622
|
+
function k(e, t = e) {
|
|
620
623
|
let n = t === e, r = e, i;
|
|
621
624
|
do
|
|
622
|
-
i = !1, r !== r.next && (
|
|
625
|
+
i = !1, r !== r.next && (D.size === 0 || !D.has(r)) && (K(r, r.next) || G(r.prev, r, r.next) === 0) ? ((n || r === t) && (t = r.prev), O = !0, Y(r), r = r.prev, i = !0) : (n || r !== t) && (r = r.next, i = !n);
|
|
623
626
|
while (i || r !== t);
|
|
624
627
|
return t;
|
|
625
628
|
}
|
|
626
|
-
function
|
|
627
|
-
i &&
|
|
629
|
+
function A(e, t, n, r, i) {
|
|
630
|
+
i && Ie(e, n, r, i);
|
|
628
631
|
let a = e, o = !1;
|
|
629
632
|
for (; e.prev !== e.next;) {
|
|
630
633
|
let s = e.prev, c = e.next;
|
|
631
|
-
if (
|
|
634
|
+
if (G(s, e, c) < 0 && (i ? Ce(e, n, r, i) : Se(e))) t.push(s.i, e.i, c.i), Y(e), e = c, a = c;
|
|
632
635
|
else if (e = c, e === a) {
|
|
633
|
-
if (
|
|
636
|
+
if (O = !1, e = k(e), O) {
|
|
634
637
|
a = e;
|
|
635
638
|
continue;
|
|
636
639
|
}
|
|
637
640
|
if (!o) {
|
|
638
|
-
e =
|
|
641
|
+
e = we(e, t), a = e, o = !0;
|
|
639
642
|
continue;
|
|
640
643
|
}
|
|
641
|
-
|
|
644
|
+
Te(e, t, n, r, i);
|
|
642
645
|
break;
|
|
643
646
|
}
|
|
644
647
|
}
|
|
645
648
|
}
|
|
646
|
-
function
|
|
649
|
+
function Se(e) {
|
|
647
650
|
let t = e.prev, n = e, r = e.next, i = t.x, a = n.x, o = r.x, s = t.y, c = n.y, l = r.y, u = Math.min(i, a, o), d = Math.min(s, c, l), f = Math.max(i, a, o), p = Math.max(s, c, l), m = r.next;
|
|
648
651
|
for (; m !== t;) {
|
|
649
|
-
if (m.x >= u && m.x <= f && m.y >= d && m.y <= p && (i !== m.x || s !== m.y) &&
|
|
652
|
+
if (m.x >= u && m.x <= f && m.y >= d && m.y <= p && (i !== m.x || s !== m.y) && W(i, s, a, c, o, l, m.x, m.y) && G(m.prev, m, m.next) >= 0) return !1;
|
|
650
653
|
m = m.next;
|
|
651
654
|
}
|
|
652
655
|
return !0;
|
|
653
656
|
}
|
|
654
|
-
function
|
|
655
|
-
let i = e.prev, a = e, o = e.next, s = i.x, c = a.x, l = o.x, u = i.y, d = a.y, f = o.y, p = Math.min(s, c, l), m = Math.min(u, d, f), h = Math.max(s, c, l), g = Math.max(u, d, f),
|
|
656
|
-
for (;
|
|
657
|
-
if (
|
|
658
|
-
|
|
657
|
+
function Ce(e, t, n, r) {
|
|
658
|
+
let i = e.prev, a = e, o = e.next, s = i.x, c = a.x, l = o.x, u = i.y, d = a.y, f = o.y, p = Math.min(s, c, l), m = Math.min(u, d, f), h = Math.max(s, c, l), g = Math.max(u, d, f), ee = U(p, m, t, n, r), _ = U(h, g, t, n, r), v = e.prevZ;
|
|
659
|
+
for (; v && v.z >= ee;) {
|
|
660
|
+
if (v.x >= p && v.x <= h && v.y >= m && v.y <= g && v !== o && (s !== v.x || u !== v.y) && W(s, u, c, d, l, f, v.x, v.y) && G(v.prev, v, v.next) >= 0) return !1;
|
|
661
|
+
v = v.prevZ;
|
|
659
662
|
}
|
|
660
|
-
let
|
|
661
|
-
for (;
|
|
662
|
-
if (
|
|
663
|
-
|
|
663
|
+
let y = e.nextZ;
|
|
664
|
+
for (; y && y.z <= _;) {
|
|
665
|
+
if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== o && (s !== y.x || u !== y.y) && W(s, u, c, d, l, f, y.x, y.y) && G(y.prev, y, y.next) >= 0) return !1;
|
|
666
|
+
y = y.nextZ;
|
|
664
667
|
}
|
|
665
668
|
return !0;
|
|
666
669
|
}
|
|
667
|
-
function
|
|
670
|
+
function we(e, t) {
|
|
668
671
|
let n = e, r = !1;
|
|
669
672
|
do {
|
|
670
673
|
let i = n.prev, a = n.next.next;
|
|
671
|
-
|
|
674
|
+
Be(i, n, n.next, a, !1) && J(i, a) && J(a, i) && (t.push(i.i, n.i, a.i), Y(n), Y(n.next), n = e = a, r = !0), n = n.next;
|
|
672
675
|
} while (n !== e);
|
|
673
|
-
return r ?
|
|
676
|
+
return r ? k(n) : n;
|
|
674
677
|
}
|
|
675
|
-
function
|
|
678
|
+
function Te(e, t, n, r, i) {
|
|
676
679
|
let a = e;
|
|
677
680
|
do {
|
|
678
681
|
let e = a.next.next;
|
|
679
682
|
for (; e !== a.prev;) {
|
|
680
|
-
if (a.i !== e.i &&
|
|
681
|
-
let o =
|
|
682
|
-
a =
|
|
683
|
+
if (a.i !== e.i && ze(a, e)) {
|
|
684
|
+
let o = Ue(a, e);
|
|
685
|
+
a = k(a, a.next), o = k(o, o.next), A(a, t, n, r, i), A(o, t, n, r, i);
|
|
683
686
|
return;
|
|
684
687
|
}
|
|
685
688
|
e = e.next;
|
|
@@ -687,70 +690,70 @@ function Se(e, t, n, r, i) {
|
|
|
687
690
|
a = a.next;
|
|
688
691
|
} while (a !== e);
|
|
689
692
|
}
|
|
690
|
-
var
|
|
691
|
-
function
|
|
693
|
+
var j = !1;
|
|
694
|
+
function Ee(e, t, n, r) {
|
|
692
695
|
let i = [];
|
|
693
696
|
for (let n = 0, a = t.length; n < a; n++) {
|
|
694
|
-
let o =
|
|
695
|
-
o === o.next &&
|
|
697
|
+
let o = xe(e, t[n] * r, n < a - 1 ? t[n + 1] * r : e.length, r, !1);
|
|
698
|
+
o === o.next && D.add(o), i.push(Re(o));
|
|
696
699
|
}
|
|
697
|
-
i.sort(
|
|
698
|
-
for (let e = 0; e < i.length; e++) n =
|
|
699
|
-
return
|
|
700
|
+
i.sort(De), ke(e.length / r, t.length), Ae(n, n), j = !0;
|
|
701
|
+
for (let e = 0; e < i.length; e++) n = Oe(i[e], n);
|
|
702
|
+
return j = !1, k(n);
|
|
700
703
|
}
|
|
701
|
-
function
|
|
704
|
+
function De(e, t) {
|
|
702
705
|
return e.x - t.x || e.y - t.y || (e.next.y - e.y) / (e.next.x - e.x) - (t.next.y - t.y) / (t.next.x - t.x);
|
|
703
706
|
}
|
|
704
|
-
function
|
|
705
|
-
let n =
|
|
707
|
+
function Oe(e, t) {
|
|
708
|
+
let n = Pe(e, t);
|
|
706
709
|
if (!n) return t;
|
|
707
|
-
let r =
|
|
708
|
-
return
|
|
710
|
+
let r = Ue(n, e), i = r.next;
|
|
711
|
+
return Ae(n, i.next), k(r, r.next), k(n, n.next);
|
|
709
712
|
}
|
|
710
|
-
var
|
|
711
|
-
function
|
|
712
|
-
let n = Math.ceil((e + 2 * t) /
|
|
713
|
-
|
|
713
|
+
var M = 16, N = /* @__PURE__ */ new Float64Array(), P = 0, F = [], I = [];
|
|
714
|
+
function ke(e, t) {
|
|
715
|
+
let n = Math.ceil((e + 2 * t) / M) + t + 2;
|
|
716
|
+
N.length < n * 4 && (N = new Float64Array(n * 4)), P = 0;
|
|
714
717
|
}
|
|
715
|
-
function
|
|
718
|
+
function Ae(e, t) {
|
|
716
719
|
let n = e;
|
|
717
720
|
do {
|
|
718
|
-
let e =
|
|
719
|
-
|
|
721
|
+
let e = P++;
|
|
722
|
+
F[e] = n;
|
|
720
723
|
let r = n.x, i = n.y, a = n.x, o = n.y, s = 0;
|
|
721
724
|
do {
|
|
722
725
|
let t = n.next;
|
|
723
726
|
n.z = e, t.x < r && (r = t.x), t.x > a && (a = t.x), t.y < i && (i = t.y), t.y > o && (o = t.y), n = t;
|
|
724
|
-
} while (++s <
|
|
725
|
-
|
|
727
|
+
} while (++s < M && n !== t);
|
|
728
|
+
I[e] = n;
|
|
726
729
|
let c = e * 4;
|
|
727
|
-
|
|
730
|
+
N[c] = r, N[c + 1] = i, N[c + 2] = a, N[c + 3] = o;
|
|
728
731
|
} while (n !== t);
|
|
729
732
|
}
|
|
730
|
-
function
|
|
733
|
+
function je(e, t) {
|
|
731
734
|
let n = e.z * 4;
|
|
732
|
-
t.x <
|
|
733
|
-
}
|
|
734
|
-
function Ae(e) {
|
|
735
|
-
let t = L[e];
|
|
736
|
-
for (; t.prev.next !== t;) t = t.next;
|
|
737
|
-
return L[e] = t, t;
|
|
735
|
+
t.x < N[n] && (N[n] = t.x), t.y < N[n + 1] && (N[n + 1] = t.y), t.x > N[n + 2] && (N[n + 2] = t.x), t.y > N[n + 3] && (N[n + 3] = t.y);
|
|
738
736
|
}
|
|
739
|
-
function
|
|
737
|
+
function Me(e) {
|
|
740
738
|
let t = I[e];
|
|
741
739
|
for (; t.prev.next !== t;) t = t.next;
|
|
742
740
|
return I[e] = t, t;
|
|
743
741
|
}
|
|
744
|
-
function
|
|
742
|
+
function Ne(e) {
|
|
743
|
+
let t = F[e];
|
|
744
|
+
for (; t.prev.next !== t;) t = t.next;
|
|
745
|
+
return F[e] = t, t;
|
|
746
|
+
}
|
|
747
|
+
function Pe(e, t) {
|
|
745
748
|
let n = t, r = e.x, i = e.y, a = -Infinity, o;
|
|
746
|
-
if (
|
|
747
|
-
for (let t = 0, s = 0; t <
|
|
748
|
-
if (i <
|
|
749
|
-
let c =
|
|
750
|
-
n =
|
|
749
|
+
if (K(e, n)) return n;
|
|
750
|
+
for (let t = 0, s = 0; t < P; t++, s += 4) {
|
|
751
|
+
if (i < N[s + 1] || i > N[s + 3] || N[s] > r || N[s + 2] <= a) continue;
|
|
752
|
+
let c = Me(t);
|
|
753
|
+
n = Ne(t);
|
|
751
754
|
do {
|
|
752
755
|
if (n.prev.next === n) {
|
|
753
|
-
if (
|
|
756
|
+
if (K(e, n.next)) return n.next;
|
|
754
757
|
if (i <= n.y && i >= n.next.y && n.next.y !== n.y) {
|
|
755
758
|
let e = n.x + (i - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
|
|
756
759
|
if (e <= r && e > a && (a = e, o = n.x < n.next.x ? n : n.next, e === r)) return o;
|
|
@@ -761,108 +764,108 @@ function je(e, t) {
|
|
|
761
764
|
}
|
|
762
765
|
if (!o) return null;
|
|
763
766
|
let s = o.x, c = o.y, l = Math.min(i, c), u = Math.max(i, c), d = Infinity;
|
|
764
|
-
for (let t = 0, f = 0; t <
|
|
765
|
-
if (
|
|
766
|
-
let p =
|
|
767
|
-
n =
|
|
767
|
+
for (let t = 0, f = 0; t < P; t++, f += 4) {
|
|
768
|
+
if (N[f + 2] < s || N[f] > r || N[f + 3] < l || N[f + 1] > u) continue;
|
|
769
|
+
let p = Me(t);
|
|
770
|
+
n = Ne(t);
|
|
768
771
|
do {
|
|
769
|
-
if (n.prev.next === n && r >= n.x && n.x >= s && r !== n.x &&
|
|
772
|
+
if (n.prev.next === n && r >= n.x && n.x >= s && r !== n.x && W(i < c ? r : a, i, s, c, i < c ? a : r, i, n.x, n.y)) {
|
|
770
773
|
let t = Math.abs(i - n.y) / (r - n.x);
|
|
771
|
-
(
|
|
774
|
+
(J(n, e) || n.y === i && n.next.y === i && n.next.x > r) && (t < d || t === d && (n.x > o.x || n.x === o.x && Fe(o, n))) && (o = n, d = t);
|
|
772
775
|
}
|
|
773
776
|
n = n.next;
|
|
774
777
|
} while (n !== p);
|
|
775
778
|
}
|
|
776
779
|
return o;
|
|
777
780
|
}
|
|
778
|
-
function
|
|
779
|
-
return
|
|
781
|
+
function Fe(e, t) {
|
|
782
|
+
return G(e.prev, e, t.prev) < 0 && G(t.next, e, e.next) < 0;
|
|
780
783
|
}
|
|
781
|
-
var
|
|
782
|
-
function
|
|
784
|
+
var L = [], R = [], z = /* @__PURE__ */ new Uint32Array(), B = /* @__PURE__ */ new Uint32Array(), V = /* @__PURE__ */ new Uint32Array(256);
|
|
785
|
+
function Ie(e, t, n, r) {
|
|
783
786
|
let i = e, a = 0;
|
|
784
787
|
do
|
|
785
|
-
i.z =
|
|
788
|
+
i.z = U(i.x, i.y, t, n, r), L[a++] = i, i = i.next;
|
|
786
789
|
while (i !== e);
|
|
787
|
-
|
|
790
|
+
Le(a);
|
|
788
791
|
let o = null;
|
|
789
792
|
for (let e = 0; e < a; e++) {
|
|
790
|
-
let t =
|
|
793
|
+
let t = L[e];
|
|
791
794
|
t.prevZ = o, o && (o.nextZ = t), o = t;
|
|
792
795
|
}
|
|
793
|
-
o.nextZ = null,
|
|
796
|
+
o.nextZ = null, L.fill(null, 0, a), R.fill(null, 0, a);
|
|
794
797
|
}
|
|
795
|
-
function
|
|
798
|
+
function Le(e) {
|
|
796
799
|
if (e <= 32) for (let t = 1; t < e; t++) {
|
|
797
|
-
let e =
|
|
798
|
-
for (; r >= 0 &&
|
|
799
|
-
|
|
800
|
+
let e = L[t], n = e.z, r = t - 1;
|
|
801
|
+
for (; r >= 0 && L[r].z > n;) L[r + 1] = L[r], r--;
|
|
802
|
+
L[r + 1] = e;
|
|
800
803
|
}
|
|
801
804
|
else {
|
|
802
|
-
|
|
803
|
-
for (let t = 0; t < e; t++)
|
|
804
|
-
|
|
805
|
+
z.length < e && (z = new Uint32Array(e), B = new Uint32Array(e), R = Array(e));
|
|
806
|
+
for (let t = 0; t < e; t++) z[t] = L[t].z;
|
|
807
|
+
H(e, L, z, R, B, 0), H(e, R, B, L, z, 8), H(e, L, z, R, B, 16), H(e, R, B, L, z, 24);
|
|
805
808
|
}
|
|
806
809
|
}
|
|
807
|
-
function
|
|
808
|
-
|
|
809
|
-
for (let t = 0; t < e; t++)
|
|
810
|
+
function H(e, t, n, r, i, a) {
|
|
811
|
+
V.fill(0);
|
|
812
|
+
for (let t = 0; t < e; t++) V[n[t] >>> a & 255]++;
|
|
810
813
|
let o = 0;
|
|
811
814
|
for (let e = 0; e < 256; e++) {
|
|
812
|
-
let t =
|
|
813
|
-
|
|
815
|
+
let t = V[e];
|
|
816
|
+
V[e] = o, o += t;
|
|
814
817
|
}
|
|
815
818
|
for (let o = 0; o < e; o++) {
|
|
816
|
-
let e = n[o], s =
|
|
819
|
+
let e = n[o], s = V[e >>> a & 255]++;
|
|
817
820
|
r[s] = t[o], i[s] = e;
|
|
818
821
|
}
|
|
819
822
|
}
|
|
820
|
-
function
|
|
823
|
+
function U(e, t, n, r, i) {
|
|
821
824
|
return e = (e - n) * i | 0, t = (t - r) * i | 0, e = (e | e << 8) & 16711935, e = (e | e << 4) & 252645135, e = (e | e << 2) & 858993459, e = (e | e << 1) & 1431655765, t = (t | t << 8) & 16711935, t = (t | t << 4) & 252645135, t = (t | t << 2) & 858993459, t = (t | t << 1) & 1431655765, e | t << 1;
|
|
822
825
|
}
|
|
823
|
-
function
|
|
826
|
+
function Re(e) {
|
|
824
827
|
let t = e, n = e;
|
|
825
828
|
do
|
|
826
829
|
(t.x < n.x || t.x === n.x && t.y < n.y) && (n = t), t = t.next;
|
|
827
830
|
while (t !== e);
|
|
828
831
|
return n;
|
|
829
832
|
}
|
|
830
|
-
function
|
|
833
|
+
function W(e, t, n, r, i, a, o, s) {
|
|
831
834
|
return (i - o) * (t - s) >= (e - o) * (a - s) && (e - o) * (r - s) >= (n - o) * (t - s) && (n - o) * (a - s) >= (i - o) * (r - s);
|
|
832
835
|
}
|
|
833
|
-
function
|
|
834
|
-
let n =
|
|
835
|
-
return e.next.i !== t.i && (n ||
|
|
836
|
+
function ze(e, t) {
|
|
837
|
+
let n = K(e, t) && G(e.prev, e, e.next) > 0 && G(t.prev, t, t.next) > 0;
|
|
838
|
+
return e.next.i !== t.i && (n || J(e, t) && J(t, e) && (G(e.prev, e, t.prev) !== 0 || G(e, t.prev, t) !== 0)) && !Ve(e, t) && (n || He(e, t));
|
|
836
839
|
}
|
|
837
|
-
function
|
|
840
|
+
function G(e, t, n) {
|
|
838
841
|
return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y);
|
|
839
842
|
}
|
|
840
|
-
function
|
|
843
|
+
function K(e, t) {
|
|
841
844
|
return e.x === t.x && e.y === t.y;
|
|
842
845
|
}
|
|
843
|
-
function
|
|
844
|
-
let a =
|
|
845
|
-
return (a > 0 && o < 0 || a < 0 && o > 0) && (s > 0 && c < 0 || s < 0 && c > 0) ? !0 : i ? !!(a === 0 &&
|
|
846
|
+
function Be(e, t, n, r, i = !0) {
|
|
847
|
+
let a = G(e, t, n), o = G(e, t, r), s = G(n, r, e), c = G(n, r, t);
|
|
848
|
+
return (a > 0 && o < 0 || a < 0 && o > 0) && (s > 0 && c < 0 || s < 0 && c > 0) ? !0 : i ? !!(a === 0 && q(e, n, t) || o === 0 && q(e, r, t) || s === 0 && q(n, e, r) || c === 0 && q(n, t, r)) : !1;
|
|
846
849
|
}
|
|
847
|
-
function
|
|
850
|
+
function q(e, t, n) {
|
|
848
851
|
return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
|
|
849
852
|
}
|
|
850
|
-
function
|
|
853
|
+
function Ve(e, t) {
|
|
851
854
|
let n = Math.min(e.x, t.x), r = Math.max(e.x, t.x), i = Math.min(e.y, t.y), a = Math.max(e.y, t.y), o = e;
|
|
852
855
|
do {
|
|
853
856
|
let s = o.next;
|
|
854
857
|
if (o.x > r && s.x > r || o.x < n && s.x < n || o.y > a && s.y > a || o.y < i && s.y < i) o = s;
|
|
855
858
|
else {
|
|
856
|
-
if (o.i !== e.i && s.i !== e.i && o.i !== t.i && s.i !== t.i &&
|
|
859
|
+
if (o.i !== e.i && s.i !== e.i && o.i !== t.i && s.i !== t.i && Be(o, s, e, t)) return !0;
|
|
857
860
|
o = s;
|
|
858
861
|
}
|
|
859
862
|
} while (o !== e);
|
|
860
863
|
return !1;
|
|
861
864
|
}
|
|
862
|
-
function
|
|
863
|
-
return
|
|
865
|
+
function J(e, t) {
|
|
866
|
+
return G(e.prev, e, e.next) < 0 ? G(e, t, e.next) >= 0 && G(e, e.prev, t) >= 0 : G(e, t, e.prev) < 0 || G(e, e.next, t) < 0;
|
|
864
867
|
}
|
|
865
|
-
function
|
|
868
|
+
function He(e, t) {
|
|
866
869
|
let n = e, r = !1, i = (e.x + t.x) / 2, a = (e.y + t.y) / 2;
|
|
867
870
|
do {
|
|
868
871
|
let e = n.next;
|
|
@@ -870,18 +873,18 @@ function ze(e, t) {
|
|
|
870
873
|
} while (n !== e);
|
|
871
874
|
return r;
|
|
872
875
|
}
|
|
873
|
-
function
|
|
874
|
-
let n =
|
|
876
|
+
function Ue(e, t) {
|
|
877
|
+
let n = X(e.i, e.x, e.y), r = X(t.i, t.x, t.y), i = e.next, a = t.prev;
|
|
875
878
|
return e.next = t, t.prev = e, n.next = i, i.prev = n, r.next = n, n.prev = r, a.next = r, r.prev = a, r;
|
|
876
879
|
}
|
|
877
|
-
function
|
|
878
|
-
let i =
|
|
880
|
+
function We(e, t, n, r) {
|
|
881
|
+
let i = X(e, t, n);
|
|
879
882
|
return r ? (i.next = r.next, i.prev = r, r.next.prev = i, r.next = i) : (i.prev = i, i.next = i), i;
|
|
880
883
|
}
|
|
881
|
-
function
|
|
882
|
-
e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ), e.nextZ && (e.nextZ.prevZ = e.prevZ),
|
|
884
|
+
function Y(e) {
|
|
885
|
+
e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ), e.nextZ && (e.nextZ.prevZ = e.prevZ), j && je(e.prev, e.next);
|
|
883
886
|
}
|
|
884
|
-
function
|
|
887
|
+
function X(e, t, n) {
|
|
885
888
|
return {
|
|
886
889
|
i: e,
|
|
887
890
|
x: t,
|
|
@@ -893,25 +896,25 @@ function Q(e, t, n) {
|
|
|
893
896
|
nextZ: null
|
|
894
897
|
};
|
|
895
898
|
}
|
|
896
|
-
function
|
|
899
|
+
function Ge(e, t, n, r) {
|
|
897
900
|
let i = 0;
|
|
898
901
|
for (let a = t, o = n - r; a < n; a += r) i += (e[o] - e[a]) * (e[a + 1] + e[o + 1]), o = a;
|
|
899
902
|
return i;
|
|
900
903
|
}
|
|
901
904
|
//#endregion
|
|
902
905
|
//#region src/shared-utils/three/earcut3D.ts
|
|
903
|
-
function
|
|
906
|
+
function Ke(e) {
|
|
904
907
|
if (e.length < 3) return [];
|
|
905
908
|
let t = s(e), n = new g.Quaternion().setFromUnitVectors(t, new g.Vector3(0, 1, 0));
|
|
906
|
-
return
|
|
909
|
+
return be(e.map((e) => e.clone().applyQuaternion(n)).flatMap((e) => [e.x, e.z]));
|
|
907
910
|
}
|
|
908
911
|
//#endregion
|
|
909
912
|
//#region src/PanoMeasurePlugin/utils/isIntersecting.ts
|
|
910
|
-
function
|
|
913
|
+
function Z(e, t) {
|
|
911
914
|
let n = Array.isArray(t) ? t : [t];
|
|
912
915
|
for (let t = 0; t < n.length; t++) {
|
|
913
916
|
let r = e.start, i = e.end, a = n[t].start, o = n[t].end;
|
|
914
|
-
if (!($(r, a) || $(r, o) || $(i, a) || $(i, o) || $(r, i)) &&
|
|
917
|
+
if (!($(r, a) || $(r, o) || $(i, a) || $(i, o) || $(r, i)) && qe([
|
|
915
918
|
r.x,
|
|
916
919
|
r.y,
|
|
917
920
|
r.z
|
|
@@ -931,7 +934,7 @@ function We(e, t) {
|
|
|
931
934
|
}
|
|
932
935
|
return !1;
|
|
933
936
|
}
|
|
934
|
-
function
|
|
937
|
+
function qe(e, t, n, r) {
|
|
935
938
|
let i = [
|
|
936
939
|
t[0] - e[0],
|
|
937
940
|
t[1] - e[1],
|
|
@@ -959,23 +962,23 @@ function Ge(e, t, n, r) {
|
|
|
959
962
|
[0, 2],
|
|
960
963
|
[1, 2]
|
|
961
964
|
]) {
|
|
962
|
-
let n = [o[e].a, o[t].a], r = [o[e].b, o[t].b], i =
|
|
965
|
+
let n = [o[e].a, o[t].a], r = [o[e].b, o[t].b], i = Je(n);
|
|
963
966
|
if (Math.abs(i) < 1e-10) continue;
|
|
964
|
-
let [a, s] =
|
|
965
|
-
return !!(
|
|
967
|
+
let [a, s] = Xe(Ye(n, i), r);
|
|
968
|
+
return !!(Q(a) && Q(s));
|
|
966
969
|
}
|
|
967
970
|
return !1;
|
|
968
971
|
}
|
|
969
|
-
function
|
|
972
|
+
function Je(e) {
|
|
970
973
|
return e[0][0] * e[1][1] - e[0][1] * e[1][0];
|
|
971
974
|
}
|
|
972
|
-
function
|
|
975
|
+
function Ye(e, t) {
|
|
973
976
|
return [[e[1][1] / t, -e[0][1] / t], [-e[1][0] / t, e[0][0] / t]];
|
|
974
977
|
}
|
|
975
|
-
function
|
|
978
|
+
function Xe(e, t) {
|
|
976
979
|
return [e[0][0] * t[0] + e[0][1] * t[1], e[1][0] * t[0] + e[1][1] * t[1]];
|
|
977
980
|
}
|
|
978
|
-
function
|
|
981
|
+
function Q(e) {
|
|
979
982
|
return e >= 0 && e <= 1;
|
|
980
983
|
}
|
|
981
984
|
function $(e, t) {
|
|
@@ -983,7 +986,7 @@ function $(e, t) {
|
|
|
983
986
|
}
|
|
984
987
|
//#endregion
|
|
985
988
|
//#region src/shared-utils/three/generatePolygonGeometry.ts
|
|
986
|
-
function
|
|
989
|
+
function Ze(e, t) {
|
|
987
990
|
let n = [...new Set(e)];
|
|
988
991
|
if (n.length < 3) return;
|
|
989
992
|
if (n.at(-1).equals(n[0]) || n.push(n[0]), t?.checkLinesIntersect && n.length >= 5) {
|
|
@@ -991,18 +994,18 @@ function Xe(e, t) {
|
|
|
991
994
|
start: n[t - 1],
|
|
992
995
|
end: n[t]
|
|
993
996
|
}).filter(Boolean);
|
|
994
|
-
for (let t = 0; t < e.length; t++) if (
|
|
997
|
+
for (let t = 0; t < e.length; t++) if (Z(e[t], e.slice(t))) return;
|
|
995
998
|
}
|
|
996
999
|
let r = n.flatMap((e) => [
|
|
997
1000
|
e.x,
|
|
998
1001
|
e.y,
|
|
999
1002
|
e.z
|
|
1000
|
-
]), i = new g.Float32BufferAttribute(r, 3), a =
|
|
1003
|
+
]), i = new g.Float32BufferAttribute(r, 3), a = Ke(n);
|
|
1001
1004
|
if (a.length < 3) return;
|
|
1002
1005
|
let o = new g.BufferGeometry();
|
|
1003
1006
|
return o.setAttribute("position", i), o.setIndex(a), o.name = "PolygonGeometry", o;
|
|
1004
1007
|
}
|
|
1005
1008
|
//#endregion
|
|
1006
|
-
export {
|
|
1009
|
+
export { y as C, ne as S, S as _, _e as a, te as b, he as c, fe as d, pe as f, ce as g, C as h, ge as i, me as l, le as m, Z as n, E as o, w as p, Ke as r, ve as s, Ze as t, T as u, se as v, b as w, re as x, ie as y };
|
|
1007
1010
|
|
|
1008
|
-
//# sourceMappingURL=generatePolygonGeometry-
|
|
1011
|
+
//# sourceMappingURL=generatePolygonGeometry-BOnzdCaG.js.map
|