@maqiuyao/dxf-viewer 0.2.31 → 0.2.32
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/README.md +1 -0
- package/dist/dxf-viewer.cjs +10 -10
- package/dist/dxf-viewer.js +132 -112
- package/dist/src/dxfViewer/core/utils/Locale.d.ts +4 -0
- package/package.json +1 -1
package/dist/dxf-viewer.js
CHANGED
|
@@ -1102,7 +1102,7 @@ const ac = /* @__PURE__ */ (function() {
|
|
|
1102
1102
|
return !1;
|
|
1103
1103
|
};
|
|
1104
1104
|
})(), lc = ["x", "y", "z"], Mt = 1e-15, kr = Mt * Mt;
|
|
1105
|
-
function
|
|
1105
|
+
function Ke(c) {
|
|
1106
1106
|
return Math.abs(c) < Mt;
|
|
1107
1107
|
}
|
|
1108
1108
|
class ct extends Ei {
|
|
@@ -1180,11 +1180,11 @@ ct.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
function x(b, E, S, O) {
|
|
1182
1182
|
const C = E.degenerateSegment, v = b.plane.distanceToPoint(C.start), M = b.plane.distanceToPoint(C.end);
|
|
1183
|
-
return
|
|
1183
|
+
return Ke(v) ? Ke(M) ? u(b, E, S, O) : (S && (S.start.copy(C.start), S.end.copy(C.start)), b.containsPoint(C.start)) : Ke(M) ? (S && (S.start.copy(C.end), S.end.copy(C.end)), b.containsPoint(C.end)) : b.plane.intersectLine(C, i) != null ? (S && (S.start.copy(i), S.end.copy(i)), b.containsPoint(i)) : !1;
|
|
1184
1184
|
}
|
|
1185
1185
|
function y(b, E, S) {
|
|
1186
1186
|
const O = E.a;
|
|
1187
|
-
return
|
|
1187
|
+
return Ke(b.plane.distanceToPoint(O)) && b.containsPoint(O) ? (S && (S.start.copy(O), S.end.copy(O)), !0) : !1;
|
|
1188
1188
|
}
|
|
1189
1189
|
function T(b, E, S) {
|
|
1190
1190
|
const O = b.degenerateSegment, C = E.a;
|
|
@@ -1196,13 +1196,13 @@ ct.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
|
|
|
1196
1196
|
const C = b.degenerateSegment, v = E.degenerateSegment, M = s, P = n;
|
|
1197
1197
|
C.delta(M), v.delta(P);
|
|
1198
1198
|
const _ = i.subVectors(v.start, C.start), I = M.x * P.y - M.y * P.x;
|
|
1199
|
-
if (
|
|
1199
|
+
if (Ke(I))
|
|
1200
1200
|
return !1;
|
|
1201
1201
|
const B = (_.x * P.y - _.y * P.x) / I, k = -(M.x * _.y - M.y * _.x) / I;
|
|
1202
1202
|
if (B < 0 || B > 1 || k < 0 || k > 1)
|
|
1203
1203
|
return !1;
|
|
1204
1204
|
const D = C.start.z + M.z * B, F = v.start.z + P.z * k;
|
|
1205
|
-
return
|
|
1205
|
+
return Ke(D - F) ? (S && (S.start.copy(C.start).addScaledVector(M, B), S.end.copy(C.start).addScaledVector(M, B)), !0) : !1;
|
|
1206
1206
|
} else return E.isDegenerateIntoPoint ? T(b, E, S) : x(E, b, S, O);
|
|
1207
1207
|
else {
|
|
1208
1208
|
if (b.isDegenerateIntoPoint)
|
|
@@ -1220,12 +1220,12 @@ ct.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
|
|
|
1220
1220
|
return C;
|
|
1221
1221
|
const v = this.plane, M = E.plane;
|
|
1222
1222
|
let P = M.distanceToPoint(this.a), _ = M.distanceToPoint(this.b), I = M.distanceToPoint(this.c);
|
|
1223
|
-
|
|
1223
|
+
Ke(P) && (P = 0), Ke(_) && (_ = 0), Ke(I) && (I = 0);
|
|
1224
1224
|
const B = P * _, k = P * I;
|
|
1225
1225
|
if (B > 0 && k > 0)
|
|
1226
1226
|
return !1;
|
|
1227
1227
|
let D = v.distanceToPoint(E.a), F = v.distanceToPoint(E.b), se = v.distanceToPoint(E.c);
|
|
1228
|
-
|
|
1228
|
+
Ke(D) && (D = 0), Ke(F) && (F = 0), Ke(se) && (se = 0);
|
|
1229
1229
|
const re = D * F, Ue = D * se;
|
|
1230
1230
|
if (re > 0 && Ue > 0)
|
|
1231
1231
|
return !1;
|
|
@@ -1416,7 +1416,7 @@ class cc extends yr {
|
|
|
1416
1416
|
super(() => new ct());
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
const
|
|
1419
|
+
const Qe = /* @__PURE__ */ new cc(), Hi = /* @__PURE__ */ new W(), On = /* @__PURE__ */ new W();
|
|
1420
1420
|
function hc(c, t, e = {}, i = 0, s = 1 / 0) {
|
|
1421
1421
|
const n = i * i, r = s * s;
|
|
1422
1422
|
let a = 1 / 0, o = null;
|
|
@@ -1694,7 +1694,7 @@ function lr(c, t, e, i, s = null) {
|
|
|
1694
1694
|
const Cs = /* @__PURE__ */ new lt(), Pn = /* @__PURE__ */ new ze(), qi = /* @__PURE__ */ new ze(), Cc = /* @__PURE__ */ new W(), Sc = /* @__PURE__ */ new W(), Ec = /* @__PURE__ */ new W(), Oc = /* @__PURE__ */ new W();
|
|
1695
1695
|
function Pc(c, t, e, i = {}, s = {}, n = 0, r = 1 / 0) {
|
|
1696
1696
|
t.boundingBox || t.computeBoundingBox(), Pn.set(t.boundingBox.min, t.boundingBox.max, e), Pn.needsUpdate = !0;
|
|
1697
|
-
const a = c.geometry, o = a.attributes.position, l = a.index, h = t.attributes.position, d = t.index, u =
|
|
1697
|
+
const a = c.geometry, o = a.attributes.position, l = a.index, h = t.attributes.position, d = t.index, u = Qe.getPrimitive(), f = Qe.getPrimitive();
|
|
1698
1698
|
let m = Cc, x = Sc, y = null, T = null;
|
|
1699
1699
|
s && (y = Ec, T = Oc);
|
|
1700
1700
|
let w = 1 / 0, b = null, E = null;
|
|
@@ -1733,7 +1733,7 @@ function Pc(c, t, e, i = {}, s = {}, n = 0, r = 1 / 0) {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
1736
|
-
),
|
|
1736
|
+
), Qe.releasePrimitive(u), Qe.releasePrimitive(f), w === 1 / 0 ? null : (i.point ? i.point.copy(x) : i.point = x.clone(), i.distance = w, i.faceIndex = b, s && (s.point ? s.point.copy(T) : s.point = T.clone(), s.point.applyMatrix4(Cs), x.applyMatrix4(Cs), s.distance = x.sub(s.point).length(), s.faceIndex = E), i);
|
|
1737
1737
|
}
|
|
1738
1738
|
function _c(c, t = null) {
|
|
1739
1739
|
t && Array.isArray(t) && (t = new Set(t));
|
|
@@ -1866,7 +1866,7 @@ function dr(c, t, e, i, s = null) {
|
|
|
1866
1866
|
const Os = /* @__PURE__ */ new lt(), _n = /* @__PURE__ */ new ze(), Xi = /* @__PURE__ */ new ze(), Dc = /* @__PURE__ */ new W(), Lc = /* @__PURE__ */ new W(), Rc = /* @__PURE__ */ new W(), Fc = /* @__PURE__ */ new W();
|
|
1867
1867
|
function zc(c, t, e, i = {}, s = {}, n = 0, r = 1 / 0) {
|
|
1868
1868
|
t.boundingBox || t.computeBoundingBox(), _n.set(t.boundingBox.min, t.boundingBox.max, e), _n.needsUpdate = !0;
|
|
1869
|
-
const a = c.geometry, o = a.attributes.position, l = a.index, h = t.attributes.position, d = t.index, u =
|
|
1869
|
+
const a = c.geometry, o = a.attributes.position, l = a.index, h = t.attributes.position, d = t.index, u = Qe.getPrimitive(), f = Qe.getPrimitive();
|
|
1870
1870
|
let m = Dc, x = Lc, y = null, T = null;
|
|
1871
1871
|
s && (y = Rc, T = Fc);
|
|
1872
1872
|
let w = 1 / 0, b = null, E = null;
|
|
@@ -1909,7 +1909,7 @@ function zc(c, t, e, i = {}, s = {}, n = 0, r = 1 / 0) {
|
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
|
-
),
|
|
1912
|
+
), Qe.releasePrimitive(u), Qe.releasePrimitive(f), w === 1 / 0 ? null : (i.point ? i.point.copy(x) : i.point = x.clone(), i.distance = w, i.faceIndex = b, s && (s.point ? s.point.copy(T) : s.point = T.clone(), s.point.applyMatrix4(Os), x.applyMatrix4(Os), s.distance = x.sub(s.point).length(), s.faceIndex = E), i);
|
|
1913
1913
|
}
|
|
1914
1914
|
function jr(c, t, e) {
|
|
1915
1915
|
return c === null ? null : (c.point.applyMatrix4(t.matrixWorld), c.distance = c.point.distanceTo(e.ray.origin), c.object = t, c);
|
|
@@ -2181,7 +2181,7 @@ class cs extends rc {
|
|
|
2181
2181
|
* @returns {boolean}
|
|
2182
2182
|
*/
|
|
2183
2183
|
shapecast(t) {
|
|
2184
|
-
const e =
|
|
2184
|
+
const e = Qe.getPrimitive(), i = super.shapecast(
|
|
2185
2185
|
{
|
|
2186
2186
|
...t,
|
|
2187
2187
|
intersectsPrimitive: t.intersectsTriangle,
|
|
@@ -2191,7 +2191,7 @@ class cs extends rc {
|
|
|
2191
2191
|
iterate: this.indirect ? bc : mc
|
|
2192
2192
|
}
|
|
2193
2193
|
);
|
|
2194
|
-
return
|
|
2194
|
+
return Qe.releasePrimitive(e), i;
|
|
2195
2195
|
}
|
|
2196
2196
|
/**
|
|
2197
2197
|
* A generalized cast function that traverses two BVH structures simultaneously to perform
|
|
@@ -2214,12 +2214,12 @@ class cs extends rc {
|
|
|
2214
2214
|
intersectsRanges: s,
|
|
2215
2215
|
intersectsTriangles: n
|
|
2216
2216
|
} = i;
|
|
2217
|
-
const r =
|
|
2217
|
+
const r = Qe.getPrimitive(), a = this.geometry.index, o = this.geometry.attributes.position, l = this.indirect ? (m) => {
|
|
2218
2218
|
const x = this.resolveTriangleIndex(m);
|
|
2219
2219
|
me(r, x * 3, a, o);
|
|
2220
2220
|
} : (m) => {
|
|
2221
2221
|
me(r, m * 3, a, o);
|
|
2222
|
-
}, h =
|
|
2222
|
+
}, h = Qe.getPrimitive(), d = t.geometry.index, u = t.geometry.attributes.position, f = t.indirect ? (m) => {
|
|
2223
2223
|
const x = t.resolveTriangleIndex(m);
|
|
2224
2224
|
me(h, x * 3, d, u);
|
|
2225
2225
|
} : (m) => {
|
|
@@ -3519,7 +3519,7 @@ class C0 {
|
|
|
3519
3519
|
}
|
|
3520
3520
|
const nh = {
|
|
3521
3521
|
"Precision from file": 99
|
|
3522
|
-
}, S0 = (c, t) => c.toFixed(t === nh["Precision from file"] ? 2 : t), rh = "en", ht = !1, ah = 10,
|
|
3522
|
+
}, S0 = (c, t) => c.toFixed(t === nh["Precision from file"] ? 2 : t), rh = "en", ht = !1, ah = 10, Ze = 11, oi = 12, co = 583902, E0 = [0.031, 0.906, 0.867, 0.5], In = [0.3, 0.3, 0.3, 0.8], ho = 0.5, Bn = 0.1, kn = 5e3, oh = 45, O0 = "x-viewer-iconfont", P0 = "x-viewer-iconfont2", uo = 10, qr = new p.Vector3(), Yr = new p.Vector3(), Xr = new p.Vector3(), ss = new p.Vector3(), Ct = new p.Vector3(), Zr = new p.Triangle();
|
|
3523
3523
|
function lh(c, t, e, i, s) {
|
|
3524
3524
|
const n = [], r = {};
|
|
3525
3525
|
let a, o, l, h;
|
|
@@ -4367,7 +4367,9 @@ const ph = {
|
|
|
4367
4367
|
pickMarkup: "Click on a markup to confirm the screenshot range"
|
|
4368
4368
|
},
|
|
4369
4369
|
WebGL: {
|
|
4370
|
-
NotAvailable: "Unable to create a WebGL context in this browser/GPU environment
|
|
4370
|
+
NotAvailable: "Unable to create a WebGL context in this browser/GPU environment; the drawing cannot be rendered. A common cause is hardware acceleration (called 'graphics acceleration' in some browsers) being enabled while the GPU cannot keep up. Please turn OFF this option in your browser settings and restart the browser. If it still fails, update the graphics driver or try a different browser.",
|
|
4371
|
+
SettingsLink: "Open Chrome System Settings (chrome://settings/system)",
|
|
4372
|
+
CopyFallback: "请手动打开 chrome://settings/system 并关闭硬件加速(部分浏览器称为「图形加速」),然后重启浏览器。"
|
|
4371
4373
|
}
|
|
4372
4374
|
}, mh = {
|
|
4373
4375
|
ProgressBar: {
|
|
@@ -4379,10 +4381,12 @@ const ph = {
|
|
|
4379
4381
|
pickMarkup: "点击一个批注以确定截图范围"
|
|
4380
4382
|
},
|
|
4381
4383
|
WebGL: {
|
|
4382
|
-
NotAvailable: "当前浏览器或显卡环境无法创建 WebGL
|
|
4384
|
+
NotAvailable: "当前浏览器或显卡环境无法创建 WebGL 上下文,图纸无法渲染。常见原因是开启了浏览器的硬件加速(部分浏览器称为「图形加速」)但显卡性能不足:请在浏览器设置中关闭该选项,并重启浏览器。",
|
|
4385
|
+
SettingsLink: "打开 Chrome 系统设置(chrome://settings/system)",
|
|
4386
|
+
CopyFallback: "请手动打开 chrome://settings/system 并关闭硬件加速(部分浏览器称为「图形加速」),然后重启浏览器。"
|
|
4383
4387
|
}
|
|
4384
|
-
},
|
|
4385
|
-
|
|
4388
|
+
}, Ge = nl.createInstance(), gh = "cn";
|
|
4389
|
+
Ge.init({
|
|
4386
4390
|
lng: gh,
|
|
4387
4391
|
debug: !1,
|
|
4388
4392
|
resources: {
|
|
@@ -4496,7 +4500,7 @@ class Ce {
|
|
|
4496
4500
|
});
|
|
4497
4501
|
}
|
|
4498
4502
|
}
|
|
4499
|
-
const yh = new p.Vector3(0, 1, 0),
|
|
4503
|
+
const yh = new p.Vector3(0, 1, 0), $e = class $e {
|
|
4500
4504
|
/**
|
|
4501
4505
|
* Clears any styles, including transparency, wireframe mode, filter by floor, etc.
|
|
4502
4506
|
* @param object
|
|
@@ -4602,7 +4606,7 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
4602
4606
|
static setObjectOpacityById(t, e, i = 0.3, s, n) {
|
|
4603
4607
|
const r = t.getObjectById(e);
|
|
4604
4608
|
if (!r) throw new Error("Failed to find object by id: " + e);
|
|
4605
|
-
return
|
|
4609
|
+
return $e.setObjectOpacity(r, i, s, n);
|
|
4606
4610
|
}
|
|
4607
4611
|
/**
|
|
4608
4612
|
* Reverts an object's opacity
|
|
@@ -4610,7 +4614,7 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
4610
4614
|
static revertObjectOpacityById(t, e, i, s, n) {
|
|
4611
4615
|
const r = t.getObjectById(e);
|
|
4612
4616
|
if (!r) throw new Error("Failed to find object by id: " + e);
|
|
4613
|
-
|
|
4617
|
+
$e.revertObjectOpacity(r, i, s, n);
|
|
4614
4618
|
}
|
|
4615
4619
|
/**
|
|
4616
4620
|
* Applies material to an object, including its children
|
|
@@ -4710,7 +4714,7 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
4710
4714
|
static setWireframeModeById(t, e) {
|
|
4711
4715
|
const i = t.getObjectById(e);
|
|
4712
4716
|
if (!i) throw new Error("Failed to find object by id: " + e);
|
|
4713
|
-
|
|
4717
|
+
$e.setWireframeMode(i);
|
|
4714
4718
|
}
|
|
4715
4719
|
/**
|
|
4716
4720
|
* Reverts an object to be non-wireframe mode.
|
|
@@ -4726,7 +4730,7 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
4726
4730
|
static revertWireframeModeById(t, e) {
|
|
4727
4731
|
const i = t.getObjectById(e);
|
|
4728
4732
|
if (!i) throw new Error("Failed to find object by id: " + e);
|
|
4729
|
-
|
|
4733
|
+
$e.revertWireframeMode(i);
|
|
4730
4734
|
}
|
|
4731
4735
|
/**
|
|
4732
4736
|
* Finds objects by name, id, userData, etc.
|
|
@@ -4935,9 +4939,9 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
4935
4939
|
*/
|
|
4936
4940
|
static createOutline(t, e = this.OUTLINE_MATERIAL, i) {
|
|
4937
4941
|
const s = new p.EdgesGeometry(t, uo), n = new p.LineSegments(s, e);
|
|
4938
|
-
return n.layers.enableAll(),
|
|
4942
|
+
return n.layers.enableAll(), $e.disableLayerChannels(n, [
|
|
4939
4943
|
oi,
|
|
4940
|
-
|
|
4944
|
+
Ze
|
|
4941
4945
|
]), n.userData.isOutline = !0, n.matrixAutoUpdate = ht, i && n.applyMatrix4(i), n;
|
|
4942
4946
|
}
|
|
4943
4947
|
/**
|
|
@@ -5072,7 +5076,7 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
5072
5076
|
if (i) {
|
|
5073
5077
|
const s = t.children;
|
|
5074
5078
|
for (let n = 0, r = s.length; n < r; n++)
|
|
5075
|
-
|
|
5079
|
+
$e.enableLayerChannels(s[n], e, !0);
|
|
5076
5080
|
}
|
|
5077
5081
|
}
|
|
5078
5082
|
static disableLayerChannels(t, e, i = !0) {
|
|
@@ -5081,7 +5085,7 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
5081
5085
|
if (i) {
|
|
5082
5086
|
const s = t.children;
|
|
5083
5087
|
for (let n = 0, r = s.length; n < r; n++)
|
|
5084
|
-
|
|
5088
|
+
$e.disableLayerChannels(s[n], e, !0);
|
|
5085
5089
|
}
|
|
5086
5090
|
}
|
|
5087
5091
|
static setLayerChannels(t, e, i = !0) {
|
|
@@ -5091,14 +5095,14 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
5091
5095
|
if (i) {
|
|
5092
5096
|
const s = t.children;
|
|
5093
5097
|
for (let n = 0, r = s.length; n < r; n++)
|
|
5094
|
-
|
|
5098
|
+
$e.setLayerChannels(s[n], e, !0);
|
|
5095
5099
|
}
|
|
5096
5100
|
}
|
|
5097
5101
|
static isObjectHittable(t) {
|
|
5098
5102
|
return t.layers.isEnabled(ah);
|
|
5099
5103
|
}
|
|
5100
5104
|
static isObjectSnapable(t) {
|
|
5101
|
-
return t.layers.isEnabled(
|
|
5105
|
+
return t.layers.isEnabled(Ze);
|
|
5102
5106
|
}
|
|
5103
5107
|
static isObjectSelectable(t) {
|
|
5104
5108
|
return t.layers.isEnabled(oi);
|
|
@@ -5123,18 +5127,18 @@ const yh = new p.Vector3(0, 1, 0), Ke = class Ke {
|
|
|
5123
5127
|
/**
|
|
5124
5128
|
* Outline default material
|
|
5125
5129
|
*/
|
|
5126
|
-
g(
|
|
5130
|
+
g($e, "OUTLINE_MATERIAL", new p.LineBasicMaterial({
|
|
5127
5131
|
name: "outline",
|
|
5128
5132
|
color: 0,
|
|
5129
5133
|
transparent: !0,
|
|
5130
5134
|
opacity: 0.2
|
|
5131
|
-
})), g(
|
|
5135
|
+
})), g($e, "BOX_FACE_MATERIAL", new p.MeshPhongMaterial({
|
|
5132
5136
|
color: 11648971,
|
|
5133
5137
|
transparent: !0,
|
|
5134
5138
|
opacity: 0.3,
|
|
5135
5139
|
side: p.FrontSide
|
|
5136
5140
|
}));
|
|
5137
|
-
let Q =
|
|
5141
|
+
let Q = $e;
|
|
5138
5142
|
const ks = new p.Matrix4(), xh = new p.Matrix4(), as = class as {
|
|
5139
5143
|
static resetMergeInfo() {
|
|
5140
5144
|
this.MergeInfo.removedObjects = 0, this.MergeInfo.mergedMeshes = 0, this.MergeInfo.mergedLines = 0, this.MergeInfo.mergedPoints = 0, this.MergeInfo.mergedUnknownTypeObjects = 0, this.MergeInfo.elapsedTime = 0;
|
|
@@ -14788,7 +14792,7 @@ function Ah(c, t) {
|
|
|
14788
14792
|
const e = oa(c.text).plainText, i = oa(t.text).plainText;
|
|
14789
14793
|
return e === i;
|
|
14790
14794
|
}
|
|
14791
|
-
var
|
|
14795
|
+
var Xe = /* @__PURE__ */ ((c) => (c.Added = "Added", c.Removed = "Removed", c.Modified = "Modified", c.NoChange = "NoChange", c))(Xe || {});
|
|
14792
14796
|
let De = 1;
|
|
14793
14797
|
const vt = class vt {
|
|
14794
14798
|
constructor(t, e, i = {}) {
|
|
@@ -17216,7 +17220,7 @@ class md {
|
|
|
17216
17220
|
for (o.leaderLines.push(l); !t.isEOF(); )
|
|
17217
17221
|
switch (e.code) {
|
|
17218
17222
|
case 10:
|
|
17219
|
-
l.vertices[0].push(
|
|
17223
|
+
l.vertices[0].push(We(t)), e = t.lastReadGroup;
|
|
17220
17224
|
break;
|
|
17221
17225
|
case 305:
|
|
17222
17226
|
return;
|
|
@@ -17237,10 +17241,10 @@ class md {
|
|
|
17237
17241
|
o.hasSetDoglegVector = e.value, e = t.next();
|
|
17238
17242
|
break;
|
|
17239
17243
|
case 10:
|
|
17240
|
-
o.lastLeaderLinePoint =
|
|
17244
|
+
o.lastLeaderLinePoint = We(t), e = t.lastReadGroup;
|
|
17241
17245
|
break;
|
|
17242
17246
|
case 11:
|
|
17243
|
-
o.doglegVector =
|
|
17247
|
+
o.doglegVector = We(t), e = t.lastReadGroup;
|
|
17244
17248
|
break;
|
|
17245
17249
|
case 90:
|
|
17246
17250
|
o.leaderBranchIndex = e.value, e = t.next();
|
|
@@ -17264,7 +17268,7 @@ class md {
|
|
|
17264
17268
|
i.contextData.contentScale = e.value, e = t.next();
|
|
17265
17269
|
break;
|
|
17266
17270
|
case 10:
|
|
17267
|
-
i.contextData.contentBasePosition =
|
|
17271
|
+
i.contextData.contentBasePosition = We(t), e = t.lastReadGroup;
|
|
17268
17272
|
break;
|
|
17269
17273
|
case 145:
|
|
17270
17274
|
i.contextData.landingGap = e.value, e = t.next();
|
|
@@ -17276,13 +17280,13 @@ class md {
|
|
|
17276
17280
|
i.contextData.defaultTextContents = e.value, e = t.next();
|
|
17277
17281
|
break;
|
|
17278
17282
|
case 11:
|
|
17279
|
-
i.contextData.textNormalDirection =
|
|
17283
|
+
i.contextData.textNormalDirection = We(t), e = t.lastReadGroup;
|
|
17280
17284
|
break;
|
|
17281
17285
|
case 12:
|
|
17282
|
-
i.contextData.textLocation =
|
|
17286
|
+
i.contextData.textLocation = We(t), e = t.lastReadGroup;
|
|
17283
17287
|
break;
|
|
17284
17288
|
case 13:
|
|
17285
|
-
i.contextData.textDirection =
|
|
17289
|
+
i.contextData.textDirection = We(t), e = t.lastReadGroup;
|
|
17286
17290
|
break;
|
|
17287
17291
|
case 140:
|
|
17288
17292
|
i.contextData.arrowHeadSize = e.value, e = t.next();
|
|
@@ -17351,10 +17355,10 @@ class md {
|
|
|
17351
17355
|
i.contextData.blockContentId = e.value, e = t.next();
|
|
17352
17356
|
break;
|
|
17353
17357
|
case 14:
|
|
17354
|
-
i.contextData.blockContentNormalDirection =
|
|
17358
|
+
i.contextData.blockContentNormalDirection = We(t), e = t.lastReadGroup;
|
|
17355
17359
|
break;
|
|
17356
17360
|
case 15:
|
|
17357
|
-
i.contextData.blockContentPosition =
|
|
17361
|
+
i.contextData.blockContentPosition = We(t), e = t.lastReadGroup;
|
|
17358
17362
|
break;
|
|
17359
17363
|
case 16:
|
|
17360
17364
|
i.contextData.blockContentScale = e.value, e = t.next();
|
|
@@ -17369,13 +17373,13 @@ class md {
|
|
|
17369
17373
|
i.contextData.blockTransformationMatrix = gd(t, 47), e = t.lastReadGroup;
|
|
17370
17374
|
break;
|
|
17371
17375
|
case 110:
|
|
17372
|
-
i.contextData.planeOriginPoint =
|
|
17376
|
+
i.contextData.planeOriginPoint = We(t), e = t.lastReadGroup;
|
|
17373
17377
|
break;
|
|
17374
17378
|
case 111:
|
|
17375
|
-
i.contextData.planeXAxisDirection =
|
|
17379
|
+
i.contextData.planeXAxisDirection = We(t), e = t.lastReadGroup;
|
|
17376
17380
|
break;
|
|
17377
17381
|
case 112:
|
|
17378
|
-
i.contextData.planeYAxisDirection =
|
|
17382
|
+
i.contextData.planeYAxisDirection = We(t), e = t.lastReadGroup;
|
|
17379
17383
|
break;
|
|
17380
17384
|
case 297:
|
|
17381
17385
|
i.contextData.planeNormalReversed = e.value, e = t.next();
|
|
@@ -17456,7 +17460,7 @@ class md {
|
|
|
17456
17460
|
i.blockContentColor = e.value, e = t.next();
|
|
17457
17461
|
break;
|
|
17458
17462
|
case 10:
|
|
17459
|
-
i.blockContentScale =
|
|
17463
|
+
i.blockContentScale = We(t), e = t.lastReadGroup;
|
|
17460
17464
|
break;
|
|
17461
17465
|
case 43:
|
|
17462
17466
|
i.blockContentRotation = e.value, e = t.next();
|
|
@@ -17511,7 +17515,7 @@ class md {
|
|
|
17511
17515
|
})(), i;
|
|
17512
17516
|
}
|
|
17513
17517
|
}
|
|
17514
|
-
function
|
|
17518
|
+
function We(c) {
|
|
17515
17519
|
const t = {};
|
|
17516
17520
|
let e = c.lastReadGroup || c.next(), i = !1, s = !1, n = !1, r = !1;
|
|
17517
17521
|
for (; !c.isEOF(); ) {
|
|
@@ -19473,7 +19477,7 @@ class n1 {
|
|
|
19473
19477
|
let C = null, v = null;
|
|
19474
19478
|
const M = {};
|
|
19475
19479
|
for (n = t.next(); ; ) {
|
|
19476
|
-
if (
|
|
19480
|
+
if (qe(n, 0, "ENDSEC")) {
|
|
19477
19481
|
C && (M[C] = v);
|
|
19478
19482
|
break;
|
|
19479
19483
|
} else
|
|
@@ -19484,8 +19488,8 @@ class n1 {
|
|
|
19484
19488
|
}
|
|
19485
19489
|
function o() {
|
|
19486
19490
|
const C = {};
|
|
19487
|
-
for (n = t.next(); n.value !== "EOF" && !
|
|
19488
|
-
if (
|
|
19491
|
+
for (n = t.next(); n.value !== "EOF" && !qe(n, 0, "ENDSEC"); )
|
|
19492
|
+
if (qe(n, 0, "BLOCK")) {
|
|
19489
19493
|
A.trace("block {");
|
|
19490
19494
|
const v = l();
|
|
19491
19495
|
A.trace("}"), O(v), v.name ? C[v.name] = v : console.error("[DxfParser] Block with handle '" + v.handle + "' is missing a name, ignored!");
|
|
@@ -19538,7 +19542,7 @@ class n1 {
|
|
|
19538
19542
|
bt(n), n = t.next();
|
|
19539
19543
|
break;
|
|
19540
19544
|
}
|
|
19541
|
-
if (
|
|
19545
|
+
if (qe(n, 0, "ENDBLK")) {
|
|
19542
19546
|
n = t.next();
|
|
19543
19547
|
break;
|
|
19544
19548
|
}
|
|
@@ -19547,15 +19551,15 @@ class n1 {
|
|
|
19547
19551
|
}
|
|
19548
19552
|
function h() {
|
|
19549
19553
|
const C = {};
|
|
19550
|
-
for (n = t.next(); n.value !== "EOF" && !
|
|
19551
|
-
|
|
19554
|
+
for (n = t.next(); n.value !== "EOF" && !qe(n, 0, "ENDSEC"); )
|
|
19555
|
+
qe(n, 0, "TABLE") ? (n = t.next(), b[n.value] ? (A.trace(n.value + " Table {"), C[b[n.value].tableName] = u(n), A.trace("}")) : A.trace("Unhandled Table " + n.value)) : n = t.next();
|
|
19552
19556
|
return n = t.next(), C;
|
|
19553
19557
|
}
|
|
19554
19558
|
const d = "ENDTAB";
|
|
19555
19559
|
function u(C) {
|
|
19556
19560
|
const v = b[C.value], M = {};
|
|
19557
19561
|
let P = 0;
|
|
19558
|
-
for (n = t.next(); !
|
|
19562
|
+
for (n = t.next(); !qe(n, 0, d); )
|
|
19559
19563
|
switch (n.code) {
|
|
19560
19564
|
case 5:
|
|
19561
19565
|
M.handle = n.value, n = t.next();
|
|
@@ -19589,7 +19593,7 @@ class n1 {
|
|
|
19589
19593
|
function f() {
|
|
19590
19594
|
const C = [];
|
|
19591
19595
|
let v = {};
|
|
19592
|
-
for (A.trace("Viewport {"), n = t.next(); !
|
|
19596
|
+
for (A.trace("Viewport {"), n = t.next(); !qe(n, 0, d); )
|
|
19593
19597
|
switch (n.code) {
|
|
19594
19598
|
case 2:
|
|
19595
19599
|
v.name = n.value, n = t.next();
|
|
@@ -19683,7 +19687,7 @@ class n1 {
|
|
|
19683
19687
|
function m() {
|
|
19684
19688
|
const C = {};
|
|
19685
19689
|
let v = {}, M = 0, P = "", _ = !1;
|
|
19686
|
-
for (A.trace("LType {"), n = t.next(); !
|
|
19690
|
+
for (A.trace("LType {"), n = t.next(); !qe(n, 0, "ENDTAB"); )
|
|
19687
19691
|
switch (n.code) {
|
|
19688
19692
|
case 2:
|
|
19689
19693
|
v.name = n.value.toUpperCase(), P = v.name, n = t.next();
|
|
@@ -19734,7 +19738,7 @@ class n1 {
|
|
|
19734
19738
|
function x() {
|
|
19735
19739
|
const C = {};
|
|
19736
19740
|
let v = {}, M;
|
|
19737
|
-
for (A.trace("Layer {"), n = t.next(); !
|
|
19741
|
+
for (A.trace("Layer {"), n = t.next(); !qe(n, 0, "ENDTAB"); )
|
|
19738
19742
|
switch (n.code) {
|
|
19739
19743
|
case 2:
|
|
19740
19744
|
v.name = n.value, M = n.value, n = t.next();
|
|
@@ -19769,7 +19773,7 @@ class n1 {
|
|
|
19769
19773
|
function y() {
|
|
19770
19774
|
const C = {};
|
|
19771
19775
|
let v = {}, M;
|
|
19772
|
-
for (A.trace("Style {"), n = t.next(); !
|
|
19776
|
+
for (A.trace("Style {"), n = t.next(); !qe(n, 0, "ENDTAB"); )
|
|
19773
19777
|
switch (n.code) {
|
|
19774
19778
|
case 2:
|
|
19775
19779
|
v.styleName = n.value, M = n.value, n = t.next();
|
|
@@ -19816,7 +19820,7 @@ class n1 {
|
|
|
19816
19820
|
function T() {
|
|
19817
19821
|
const C = {};
|
|
19818
19822
|
let v = {}, M;
|
|
19819
|
-
for (A.trace("DimStyle {"), n = t.next(); !
|
|
19823
|
+
for (A.trace("DimStyle {"), n = t.next(); !qe(n, 0, "ENDTAB"); )
|
|
19820
19824
|
switch (n.code) {
|
|
19821
19825
|
case 2:
|
|
19822
19826
|
v.styleName = n.value, M = n.value, n = t.next();
|
|
@@ -19878,7 +19882,7 @@ class n1 {
|
|
|
19878
19882
|
function w() {
|
|
19879
19883
|
const C = {};
|
|
19880
19884
|
let v = {}, M;
|
|
19881
|
-
for (A.trace("BlockRecord {"), n = t.next(); !
|
|
19885
|
+
for (A.trace("BlockRecord {"), n = t.next(); !qe(n, 0, "ENDTAB"); )
|
|
19882
19886
|
switch (n.code) {
|
|
19883
19887
|
case 5:
|
|
19884
19888
|
v.handle = n.value, n = t.next();
|
|
@@ -20023,7 +20027,7 @@ class n1 {
|
|
|
20023
20027
|
return e.push(t.substring(i, t.length)), e;
|
|
20024
20028
|
}
|
|
20025
20029
|
}
|
|
20026
|
-
function
|
|
20030
|
+
function qe(c, t, e) {
|
|
20027
20031
|
return c.code === t && c.value === e;
|
|
20028
20032
|
}
|
|
20029
20033
|
function bt(c) {
|
|
@@ -20298,7 +20302,7 @@ const ti = class ti extends wo {
|
|
|
20298
20302
|
*/
|
|
20299
20303
|
g(ti, "_instance");
|
|
20300
20304
|
let an = ti;
|
|
20301
|
-
const
|
|
20305
|
+
const Ye = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vector3(0, 0, 1), ya = new p.Vector3(0, 0, 0), zt = 16777215, l1 = "CONTINUOUS", Rs = new p.PointsMaterial({
|
|
20302
20306
|
color: zt
|
|
20303
20307
|
}), ge = new p.LineBasicMaterial({
|
|
20304
20308
|
color: zt
|
|
@@ -20700,7 +20704,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
20700
20704
|
const O = this.layoutsSnapObjectsMap[b];
|
|
20701
20705
|
for (let C = 0; C < O.length; C++) {
|
|
20702
20706
|
const v = O[C], M = v.userData.layerName;
|
|
20703
|
-
this.getLayerVisible(e, M) === !1 && v.layers.disable(
|
|
20707
|
+
this.getLayerVisible(e, M) === !1 && v.layers.disable(Ze), U.SHOW_SNAP_OBJECT && (v.layers.enableAll(), v.material instanceof p.PointsMaterial ? v.material = wa : v.material instanceof p.LineBasicMaterial ? v.material = va : v.material instanceof p.MeshBasicMaterial && (v.material = Ma));
|
|
20704
20708
|
let P = v;
|
|
20705
20709
|
const _ = fe.identity();
|
|
20706
20710
|
for (; P && P.userData.isLayoutLevelObject !== !0; )
|
|
@@ -20842,7 +20846,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
20842
20846
|
!I && (I = new V(), I.name = U.MODEL_LAYOUT_NAME, I.userData.isLayoutLevelObject = !0, m.add(I)), I.add(_), _.traverse((B) => {
|
|
20843
20847
|
if (B.geometry) {
|
|
20844
20848
|
const k = B.userData.layerName, D = this.getLayerVisible(f, k);
|
|
20845
|
-
B.userData.isSnapObject && (!this.layoutsSnapObjectsMap[P.layoutName] && (this.layoutsSnapObjectsMap[P.layoutName] = []), this.layoutsSnapObjectsMap[P.layoutName].push(B), D === !1 && _.layers.disable(
|
|
20849
|
+
B.userData.isSnapObject && (!this.layoutsSnapObjectsMap[P.layoutName] && (this.layoutsSnapObjectsMap[P.layoutName] = []), this.layoutsSnapObjectsMap[P.layoutName].push(B), D === !1 && _.layers.disable(Ze));
|
|
20846
20850
|
let F = b[k];
|
|
20847
20851
|
!F && (F = [], b[k] = F), F.push(B);
|
|
20848
20852
|
}
|
|
@@ -20851,14 +20855,14 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
20851
20855
|
n && u && !d.preservedHandles && (d.preservedHandles = /* @__PURE__ */ new Set());
|
|
20852
20856
|
for (const v in s) {
|
|
20853
20857
|
const M = s[v];
|
|
20854
|
-
u && (M.type ===
|
|
20858
|
+
u && (M.type === Xe.Added || M.type === Xe.Modified) && (d.preservedHandles?.add(M.handle), M.parentHandles && M.parentHandles.forEach((_) => d.preservedHandles?.add(_)));
|
|
20855
20859
|
let P = this.entityThreejsCache && this.entityThreejsCache[M.handle];
|
|
20856
20860
|
if (M.parentHandles && (P = this.entityThreejsCache && this.entityThreejsCache[M.parentHandles[M.parentHandles.length - 1]]), P) {
|
|
20857
20861
|
if (P.parent && P.parent.userData.originalType) {
|
|
20858
20862
|
this.setObjectColorByChange(
|
|
20859
20863
|
P,
|
|
20860
20864
|
{
|
|
20861
|
-
type:
|
|
20865
|
+
type: Xe.NoChange
|
|
20862
20866
|
}
|
|
20863
20867
|
/* 类型桥接:运行时仅需 type 字段 */
|
|
20864
20868
|
);
|
|
@@ -20866,14 +20870,14 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
20866
20870
|
}
|
|
20867
20871
|
P = this.setObjectColorByChange(P, M);
|
|
20868
20872
|
}
|
|
20869
|
-
if (M.type !==
|
|
20873
|
+
if (M.type !== Xe.NoChange && P) {
|
|
20870
20874
|
let _ = P.parent;
|
|
20871
20875
|
const I = fe.identity();
|
|
20872
20876
|
for (; _ && _.userData.isLayoutLevelObject !== !0; )
|
|
20873
20877
|
I.premultiply(_.matrix), _ = _.parent;
|
|
20874
20878
|
ut.makeEmpty();
|
|
20875
20879
|
const B = V.getBox(P, ut);
|
|
20876
|
-
B.applyMatrix4(I), M.type ===
|
|
20880
|
+
B.applyMatrix4(I), M.type === Xe.Added ? !u && (M.box = new p.Box3().copy(B)) : M.type === Xe.Removed ? u && (M.box = new p.Box3().copy(B)) : M.type === Xe.Modified && (M.box ? M.box.union(B) : M.box = new p.Box3().copy(B));
|
|
20877
20881
|
}
|
|
20878
20882
|
}
|
|
20879
20883
|
for (const v in this.layoutsSnapObjectsMap) {
|
|
@@ -20925,7 +20929,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
20925
20929
|
setObjectColorByChange(e, i) {
|
|
20926
20930
|
const s = (a) => {
|
|
20927
20931
|
let o = yt.ENTITY_COLOR_NO_CHANGE;
|
|
20928
|
-
return a.type ===
|
|
20932
|
+
return a.type === Xe.Added ? o = yt.ENTITY_COLOR_ADDED : a.type === Xe.Removed ? o = yt.ENTITY_COLOR_REMOVED : a.type === Xe.Modified && (o = this.compareContext?.isTheFirstFile ? yt.ENTITY_COLOR_REMOVED : yt.ENTITY_COLOR_ADDED), o;
|
|
20929
20933
|
}, n = (a, o) => {
|
|
20930
20934
|
a.traverse((l) => {
|
|
20931
20935
|
if (l.material) {
|
|
@@ -21058,7 +21062,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
21058
21062
|
if (o.userData.handle = e.handle, e.type !== "INSERT" && e.type !== "DIMENSION" && o.traverse((T) => {
|
|
21059
21063
|
T.geometry && (T.userData.layerName = f, T.userData.handle = e.handle, T.userData.dxfType = e.type, !y && x !== void 0 && (T.userData.xdata = x), this.setMaterial(T, e, i, s));
|
|
21060
21064
|
}), !l && (this.nonSnapableTypes.has(e.type) && o.traverse((T) => {
|
|
21061
|
-
T.layers.disable(
|
|
21065
|
+
T.layers.disable(Ze);
|
|
21062
21066
|
}), this.enableRenderOrder && (this.entityHandlesWithRenderOrder[e.handle] ? o.renderOrder = parseInt(this.entityHandlesWithRenderOrder[e.handle], 16) + 0.1 : o.renderOrder = parseInt(e.handle, 16))), e.type === "INSERT" && !s && !this.enableRenderOrder) {
|
|
21063
21067
|
const T = e.block ? i.blocks[e.block]?.entities : void 0;
|
|
21064
21068
|
let w = !0;
|
|
@@ -21120,7 +21124,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
21120
21124
|
const E = new p.BufferGeometry().setFromPoints(y), S = new V(G.Line);
|
|
21121
21125
|
S.geometry = E, S.material = ge;
|
|
21122
21126
|
const O = new V(G.Point);
|
|
21123
|
-
return O.geometry = xa, O.material = Rs, O.matrix.setPosition(e.center.x, e.center.y, e.center.z), O.userData.isSnapObject = !0, O.userData.type = "CircleCenter", O.layers.set(
|
|
21127
|
+
return O.geometry = xa, O.material = Rs, O.matrix.setPosition(e.center.x, e.center.y, e.center.z), O.userData.isSnapObject = !0, O.userData.type = "CircleCenter", O.layers.set(Ze), S.add(O), b && (this.setRTCUserData(S), S.matrix.setPosition(w.x, w.y, 0)), S.layers.enableAll(), S;
|
|
21124
21128
|
}
|
|
21125
21129
|
// 说明:以下为源码中注释掉的 loadMText 旧实现(保真保留)。
|
|
21126
21130
|
// ['loadMText'](entity, data, parentEntity) {
|
|
@@ -21332,7 +21336,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
21332
21336
|
});
|
|
21333
21337
|
let y = 0;
|
|
21334
21338
|
if (e.rotation && (y = e.rotation * Math.PI / 180), e.directionVector) {
|
|
21335
|
-
const P = e.directionVector, _ = new p.Vector3(P.x, P.y, P.z), I = _.clone().cross(
|
|
21339
|
+
const P = e.directionVector, _ = new p.Vector3(P.x, P.y, P.z), I = _.clone().cross(Ye), B = Ye.angleTo(_);
|
|
21336
21340
|
y = I.z > 0 ? -B : B;
|
|
21337
21341
|
}
|
|
21338
21342
|
H.shouldRebasePositionOnRTC($) && this.setRTCUserData(o), o.matrix.compose($, ye, it);
|
|
@@ -21446,7 +21450,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
21446
21450
|
});
|
|
21447
21451
|
let y = 0;
|
|
21448
21452
|
if (e.rotation && (y = e.rotation * Math.PI / 180), e.directionVector) {
|
|
21449
|
-
const w = e.directionVector, b = new p.Vector3(w.x, w.y, w.z), E = b.clone().cross(
|
|
21453
|
+
const w = e.directionVector, b = new p.Vector3(w.x, w.y, w.z), E = b.clone().cross(Ye), S = Ye.angleTo(b);
|
|
21450
21454
|
y = E.z > 0 ? -S : S;
|
|
21451
21455
|
}
|
|
21452
21456
|
H.shouldRebasePositionOnRTC($) && this.setRTCUserData(o), o.matrix.compose($, ye, it);
|
|
@@ -21812,7 +21816,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
21812
21816
|
}), E.closePath(), y.push(new p.ShapeGeometry(E));
|
|
21813
21817
|
});
|
|
21814
21818
|
const T = Pe(y), w = new V(G.Mesh);
|
|
21815
|
-
w.geometry = T, w.material = bi, w.layers.enableAll(), w.layers.disable(
|
|
21819
|
+
w.geometry = T, w.material = bi, w.layers.enableAll(), w.layers.disable(Ze), a.add(w);
|
|
21816
21820
|
}
|
|
21817
21821
|
let l = !1;
|
|
21818
21822
|
const h = new p.Vector3();
|
|
@@ -21833,9 +21837,9 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
21833
21837
|
A.warn("[Dxf] Failed to convert line with width to mesh geometry: %s", e.handle);
|
|
21834
21838
|
else {
|
|
21835
21839
|
const E = new V(G.Mesh);
|
|
21836
|
-
E.geometry = y, E.material = bi, E.layers.enableAll(), E.layers.disable(
|
|
21840
|
+
E.geometry = y, E.material = bi, E.layers.enableAll(), E.layers.disable(Ze), a.add(E);
|
|
21837
21841
|
const S = Q.createOutline(y, ge, E.matrix), O = new V(G.LineSegment);
|
|
21838
|
-
O.geometry = S.geometry, O.material = S.material, O.matrix = S.matrix, O.layers.enableAll(), O.layers.disable(
|
|
21842
|
+
O.geometry = S.geometry, O.material = S.material, O.matrix = S.matrix, O.layers.enableAll(), O.layers.disable(Ze), a.add(O);
|
|
21839
21843
|
}
|
|
21840
21844
|
}
|
|
21841
21845
|
}
|
|
@@ -21907,7 +21911,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
21907
21911
|
});
|
|
21908
21912
|
let w = 0;
|
|
21909
21913
|
if (e.contextData?.textRotation && (w = e.contextData.textRotation * Math.PI / 180), e.contextData?.textDirection) {
|
|
21910
|
-
const E = e.contextData.textDirection, S = new p.Vector3(E.x, E.y, E.z), O = S.clone().cross(
|
|
21914
|
+
const E = e.contextData.textDirection, S = new p.Vector3(E.x, E.y, E.z), O = S.clone().cross(Ye), C = Ye.angleTo(S);
|
|
21911
21915
|
w += O.z > 0 ? -C : C;
|
|
21912
21916
|
}
|
|
21913
21917
|
H.shouldRebasePositionOnRTC($) && this.setRTCUserData(d), d.matrix.compose($, ye, it), e.contextData?.textLocation ? N.set(e.contextData.textLocation.x, e.contextData.textLocation.y, 0) : N.set(0, 0, 0);
|
|
@@ -22313,7 +22317,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
22313
22317
|
const b = new p.Vector3(e.center?.x, e.center?.y, e.center?.z).applyMatrix4(r.invert());
|
|
22314
22318
|
w.x = b.x, w.y = b.y;
|
|
22315
22319
|
const E = w, S = new V(G.Point);
|
|
22316
|
-
return S.geometry = xa, S.material = Rs, S.userData.handle = e.handle, S.userData.isSnapObject = !0, S.userData.type = "CircleCenter", S.layers.set(
|
|
22320
|
+
return S.geometry = xa, S.material = Rs, S.userData.handle = e.handle, S.userData.isSnapObject = !0, S.userData.type = "CircleCenter", S.layers.set(Ze), T.add(S), x ? (this.setRTCUserData(T), E.x += m.x, E.y += m.y) : H.shouldRebasePositionOnRTC(E) && this.setRTCUserData(T), T.matrix.setPosition(E), T.layers.enableAll(), T;
|
|
22317
22321
|
}
|
|
22318
22322
|
addTriangleFacingCamera(e, i, s, n) {
|
|
22319
22323
|
const r = new p.Vector3(), a = new p.Vector3();
|
|
@@ -22456,7 +22460,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
22456
22460
|
if (e.startPoint && e.endPoint) {
|
|
22457
22461
|
const u = new p.Vector3(e.startPoint.x, e.startPoint.y, e.startPoint.z), f = new p.Vector3(e.endPoint.x, e.endPoint.y, e.endPoint.z), m = new p.Vector3().subVectors(u, f), x = m.length(), y = x / l;
|
|
22458
22462
|
o.scale.multiplyScalar(y);
|
|
22459
|
-
const T = m.clone().cross(
|
|
22463
|
+
const T = m.clone().cross(Ye), w = m.angleTo(Ye);
|
|
22460
22464
|
o.rotateZ(T.z > 0 ? Math.PI - w : w - Math.PI), (e.mirrored === 2 || e.mirrored === 4) && o.rotateX(Math.PI);
|
|
22461
22465
|
}
|
|
22462
22466
|
break;
|
|
@@ -22471,7 +22475,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
22471
22475
|
o.userData.letterSpacing = S;
|
|
22472
22476
|
} else
|
|
22473
22477
|
y < 3 && o.scale.setX(y);
|
|
22474
|
-
const b = m.clone().cross(
|
|
22478
|
+
const b = m.clone().cross(Ye), E = m.angleTo(Ye);
|
|
22475
22479
|
o.rotateZ(b.z > 0 ? Math.PI - E : E - Math.PI);
|
|
22476
22480
|
}
|
|
22477
22481
|
break;
|
|
@@ -23060,7 +23064,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
23060
23064
|
S.geometry = E, S.material = bi, this.setHatchMaterial(S, n, i, x, s);
|
|
23061
23065
|
const O = S;
|
|
23062
23066
|
return y && (this.setRTCUserData(O), O.matrix.setPosition(x.x, x.y, 0)), O.traverse((C) => {
|
|
23063
|
-
C.layers.enableAll(), C.layers.disable(
|
|
23067
|
+
C.layers.enableAll(), C.layers.disable(Ze);
|
|
23064
23068
|
}), O;
|
|
23065
23069
|
}
|
|
23066
23070
|
loadOle2frame(e, i) {
|
|
@@ -23120,7 +23124,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
23120
23124
|
return e.position && !U.isFinitePoint(e.position) || e.startPoint && !U.isFinitePoint(e.startPoint) || e.endPoint && !U.isFinitePoint(e.endPoint) ? !1 : Number.isFinite(e.rotation ?? 0);
|
|
23121
23125
|
}
|
|
23122
23126
|
static getOcsMatrix(e) {
|
|
23123
|
-
let i =
|
|
23127
|
+
let i = Ye, s = jn, n = xi;
|
|
23124
23128
|
const r = new p.Vector3(0, 1, 0), a = new p.Vector3(0, 0, 1);
|
|
23125
23129
|
return z.areVectorsClose(e, a) ? fe.identity() : (n = e.clone().normalize(), !z.areVectorsClose(n, a) && (Math.abs(n.x) < 1 / 64 && Math.abs(n.y) < 1 / 64 ? i = r.cross(n).normalize() : i = a.cross(n).normalize(), s = n.clone().cross(i).normalize()), fe.set(i.x, i.y, i.z, 0, s.x, s.y, s.z, 0, n.x, n.y, n.z, 0, 0, 0, 0, 1));
|
|
23126
23130
|
}
|
|
@@ -23129,7 +23133,7 @@ const qe = new p.Vector3(1, 0, 0), jn = new p.Vector3(0, 1, 0), xi = new p.Vecto
|
|
|
23129
23133
|
c1(e) ? s = e.viewDirectionFromTarget : s = e.viewDirection, s ?? (s = { x: 0, y: 0, z: 1 });
|
|
23130
23134
|
const n = e.viewTarget ?? { x: 0, y: 0, z: 0 }, r = new p.Vector3(z.roundNumber(s.x, 7), z.roundNumber(s.y, 7), s.z), a = new p.Vector3(n.x, n.y, n.z), o = e.viewTwistAngle || 0;
|
|
23131
23135
|
let l, h, d;
|
|
23132
|
-
d = r.clone().normalize(), l = xi.clone().cross(r), l.length() > 0 ? (l.normalize(), h = d.clone().cross(l)) : d.z < 0 ? (l =
|
|
23136
|
+
d = r.clone().normalize(), l = xi.clone().cross(r), l.length() > 0 ? (l.normalize(), h = d.clone().cross(l)) : d.z < 0 ? (l = Ye.clone().negate(), h = jn, d = xi.clone().negate()) : (l = Ye, h = jn, d = xi);
|
|
23133
23137
|
const u = new p.Matrix4(), f = fe.identity();
|
|
23134
23138
|
return f.makeBasis(l, h, d), u.premultiply(f), u.premultiply(fe.identity().compose(a.clone(), new p.Quaternion().setFromAxisAngle(new p.Vector3(0, 0, 1), p.MathUtils.degToRad(i ? o : -o)), new p.Vector3(1, 1, 1))), u;
|
|
23135
23139
|
}
|
|
@@ -24052,7 +24056,7 @@ class Ea extends ci {
|
|
|
24052
24056
|
const i = [], s = [], n = [];
|
|
24053
24057
|
for (const l of Object.values(e)) {
|
|
24054
24058
|
const h = l.box;
|
|
24055
|
-
h && (l.type ===
|
|
24059
|
+
h && (l.type === Xe.Added ? i.push(h) : l.type === Xe.Removed ? s.push(h) : n.push(h));
|
|
24056
24060
|
}
|
|
24057
24061
|
const r = H.mergeBBoxes(i), a = H.mergeBBoxes(s), o = H.mergeBBoxes(n);
|
|
24058
24062
|
this.drawableList.addDrawable(new Et(j.guid(), r, [0.1, 0.9, 0.2, 1])), this.drawableList.addDrawable(new Et(j.guid(), a, [1, 0.15, 0.15, 1])), this.drawableList.addDrawable(new Et(j.guid(), o, [1, 0.85, 0.1, 1])), this.viewer.enableRender();
|
|
@@ -24282,7 +24286,7 @@ class ds extends wr {
|
|
|
24282
24286
|
if (a)
|
|
24283
24287
|
for (let o = 0; o < a.length; o++) {
|
|
24284
24288
|
const l = a[o];
|
|
24285
|
-
!(s && i && n && l.userData.visibleMinZoom && n < l.userData.visibleMinZoom) && (l.visible = i), (i === !1 || l.userData.layerVisible != null) && (l.userData.layerVisible = i), l.userData.isSnapObject && (l.visible ? Z.SHOW_SNAP_OBJECT ? l.layers.enableAll() : l.layers.set(
|
|
24289
|
+
!(s && i && n && l.userData.visibleMinZoom && n < l.userData.visibleMinZoom) && (l.visible = i), (i === !1 || l.userData.layerVisible != null) && (l.userData.layerVisible = i), l.userData.isSnapObject && (l.visible ? Z.SHOW_SNAP_OBJECT ? l.layers.enableAll() : l.layers.set(Ze) : Z.SHOW_SNAP_OBJECT ? l.layers.disableAll() : l.layers.disable(Ze));
|
|
24286
24290
|
}
|
|
24287
24291
|
else A.info("[Viewer] No object found for layer '" + e + "'");
|
|
24288
24292
|
}
|
|
@@ -27134,7 +27138,7 @@ class Ao {
|
|
|
27134
27138
|
addProgressItem(t, e = "ProgressBar.Loading", i) {
|
|
27135
27139
|
this.progressItems.get(t) && A.error("[Viewer] ProgressItem with id " + t + " already exists!");
|
|
27136
27140
|
const s = document.createElement("div");
|
|
27137
|
-
s.classList.add("progress-bar-item"), s.innerHTML =
|
|
27141
|
+
s.classList.add("progress-bar-item"), s.innerHTML = Ge.t(e) + ": <em></em>", this.element.append(s), this.progressItems.set(t, { div: s, onProgress: i });
|
|
27138
27142
|
}
|
|
27139
27143
|
removeProgressItem(t) {
|
|
27140
27144
|
this.progressItems.get(t)?.div.remove(), this.progressItems.delete(t), this.progressItems.size === 0 && this.setVisible(!1);
|
|
@@ -32301,7 +32305,7 @@ class N0 {
|
|
|
32301
32305
|
this.reject && (this.deactivate(), this.reject("PickMarkupHelper is already actived!"), this.isResolvedOrRejected = !0);
|
|
32302
32306
|
return;
|
|
32303
32307
|
}
|
|
32304
|
-
this.active = !0, this.viewer.addEventListener(he.MouseClick, this.mouseClicked), this.viewer.getInputManager()?.addEventListener("keydown", this.keydown), this.tooltip = new Ro("pick-markup-tooltip",
|
|
32308
|
+
this.active = !0, this.viewer.addEventListener(he.MouseClick, this.mouseClicked), this.viewer.getInputManager()?.addEventListener("keydown", this.keydown), this.tooltip = new Ro("pick-markup-tooltip", Ge.t("Tooltip.pickMarkup"), {
|
|
32305
32309
|
followPointer: !0,
|
|
32306
32310
|
showOnCreate: !0,
|
|
32307
32311
|
parentNode: this.viewer.widgetContainer,
|
|
@@ -32309,7 +32313,7 @@ class N0 {
|
|
|
32309
32313
|
});
|
|
32310
32314
|
const t = document.getElementById("pick-markup-tooltip");
|
|
32311
32315
|
t && (t.style.pointerEvents = "none");
|
|
32312
|
-
const e =
|
|
32316
|
+
const e = Ge.t("Tooltip.pickMarkup");
|
|
32313
32317
|
e && this.tooltip && this.tooltip?.setContent(e), this.viewer.dispatchEvent(he.PickMarkupActivate);
|
|
32314
32318
|
}
|
|
32315
32319
|
deactivate() {
|
|
@@ -32383,7 +32387,7 @@ const Li = class Li {
|
|
|
32383
32387
|
this.reject && (this.deactivate(), this.reject("BoxSelectHelper is already actived!"), this.isResolvedOrRejected = !0);
|
|
32384
32388
|
return;
|
|
32385
32389
|
}
|
|
32386
|
-
this.active = !0, this.input.addEventListener("pointerdown", this.mousedown), this.input.addEventListener("pointermove", this.mousemove), this.input.addEventListener("pointerup", this.mouseup), this.input.addEventListener("keydown", this.keydown), this.viewer.getCameraManager().enableMouseLeft(!1), this.tooltip = new Ro("box-select-tooltip",
|
|
32390
|
+
this.active = !0, this.input.addEventListener("pointerdown", this.mousedown), this.input.addEventListener("pointermove", this.mousemove), this.input.addEventListener("pointerup", this.mouseup), this.input.addEventListener("keydown", this.keydown), this.viewer.getCameraManager().enableMouseLeft(!1), this.tooltip = new Ro("box-select-tooltip", Ge.t("Tooltip.boxSelect"), {
|
|
32387
32391
|
followPointer: !0,
|
|
32388
32392
|
showOnCreate: !0,
|
|
32389
32393
|
parentNode: this.viewer.widgetContainer,
|
|
@@ -32391,7 +32395,7 @@ const Li = class Li {
|
|
|
32391
32395
|
});
|
|
32392
32396
|
const t = document.getElementById("box-select-tooltip");
|
|
32393
32397
|
t && (t.style.pointerEvents = "none");
|
|
32394
|
-
const e =
|
|
32398
|
+
const e = Ge.t("Tooltip.boxSelect");
|
|
32395
32399
|
e && this.tooltip && this.tooltip?.setContent(e), this.viewer.dispatchEvent(he.BoxSelectActivate);
|
|
32396
32400
|
}
|
|
32397
32401
|
deactivate() {
|
|
@@ -32677,7 +32681,7 @@ class H0 extends li {
|
|
|
32677
32681
|
return "MobileTouchHelperDrawable";
|
|
32678
32682
|
}
|
|
32679
32683
|
}
|
|
32680
|
-
var
|
|
32684
|
+
var Je = /* @__PURE__ */ ((c) => (c[c.Left = 0] = "Left", c[c.Middle = 1] = "Middle", c[c.Right = 2] = "Right", c[c.Back = 3] = "Back", c[c.Forward = 4] = "Forward", c))(Je || {});
|
|
32681
32685
|
class gu extends ci {
|
|
32682
32686
|
constructor(e) {
|
|
32683
32687
|
super();
|
|
@@ -33010,7 +33014,23 @@ class xu {
|
|
|
33010
33014
|
"font-size:14px",
|
|
33011
33015
|
"line-height:1.8",
|
|
33012
33016
|
"z-index:9999"
|
|
33013
|
-
].join(";")
|
|
33017
|
+
].join(";");
|
|
33018
|
+
const i = document.createElement("div");
|
|
33019
|
+
i.style.cssText = "display:flex;flex-direction:column;align-items:center;gap:10px;max-width:560px";
|
|
33020
|
+
const s = document.createElement("span");
|
|
33021
|
+
s.style.cssText = "text-align:center", s.textContent = Ge.t("WebGL.NotAvailable"), i.appendChild(s);
|
|
33022
|
+
const n = "chrome://settings/system", r = document.createElement("a");
|
|
33023
|
+
r.href = n, r.textContent = Ge.t("WebGL.SettingsLink"), r.style.cssText = "color:#1a73e8;text-decoration:underline;cursor:pointer;font-weight:bold";
|
|
33024
|
+
const a = document.createElement("span");
|
|
33025
|
+
a.style.cssText = "color:#888;font-size:12px;text-align:center;display:none", r.addEventListener("click", (o) => {
|
|
33026
|
+
o.preventDefault(), window.open(n, "_blank");
|
|
33027
|
+
try {
|
|
33028
|
+
const l = document.createElement("textarea");
|
|
33029
|
+
l.value = n, l.style.cssText = "position:fixed;left:-9999px", document.body.appendChild(l), l.select(), document.execCommand("copy"), document.body.removeChild(l);
|
|
33030
|
+
} catch {
|
|
33031
|
+
}
|
|
33032
|
+
a.textContent = Ge.t("WebGL.CopyFallback"), a.style.display = "block";
|
|
33033
|
+
}), i.appendChild(r), i.appendChild(a), e.appendChild(i), t.appendChild(e);
|
|
33014
33034
|
}
|
|
33015
33035
|
initLights() {
|
|
33016
33036
|
const t = new p.Group();
|
|
@@ -33250,7 +33270,7 @@ class Mr extends ci {
|
|
|
33250
33270
|
}
|
|
33251
33271
|
initLocalization() {
|
|
33252
33272
|
const e = this.viewerCfg.language || rh;
|
|
33253
|
-
|
|
33273
|
+
Ge.changeLanguage(e);
|
|
33254
33274
|
}
|
|
33255
33275
|
get viewerContainer() {
|
|
33256
33276
|
return this.container.viewerContainer;
|
|
@@ -33663,7 +33683,7 @@ class Fo extends Mr {
|
|
|
33663
33683
|
setupDefaultEvents() {
|
|
33664
33684
|
let e = !1, i = !1;
|
|
33665
33685
|
this.inputManager.addEventListener("pointerdown", (s) => {
|
|
33666
|
-
i = !1, e = !0, s.button ===
|
|
33686
|
+
i = !1, e = !0, s.button === Je.Middle && this.inputManager?.setCursor("move");
|
|
33667
33687
|
}), this.inputManager.addEventListener("pointermove", () => {
|
|
33668
33688
|
e && (i = !0, this.inputManager?.setCursor("move"));
|
|
33669
33689
|
}), this.inputManager.addEventListener("pointerup", (s) => {
|
|
@@ -33840,7 +33860,7 @@ class Fo extends Mr {
|
|
|
33840
33860
|
this.loaderHelper.abortDxfLoading();
|
|
33841
33861
|
const n = this.getUniqueModelId(e.modelId || e.src);
|
|
33842
33862
|
this.spinner.increaseJobCount(), this.loaderHelper.setFont(this.fontManager), this.masterModelId || (this.masterModelId = n);
|
|
33843
|
-
const r = n, a =
|
|
33863
|
+
const r = n, a = Ge.t("ProgressBar.Loading"), o = (d) => {
|
|
33844
33864
|
this.progressBar?.updateProgress(r, a, d), i?.(
|
|
33845
33865
|
new ProgressEvent("LoadProgress", {
|
|
33846
33866
|
loaded: d,
|
|
@@ -34712,7 +34732,7 @@ class vu {
|
|
|
34712
34732
|
try {
|
|
34713
34733
|
if (!this.fontManager) throw "[DxfCompareHelper] Should set font first!";
|
|
34714
34734
|
this.loader.setFont(this.fontManager), await this.fontManager.getFontFromIndexeddb();
|
|
34715
|
-
const l = n + a, h =
|
|
34735
|
+
const l = n + a, h = Ge.t("ProgressBar.Comparing"), d = (B) => {
|
|
34716
34736
|
this.loadingProgressBar?.updateProgress(l, h, B), s && s(new ProgressEvent("CompareProgress", {
|
|
34717
34737
|
loaded: B,
|
|
34718
34738
|
total: 100
|
|
@@ -34879,7 +34899,7 @@ class G0 extends vu {
|
|
|
34879
34899
|
try {
|
|
34880
34900
|
if (!this.fontManager) throw "[DxfCompareHelper] Should set font first!";
|
|
34881
34901
|
this.loader.setFont(this.fontManager), await this.fontManager.getFontFromIndexeddb();
|
|
34882
|
-
const d = r + o, u =
|
|
34902
|
+
const d = r + o, u = Ge.t("ProgressBar.Comparing"), f = (D) => {
|
|
34883
34903
|
this.loadingProgressBar?.updateProgress(d, u, D), n && n(new ProgressEvent("CompareProgress", {
|
|
34884
34904
|
loaded: D,
|
|
34885
34905
|
total: 100
|
|
@@ -35322,21 +35342,21 @@ class q0 extends Mr {
|
|
|
35322
35342
|
let e = !1, i, s = 0, n = 0, r = 0;
|
|
35323
35343
|
const a = 300, o = (u) => n === -1 || r === -1 ? !1 : Math.abs(u.x - n) < 5 && Math.abs(u.y - r) < 5, l = (u) => {
|
|
35324
35344
|
const f = u.timestamp - s;
|
|
35325
|
-
return !!(u.button ===
|
|
35345
|
+
return !!(u.button === Je.Left && f < a && o(u));
|
|
35326
35346
|
};
|
|
35327
35347
|
let h, d = !1;
|
|
35328
35348
|
this.inputManager.addEventListener("pointerdown", (u) => {
|
|
35329
35349
|
e = !1, i = u.button;
|
|
35330
35350
|
const f = new p.Vector2(u.x, u.y);
|
|
35331
|
-
h = this.pickObject(f), d = h?.object === this.selectedObject, u.button ===
|
|
35351
|
+
h = this.pickObject(f), d = h?.object === this.selectedObject, u.button === Je.Left && this.handleAnchorPoint(h);
|
|
35332
35352
|
}), this.inputManager.addEventListener("pointermove", (u) => {
|
|
35333
|
-
i !== void 0 && (e = !o(u), i ===
|
|
35353
|
+
i !== void 0 && (e = !o(u), i === Je.Left && this.cameraManager.enableRotate && this.cameraManager.setOrbitPointVisible(!0));
|
|
35334
35354
|
}), this.inputManager.addEventListener("pointerup", (u) => {
|
|
35335
35355
|
if (i = void 0, this.cameraManager.setOrbitPointVisible(!1), e) {
|
|
35336
35356
|
e = !1;
|
|
35337
35357
|
return;
|
|
35338
35358
|
}
|
|
35339
|
-
u.button ===
|
|
35359
|
+
u.button === Je.Left ? l(u) ? (h?.object ? this.flyToObject(h.object) : this.viewFitAll(), s = 0, n = -1, r = -1) : (this.selectedObject && (this.selectedObject instanceof li ? this.selectedObject.selected = !1 : this.clearHighlight(), this.selectedObject = void 0), s = u.timestamp, n = u.x, r = u.y, h?.object && !d && this.handleClickObject(h.object)) : (u.button, Je.Right);
|
|
35340
35360
|
});
|
|
35341
35361
|
}
|
|
35342
35362
|
setDefaultBackground() {
|
|
@@ -35362,7 +35382,7 @@ class q0 extends Mr {
|
|
|
35362
35382
|
}
|
|
35363
35383
|
async loadModelInternal(e, i, s, n, r) {
|
|
35364
35384
|
this.spinner.increaseJobCount();
|
|
35365
|
-
const a = e.modelId || e.src, o =
|
|
35385
|
+
const a = e.modelId || e.src, o = Ge.t("ProgressBar.Loading"), l = (f) => {
|
|
35366
35386
|
this.progressBar?.updateProgress(a, o, f), i?.(
|
|
35367
35387
|
new ProgressEvent("LoadProgress", {
|
|
35368
35388
|
loaded: f,
|
|
@@ -35672,13 +35692,13 @@ class Y0 extends Mr {
|
|
|
35672
35692
|
let e = !1, i, s = 0, n = 0, r = 0;
|
|
35673
35693
|
const a = 300, o = (u) => n === -1 || r === -1 ? !1 : Math.abs(u.x - n) < 5 && Math.abs(u.y - r) < 5, l = (u) => {
|
|
35674
35694
|
const f = u.timestamp - s;
|
|
35675
|
-
return !!(u.button ===
|
|
35695
|
+
return !!(u.button === Je.Left && f < a && o(u));
|
|
35676
35696
|
};
|
|
35677
35697
|
let h, d = !1;
|
|
35678
35698
|
this.inputManager.addEventListener("pointerdown", (u) => {
|
|
35679
35699
|
e = !1, i = u.button, this.renderImmediately();
|
|
35680
35700
|
const f = new p.Vector2(u.x, u.y);
|
|
35681
|
-
if (h = this.pickManager.pick(f, this.pickUsageScene), d = !!this.selectedObject && h?.tilesetId === this.selectedObject?.tilesetId && h?.userId === this.selectedObject?.userId, u.button ===
|
|
35701
|
+
if (h = this.pickManager.pick(f, this.pickUsageScene), d = !!this.selectedObject && h?.tilesetId === this.selectedObject?.tilesetId && h?.userId === this.selectedObject?.userId, u.button === Je.Left) {
|
|
35682
35702
|
let m = this.pickUsageScene;
|
|
35683
35703
|
if (h) {
|
|
35684
35704
|
const y = this.loadedModels.find((T) => T.modelId === "" + h?.tilesetId);
|
|
@@ -35692,7 +35712,7 @@ class Y0 extends Mr {
|
|
|
35692
35712
|
}
|
|
35693
35713
|
}), this.inputManager.addEventListener("pointermove", (u) => {
|
|
35694
35714
|
if (i !== void 0)
|
|
35695
|
-
e = !o(u), i ===
|
|
35715
|
+
e = !o(u), i === Je.Left && this.cameraManager.enableRotate && this.cameraManager.setOrbitPointVisible(!0);
|
|
35696
35716
|
else if (this.enableHoverEffect) {
|
|
35697
35717
|
const f = new p.Vector2(u.x, u.y), m = this.pickManager.pick(f, this.pickUsageScene), x = this.getHoveredObject();
|
|
35698
35718
|
m ? (!x || x.tilesetId !== m.tilesetId || x.userId !== m.userId) && this.setObjectHoveredByUserId(m.tilesetId, m.userId, !0) : x && this.clearHovered();
|
|
@@ -35703,7 +35723,7 @@ class Y0 extends Mr {
|
|
|
35703
35723
|
e = !1;
|
|
35704
35724
|
return;
|
|
35705
35725
|
}
|
|
35706
|
-
u.button ===
|
|
35726
|
+
u.button === Je.Left ? l(u) ? (h ? this.flyToUserId(h.tilesetId, h.userId) : this.viewFitAll(), s = 0, n = -1, r = -1) : (this.selectedObject && (this.clearHighlight(), this.selectedObject = void 0), s = u.timestamp, n = u.x, r = u.y, h && !d && this.handleClickObject(h)) : (u.button, Je.Right);
|
|
35707
35727
|
});
|
|
35708
35728
|
}
|
|
35709
35729
|
setDefaultBackground() {
|
|
@@ -36503,7 +36523,7 @@ export {
|
|
|
36503
36523
|
Fe as DeviceUtils,
|
|
36504
36524
|
li as Drawable,
|
|
36505
36525
|
pn as DrawableList,
|
|
36506
|
-
|
|
36526
|
+
Xe as DxfChangeType,
|
|
36507
36527
|
yt as DxfCompare,
|
|
36508
36528
|
G0 as DxfCompareHelper,
|
|
36509
36529
|
Ea as DxfCompareMarkupManager,
|
|
@@ -36527,7 +36547,7 @@ export {
|
|
|
36527
36547
|
V0 as InstantiateHelper,
|
|
36528
36548
|
ah as LayerForHitableObjects,
|
|
36529
36549
|
oi as LayerForSelectableObjects,
|
|
36530
|
-
|
|
36550
|
+
Ze as LayerForSnapableObjects,
|
|
36531
36551
|
b0 as Line,
|
|
36532
36552
|
Vh as LinePatternShaders,
|
|
36533
36553
|
ai as LoadingHelper,
|
|
@@ -36593,7 +36613,7 @@ export {
|
|
|
36593
36613
|
D0 as getLengthValueByUnit,
|
|
36594
36614
|
ra as getUnitStr,
|
|
36595
36615
|
Ou as getVersionFromLocalStorage,
|
|
36596
|
-
|
|
36616
|
+
Ge as i18n,
|
|
36597
36617
|
A as log,
|
|
36598
36618
|
Js as parseDxfMTextContent,
|
|
36599
36619
|
Un as parseDxfTextContent,
|