@maptalks/vt 0.105.3 → 0.106.0
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/dist/maptalks.vt.d.ts +1 -1
- package/dist/maptalks.vt.es.js +1800 -1755
- package/dist/maptalks.vt.es.js.map +1 -1
- package/dist/maptalks.vt.js +872 -829
- package/dist/maptalks.vt.js.map +1 -1
- package/package.json +3 -3
package/dist/maptalks.vt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.
|
|
2
|
+
* @maptalks/vt v0.106.0
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2025 maptalks.org
|
|
5
5
|
*/
|
|
@@ -395,10 +395,10 @@
|
|
|
395
395
|
height: h
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function S(e, t) {
|
|
399
399
|
return t < 1 / 0 && (e.x < 0 || e.x > t || e.y < 0 || e.y > t);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function M(e) {
|
|
402
402
|
return null == e;
|
|
403
403
|
}
|
|
404
404
|
function P(e, t, n) {
|
|
@@ -1065,7 +1065,7 @@
|
|
|
1065
1065
|
};
|
|
1066
1066
|
var Te = le.exports, we = {
|
|
1067
1067
|
exports: {}
|
|
1068
|
-
},
|
|
1068
|
+
}, Se = {
|
|
1069
1069
|
aliceblue: [ 240, 248, 255 ],
|
|
1070
1070
|
antiquewhite: [ 250, 235, 215 ],
|
|
1071
1071
|
aqua: [ 0, 255, 255 ],
|
|
@@ -1214,8 +1214,8 @@
|
|
|
1214
1214
|
whitesmoke: [ 245, 245, 245 ],
|
|
1215
1215
|
yellow: [ 255, 255, 0 ],
|
|
1216
1216
|
yellowgreen: [ 154, 205, 50 ]
|
|
1217
|
-
},
|
|
1218
|
-
for (var Pe in
|
|
1217
|
+
}, Me = {};
|
|
1218
|
+
for (var Pe in Se) Se.hasOwnProperty(Pe) && (Me[Se[Pe]] = Pe);
|
|
1219
1219
|
var Ie = we.exports = {
|
|
1220
1220
|
rgb: {
|
|
1221
1221
|
channels: 3,
|
|
@@ -1306,16 +1306,16 @@
|
|
|
1306
1306
|
var t, n = e[0] / 255, i = e[1] / 255, r = e[2] / 255;
|
|
1307
1307
|
return [ 100 * ((1 - n - (t = Math.min(1 - n, 1 - i, 1 - r))) / (1 - t) || 0), 100 * ((1 - i - t) / (1 - t) || 0), 100 * ((1 - r - t) / (1 - t) || 0), 100 * t ];
|
|
1308
1308
|
}, Ie.rgb.keyword = function(e) {
|
|
1309
|
-
var t =
|
|
1309
|
+
var t = Me[e];
|
|
1310
1310
|
if (t) return t;
|
|
1311
1311
|
var n, i, r, s = 1 / 0;
|
|
1312
|
-
for (var o in
|
|
1313
|
-
var a = (i = e, r =
|
|
1312
|
+
for (var o in Se) if (Se.hasOwnProperty(o)) {
|
|
1313
|
+
var a = (i = e, r = Se[o], Math.pow(i[0] - r[0], 2) + Math.pow(i[1] - r[1], 2) + Math.pow(i[2] - r[2], 2));
|
|
1314
1314
|
a < s && (s = a, n = o);
|
|
1315
1315
|
}
|
|
1316
1316
|
return n;
|
|
1317
1317
|
}, Ie.keyword.rgb = function(e) {
|
|
1318
|
-
return
|
|
1318
|
+
return Se[e];
|
|
1319
1319
|
}, Ie.rgb.xyz = function(e) {
|
|
1320
1320
|
var t = e[0] / 255, n = e[1] / 255, i = e[2] / 255;
|
|
1321
1321
|
return [ 100 * (.4124 * (t = t > .04045 ? Math.pow((t + .055) / 1.055, 2.4) : t / 12.92) + .3576 * (n = n > .04045 ? Math.pow((n + .055) / 1.055, 2.4) : n / 12.92) + .1805 * (i = i > .04045 ? Math.pow((i + .055) / 1.055, 2.4) : i / 12.92)), 100 * (.2126 * t + .7152 * n + .0722 * i), 100 * (.0193 * t + .1192 * n + .9505 * i) ];
|
|
@@ -1995,7 +1995,7 @@
|
|
|
1995
1995
|
if (!e) return "true";
|
|
1996
1996
|
const t = e[0];
|
|
1997
1997
|
if (e.length <= 1) return "any" === t ? "false" : "true";
|
|
1998
|
-
const n = "==" === t ? bt(e[1], e[2], "===", !1) : "!=" === t ? bt(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? bt(e[1], e[2], t, !0) : "any" === t ? Tt(e.slice(1), "||") : "all" === t ? Tt(e.slice(1), "&&") : "none" === t ?
|
|
1998
|
+
const n = "==" === t ? bt(e[1], e[2], "===", !1) : "!=" === t ? bt(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? bt(e[1], e[2], t, !0) : "any" === t ? Tt(e.slice(1), "||") : "all" === t ? Tt(e.slice(1), "&&") : "none" === t ? Mt(Tt(e.slice(1), "||")) : "in" === t ? wt(e[1], e.slice(2)) : "!in" === t ? Mt(wt(e[1], e.slice(2))) : "has" === t ? St(e[1]) : "!has" === t ? Mt(St(e[1])) : "contains" === t ? function(e, t, n) {
|
|
1999
1999
|
const i = vt(e);
|
|
2000
2000
|
return void 0 !== n ? `(${i} + '').indexOf("${t}") === ${n}` : `(${i} + '').indexOf("${t}") >= 0`;
|
|
2001
2001
|
}(e[1], e[2], e[3]) : "true";
|
|
@@ -2025,10 +2025,10 @@
|
|
|
2025
2025
|
const n = JSON.stringify(t.sort(Pt)), i = vt(e);
|
|
2026
2026
|
return t.length <= 200 ? `${n}.indexOf(${i}) !== -1` : `function(v, a, i, j) {\n while (i <= j) { var m = (i + j) >> 1;\n if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;\n }\n return false; }(${i}, ${n},0,${t.length - 1})`;
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2028
|
+
function St(e) {
|
|
2029
2029
|
return "$id" === e ? '"id" in f' : `${JSON.stringify(e)} in p`;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function Mt(e) {
|
|
2032
2032
|
return `!(${e})`;
|
|
2033
2033
|
}
|
|
2034
2034
|
function Pt(e, t) {
|
|
@@ -2078,10 +2078,10 @@
|
|
|
2078
2078
|
t + _(e);
|
|
2079
2079
|
})).join("");
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2081
|
+
function S(e, t) {
|
|
2082
2082
|
return e + 22 + 75 * (e < 26) - ((0 != t) << 5);
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function M(e, t, n) {
|
|
2085
2085
|
var i = 0;
|
|
2086
2086
|
for (e = n ? x(e / f) : e >> 1, e += x(e / t); e > y * c >> 1; i += h) e = x(e / y);
|
|
2087
2087
|
return x(i + (y + 1) * e / (e + u));
|
|
@@ -2094,7 +2094,7 @@
|
|
|
2094
2094
|
for (s = y, o = 1, a = h; r >= m && v("invalid-input"), ((u = (p = e.charCodeAt(r++)) - 48 < 10 ? p - 22 : p - 65 < 26 ? p - 65 : p - 97 < 26 ? p - 97 : h) >= h || u > x((l - y) / o)) && v("overflow"),
|
|
2095
2095
|
y += u * o, !(u < (f = a <= b ? 1 : a >= b + c ? c : a - b)); a += h) o > x(l / (d = h - f)) && v("overflow"),
|
|
2096
2096
|
o *= d;
|
|
2097
|
-
b =
|
|
2097
|
+
b = M(y - s, t = g.length + 1, 0 == s), x(y / t) > l - _ && v("overflow"), _ += x(y / t),
|
|
2098
2098
|
y %= t, g.splice(y++, 0, _);
|
|
2099
2099
|
}
|
|
2100
2100
|
return w(g);
|
|
@@ -2107,8 +2107,8 @@
|
|
|
2107
2107
|
for (a - t > x((l - n) / (m = i + 1)) && v("overflow"), n += (a - t) * m, t = a,
|
|
2108
2108
|
o = 0; o < g; ++o) if ((p = e[o]) < t && ++n > l && v("overflow"), p == t) {
|
|
2109
2109
|
for (u = n, f = h; !(u < (d = f <= s ? 1 : f >= s + c ? c : f - s)); f += h) b = u - d,
|
|
2110
|
-
y = h - d, A.push(_(
|
|
2111
|
-
A.push(_(
|
|
2110
|
+
y = h - d, A.push(_(S(d + b % y, 0))), u = x(b / y);
|
|
2111
|
+
A.push(_(S(u, 0))), s = M(n, m, i == r), n = 0, ++i;
|
|
2112
2112
|
}
|
|
2113
2113
|
++n, ++t;
|
|
2114
2114
|
}
|
|
@@ -2807,8 +2807,8 @@
|
|
|
2807
2807
|
})), e;
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
|
-
var
|
|
2811
|
-
const
|
|
2810
|
+
var Sn = wn;
|
|
2811
|
+
const Mn = [ "Unknown", "Point", "LineString", "Polygon" ];
|
|
2812
2812
|
var Pn = class {
|
|
2813
2813
|
constructor() {
|
|
2814
2814
|
this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null,
|
|
@@ -2819,7 +2819,7 @@
|
|
|
2819
2819
|
return this.feature && void 0 !== this.feature.id ? this.feature.id : null;
|
|
2820
2820
|
}
|
|
2821
2821
|
geometryType() {
|
|
2822
|
-
return this.feature ? "number" == typeof this.feature.type ?
|
|
2822
|
+
return this.feature ? "number" == typeof this.feature.type ? Mn[this.feature.type] : this.feature.type : null;
|
|
2823
2823
|
}
|
|
2824
2824
|
geometry() {
|
|
2825
2825
|
return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
|
|
@@ -3165,7 +3165,7 @@
|
|
|
3165
3165
|
}
|
|
3166
3166
|
_parse(e, t) {
|
|
3167
3167
|
function n(e, t, n) {
|
|
3168
|
-
return "assert" === n ? new vn(t, [ e ]) : "coerce" === n ? new
|
|
3168
|
+
return "assert" === n ? new vn(t, [ e ]) : "coerce" === n ? new Sn(t, [ e ]) : e;
|
|
3169
3169
|
}
|
|
3170
3170
|
if (null !== e && "string" != typeof e && "boolean" != typeof e && "number" != typeof e || (e = [ "literal", e ]),
|
|
3171
3171
|
Array.isArray(e)) {
|
|
@@ -3216,7 +3216,7 @@
|
|
|
3216
3216
|
if (e instanceof Cn && "error" === e.name) return !1;
|
|
3217
3217
|
if (e instanceof kn) return !1;
|
|
3218
3218
|
if (e instanceof qn) return !1;
|
|
3219
|
-
const t = e instanceof
|
|
3219
|
+
const t = e instanceof Sn || e instanceof vn;
|
|
3220
3220
|
let n = !0;
|
|
3221
3221
|
return e.eachChild((e => {
|
|
3222
3222
|
n = t ? n && ii(e) : n && e instanceof mn;
|
|
@@ -3352,11 +3352,11 @@
|
|
|
3352
3352
|
let t = (e.l + 16) / 116, n = isNaN(e.a) ? t : t + e.a / 500, i = isNaN(e.b) ? t : t - e.b / 200;
|
|
3353
3353
|
return t = 1 * vi(t), n = ui * vi(n), i = fi * vi(i), new on(bi(3.2404542 * n - 1.5371385 * t - .4985314 * i), bi(-.969266 * n + 1.8760108 * t + .041556 * i), bi(.0556434 * n - .2040259 * t + 1.0572252 * i), e.alpha);
|
|
3354
3354
|
}
|
|
3355
|
-
function
|
|
3355
|
+
function Si(e, t, n) {
|
|
3356
3356
|
const i = t - e;
|
|
3357
3357
|
return e + n * (i > 180 || i < -180 ? i - 360 * Math.round(i / 360) : i);
|
|
3358
3358
|
}
|
|
3359
|
-
const
|
|
3359
|
+
const Mi = {
|
|
3360
3360
|
forward: Ti,
|
|
3361
3361
|
reverse: wi,
|
|
3362
3362
|
interpolate: function(e, t, n) {
|
|
@@ -3388,7 +3388,7 @@
|
|
|
3388
3388
|
},
|
|
3389
3389
|
interpolate: function(e, t, n) {
|
|
3390
3390
|
return {
|
|
3391
|
-
h:
|
|
3391
|
+
h: Si(e.h, t.h, n),
|
|
3392
3392
|
c: hi(e.c, t.c, n),
|
|
3393
3393
|
l: hi(e.l, t.l, n),
|
|
3394
3394
|
alpha: hi(e.alpha, t.alpha, n)
|
|
@@ -3397,7 +3397,7 @@
|
|
|
3397
3397
|
};
|
|
3398
3398
|
var Ii = Object.freeze({
|
|
3399
3399
|
__proto__: null,
|
|
3400
|
-
lab:
|
|
3400
|
+
lab: Mi,
|
|
3401
3401
|
hcl: Pi
|
|
3402
3402
|
});
|
|
3403
3403
|
class Ci {
|
|
@@ -3461,7 +3461,7 @@
|
|
|
3461
3461
|
const r = t.length;
|
|
3462
3462
|
if (i >= t[r - 1]) return n[r - 1].evaluate(e);
|
|
3463
3463
|
const s = ri(t, i), o = t[s], a = t[s + 1], l = Ci.interpolationFactor(this.interpolation, i, o, a), h = n[s].evaluate(e), c = n[s + 1].evaluate(e);
|
|
3464
|
-
return "interpolate" === this.operator ? ci[this.type.kind.toLowerCase()](h, c, l) : "interpolate-hcl" === this.operator ? Pi.reverse(Pi.interpolate(Pi.forward(h), Pi.forward(c), l)) :
|
|
3464
|
+
return "interpolate" === this.operator ? ci[this.type.kind.toLowerCase()](h, c, l) : "interpolate-hcl" === this.operator ? Pi.reverse(Pi.interpolate(Pi.forward(h), Pi.forward(c), l)) : Mi.reverse(Mi.interpolate(Mi.forward(h), Mi.forward(c), l));
|
|
3465
3465
|
}
|
|
3466
3466
|
eachChild(e) {
|
|
3467
3467
|
e(this.input);
|
|
@@ -3978,10 +3978,10 @@
|
|
|
3978
3978
|
slice: Yi,
|
|
3979
3979
|
step: oi,
|
|
3980
3980
|
string: vn,
|
|
3981
|
-
"to-boolean":
|
|
3982
|
-
"to-color":
|
|
3983
|
-
"to-number":
|
|
3984
|
-
"to-string":
|
|
3981
|
+
"to-boolean": Sn,
|
|
3982
|
+
"to-color": Sn,
|
|
3983
|
+
"to-number": Sn,
|
|
3984
|
+
"to-string": Sn,
|
|
3985
3985
|
var: ei,
|
|
3986
3986
|
within: qn
|
|
3987
3987
|
};
|
|
@@ -4304,7 +4304,7 @@
|
|
|
4304
4304
|
function wr(e) {
|
|
4305
4305
|
return Array.isArray(e) && e.length > 0 && "string" == typeof e[0] && e[0] in cr;
|
|
4306
4306
|
}
|
|
4307
|
-
function
|
|
4307
|
+
function Sr(e, t) {
|
|
4308
4308
|
const n = new ni(cr, [], t ? function(e) {
|
|
4309
4309
|
const t = {
|
|
4310
4310
|
color: zt,
|
|
@@ -4321,7 +4321,7 @@
|
|
|
4321
4321
|
} : void 0);
|
|
4322
4322
|
return i ? ur(new Tr(i, t)) : fr(n.errors);
|
|
4323
4323
|
}
|
|
4324
|
-
class
|
|
4324
|
+
class Mr {
|
|
4325
4325
|
constructor(e, t) {
|
|
4326
4326
|
this.kind = e, this._styleExpression = t, this.isStateDependent = "constant" !== e && !Jn(t.expression);
|
|
4327
4327
|
}
|
|
@@ -4348,7 +4348,7 @@
|
|
|
4348
4348
|
}
|
|
4349
4349
|
}
|
|
4350
4350
|
function Ir(e, t) {
|
|
4351
|
-
if ("error" === (e =
|
|
4351
|
+
if ("error" === (e = Sr(e, t)).result) return e;
|
|
4352
4352
|
const n = e.value.expression, i = $n(n);
|
|
4353
4353
|
if (!i && !function(e) {
|
|
4354
4354
|
return "data-driven" === e["property-type"];
|
|
@@ -4361,7 +4361,7 @@
|
|
|
4361
4361
|
if (!s && !r) return fr([ new Ft("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') ]);
|
|
4362
4362
|
if (s instanceof Ft) return fr([ s ]);
|
|
4363
4363
|
if (s instanceof Oi && !dr(t)) return fr([ new Ft("", '"interpolate" expressions cannot be used with this property') ]);
|
|
4364
|
-
if (!s) return ur(new
|
|
4364
|
+
if (!s) return ur(new Mr(i ? "constant" : "source", e.value));
|
|
4365
4365
|
const o = s instanceof Oi ? s.interpolation : void 0;
|
|
4366
4366
|
return ur(new Pr(i ? "camera" : "composite", e.value, s.labels, o));
|
|
4367
4367
|
}
|
|
@@ -4417,13 +4417,13 @@
|
|
|
4417
4417
|
} catch (e) {
|
|
4418
4418
|
console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(n, null, 2)}\n `);
|
|
4419
4419
|
}
|
|
4420
|
-
const r =
|
|
4420
|
+
const r = Sr(i, null);
|
|
4421
4421
|
let s = null;
|
|
4422
4422
|
if ("error" === r.result) throw new Error(r.value.map((e => `${e.key}: ${e.message}`)).join(", "));
|
|
4423
4423
|
s = (e, t, n) => r.value.evaluate(e, t, {}, n);
|
|
4424
4424
|
let o = null, a = null;
|
|
4425
4425
|
if (i !== n) {
|
|
4426
|
-
const e =
|
|
4426
|
+
const e = Sr(n, null);
|
|
4427
4427
|
if ("error" === e.result) throw new Error(e.value.map((e => `${e.key}: ${e.message}`)).join(", "));
|
|
4428
4428
|
o = (t, n, i, r, s) => e.value.evaluate(t, n, {}, i, void 0, void 0, r, s), a = !$n(e.value.expression);
|
|
4429
4429
|
}
|
|
@@ -4509,7 +4509,7 @@
|
|
|
4509
4509
|
return !0;
|
|
4510
4510
|
}
|
|
4511
4511
|
},
|
|
4512
|
-
createExpression:
|
|
4512
|
+
createExpression: Sr,
|
|
4513
4513
|
createPropertyExpression: Ir,
|
|
4514
4514
|
normalizePropertyExpression: function(e, t) {
|
|
4515
4515
|
if (gr(e)) return new Cr(e, t);
|
|
@@ -4526,7 +4526,7 @@
|
|
|
4526
4526
|
};
|
|
4527
4527
|
}
|
|
4528
4528
|
},
|
|
4529
|
-
ZoomConstantExpression:
|
|
4529
|
+
ZoomConstantExpression: Mr,
|
|
4530
4530
|
ZoomDependentExpression: Pr,
|
|
4531
4531
|
StylePropertyFunction: Cr
|
|
4532
4532
|
}, {isExpression: zr, createExpression: Vr} = Nr, Ur = {};
|
|
@@ -5163,14 +5163,14 @@
|
|
|
5163
5163
|
return e || "Open Sans Regular";
|
|
5164
5164
|
}
|
|
5165
5165
|
const ws = /\{[\w-]+(?:\|[\w-]+)*\}/g;
|
|
5166
|
-
function
|
|
5166
|
+
function Ss(e, t) {
|
|
5167
5167
|
if (!et(e)) return e;
|
|
5168
5168
|
function n(e) {
|
|
5169
5169
|
if (!t) return As;
|
|
5170
5170
|
const n = t[e];
|
|
5171
5171
|
return Je(n) ? As : Array.isArray(n) ? n.join() : n;
|
|
5172
5172
|
}
|
|
5173
|
-
const [i, r] = bs, s =
|
|
5173
|
+
const [i, r] = bs, s = Ms(e);
|
|
5174
5174
|
for (let t = 0, o = s.length; t < o; t++) {
|
|
5175
5175
|
const o = s[t], a = `${i}${o}${r}`;
|
|
5176
5176
|
if (o.indexOf("|") > 0) {
|
|
@@ -5188,7 +5188,7 @@
|
|
|
5188
5188
|
}
|
|
5189
5189
|
return e;
|
|
5190
5190
|
}
|
|
5191
|
-
function
|
|
5191
|
+
function Ms(e) {
|
|
5192
5192
|
e += As;
|
|
5193
5193
|
const [t, n] = bs, i = [];
|
|
5194
5194
|
let r = !1, s = As;
|
|
@@ -5213,7 +5213,7 @@
|
|
|
5213
5213
|
resolveExpVarNames: function e(t, n) {
|
|
5214
5214
|
if (2 !== n.length || "get" !== n[0]) for (let i = 0; i < n.length; i++) 2 === n[i].length && "get" === n[i][0] ? t.push(n[i][1]) : Array.isArray(n[i]) && e(t, n[i]); else t.push(n[1]);
|
|
5215
5215
|
},
|
|
5216
|
-
resolveText:
|
|
5216
|
+
resolveText: Ss,
|
|
5217
5217
|
resolveText_bak: function(e, t) {
|
|
5218
5218
|
return et(e) ? e.replace(ws, (function(e) {
|
|
5219
5219
|
if (!t) return "";
|
|
@@ -5232,7 +5232,7 @@
|
|
|
5232
5232
|
resolveVarNames: function(e) {
|
|
5233
5233
|
return e.match(ws);
|
|
5234
5234
|
},
|
|
5235
|
-
templateKeys:
|
|
5235
|
+
templateKeys: Ms
|
|
5236
5236
|
});
|
|
5237
5237
|
const Cs = {
|
|
5238
5238
|
"Latin-1 Supplement": e => e >= 128 && e <= 255,
|
|
@@ -5621,9 +5621,9 @@
|
|
|
5621
5621
|
}
|
|
5622
5622
|
getIconAndGlyph() {
|
|
5623
5623
|
if (this.iconGlyph) return this.iconGlyph;
|
|
5624
|
-
const {markerFileFn: e, markerTypeFn: t, markerPathFn: n, markerWidthFn: i, markerHeightFn: r, markerFillFn: s, markerFillPatternFileFn: o, markerFillOpacityFn: a, markerTextFitFn: l, markerTextFitPaddingFn: h, markerLineColorFn: c, markerLineWidthFn: u, markerLineOpacityFn: f, markerLineDasharrayFn: d, markerLinePatternFileFn: p, markerPathWidthFn: g, markerPathHeightFn: m, textNameFn: y, textFaceNameFn: x} = this._fnTypes, {zoom: _} = this.options, v = {}, b = this.symbol, A = this.symbolDef, T = this.feature.properties, w = e ? e(null, T) : b.markerFile,
|
|
5624
|
+
const {markerFileFn: e, markerTypeFn: t, markerPathFn: n, markerWidthFn: i, markerHeightFn: r, markerFillFn: s, markerFillPatternFileFn: o, markerFillOpacityFn: a, markerTextFitFn: l, markerTextFitPaddingFn: h, markerLineColorFn: c, markerLineWidthFn: u, markerLineOpacityFn: f, markerLineDasharrayFn: d, markerLinePatternFileFn: p, markerPathWidthFn: g, markerPathHeightFn: m, textNameFn: y, textFaceNameFn: x} = this._fnTypes, {zoom: _} = this.options, v = {}, b = this.symbol, A = this.symbolDef, T = this.feature.properties, w = e ? e(null, T) : b.markerFile, S = t ? t(null, T) : b.markerType, M = w || S || b.markerPath, P = !Je(this.symbolDef.textName);
|
|
5625
5625
|
let I, C;
|
|
5626
|
-
if (
|
|
5626
|
+
if (M) {
|
|
5627
5627
|
I = function(e, t, n, i, r, s) {
|
|
5628
5628
|
if (Je(t.markerWidth) && Je(t.markerHeight)) return null;
|
|
5629
5629
|
const o = "__fn_markerWidth".trim(), a = "__fn_markerHeight".trim();
|
|
@@ -5638,7 +5638,7 @@
|
|
|
5638
5638
|
const t = A.textSize;
|
|
5639
5639
|
let n = A.textName;
|
|
5640
5640
|
ie(n) && (n = re(n)(_, T));
|
|
5641
|
-
const i =
|
|
5641
|
+
const i = Ss(n, T);
|
|
5642
5642
|
if (i) {
|
|
5643
5643
|
const n = "__fn_textSize".trim(), r = "__fn_textSize_0".trim();
|
|
5644
5644
|
ie(t) && !A[n] && (A[r] = re(t), A[n] = (e, t) => {
|
|
@@ -5656,11 +5656,11 @@
|
|
|
5656
5656
|
}
|
|
5657
5657
|
if (P && (C = _s(b, this.symbolDef, T, _)), !C && !I) return v;
|
|
5658
5658
|
if (I && (I[0] = Math.ceil(I[0]), I[1] = Math.ceil(I[1])), C && (C[0] = Math.ceil(C[0]),
|
|
5659
|
-
C[1] = Math.ceil(C[1])), this.iconSize = I, this.textSize = C,
|
|
5659
|
+
C[1] = Math.ceil(C[1])), this.iconSize = I, this.textSize = C, M && I[0] >= 0 && I[1] >= 0) {
|
|
5660
5660
|
let e;
|
|
5661
|
-
if (
|
|
5661
|
+
if (S) {
|
|
5662
5662
|
const t = {};
|
|
5663
|
-
if (t.markerType =
|
|
5663
|
+
if (t.markerType = S, "path" === S && (t.markerPath = n ? n(null, T) : b.markerPath,
|
|
5664
5664
|
t.markerPathWidth = g ? g(null, T) : b.markerPathWidth, t.markerPathHeight = m ? m(null, T) : b.markerPathHeight),
|
|
5665
5665
|
i) {
|
|
5666
5666
|
const e = i(null, T);
|
|
@@ -5756,7 +5756,7 @@
|
|
|
5756
5756
|
const e = y ? y(this.options.zoom, T) : b.textName;
|
|
5757
5757
|
if (e || 0 === e) {
|
|
5758
5758
|
const t = Ts(x ? x(null, T) : b.textFaceName);
|
|
5759
|
-
let n =
|
|
5759
|
+
let n = Ss(e, T);
|
|
5760
5760
|
n && n.length && (n = qs(n), v.glyph = {
|
|
5761
5761
|
font: t,
|
|
5762
5762
|
text: n
|
|
@@ -6036,37 +6036,37 @@
|
|
|
6036
6036
|
const a = o[e];
|
|
6037
6037
|
if ("vertex" === t) for (let e = 0; e < a.length; e++) {
|
|
6038
6038
|
const t = a[e];
|
|
6039
|
-
for (let o = 0; o < t.length; o++)
|
|
6039
|
+
for (let o = 0; o < t.length; o++) S(t[o], n) || (s.push(t[o]), i && (0 === o ? xo(t[o], t[o], t[e + 1], r) : xo(t[o], t[o - 1], t[o], r)));
|
|
6040
6040
|
} else if ("vertex-first" === t) {
|
|
6041
6041
|
const e = a[0];
|
|
6042
|
-
e && e[0] && !
|
|
6042
|
+
e && e[0] && !S(e[0], n) && (s.push(e[0]), i && xo(e[0], e[0], e[1], r));
|
|
6043
6043
|
} else if ("vertex-last" === t || "vertex-firstlast" === t) {
|
|
6044
6044
|
const e = a[0];
|
|
6045
|
-
if ("vertex-firstlast" === t && e && e[0] && !
|
|
6046
|
-
e && e[e.length - 1] && !
|
|
6045
|
+
if ("vertex-firstlast" === t && e && e[0] && !S(e[0], n) && (s.push(e[0]), i && xo(e[0], e[0], e[1], r)),
|
|
6046
|
+
e && e[e.length - 1] && !S(e[e.length - 1], n)) {
|
|
6047
6047
|
const t = e.length - 1;
|
|
6048
6048
|
s.push(e[t]), i && xo(e[t], e[t - 1], e[t], r);
|
|
6049
6049
|
}
|
|
6050
6050
|
} else {
|
|
6051
6051
|
const e = fo(a, 16);
|
|
6052
|
-
|
|
6052
|
+
S(e, n) || s.push(e);
|
|
6053
6053
|
}
|
|
6054
6054
|
}
|
|
6055
6055
|
} else if (2 === e.type) for (let o = 0; o < e.geometry.length; o++) {
|
|
6056
6056
|
const a = e.geometry[o];
|
|
6057
|
-
if ("vertex" === t) for (let e = 0; e < a.length; e++)
|
|
6057
|
+
if ("vertex" === t) for (let e = 0; e < a.length; e++) S(a[e], n) || (s.push(a[e]),
|
|
6058
6058
|
i && (0 === e ? xo(a[e], a[e], a[e + 1], r) : xo(a[e], a[e - 1], a[e], r))); else if ("vertex-last" === t || "vertex-firstlast" === t) {
|
|
6059
|
-
if ("vertex-firstlast" !== t ||
|
|
6060
|
-
a && a[a.length - 1] && !
|
|
6059
|
+
if ("vertex-firstlast" !== t || S(a[0], n) || (s.push(a[0]), i && xo(a[0], a[0], a[1], r)),
|
|
6060
|
+
a && a[a.length - 1] && !S(a[a.length - 1], n)) {
|
|
6061
6061
|
const e = a.length - 1;
|
|
6062
6062
|
s.push(a[e]), i && xo(a[e], a[e - 1], a[e], r);
|
|
6063
6063
|
}
|
|
6064
|
-
} else
|
|
6064
|
+
} else S(a[0], n) || (s.push(a[0]), i && xo(a[0], a[0], a[1], r));
|
|
6065
6065
|
} else if (1 === e.type) for (let t = 0; t < e.geometry.length; t++) {
|
|
6066
6066
|
const r = e.geometry[t];
|
|
6067
6067
|
for (let e = 0; e < r.length; e++) {
|
|
6068
6068
|
const t = r[e];
|
|
6069
|
-
|
|
6069
|
+
S(t, n) || (i && (t.xRotation = 0, t.yRotation = 0, t.zRotation = 0), s.push(t));
|
|
6070
6070
|
}
|
|
6071
6071
|
}
|
|
6072
6072
|
return s;
|
|
@@ -6119,7 +6119,7 @@
|
|
|
6119
6119
|
const r = (vo + "").trim(), s = function(e, t, n, i) {
|
|
6120
6120
|
const r = (vo + "").trim(), {mergeOnPropertyFn: s} = n;
|
|
6121
6121
|
if (!t.mergeOnProperty) return [];
|
|
6122
|
-
if (!
|
|
6122
|
+
if (!M(o = t.mergeOnProperty) && ("string" == typeof o || null !== o.constructor && o.constructor === String)) return [ {
|
|
6123
6123
|
features: e,
|
|
6124
6124
|
property: t.mergeOnProperty
|
|
6125
6125
|
} ];
|
|
@@ -6130,7 +6130,7 @@
|
|
|
6130
6130
|
const o = e[n].properties = e[n].properties || {};
|
|
6131
6131
|
o.$layer = e[n].layer, o.$type = e[n].type;
|
|
6132
6132
|
const c = s ? s(i, o) : t.mergeOnProperty;
|
|
6133
|
-
|
|
6133
|
+
M(c) ? h.push(e[n]) : (void 0 === l[c] && (l[c] = a.length, a.push({
|
|
6134
6134
|
features: [],
|
|
6135
6135
|
property: c
|
|
6136
6136
|
})), a[l[c]].features.push(e[n]));
|
|
@@ -6352,7 +6352,7 @@
|
|
|
6352
6352
|
}
|
|
6353
6353
|
return r;
|
|
6354
6354
|
}(r.horizontal, p, this.glyphAtlas.positions[t]), x && ($ = x(null, d), ie($) ? this.dynamicAttrs.aTextFill = 1 : $ = ht([], $)),
|
|
6355
|
-
_ && (J = _(this.options.zoom, d),
|
|
6355
|
+
_ && (J = _(this.options.zoom, d), M(J) && (J = 14)), v && (K = v(null, d), ie(K) ? this.dynamicAttrs.aTextHaloFill = 1 : K = ht([], K)),
|
|
6356
6356
|
b && (Q = b(null, d)), A && (ee = 255 * A(null, d)), T && (te = T(null, d) || 0),
|
|
6357
6357
|
I && (ne = I(null, d) || 0), C && (he = +("map" === C(null, d))), k && (ue = +("map" === k(null, d))),
|
|
6358
6358
|
O && (de = P(O(null, d), 0, 360) * Math.PI / 180);
|
|
@@ -6390,8 +6390,8 @@
|
|
|
6390
6390
|
writingMode: void 0,
|
|
6391
6391
|
glyphOffset: [ 0, 0 ]
|
|
6392
6392
|
} ];
|
|
6393
|
-
}(), D && (re = D(null, d)),
|
|
6394
|
-
|
|
6393
|
+
}(), D && (re = D(null, d)), M(re) && (re = Z[0].tex.w), L && (se = L(null, d)),
|
|
6394
|
+
M(se) && (se = Z[0].tex.h), H && (oe = H(null, d)), N && (ae = N(null, d)), z && (le = +("map" === z(null, d))),
|
|
6395
6395
|
V && (ce = +("map" === V(null, d))), U && (fe = P(U(null, d), 0, 360) * Math.PI / 180)),
|
|
6396
6396
|
ie(J) && (this.dynamicAttrs.aTextSize = 1), (ie(Q) || ie(ee)) && (this.dynamicAttrs.aTextHalo = 1),
|
|
6397
6397
|
ie(re) && (this.dynamicAttrs.aMarkerWidth = 1), ie(se) && (this.dynamicAttrs.aMarkerHeight = 1),
|
|
@@ -6425,7 +6425,7 @@
|
|
|
6425
6425
|
}, Te = "text" === this.options.pluginType;
|
|
6426
6426
|
for (let e = 0; e < l.length; e++) {
|
|
6427
6427
|
const t = l[e], n = t.z || ve || 0;
|
|
6428
|
-
if (me !== 1 / 0 &&
|
|
6428
|
+
if (me !== 1 / 0 && S(t, me)) continue;
|
|
6429
6429
|
const i = t.x, r = t.y;
|
|
6430
6430
|
m && Ae(!1, Z, i, r, n, t), g && (Te || Ae(!0, Y, i, r, n, t, !0), Ae(!0, Y, i, r, n, t, !1));
|
|
6431
6431
|
}
|
|
@@ -6433,9 +6433,10 @@
|
|
|
6433
6433
|
_fillPos(e, t, n, i, r, s, o, a, l, h) {
|
|
6434
6434
|
this.fillPosition(e, t, n, i);
|
|
6435
6435
|
let c = e.aShape.currentIndex;
|
|
6436
|
-
e.aShape[c++] = r, e.aShape[c++] = s, e.aShape.currentIndex = c, c = e.aTexCoord.currentIndex,
|
|
6437
|
-
e.aTexCoord[c++] = o, e.aTexCoord[c++] = a,
|
|
6438
|
-
e.
|
|
6436
|
+
e.aShape[c++] = r, e.aShape[c++] = s, e.aShape.currentIndex = c, e.aTexCoord ? (c = e.aTexCoord.currentIndex,
|
|
6437
|
+
e.aTexCoord[c++] = o, e.aTexCoord[c++] = a, e.aTexCoord.currentIndex = c) : (c = e.aShape.currentIndex,
|
|
6438
|
+
"text" !== this.options.pluginType ? (e.aShape[c++] = +!!l + (o << 1), e.aShape[c++] = +!!h + (a << 1)) : (e.aShape[c++] = o,
|
|
6439
|
+
e.aShape[c++] = a), e.aShape.currentIndex = c);
|
|
6439
6440
|
}
|
|
6440
6441
|
_fillTextData(e, t, n, i, r, s, o, a) {
|
|
6441
6442
|
let l = e.aCount.currentIndex;
|
|
@@ -6451,7 +6452,7 @@
|
|
|
6451
6452
|
}
|
|
6452
6453
|
}
|
|
6453
6454
|
_fillFnTypeData(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m, y, x, _, v, b) {
|
|
6454
|
-
const {textFillFn: A, textSizeFn: T, textHaloFillFn: w, textHaloRadiusFn:
|
|
6455
|
+
const {textFillFn: A, textSizeFn: T, textHaloFillFn: w, textHaloRadiusFn: S, textDxFn: P, textDyFn: I, textPitchAlignmentFn: C, textRotationAlignmentFn: k, textRotationFn: O, textAllowOverlapFn: F, textIgnorePlacementFn: R, textOpacityFn: E, textHaloOpacityFn: D, markerWidthFn: L, markerHeightFn: H, markerDxFn: N, markerDyFn: z, markerPitchAlignmentFn: V, markerRotationAlignmentFn: U, markerRotationFn: B, markerAllowOverlapFn: G, markerIgnorePlacementFn: j, markerOpacityFn: W} = this._fnTypes;
|
|
6455
6456
|
if (A) {
|
|
6456
6457
|
let n = e.aTextFill.currentIndex;
|
|
6457
6458
|
e.aTextFill[n++] = t[0], e.aTextFill[n++] = t[1], e.aTextFill[n++] = t[2], e.aTextFill[n++] = t[3],
|
|
@@ -6466,10 +6467,10 @@
|
|
|
6466
6467
|
e.aTextHaloFill[t++] = i[0], e.aTextHaloFill[t++] = i[1], e.aTextHaloFill[t++] = i[2],
|
|
6467
6468
|
e.aTextHaloFill[t++] = i[3], e.aTextHaloFill.currentIndex = t;
|
|
6468
6469
|
}
|
|
6469
|
-
if (
|
|
6470
|
+
if (S || D) {
|
|
6470
6471
|
let t = e.aTextHalo.currentIndex;
|
|
6471
6472
|
e.aTextHalo[t++] = r || 0, e.aTextHalo.currentIndex = t, t = e.aTextHalo.currentIndex,
|
|
6472
|
-
e.aTextHalo[t++] = 255 * (
|
|
6473
|
+
e.aTextHalo[t++] = 255 * (M(s) ? 1 : s), e.aTextHalo.currentIndex = t;
|
|
6473
6474
|
}
|
|
6474
6475
|
if (P) {
|
|
6475
6476
|
let t = e.aTextDx.currentIndex;
|
|
@@ -6541,7 +6542,7 @@
|
|
|
6541
6542
|
_getAnchors(e, t, n) {
|
|
6542
6543
|
const {feature: i, symbol: r} = e, s = this._getPlacement(e, r), o = i.properties, {markerSpacingFn: a, textSpacingFn: l, textMaxAngleFn: h} = this._fnTypes, c = ((a ? a(null, o) : r.markerSpacing) || (l ? l(null, o) : r.textSpacing) || 250) * n;
|
|
6543
6544
|
let u = h ? h(this.options.zoom, o) : r.textMaxAngle;
|
|
6544
|
-
|
|
6545
|
+
M(u) && (u = 80), u *= Math.PI / 180;
|
|
6545
6546
|
const f = this.options.EXTENT, d = this.options.altitudeToTileScale, p = this._is3DPitchText();
|
|
6546
6547
|
return mo(e, this.lineVertex, u, t, n, f, s, c, p, d);
|
|
6547
6548
|
}
|
|
@@ -6555,12 +6556,8 @@
|
|
|
6555
6556
|
getPackSDFFormat(e) {
|
|
6556
6557
|
if ("line" !== this._textPlacement || e.isIconText) return [ ...this.getPositionFormat(), {
|
|
6557
6558
|
type: Int16Array,
|
|
6558
|
-
width:
|
|
6559
|
+
width: 4,
|
|
6559
6560
|
name: "aShape"
|
|
6560
|
-
}, {
|
|
6561
|
-
type: Uint16Array,
|
|
6562
|
-
width: "text" === this.options.pluginType ? 2 : 4,
|
|
6563
|
-
name: "aTexCoord"
|
|
6564
6561
|
}, {
|
|
6565
6562
|
type: Uint8Array,
|
|
6566
6563
|
width: 1,
|
|
@@ -6599,17 +6596,6 @@
|
|
|
6599
6596
|
}), e;
|
|
6600
6597
|
}
|
|
6601
6598
|
}
|
|
6602
|
-
getPackMarkerFormat() {
|
|
6603
|
-
return [ ...this.getPositionFormat(), {
|
|
6604
|
-
type: Int16Array,
|
|
6605
|
-
width: 2,
|
|
6606
|
-
name: "aShape"
|
|
6607
|
-
}, {
|
|
6608
|
-
type: Uint16Array,
|
|
6609
|
-
width: 3,
|
|
6610
|
-
name: "aTexCoord"
|
|
6611
|
-
} ];
|
|
6612
|
-
}
|
|
6613
6599
|
}
|
|
6614
6600
|
class To {
|
|
6615
6601
|
constructor(e) {
|
|
@@ -6667,8 +6653,8 @@
|
|
|
6667
6653
|
return Math.atan2(this.y - e.y, this.x - e.x);
|
|
6668
6654
|
}
|
|
6669
6655
|
}
|
|
6670
|
-
var wo,
|
|
6671
|
-
function
|
|
6656
|
+
var wo, So = "undefined" != typeof Float32Array ? Float32Array : Array;
|
|
6657
|
+
function Mo(e, t, n, i) {
|
|
6672
6658
|
return e[0] = t, e[1] = n, e[2] = i, e;
|
|
6673
6659
|
}
|
|
6674
6660
|
function Po(e, t) {
|
|
@@ -6692,13 +6678,13 @@
|
|
|
6692
6678
|
Math.hypot || (Math.hypot = function() {
|
|
6693
6679
|
for (var e = 0, t = arguments.length; t--; ) e += arguments[t] * arguments[t];
|
|
6694
6680
|
return Math.sqrt(e);
|
|
6695
|
-
}), wo = new
|
|
6696
|
-
var e = new
|
|
6697
|
-
|
|
6681
|
+
}), wo = new So(3), So != Float32Array && (wo[0] = 0, wo[1] = 0, wo[2] = 0), function() {
|
|
6682
|
+
var e = new So(4);
|
|
6683
|
+
So != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0, e[3] = 0);
|
|
6698
6684
|
}();
|
|
6699
6685
|
!function() {
|
|
6700
|
-
var e = new
|
|
6701
|
-
|
|
6686
|
+
var e = new So(2);
|
|
6687
|
+
So != Float32Array && (e[0] = 0, e[1] = 0);
|
|
6702
6688
|
}();
|
|
6703
6689
|
const Fo = 63, Ro = Math.cos(Math.PI / 180 * 37.5), Eo = Math.pow(2, 16) / 1, Do = new s, Lo = new s, Ho = new s;
|
|
6704
6690
|
class No extends gs {
|
|
@@ -6906,22 +6892,22 @@
|
|
|
6906
6892
|
t.z = p.z, this.updateDistance(g, t), this.addCurrentVertex(t, y, 0, 0, d), g = t;
|
|
6907
6893
|
}
|
|
6908
6894
|
}
|
|
6909
|
-
const
|
|
6910
|
-
d.middleVertex =
|
|
6911
|
-
let
|
|
6912
|
-
if (
|
|
6913
|
-
"bevel" ===
|
|
6914
|
-
"miter" ===
|
|
6895
|
+
const S = g && m;
|
|
6896
|
+
d.middleVertex = S;
|
|
6897
|
+
let M = S ? n : h ? "butt" : i;
|
|
6898
|
+
if (S && "round" === M && (b < s ? M = "miter" : b <= 2 && (M = "fakeround")), "miter" === M && b > r && !a && (M = "bevel"),
|
|
6899
|
+
"bevel" === M && (b > 2 && (M = "flipbevel"), b < r && (M = "miter")), g && this.updateDistance(g, p),
|
|
6900
|
+
"miter" === M) a ? (this.addCurrentVertex(p, y, 0, 0, d), d.dir = m.sub(p)._unit(),
|
|
6915
6901
|
this.addCurrentVertex(p, x, 0, 0, d)) : (l._mult(b), this.addCurrentVertex(p, l, 0, 0, d),
|
|
6916
|
-
o && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, l, 0, 0, d))); else if ("flipbevel" ===
|
|
6902
|
+
o && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, l, 0, 0, d))); else if ("flipbevel" === M) {
|
|
6917
6903
|
if (b > 100) l = x.mult(-1); else {
|
|
6918
6904
|
const e = b * y.add(x).mag() / y.sub(x).mag();
|
|
6919
6905
|
l._perp()._mult(e * (w ? -1 : 1));
|
|
6920
6906
|
}
|
|
6921
6907
|
this.addCurrentVertex(p, l, 0, 0, d), this.addCurrentVertex(p, l.mult(-1), 0, 0, d);
|
|
6922
|
-
} else if ("bevel" ===
|
|
6908
|
+
} else if ("bevel" === M || "fakeround" === M) {
|
|
6923
6909
|
const e = -Math.sqrt(b * b - 1), t = w ? e : 0, n = w ? 0 : e;
|
|
6924
|
-
if (g && this.addCurrentVertex(p, y, t, n, d), "fakeround" ===
|
|
6910
|
+
if (g && this.addCurrentVertex(p, y, t, n, d), "fakeround" === M) {
|
|
6925
6911
|
const e = Math.round(180 * A / Math.PI / 20);
|
|
6926
6912
|
for (let t = 1; t < e; t++) {
|
|
6927
6913
|
let n = t / e;
|
|
@@ -6934,10 +6920,10 @@
|
|
|
6934
6920
|
}
|
|
6935
6921
|
}
|
|
6936
6922
|
m && (d.currentNormal = x, d.dir = m.sub(p)._unit(), this.addCurrentVertex(p, x, -t, -n, d));
|
|
6937
|
-
} else if ("butt" ===
|
|
6923
|
+
} else if ("butt" === M) this.addCurrentVertex(p, l, 0, 0, d); else if ("square" === M) {
|
|
6938
6924
|
const e = g ? 1 : -1;
|
|
6939
6925
|
this.addCurrentVertex(p, l, e, e, d);
|
|
6940
|
-
} else "round" ===
|
|
6926
|
+
} else "round" === M && (g && (this.addCurrentVertex(p, y, 0, 0, d), this.addCurrentVertex(p, y, 1, 1, d, !0)),
|
|
6941
6927
|
m && (this.addCurrentVertex(p, x, -1, -1, d, !0), this.addCurrentVertex(p, x, 0, 0, d)));
|
|
6942
6928
|
if (!a && T && t < c - 1) {
|
|
6943
6929
|
const e = p.dist(m);
|
|
@@ -7315,13 +7301,13 @@
|
|
|
7315
7301
|
return e.x === t.x && e.y === t.y;
|
|
7316
7302
|
}
|
|
7317
7303
|
function wa(e, t, n, i) {
|
|
7318
|
-
const r =
|
|
7319
|
-
return r !== s && o !== a || !(0 !== r || !
|
|
7304
|
+
const r = Ma(Aa(e, t, n)), s = Ma(Aa(e, t, i)), o = Ma(Aa(n, i, e)), a = Ma(Aa(n, i, t));
|
|
7305
|
+
return r !== s && o !== a || !(0 !== r || !Sa(e, n, t)) || !(0 !== s || !Sa(e, i, t)) || !(0 !== o || !Sa(n, e, i)) || !(0 !== a || !Sa(n, t, i));
|
|
7320
7306
|
}
|
|
7321
|
-
function
|
|
7307
|
+
function Sa(e, t, n) {
|
|
7322
7308
|
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);
|
|
7323
7309
|
}
|
|
7324
|
-
function
|
|
7310
|
+
function Ma(e) {
|
|
7325
7311
|
return e > 0 ? 1 : e < 0 ? -1 : 0;
|
|
7326
7312
|
}
|
|
7327
7313
|
function Pa(e, t) {
|
|
@@ -7440,7 +7426,7 @@
|
|
|
7440
7426
|
}
|
|
7441
7427
|
addHalfVertex(e, t, n, i, r, s, o, a) {
|
|
7442
7428
|
const {x: l, y: h, z: c} = e, u = 1 * this.scaledDistance, f = this.options.radialSegments / 2, {x: d, y: p, z: g} = o.dir, m = function(e, t, n, i, r, s, o, a) {
|
|
7443
|
-
|
|
7429
|
+
Mo(Ua, n, i, r), Mo(Ba, s, o, 0), Io(Ga, Ua, Ba), Po(Ba, Ba), Po(Ga, Ga), ja[t] || (ja[t] = []);
|
|
7444
7430
|
const l = ja[t];
|
|
7445
7431
|
for (var h = 0; h < t; h++) {
|
|
7446
7432
|
const e = Math.PI * h / t, n = 0, i = 1 - Math.abs(e - n) / (Math.PI / 2);
|
|
@@ -7497,7 +7483,7 @@
|
|
|
7497
7483
|
}
|
|
7498
7484
|
const Xa = [], Ya = [], Za = [], qa = [], $a = [];
|
|
7499
7485
|
function Ja(e, t, n, i, r, s, o, a) {
|
|
7500
|
-
|
|
7486
|
+
Mo(Ya, n, i, r), Mo(Za, s, o, 0), Io(qa, Ya, Za), Po(Za, Za), Po(qa, qa), Oo(Xa, e, t);
|
|
7501
7487
|
const l = function(e) {
|
|
7502
7488
|
var t = e[0], n = e[1];
|
|
7503
7489
|
return Math.hypot(t, n);
|
|
@@ -8038,7 +8024,8 @@
|
|
|
8038
8024
|
this.addCurrentVertex(e, this.distance));
|
|
8039
8025
|
}
|
|
8040
8026
|
addLineVertex(e, t) {
|
|
8041
|
-
|
|
8027
|
+
const n = this.needAltitudeAttribute();
|
|
8028
|
+
this.fillPosition(e, t.x, t.y, t.z || 0), this.maxPos = n ? Math.max(this.maxPos, Math.abs(t.x), Math.abs(t.y)) : Math.max(this.maxPos, Math.abs(t.x), Math.abs(t.y), Math.abs(t.z || 0));
|
|
8042
8029
|
}
|
|
8043
8030
|
addElements(e, t) {
|
|
8044
8031
|
this.maxIndex = Math.max(this.maxIndex, this.offset + e, this.offset + t);
|
|
@@ -8436,7 +8423,7 @@
|
|
|
8436
8423
|
function w(e, t, n) {
|
|
8437
8424
|
return Math.min(Math.max(t, e), n);
|
|
8438
8425
|
}
|
|
8439
|
-
function
|
|
8426
|
+
function S(e) {
|
|
8440
8427
|
var t = Math.round(e).toString(16).toUpperCase();
|
|
8441
8428
|
return t.length < 2 ? "0" + t : t;
|
|
8442
8429
|
}
|
|
@@ -8499,7 +8486,7 @@
|
|
|
8499
8486
|
return null;
|
|
8500
8487
|
}, T.to.hex = function() {
|
|
8501
8488
|
var e = _(arguments);
|
|
8502
|
-
return "#" +
|
|
8489
|
+
return "#" + S(e[0]) + S(e[1]) + S(e[2]) + (e[3] < 1 ? S(Math.round(255 * e[3])) : "");
|
|
8503
8490
|
}, T.to.rgb = function() {
|
|
8504
8491
|
var e = _(arguments);
|
|
8505
8492
|
return e.length < 4 || 1 === e[3] ? "rgb(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ")" : "rgba(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ", " + e[3] + ")";
|
|
@@ -8515,7 +8502,7 @@
|
|
|
8515
8502
|
}, T.to.keyword = function(e) {
|
|
8516
8503
|
return b[e.slice(0, 3)];
|
|
8517
8504
|
};
|
|
8518
|
-
var
|
|
8505
|
+
var M = u.exports, P = {
|
|
8519
8506
|
exports: {}
|
|
8520
8507
|
}, I = {
|
|
8521
8508
|
aliceblue: [ 240, 248, 255 ],
|
|
@@ -9031,7 +9018,7 @@
|
|
|
9031
9018
|
}(i);
|
|
9032
9019
|
}));
|
|
9033
9020
|
}));
|
|
9034
|
-
var G =
|
|
9021
|
+
var G = M, j = B, W = [].slice, X = [ "keyword", "gray", "hex" ], Y = {};
|
|
9035
9022
|
Object.keys(j).forEach((function(e) {
|
|
9036
9023
|
Y[W.call(j[e].labels).sort().join("")] = e;
|
|
9037
9024
|
}));
|
|
@@ -9472,10 +9459,10 @@
|
|
|
9472
9459
|
function we(e) {
|
|
9473
9460
|
return e && "object" == typeof e && (e.stops || e.property && "identity" === e.type || e.expression && "calculate-expression" === e.type);
|
|
9474
9461
|
}
|
|
9475
|
-
function
|
|
9462
|
+
function Se(e) {
|
|
9476
9463
|
return Ie(e, "exponential");
|
|
9477
9464
|
}
|
|
9478
|
-
function
|
|
9465
|
+
function Me(e) {
|
|
9479
9466
|
return Ie(e, "interval");
|
|
9480
9467
|
}
|
|
9481
9468
|
function Pe(e, t) {
|
|
@@ -9493,7 +9480,7 @@
|
|
|
9493
9480
|
const l = function(e) {
|
|
9494
9481
|
Object.defineProperty(o, e, {
|
|
9495
9482
|
get: function() {
|
|
9496
|
-
return this["__fn_" + e] || (this["__fn_" + e] =
|
|
9483
|
+
return this["__fn_" + e] || (this["__fn_" + e] = Se(this["_" + e])), this["__fn_" + e].apply(this, t());
|
|
9497
9484
|
},
|
|
9498
9485
|
set: function(t) {
|
|
9499
9486
|
this["_" + e] = t;
|
|
@@ -10252,9 +10239,9 @@
|
|
|
10252
10239
|
return 3 === e.length && (At[3] = 255), At;
|
|
10253
10240
|
}
|
|
10254
10241
|
function wt(e, t = 4) {
|
|
10255
|
-
return
|
|
10242
|
+
return St.bind(this, e, t);
|
|
10256
10243
|
}
|
|
10257
|
-
function
|
|
10244
|
+
function St(e, t, n) {
|
|
10258
10245
|
if (Array.isArray(n)) return 3 === n.length && 4 === t && n.push(1), n;
|
|
10259
10246
|
if (e && e[n]) return e[n];
|
|
10260
10247
|
if (void 0 !== n.r && void 0 !== n.g && void 0 !== n.b && void 0 !== n.a) {
|
|
@@ -10263,7 +10250,7 @@
|
|
|
10263
10250
|
const i = Q(n).unitArray();
|
|
10264
10251
|
return 3 === i.length && 4 === t && i.push(1), e && (e[n] = i), i;
|
|
10265
10252
|
}
|
|
10266
|
-
function
|
|
10253
|
+
function Mt(e, t, n, i) {
|
|
10267
10254
|
if (e.fill) e.fill(t, n, i); else for (let r = n; r < i; r++) e[r] = t;
|
|
10268
10255
|
}
|
|
10269
10256
|
function Pt(e) {
|
|
@@ -12377,7 +12364,7 @@
|
|
|
12377
12364
|
if (!e) return "true";
|
|
12378
12365
|
const t = e[0];
|
|
12379
12366
|
if (e.length <= 1) return "any" === t ? "false" : "true";
|
|
12380
|
-
return `(${"==" === t ?
|
|
12367
|
+
return `(${"==" === t ? Sn(e[1], e[2], "===", !1) : "!=" === t ? Sn(e[1], e[2], "!==", !1) : "<" === t || ">" === t || "<=" === t || ">=" === t ? Sn(e[1], e[2], t, !0) : "any" === t ? Pn(e.slice(1), "||") : "all" === t ? Pn(e.slice(1), "&&") : "none" === t ? kn(Pn(e.slice(1), "||")) : "in" === t ? In(e[1], e.slice(2)) : "!in" === t ? kn(In(e[1], e.slice(2))) : "has" === t ? Cn(e[1]) : "!has" === t ? kn(Cn(e[1])) : "contains" === t ? function(e, t, n) {
|
|
12381
12368
|
const i = wn(e);
|
|
12382
12369
|
return void 0 !== n ? `(${i} + '').indexOf("${t}") === ${n}` : `(${i} + '').indexOf("${t}") >= 0`;
|
|
12383
12370
|
}(e[1], e[2], e[3]) : "true"})`;
|
|
@@ -12385,17 +12372,17 @@
|
|
|
12385
12372
|
function wn(e) {
|
|
12386
12373
|
return "$" === e[0] ? "f." + e.substring(1) : "p[" + JSON.stringify(e) + "]";
|
|
12387
12374
|
}
|
|
12388
|
-
function
|
|
12375
|
+
function Sn(e, t, n, i) {
|
|
12389
12376
|
if ("object" == typeof (r = e) && r && e.op) return function(e, t, n, i) {
|
|
12390
12377
|
const r = e.property, s = e.op;
|
|
12391
12378
|
let o = wn(r);
|
|
12392
12379
|
return "length" !== s ? (console.error(`not support ${s} op`), "false") : (o = `((${o}+='').length)`,
|
|
12393
|
-
|
|
12380
|
+
Mn(o, r, t, n, i));
|
|
12394
12381
|
}(e, t, n, i);
|
|
12395
12382
|
var r;
|
|
12396
|
-
return
|
|
12383
|
+
return Mn(wn(e), e, t, n, i);
|
|
12397
12384
|
}
|
|
12398
|
-
function
|
|
12385
|
+
function Mn(e, t, n, i, r) {
|
|
12399
12386
|
const s = "$type" === t ? An.indexOf(n) : JSON.stringify(n);
|
|
12400
12387
|
return (r ? `typeof ${e}=== typeof ${s}&&` : "") + e + i + s;
|
|
12401
12388
|
}
|
|
@@ -12804,7 +12791,7 @@
|
|
|
12804
12791
|
const l = function(e) {
|
|
12805
12792
|
if (!e) return Jn;
|
|
12806
12793
|
const t = [];
|
|
12807
|
-
for (let n = 0; n < e.length; n++) we(e[n][1]) && !
|
|
12794
|
+
for (let n = 0; n < e.length; n++) we(e[n][1]) && !Se(e[n][1]).isZoomConstant && t.push(e[n][0]);
|
|
12808
12795
|
return t;
|
|
12809
12796
|
}(t[r].stops), h = "identity" === t[r].type && Un.checkIfIdentityZoomDependent(r, t[r].property, s.features);
|
|
12810
12797
|
if (!h && !l.length) return void (void 0 === n.index && Yn(e, i));
|
|
@@ -12916,7 +12903,7 @@
|
|
|
12916
12903
|
e.dirty = !0;
|
|
12917
12904
|
}
|
|
12918
12905
|
} else if (s > 1) for (let t = i * s; t < r * s; t += s) e[t + o] !== c && (e[t + o] = c,
|
|
12919
|
-
e.dirty = !0); else e[i] !== c && (
|
|
12906
|
+
e.dirty = !0); else e[i] !== c && (Mt(e, c, i, r), e.dirty = !0);
|
|
12920
12907
|
}
|
|
12921
12908
|
function ti(e) {
|
|
12922
12909
|
return Un.isFnTypeSymbol(e);
|
|
@@ -13061,7 +13048,7 @@
|
|
|
13061
13048
|
const r = ui.set(t, n)._multi(i / e.res);
|
|
13062
13049
|
return e.extent2d.contains(r);
|
|
13063
13050
|
}
|
|
13064
|
-
const {SYMBOLS_NEED_REBUILD_IN_VT: gi, StyleUtil: mi, FuncTypeUtil: yi} = h(), {loginIBLResOnCanvas: xi, logoutIBLResOnCanvas: _i, getIBLResOnCanvas: vi} = n.reshader.pbr.PBRUtils, bi = "__gl_textures", Ai = [], Ti = new r.Point(0, 0), wi = new r.Point(0, 0),
|
|
13051
|
+
const {SYMBOLS_NEED_REBUILD_IN_VT: gi, StyleUtil: mi, FuncTypeUtil: yi} = h(), {loginIBLResOnCanvas: xi, logoutIBLResOnCanvas: _i, getIBLResOnCanvas: vi} = n.reshader.pbr.PBRUtils, bi = "__gl_textures", Ai = [], Ti = new r.Point(0, 0), wi = new r.Point(0, 0), Si = new Float32Array(1), Mi = [], Pi = e => 0 === e.properties.level, Ii = e => e.properties.level > 0;
|
|
13065
13052
|
class Ci {
|
|
13066
13053
|
static getBloomSymbol() {
|
|
13067
13054
|
return [ "bloom" ];
|
|
@@ -13090,7 +13077,7 @@
|
|
|
13090
13077
|
return n.getTileLevelValue && n.getTileLevelValue(e, t) || 0;
|
|
13091
13078
|
}
|
|
13092
13079
|
getAnalysisMeshes() {
|
|
13093
|
-
return this.getShadowMeshes ? this.getShadowMeshes() :
|
|
13080
|
+
return this.getShadowMeshes ? this.getShadowMeshes() : Mi;
|
|
13094
13081
|
}
|
|
13095
13082
|
isVisible() {
|
|
13096
13083
|
const {minZoom: e, maxZoom: t} = this.sceneConfig, n = this.getMap().getZoom();
|
|
@@ -13154,7 +13141,7 @@
|
|
|
13154
13141
|
if (n) for (const i in n) n[i] && t[i].renderUniforms && mt(e, t[i].renderUniforms);
|
|
13155
13142
|
}
|
|
13156
13143
|
createGeometries(e, t) {
|
|
13157
|
-
if (!e.length) return
|
|
13144
|
+
if (!e.length) return Mi;
|
|
13158
13145
|
const n = [];
|
|
13159
13146
|
for (let i = 0; i < e.length; i++) if (e[i]) if (void 0 !== e[i].ref) n[e[i].ref] ? n.push({
|
|
13160
13147
|
geometry: n[e[i].ref].geometry,
|
|
@@ -13434,7 +13421,7 @@
|
|
|
13434
13421
|
enumerable: !0
|
|
13435
13422
|
}) : r[e] = a[e];
|
|
13436
13423
|
}
|
|
13437
|
-
return we(n.visible) && (this._visibleFn[e] =
|
|
13424
|
+
return we(n.visible) && (this._visibleFn[e] = Se(n.visible)), i;
|
|
13438
13425
|
}
|
|
13439
13426
|
getSymbolDef(e) {
|
|
13440
13427
|
return this.symbolDef[e.index];
|
|
@@ -13450,7 +13437,7 @@
|
|
|
13450
13437
|
const e = this.getMap(), t = [], n = () => (t[0] = e.getZoom(), t);
|
|
13451
13438
|
this._symbol = [], this._visibleFn = [];
|
|
13452
13439
|
for (let e = 0; e < this.symbolDef.length; e++) this._symbol[e] = yi.loadSymbolFnTypes(mt({}, this.symbolDef[e]), n),
|
|
13453
|
-
this.symbolDef[e] && we(this.symbolDef[e].visible) && (this._visibleFn[e] =
|
|
13440
|
+
this.symbolDef[e] && we(this.symbolDef[e].visible) && (this._visibleFn[e] = Se(this.symbolDef[e].visible));
|
|
13454
13441
|
}
|
|
13455
13442
|
getFnTypeConfig(e) {
|
|
13456
13443
|
this._fnTypeConfigs || (this._fnTypeConfigs = []);
|
|
@@ -13625,7 +13612,7 @@
|
|
|
13625
13612
|
return t;
|
|
13626
13613
|
}(JSON.stringify(e));
|
|
13627
13614
|
let a = s[o];
|
|
13628
|
-
return a || (a = s[o] = r ?
|
|
13615
|
+
return a || (a = s[o] = r ? Me(e) : Se(e)), a(n.getZoom(), i);
|
|
13629
13616
|
}
|
|
13630
13617
|
highlight(e) {
|
|
13631
13618
|
this._highlighted = e, this._highlightTimestamp = this.layer.getRenderer().getFrameTimestamp(),
|
|
@@ -13705,25 +13692,25 @@
|
|
|
13705
13692
|
}
|
|
13706
13693
|
const v = performance.now();
|
|
13707
13694
|
n.terrainQueryStatus[c] = x;
|
|
13708
|
-
const {xmin: b, ymax: A} = l, T = Ti.set(b, A), w = this.layer.getTileSize().width / n.extent,
|
|
13709
|
-
let
|
|
13710
|
-
|
|
13695
|
+
const {xmin: b, ymax: A} = l, T = Ti.set(b, A), w = this.layer.getTileSize().width / n.extent, S = t.length / e.length;
|
|
13696
|
+
let M = e.queryResult;
|
|
13697
|
+
M || (M = e.queryResult = new Map);
|
|
13711
13698
|
let P = !0;
|
|
13712
13699
|
for (let n = i; n <= s; n++) {
|
|
13713
|
-
let i = t[n *
|
|
13700
|
+
let i = t[n * S];
|
|
13714
13701
|
i < 0 ? i = 0 : i > a && (i = a);
|
|
13715
|
-
let r = t[n *
|
|
13702
|
+
let r = t[n * S + 1];
|
|
13716
13703
|
r < 0 ? r = 0 : r > a && (r = a);
|
|
13717
13704
|
const s = i + r * a;
|
|
13718
|
-
let l, h, c =
|
|
13705
|
+
let l, h, c = M.get(s);
|
|
13719
13706
|
if (c || 0 === c) e[n] !== c && (e[n] = c, e.dirty = !0); else {
|
|
13720
13707
|
for (let e = 0; e < m.length; e++) if (pi(m[e], b + w * i, A - w * r, o)) {
|
|
13721
13708
|
l = m[e];
|
|
13722
13709
|
break;
|
|
13723
13710
|
}
|
|
13724
13711
|
l && (g.getRenderer().isTileCached(l.id) || e[n] === at) && (wi.set(i, r), h = this.layer.queryTilePointTerrain(wi, l, T, a, o)),
|
|
13725
|
-
c = e[n], h && (c = null === h[0] ? at : h[0],
|
|
13726
|
-
e.dirty = !0), h && h[1] ?
|
|
13712
|
+
c = e[n], h && (c = null === h[0] ? at : h[0], Si[0] = c, c = Si[0]), e[n] !== c && (e[n] = c,
|
|
13713
|
+
e.dirty = !0), h && h[1] ? M.set(s, c) : P = !1;
|
|
13727
13714
|
}
|
|
13728
13715
|
}
|
|
13729
13716
|
_.altitudeQueryFrameTime = (_.altitudeQueryFrameTime || 0) + (performance.now() - v),
|
|
@@ -13933,9 +13920,9 @@
|
|
|
13933
13920
|
if (!(t = t && t.geometry)) return;
|
|
13934
13921
|
const s = t.properties.features;
|
|
13935
13922
|
if (Vn(s)) return;
|
|
13936
|
-
const o = e.polygonPatternFileWidth, a = e.polygonPatternFileHeight, l =
|
|
13923
|
+
const o = e.polygonPatternFileWidth, a = e.polygonPatternFileHeight, l = Se(e.polygonPatternFileOrigin);
|
|
13937
13924
|
let h, c;
|
|
13938
|
-
we(o) && (h =
|
|
13925
|
+
we(o) && (h = Se(o)), we(a) && (c = Se(a));
|
|
13939
13926
|
const {aPickingId: u, aPatternOrigin: f} = t.data, d = u.length, p = new Float32Array(2 * d);
|
|
13940
13927
|
let g, m, y;
|
|
13941
13928
|
for (let e = 0, t = u.length; e < t; e++) {
|
|
@@ -13963,8 +13950,8 @@
|
|
|
13963
13950
|
const r = t.properties.features;
|
|
13964
13951
|
if (Vn(r)) return;
|
|
13965
13952
|
const s = this.getMap();
|
|
13966
|
-
let o = we(e.uvOffsetInMeter) &&
|
|
13967
|
-
const a =
|
|
13953
|
+
let o = we(e.uvOffsetInMeter) && Me(e.uvOffsetInMeter);
|
|
13954
|
+
const a = Se(e.uvOffset), l = Se(e.polygonPatternFileOrigin), {aPickingId: h, aPatternOrigin: c} = t.data, u = h.length, f = new Float32Array(2 * u);
|
|
13968
13955
|
let d, p, g;
|
|
13969
13956
|
for (let e = 0, t = h.length; e < t; e++) {
|
|
13970
13957
|
if (h[e] === d) {
|
|
@@ -13989,7 +13976,7 @@
|
|
|
13989
13976
|
if (!(t = t && t.geometry)) return;
|
|
13990
13977
|
const r = t.properties.features;
|
|
13991
13978
|
if (Vn(r)) return;
|
|
13992
|
-
const s = this.getMap(), o =
|
|
13979
|
+
const s = this.getMap(), o = Se(e.polygonPatternFileOrigin), a = t.data.aPickingId, l = a.length, h = new Float32Array(2 * l);
|
|
13993
13980
|
let c, u, f;
|
|
13994
13981
|
for (let e = 0, t = a.length; e < t; e++) {
|
|
13995
13982
|
if (a[e] === c) {
|
|
@@ -14004,7 +13991,7 @@
|
|
|
14004
13991
|
t.data.aPatternOrigin = h;
|
|
14005
13992
|
}
|
|
14006
13993
|
createFnTypeConfig(e, t) {
|
|
14007
|
-
const n =
|
|
13994
|
+
const n = Me(t.polygonFill), i = Se(t.polygonOpacity), r = Se(t.uvScale), s = Se(t.uvOffset), o = new Uint8Array(1), a = new Uint16Array(2), l = new Uint8Array(2);
|
|
14008
13995
|
return [ {
|
|
14009
13996
|
attrName: "aColor",
|
|
14010
13997
|
symbolName: "polygonFill",
|
|
@@ -14260,7 +14247,7 @@
|
|
|
14260
14247
|
super.paint(e);
|
|
14261
14248
|
}
|
|
14262
14249
|
createFnTypeConfig(e, t) {
|
|
14263
|
-
const n =
|
|
14250
|
+
const n = Me(t.lineColor), i = Me(t.aLinePatternAnimSpeed), r = Me(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
|
|
14264
14251
|
return [ {
|
|
14265
14252
|
attrName: "aColor",
|
|
14266
14253
|
symbolName: "lineColor",
|
|
@@ -14298,7 +14285,7 @@
|
|
|
14298
14285
|
} ].concat(s);
|
|
14299
14286
|
}
|
|
14300
14287
|
createShapeFnTypeConfigs(e, t) {
|
|
14301
|
-
const n =
|
|
14288
|
+
const n = Se(t.lineWidth), i = Se(t.lineOpacity), r = Se(t.lineStrokeWidth), s = Se(t.lineDx), o = Se(t.lineDy), a = new Uint16Array(1), l = new Int8Array(1);
|
|
14302
14289
|
return [ {
|
|
14303
14290
|
attrName: "aLineWidth",
|
|
14304
14291
|
symbolName: "lineWidth",
|
|
@@ -15514,15 +15501,15 @@
|
|
|
15514
15501
|
function Ar(e, t, n) {
|
|
15515
15502
|
return e[0] = t[0] - n, e[1] = t[1] - n, e[2] = t[2] + n, e[3] = t[3] + n, e;
|
|
15516
15503
|
}
|
|
15517
|
-
var Tr = "#include <gl2_vert>\n#define SHADER_NAME MARKER\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute
|
|
15518
|
-
const wr = [],
|
|
15504
|
+
var Tr = "#include <gl2_vert>\n#define SHADER_NAME MARKER\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec4 aShape;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute vec2 aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#if defined(HAS_TEXT_DX) || defined(HAS_TEXT_DY) || defined(HAS_MARKER_DX) || defined(HAS_MARKER_DY)\nattribute vec4 aDxDy;\n#endif\n#ifndef HAS_MARKER_DX\nuniform float markerDx;\n#endif\n#ifndef HAS_MARKER_DY\nuniform float markerDy;\n#endif\n#ifndef HAS_TEXT_DX\nuniform float textDx;\n#endif\n#ifndef HAS_TEXT_DY\nuniform float textDy;\n#endif\n#ifdef HAS_MARKER_WIDTH\nattribute float aMarkerWidth;\n#else\nuniform float markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nattribute float aMarkerHeight;\n#else\nuniform float markerHeight;\n#endif\n#if defined(HAS_MARKER_PITCH_ALIGN) || defined(HAS_TEXT_PITCH_ALIGN)\nattribute vec2 aPitchAlign;\n#endif\n#ifndef HAS_MARKER_PITCH_ALIGN\nuniform float markerPitchWithMap;\n#endif\n#ifndef HAS_TEXT_PITCH_ALIGN\nuniform float textPitchWithMap;\n#endif\n#if defined(HAS_MARKER_ROTATION_ALIGN) || defined(HAS_TEXT_ROTATION_ALIGN)\nattribute vec2 aRotationAlign;\n#endif\n#ifndef HAS_MARKER_ROTATION_ALIGN\nuniform float markerRotateWithMap;\n#endif\n#ifndef HAS_TEXT_ROTATION_ALIGN\nuniform float textRotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_MARKER_ROTATION) || defined(HAS_TEXT_ROTATION)\nattribute vec2 aRotation;\n#endif\n#ifndef HAS_MARKER_ROTATION\nuniform float markerRotation;\n#endif\n#ifndef HAS_TEXT_ROTATION\nuniform float textRotation;\n#endif\n#ifdef HAS_PAD_OFFSET\nattribute vec2 aPadOffset;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float markerPerspectiveRatio;\nuniform float glyphSize;\nuniform vec2 iconSize;\nuniform vec2 canvasSize;\nuniform vec2 iconTexSize;\nuniform vec2 glyphTexSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\n#include <vt_position_vert>\nvarying float vIsText;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vHalo;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aDxDy.z;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aDxDy.w;\n#else\nfloat f = textDy;\n#endif\n#ifdef HAS_MARKER_WIDTH\nfloat h = aMarkerWidth;\n#else\nfloat h = markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nfloat i = aMarkerHeight;\n#else\nfloat i = markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nfloat j = aDxDy.x;\n#else\nfloat j = markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nfloat k = aDxDy.y;\n#else\nfloat k = markerDy;\n#endif\nfloat l = mod(aShape.z, 2.);\n float m;\n if(l > .5) {\n \n#ifdef HAS_TEXT_PITCH_ALIGN\nm = aPitchAlign.y;\n#else\nm = textPitchWithMap;\n#endif\n } else {\n \n#ifdef HAS_MARKER_PITCH_ALIGN\nm = aPitchAlign.x;\n#else\nm = markerPitchWithMap;\n#endif\n }\n float n;\n if(l > .5) {\n \n#ifdef HAS_TEXT_ROTATION_ALIGN\nn = aRotationAlign.y;\n#else\nn = textRotateWithMap;\n#endif\n } else {\n \n#ifdef HAS_MARKER_ROTATION_ALIGN\nn = aRotationAlign.x;\n#else\nn = markerRotateWithMap;\n#endif\n }\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float o = gl_Position.w;\n float u;\n if(isRenderingTerrain == 1. && m == 1.) {\n u = 1.;\n } else {\n float v = (1. - cameraToCenterDistance / o) * markerPerspectiveRatio;\n u = clamp(.5 + .5 * (1. - v), .0, 4.);\n }\n float A;\n if(l > .5) {\n \n#ifdef HAS_TEXT_ROTATION\nA = -aRotation.y / 9362. - mapRotation * n;\n#else\nA = -textRotation - mapRotation * n;\n#endif\n } else {\n \n#ifdef HAS_MARKER_ROTATION\nA = -aRotation.x / 9362. - mapRotation * n;\n#else\nA = -markerRotation - mapRotation * n;\n#endif\n }\n if(m == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\nA += mapRotation;\n#else\nif(l > .5) {\n A -= mapRotation;\n } else {\n A += mapRotation;\n }\n#endif\n }\n float B = sin(A);\n float C = cos(A);\n mat2 D = mat2(C, -1. * B, B, C);\n vec2 E = (aShape.xy / 10.0);\n if(m == 1. && flipY == .0) {\n E *= vec2(1., -1.);\n }\n vIsText = l;\n if(l > .5) {\n E = E / glyphSize * d;\n } else {\n \n#ifdef HAS_PAD_OFFSET\nfloat F = aPadOffset.x - 1.;\n float G = aPadOffset.y;\n#else\nfloat F = .0;\n float G = .0;\n#endif\nE = (E / iconSize * vec2(h, i) + vec2(F, G)) * layerScale;\n }\n E = D * E;\n float H;\n if(isRenderingTerrain == 1.) {\n H = 1.;\n } else {\n H = o / cameraToCenterDistance;\n }\n if(m == .0) {\n vec2 I = E * 2. / canvasSize;\n gl_Position.xy += I * u * o;\n } else if(l > .5) {\n float J;\n if(isRenderingTerrain == 1.) {\n J = tileRatio / zoomScale;\n } else {\n J = tileRatio / zoomScale * H * u;\n }\n vec2 I = E;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(I, .0) * J, 1.);\n } else {\n vec2 I = E;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(I, .0) * tileRatio / zoomScale * H * u, 1.);\n }\n if(l > .5) {\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * o;\n } else {\n gl_Position.xy += vec2(j, -k) * 2. / canvasSize * o;\n }\n#ifndef PICKING_MODE\nif(m == .0) {\n vGammaScale = mix(1., H, textPerspectiveRatio);\n } else {\n vGammaScale = H + mapPitch / 4.;\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vec2 K = floor(aShape.zw / 2.);\n if(l > .5) {\n vTexCoord = K / glyphTexSize;\n } else {\n vTexCoord = K / iconTexSize;\n }\n vHalo = mod(aShape.w, 2.);\n vTextSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nif(l > .5) {\n vOpacity *= aColorOpacity.y / 255.;\n } else {\n vOpacity *= aColorOpacity.x / 255.;\n }\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool L = aOpacity == 255.;\n#else\nbool L = true;\n#endif\nfbo_picking_setData(gl_Position.w, L);\n#endif\n}";
|
|
15505
|
+
const wr = [], Sr = [], Mr = [], Pr = [], Ir = [], Cr = [];
|
|
15519
15506
|
function kr(e, t, i, r, s, o, a, l, h, c, u, f, d, p) {
|
|
15520
15507
|
const {tileRatio: g, tileResolution: m} = h, y = g / (m / c.getResolution()) * (u / c.cameraToCenterDistance) * f;
|
|
15521
15508
|
n.vec2.scale(i, i, y), n.vec2.scale(r, r, y), n.vec2.scale(s, s, y), n.vec2.scale(o, o, y),
|
|
15522
|
-
n.vec3.set(wr, i[0], i[1], d ? i[2] / p : 0), n.vec3.set(
|
|
15523
|
-
n.vec3.set(
|
|
15524
|
-
n.vec3.add(wr, wr, t), n.vec3.add(
|
|
15525
|
-
oi(i, wr, a, c.width, c.height), oi(r,
|
|
15509
|
+
n.vec3.set(wr, i[0], i[1], d ? i[2] / p : 0), n.vec3.set(Sr, r[0], r[1], d ? r[2] / p : 0),
|
|
15510
|
+
n.vec3.set(Mr, s[0], s[1], d ? s[2] / p : 0), n.vec3.set(Pr, o[0], o[1], d ? o[2] / p : 0),
|
|
15511
|
+
n.vec3.add(wr, wr, t), n.vec3.add(Sr, Sr, t), n.vec3.add(Mr, Mr, t), n.vec3.add(Pr, Pr, t),
|
|
15512
|
+
oi(i, wr, a, c.width, c.height), oi(r, Sr, a, c.width, c.height), oi(s, Mr, a, c.width, c.height),
|
|
15526
15513
|
oi(o, Pr, a, c.width, c.height), n.vec2.set(Ir, Math.min(i[0], r[0], s[0], o[0]), Math.min(i[1], r[1], s[1], o[1])),
|
|
15527
15514
|
n.vec2.set(Cr, Math.max(i[0], r[0], s[0], o[0]), Math.max(i[1], r[1], s[1], o[1])),
|
|
15528
15515
|
n.vec4.set(e, Ir[0] + l[0], Ir[1] + l[1], Cr[0] + l[0], Cr[1] + l[1]);
|
|
@@ -15551,7 +15538,7 @@
|
|
|
15551
15538
|
if (o.markerPerspectiveRatio) {
|
|
15552
15539
|
m = yt(.5 + .5 * (1 - (1 - a / g) * o.markerPerspectiveRatio), 0, 4);
|
|
15553
15540
|
}
|
|
15554
|
-
const {aShape: y, aMarkerDx: x, aMarkerDy: _, aMarkerWidth: v, aMarkerHeight: b, aPitchAlign: A, aRotationAlign: T, aRotation: w} = l,
|
|
15541
|
+
const {aShape: y, aMarkerDx: x, aMarkerDy: _, aMarkerWidth: v, aMarkerHeight: b, aPitchAlign: A, aRotationAlign: T, aRotation: w} = l, S = x ? x[i] : h.markerDx, M = _ ? _[i] : h.markerDy, P = A ? A[2 * i] : o.markerPitchWithMap, I = T ? T[2 * i] : o.markerRotateWithMap, C = n.vec2.set(Wr, S || 0, -(M || 0));
|
|
15555
15542
|
let k = n.vec2.set(Ur, y[2 * i] / 10, y[2 * i + 1] / 10), O = n.vec2.set(Br, y[2 * i + 2] / 10, y[2 * i + 3] / 10), F = n.vec2.set(Gr, y[2 * i + 4] / 10, y[2 * i + 5] / 10), R = n.vec2.set(jr, y[2 * i + 6] / 10, y[2 * i + 7] / 10);
|
|
15556
15543
|
0 === o.flipY && 1 === P && (n.vec2.multiply(k, k, Xr), n.vec2.multiply(O, O, Xr),
|
|
15557
15544
|
n.vec2.multiply(F, F, Xr), n.vec2.multiply(R, R, Xr));
|
|
@@ -15583,13 +15570,13 @@
|
|
|
15583
15570
|
y = yt(.5 + .5 * (1 - (1 - u / m) * c.textPerspectiveRatio), 0, 4);
|
|
15584
15571
|
}
|
|
15585
15572
|
const {aTextDx: x, aTextDy: _, aPitchAlign: v, aRotationAlign: b, aRotation: A, aType: T, aDxDy: w} = r.geometry.properties;
|
|
15586
|
-
let
|
|
15587
|
-
w ? (
|
|
15573
|
+
let S, M, P;
|
|
15574
|
+
w ? (S = w[4 * a + 2], M = w[4 * a + 3]) : (S = x ? x[a] : d.textDx, M = _ ? _[a] : d.textDy),
|
|
15588
15575
|
v && (P = T ? v[2 * a + 1] : v[a]);
|
|
15589
15576
|
const I = v ? P : c.textPitchWithMap;
|
|
15590
15577
|
let C;
|
|
15591
15578
|
b && (C = T ? b[2 * a + 1] : b[a]);
|
|
15592
|
-
const k = b ? C : c.textRotateWithMap, O = n.vec2.set(ns,
|
|
15579
|
+
const k = b ? C : c.textRotateWithMap, O = n.vec2.set(ns, S || 0, -(M || 0));
|
|
15593
15580
|
if (p) {
|
|
15594
15581
|
const {aOffset: r, aShape: s} = f, o = r.length !== s.length;
|
|
15595
15582
|
let u, d, p, g;
|
|
@@ -15766,17 +15753,25 @@
|
|
|
15766
15753
|
}
|
|
15767
15754
|
function fs(e, t, n) {
|
|
15768
15755
|
const i = e.properties, r = this.getSymbol(i.symbolIndex), s = "line" === i.textPlacement && !It(r), {aPosition: o, aShape: a} = e.data, l = o.length / e.desc.positionSize;
|
|
15769
|
-
if (i.aPickingId = e.data.aPickingId, i.aCount || (i.aCount = e.data.aCount,
|
|
15770
|
-
|
|
15771
|
-
|
|
15756
|
+
if (i.vertexCount = l, i.aPickingId = e.data.aPickingId, i.aCount || (i.aCount = e.data.aCount,
|
|
15757
|
+
delete e.data.aCount), t || s) {
|
|
15758
|
+
let e = a;
|
|
15759
|
+
if (a.length === 4 * l) {
|
|
15760
|
+
e = new a.constructor(2 * l);
|
|
15761
|
+
for (let t = 0; t < l; t++) e[2 * t] = a[4 * t], e[2 * t + 1] = a[4 * t + 1];
|
|
15762
|
+
}
|
|
15763
|
+
i.aAnchor = o, i.aShape = e;
|
|
15764
|
+
}
|
|
15765
|
+
if (i.visElemts || (i.elements = e.elements, i.visElemts = new e.elements.constructor(e.elements.length)),
|
|
15766
|
+
s) {
|
|
15772
15767
|
const {aVertical: t, aSegment: n, aGlyphOffset: r, aPitchRotation: s} = e.data, o = !!s;
|
|
15773
15768
|
i.aGlyphOffset = r, i.aPitchRotation = s, i.aSegment = n, i.aVertical = t, delete e.data.aSegment,
|
|
15774
15769
|
delete e.data.aVertical, delete e.data.aGlyphOffset, delete e.data.aPitchRotation;
|
|
15775
|
-
const
|
|
15770
|
+
const a = l * (o ? 3 : 2);
|
|
15776
15771
|
e.data.aOffset = {
|
|
15777
15772
|
usage: "dynamic",
|
|
15778
|
-
data: new Int16Array(
|
|
15779
|
-
}, i.aOffset = new Int16Array(
|
|
15773
|
+
data: new Int16Array(a)
|
|
15774
|
+
}, i.aOffset = new Int16Array(a);
|
|
15780
15775
|
}
|
|
15781
15776
|
if (t) {
|
|
15782
15777
|
e.data.aOpacity = {
|
|
@@ -15856,7 +15851,7 @@
|
|
|
15856
15851
|
};
|
|
15857
15852
|
}
|
|
15858
15853
|
function gs(e, t) {
|
|
15859
|
-
const n =
|
|
15854
|
+
const n = Se(t.textFill), i = Se(t.textSize), r = Se(t.textHaloFill), s = Se(t.textHaloRadius), o = Se(t.textHaloOpacity), a = Se(t.textDx), l = Se(t.textDy), h = Se(t.textOpacity), c = Me(t.textPitchAlignment), u = Me(t.textRotationAlignment), f = Se(t.textRotation), d = Me(t.textAllowOverlapFn), p = Me(t.textIgnorePlacement), g = {}, m = new Int16Array(1), y = new Uint16Array(1);
|
|
15860
15855
|
return [ {
|
|
15861
15856
|
attrName: "aTextFill",
|
|
15862
15857
|
symbolName: "textFill",
|
|
@@ -16037,7 +16032,7 @@
|
|
|
16037
16032
|
}(e, t, i) : null;
|
|
16038
16033
|
}
|
|
16039
16034
|
const As = [], Ts = [];
|
|
16040
|
-
const ws = 6,
|
|
16035
|
+
const ws = 6, Ss = 4, Ms = new Uint16Array(1), Ps = new Int8Array(1);
|
|
16041
16036
|
function Is(e, t, i, r, s, o, a, l, h) {
|
|
16042
16037
|
if (t.isDisposed() || 0 === t.data.aPosition.length) return null;
|
|
16043
16038
|
const c = !!t.properties.iconAtlas, u = !!t.properties.glyphAtlas;
|
|
@@ -16049,7 +16044,10 @@
|
|
|
16049
16044
|
usage: "dynamic",
|
|
16050
16045
|
data: r
|
|
16051
16046
|
}, t.properties.aOpacity = new Uint8Array(i), l && t.properties.aOpacity.fill(255, 0),
|
|
16052
|
-
t.properties.aAnchor = e
|
|
16047
|
+
t.properties.aAnchor = e;
|
|
16048
|
+
const s = n.length / 4, o = new n.constructor(2 * s);
|
|
16049
|
+
for (let e = 0; e < s; e++) o[2 * e] = n[4 * e], o[2 * e + 1] = n[4 * e + 1];
|
|
16050
|
+
t.properties.aShape = o;
|
|
16053
16051
|
}
|
|
16054
16052
|
t.properties.visElemts || (t.properties.elements = t.elements, t.properties.visElemts = new t.elements.constructor(t.elements.length)),
|
|
16055
16053
|
u && hs.call(this, t, r, o.text, a, l, h), t.properties.memorySize = t.getMemorySize(),
|
|
@@ -16158,7 +16156,7 @@
|
|
|
16158
16156
|
}(e);
|
|
16159
16157
|
}
|
|
16160
16158
|
function Rs(e, t) {
|
|
16161
|
-
const n =
|
|
16159
|
+
const n = Se(t.markerWidth), i = Se(t.markerHeight), r = Se(t.markerDx), s = Se(t.markerDy), o = Se(t.markerOpacity), a = Se(t.markerTextFit), l = Me(t.markerPitchAlignment), h = Me(t.textPitchAlignment), c = Me(t.markerRotationAlignment), u = Me(t.textRotationAlignment), f = Se(t.markerRotation), d = Se(t.textRotation), p = Me(t.markerAllowOverlapFn), g = Me(t.markerIgnorePlacement), m = Se(t.textOpacity), y = Se(t.textDx), x = Se(t.textDy), _ = new Int16Array(1), v = new Uint16Array(1);
|
|
16162
16160
|
return [ {
|
|
16163
16161
|
attrName: "aMarkerWidth",
|
|
16164
16162
|
symbolName: "markerWidth",
|
|
@@ -16348,7 +16346,7 @@
|
|
|
16348
16346
|
}(t);
|
|
16349
16347
|
const s = function(e, t) {
|
|
16350
16348
|
let n = e.properties.textFitFn;
|
|
16351
|
-
we(t) && (n = e.properties.textFitFn =
|
|
16349
|
+
we(t) && (n = e.properties.textFitFn = Me(t));
|
|
16352
16350
|
const i = "none" !== t, r = [], s = e.properties.iconElements, o = e.data.aPickingId, a = e.properties.textElements, l = e.data.aPickingId, h = e.properties.aCount, c = e.properties.features;
|
|
16353
16351
|
let u, f = a[0];
|
|
16354
16352
|
u = {
|
|
@@ -16398,7 +16396,7 @@
|
|
|
16398
16396
|
let n = 1 / 0, s = 1 / 0, l = -1 / 0, h = -1 / 0;
|
|
16399
16397
|
const c = e.properties.textElements;
|
|
16400
16398
|
for (let e = o; e < a; e++) {
|
|
16401
|
-
const t = c[e], r = i[
|
|
16399
|
+
const t = c[e], r = i[4 * t], o = i[4 * t + 1];
|
|
16402
16400
|
r < n && (n = r), r > l && (l = r), o < s && (s = o), o > h && (h = o);
|
|
16403
16401
|
}
|
|
16404
16402
|
t.push(n, s, l, h);
|
|
@@ -16415,14 +16413,14 @@
|
|
|
16415
16413
|
let s = "both" === i || "width" === i, o = "both" === i || "height" === i;
|
|
16416
16414
|
if (we(n.markerTextFit)) {
|
|
16417
16415
|
let e = t.properties.textFitFn;
|
|
16418
|
-
e || (e = t.properties.textFitFn =
|
|
16416
|
+
e || (e = t.properties.textFitFn = Se(n.markerTextFit));
|
|
16419
16417
|
const {features: i} = t.properties, a = t.properties.iconElements, {aPickingId: l} = t.data, h = [], c = [];
|
|
16420
16418
|
let u = !0;
|
|
16421
16419
|
for (let t = 0; t < a.length; t += ws) {
|
|
16422
16420
|
const n = i[l[a[t]]], r = (n && n.feature || {}).properties || {};
|
|
16423
16421
|
let s = e(null, r);
|
|
16424
16422
|
if (we(s)) {
|
|
16425
|
-
s = (r.textFitFn = r.textFitFn ||
|
|
16423
|
+
s = (r.textFitFn = r.textFitFn || Se(s))(null, r);
|
|
16426
16424
|
}
|
|
16427
16425
|
"both" === s ? (h.push(t / ws), c.push(t / ws)) : "width" === s ? (u = !1, h.push(t / ws)) : "height" === s && (u = !1,
|
|
16428
16426
|
c.push(t / ws));
|
|
@@ -16452,7 +16450,7 @@
|
|
|
16452
16450
|
r.aMarkerHeight = new Uint16Array(c), r.aMarkerHeight.fill(e), e && (r.aMarkerHeight.dirty = !0),
|
|
16453
16451
|
t.data.aMarkerHeight = new Uint16Array(c);
|
|
16454
16452
|
}
|
|
16455
|
-
const u = this.getSymbolDef(t.properties.symbolIndex), f =
|
|
16453
|
+
const u = this.getSymbolDef(t.properties.symbolIndex), f = Se(u.textSize);
|
|
16456
16454
|
Hs.call(this, e, t), (!we(u.textSize) || f.isZoomConstant && f.isFeatureConstant) && (r.isFitConstant = !0);
|
|
16457
16455
|
}
|
|
16458
16456
|
const Ls = [ 0, 0, 0, 0 ];
|
|
@@ -16463,40 +16461,40 @@
|
|
|
16463
16461
|
if (i.isFitConstant || !i.labelShape || !i.labelShape.length) return;
|
|
16464
16462
|
const r = this.getSymbolDef(t.properties.symbolIndex), s = r.textSize;
|
|
16465
16463
|
let o;
|
|
16466
|
-
we(s) && (o = n._textSizeFn ? n._textSizeFn : n._textSizeFn =
|
|
16464
|
+
we(s) && (o = n._textSizeFn ? n._textSizeFn : n._textSizeFn = Se(s));
|
|
16467
16465
|
const a = r.markerTextFitPadding || Ls;
|
|
16468
16466
|
let l;
|
|
16469
|
-
we(a) && (l = i._paddingFn ? i._paddingFn : i._paddingFn =
|
|
16467
|
+
we(a) && (l = i._paddingFn ? i._paddingFn : i._paddingFn = Me(a));
|
|
16470
16468
|
const h = e.getZoom(), {fitIcons: c, fitWidthIcons: u, fitHeightIcons: f} = i, {aMarkerWidth: d, aMarkerHeight: p, labelShape: g} = i, m = t.properties.iconElements, {features: y, aPickingId: x} = i, _ = (e, t, n, r) => {
|
|
16471
16469
|
const c = g[4 * t], u = g[4 * t + 1], f = g[4 * t + 2], m = g[4 * t + 3];
|
|
16472
16470
|
if (!(c || u || f || m)) return;
|
|
16473
16471
|
const _ = x[e], v = y[_] && y[_].feature, b = v && v.properties || {};
|
|
16474
16472
|
let A = o ? o(h, b) : s;
|
|
16475
16473
|
if (we(A)) {
|
|
16476
|
-
A = (b.textSizeFn = b.textSizeFn ||
|
|
16474
|
+
A = (b.textSizeFn = b.textSizeFn || Se(A))(h, b);
|
|
16477
16475
|
}
|
|
16478
16476
|
A /= Lr;
|
|
16479
16477
|
let T, w = l && l(h, b) || a;
|
|
16480
16478
|
if (we(w)) {
|
|
16481
|
-
w = (b.fitPaddingFn = b.fitPaddingFn ||
|
|
16479
|
+
w = (b.fitPaddingFn = b.fitPaddingFn || Me(w))(h, b);
|
|
16482
16480
|
}
|
|
16483
16481
|
if (w = w || Ls, w[0] === w[2] && w[1] === w[3] || (T = i.aPadOffset, T || (T = i.aPadOffset = new Int8Array(2 * d.length))),
|
|
16484
16482
|
d && n) {
|
|
16485
16483
|
const t = Math.abs((f - c) / 10 * A) + (w[1] + w[3] || 0);
|
|
16486
|
-
if (
|
|
16484
|
+
if (Ms[0] = t, d[e] !== Ms[0] && (Mt(d, Ms[0], e, e + Ss), d.dirty = !0), T) {
|
|
16487
16485
|
const t = (w[1] + w[3]) / 2 - w[3];
|
|
16488
16486
|
if (Ps[0] = t, T[2 * e] !== Ps[0]) {
|
|
16489
|
-
for (let n = e; n < e +
|
|
16487
|
+
for (let n = e; n < e + Ss; n++) T[2 * n] = t;
|
|
16490
16488
|
T.dirty = !0;
|
|
16491
16489
|
}
|
|
16492
16490
|
}
|
|
16493
16491
|
}
|
|
16494
16492
|
if (p && r) {
|
|
16495
16493
|
const t = Math.abs((m - u) / 10 * A) + (w[0] + w[2] || 0);
|
|
16496
|
-
if (
|
|
16494
|
+
if (Ms[0] = t, p[e] !== Ms[0] && (Mt(p, Ms[0], e, e + Ss), p.dirty = !0), T) {
|
|
16497
16495
|
const t = w[0] - (w[0] + w[2]) / 2;
|
|
16498
16496
|
if (Ps[0] = t, T[2 * e + 1] !== Ps[0]) {
|
|
16499
|
-
for (let n = e; n < e +
|
|
16497
|
+
for (let n = e; n < e + Ss; n++) T[2 * n + 1] = t;
|
|
16500
16498
|
T.dirty = !0;
|
|
16501
16499
|
}
|
|
16502
16500
|
}
|
|
@@ -16583,14 +16581,11 @@
|
|
|
16583
16581
|
} else t.properties.isEmpty = !0;
|
|
16584
16582
|
}
|
|
16585
16583
|
_prepareRequiredProps(e) {
|
|
16586
|
-
const {aCount: t,
|
|
16584
|
+
const {aCount: t, aShape: n} = e.data;
|
|
16587
16585
|
e.properties.aCount = t, delete e.data.aCount;
|
|
16588
|
-
const i = n.length / 4, r = new Uint8Array(i);
|
|
16589
|
-
for (let e = 0; e < i; e++) r[e] = n[4 * e + 2];
|
|
16590
|
-
e.properties.aType = r;
|
|
16591
|
-
const s = new Uint8Array(i);
|
|
16592
|
-
for (let e = 0; e < i; e++) s[e] = n[4 * e + 3];
|
|
16593
|
-
e.properties.aHalo = s, Cs.call(this, e);
|
|
16586
|
+
const i = n.length / 4, r = new Uint8Array(i), s = new Uint8Array(i);
|
|
16587
|
+
for (let e = 0; e < i; e++) r[e] = n[4 * e + 2] % 2, s[e] = n[4 * e + 3] % 2;
|
|
16588
|
+
e.properties.aType = r, e.properties.aHalo = s, Cs.call(this, e);
|
|
16594
16589
|
}
|
|
16595
16590
|
prepareCollideIndex(e) {
|
|
16596
16591
|
const {collideIds: t, elements: n, aCount: i, aType: r} = e.properties;
|
|
@@ -16630,7 +16625,7 @@
|
|
|
16630
16625
|
i < n.length && o.fill(e++, i, n.length);
|
|
16631
16626
|
} else {
|
|
16632
16627
|
let e = 0;
|
|
16633
|
-
for (let t = 0; t < n.length; t +=
|
|
16628
|
+
for (let t = 0; t < n.length; t += Ss) o.fill(e++, t, t + Ss);
|
|
16634
16629
|
}
|
|
16635
16630
|
e.properties.collideIds = o, e.properties.uniqueCollideIds = kt(o, !t);
|
|
16636
16631
|
} else if (a) {
|
|
@@ -16638,8 +16633,8 @@
|
|
|
16638
16633
|
if (!i) return;
|
|
16639
16634
|
let r = 0, s = i[0];
|
|
16640
16635
|
for (let e = 0; e < n.length; ) {
|
|
16641
|
-
const t = e + s *
|
|
16642
|
-
n.fill(r++, e, t), e += s *
|
|
16636
|
+
const t = e + s * Ss;
|
|
16637
|
+
n.fill(r++, e, t), e += s * Ss, t < n.length && (s = i[t]);
|
|
16643
16638
|
}
|
|
16644
16639
|
e.properties.uniqueCollideIds = kt(n, !t);
|
|
16645
16640
|
}
|
|
@@ -16929,32 +16924,32 @@
|
|
|
16929
16924
|
}
|
|
16930
16925
|
const Xs = [], Ys = [], Zs = [];
|
|
16931
16926
|
function qs(e, t, i, r, s, o, a, l, h, c, u, f, d) {
|
|
16932
|
-
const {aGlyphOffset: p, aSegment: g, aTextDx: m, aTextDy: y, symbolIndex: x} = t.geometry.properties, _ = this.getSymbol(x), v = m ? m[s] : _.textDx, b = y ? y[s] : _.textDy, A = n.vec2.set(Zs, v || 0, b || 0), T = n.vec2.set(Xs, p[2 * s], p[2 * s + 1]), w = n.vec3.set(Ys, g[3 * s], g[3 * s + 1], g[3 * s + 2]),
|
|
16927
|
+
const {aGlyphOffset: p, aSegment: g, aTextDx: m, aTextDy: y, symbolIndex: x} = t.geometry.properties, _ = this.getSymbol(x), v = m ? m[s] : _.textDx, b = y ? y[s] : _.textDy, A = n.vec2.set(Zs, v || 0, b || 0), T = n.vec2.set(Xs, p[2 * s], p[2 * s + 1]), w = n.vec3.set(Ys, g[3 * s], g[3 * s + 1], g[3 * s + 2]), S = function(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m, y) {
|
|
16933
16928
|
p || (p = i);
|
|
16934
16929
|
const x = t.geometry.properties.line, _ = s[0] * u, v = f ? _ - o : _ + o;
|
|
16935
16930
|
let b = v > 0 ? 1 : -1, A = 0;
|
|
16936
16931
|
f && (b *= -1, A = Math.PI), b < 0 && (A += Math.PI);
|
|
16937
16932
|
const T = h + c, w = Math.abs(v);
|
|
16938
|
-
let
|
|
16933
|
+
let S = b > 0 ? l : l + 1, M = ri.convert(i), P = ri.convert(i), I = ri.convert(r), C = ri.convert(r), k = 0, O = 0;
|
|
16939
16934
|
for (;k + O <= w; ) {
|
|
16940
|
-
if (
|
|
16941
|
-
P.x =
|
|
16942
|
-
I.x = x[3 *
|
|
16935
|
+
if (S += b, S < h || S >= T) return null;
|
|
16936
|
+
P.x = M.x, P.y = M.y, C.x = I.x, C.y = I.y, M.x = n[3 * S], M.y = n[3 * S + 1],
|
|
16937
|
+
I.x = x[3 * S], I.y = x[3 * S + 1], k += O, O = P.dist(M) / d;
|
|
16943
16938
|
}
|
|
16944
16939
|
const F = (w - k) / O, R = g && g.getRenderer(), E = R && R.getTerrainHelper(), D = t.properties.tile.terrainTileInfos;
|
|
16945
16940
|
if (!y && E) {
|
|
16946
16941
|
const {extent: n} = t.properties.tile, i = g.getTileSize().width / n, r = g.getMap();
|
|
16947
16942
|
let s = I.sub(C).mult(F)._add(C);
|
|
16948
|
-
|
|
16949
|
-
const o = A + Math.atan2(
|
|
16943
|
+
M = di(ai, r, t, I, i, g, m, D), P = di(li, r, t, C, i, g, m, D), s = di(hi, r, t, s, i, g, m, D);
|
|
16944
|
+
const o = A + Math.atan2(M[1] - P[1], M[0] - P[0]);
|
|
16950
16945
|
return e[0] = (s[0] - p[0]) / d, e[1] = (s[1] - p[1]) / d, e[2] = o, e;
|
|
16951
16946
|
}
|
|
16952
|
-
const L =
|
|
16947
|
+
const L = M.sub(P), H = L.mult(F)._add(P);
|
|
16953
16948
|
H._add(L._unit()._perp()._mult(a * b));
|
|
16954
|
-
const N = A + Math.atan2(
|
|
16949
|
+
const N = A + Math.atan2(M.y - P.y, M.x - P.x);
|
|
16955
16950
|
return e[0] = (H.x - i[0]) / d, e[1] = (H.y - i[1]) / d, e[2] = N, e;
|
|
16956
16951
|
}(e, t, r, o, a, T, A[0], A[1], w[0], w[1], w[2], i / 24, h, l, c, u, f, d);
|
|
16957
|
-
return
|
|
16952
|
+
return S;
|
|
16958
16953
|
}
|
|
16959
16954
|
const $s = [], Js = [];
|
|
16960
16955
|
function Ks(e, t, i, r, s, o, a, l, h, c, u, f, d) {
|
|
@@ -16970,7 +16965,7 @@
|
|
|
16970
16965
|
} else m = 0, y = $s[0] > Js[0] ? 1 : 0;
|
|
16971
16966
|
return 2 * y + m;
|
|
16972
16967
|
}
|
|
16973
|
-
var Qs = "#define SHADER_NAME TEXT_VERT\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute
|
|
16968
|
+
var Qs = "#define SHADER_NAME TEXT_VERT\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec4 aShape;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float textPitchWithMap;\n#endif\n#if defined(HAS_TEXT_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float textRotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_TEXT_ROTATION)\nattribute float aRotation;\n#else\nuniform float textRotation;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform vec2 glyphTexSize;\nuniform vec2 canvasSize;\nuniform float glyphSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aTextDx;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aTextDy;\n#else\nfloat f = textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nfloat h = aPitchAlign;\n#else\nfloat h = textPitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat i = aRotationAlign;\n#else\nfloat i = textRotateWithMap;\n#endif\ngl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float j = gl_Position.w;\n float k;\n if(isRenderingTerrain == 1. && h == 1.) {\n k = 1.;\n } else {\n float l = (1. - cameraToCenterDistance / j) * textPerspectiveRatio;\n k = clamp(.5 + .5 * (1. - l), .0, 4.);\n }\n#ifdef HAS_TEXT_ROTATION\nfloat m = -aRotation / 9362. - mapRotation * i;\n#else\nfloat m = -textRotation - mapRotation * i;\n#endif\nif(h == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\nm += mapRotation;\n#else\nm -= mapRotation;\n#endif\n }\n float n = sin(m);\n float o = cos(m);\n mat2 u = mat2(o, -1. * n, n, o);\n vec2 v = aShape.xy / 10.0;\n if(h == 1. && flipY == .0) {\n v = v * vec2(1., -1.);\n }\n vec2 A = aShape.zw;\n v = u * (v / glyphSize * d);\n float B;\n if(isRenderingTerrain == 1.) {\n B = 1.;\n } else {\n B = j / cameraToCenterDistance;\n }\n if(h == .0) {\n vec2 C = v * 2. / canvasSize;\n gl_Position.xy += C * k * j;\n } else {\n float D;\n if(isRenderingTerrain == 1.) {\n D = tileRatio / zoomScale;\n } else {\n D = tileRatio / zoomScale * B * k;\n }\n vec2 C = v;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(C, .0) * D, 1.);\n }\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * j;\n#ifndef PICKING_MODE\nif(h == .0) {\n vGammaScale = mix(1., B, textPerspectiveRatio);\n } else {\n vGammaScale = B + mapPitch / 4.;\n }\n vTexCoord = A / glyphTexSize;\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vTextSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool E = aOpacity == 255.;\n#else\nbool E = true;\n#endif\nfbo_picking_setData(gl_Position.w, E);\n#endif\n}", eo = "#define SHADER_NAME TEXT_LINE\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aTexCoord;\n#ifdef HAS_OFFSET_Z\nattribute vec3 aOffset;\nuniform float altitudeScale;\n#else\nattribute vec2 aOffset;\n#endif\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float textPitchWithMap;\n#endif\nuniform float zoomScale;\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float mapPitch;\nuniform vec2 glyphTexSize;\nuniform vec2 canvasSize;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\nuniform float textPitchFilter;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vTextSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nattribute vec2 aTextHalo;\nvarying vec2 vTextHalo;\n#endif\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_DX\nfloat d = aTextDx;\n#else\nfloat d = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat e = aTextDy;\n#else\nfloat e = textDy;\n#endif\n#ifdef HAS_TEXT_SIZE\nfloat f = aTextSize * layerScale;\n#else\nfloat f = textSize * layerScale;\n#endif\n#ifdef HAS_PITCH_ALIGN\nfloat h = aPitchAlign;\n#else\nfloat h = textPitchWithMap;\n#endif\ngl_Position = projViewModelMatrix * vec4(c, 1.);\n float i = gl_Position.w;\n float j = i / cameraToCenterDistance;\n float k;\n if(isRenderingTerrain == 1.) {\n k = 1.;\n } else {\n float l = (1. - cameraToCenterDistance / i) * textPerspectiveRatio;\n k = clamp(.5 + .5 * (1. - l), .0, 4.);\n }\n#ifdef HAS_OFFSET_Z\nvec3 m = aOffset / 10.0;\n m[2] /= altitudeScale;\n#else\nvec3 m = vec3(aOffset / 10.0, .0);\n#endif\nvec2 n = aTexCoord;\n if(h == 1.) {\n float o;\n if(isRenderingTerrain == 1.) {\n o = tileRatio;\n } else {\n o = tileRatio / zoomScale * j * k;\n }\n m.xy *= o;\n gl_Position = projViewModelMatrix * vec4(c + m, 1.);\n } else {\n gl_Position.xy += m.xy * 2. / canvasSize * k * i;\n }\n gl_Position.xy += vec2(d, -e) * 2. / canvasSize * i;\n if(textPitchFilter > .0) {\n if(textPitchFilter == 1. && h == .0 || textPitchFilter == 2. && h == 1.) {\n gl_Position = vec4(-9999., -9999., .0, 1.);\n }\n }\n#ifndef PICKING_MODE\nif(h == 1.) {\n vGammaScale = j + mapPitch / 4.;\n } else {\n vGammaScale = mix(1., j, textPerspectiveRatio);\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vTexCoord = n / glyphTexSize;\n vTextSize = f;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#if defined(HAS_TEXT_HALO_RADIUS) || defined(HAS_TEXT_HALO_OPACITY)\nvTextHalo = aTextHalo;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool u = aOpacity == 255.;\n#else\nbool u = true;\n#endif\nfbo_picking_setData(gl_Position.w, u);\n#endif\n}", to = "#define SHADER_NAME TEXT_FRAG\nprecision mediump float;\nuniform float layerOpacity;\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nuniform float alphaTest;\n#include <text_render_frag>\n#include <highlight_frag>\nvoid main() {\n gl_FragColor = renderText(vTexCoord) * vOpacity * layerOpacity;\n if(gl_FragColor.a < alphaTest) {\n discard;\n }\n gl_FragColor = highlight_blendColor(gl_FragColor);\n}";
|
|
16974
16969
|
const {TextUtil: no, PackUtil: io, FilterUtil: ro, TEXT_MAX_ANGLE: so} = h(), oo = function(e) {
|
|
16975
16970
|
const t = this.layer.getRenderer();
|
|
16976
16971
|
return !this._isHalo0(e) && t.isTileNearCamera(e) && "line" !== e.geometry.properties.textPlacement;
|
|
@@ -16983,7 +16978,7 @@
|
|
|
16983
16978
|
}, ho = function(e) {
|
|
16984
16979
|
const t = this.layer.getRenderer(), n = e.properties.tile.z, i = t.getCurrentTileZoom();
|
|
16985
16980
|
return !this._isHalo0(e) && !t.isForeground(e) && "line" === e.geometry.properties.textPlacement && n < i;
|
|
16986
|
-
}, co = [ 0, 0, 3 ], uo = [], fo = [], po = [], go = [], mo = [], yo = [], xo = [], _o = [], vo = [ 1, -1 ], bo = new Int16Array(3), Ao = [], To = [], wo = [],
|
|
16981
|
+
}, co = [ 0, 0, 3 ], uo = [], fo = [], po = [], go = [], mo = [], yo = [], xo = [], _o = [], vo = [ 1, -1 ], bo = new Int16Array(3), Ao = [], To = [], wo = [], So = [], Mo = [], Po = [], Io = [], Co = {}, ko = {}, Oo = {}, Fo = [], Ro = [], Eo = n.mat4.identity([]), Do = [];
|
|
16987
16982
|
class Lo extends xr {
|
|
16988
16983
|
static getBloomSymbol() {
|
|
16989
16984
|
return [ "textBloom" ];
|
|
@@ -17043,7 +17038,7 @@
|
|
|
17043
17038
|
}
|
|
17044
17039
|
return i;
|
|
17045
17040
|
};
|
|
17046
|
-
} else we(t.textName) && (this._textNameFn[e] =
|
|
17041
|
+
} else we(t.textName) && (this._textNameFn[e] = Se(t.textName));
|
|
17047
17042
|
}
|
|
17048
17043
|
}
|
|
17049
17044
|
shouldDeleteMeshOnUpdateSymbol(e) {
|
|
@@ -17205,29 +17200,29 @@
|
|
|
17205
17200
|
const l = this.layer.getRenderer(), h = e.material.uniforms, c = 1 === h.textPitchWithMap, u = !c && l.getTerrainHelper && l.getTerrainHelper(), f = this.isEnableCollision(), d = this.getMap(), p = e.geometry, g = p.desc.positionSize, {aShape: m, aOffset: y, aAnchor: x, aAltitude: _, aPitchRotation: v} = p.properties;
|
|
17206
17201
|
let {aProjectedAnchor: b} = p.properties;
|
|
17207
17202
|
b || (b = p.properties.aProjectedAnchor = new Array(x.length / g * 3));
|
|
17208
|
-
const A = p.properties.aTextSize, T = !a, w = t[i],
|
|
17209
|
-
let
|
|
17210
|
-
|
|
17211
|
-
const P = oi(mo,
|
|
17203
|
+
const A = p.properties.aTextSize, T = !a, w = t[i], S = w * g;
|
|
17204
|
+
let M;
|
|
17205
|
+
M = p.data.aAltitude ? n.vec3.set(go, x[S], x[S + 1], _[w]) : io.unpackPosition(go, x[S], x[S + 1], x[S + 2]);
|
|
17206
|
+
const P = oi(mo, M, o, d.width, d.height), I = p.properties.aTerrainAltitude;
|
|
17212
17207
|
let C;
|
|
17213
17208
|
if (I) {
|
|
17214
17209
|
const e = I[w];
|
|
17215
17210
|
if (e === at) return b[3 * w] = ot, b[3 * w + 1] = ot, b[3 * w + 2] = ot, !1;
|
|
17216
|
-
e ? (C = n.vec3.set(Ro, ...
|
|
17211
|
+
e ? (C = n.vec3.set(Ro, ...M), C[2] = 100 * e, C = oi(C, C, o, d.width, d.height)) : C = P;
|
|
17217
17212
|
} else C = P;
|
|
17218
17213
|
const k = d.getDevicePixelRatio();
|
|
17219
17214
|
if (n.vec4.scale(Do, C, 1 / k), d.isOffscreen(Do)) return f || Ho(y, t, i, r), b[3 * w] = ot,
|
|
17220
17215
|
b[3 * w + 1] = ot, b[3 * w + 2] = ot, !1;
|
|
17221
|
-
T && (
|
|
17216
|
+
T && (M = P), b[3 * w] = C[0], b[3 * w + 1] = C[1], b[3 * w + 2] = C[2];
|
|
17222
17217
|
const O = T ? 1 : p.properties.tileExtent / this.layer.getTileSize().width;
|
|
17223
17218
|
let F = !0;
|
|
17224
|
-
const R = t[i], E = t[r - 1], D = A ? A[R] : e.properties.textSize, L = this._updateNormal(e, D, s, R, E,
|
|
17219
|
+
const R = t[i], E = t[r - 1], D = A ? A[R] : e.properties.textSize, L = this._updateNormal(e, D, s, R, E, M, go, O, a);
|
|
17225
17220
|
if (null === L) return Ho(y, t, i, r), !1;
|
|
17226
17221
|
const H = E - R <= 3, N = Math.floor(L / 2), z = L % 2;
|
|
17227
17222
|
for (let a = i; a < r; a += 6) {
|
|
17228
17223
|
const l = t[a];
|
|
17229
17224
|
let d;
|
|
17230
|
-
if (d = N || a !== i || H || u ? N || a !== r - 6 || H || u ? qs.call(this, fo, e, D, s, l,
|
|
17225
|
+
if (d = N || a !== i || H || u ? N || a !== r - 6 || H || u ? qs.call(this, fo, e, D, s, l, M, go, O, N, C, this.layer, o, c) : Io : Po,
|
|
17231
17226
|
!d) {
|
|
17232
17227
|
F = !1, f || Ho(y, t, i, r);
|
|
17233
17228
|
break;
|
|
@@ -17237,8 +17232,8 @@
|
|
|
17237
17232
|
const g = Fr(yo, p, 0, h.textRotateWithMap, h.textPitchWithMap), x = y.length > m.length;
|
|
17238
17233
|
let _;
|
|
17239
17234
|
if (x) {
|
|
17240
|
-
n.vec3.set(
|
|
17241
|
-
const e = n.vec3.normalize(
|
|
17235
|
+
n.vec3.set(So, v[3 * l], v[3 * l + 1], 0);
|
|
17236
|
+
const e = n.vec3.normalize(So, So), t = -v[3 * l + 2];
|
|
17242
17237
|
if (t) {
|
|
17243
17238
|
const i = n.quat.setAxisAngle(Ao, e, t);
|
|
17244
17239
|
n.mat4.fromTranslation(To, co), n.mat4.fromQuat(wo, i), _ = n.mat4.multiply(wo, wo, To);
|
|
@@ -17324,7 +17319,7 @@
|
|
|
17324
17319
|
}
|
|
17325
17320
|
}
|
|
17326
17321
|
getUniformValues(e, t) {
|
|
17327
|
-
const i = t && t.isRenderingTerrainSkin, r = this.layer.getTileSize().width, s = i ? Eo : e.projViewMatrix, o = e.cameraToCenterDistance, a = n.vec2.set(
|
|
17322
|
+
const i = t && t.isRenderingTerrainSkin, r = this.layer.getTileSize().width, s = i ? Eo : e.projViewMatrix, o = e.cameraToCenterDistance, a = n.vec2.set(Mo, e.width, e.height);
|
|
17328
17323
|
i && n.vec2.set(a, r, r);
|
|
17329
17324
|
const l = Ue(e.getResolution(), e);
|
|
17330
17325
|
return {
|
|
@@ -17399,7 +17394,7 @@
|
|
|
17399
17394
|
h.properties.symbolIndex = r, h;
|
|
17400
17395
|
}
|
|
17401
17396
|
createFnTypeConfig(e, t) {
|
|
17402
|
-
const n =
|
|
17397
|
+
const n = Me(t.markerFill);
|
|
17403
17398
|
return [ {
|
|
17404
17399
|
attrName: "aColor",
|
|
17405
17400
|
symbolName: "markerFill",
|
|
@@ -17475,7 +17470,7 @@
|
|
|
17475
17470
|
class jo extends Fi {
|
|
17476
17471
|
constructor(e, t, n, i, r, s) {
|
|
17477
17472
|
if (super(e, t, n, i, r, s), this.primitive = "lines", we(this.symbolDef.lineColor)) {
|
|
17478
|
-
const e = t.getMap(), n =
|
|
17473
|
+
const e = t.getMap(), n = Me(this.symbolDef.lineColor);
|
|
17479
17474
|
this.colorSymbol = t => n(e.getZoom(), t);
|
|
17480
17475
|
}
|
|
17481
17476
|
}
|
|
@@ -17747,7 +17742,7 @@
|
|
|
17747
17742
|
return !("line-extrusion" === this.dataConfig.type && !e.altitudeProperty && !t.altitudeProperty);
|
|
17748
17743
|
}
|
|
17749
17744
|
createFnTypeConfig(e, t) {
|
|
17750
|
-
const n =
|
|
17745
|
+
const n = Me(t.polygonFill || t.lineColor), i = Se(t.polygonOpacity || t.lineOpacity), r = Se(t.lineWidth), s = new Uint8Array(1), o = new Uint16Array(1), a = t.polygonFill ? "polygonFill" : t.lineColor ? "lineColor" : "polygonFill", l = t.polygonOpacity ? "polygonOpacity" : t.lineOpacity ? "lineOpacity" : "polygonOpacity";
|
|
17751
17746
|
return [ {
|
|
17752
17747
|
attrName: "aColor",
|
|
17753
17748
|
type: Uint8Array,
|
|
@@ -18360,7 +18355,7 @@
|
|
|
18360
18355
|
r;
|
|
18361
18356
|
}
|
|
18362
18357
|
createFnTypeConfig(e, t) {
|
|
18363
|
-
const n =
|
|
18358
|
+
const n = Me(t.lineColor), i = Me(t.aLinePatternAnimSpeed), r = Me(t.aLinePatternGap), s = this.createShapeFnTypeConfigs(e, t), o = new Int8Array(2);
|
|
18364
18359
|
return [ {
|
|
18365
18360
|
attrName: "aColor",
|
|
18366
18361
|
symbolName: "lineColor",
|
|
@@ -18398,7 +18393,7 @@
|
|
|
18398
18393
|
} ].concat(s);
|
|
18399
18394
|
}
|
|
18400
18395
|
createShapeFnTypeConfigs(e, t) {
|
|
18401
|
-
const n =
|
|
18396
|
+
const n = Se(t.lineWidth), i = Se(t.lineOpacity), r = new Uint16Array(1);
|
|
18402
18397
|
return [ {
|
|
18403
18398
|
attrName: "aLineWidth",
|
|
18404
18399
|
symbolName: "lineWidth",
|
|
@@ -18435,7 +18430,7 @@
|
|
|
18435
18430
|
delete this.shader);
|
|
18436
18431
|
}
|
|
18437
18432
|
}
|
|
18438
|
-
const {PackUtil: da} = h(), pa = [], ga = [], ma = [], ya = [], xa = [], _a = [ 0, 0, 0 ],
|
|
18433
|
+
const {PackUtil: da} = h(), pa = [], ga = [], ma = [], ya = [], xa = [], _a = [], va = [ 0, 0, 0 ], ba = [ 0, 0, 0 ], Aa = [ 1, 1, 1 ], Ta = [], wa = [ 1, 1, 1, 1 ], Sa = [], Ma = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1 ], Pa = e => class extends e {
|
|
18439
18434
|
constructor(e, t, i, r, s, o) {
|
|
18440
18435
|
super(e, t, i, r, s, o), this._ready = !1, this.scene.sortFunction = this.sortByCommandKey;
|
|
18441
18436
|
const a = r.fetchOptions || {};
|
|
@@ -18470,20 +18465,23 @@
|
|
|
18470
18465
|
};
|
|
18471
18466
|
}
|
|
18472
18467
|
getFnTypeConfig() {
|
|
18473
|
-
return
|
|
18468
|
+
return Ta;
|
|
18474
18469
|
}
|
|
18475
|
-
createMesh(e, t, {tileTranslationMatrix: i, tileExtent: r}, {timestamp:
|
|
18470
|
+
createMesh(e, t, {tileTranslationMatrix: i, tileExtent: r, tilePoint: s}, {timestamp: o}) {
|
|
18476
18471
|
if (!this._ready) return null;
|
|
18477
|
-
const
|
|
18478
|
-
if (0 ===
|
|
18479
|
-
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
|
|
18472
|
+
const a = this.getMap(), {geometry: l} = e, {positionSize: h, features: c} = l;
|
|
18473
|
+
if (!l.data.aPosition || 0 === l.data.aPosition.length) return null;
|
|
18474
|
+
"native-line" === this.dataConfig.type && this._arrangeAlongLine(0, l, s);
|
|
18475
|
+
const {aPosition: u, aPickingId: f, aXYRotation: d, aZRotation: p, aAltitude: g} = l.data;
|
|
18476
|
+
let m = u.length / h;
|
|
18477
|
+
const y = {
|
|
18478
|
+
instance_vectorA: new Float32Array(4 * m),
|
|
18479
|
+
instance_vectorB: new Float32Array(4 * m),
|
|
18480
|
+
instance_vectorC: new Float32Array(4 * m),
|
|
18483
18481
|
aPickingId: []
|
|
18484
|
-
},
|
|
18485
|
-
|
|
18486
|
-
const
|
|
18482
|
+
}, x = this._updateInstanceData(y, i, r, l.properties.z, u, g, d, p, h, f, c);
|
|
18483
|
+
l.data.aTerrainAltitude && (y.aTerrainAltitude = l.data.aTerrainAltitude);
|
|
18484
|
+
const _ = {}, v = y.aPickingId, b = function(e) {
|
|
18487
18485
|
const t = new Map;
|
|
18488
18486
|
for (let n = 0; n < e.length; n++) {
|
|
18489
18487
|
const i = e[n];
|
|
@@ -18491,54 +18489,54 @@
|
|
|
18491
18489
|
r || (r = [], t.set(i, r)), r.push(n);
|
|
18492
18490
|
}
|
|
18493
18491
|
return t;
|
|
18494
|
-
}(
|
|
18495
|
-
for (const e in
|
|
18492
|
+
}(v);
|
|
18493
|
+
for (const e in y) _[e] = {
|
|
18496
18494
|
buffer: this.regl.buffer({
|
|
18497
|
-
dimension:
|
|
18498
|
-
data:
|
|
18495
|
+
dimension: y[e].length / m,
|
|
18496
|
+
data: y[e]
|
|
18499
18497
|
}),
|
|
18500
18498
|
divisor: 1
|
|
18501
18499
|
};
|
|
18502
|
-
const
|
|
18503
|
-
n.mat4.scale(
|
|
18504
|
-
const
|
|
18500
|
+
const A = this._hasFuncType(), T = this._getMeterScale(), w = n.mat4.identity([]);
|
|
18501
|
+
n.mat4.scale(w, w, [ T, T, T ]);
|
|
18502
|
+
const S = [], M = this.getSymbols();
|
|
18505
18503
|
for (let e = 0; e < M.length; e++) {
|
|
18506
18504
|
const t = M[e], r = this._gltfMeshInfos[e];
|
|
18507
18505
|
if (!r) continue;
|
|
18508
|
-
const
|
|
18506
|
+
const s = this._gltfPack[e][0], {fixSizeOnZoom: h} = t;
|
|
18509
18507
|
let c = n.mat4.identity([]);
|
|
18510
|
-
|
|
18508
|
+
A || (c = this._getSymbolTRSMatrix(c));
|
|
18511
18509
|
let u = 0;
|
|
18512
18510
|
r.forEach((e => {
|
|
18513
18511
|
const {geometry: i, nodeMatrix: r} = e;
|
|
18514
|
-
n.mat4.multiply(
|
|
18515
|
-
const s = n.mat4.multiply(
|
|
18512
|
+
n.mat4.multiply(Sa, Ma, r), n.mat4.multiply(Sa, c, Sa);
|
|
18513
|
+
const s = n.mat4.multiply(Sa, w, Sa), o = i.boundingBox.copy();
|
|
18516
18514
|
o.transform(s);
|
|
18517
18515
|
const a = this._calAnchorTranslation(o, t);
|
|
18518
18516
|
Math.abs(a) > Math.abs(u) && (u = a);
|
|
18519
18517
|
}));
|
|
18520
18518
|
const f = [ 0, 0, u ], d = r.map(((r, d) => {
|
|
18521
|
-
const {geometry: p, materialInfo:
|
|
18522
|
-
t.alphaTest && (
|
|
18523
|
-
const
|
|
18519
|
+
const {geometry: p, materialInfo: g, morphWeights: A, extraInfo: T, nodeIndex: S} = r;
|
|
18520
|
+
t.alphaTest && (g.alphaTest = t.alphaTest);
|
|
18521
|
+
const M = new (this.getMaterialClazz(g))(g), P = {}, I = new n.reshader.InstancedMesh(_, m, p, M, {
|
|
18524
18522
|
transparent: !1,
|
|
18525
18523
|
picking: !0
|
|
18526
18524
|
});
|
|
18527
|
-
if (
|
|
18528
|
-
const t = this._updateAnimation(I, e, 0)[
|
|
18525
|
+
if (s.hasSkinAnimation()) {
|
|
18526
|
+
const t = this._updateAnimation(I, e, 0)[S];
|
|
18529
18527
|
I.setUniform("jointTexture", t.jointTexture), I.setUniform("jointTextureSize", t.jointTextureSize),
|
|
18530
18528
|
I.setUniform("numJoints", t.numJoints), I.setUniform("skinAnimation", +this._isSkinAnimating(e)),
|
|
18531
|
-
I.properties.startTime =
|
|
18529
|
+
I.properties.startTime = o, P.HAS_SKIN = 1;
|
|
18532
18530
|
}
|
|
18533
|
-
A && (I.setUniform("morphWeights", A), P.HAS_MORPH = 1), I.setUniform("hasAlpha",
|
|
18534
|
-
bt(I.uniforms, "polygonFill", t, "markerFill",
|
|
18531
|
+
A && (I.setUniform("morphWeights", A), P.HAS_MORPH = 1), I.setUniform("hasAlpha", T.alphaMode && "BLEND" === T.alphaMode.toUpperCase()),
|
|
18532
|
+
bt(I.uniforms, "polygonFill", t, "markerFill", wa, wt(this.colorCache)), bt(I.uniforms, "polygonOpacity", t, "markerOpacity", 1);
|
|
18535
18533
|
const C = [];
|
|
18536
18534
|
I.setPositionMatrix((() => {
|
|
18537
|
-
const t = this._getMeshNodeMatrix(e, d,
|
|
18538
|
-
n.mat4.multiply(C, Ma, t), n.mat4.multiply(C, c, C), n.mat4.multiply(C,
|
|
18539
|
-
const i = n.mat4.identity(
|
|
18535
|
+
const t = this._getMeshNodeMatrix(e, d, S);
|
|
18536
|
+
n.mat4.multiply(C, Ma, t), n.mat4.multiply(C, c, C), n.mat4.multiply(C, w, C);
|
|
18537
|
+
const i = n.mat4.identity(Sa);
|
|
18540
18538
|
if (0 !== u && (n.mat4.fromTranslation(i, f), n.mat4.multiply(C, i, C)), Pt(h)) {
|
|
18541
|
-
const e =
|
|
18539
|
+
const e = a.getGLScale() / a.getGLScale(h);
|
|
18542
18540
|
return n.vec3.set(pa, e, e, e), n.mat4.fromScaling(i, pa), n.mat4.multiply(i, i, C);
|
|
18543
18541
|
}
|
|
18544
18542
|
return C;
|
|
@@ -18546,26 +18544,64 @@
|
|
|
18546
18544
|
const k = this.layer.getRenderer().getZScale(), O = [], F = [];
|
|
18547
18545
|
return I.setLocalTransform((() => {
|
|
18548
18546
|
const e = this.layer.options.altitude || 0;
|
|
18549
|
-
return n.vec3.copy(F,
|
|
18547
|
+
return n.vec3.copy(F, x), F[2] += 100 * e * k, n.mat4.translate(O, i, F), O;
|
|
18550
18548
|
})), p.generateBuffers(this.regl, {
|
|
18551
18549
|
excludeElementsInVAO: !0
|
|
18552
|
-
}),
|
|
18550
|
+
}), y.instance_color && (P.HAS_INSTANCE_COLOR = 1), y.aTerrainAltitude && (P.HAS_INSTANCE_TERRAIN_ALTITUDE = 1,
|
|
18553
18551
|
I.setUniform("terrainAltitudeScale", 100 * this.layer.getRenderer().getZScale())),
|
|
18554
|
-
P.HAS_LAYER_OPACITY = 1, mt(I.properties,
|
|
18555
|
-
I.properties.nodeIndex =
|
|
18552
|
+
P.HAS_LAYER_OPACITY = 1, mt(I.properties, l.properties), I.properties.aPickingId = v,
|
|
18553
|
+
I.properties.nodeIndex = S, I.properties.pickingIdIndiceMap = b, I.setDefines(P),
|
|
18556
18554
|
I.properties.symbolIndex = {
|
|
18557
18555
|
index: e
|
|
18558
18556
|
}, I;
|
|
18559
18557
|
}));
|
|
18560
|
-
|
|
18558
|
+
S.push(...d);
|
|
18561
18559
|
}
|
|
18562
|
-
return
|
|
18563
|
-
instanceData:
|
|
18560
|
+
return S.insContext = {
|
|
18561
|
+
instanceData: y,
|
|
18564
18562
|
tileTranslationMatrix: i,
|
|
18565
18563
|
tileExtent: r,
|
|
18566
|
-
aPosition:
|
|
18567
|
-
positionSize:
|
|
18568
|
-
},
|
|
18564
|
+
aPosition: u,
|
|
18565
|
+
positionSize: h
|
|
18566
|
+
}, S;
|
|
18567
|
+
}
|
|
18568
|
+
_arrangeAlongLine(e, i) {
|
|
18569
|
+
const {tileExtent: r, z: s} = i.properties, {data: o, positionSize: a} = i;
|
|
18570
|
+
let l = this._calGLTFScale(e);
|
|
18571
|
+
const h = this._getMeterScale();
|
|
18572
|
+
l = n.vec3.scale([], l, h);
|
|
18573
|
+
const c = {
|
|
18574
|
+
gapLength: this.dataConfig.gapLength || 0,
|
|
18575
|
+
direction: this.dataConfig.direction || 0,
|
|
18576
|
+
scaleVertex: !0
|
|
18577
|
+
}, u = this._gltfPack[0][0], {aPosition: f, aAltitude: d, aPickingId: p} = o, g = new t.Coordinate(0, 0, 0), m = new t.Coordinate(0, 0, 0), y = [], x = d ? [] : y, _ = [], v = [], b = [], A = [], T = [], w = this.layer.getTileSize().width / r * this.layer.getRenderer().getTileGLScale(s), S = this.layer.getRenderer().getZScale();
|
|
18578
|
+
for (let e = 0; e < f.length - a; e += a) {
|
|
18579
|
+
d ? n.vec3.set(A, f[e], f[e + 1], d[e / a]) : da.unpackPosition(A, f[e], f[e + 1], f[e + 2]);
|
|
18580
|
+
const [t, i, r] = A;
|
|
18581
|
+
let s = e + a;
|
|
18582
|
+
d ? n.vec3.set(T, f[s], f[s + 1], d[s / a]) : da.unpackPosition(T, f[s], f[s + 1], f[s + 2]);
|
|
18583
|
+
const [o, h, M] = T, P = p[e / a], I = g.set(t * w, i * w, r * S), C = m.set(o * w, h * w, M * S), k = I.distanceTo(C), O = u.arrangeAlongLine(I, C, k, l, 1, c);
|
|
18584
|
+
for (let e = 0; e < O.length; e++) {
|
|
18585
|
+
const n = O[e];
|
|
18586
|
+
g.set(t, i, r), m.set(o, h, M);
|
|
18587
|
+
const s = Ia(g, m, n.t);
|
|
18588
|
+
y.push(s.x, s.y), x.push(s.z), _.push(P), v.push(-n.rotationZ * Math.PI / 180),
|
|
18589
|
+
b.push(n.rotationXY * Math.PI / 180);
|
|
18590
|
+
}
|
|
18591
|
+
}
|
|
18592
|
+
i.data = {
|
|
18593
|
+
aPosition: new f.constructor(y),
|
|
18594
|
+
aPickingId: new p.constructor(_),
|
|
18595
|
+
aZRotation: v,
|
|
18596
|
+
aXYRotation: b
|
|
18597
|
+
}, d && (i.data.aAltitude = new d.constructor(x));
|
|
18598
|
+
}
|
|
18599
|
+
_calGLTFScale(e) {
|
|
18600
|
+
const t = this.getSymbols()[e], i = [ 1, 1, 1 ], r = t.modelHeight;
|
|
18601
|
+
if (r) {
|
|
18602
|
+
this._gltfPack[e][0].calModelHeightScale(i, r);
|
|
18603
|
+
}
|
|
18604
|
+
return n.vec3.set(xa, t.scaleX || 1, t.scaleY || 1, t.scaleZ || 1), n.vec3.multiply(i, i, xa);
|
|
18569
18605
|
}
|
|
18570
18606
|
_getMeshNodeMatrix(e, t, n) {
|
|
18571
18607
|
const i = e, r = this._gltfMeshInfos[i][t];
|
|
@@ -18613,7 +18649,7 @@
|
|
|
18613
18649
|
n && this.setToRedraw(!0), super.prepareRender(e);
|
|
18614
18650
|
}
|
|
18615
18651
|
getShadowMeshes() {
|
|
18616
|
-
if (!this.isVisible()) return
|
|
18652
|
+
if (!this.isVisible()) return Ta;
|
|
18617
18653
|
this.shadowCount = this.scene.getMeshes().length;
|
|
18618
18654
|
return this.scene.getMeshes().filter((e => 0 === e.properties.level));
|
|
18619
18655
|
}
|
|
@@ -18634,25 +18670,25 @@
|
|
|
18634
18670
|
t[0] < y && (y = t[0]), t[0] > v && (v = t[0]), t[1] < x && (x = t[1]), t[1] > b && (b = t[1]),
|
|
18635
18671
|
t[2] < _ && (_ = t[2]), t[2] > A && (A = t[2]);
|
|
18636
18672
|
}
|
|
18637
|
-
const
|
|
18673
|
+
const S = (y + v) / 2, M = (x + b) / 2, P = (_ + A) / 2, I = [], C = this._hasFuncType(), k = [ 0, 0, 1 ], O = [ 0, 0, 0 ];
|
|
18638
18674
|
for (let t = 0; t < d; t++) {
|
|
18639
18675
|
o ? n.vec3.set(w, s[t * h], s[t * h + 1], o[t]) : da.unpackPosition(w, s[t * h], s[t * h + 1], s[t * h + 2]);
|
|
18640
|
-
const i = w[0], r = w[1], d = n.vec3.set(T, i * p -
|
|
18676
|
+
const i = w[0], r = w[1], d = n.vec3.set(T, i * p - S, -r * p - M, (w[2] + m) * g - P), y = a && a[t] || 0, x = l && l[t] || 0;
|
|
18641
18677
|
if (y || x) {
|
|
18642
18678
|
n.mat4.fromRotation(I, x, k);
|
|
18643
|
-
const e = n.vec3.set(pa,
|
|
18679
|
+
const e = n.vec3.set(pa, Math.cos(x), Math.sin(x), 0), t = n.vec3.rotateZ(e, e, O, 90 * Math.PI / 180);
|
|
18644
18680
|
n.mat4.rotate(I, I, y, t);
|
|
18645
|
-
const
|
|
18646
|
-
n.mat4.multiply(I,
|
|
18681
|
+
const i = n.mat4.fromTranslation(Sa, d);
|
|
18682
|
+
n.mat4.multiply(I, i, I);
|
|
18647
18683
|
} else n.mat4.fromTranslation(I, d);
|
|
18648
18684
|
if (C) {
|
|
18649
|
-
const e = this._getSymbolTRSMatrix(
|
|
18685
|
+
const e = this._getSymbolTRSMatrix(Sa, u, c, t);
|
|
18650
18686
|
n.mat4.multiply(I, I, e);
|
|
18651
18687
|
}
|
|
18652
18688
|
f("instance_vectorA", t, I, 0), f("instance_vectorB", t, I, 1), f("instance_vectorC", t, I, 2),
|
|
18653
18689
|
e.aPickingId[t] = c[t];
|
|
18654
18690
|
}
|
|
18655
|
-
return n.vec3.set(T,
|
|
18691
|
+
return n.vec3.set(T, S, M, P), T;
|
|
18656
18692
|
}
|
|
18657
18693
|
_getMeterScale() {
|
|
18658
18694
|
if (!this._meterScale) {
|
|
@@ -18689,11 +18725,11 @@
|
|
|
18689
18725
|
}
|
|
18690
18726
|
_initTRSFuncType() {
|
|
18691
18727
|
const e = this.symbolDef[0];
|
|
18692
|
-
we(e.modelHeight) && (this._modelHeightFn =
|
|
18693
|
-
we(e.translationY) && (this._tyFn =
|
|
18694
|
-
we(e.rotationX) && (this._rxFn =
|
|
18695
|
-
we(e.rotationZ) && (this._rzFn =
|
|
18696
|
-
we(e.scaleY) && (this._syFn =
|
|
18728
|
+
we(e.modelHeight) && (this._modelHeightFn = Se(e.modelHeight)), we(e.translationX) && (this._txFn = Se(e.translationX)),
|
|
18729
|
+
we(e.translationY) && (this._tyFn = Se(e.translationY)), we(e.translationZ) && (this._tzFn = Se(e.translationZ)),
|
|
18730
|
+
we(e.rotationX) && (this._rxFn = Se(e.rotationX)), we(e.rotationY) && (this._ryFn = Se(e.rotationY)),
|
|
18731
|
+
we(e.rotationZ) && (this._rzFn = Se(e.rotationZ)), we(e.scaleX) && (this._sxFn = Se(e.scaleX)),
|
|
18732
|
+
we(e.scaleY) && (this._syFn = Se(e.scaleY)), we(e.scaleZ) && (this._szFn = Se(e.scaleZ));
|
|
18697
18733
|
}
|
|
18698
18734
|
_hasFuncType() {
|
|
18699
18735
|
return !!(this._modelHeightFn && !this._modelHeightFn.isFeatureConstant || this._txFn && !this._txFn.isFeatureConstant || this._tyFn && !this._tyFn.isFeatureConstant || this._tzFn && !this._tzFn.isFeatureConstant || this._rxFn && !this._rxFn.isFeatureConstant || this._ryFn && !this._ryFn.isFeatureConstant || this._rzFn && !this._rzFn.isFeatureConstant || this._sxFn && !this._sxFn.isFeatureConstant || this._syFn && !this._syFn.isFeatureConstant || this._szFn && !this._szFn.isFeatureConstant);
|
|
@@ -18755,27 +18791,34 @@
|
|
|
18755
18791
|
delete this._nodeMatrixMap;
|
|
18756
18792
|
}
|
|
18757
18793
|
_getGLTFMatrix(e, t, i, r) {
|
|
18758
|
-
const s = n.vec3.set(pa, ...t ||
|
|
18794
|
+
const s = n.vec3.set(pa, ...t || va), o = i || ba, a = r || Aa, l = n.quat.fromEuler(_a, o[0], o[1], o[2]);
|
|
18759
18795
|
return n.mat4.fromRotationTranslationScale(e, l, s, a);
|
|
18760
18796
|
}
|
|
18761
18797
|
};
|
|
18762
|
-
|
|
18798
|
+
function Ia(e, t, n) {
|
|
18799
|
+
const i = Ca(e.x, t.x, n), r = Ca(e.y, t.y, n), s = Ca(e.z || 0, t.z || 0, n);
|
|
18800
|
+
return new e.constructor(i, r, s);
|
|
18801
|
+
}
|
|
18802
|
+
function Ca(e, t, n) {
|
|
18803
|
+
return e + n * (t - e);
|
|
18804
|
+
}
|
|
18805
|
+
class ka extends(Pa(ra)){
|
|
18763
18806
|
getMaterialClazz(e) {
|
|
18764
18807
|
return e.diffuseFactor ? n.reshader.PhongSpecularGlossinessMaterial : n.reshader.PhongMaterial;
|
|
18765
18808
|
}
|
|
18766
18809
|
}
|
|
18767
|
-
class
|
|
18810
|
+
class Oa extends(Pa(la)){
|
|
18768
18811
|
getMaterialClazz(e) {
|
|
18769
18812
|
return e.specularGlossinessTexture || e.diffuseTexture ? n.reshader.pbr.StandardSpecularGlossinessMaterial : n.reshader.pbr.StandardMaterial;
|
|
18770
18813
|
}
|
|
18771
18814
|
}
|
|
18772
|
-
const {getPBRUniforms:
|
|
18815
|
+
const {getPBRUniforms: Fa} = n.reshader.pbr.PBRUtils, Ra = {
|
|
18773
18816
|
color: [ 2.0303, 2.028, 2.028 ],
|
|
18774
18817
|
direction: [ 0, -.2717, -1 ]
|
|
18775
|
-
},
|
|
18818
|
+
}, Ea = .3737, Da = {
|
|
18776
18819
|
index: 0
|
|
18777
|
-
},
|
|
18778
|
-
class
|
|
18820
|
+
}, La = [ 0, 0, 0 ], Ha = [ 2, 2 ];
|
|
18821
|
+
class Na extends Fi {
|
|
18779
18822
|
supportRenderMode(e) {
|
|
18780
18823
|
return "fxaa" === e || "fxaaBeforeTaa" === e;
|
|
18781
18824
|
}
|
|
@@ -18790,7 +18833,7 @@
|
|
|
18790
18833
|
}
|
|
18791
18834
|
needToRedraw() {
|
|
18792
18835
|
if (super.needToRedraw()) return !0;
|
|
18793
|
-
return this.getSymbol(
|
|
18836
|
+
return this.getSymbol(Da).animation;
|
|
18794
18837
|
}
|
|
18795
18838
|
createMesh(e, t) {
|
|
18796
18839
|
const {geometry: i} = e;
|
|
@@ -18799,7 +18842,7 @@
|
|
|
18799
18842
|
castShadow: !1,
|
|
18800
18843
|
picking: !0
|
|
18801
18844
|
});
|
|
18802
|
-
return r.properties.symbolIndex =
|
|
18845
|
+
return r.properties.symbolIndex = Da, r.setLocalTransform(t), r;
|
|
18803
18846
|
}
|
|
18804
18847
|
callShader(e, t) {
|
|
18805
18848
|
super.callShader(e, t), this.transformWater();
|
|
@@ -18810,13 +18853,13 @@
|
|
|
18810
18853
|
this._prepareMesh(e, t), super.addMesh(...arguments);
|
|
18811
18854
|
}
|
|
18812
18855
|
_prepareMesh(e) {
|
|
18813
|
-
const t = this.getSymbol(
|
|
18856
|
+
const t = this.getSymbol(Da).ssr;
|
|
18814
18857
|
for (let n = 0; n < e.length; n++) e[n].ssr = t ? 1 : 0;
|
|
18815
18858
|
}
|
|
18816
18859
|
paint(e) {
|
|
18817
18860
|
e.states && e.states.includesChanged && (this.shader.dispose(), this._waterShader.dispose(),
|
|
18818
18861
|
this._createShader(e));
|
|
18819
|
-
const t = !!e.ssr && this.getSymbol(
|
|
18862
|
+
const t = !!e.ssr && this.getSymbol(Da).ssr, n = this._waterShader, i = n.shaderDefines;
|
|
18820
18863
|
if (t) {
|
|
18821
18864
|
const t = mt({}, i, e.ssr.defines);
|
|
18822
18865
|
n.shaderDefines = t;
|
|
@@ -18912,7 +18955,7 @@
|
|
|
18912
18955
|
return n.mat3.fromRotation(i, Math.PI * r / 180);
|
|
18913
18956
|
}
|
|
18914
18957
|
} ], s = {
|
|
18915
|
-
TIME_NOISE_TEXTURE_REPEAT:
|
|
18958
|
+
TIME_NOISE_TEXTURE_REPEAT: Ea
|
|
18916
18959
|
};
|
|
18917
18960
|
this.fillIncludes(s, r, e);
|
|
18918
18961
|
const o = {
|
|
@@ -18995,24 +19038,24 @@
|
|
|
18995
19038
|
};
|
|
18996
19039
|
}
|
|
18997
19040
|
_getWaterUniform(e, t) {
|
|
18998
|
-
const {iblTexes: i, dfgLUT: r} = this.getIBLRes(), s =
|
|
19041
|
+
const {iblTexes: i, dfgLUT: r} = this.getIBLRes(), s = Fa(e, i, r, t && t.ssr, t && t.jitter), o = e.getLightManager();
|
|
18999
19042
|
let a = o && o.getDirectionalLight() || {};
|
|
19000
|
-
const l = o && o.getAmbientLight() || {}, h = this.getSymbol(
|
|
19043
|
+
const l = o && o.getAmbientLight() || {}, h = this.getSymbol(Da), c = this._waterDir = this._waterDir || [], u = this._waveParams = this._waveParams || [];
|
|
19001
19044
|
n.vec4.set(u, .09, h.uvScale || 3, .03, -.5);
|
|
19002
19045
|
mt(s, {
|
|
19003
19046
|
ambientColor: l.color || [ .2, .2, .2 ],
|
|
19004
19047
|
viewMatrix: e.viewMatrix,
|
|
19005
|
-
lightDirection: a.direction ||
|
|
19006
|
-
lightColor: a.color ||
|
|
19048
|
+
lightDirection: a.direction || Ra.direction,
|
|
19049
|
+
lightColor: a.color || Ra.color,
|
|
19007
19050
|
camPos: e.cameraPosition,
|
|
19008
19051
|
timeElapsed: h.animation ? (this.layer.getRenderer().getFrameTimestamp() || 0) / (1 / (h.waterSpeed || 1) * 1e4) : 0,
|
|
19009
19052
|
normalTexture: this._normalTex || this._emptyTex,
|
|
19010
19053
|
heightTexture: this._pertTex || this._emptyTex,
|
|
19011
19054
|
waveParams: u,
|
|
19012
|
-
waterDir:
|
|
19055
|
+
waterDir: za(c, h.waterDirection || 0),
|
|
19013
19056
|
waterBaseColor: h.waterBaseColor || [ .1451, .2588, .4863, 1 ],
|
|
19014
19057
|
contrast: h.contrast || 1,
|
|
19015
|
-
hsv: h.hsv ||
|
|
19058
|
+
hsv: h.hsv || La
|
|
19016
19059
|
});
|
|
19017
19060
|
const f = this.layer.getRenderer();
|
|
19018
19061
|
return s.layerOpacity = f._getLayerOpacity(), this.setIncludeUniformValues(s, t),
|
|
@@ -19035,43 +19078,43 @@
|
|
|
19035
19078
|
transformWater() {
|
|
19036
19079
|
const e = this.getMap(), t = n.GroundPainter.getGroundTransform(this._water.localTransform, e);
|
|
19037
19080
|
this._water.setLocalTransform(t);
|
|
19038
|
-
const i = e._get2DExtentAtRes(e.getGLRes()), r = i.getWidth(), s = i.getHeight(), o = e.cameraLookAt, a = o[0] - r, l = o[1] + s, h = a /
|
|
19081
|
+
const i = e._get2DExtentAtRes(e.getGLRes()), r = i.getWidth(), s = i.getHeight(), o = e.cameraLookAt, a = o[0] - r, l = o[1] + s, h = a / Ha[0], c = l / Ha[1], u = h % 1, f = c % 1, d = h * Ea % 1, p = c * Ea % 1, g = r / Ha[0] * 2, m = s / Ha[1] * 2;
|
|
19039
19082
|
this._water.setUniform("uvOffset", [ u, f ]), this._water.setUniform("noiseUvOffset", [ d, p ]),
|
|
19040
19083
|
this._water.setUniform("uvScale", [ g, -m ]);
|
|
19041
19084
|
}
|
|
19042
19085
|
}
|
|
19043
|
-
function
|
|
19086
|
+
function za(e, t) {
|
|
19044
19087
|
var n;
|
|
19045
19088
|
return n = t, t = Math.PI * n / 180, e[0] = Math.sin(t), e[1] = Math.cos(t), e;
|
|
19046
19089
|
}
|
|
19047
|
-
const
|
|
19048
|
-
Ha.registerAt(en);
|
|
19049
|
-
const Na = zn("line", $i);
|
|
19050
|
-
Na.registerAt(en);
|
|
19051
|
-
const za = zn("line-gradient", ar);
|
|
19052
|
-
za.registerAt(en);
|
|
19053
|
-
const Va = zn("icon", js);
|
|
19090
|
+
const Va = zn("fill", Xi);
|
|
19054
19091
|
Va.registerAt(en);
|
|
19055
|
-
const Ua = zn("
|
|
19092
|
+
const Ua = zn("line", $i);
|
|
19056
19093
|
Ua.registerAt(en);
|
|
19057
|
-
const Ba = zn("
|
|
19094
|
+
const Ba = zn("line-gradient", ar);
|
|
19058
19095
|
Ba.registerAt(en);
|
|
19059
|
-
zn("
|
|
19060
|
-
const Ga = zn("phong", ra);
|
|
19096
|
+
const Ga = zn("icon", js);
|
|
19061
19097
|
Ga.registerAt(en);
|
|
19062
|
-
const ja = zn("
|
|
19098
|
+
const ja = zn("text", Lo);
|
|
19063
19099
|
ja.registerAt(en);
|
|
19064
|
-
const Wa = zn("
|
|
19100
|
+
const Wa = zn("native-line", jo);
|
|
19065
19101
|
Wa.registerAt(en);
|
|
19066
|
-
|
|
19102
|
+
zn("native-point", Uo).registerAt(en);
|
|
19103
|
+
const Xa = zn("phong", ra);
|
|
19067
19104
|
Xa.registerAt(en);
|
|
19068
|
-
const Ya = zn("
|
|
19105
|
+
const Ya = zn("wireframe", oa);
|
|
19069
19106
|
Ya.registerAt(en);
|
|
19070
|
-
const Za = zn("
|
|
19107
|
+
const Za = zn("lit", la);
|
|
19071
19108
|
Za.registerAt(en);
|
|
19072
|
-
const qa = zn("
|
|
19109
|
+
const qa = zn("tube", fa);
|
|
19110
|
+
qa.registerAt(en);
|
|
19111
|
+
const $a = zn("gltf-phong", ka);
|
|
19112
|
+
$a.registerAt(en);
|
|
19113
|
+
const Ja = zn("gltf-lit", Oa);
|
|
19114
|
+
Ja.registerAt(en);
|
|
19115
|
+
const Ka = zn("heatmap", class extends Fi {
|
|
19073
19116
|
createFnTypeConfig(e, t) {
|
|
19074
|
-
const n =
|
|
19117
|
+
const n = Se(t.heatmapWeight), i = new Int16Array(1);
|
|
19075
19118
|
return [ {
|
|
19076
19119
|
attrName: "aWeight",
|
|
19077
19120
|
symbolName: "heatmapWeight",
|
|
@@ -19132,25 +19175,25 @@
|
|
|
19132
19175
|
this._process = new n.HeatmapProcess(this.regl, this.sceneConfig, this.layer, i.heatmapColor, null, t);
|
|
19133
19176
|
}
|
|
19134
19177
|
});
|
|
19135
|
-
|
|
19136
|
-
const
|
|
19137
|
-
|
|
19178
|
+
Ka.registerAt(en);
|
|
19179
|
+
const Qa = zn("water", Na);
|
|
19180
|
+
Qa.registerAt(en), ln.registerPainter("lit", la), ln.registerPainter("icon", js),
|
|
19138
19181
|
ln.registerPainter("fill", Xi), ln.registerPainter("line", $i), ln.registerPainter("line-gradient", ar),
|
|
19139
|
-
ln.registerPainter("water",
|
|
19140
|
-
class
|
|
19182
|
+
ln.registerPainter("water", Na), ln.registerPainter("tube", fa);
|
|
19183
|
+
class el extends en {
|
|
19141
19184
|
getTileUrl(e, t, n) {
|
|
19142
19185
|
const i = this.getMap().getResolution(n);
|
|
19143
19186
|
return super.getTileUrl(e, t, function(e) {
|
|
19144
|
-
return 19 - Math.log(e /
|
|
19187
|
+
return 19 - Math.log(e / tl) / Math.LN2;
|
|
19145
19188
|
}(i));
|
|
19146
19189
|
}
|
|
19147
19190
|
static fromJSON(e) {
|
|
19148
|
-
return e && "MapboxVectorTileLayer" === e.type ? new
|
|
19191
|
+
return e && "MapboxVectorTileLayer" === e.type ? new el(e.id, e.options) : null;
|
|
19149
19192
|
}
|
|
19150
19193
|
}
|
|
19151
|
-
|
|
19152
|
-
const
|
|
19153
|
-
class
|
|
19194
|
+
el.registerJSONType("MapboxVectorTileLayer");
|
|
19195
|
+
const tl = 12756274 * Math.PI / (256 * Math.pow(2, 20));
|
|
19196
|
+
class nl extends en {
|
|
19154
19197
|
constructor(e, t) {
|
|
19155
19198
|
(t = t || {}).spatialReference = null, super(e, t), this.setData(t.data);
|
|
19156
19199
|
}
|
|
@@ -19193,7 +19236,7 @@
|
|
|
19193
19236
|
getWorkerOptions() {
|
|
19194
19237
|
const e = super.getWorkerOptions();
|
|
19195
19238
|
let t = this.options.data;
|
|
19196
|
-
return Re(t) || t && t.url ? (t.url && (t = JSON.parse(JSON.stringify(t))), t =
|
|
19239
|
+
return Re(t) || t && t.url ? (t.url && (t = JSON.parse(JSON.stringify(t))), t = rl(t, this.getURLModifier())) : t = this.features,
|
|
19197
19240
|
e.data = t, e.tileBuffer = this.options.tileBuffer, e.extent = this.options.extent,
|
|
19198
19241
|
e.hasAltitude = this.options.enableAltitude, e.simplifyTolerance = this.options.simplifyTolerance,
|
|
19199
19242
|
e.projection = this.getSpatialReference().getProjection().code, e.generateOMBB = this.options.generateOMBB,
|
|
@@ -19217,7 +19260,7 @@
|
|
|
19217
19260
|
const t = e.getWorkerConnection();
|
|
19218
19261
|
if (t) {
|
|
19219
19262
|
let n = this.options.data;
|
|
19220
|
-
Re(n) || n && n.url ? (n.url && (n = JSON.parse(JSON.stringify(n))), n =
|
|
19263
|
+
Re(n) || n && n.url ? (n.url && (n = JSON.parse(JSON.stringify(n))), n = rl(n, this.getURLModifier())) : n = this.features,
|
|
19221
19264
|
t.setData(n, ((t, n) => {
|
|
19222
19265
|
e.clear(), this.onWorkerReady(null, n), e.setToRedraw(), setTimeout((() => {
|
|
19223
19266
|
e.setToRedraw();
|
|
@@ -19253,7 +19296,7 @@
|
|
|
19253
19296
|
return this._idMaps[e];
|
|
19254
19297
|
}
|
|
19255
19298
|
static fromJSON(e) {
|
|
19256
|
-
return e && "GeoJSONVectorTileLayer" === e.type ? new
|
|
19299
|
+
return e && "GeoJSONVectorTileLayer" === e.type ? new nl(e.id, e.options) : null;
|
|
19257
19300
|
}
|
|
19258
19301
|
getGeometryById(e) {
|
|
19259
19302
|
return this._idMaps ? this._idMaps[e] : null;
|
|
@@ -19283,14 +19326,14 @@
|
|
|
19283
19326
|
}));
|
|
19284
19327
|
}
|
|
19285
19328
|
}
|
|
19286
|
-
function
|
|
19329
|
+
function il(e) {
|
|
19287
19330
|
let t = document.createElement("a");
|
|
19288
19331
|
return t.href = e, e = t.href, t = null, e;
|
|
19289
19332
|
}
|
|
19290
|
-
function
|
|
19291
|
-
return e.url ? e.url = t ? t(e.url) :
|
|
19333
|
+
function rl(e, t) {
|
|
19334
|
+
return e.url ? e.url = t ? t(e.url) : il(e.url) : e = t ? t(e) : il(e), e;
|
|
19292
19335
|
}
|
|
19293
|
-
|
|
19336
|
+
nl.registerJSONType("GeoJSONVectorTileLayer"), nl.mergeOptions({
|
|
19294
19337
|
features: "id",
|
|
19295
19338
|
tileBuffer: 64,
|
|
19296
19339
|
extent: 8192,
|
|
@@ -19299,12 +19342,12 @@
|
|
|
19299
19342
|
tileStackDepth: 0,
|
|
19300
19343
|
generateOMBB: !0
|
|
19301
19344
|
});
|
|
19302
|
-
const {SYMBOLS_NEED_REBUILD_IN_VECTOR:
|
|
19303
|
-
let
|
|
19304
|
-
const
|
|
19305
|
-
let
|
|
19306
|
-
const
|
|
19307
|
-
class
|
|
19345
|
+
const {SYMBOLS_NEED_REBUILD_IN_VECTOR: sl, GlyphRequestor: ol, PointPack: al, LinePack: ll, StyledPoint: hl, VectorPack: cl, StyledVector: ul} = h();
|
|
19346
|
+
let fl = !1, dl = 1;
|
|
19347
|
+
const pl = "_symbol_".trim(), gl = (st + "").trim();
|
|
19348
|
+
let ml = new Float32Array(1);
|
|
19349
|
+
const yl = [];
|
|
19350
|
+
class xl extends r.renderer.CanvasRenderer {
|
|
19308
19351
|
constructor(...e) {
|
|
19309
19352
|
super(...e), this.features = {}, this._geometries = {}, this._counter = 0, this._allFeatures = {},
|
|
19310
19353
|
this._featureMapping = {}, this._markerFeatures = {}, this._textFeatures = {}, this._lineFeatures = {},
|
|
@@ -19324,7 +19367,7 @@
|
|
|
19324
19367
|
return e || (this.painter && this.painter.needToRedraw() || this._markerPainter && this._markerPainter.needToRedraw() || this._linePainter && this._linePainter.needToRedraw());
|
|
19325
19368
|
}
|
|
19326
19369
|
getAnalysisMeshes() {
|
|
19327
|
-
return this.painter && this.painter.getAnalysisMeshes() ||
|
|
19370
|
+
return this.painter && this.painter.getAnalysisMeshes() || yl;
|
|
19328
19371
|
}
|
|
19329
19372
|
getRayCastData() {
|
|
19330
19373
|
return null;
|
|
@@ -19425,12 +19468,12 @@
|
|
|
19425
19468
|
if (!this.features[o]) continue;
|
|
19426
19469
|
const a = this.features[o];
|
|
19427
19470
|
if (Array.isArray(a)) for (let r = 0; r < a.length; r++) {
|
|
19428
|
-
const s = a[r], o = s[
|
|
19471
|
+
const s = a[r], o = s[gl];
|
|
19429
19472
|
(!e || e[o] || t && (!t || t[o])) && (s.visible || (this._showHideUpdated = !0),
|
|
19430
19473
|
this._addCoordsToCenter(s.geometry, i, s.coordinates), n.push(s));
|
|
19431
19474
|
} else {
|
|
19432
19475
|
a.visible || (this._showHideUpdated = !0);
|
|
19433
|
-
const r = a[
|
|
19476
|
+
const r = a[gl];
|
|
19434
19477
|
if (e && !e[r] && (!t || t && !t[r])) continue;
|
|
19435
19478
|
this._addCoordsToCenter(a.geometry, i, a.coordinates), n.push(a);
|
|
19436
19479
|
}
|
|
@@ -19487,8 +19530,8 @@
|
|
|
19487
19530
|
_addCoord(e, t, n, i, r, s) {
|
|
19488
19531
|
const o = this.getMap().getProjection().isSphere();
|
|
19489
19532
|
let a = !1;
|
|
19490
|
-
(s[0] > 180 || s[0] < -180) && (a = !0, o && !
|
|
19491
|
-
(s[1] > 90 || s[1] < -90) && (a = !0, o && !
|
|
19533
|
+
(s[0] > 180 || s[0] < -180) && (a = !0, o && !fl && (fl = !0, console.warn(`Layer(${this.layer.getId()}) has invalid longitude value: ${s[0]}`))),
|
|
19534
|
+
(s[1] > 90 || s[1] < -90) && (a = !0, o && !fl && (fl = !0, console.warn(`Layer(${this.layer.getId()}) has invalid latitude value: ${s[1]}`))),
|
|
19492
19535
|
a || (e[0] += t, e[1] += n, e[2] += i || 0, e[3] += r);
|
|
19493
19536
|
}
|
|
19494
19537
|
_fillCommonProps(e) {
|
|
@@ -19497,7 +19540,7 @@
|
|
|
19497
19540
|
n.aPickingId = e.data.aPickingId;
|
|
19498
19541
|
}
|
|
19499
19542
|
_isEnableWorkAround(e) {
|
|
19500
|
-
return "win-intel-gpu-crash" === e && (this.layer.options.workarounds["win-intel-gpu-crash"] &&
|
|
19543
|
+
return "win-intel-gpu-crash" === e && (this.layer.options.workarounds["win-intel-gpu-crash"] && vl(this.gl));
|
|
19501
19544
|
}
|
|
19502
19545
|
prepareRequestors() {
|
|
19503
19546
|
if (this._iconRequestor) return;
|
|
@@ -19510,7 +19553,7 @@
|
|
|
19510
19553
|
}
|
|
19511
19554
|
});
|
|
19512
19555
|
const t = !this._isEnableWorkAround("win-intel-gpu-crash");
|
|
19513
|
-
this._glyphRequestor = new
|
|
19556
|
+
this._glyphRequestor = new ol((t => {
|
|
19514
19557
|
e.getMap().getRenderer().callInNextFrame(t);
|
|
19515
19558
|
}), e.options.glyphSdfLimitPerFrame, t), this.requestor = this._fetchPattern.bind(this),
|
|
19516
19559
|
this._markerRequestor = this._fetchIconGlyphs.bind(this);
|
|
@@ -19543,7 +19586,7 @@
|
|
|
19543
19586
|
delete this._markerMeshes));
|
|
19544
19587
|
const {features: r, center: s} = this._getFeaturesToRender(this._markerFeatures, this._textFeatures), o = [], a = [];
|
|
19545
19588
|
for (let e = 0; e < r.length; e++) {
|
|
19546
|
-
const t = r[e][
|
|
19589
|
+
const t = r[e][gl];
|
|
19547
19590
|
this._markerFeatures[t] && o.push(r[e]), this._textFeatures[t] && a.push(r[e]);
|
|
19548
19591
|
}
|
|
19549
19592
|
if (!o.length && !a.length) return void (this._markerMeshes && (this._markerPainter.deleteMesh(this._markerMeshes),
|
|
@@ -19565,7 +19608,7 @@
|
|
|
19565
19608
|
n.mat4.translate(o, o, n.vec3.set(u, s[0], s[1], 0)), n.mat4.scale(o, o, n.vec3.set(c, 1, 1, this._zScale));
|
|
19566
19609
|
const a = this._markerPainter.createMeshes(t, o);
|
|
19567
19610
|
for (let e = 0; e < a.length; e++) a[e].geometry.properties.originElements = a[e].geometry.properties.elements.slice(),
|
|
19568
|
-
a[e].properties.level = 0, a[e].material.set("flipY", 1), a[e].properties.meshKey =
|
|
19611
|
+
a[e].properties.level = 0, a[e].material.set("flipY", 1), a[e].properties.meshKey = dl++;
|
|
19569
19612
|
this._markerMeshes = a, l && (this._showHideUpdated = !0), this._isCreatingMarkerMesh = !1,
|
|
19570
19613
|
this.setToRedraw(), this.layer.fire("buildmarkermesh");
|
|
19571
19614
|
}));
|
|
@@ -19601,7 +19644,7 @@
|
|
|
19601
19644
|
markerHeightType: Uint16Array,
|
|
19602
19645
|
allowEmptyPack: 1
|
|
19603
19646
|
};
|
|
19604
|
-
return [ this._markerSymbol ].map(((n, i) => new
|
|
19647
|
+
return [ this._markerSymbol ].map(((n, i) => new al(0 === i ? e : t, n, r).load()));
|
|
19605
19648
|
}
|
|
19606
19649
|
updateMesh() {}
|
|
19607
19650
|
_updateMarkerMesh(e) {
|
|
@@ -19615,15 +19658,15 @@
|
|
|
19615
19658
|
const s = [], o = [], a = [], l = this.getMap().getZoom();
|
|
19616
19659
|
let h, c;
|
|
19617
19660
|
h = Array.isArray(t) ? t.map((e => e ? Pe(e, (() => (s[0] = l, s))) : e)) : Pe(t, (() => (s[0] = l,
|
|
19618
|
-
s))), c = Array.isArray(t) ? t.map((e => e ?
|
|
19661
|
+
s))), c = Array.isArray(t) ? t.map((e => e ? cl.genFnTypes(e) : e)) : cl.genFnTypes(t);
|
|
19619
19662
|
for (let e = 0; e < r.length; e++) {
|
|
19620
19663
|
if (!r[e]) continue;
|
|
19621
|
-
const i = Array.isArray(t) ? t[e] : t, s = Array.isArray(h) ? h[e] : h, o = Array.isArray(c) ? c[e] : c, a = new
|
|
19622
|
-
if (!this._markerAtlas || !
|
|
19664
|
+
const i = Array.isArray(t) ? t[e] : t, s = Array.isArray(h) ? h[e] : h, o = Array.isArray(c) ? c[e] : c, a = new hl(r, i, s, o, n).getIconAndGlyph();
|
|
19665
|
+
if (!this._markerAtlas || !al.isAtlasLoaded(a, this._markerAtlas)) return this._markRebuild(),
|
|
19623
19666
|
this.setToRedraw(), !1;
|
|
19624
19667
|
}
|
|
19625
19668
|
for (let e = 0; e < r.length; e++) {
|
|
19626
|
-
const t = r[e][
|
|
19669
|
+
const t = r[e][gl];
|
|
19627
19670
|
this._markerFeatures[t] && o.push(r[e]), this._textFeatures[t] && a.push(r[e]);
|
|
19628
19671
|
}
|
|
19629
19672
|
const u = r[0].id, f = this._createPointPacks(o, a, this._markerAtlas, this._markerCenter), d = this._markerMeshes;
|
|
@@ -19645,7 +19688,7 @@
|
|
|
19645
19688
|
})), !0;
|
|
19646
19689
|
}
|
|
19647
19690
|
_updateLineMesh(e) {
|
|
19648
|
-
return this._updateMesh(e, this._lineMeshes, this._lineAtlas, this._lineCenter, this._linePainter,
|
|
19691
|
+
return this._updateMesh(e, this._lineMeshes, this._lineAtlas, this._lineCenter, this._linePainter, ll, Qi, this._groupLineFeas);
|
|
19649
19692
|
}
|
|
19650
19693
|
_updateMesh(e, t, n, i, r, s, o, a) {
|
|
19651
19694
|
if (!t) return !1;
|
|
@@ -19659,8 +19702,8 @@
|
|
|
19659
19702
|
for (let e = 0; e < u.length; e++) {
|
|
19660
19703
|
const t = u[e];
|
|
19661
19704
|
if (!t) continue;
|
|
19662
|
-
const i = Array.isArray(l) ? l[e] : l, r =
|
|
19663
|
-
if (!
|
|
19705
|
+
const i = Array.isArray(l) ? l[e] : l, r = cl.genFnTypes(i), o = new ul(u, i, r, h), a = s === ll ? o.getLineResource() : o.getPolygonResource();
|
|
19706
|
+
if (!cl.isAtlasLoaded(a, n[e])) return this._markRebuild(), this.setToRedraw(),
|
|
19664
19707
|
!1;
|
|
19665
19708
|
f.push(t);
|
|
19666
19709
|
}
|
|
@@ -19698,7 +19741,7 @@
|
|
|
19698
19741
|
let n = r + 1;
|
|
19699
19742
|
for (;i[n] === t; ) n++;
|
|
19700
19743
|
const s = n - r, o = e.geometry.desc.positionSize;
|
|
19701
|
-
|
|
19744
|
+
ml.length !== 3 * s && (ml = new Float32Array(s * o), ml.fill(-1 / 0, 0)), e.geometry.updateSubData(e.geometry.desc.positionAttribute, ml, r * o);
|
|
19702
19745
|
}
|
|
19703
19746
|
this.layer.fire("updatemesh"), this.setToRedraw();
|
|
19704
19747
|
}
|
|
@@ -19710,7 +19753,7 @@
|
|
|
19710
19753
|
if (!t.length) return;
|
|
19711
19754
|
const i = this._showHideUpdated;
|
|
19712
19755
|
this._lineCenter = n;
|
|
19713
|
-
const r = this._groupLineFeas(t), s = Fe({}, Qi), o = r.map(((t, i) => this.createMesh(this._linePainter,
|
|
19756
|
+
const r = this._groupLineFeas(t), s = Fe({}, Qi), o = r.map(((t, i) => this.createMesh(this._linePainter, ll, s, t, e && e[i], n)));
|
|
19714
19757
|
this._isCreatingLineMesh = !0, Promise.all(o).then((e => {
|
|
19715
19758
|
this._lineMeshes && this._linePainter.deleteMesh(this._lineMeshes);
|
|
19716
19759
|
const t = [], n = [];
|
|
@@ -19729,10 +19772,10 @@
|
|
|
19729
19772
|
}));
|
|
19730
19773
|
}
|
|
19731
19774
|
_groupLineFeas(e) {
|
|
19732
|
-
const t = (
|
|
19775
|
+
const t = (pl + "lineDasharray").trim(), n = (pl + "linePatternFile").trim(), i = [], r = [], s = [];
|
|
19733
19776
|
for (let o = 0; o < e.length; o++) {
|
|
19734
19777
|
const a = e[o], l = a.properties && a.properties[t];
|
|
19735
|
-
l &&
|
|
19778
|
+
l && Ml(l) ? s.push(a) : a.properties && a.properties[n] ? r.push(a) : i.push(a);
|
|
19736
19779
|
}
|
|
19737
19780
|
return [ i, r, s ];
|
|
19738
19781
|
}
|
|
@@ -19766,23 +19809,23 @@
|
|
|
19766
19809
|
if (!e) return;
|
|
19767
19810
|
const n = Array.isArray(e) ? e[0].id : e.id;
|
|
19768
19811
|
if (this._featureMapping[n] = e, Array.isArray(e)) for (let n = 0; n < e.length; n++) {
|
|
19769
|
-
const i = e[n][
|
|
19812
|
+
const i = e[n][gl];
|
|
19770
19813
|
if (e[n][ir] = t, this._allFeatures[i] = {
|
|
19771
19814
|
feature: e[n]
|
|
19772
19815
|
}, this._allFeatures[i][ir] = t, !this.needCheckPointLineSymbols()) continue;
|
|
19773
19816
|
const r = {
|
|
19774
19817
|
feature: e[n]
|
|
19775
19818
|
};
|
|
19776
|
-
(
|
|
19777
|
-
|
|
19819
|
+
(bl(e[n]) || Al(e[n])) && (this._markerFeatures[i] = r), Al(e[n]) && (this._textFeatures[i] = r),
|
|
19820
|
+
Sl(e[n]) && (this._lineFeatures[i] = r);
|
|
19778
19821
|
} else {
|
|
19779
19822
|
e[ir] = t;
|
|
19780
19823
|
const n = {
|
|
19781
19824
|
feature: e
|
|
19782
|
-
}, i = e[
|
|
19825
|
+
}, i = e[gl];
|
|
19783
19826
|
if (this._allFeatures[i] = n, !this.needCheckPointLineSymbols()) return;
|
|
19784
|
-
(
|
|
19785
|
-
|
|
19827
|
+
(bl(e) || Al(e)) && (this._markerFeatures[i] = n), Al(e) && (this._textFeatures[i] = n),
|
|
19828
|
+
Sl(e) && (this._lineFeatures[i] = n);
|
|
19786
19829
|
}
|
|
19787
19830
|
}
|
|
19788
19831
|
needCheckPointLineSymbols() {
|
|
@@ -19791,11 +19834,11 @@
|
|
|
19791
19834
|
_removeFeatures(e) {
|
|
19792
19835
|
const t = this.features[e];
|
|
19793
19836
|
if (t) if (Array.isArray(t)) for (let e = 0; e < t.length; e++) {
|
|
19794
|
-
const n = t[e][
|
|
19837
|
+
const n = t[e][gl], i = t[e].id;
|
|
19795
19838
|
delete this._featureMapping[i], delete this._allFeatures[n], delete this._markerFeatures[n],
|
|
19796
19839
|
delete this._textFeatures[n], delete this._lineFeatures[n];
|
|
19797
19840
|
} else {
|
|
19798
|
-
const e = t[
|
|
19841
|
+
const e = t[gl], n = t.id;
|
|
19799
19842
|
delete this._featureMapping[n], delete this._allFeatures[e], delete this._markerFeatures[e],
|
|
19800
19843
|
delete this._textFeatures[e], delete this._lineFeatures[e];
|
|
19801
19844
|
}
|
|
@@ -19815,7 +19858,7 @@
|
|
|
19815
19858
|
}
|
|
19816
19859
|
_getFeaKeyId(e) {
|
|
19817
19860
|
const t = e[ir], n = this.features[t];
|
|
19818
|
-
return Array.isArray(n) ? n[0][
|
|
19861
|
+
return Array.isArray(n) ? n[0][gl] : n[gl];
|
|
19819
19862
|
}
|
|
19820
19863
|
_updateDirtyTargets() {
|
|
19821
19864
|
let e = !1;
|
|
@@ -19834,14 +19877,14 @@
|
|
|
19834
19877
|
e = e || t;
|
|
19835
19878
|
}
|
|
19836
19879
|
}
|
|
19837
|
-
this._dirtyTargetsInCurrentFrame = {}, e && (
|
|
19880
|
+
this._dirtyTargetsInCurrentFrame = {}, e && (_l(this), this.layer.fire("partialupdate"));
|
|
19838
19881
|
}
|
|
19839
19882
|
_convertAndRebuild(e) {
|
|
19840
|
-
this._convertGeo(e), this._markRebuild(),
|
|
19883
|
+
this._convertGeo(e), this._markRebuild(), _l(this);
|
|
19841
19884
|
}
|
|
19842
19885
|
onGeometryAdd(e) {
|
|
19843
19886
|
this.setToRedraw(), this.canvas && e && e.length && (this._convertGeometries(e),
|
|
19844
|
-
this._markRebuild(),
|
|
19887
|
+
this._markRebuild(), _l(this));
|
|
19845
19888
|
}
|
|
19846
19889
|
onGeometryRemove(e) {
|
|
19847
19890
|
if (e && e.length) {
|
|
@@ -19849,7 +19892,7 @@
|
|
|
19849
19892
|
const n = e[t][ir];
|
|
19850
19893
|
void 0 !== n && (delete this._geometries[n], this._removeFeatures(n), delete this.features[n]);
|
|
19851
19894
|
}
|
|
19852
|
-
this._markRebuild(),
|
|
19895
|
+
this._markRebuild(), _l(this);
|
|
19853
19896
|
}
|
|
19854
19897
|
}
|
|
19855
19898
|
onGeometrySymbolChange(e) {
|
|
@@ -19865,26 +19908,26 @@
|
|
|
19865
19908
|
for (const t in i) i[t] && Fe(e, i[t]);
|
|
19866
19909
|
i = e;
|
|
19867
19910
|
}
|
|
19868
|
-
for (const e in i) if (Ve(i, e) &&
|
|
19911
|
+
for (const e in i) if (Ve(i, e) && sl[e]) return void this._convertAndRebuild(t);
|
|
19869
19912
|
const r = t._getInternalSymbol(), s = this.features[n];
|
|
19870
19913
|
if (this._convertGeo(t), s) if (function(e, t) {
|
|
19871
19914
|
return Array.isArray(e) ? !!Array.isArray(t) && e.length === t.length : !Array.isArray(t);
|
|
19872
19915
|
}(r, s)) {
|
|
19873
19916
|
if (Array.isArray(r)) for (let e = 0; e < r.length; e++) {
|
|
19874
|
-
if (!
|
|
19875
|
-
} else if (!
|
|
19917
|
+
if (!Pl(r[e], s[e])) return void this._convertAndRebuild(t);
|
|
19918
|
+
} else if (!Pl(r, s)) return void this._convertAndRebuild(t);
|
|
19876
19919
|
this.onGeometryPositionChange(e);
|
|
19877
19920
|
} else this._convertAndRebuild(t); else this._convertAndRebuild(t);
|
|
19878
19921
|
}
|
|
19879
19922
|
onGeometryShapeChange(e) {
|
|
19880
19923
|
const t = e.target._getParent() || e.target;
|
|
19881
19924
|
void 0 !== t[ir] && (this._convertGeometries([ t ]), this._markRebuildGeometry(),
|
|
19882
|
-
|
|
19925
|
+
_l(this));
|
|
19883
19926
|
}
|
|
19884
19927
|
onGeometryPositionChange(e) {
|
|
19885
19928
|
const t = e.target._getParent() || e.target, n = t[ir];
|
|
19886
19929
|
void 0 !== n && (this._convertGeometries([ t ]), this._dirtyTargetsInCurrentFrame[n] = t,
|
|
19887
|
-
|
|
19930
|
+
_l(this));
|
|
19888
19931
|
}
|
|
19889
19932
|
onGeometryZIndexChange(e) {
|
|
19890
19933
|
void 0 !== (e.target._getParent() || e.target)[ir] && this._markRebuild();
|
|
@@ -19906,7 +19949,7 @@
|
|
|
19906
19949
|
if (e === i.visible) return;
|
|
19907
19950
|
i.visible = e;
|
|
19908
19951
|
}
|
|
19909
|
-
this._markShowHide(),
|
|
19952
|
+
this._markShowHide(), _l(this);
|
|
19910
19953
|
}
|
|
19911
19954
|
}
|
|
19912
19955
|
_markShowHide() {
|
|
@@ -19916,7 +19959,7 @@
|
|
|
19916
19959
|
const t = e.target._getParent() || e.target, n = t[ir];
|
|
19917
19960
|
void 0 !== n && this.painter && (this.features[n] = sr(t, this._kidGen), this._refreshFeatures(this.features[n], n),
|
|
19918
19961
|
this._markerMeshes && this._markerMeshes.length && this._markerPainter.needRebuildOnGometryPropertiesChanged() || this._lineMeshes && this._lineMeshes.length && this._linePainter.needRebuildOnGometryPropertiesChanged() || this.meshes && this.meshes.length && this.painter.needRebuildOnGometryPropertiesChanged() ? this._markRebuild() : this.painter.onFeatureChange(this.features[n], this.meshes),
|
|
19919
|
-
|
|
19962
|
+
_l(this));
|
|
19920
19963
|
}
|
|
19921
19964
|
createContext() {
|
|
19922
19965
|
const e = this.canvas.gl && this.canvas.gl.wrap;
|
|
@@ -20024,7 +20067,7 @@
|
|
|
20024
20067
|
delete this._outlineAll, delete this._outlineFeatures, this.setToRedraw();
|
|
20025
20068
|
}
|
|
20026
20069
|
isEnableWorkAround(e) {
|
|
20027
|
-
return "win-intel-gpu-crash" === e && (this.layer.options.workarounds["win-intel-gpu-crash"] &&
|
|
20070
|
+
return "win-intel-gpu-crash" === e && (this.layer.options.workarounds["win-intel-gpu-crash"] && vl(this.gl));
|
|
20028
20071
|
}
|
|
20029
20072
|
_getCentiMeterScale(e) {
|
|
20030
20073
|
return Ue(e, this.getMap());
|
|
@@ -20038,10 +20081,10 @@
|
|
|
20038
20081
|
return this._isInGroupGLLayer() ? He(e) ? 1 : e : 1;
|
|
20039
20082
|
}
|
|
20040
20083
|
}
|
|
20041
|
-
function
|
|
20084
|
+
function _l(e) {
|
|
20042
20085
|
e.setToRedraw();
|
|
20043
20086
|
}
|
|
20044
|
-
function
|
|
20087
|
+
function vl(e) {
|
|
20045
20088
|
const t = e.getExtension("WEBGL_debug_renderer_info");
|
|
20046
20089
|
if (t && "undefined" != typeof navigator) {
|
|
20047
20090
|
const n = e.getParameter(t.UNMASKED_RENDERER_WEBGL), i = "Win32" === navigator.platform || "Win64" === navigator.platform;
|
|
@@ -20049,32 +20092,32 @@
|
|
|
20049
20092
|
}
|
|
20050
20093
|
return !1;
|
|
20051
20094
|
}
|
|
20052
|
-
function
|
|
20053
|
-
const t = (
|
|
20095
|
+
function bl({properties: e}) {
|
|
20096
|
+
const t = (pl + "markerFile").trim(), n = (pl + "markerType").trim();
|
|
20054
20097
|
return e[t] || e[n];
|
|
20055
20098
|
}
|
|
20056
|
-
function
|
|
20057
|
-
return e[(
|
|
20099
|
+
function Al({properties: e}) {
|
|
20100
|
+
return e[(pl + "textName").trim()];
|
|
20058
20101
|
}
|
|
20059
|
-
const
|
|
20060
|
-
function
|
|
20061
|
-
return 2 === e.type && !e.properties[
|
|
20102
|
+
const Tl = (pl + "lineWidth").trim(), wl = (er + "").trim();
|
|
20103
|
+
function Sl(e) {
|
|
20104
|
+
return 2 === e.type && !e.properties[wl] || 3 === e.type && void 0 !== e.properties[Tl];
|
|
20062
20105
|
}
|
|
20063
|
-
function
|
|
20106
|
+
function Ml(e) {
|
|
20064
20107
|
if (!Array.isArray(e)) return 0;
|
|
20065
20108
|
let t = 0;
|
|
20066
20109
|
for (let n = 0; n < e.length; n++) t += e[n];
|
|
20067
20110
|
return t;
|
|
20068
20111
|
}
|
|
20069
|
-
function
|
|
20070
|
-
if (Object.keys(e).sort().join() !== Object.keys(t.properties || {}).filter((e => 0 === e.indexOf(
|
|
20112
|
+
function Pl(e, t) {
|
|
20113
|
+
if (Object.keys(e).sort().join() !== Object.keys(t.properties || {}).filter((e => 0 === e.indexOf(pl))).map((e => e.substring(pl.length))).sort().join()) return !1;
|
|
20071
20114
|
for (const n in e) if (Ve(e, n)) {
|
|
20072
|
-
const i = (
|
|
20115
|
+
const i = (pl + n).trim();
|
|
20073
20116
|
if (we(e[n]) !== we(t.properties[i])) return !1;
|
|
20074
20117
|
}
|
|
20075
20118
|
return !0;
|
|
20076
20119
|
}
|
|
20077
|
-
function
|
|
20120
|
+
function Il(e, t, n) {
|
|
20078
20121
|
if (!e || e.type !== t) return null;
|
|
20079
20122
|
const i = new n(e.id, e.options), s = e.geometries, o = [];
|
|
20080
20123
|
for (let e = 0; e < s.length; e++) {
|
|
@@ -20083,9 +20126,9 @@
|
|
|
20083
20126
|
}
|
|
20084
20127
|
return i.addGeometry(o), i;
|
|
20085
20128
|
}
|
|
20086
|
-
class
|
|
20129
|
+
class Cl extends ln {
|
|
20087
20130
|
static fromJSON(e) {
|
|
20088
|
-
return
|
|
20131
|
+
return Il(e, "PointLayer", Cl);
|
|
20089
20132
|
}
|
|
20090
20133
|
constructor(...e) {
|
|
20091
20134
|
super(...e), this.options.sceneConfig || (this.options.sceneConfig = Fe({}, Ke));
|
|
@@ -20097,7 +20140,7 @@
|
|
|
20097
20140
|
return 0;
|
|
20098
20141
|
}
|
|
20099
20142
|
}
|
|
20100
|
-
|
|
20143
|
+
Cl.mergeOptions({
|
|
20101
20144
|
glyphSdfLimitPerFrame: 15,
|
|
20102
20145
|
iconErrorUrl: null,
|
|
20103
20146
|
workarounds: {
|
|
@@ -20105,8 +20148,8 @@
|
|
|
20105
20148
|
},
|
|
20106
20149
|
collision: !1,
|
|
20107
20150
|
collisionFrameLimit: 1
|
|
20108
|
-
}),
|
|
20109
|
-
|
|
20151
|
+
}), Cl.registerJSONType("PointLayer"), Cl.registerRenderer("canvas", null);
|
|
20152
|
+
Cl.registerRenderer("gl", class extends xl {
|
|
20110
20153
|
constructor(...e) {
|
|
20111
20154
|
super(...e), this.GeometryTypes = [ r.Marker, r.MultiPoint ];
|
|
20112
20155
|
}
|
|
@@ -20116,24 +20159,24 @@
|
|
|
20116
20159
|
})) : e.options.maxMarkerWidth = e.options.maxMarkerHeight = 255, super.onGeometryAdd(e));
|
|
20117
20160
|
}
|
|
20118
20161
|
});
|
|
20119
|
-
const {LinePack:
|
|
20120
|
-
class
|
|
20162
|
+
const {LinePack: kl} = h();
|
|
20163
|
+
class Ol extends ln {
|
|
20121
20164
|
static fromJSON(e) {
|
|
20122
|
-
return
|
|
20165
|
+
return Il(e, "LineStringLayer", Ol);
|
|
20123
20166
|
}
|
|
20124
20167
|
}
|
|
20125
|
-
|
|
20168
|
+
Ol.mergeOptions({
|
|
20126
20169
|
meshRenderOrder: 1
|
|
20127
|
-
}),
|
|
20128
|
-
const
|
|
20129
|
-
|
|
20170
|
+
}), Ol.registerJSONType("LineStringLayer");
|
|
20171
|
+
const Fl = (er + "").trim();
|
|
20172
|
+
Ol.registerRenderer("gl", class extends xl {
|
|
20130
20173
|
constructor(...e) {
|
|
20131
20174
|
super(...e), this.GeometryTypes = [ r.LineString, r.MultiLineString ];
|
|
20132
20175
|
}
|
|
20133
20176
|
createPainter() {
|
|
20134
20177
|
const e = ln.get3DPainterClass("line-gradient");
|
|
20135
20178
|
this.painterSymbol = Fe({}, {
|
|
20136
|
-
lineGradientProperty:
|
|
20179
|
+
lineGradientProperty: Fl
|
|
20137
20180
|
}, Qi), this._defineSymbolBloom(this.painterSymbol, e.getBloomSymbol());
|
|
20138
20181
|
const t = Fe({}, this.layer.options.sceneConfig || {});
|
|
20139
20182
|
void 0 === t.depthMask && (t.depthMask = !0);
|
|
@@ -20141,10 +20184,10 @@
|
|
|
20141
20184
|
}
|
|
20142
20185
|
buildMesh() {
|
|
20143
20186
|
let {features: e, center: t} = this._getFeaturesToRender();
|
|
20144
|
-
if (e = e.filter((e => !!e.properties[
|
|
20187
|
+
if (e = e.filter((e => !!e.properties[Fl])), !e.length) return;
|
|
20145
20188
|
const n = this._showHideUpdated;
|
|
20146
20189
|
this._meshCenter = t;
|
|
20147
|
-
const i = Fe({}, this.painterSymbol), r = this.createMesh(this.painter,
|
|
20190
|
+
const i = Fe({}, this.painterSymbol), r = this.createMesh(this.painter, kl, i, e, null, t);
|
|
20148
20191
|
this._isCreatingMesh = !0, r.then((e => {
|
|
20149
20192
|
this.meshes && this.painter.deleteMesh(this.meshes);
|
|
20150
20193
|
const t = [], i = e && e.meshes;
|
|
@@ -20155,15 +20198,15 @@
|
|
|
20155
20198
|
this.meshes = t, n && (this._showHideUpdated = n), this._isCreatingMesh = !1, this.setToRedraw();
|
|
20156
20199
|
}));
|
|
20157
20200
|
}
|
|
20158
|
-
}),
|
|
20159
|
-
const {PolygonPack:
|
|
20160
|
-
class
|
|
20201
|
+
}), Ol.registerRenderer("canvas", null);
|
|
20202
|
+
const {PolygonPack: Rl} = h();
|
|
20203
|
+
class El extends ln {
|
|
20161
20204
|
static fromJSON(e) {
|
|
20162
|
-
return
|
|
20205
|
+
return Il(e, "PolygonLayer", El);
|
|
20163
20206
|
}
|
|
20164
20207
|
}
|
|
20165
|
-
|
|
20166
|
-
const
|
|
20208
|
+
El.registerJSONType("PolygonLayer");
|
|
20209
|
+
const Dl = {
|
|
20167
20210
|
polygonFill: {
|
|
20168
20211
|
type: "identity",
|
|
20169
20212
|
default: [ 1, 1, 1, 1 ],
|
|
@@ -20215,7 +20258,7 @@
|
|
|
20215
20258
|
property: "_symbol_polygonPatternUV"
|
|
20216
20259
|
}
|
|
20217
20260
|
};
|
|
20218
|
-
class
|
|
20261
|
+
class Ll extends xl {
|
|
20219
20262
|
constructor() {
|
|
20220
20263
|
super(...arguments), this.GeometryTypes = [ r.Polygon, r.MultiPolygon ];
|
|
20221
20264
|
}
|
|
@@ -20227,7 +20270,7 @@
|
|
|
20227
20270
|
if (!t.length) return;
|
|
20228
20271
|
const i = this._showHideUpdated;
|
|
20229
20272
|
this._meshCenter = n;
|
|
20230
|
-
const r = this._groupPolygonFeatures(t), s = Fe({},
|
|
20273
|
+
const r = this._groupPolygonFeatures(t), s = Fe({}, Dl), o = r.map(((t, i) => this.createMesh(this.painter, Rl, s, t, e && e[i], n)));
|
|
20231
20274
|
this._isCreatingMesh = !0, Promise.all(o).then((e => {
|
|
20232
20275
|
this.meshes && this.painter.deleteMesh(this.meshes), e = function(e) {
|
|
20233
20276
|
const t = [];
|
|
@@ -20263,15 +20306,15 @@
|
|
|
20263
20306
|
return [ t, n ];
|
|
20264
20307
|
}
|
|
20265
20308
|
createPainter() {
|
|
20266
|
-
const e = ln.get3DPainterClass("fill"), t = this.painterSymbol = Fe({},
|
|
20309
|
+
const e = ln.get3DPainterClass("fill"), t = this.painterSymbol = Fe({}, Dl);
|
|
20267
20310
|
this._defineSymbolBloom(t, e.getBloomSymbol());
|
|
20268
20311
|
return new e(this.regl, this.layer, t, this.layer.options.sceneConfig, 0);
|
|
20269
20312
|
}
|
|
20270
20313
|
updateMesh(e) {
|
|
20271
|
-
return this._updateMesh(e, this.meshes, this.atlas, this._meshCenter, this.painter,
|
|
20314
|
+
return this._updateMesh(e, this.meshes, this.atlas, this._meshCenter, this.painter, Rl, Dl, this._groupPolygonFeatures);
|
|
20272
20315
|
}
|
|
20273
20316
|
}
|
|
20274
|
-
function
|
|
20317
|
+
function Hl(e, t, n, i, r, s, o) {
|
|
20275
20318
|
const a = n && Array.isArray(n[0]);
|
|
20276
20319
|
for (let s = 0, l = n.length; s < l; s++) {
|
|
20277
20320
|
e[t] = (a ? n[s][0] : n[s].x) * i, e[t + 1] = (a ? n[s][1] : n[s].y) * i, o !== Float32Array && (e[t] = Math.round(e[t]),
|
|
@@ -20281,29 +20324,29 @@
|
|
|
20281
20324
|
}
|
|
20282
20325
|
return e.trySetLength && e.trySetLength(t), t;
|
|
20283
20326
|
}
|
|
20284
|
-
function
|
|
20327
|
+
function Nl(e, t, n, i) {
|
|
20285
20328
|
const r = e[3 * t], s = e[3 * t + 1], o = e[3 * n], a = e[3 * n + 1];
|
|
20286
20329
|
return r === o && (r < 0 || r > i) || s === a && (s < 0 || s > i);
|
|
20287
20330
|
}
|
|
20288
|
-
|
|
20289
|
-
var
|
|
20290
|
-
function
|
|
20331
|
+
El.registerRenderer("gl", Ll), El.registerRenderer("canvas", null);
|
|
20332
|
+
var zl = "undefined" != typeof Float32Array ? Float32Array : Array;
|
|
20333
|
+
function Vl(e, t, n, i) {
|
|
20291
20334
|
return e[0] = t, e[1] = n, e[2] = i, e;
|
|
20292
20335
|
}
|
|
20293
|
-
function
|
|
20336
|
+
function Ul(e, t) {
|
|
20294
20337
|
return e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e;
|
|
20295
20338
|
}
|
|
20296
|
-
function
|
|
20339
|
+
function Bl(e, t, n, i, r) {
|
|
20297
20340
|
return e[0] = t, e[1] = n, e[2] = i, e[3] = r, e;
|
|
20298
20341
|
}
|
|
20299
|
-
function
|
|
20342
|
+
function Gl(e, t, n) {
|
|
20300
20343
|
return e[0] = t[0] / n[0], e[1] = t[1] / n[1], e[2] = t[2] / n[2], e[3] = t[3] / n[3],
|
|
20301
20344
|
e;
|
|
20302
20345
|
}
|
|
20303
|
-
function
|
|
20346
|
+
function jl(e, t, n) {
|
|
20304
20347
|
return e[0] = t, e[1] = n, e;
|
|
20305
20348
|
}
|
|
20306
|
-
function
|
|
20349
|
+
function Wl(e, t) {
|
|
20307
20350
|
var n = t[0] - e[0], i = t[1] - e[1];
|
|
20308
20351
|
return Math.hypot(n, i);
|
|
20309
20352
|
}
|
|
@@ -20311,24 +20354,24 @@
|
|
|
20311
20354
|
for (var e = 0, t = arguments.length; t--; ) e += arguments[t] * arguments[t];
|
|
20312
20355
|
return Math.sqrt(e);
|
|
20313
20356
|
}), function() {
|
|
20314
|
-
var e, t = (e = new
|
|
20357
|
+
var e, t = (e = new zl(3), zl != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0),
|
|
20315
20358
|
e);
|
|
20316
20359
|
}(), function() {
|
|
20317
|
-
var e, t = (e = new
|
|
20360
|
+
var e, t = (e = new zl(4), zl != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0,
|
|
20318
20361
|
e[3] = 0), e);
|
|
20319
20362
|
}(), function() {
|
|
20320
|
-
var e, t = (e = new
|
|
20363
|
+
var e, t = (e = new zl(2), zl != Float32Array && (e[0] = 0, e[1] = 0), e);
|
|
20321
20364
|
}();
|
|
20322
|
-
const
|
|
20323
|
-
function
|
|
20365
|
+
const Xl = Math.PI / 180, Yl = 6378137 * Math.PI / 180, Zl = 85.0511287798;
|
|
20366
|
+
function ql(e, t, n) {
|
|
20324
20367
|
return function(e, t) {
|
|
20325
|
-
const n =
|
|
20368
|
+
const n = Zl, i = t[0], r = Math.max(Math.min(n, t[1]), -n);
|
|
20326
20369
|
let s;
|
|
20327
|
-
s = 0 === r ? 0 : Math.log(Math.tan((90 + r) *
|
|
20328
|
-
return e[0] = i *
|
|
20370
|
+
s = 0 === r ? 0 : Math.log(Math.tan((90 + r) * Xl / 2)) / Xl;
|
|
20371
|
+
return e[0] = i * Yl, e[1] = s * Yl, e;
|
|
20329
20372
|
}(e, t);
|
|
20330
20373
|
}
|
|
20331
|
-
function
|
|
20374
|
+
function $l(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p) {
|
|
20332
20375
|
0 === e ? function(e, t, n, i, r, s, o, a, l, h) {
|
|
20333
20376
|
const c = 1 / (100 * s[0]), u = 1 / (100 * s[1]), f = h && h[0] || 0, d = h && h[1] || 0, p = [ 0, 0 ];
|
|
20334
20377
|
for (let r = e; r < t; r += 3) {
|
|
@@ -20340,39 +20383,39 @@
|
|
|
20340
20383
|
let u, f, d, p;
|
|
20341
20384
|
0 === e[4] ? (u = e[0], f = e[1], d = e[2], p = e[3]) : (u = e[1], f = e[2], d = e[3],
|
|
20342
20385
|
p = e[0]);
|
|
20343
|
-
const g =
|
|
20386
|
+
const g = Wl(u, f), m = Wl(f, d), y = [], x = [], _ = [];
|
|
20344
20387
|
for (let e = t; e < n; e += 3) {
|
|
20345
20388
|
const t = e / 3 * 2;
|
|
20346
|
-
|
|
20347
|
-
"EPSG:4326" !== h && "EPSG:4490" !== h ||
|
|
20348
|
-
i[t] =
|
|
20389
|
+
jl(y, (s.x / l + r[e] / o) * a, s.y / l * a + (c ? r[e + 1] : -r[e + 1]) / o * a),
|
|
20390
|
+
"EPSG:4326" !== h && "EPSG:4490" !== h || ql(y, y), Jl(x, y, u, f), Jl(_, y, p, u),
|
|
20391
|
+
i[t] = Wl(u, x) / g, i[t + 1] = Wl(u, _) / m;
|
|
20349
20392
|
}
|
|
20350
20393
|
}(c, t, n, i, r, s, a, u, f, d, !!p);
|
|
20351
20394
|
}
|
|
20352
|
-
function
|
|
20395
|
+
function Jl(e, t, n, i) {
|
|
20353
20396
|
const r = n[0] - i[0], s = n[1] - i[1];
|
|
20354
20397
|
let o = (t[0] - n[0]) * (n[0] - i[0]) + (t[1] - n[1]) * (n[1] - i[1]);
|
|
20355
20398
|
return o /= r * r + s * s, e[0] = n[0] + o * r, e[1] = n[1] + o * s, e;
|
|
20356
20399
|
}
|
|
20357
|
-
function
|
|
20400
|
+
function Kl(e, t, n, i, r) {
|
|
20358
20401
|
const s = 3 * t[n - 1], o = 3 * t[n - 1] + 1, a = e[s], l = e[o];
|
|
20359
20402
|
return h = i, c = r, u = a, f = l, Math.sqrt((u - h) * (u - h) + (f - c) * (f - c));
|
|
20360
20403
|
var h, c, u, f;
|
|
20361
20404
|
}
|
|
20362
|
-
function
|
|
20405
|
+
function Ql(e, t, n = 2) {
|
|
20363
20406
|
const i = t && t.length, r = i ? t[0] * n : e.length;
|
|
20364
|
-
let s =
|
|
20407
|
+
let s = eh(e, 0, r, n, !0);
|
|
20365
20408
|
const o = [];
|
|
20366
20409
|
if (!s || s.next === s.prev) return o;
|
|
20367
20410
|
let a, l, h;
|
|
20368
20411
|
if (i && (s = function(e, t, n, i) {
|
|
20369
20412
|
const r = [];
|
|
20370
20413
|
for (let n = 0, s = t.length; n < s; n++) {
|
|
20371
|
-
const o =
|
|
20372
|
-
o === o.next && (o.steiner = !0), r.push(
|
|
20414
|
+
const o = eh(e, t[n] * i, n < s - 1 ? t[n + 1] * i : e.length, i, !1);
|
|
20415
|
+
o === o.next && (o.steiner = !0), r.push(uh(o));
|
|
20373
20416
|
}
|
|
20374
|
-
r.sort(
|
|
20375
|
-
for (let e = 0; e < r.length; e++) n =
|
|
20417
|
+
r.sort(ah);
|
|
20418
|
+
for (let e = 0; e < r.length; e++) n = lh(r[e], n);
|
|
20376
20419
|
return n;
|
|
20377
20420
|
}(e, t, s, n)), e.length > 80 * n) {
|
|
20378
20421
|
a = 1 / 0, l = 1 / 0;
|
|
@@ -20383,36 +20426,36 @@
|
|
|
20383
20426
|
}
|
|
20384
20427
|
h = Math.max(t - a, i - l), h = 0 !== h ? 32767 / h : 0;
|
|
20385
20428
|
}
|
|
20386
|
-
return
|
|
20429
|
+
return nh(s, o, n, a, l, h, 0), o;
|
|
20387
20430
|
}
|
|
20388
|
-
function
|
|
20431
|
+
function eh(e, t, n, i, r) {
|
|
20389
20432
|
let s;
|
|
20390
20433
|
if (r === function(e, t, n, i) {
|
|
20391
20434
|
let r = 0;
|
|
20392
20435
|
for (let s = t, o = n - i; s < n; s += i) r += (e[o] - e[s]) * (e[s + 1] + e[o + 1]),
|
|
20393
20436
|
o = s;
|
|
20394
20437
|
return r;
|
|
20395
|
-
}(e, t, n, i) > 0) for (let r = t; r < n; r += i) s =
|
|
20396
|
-
return s &&
|
|
20438
|
+
}(e, t, n, i) > 0) for (let r = t; r < n; r += i) s = Ah(r / i | 0, e[r], e[r + 1], s); else for (let r = n - i; r >= t; r -= i) s = Ah(r / i | 0, e[r], e[r + 1], s);
|
|
20439
|
+
return s && mh(s, s.next) && (Th(s), s = s.next), s;
|
|
20397
20440
|
}
|
|
20398
|
-
function
|
|
20441
|
+
function th(e, t) {
|
|
20399
20442
|
if (!e) return e;
|
|
20400
20443
|
t || (t = e);
|
|
20401
20444
|
let n, i = e;
|
|
20402
20445
|
do {
|
|
20403
|
-
if (n = !1, i.steiner || !
|
|
20404
|
-
if (
|
|
20446
|
+
if (n = !1, i.steiner || !mh(i, i.next) && 0 !== gh(i.prev, i, i.next)) i = i.next; else {
|
|
20447
|
+
if (Th(i), i = t = i.prev, i === i.next) break;
|
|
20405
20448
|
n = !0;
|
|
20406
20449
|
}
|
|
20407
20450
|
} while (n || i !== t);
|
|
20408
20451
|
return t;
|
|
20409
20452
|
}
|
|
20410
|
-
function
|
|
20453
|
+
function nh(e, t, n, i, r, s, o) {
|
|
20411
20454
|
if (!e) return;
|
|
20412
20455
|
!o && s && function(e, t, n, i) {
|
|
20413
20456
|
let r = e;
|
|
20414
20457
|
do {
|
|
20415
|
-
0 === r.z && (r.z =
|
|
20458
|
+
0 === r.z && (r.z = ch(r.x, r.y, t, n, i)), r.prevZ = r.prev, r.nextZ = r.next,
|
|
20416
20459
|
r = r.next;
|
|
20417
20460
|
} while (r !== e);
|
|
20418
20461
|
r.prevZ.nextZ = null, r.prevZ = null, function(e) {
|
|
@@ -20438,81 +20481,81 @@
|
|
|
20438
20481
|
let a = e;
|
|
20439
20482
|
for (;e.prev !== e.next; ) {
|
|
20440
20483
|
const l = e.prev, h = e.next;
|
|
20441
|
-
if (s ?
|
|
20442
|
-
o ? 1 === o ?
|
|
20484
|
+
if (s ? rh(e, i, r, s) : ih(e)) t.push(l.i, e.i, h.i), Th(e), e = h.next, a = h.next; else if ((e = h) === a) {
|
|
20485
|
+
o ? 1 === o ? nh(e = sh(th(e), t), t, n, i, r, s, 2) : 2 === o && oh(e, t, n, i, r, s) : nh(th(e), t, n, i, r, s, 1);
|
|
20443
20486
|
break;
|
|
20444
20487
|
}
|
|
20445
20488
|
}
|
|
20446
20489
|
}
|
|
20447
|
-
function
|
|
20490
|
+
function ih(e) {
|
|
20448
20491
|
const t = e.prev, n = e, i = e.next;
|
|
20449
|
-
if (
|
|
20492
|
+
if (gh(t, n, i) >= 0) return !1;
|
|
20450
20493
|
const r = t.x, s = n.x, o = i.x, a = t.y, l = n.y, h = i.y, c = Math.min(r, s, o), u = Math.min(a, l, h), f = Math.max(r, s, o), d = Math.max(a, l, h);
|
|
20451
20494
|
let p = i.next;
|
|
20452
20495
|
for (;p !== t; ) {
|
|
20453
|
-
if (p.x >= c && p.x <= f && p.y >= u && p.y <= d &&
|
|
20496
|
+
if (p.x >= c && p.x <= f && p.y >= u && p.y <= d && dh(r, a, s, l, o, h, p.x, p.y) && gh(p.prev, p, p.next) >= 0) return !1;
|
|
20454
20497
|
p = p.next;
|
|
20455
20498
|
}
|
|
20456
20499
|
return !0;
|
|
20457
20500
|
}
|
|
20458
|
-
function
|
|
20501
|
+
function rh(e, t, n, i) {
|
|
20459
20502
|
const r = e.prev, s = e, o = e.next;
|
|
20460
|
-
if (
|
|
20461
|
-
const a = r.x, l = s.x, h = o.x, c = r.y, u = s.y, f = o.y, d = Math.min(a, l, h), p = Math.min(c, u, f), g = Math.max(a, l, h), m = Math.max(c, u, f), y =
|
|
20503
|
+
if (gh(r, s, o) >= 0) return !1;
|
|
20504
|
+
const a = r.x, l = s.x, h = o.x, c = r.y, u = s.y, f = o.y, d = Math.min(a, l, h), p = Math.min(c, u, f), g = Math.max(a, l, h), m = Math.max(c, u, f), y = ch(d, p, t, n, i), x = ch(g, m, t, n, i);
|
|
20462
20505
|
let _ = e.prevZ, v = e.nextZ;
|
|
20463
20506
|
for (;_ && _.z >= y && v && v.z <= x; ) {
|
|
20464
|
-
if (_.x >= d && _.x <= g && _.y >= p && _.y <= m && _ !== r && _ !== o &&
|
|
20465
|
-
if (_ = _.prevZ, v.x >= d && v.x <= g && v.y >= p && v.y <= m && v !== r && v !== o &&
|
|
20507
|
+
if (_.x >= d && _.x <= g && _.y >= p && _.y <= m && _ !== r && _ !== o && dh(a, c, l, u, h, f, _.x, _.y) && gh(_.prev, _, _.next) >= 0) return !1;
|
|
20508
|
+
if (_ = _.prevZ, v.x >= d && v.x <= g && v.y >= p && v.y <= m && v !== r && v !== o && dh(a, c, l, u, h, f, v.x, v.y) && gh(v.prev, v, v.next) >= 0) return !1;
|
|
20466
20509
|
v = v.nextZ;
|
|
20467
20510
|
}
|
|
20468
20511
|
for (;_ && _.z >= y; ) {
|
|
20469
|
-
if (_.x >= d && _.x <= g && _.y >= p && _.y <= m && _ !== r && _ !== o &&
|
|
20512
|
+
if (_.x >= d && _.x <= g && _.y >= p && _.y <= m && _ !== r && _ !== o && dh(a, c, l, u, h, f, _.x, _.y) && gh(_.prev, _, _.next) >= 0) return !1;
|
|
20470
20513
|
_ = _.prevZ;
|
|
20471
20514
|
}
|
|
20472
20515
|
for (;v && v.z <= x; ) {
|
|
20473
|
-
if (v.x >= d && v.x <= g && v.y >= p && v.y <= m && v !== r && v !== o &&
|
|
20516
|
+
if (v.x >= d && v.x <= g && v.y >= p && v.y <= m && v !== r && v !== o && dh(a, c, l, u, h, f, v.x, v.y) && gh(v.prev, v, v.next) >= 0) return !1;
|
|
20474
20517
|
v = v.nextZ;
|
|
20475
20518
|
}
|
|
20476
20519
|
return !0;
|
|
20477
20520
|
}
|
|
20478
|
-
function
|
|
20521
|
+
function sh(e, t) {
|
|
20479
20522
|
let n = e;
|
|
20480
20523
|
do {
|
|
20481
20524
|
const i = n.prev, r = n.next.next;
|
|
20482
|
-
!
|
|
20483
|
-
|
|
20525
|
+
!mh(i, r) && yh(i, n, n.next, r) && vh(i, r) && vh(r, i) && (t.push(i.i, n.i, r.i),
|
|
20526
|
+
Th(n), Th(n.next), n = e = r), n = n.next;
|
|
20484
20527
|
} while (n !== e);
|
|
20485
|
-
return
|
|
20528
|
+
return th(n);
|
|
20486
20529
|
}
|
|
20487
|
-
function
|
|
20530
|
+
function oh(e, t, n, i, r, s) {
|
|
20488
20531
|
let o = e;
|
|
20489
20532
|
do {
|
|
20490
20533
|
let e = o.next.next;
|
|
20491
20534
|
for (;e !== o.prev; ) {
|
|
20492
|
-
if (o.i !== e.i &&
|
|
20493
|
-
let a =
|
|
20494
|
-
return o =
|
|
20535
|
+
if (o.i !== e.i && ph(o, e)) {
|
|
20536
|
+
let a = bh(o, e);
|
|
20537
|
+
return o = th(o, o.next), a = th(a, a.next), nh(o, t, n, i, r, s, 0), void nh(a, t, n, i, r, s, 0);
|
|
20495
20538
|
}
|
|
20496
20539
|
e = e.next;
|
|
20497
20540
|
}
|
|
20498
20541
|
o = o.next;
|
|
20499
20542
|
} while (o !== e);
|
|
20500
20543
|
}
|
|
20501
|
-
function
|
|
20544
|
+
function ah(e, t) {
|
|
20502
20545
|
let n = e.x - t.x;
|
|
20503
20546
|
if (0 === n && (n = e.y - t.y, 0 === n)) {
|
|
20504
20547
|
n = (e.next.y - e.y) / (e.next.x - e.x) - (t.next.y - t.y) / (t.next.x - t.x);
|
|
20505
20548
|
}
|
|
20506
20549
|
return n;
|
|
20507
20550
|
}
|
|
20508
|
-
function
|
|
20551
|
+
function lh(e, t) {
|
|
20509
20552
|
const n = function(e, t) {
|
|
20510
20553
|
let n = t;
|
|
20511
20554
|
const i = e.x, r = e.y;
|
|
20512
20555
|
let s, o = -1 / 0;
|
|
20513
|
-
if (
|
|
20556
|
+
if (mh(e, n)) return n;
|
|
20514
20557
|
do {
|
|
20515
|
-
if (
|
|
20558
|
+
if (mh(e, n.next)) return n.next;
|
|
20516
20559
|
if (r <= n.y && r >= n.next.y && n.next.y !== n.y) {
|
|
20517
20560
|
const e = n.x + (r - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
|
|
20518
20561
|
if (e <= i && e > o && (o = e, s = n.x < n.next.x ? n : n.next, e === i)) return s;
|
|
@@ -20524,9 +20567,9 @@
|
|
|
20524
20567
|
let c = 1 / 0;
|
|
20525
20568
|
n = s;
|
|
20526
20569
|
do {
|
|
20527
|
-
if (i >= n.x && n.x >= l && i !== n.x &&
|
|
20570
|
+
if (i >= n.x && n.x >= l && i !== n.x && fh(r < h ? i : o, r, l, h, r < h ? o : i, r, n.x, n.y)) {
|
|
20528
20571
|
const t = Math.abs(r - n.y) / (i - n.x);
|
|
20529
|
-
|
|
20572
|
+
vh(n, e) && (t < c || t === c && (n.x > s.x || n.x === s.x && hh(s, n))) && (s = n,
|
|
20530
20573
|
c = t);
|
|
20531
20574
|
}
|
|
20532
20575
|
n = n.next;
|
|
@@ -20534,37 +20577,37 @@
|
|
|
20534
20577
|
return s;
|
|
20535
20578
|
}(e, t);
|
|
20536
20579
|
if (!n) return t;
|
|
20537
|
-
const i =
|
|
20538
|
-
return
|
|
20580
|
+
const i = bh(n, e);
|
|
20581
|
+
return th(i, i.next), th(n, n.next);
|
|
20539
20582
|
}
|
|
20540
|
-
function
|
|
20541
|
-
return
|
|
20583
|
+
function hh(e, t) {
|
|
20584
|
+
return gh(e.prev, e, t.prev) < 0 && gh(t.next, e, e.next) < 0;
|
|
20542
20585
|
}
|
|
20543
|
-
function
|
|
20586
|
+
function ch(e, t, n, i, r) {
|
|
20544
20587
|
return (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e = (e - n) * r | 0) | e << 8)) | e << 4)) | e << 2)) | e << 1)) | (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = (t - i) * r | 0) | t << 8)) | t << 4)) | t << 2)) | t << 1)) << 1;
|
|
20545
20588
|
}
|
|
20546
|
-
function
|
|
20589
|
+
function uh(e) {
|
|
20547
20590
|
let t = e, n = e;
|
|
20548
20591
|
do {
|
|
20549
20592
|
(t.x < n.x || t.x === n.x && t.y < n.y) && (n = t), t = t.next;
|
|
20550
20593
|
} while (t !== e);
|
|
20551
20594
|
return n;
|
|
20552
20595
|
}
|
|
20553
|
-
function
|
|
20596
|
+
function fh(e, t, n, i, r, s, o, a) {
|
|
20554
20597
|
return (r - o) * (t - a) >= (e - o) * (s - a) && (e - o) * (i - a) >= (n - o) * (t - a) && (n - o) * (s - a) >= (r - o) * (i - a);
|
|
20555
20598
|
}
|
|
20556
|
-
function
|
|
20557
|
-
return !(e === o && t === a) &&
|
|
20599
|
+
function dh(e, t, n, i, r, s, o, a) {
|
|
20600
|
+
return !(e === o && t === a) && fh(e, t, n, i, r, s, o, a);
|
|
20558
20601
|
}
|
|
20559
|
-
function
|
|
20602
|
+
function ph(e, t) {
|
|
20560
20603
|
return e.next.i !== t.i && e.prev.i !== t.i && !function(e, t) {
|
|
20561
20604
|
let n = e;
|
|
20562
20605
|
do {
|
|
20563
|
-
if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i &&
|
|
20606
|
+
if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && yh(n, n.next, e, t)) return !0;
|
|
20564
20607
|
n = n.next;
|
|
20565
20608
|
} while (n !== e);
|
|
20566
20609
|
return !1;
|
|
20567
|
-
}(e, t) && (
|
|
20610
|
+
}(e, t) && (vh(e, t) && vh(t, e) && function(e, t) {
|
|
20568
20611
|
let n = e, i = !1;
|
|
20569
20612
|
const r = (e.x + t.x) / 2, s = (e.y + t.y) / 2;
|
|
20570
20613
|
do {
|
|
@@ -20572,42 +20615,42 @@
|
|
|
20572
20615
|
n = n.next;
|
|
20573
20616
|
} while (n !== e);
|
|
20574
20617
|
return i;
|
|
20575
|
-
}(e, t) && (
|
|
20618
|
+
}(e, t) && (gh(e.prev, e, t.prev) || gh(e, t.prev, t)) || mh(e, t) && gh(e.prev, e, e.next) > 0 && gh(t.prev, t, t.next) > 0);
|
|
20576
20619
|
}
|
|
20577
|
-
function
|
|
20620
|
+
function gh(e, t, n) {
|
|
20578
20621
|
return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y);
|
|
20579
20622
|
}
|
|
20580
|
-
function
|
|
20623
|
+
function mh(e, t) {
|
|
20581
20624
|
return e.x === t.x && e.y === t.y;
|
|
20582
20625
|
}
|
|
20583
|
-
function
|
|
20584
|
-
const r =
|
|
20585
|
-
return r !== s && o !== a || (!(0 !== r || !
|
|
20626
|
+
function yh(e, t, n, i) {
|
|
20627
|
+
const r = _h(gh(e, t, n)), s = _h(gh(e, t, i)), o = _h(gh(n, i, e)), a = _h(gh(n, i, t));
|
|
20628
|
+
return r !== s && o !== a || (!(0 !== r || !xh(e, n, t)) || (!(0 !== s || !xh(e, i, t)) || (!(0 !== o || !xh(n, e, i)) || !(0 !== a || !xh(n, t, i)))));
|
|
20586
20629
|
}
|
|
20587
|
-
function
|
|
20630
|
+
function xh(e, t, n) {
|
|
20588
20631
|
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);
|
|
20589
20632
|
}
|
|
20590
|
-
function
|
|
20633
|
+
function _h(e) {
|
|
20591
20634
|
return e > 0 ? 1 : e < 0 ? -1 : 0;
|
|
20592
20635
|
}
|
|
20593
|
-
function
|
|
20594
|
-
return
|
|
20636
|
+
function vh(e, t) {
|
|
20637
|
+
return gh(e.prev, e, e.next) < 0 ? gh(e, t, e.next) >= 0 && gh(e, e.prev, t) >= 0 : gh(e, t, e.prev) < 0 || gh(e, e.next, t) < 0;
|
|
20595
20638
|
}
|
|
20596
|
-
function
|
|
20597
|
-
const n =
|
|
20639
|
+
function bh(e, t) {
|
|
20640
|
+
const n = wh(e.i, e.x, e.y), i = wh(t.i, t.x, t.y), r = e.next, s = t.prev;
|
|
20598
20641
|
return e.next = t, t.prev = e, n.next = r, r.prev = n, i.next = n, n.prev = i, s.next = i,
|
|
20599
20642
|
i.prev = s, i;
|
|
20600
20643
|
}
|
|
20601
|
-
function
|
|
20602
|
-
const r =
|
|
20644
|
+
function Ah(e, t, n, i) {
|
|
20645
|
+
const r = wh(e, t, n);
|
|
20603
20646
|
return i ? (r.next = i.next, r.prev = i, i.next.prev = r, i.next = r) : (r.prev = r,
|
|
20604
20647
|
r.next = r), r;
|
|
20605
20648
|
}
|
|
20606
|
-
function
|
|
20649
|
+
function Th(e) {
|
|
20607
20650
|
e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ),
|
|
20608
20651
|
e.nextZ && (e.nextZ.prevZ = e.prevZ);
|
|
20609
20652
|
}
|
|
20610
|
-
function
|
|
20653
|
+
function wh(e, t, n) {
|
|
20611
20654
|
return {
|
|
20612
20655
|
i: e,
|
|
20613
20656
|
x: t,
|
|
@@ -20620,8 +20663,8 @@
|
|
|
20620
20663
|
steiner: !1
|
|
20621
20664
|
};
|
|
20622
20665
|
}
|
|
20623
|
-
const {PackUtil:
|
|
20624
|
-
function
|
|
20666
|
+
const {PackUtil: Sh, ArrayPool: Mh} = h();
|
|
20667
|
+
function Ph(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g, m) {
|
|
20625
20668
|
const y = t.getLength(), x = r / 3;
|
|
20626
20669
|
for (let n = 2, i = y; n < i; n += 3) e[r + n - 2] = t[n - 2], e[r + n - 1] = t[n - 1],
|
|
20627
20670
|
e[r + n - 0] = t[n] - o;
|
|
@@ -20632,14 +20675,14 @@
|
|
|
20632
20675
|
e.copyWithin(r, r - 2 * y, r - y), r += y, (n = n || []).push(y / 3);
|
|
20633
20676
|
const _ = n.getLength();
|
|
20634
20677
|
for (let t = 0; t < _; t++) {
|
|
20635
|
-
|
|
20678
|
+
Ih(x + (n[t - 1] || 0), x + n[t], e, y / 3, l, i, h, c, u, f, s, d, p, g, m);
|
|
20636
20679
|
}
|
|
20637
20680
|
return r;
|
|
20638
20681
|
}
|
|
20639
|
-
function
|
|
20682
|
+
function Ih(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p) {
|
|
20640
20683
|
const g = s.getLength();
|
|
20641
20684
|
let m, y;
|
|
20642
|
-
for (let o = e, a = t; o < a - 1; o++) if (m = o, y = o + 1, r === 1 / 0 || !
|
|
20685
|
+
for (let o = e, a = t; o < a - 1; o++) if (m = o, y = o + 1, r === 1 / 0 || !Nl(n, m, y, r)) if ((o - e) % 2 == 1 && (m += 2 * i,
|
|
20643
20686
|
y += 2 * i), p) {
|
|
20644
20687
|
let e = s.currentIndex;
|
|
20645
20688
|
s[e++] = m + i, s[e++] = y, s[e++] = m, s[e++] = y + i, s[e++] = y, s[e++] = m + i,
|
|
@@ -20658,60 +20701,60 @@
|
|
|
20658
20701
|
f = d - p);
|
|
20659
20702
|
let T = g;
|
|
20660
20703
|
const w = u % 6;
|
|
20661
|
-
0 === e ? (5 === w && (m =
|
|
20704
|
+
0 === e ? (5 === w && (m = Kl(r, s, u, v, b)), T = w === y[0] || w === y[1] || w === y[2] ? g : g + m) : 1 === e && (w === y[0] || w === y[1] || w === y[2] ? T = 0 : 5 === w ? (m = Kl(r, s, u, v, b),
|
|
20662
20705
|
T = m) : T = m);
|
|
20663
|
-
const
|
|
20664
|
-
let
|
|
20665
|
-
|
|
20666
|
-
i[2 * o] =
|
|
20706
|
+
const S = T / h * (1 / (100 * c)) / a;
|
|
20707
|
+
let M;
|
|
20708
|
+
M = 1 === t ? A === d ? 1 : 0 : "bottom" === n ? A === d ? f / 100 / l : 0 : A === d ? 0 : -f / 100 / l,
|
|
20709
|
+
i[2 * o] = S, i[2 * o + 1] = M, 0 === w && (g += m);
|
|
20667
20710
|
}
|
|
20668
20711
|
}(a, l, h, c, n, s, g, u[0], u[1], f, d, p);
|
|
20669
20712
|
}
|
|
20670
|
-
function
|
|
20713
|
+
function Ch(e) {
|
|
20671
20714
|
const t = [ e[0] ];
|
|
20672
20715
|
let n = e[0];
|
|
20673
20716
|
for (let i = 1; i < e.length; i++) Array.isArray(e[i]) ? e[i][0] === n[0] && e[i][1] === n[1] && e[i][2] === n[2] || t.push(e[i]) : e[i].x === n.x && e[i].y === n.y && e[i].z === n.z || t.push(e[i]),
|
|
20674
20717
|
n = e[i];
|
|
20675
20718
|
return t;
|
|
20676
20719
|
}
|
|
20677
|
-
var
|
|
20678
|
-
function
|
|
20679
|
-
var e = new
|
|
20680
|
-
return
|
|
20720
|
+
var kh = "undefined" != typeof Float32Array ? Float32Array : Array;
|
|
20721
|
+
function Oh() {
|
|
20722
|
+
var e = new kh(3);
|
|
20723
|
+
return kh != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0), e;
|
|
20681
20724
|
}
|
|
20682
|
-
function
|
|
20683
|
-
var i = new
|
|
20725
|
+
function Fh(e, t, n) {
|
|
20726
|
+
var i = new kh(3);
|
|
20684
20727
|
return i[0] = e, i[1] = t, i[2] = n, i;
|
|
20685
20728
|
}
|
|
20686
|
-
function
|
|
20729
|
+
function Rh(e, t) {
|
|
20687
20730
|
return e[0] = t[0], e[1] = t[1], e[2] = t[2], e;
|
|
20688
20731
|
}
|
|
20689
|
-
function
|
|
20732
|
+
function Eh(e, t, n, i) {
|
|
20690
20733
|
return e[0] = t, e[1] = n, e[2] = i, e;
|
|
20691
20734
|
}
|
|
20692
|
-
function
|
|
20735
|
+
function Dh(e, t, n) {
|
|
20693
20736
|
return e[0] = t[0] + n[0], e[1] = t[1] + n[1], e[2] = t[2] + n[2], e;
|
|
20694
20737
|
}
|
|
20695
|
-
function
|
|
20738
|
+
function Lh(e, t) {
|
|
20696
20739
|
var n = t[0], i = t[1], r = t[2], s = n * n + i * i + r * r;
|
|
20697
20740
|
return s > 0 && (s = 1 / Math.sqrt(s), e[0] = t[0] * s, e[1] = t[1] * s, e[2] = t[2] * s),
|
|
20698
20741
|
e;
|
|
20699
20742
|
}
|
|
20700
|
-
function
|
|
20743
|
+
function Hh(e, t) {
|
|
20701
20744
|
return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
|
|
20702
20745
|
}
|
|
20703
|
-
function
|
|
20746
|
+
function Nh(e, t, n) {
|
|
20704
20747
|
var i = t[0], r = t[1], s = t[2], o = n[0], a = n[1], l = n[2];
|
|
20705
20748
|
return e[0] = r * l - s * a, e[1] = s * o - i * l, e[2] = i * a - r * o, e;
|
|
20706
20749
|
}
|
|
20707
|
-
var
|
|
20750
|
+
var zh = function(e, t, n) {
|
|
20708
20751
|
return e[0] = t[0] - n[0], e[1] = t[1] - n[1], e[2] = t[2] - n[2], e;
|
|
20709
20752
|
};
|
|
20710
|
-
function
|
|
20711
|
-
var e = new
|
|
20712
|
-
return
|
|
20753
|
+
function Vh() {
|
|
20754
|
+
var e = new kh(4);
|
|
20755
|
+
return kh != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0), e[3] = 1, e;
|
|
20713
20756
|
}
|
|
20714
|
-
function
|
|
20757
|
+
function Uh(e, t) {
|
|
20715
20758
|
var n = t[0] + t[4] + t[8], i = void 0;
|
|
20716
20759
|
if (n > 0) i = Math.sqrt(n + 1), e[3] = .5 * i, i = .5 / i, e[0] = (t[5] - t[7]) * i,
|
|
20717
20760
|
e[1] = (t[6] - t[2]) * i, e[2] = (t[1] - t[3]) * i; else {
|
|
@@ -20725,55 +20768,55 @@
|
|
|
20725
20768
|
return e;
|
|
20726
20769
|
}
|
|
20727
20770
|
!function() {
|
|
20728
|
-
var e =
|
|
20771
|
+
var e = Oh();
|
|
20729
20772
|
}(), function() {
|
|
20730
|
-
var e, t = (e = new
|
|
20773
|
+
var e, t = (e = new kh(4), kh != Float32Array && (e[0] = 0, e[1] = 0, e[2] = 0,
|
|
20731
20774
|
e[3] = 0), e);
|
|
20732
20775
|
}();
|
|
20733
|
-
var
|
|
20776
|
+
var Bh, Gh = function(e, t, n) {
|
|
20734
20777
|
return e[0] = t[0] * n, e[1] = t[1] * n, e[2] = t[2] * n, e[3] = t[3] * n, e;
|
|
20735
|
-
},
|
|
20778
|
+
}, jh = function(e, t) {
|
|
20736
20779
|
var n = t[0], i = t[1], r = t[2], s = t[3], o = n * n + i * i + r * r + s * s;
|
|
20737
20780
|
return o > 0 && (o = 1 / Math.sqrt(o), e[0] = n * o, e[1] = i * o, e[2] = r * o,
|
|
20738
20781
|
e[3] = s * o), e;
|
|
20739
20782
|
};
|
|
20740
|
-
|
|
20741
|
-
|
|
20783
|
+
Oh(), Fh(1, 0, 0), Fh(0, 1, 0), Vh(), Vh(), Bh = new kh(9), kh != Float32Array && (Bh[1] = 0,
|
|
20784
|
+
Bh[2] = 0, Bh[3] = 0, Bh[5] = 0, Bh[6] = 0, Bh[7] = 0), Bh[0] = 1, Bh[4] = 1, Bh[8] = 1;
|
|
20742
20785
|
/*!
|
|
20743
20786
|
* Contains code from google filament
|
|
20744
20787
|
* https://github.com/google/filament/
|
|
20745
20788
|
* License Apache-2.0
|
|
20746
20789
|
*/
|
|
20747
|
-
const
|
|
20748
|
-
function
|
|
20749
|
-
const i =
|
|
20790
|
+
const Wh = 8, Xh = [], Yh = [], Zh = [], qh = [];
|
|
20791
|
+
function $h(e, t, n) {
|
|
20792
|
+
const i = Nh(Yh, t, n), r = function(e, t, n, i, r, s, o, a, l, h) {
|
|
20750
20793
|
return e[0] = t, e[1] = n, e[2] = i, e[3] = r, e[4] = s, e[5] = o, e[6] = a, e[7] = l,
|
|
20751
20794
|
e[8] = h, e;
|
|
20752
|
-
}(
|
|
20753
|
-
e =
|
|
20754
|
-
return e[3] < 0 ?
|
|
20755
|
-
}(e =
|
|
20756
|
-
const s = 1 / ((1 << 2 *
|
|
20795
|
+
}(Xh, n[0], n[1], n[2], ...i, ...t);
|
|
20796
|
+
e = Uh(e, r), e = function(e) {
|
|
20797
|
+
return e[3] < 0 ? Gh(e, e, -1) : e;
|
|
20798
|
+
}(e = jh(e, e));
|
|
20799
|
+
const s = 1 / ((1 << 2 * Wh - 1) - 1);
|
|
20757
20800
|
if (e[3] < s) {
|
|
20758
20801
|
e[3] = s;
|
|
20759
20802
|
const t = Math.sqrt(1 - s * s);
|
|
20760
20803
|
e[0] *= t, e[1] *= t, e[2] *= t;
|
|
20761
20804
|
}
|
|
20762
|
-
const o = n[3] > 0 ?
|
|
20763
|
-
return
|
|
20805
|
+
const o = n[3] > 0 ? Nh(Zh, n, t) : Nh(Zh, t, n);
|
|
20806
|
+
return Hh(Nh(qh, n, t), o) < 0 && Gh(e, e, -1), e;
|
|
20764
20807
|
}
|
|
20765
|
-
const
|
|
20766
|
-
const
|
|
20767
|
-
function
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
const o =
|
|
20771
|
-
|
|
20808
|
+
const Jh = [];
|
|
20809
|
+
const Kh = [], Qh = [], ec = [], tc = [], nc = [], ic = [], rc = [];
|
|
20810
|
+
function sc(e, t, n, i, r, s) {
|
|
20811
|
+
Eh(tc, e[3 * t], e[3 * t + 1], e[3 * t + 2]), Eh(nc, e[3 * n], e[3 * n + 1], e[3 * n + 2]),
|
|
20812
|
+
Eh(ic, e[3 * i], e[3 * i + 1], e[3 * i + 2]);
|
|
20813
|
+
const o = zh(Kh, ic, nc), a = zh(Qh, tc, nc), l = Nh(ec, o, a);
|
|
20814
|
+
Lh(rc, l), r[3 * t] = r[3 * t] || 0, r[3 * n] = r[3 * n] || 0, r[3 * i] = r[3 * i] || 0,
|
|
20772
20815
|
r[3 * t + 1] = r[3 * t + 1] || 0, r[3 * n + 1] = r[3 * n + 1] || 0, r[3 * i + 1] = r[3 * i + 1] || 0,
|
|
20773
20816
|
r[3 * t + 2] = r[3 * t + 2] || 0, r[3 * n + 2] = r[3 * n + 2] || 0, r[3 * i + 2] = r[3 * i + 2] || 0,
|
|
20774
|
-
r[3 * t] +=
|
|
20775
|
-
r[3 * n + 1] +=
|
|
20776
|
-
r[3 * i + 2] +=
|
|
20817
|
+
r[3 * t] += rc[0], r[3 * n] += rc[0], r[3 * i] += rc[0], r[3 * t + 1] += rc[1],
|
|
20818
|
+
r[3 * n + 1] += rc[1], r[3 * i + 1] += rc[1], r[3 * t + 2] += rc[2], r[3 * n + 2] += rc[2],
|
|
20819
|
+
r[3 * i + 2] += rc[2], s[t] += 1, s[n] += 1, s[i] += 1;
|
|
20777
20820
|
}
|
|
20778
20821
|
/*!
|
|
20779
20822
|
* Contains code from THREE.JS
|
|
@@ -20781,23 +20824,23 @@
|
|
|
20781
20824
|
* License MIT
|
|
20782
20825
|
*
|
|
20783
20826
|
* Generate tangents per vertex.
|
|
20784
|
-
*/ function
|
|
20827
|
+
*/ function oc(e, t, n) {
|
|
20785
20828
|
return e[0] = t[n], e[1] = t[n + 1], e[2] = t[n + 2], e;
|
|
20786
20829
|
}
|
|
20787
|
-
function
|
|
20830
|
+
function ac(e, t, n) {
|
|
20788
20831
|
return e[0] = t[n], e[1] = t[n + 1], e;
|
|
20789
20832
|
}
|
|
20790
|
-
const {StyleUtil:
|
|
20791
|
-
function
|
|
20792
|
-
void 0 === t.top && (t.top = !0), void 0 === t.side && (t.side = !0),
|
|
20793
|
-
const {altitudeScale: m, altitudeProperty: y, defaultAltitude: x, heightProperty: _, minHeightProperty: v, defaultHeight: b, tangent: A, uv: T, topUVMode: w, sideUVMode:
|
|
20833
|
+
const {StyleUtil: lc, PackUtil: hc, ArrayPool: cc} = h(), uc = cc.getInstance();
|
|
20834
|
+
function fc(e, t, n, i, r, s, o, a, l, h, c, u, f, d, p, g) {
|
|
20835
|
+
void 0 === t.top && (t.top = !0), void 0 === t.side && (t.side = !0), uc.reset();
|
|
20836
|
+
const {altitudeScale: m, altitudeProperty: y, defaultAltitude: x, heightProperty: _, minHeightProperty: v, defaultHeight: b, tangent: A, uv: T, topUVMode: w, sideUVMode: S, sideVerticalUVMode: M, top: P, side: I, textureYOrigin: C, topThickness: k} = t, O = !!g, F = function(e, t, {altitudeScale: n, altitudeProperty: i, defaultAltitude: r, heightProperty: s, minHeightProperty: o, defaultHeight: a}, {center: l, side: h, top: c, topThickness: u, uvOrigin: f, uv: d, uvSize: p, topUVMode: g, sideUVMode: m, sideVerticalUVMode: y, textureYOrigin: x, tileRatio: _, centimeterToPoint: v, verticalCentimeterToPoint: b, positionType: A, res: T, glScale: w, projectionCode: S}, M, P) {
|
|
20794
20837
|
let I = t / e[0].extent;
|
|
20795
20838
|
t === 1 / 0 && (I = 1);
|
|
20796
20839
|
const C = t === 1 / 0, k = P.get(), O = P.get(), F = P.get(), R = P.getProxy(), E = P.get(), D = P.get(), L = P.get(), H = !!d, N = !!c, z = !!h, V = H ? P.get() : null;
|
|
20797
20840
|
function U(e, n, i, r, s, o) {
|
|
20798
20841
|
let a = n;
|
|
20799
20842
|
if (N) {
|
|
20800
|
-
const h =
|
|
20843
|
+
const h = Ql(R, i, 3);
|
|
20801
20844
|
if (0 === h.length) return n;
|
|
20802
20845
|
let c = R.getLength(), d = E.currentIndex;
|
|
20803
20846
|
for (let e = 0; e < c; e++) E[d++] = R[e];
|
|
@@ -20809,12 +20852,12 @@
|
|
|
20809
20852
|
}
|
|
20810
20853
|
c = h.length, d = D.currentIndex;
|
|
20811
20854
|
for (let e = 0; e < c; e++) D[d++] = h[e];
|
|
20812
|
-
D.currentIndex = d, H &&
|
|
20813
|
-
u > 0 && !z && (n =
|
|
20855
|
+
D.currentIndex = d, H && $l(g || 0, e, n, V, E, f, v, _, p[0], p[1], s, T, w, S, l),
|
|
20856
|
+
u > 0 && !z && (n = Ph(E, R, i, D, n, V, 0, u, t, H, m || 0, y || 0, x, p, _, b, r < 0 ? !o : o)),
|
|
20814
20857
|
L.setLength(n / 3), L.fill(1, a / 3, n / 3);
|
|
20815
20858
|
}
|
|
20816
20859
|
if (z) {
|
|
20817
|
-
N && (u = 0), a = n, n =
|
|
20860
|
+
N && (u = 0), a = n, n = Ph(E, R, i, D, n, V, u, r, t, H, m || 0, y || 0, x, p, _, b, r < 0 ? !o : o),
|
|
20818
20861
|
L.setLength(n / 3);
|
|
20819
20862
|
const e = R.getLength() / 3;
|
|
20820
20863
|
L.fill(1, a / 3, a / 3 + e), L.fill(0, a / 3 + e, a / 3 + 2 * e), L.fill(1, a / 3 + 2 * e, a / 3 + 3 * e),
|
|
@@ -20825,7 +20868,7 @@
|
|
|
20825
20868
|
let B = -1 / 0, G = 1 / 0, j = 0;
|
|
20826
20869
|
const W = [ -1, -1, t + 1, t + 1 ];
|
|
20827
20870
|
let X = 0, Y = e.length;
|
|
20828
|
-
Ee(
|
|
20871
|
+
Ee(M) && (X = M, Y = M + 1);
|
|
20829
20872
|
let Z = 0, q = !1;
|
|
20830
20873
|
const $ = P.getProxy();
|
|
20831
20874
|
let J = !1;
|
|
@@ -20834,19 +20877,19 @@
|
|
|
20834
20877
|
Ee(h) && (Math.abs(h) > Z && (Z = Math.abs(h)), h < 0 && (q = !0));
|
|
20835
20878
|
const c = l.geometry, u = l.properties[lt];
|
|
20836
20879
|
let f = Array.isArray(u && u[0] && u[0][0]) ? u[0] : u;
|
|
20837
|
-
const {altitude: d, height: p} =
|
|
20880
|
+
const {altitude: d, height: p} = Sh.getFeaAltitudeAndHeight(l, n, i, r, s, a, o);
|
|
20838
20881
|
p < 0 ? (J = !0, G = Math.min(d, G), B = Math.max(d - p, B)) : (B = Math.max(d, B),
|
|
20839
20882
|
G = Math.min(d - p, G));
|
|
20840
20883
|
const g = E.getLength();
|
|
20841
20884
|
let m = 0, y = j;
|
|
20842
20885
|
$.setLength(0), R.setLength(0);
|
|
20843
|
-
const x =
|
|
20886
|
+
const x = Sh.calculateSignedArea(c[0]) < 0;
|
|
20844
20887
|
for (let e = 0, n = c.length; e < n; e++) {
|
|
20845
20888
|
let i = c[e];
|
|
20846
|
-
x && (i = i.reverse()), i =
|
|
20847
|
-
const r =
|
|
20889
|
+
x && (i = i.reverse()), i = Ch(i);
|
|
20890
|
+
const r = Sh.calculateSignedArea(i) < 0;
|
|
20848
20891
|
if (!r && e > 0 && (m++, f = u && u[m], j = U(y, j, $, p * I, f, C), R.setLength(0),
|
|
20849
|
-
$.setLength(0), y = j), t !== 1 / 0 && (i =
|
|
20892
|
+
$.setLength(0), y = j), t !== 1 / 0 && (i = Sh.clipPolygon(i, W)), !i.length) {
|
|
20850
20893
|
e === n - 1 && (j = U(y, j, $, p * I, f, C));
|
|
20851
20894
|
continue;
|
|
20852
20895
|
}
|
|
@@ -20856,7 +20899,7 @@
|
|
|
20856
20899
|
let e = $.currentIndex;
|
|
20857
20900
|
$[e++] = R.getLength() / 3, $.currentIndex = e;
|
|
20858
20901
|
}
|
|
20859
|
-
|
|
20902
|
+
Hl(R, R.getLength(), i, I, d, 0, A), e === n - 1 && (j = U(y, j, $, p * I, f, C));
|
|
20860
20903
|
}
|
|
20861
20904
|
const _ = E.getLength() - g, v = (st + "").trim();
|
|
20862
20905
|
for (let e = 0; e < _ / 3; e++) {
|
|
@@ -20865,19 +20908,19 @@
|
|
|
20865
20908
|
k.currentIndex = e, Ee(h) && (e = F.currentIndex, F[e++] = h, F.currentIndex = e);
|
|
20866
20909
|
}
|
|
20867
20910
|
}
|
|
20868
|
-
const K =
|
|
20911
|
+
const K = Sh.getUnsignedArrayType(O.getLength() ? O[O.getLength() - 1] : 0), Q = {
|
|
20869
20912
|
hasNegativeHeight: J,
|
|
20870
20913
|
maxAltitude: B === -1 / 0 ? 0 : B,
|
|
20871
20914
|
minAltitude: G === 1 / 0 ? 0 : G,
|
|
20872
20915
|
vertices: E,
|
|
20873
20916
|
verticeTypes: L,
|
|
20874
20917
|
indices: D,
|
|
20875
|
-
pickingIds:
|
|
20918
|
+
pickingIds: Mh.createTypedArray(O, K),
|
|
20876
20919
|
featureIndexes: k
|
|
20877
20920
|
};
|
|
20878
20921
|
if (F.getLength()) {
|
|
20879
|
-
const e = q ?
|
|
20880
|
-
Q.featureIds =
|
|
20922
|
+
const e = q ? Sh.getPosArrayType(Z) : Sh.getUnsignedArrayType(Z);
|
|
20923
|
+
Q.featureIds = Mh.createTypedArray(F, e);
|
|
20881
20924
|
} else Q.featureIds = [];
|
|
20882
20925
|
return V && (V.setLength(E.getLength() / 3 * 2), Q.uvs = V), Q;
|
|
20883
20926
|
}(e, n, {
|
|
@@ -20896,8 +20939,8 @@
|
|
|
20896
20939
|
uvSize: [ r, r ],
|
|
20897
20940
|
uvOrigin: i,
|
|
20898
20941
|
topUVMode: w,
|
|
20899
|
-
sideUVMode:
|
|
20900
|
-
sideVerticalUVMode:
|
|
20942
|
+
sideUVMode: S,
|
|
20943
|
+
sideVerticalUVMode: M,
|
|
20901
20944
|
textureYOrigin: C,
|
|
20902
20945
|
tileRatio: a,
|
|
20903
20946
|
centimeterToPoint: l,
|
|
@@ -20906,19 +20949,19 @@
|
|
|
20906
20949
|
res: s,
|
|
20907
20950
|
glScale: o,
|
|
20908
20951
|
projectionCode: f
|
|
20909
|
-
}, d,
|
|
20952
|
+
}, d, uc), R = [], E = F.vertices.getLength() / 3, D = hc.getIndexArrayType(E), L = cc.createTypedArray(F.indices, D);
|
|
20910
20953
|
delete F.indices, R.push(L.buffer, F.pickingIds.buffer);
|
|
20911
|
-
const H = Math.max(Math.abs(F.maxAltitude), Math.abs(F.minAltitude)), N = p ||
|
|
20912
|
-
F.vertices =
|
|
20913
|
-
const z = A ?
|
|
20954
|
+
const H = Math.max(Math.abs(F.maxAltitude), Math.abs(F.minAltitude)), N = p || hc.getPosArrayType(Math.max(512, H));
|
|
20955
|
+
F.vertices = cc.createTypedArray(F.vertices, N);
|
|
20956
|
+
const z = A ? uc.getProxy() : new Float32Array(3 * E);
|
|
20914
20957
|
z.setLength && z.setLength(3 * E);
|
|
20915
20958
|
const V = function(e, t, n) {
|
|
20916
20959
|
const i = n || [];
|
|
20917
20960
|
i.setLength && i.setLength(e.length);
|
|
20918
|
-
const r =
|
|
20961
|
+
const r = Jh;
|
|
20919
20962
|
r.length < e.length / 3 && (r.length = e.length / 3), r.fill(0, 0, e.length / 3);
|
|
20920
20963
|
const s = void 0 === t.length ? t : t.length;
|
|
20921
|
-
for (let n = 0; n < s / 3; n++) void 0 === t.length ?
|
|
20964
|
+
for (let n = 0; n < s / 3; n++) void 0 === t.length ? sc(e, 3 * n, 3 * n + 1, 3 * n + 2, i, r) : sc(e, t[3 * n], t[3 * n + 1], t[3 * n + 2], i, r);
|
|
20922
20965
|
for (let e = 0; e < i.length; e += 3) {
|
|
20923
20966
|
const t = r[e / 3];
|
|
20924
20967
|
0 !== t ? (i[e] /= t, i[e + 1] /= t, i[e + 2] /= t) : (i[e] = 0, i[e + 1] = 0, i[e + 2] = 0);
|
|
@@ -20933,44 +20976,44 @@
|
|
|
20933
20976
|
1 - Math.abs(t) > 1e-6 ? U = !1 : 0 !== t && (V[e] = Math.round(V[e]));
|
|
20934
20977
|
}
|
|
20935
20978
|
if (F.normals = V, A) {
|
|
20936
|
-
let e =
|
|
20979
|
+
let e = uc.get();
|
|
20937
20980
|
e.setLength(4 * E), e = function(e, t, n, i, r) {
|
|
20938
20981
|
const s = e.length / 3, o = r || new Array(4 * s), a = [], l = [];
|
|
20939
20982
|
for (let e = 0; e < s; e++) a[e] = [ 0, 0, 0 ], l[e] = [ 0, 0, 0 ];
|
|
20940
20983
|
const h = [ 0, 0, 0 ], c = [ 0, 0, 0 ], u = [ 0, 0, 0 ], f = [ 0, 0 ], d = [ 0, 0 ], p = [ 0, 0 ], g = [ 0, 0, 0 ], m = [ 0, 0, 0 ];
|
|
20941
20984
|
function y(t, i, r) {
|
|
20942
|
-
|
|
20943
|
-
|
|
20944
|
-
const s = c[0] - h[0], o = u[0] - h[0], y = c[1] - h[1], x = u[1] - h[1], _ = c[2] - h[2], v = u[2] - h[2], b = d[0] - f[0], A = p[0] - f[0], T = d[1] - f[1], w = p[1] - f[1],
|
|
20945
|
-
|
|
20946
|
-
|
|
20947
|
-
|
|
20985
|
+
oc(h, e, 3 * t), oc(c, e, 3 * i), oc(u, e, 3 * r), ac(f, n, 2 * t), ac(d, n, 2 * i),
|
|
20986
|
+
ac(p, n, 2 * r);
|
|
20987
|
+
const s = c[0] - h[0], o = u[0] - h[0], y = c[1] - h[1], x = u[1] - h[1], _ = c[2] - h[2], v = u[2] - h[2], b = d[0] - f[0], A = p[0] - f[0], T = d[1] - f[1], w = p[1] - f[1], S = 1 / (b * w - A * T);
|
|
20988
|
+
Eh(g, (w * s - T * o) * S, (w * y - T * x) * S, (w * _ - T * v) * S), Eh(m, (b * o - A * s) * S, (b * x - A * y) * S, (b * v - A * _) * S),
|
|
20989
|
+
Dh(a[t], a[t], g), Dh(a[i], a[i], g), Dh(a[r], a[r], g), Dh(l[t], l[t], m), Dh(l[i], l[i], m),
|
|
20990
|
+
Dh(l[r], l[r], m);
|
|
20948
20991
|
}
|
|
20949
20992
|
for (let e = 0, t = i.length; e < t; e += 3) y(i[e + 0], i[e + 1], i[e + 2]);
|
|
20950
20993
|
const x = [], _ = [], v = [], b = [];
|
|
20951
20994
|
let A, T, w;
|
|
20952
|
-
function
|
|
20953
|
-
|
|
20995
|
+
function S(e) {
|
|
20996
|
+
oc(v, t, 3 * e), Rh(b, v), T = a[e], Rh(x, T), zh(x, x, function(e, t, n) {
|
|
20954
20997
|
return e[0] = t[0] * n, e[1] = t[1] * n, e[2] = t[2] * n, e;
|
|
20955
|
-
}(v, v,
|
|
20998
|
+
}(v, v, Hh(v, T))), Lh(x, x), Nh(_, b, T), w = Hh(_, l[e]), A = w < 0 ? -1 : 1,
|
|
20956
20999
|
o[4 * e] = x[0], o[4 * e + 1] = x[1], o[4 * e + 2] = x[2], o[4 * e + 3] = A;
|
|
20957
21000
|
}
|
|
20958
|
-
for (let e = 0, t = i.length; e < t; e += 3)
|
|
21001
|
+
for (let e = 0, t = i.length; e < t; e += 3) S(i[e + 0]), S(i[e + 1]), S(i[e + 2]);
|
|
20959
21002
|
return o;
|
|
20960
21003
|
}(F.vertices, F.normals, F.uvs, L, e), e = function(e, t) {
|
|
20961
21004
|
const n = t.getLength(), i = new Float32Array(n), r = [], s = [], o = [];
|
|
20962
21005
|
for (let a = 0; a < n; a += 4) {
|
|
20963
21006
|
const n = a / 4 * 3;
|
|
20964
|
-
|
|
20965
|
-
|
|
21007
|
+
Vl(s, e[n] || 0, e[n + 1] || 0, e[n + 2] || 0), Bl(r, t[a] || 0, t[a + 1] || 0, t[a + 2] || 0, t[a + 3] || 0),
|
|
21008
|
+
$h(o, s, r), Ul(i.subarray(a, a + 4), o);
|
|
20966
21009
|
}
|
|
20967
21010
|
return i;
|
|
20968
21011
|
}(F.normals, e), F.tangents = e, R.push(e.buffer), delete F.normals;
|
|
20969
21012
|
}
|
|
20970
|
-
if (F.normals && (U && (F.normals =
|
|
21013
|
+
if (F.normals && (U && (F.normals = cc.createTypedArray(F.normals, Int8Array)),
|
|
20971
21014
|
R.push(F.normals.buffer)), F.uvs) {
|
|
20972
21015
|
const e = F.uvs;
|
|
20973
|
-
F.uvs =
|
|
21016
|
+
F.uvs = cc.createTypedArray(e, Float32Array), R.push(F.uvs.buffer);
|
|
20974
21017
|
}
|
|
20975
21018
|
if (g) {
|
|
20976
21019
|
const e = F.vertices, t = e.length;
|
|
@@ -20979,28 +21022,28 @@
|
|
|
20979
21022
|
const G = function(e, t, n, i) {
|
|
20980
21023
|
const r = {}, s = {}, o = i.getLength();
|
|
20981
21024
|
if (ze(t.polygonFill)) {
|
|
20982
|
-
let a =
|
|
21025
|
+
let a = Me(t.polygonFill);
|
|
20983
21026
|
const l = new Uint8Array(4 * o);
|
|
20984
21027
|
l.fill(255);
|
|
20985
21028
|
for (let t = 0; t < o; t++) {
|
|
20986
21029
|
const s = e[i[t]], o = s.properties || {};
|
|
20987
21030
|
o.$layer = s.layer, o.$type = s.type;
|
|
20988
21031
|
let h = a(n, o);
|
|
20989
|
-
we(h) && (r.aColor = 1, a =
|
|
20990
|
-
|
|
20991
|
-
l[4 * t + 3] =
|
|
21032
|
+
we(h) && (r.aColor = 1, a = Me(h), h = a(n, o)), delete o.$layer, delete o.$type,
|
|
21033
|
+
lc.normalizeColor(dc, h), l[4 * t] = dc[0], l[4 * t + 1] = dc[1], l[4 * t + 2] = dc[2],
|
|
21034
|
+
l[4 * t + 3] = dc[3];
|
|
20992
21035
|
}
|
|
20993
21036
|
s.aColor = l;
|
|
20994
21037
|
}
|
|
20995
21038
|
if (ze(t.polygonOpacity)) {
|
|
20996
|
-
let a =
|
|
21039
|
+
let a = Se(t.polygonOpacity);
|
|
20997
21040
|
const l = new Uint8Array(o);
|
|
20998
21041
|
l.fill(255);
|
|
20999
21042
|
for (let t = 0; t < o; t++) {
|
|
21000
21043
|
const s = e[i[t]], o = s.properties || {};
|
|
21001
21044
|
o.$layer = s.layer, o.$type = s.type;
|
|
21002
21045
|
let h = a(n, o);
|
|
21003
|
-
we(h) && (r.aOpacity = 1, a =
|
|
21046
|
+
we(h) && (r.aOpacity = 1, a = Me(h), h = a(n, o)), delete o.$layer, delete o.$type,
|
|
21004
21047
|
l[t] = 255 * h;
|
|
21005
21048
|
}
|
|
21006
21049
|
s.aOpacity = l;
|
|
@@ -21009,7 +21052,7 @@
|
|
|
21009
21052
|
}(e, c, u, F.featureIndexes), j = function(e, t, n, i, r) {
|
|
21010
21053
|
const s = [ [], [] ], o = ze(i.topPolygonFill), a = ze(i.bottomPolygonFill), l = [ 255, 255, 255, 255 ], h = t.getLength();
|
|
21011
21054
|
if (o || a) {
|
|
21012
|
-
let c = o &&
|
|
21055
|
+
let c = o && Me(i.topPolygonFill), u = a && Me(i.bottomPolygonFill), f = null, d = null, p = null, g = null;
|
|
21013
21056
|
for (let i = 0; i < h; i++) {
|
|
21014
21057
|
if (1 === e[i] && !o || 0 === e[i] && !a) continue;
|
|
21015
21058
|
const h = 1 === e[i];
|
|
@@ -21024,10 +21067,10 @@
|
|
|
21024
21067
|
const m = n[t[i]], y = m.properties || {};
|
|
21025
21068
|
y.$layer = m.layer, y.$type = m.type;
|
|
21026
21069
|
let x = h ? c : u, _ = x(r, y);
|
|
21027
|
-
we(_) && (x =
|
|
21028
|
-
|
|
21029
|
-
let v =
|
|
21030
|
-
v < 0 && (v = s.length, s.push(
|
|
21070
|
+
we(_) && (x = Me(_), _ = x(r, y)), delete y.$layer, delete y.$type, lc.normalizeColor(dc, _),
|
|
21071
|
+
Gl(dc, dc, l);
|
|
21072
|
+
let v = pc(s, dc);
|
|
21073
|
+
v < 0 && (v = s.length, s.push(Ul([], dc))), e[i] = v, h ? (f = t[i], p = v) : (d = t[i],
|
|
21031
21074
|
g = v);
|
|
21032
21075
|
}
|
|
21033
21076
|
}
|
|
@@ -21035,7 +21078,7 @@
|
|
|
21035
21078
|
}(F.verticeTypes, F.featureIndexes, e, c, u), W = {
|
|
21036
21079
|
data: {
|
|
21037
21080
|
data: {
|
|
21038
|
-
aVertexColorType: j.length <= 252 ?
|
|
21081
|
+
aVertexColorType: j.length <= 252 ? cc.createTypedArray(F.verticeTypes, Uint8Array) : cc.createTypedArray(F.verticeTypes, Uint16Array),
|
|
21039
21082
|
aPosition: F.vertices,
|
|
21040
21083
|
aNormal: F.normals,
|
|
21041
21084
|
aTexCoord0: F.uvs,
|
|
@@ -21056,41 +21099,41 @@
|
|
|
21056
21099
|
return F.featureIds.length ? (W.data.featureIds = F.featureIds, R.push(W.data.featureIds.buffer)) : W.data.featureIds = [],
|
|
21057
21100
|
G.aColor && (W.data.data.aColor = G.aColor, W.buffers.push(G.aColor.buffer)), G.aOpacity && (W.data.data.aOpacity = G.aOpacity,
|
|
21058
21101
|
W.buffers.push(G.aOpacity.buffer)), W.buffers.push(W.data.data.aPosition.buffer),
|
|
21059
|
-
W.data.pickingIdIndiceMap =
|
|
21102
|
+
W.data.pickingIdIndiceMap = hc.generatePickingIndiceIndex(W.data.data.aPickingId, W.data.indices),
|
|
21060
21103
|
W;
|
|
21061
21104
|
}
|
|
21062
|
-
const
|
|
21063
|
-
function
|
|
21105
|
+
const dc = [];
|
|
21106
|
+
function pc(e, t) {
|
|
21064
21107
|
for (let r = 0; r < e.length; r++) if (n = t, i = e[r], n[0] === i[0] && n[1] === i[1] && n[2] === i[2] && n[3] === i[3]) return r;
|
|
21065
21108
|
var n, i;
|
|
21066
21109
|
return -1;
|
|
21067
21110
|
}
|
|
21068
|
-
function
|
|
21069
|
-
|
|
21111
|
+
function gc(e, t, n, i, r) {
|
|
21112
|
+
mc(e, t, n || 0, i || e.length - 1, r || xc);
|
|
21070
21113
|
}
|
|
21071
|
-
function
|
|
21114
|
+
function mc(e, t, n, i, r) {
|
|
21072
21115
|
for (;i > n; ) {
|
|
21073
21116
|
if (i - n > 600) {
|
|
21074
21117
|
var s = i - n + 1, o = t - n + 1, a = Math.log(s), l = .5 * Math.exp(2 * a / 3), h = .5 * Math.sqrt(a * l * (s - l) / s) * (o - s / 2 < 0 ? -1 : 1);
|
|
21075
|
-
|
|
21118
|
+
mc(e, t, Math.max(n, Math.floor(t - o * l / s + h)), Math.min(i, Math.floor(t + (s - o) * l / s + h)), r);
|
|
21076
21119
|
}
|
|
21077
21120
|
var c = e[t], u = n, f = i;
|
|
21078
|
-
for (
|
|
21079
|
-
for (
|
|
21121
|
+
for (yc(e, n, t), r(e[i], c) > 0 && yc(e, n, i); u < f; ) {
|
|
21122
|
+
for (yc(e, u, f), u++, f--; r(e[u], c) < 0; ) u++;
|
|
21080
21123
|
for (;r(e[f], c) > 0; ) f--;
|
|
21081
21124
|
}
|
|
21082
|
-
0 === r(e[n], c) ?
|
|
21125
|
+
0 === r(e[n], c) ? yc(e, n, f) : yc(e, ++f, i), f <= t && (n = f + 1), t <= f && (i = f - 1);
|
|
21083
21126
|
}
|
|
21084
21127
|
}
|
|
21085
|
-
function
|
|
21128
|
+
function yc(e, t, n) {
|
|
21086
21129
|
var i = e[t];
|
|
21087
21130
|
e[t] = e[n], e[n] = i;
|
|
21088
21131
|
}
|
|
21089
|
-
function
|
|
21132
|
+
function xc(e, t) {
|
|
21090
21133
|
return e < t ? -1 : e > t ? 1 : 0;
|
|
21091
21134
|
}
|
|
21092
21135
|
h();
|
|
21093
|
-
class
|
|
21136
|
+
class _c {
|
|
21094
21137
|
constructor(e = 9) {
|
|
21095
21138
|
this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(.4 * this._maxEntries)),
|
|
21096
21139
|
this.clear();
|
|
@@ -21101,12 +21144,12 @@
|
|
|
21101
21144
|
search(e) {
|
|
21102
21145
|
let t = this.data;
|
|
21103
21146
|
const n = [];
|
|
21104
|
-
if (!
|
|
21147
|
+
if (!kc(e, t)) return n;
|
|
21105
21148
|
const i = this.toBBox, r = [];
|
|
21106
21149
|
for (;t; ) {
|
|
21107
21150
|
for (let s = 0; s < t.children.length; s++) {
|
|
21108
21151
|
const o = t.children[s], a = t.leaf ? i(o) : o;
|
|
21109
|
-
|
|
21152
|
+
kc(e, a) && (t.leaf ? n.push(o) : Cc(e, a) ? this._all(o, n) : r.push(o));
|
|
21110
21153
|
}
|
|
21111
21154
|
t = r.pop();
|
|
21112
21155
|
}
|
|
@@ -21114,13 +21157,13 @@
|
|
|
21114
21157
|
}
|
|
21115
21158
|
collides(e) {
|
|
21116
21159
|
let t = this.data;
|
|
21117
|
-
if (!
|
|
21160
|
+
if (!kc(e, t)) return !1;
|
|
21118
21161
|
const n = [];
|
|
21119
21162
|
for (;t; ) {
|
|
21120
21163
|
for (let i = 0; i < t.children.length; i++) {
|
|
21121
21164
|
const r = t.children[i], s = t.leaf ? this.toBBox(r) : r;
|
|
21122
|
-
if (
|
|
21123
|
-
if (t.leaf ||
|
|
21165
|
+
if (kc(e, s)) {
|
|
21166
|
+
if (t.leaf || Cc(e, s)) return !0;
|
|
21124
21167
|
n.push(r);
|
|
21125
21168
|
}
|
|
21126
21169
|
}
|
|
@@ -21148,7 +21191,7 @@
|
|
|
21148
21191
|
return e && this._insert(e, this.data.height - 1), this;
|
|
21149
21192
|
}
|
|
21150
21193
|
clear() {
|
|
21151
|
-
return this.data =
|
|
21194
|
+
return this.data = Oc([]), this;
|
|
21152
21195
|
}
|
|
21153
21196
|
remove(e, t) {
|
|
21154
21197
|
if (!e) return this;
|
|
@@ -21157,10 +21200,10 @@
|
|
|
21157
21200
|
let o, a, l;
|
|
21158
21201
|
for (;n || r.length; ) {
|
|
21159
21202
|
if (n || (n = r.pop(), a = r[r.length - 1], o = s.pop(), l = !0), n.leaf) {
|
|
21160
|
-
const i =
|
|
21203
|
+
const i = vc(e, n.children, t);
|
|
21161
21204
|
if (-1 !== i) return n.children.splice(i, 1), r.push(n), this._condense(r), this;
|
|
21162
21205
|
}
|
|
21163
|
-
l || n.leaf || !
|
|
21206
|
+
l || n.leaf || !Cc(n, i) ? a ? (o++, n = a.children[o], l = !1) : n = null : (r.push(n),
|
|
21164
21207
|
s.push(o), o = 0, a = n, n = n.children[0]);
|
|
21165
21208
|
}
|
|
21166
21209
|
return this;
|
|
@@ -21188,26 +21231,26 @@
|
|
|
21188
21231
|
_build(e, t, n, i) {
|
|
21189
21232
|
const r = n - t + 1;
|
|
21190
21233
|
let s, o = this._maxEntries;
|
|
21191
|
-
if (r <= o) return s =
|
|
21234
|
+
if (r <= o) return s = Oc(e.slice(t, n + 1)), bc(s, this.toBBox), s;
|
|
21192
21235
|
i || (i = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, i - 1))),
|
|
21193
|
-
s =
|
|
21236
|
+
s = Oc([]), s.leaf = !1, s.height = i;
|
|
21194
21237
|
const a = Math.ceil(r / o), l = a * Math.ceil(Math.sqrt(o));
|
|
21195
|
-
|
|
21238
|
+
Fc(e, t, n, l, this.compareMinX);
|
|
21196
21239
|
for (let r = t; r <= n; r += l) {
|
|
21197
21240
|
const t = Math.min(r + l - 1, n);
|
|
21198
|
-
|
|
21241
|
+
Fc(e, r, t, a, this.compareMinY);
|
|
21199
21242
|
for (let n = r; n <= t; n += a) {
|
|
21200
21243
|
const r = Math.min(n + a - 1, t);
|
|
21201
21244
|
s.children.push(this._build(e, n, r, i - 1));
|
|
21202
21245
|
}
|
|
21203
21246
|
}
|
|
21204
|
-
return
|
|
21247
|
+
return bc(s, this.toBBox), s;
|
|
21205
21248
|
}
|
|
21206
21249
|
_chooseSubtree(e, t, n, i) {
|
|
21207
21250
|
for (;i.push(t), !t.leaf && i.length - 1 !== n; ) {
|
|
21208
21251
|
let n, i = 1 / 0, o = 1 / 0;
|
|
21209
21252
|
for (let a = 0; a < t.children.length; a++) {
|
|
21210
|
-
const l = t.children[a], h =
|
|
21253
|
+
const l = t.children[a], h = Mc(l), c = (r = e, s = l, (Math.max(s.maxX, r.maxX) - Math.min(s.minX, r.minX)) * (Math.max(s.maxY, r.maxY) - Math.min(s.minY, r.minY)) - h);
|
|
21211
21254
|
c < o ? (o = c, i = h < i ? h : i, n = l) : c === o && h < i && (i = h, n = l);
|
|
21212
21255
|
}
|
|
21213
21256
|
t = n || t.children[0];
|
|
@@ -21217,97 +21260,97 @@
|
|
|
21217
21260
|
}
|
|
21218
21261
|
_insert(e, t, n) {
|
|
21219
21262
|
const i = n ? e : this.toBBox(e), r = [], s = this._chooseSubtree(i, this.data, t, r);
|
|
21220
|
-
for (s.children.push(e),
|
|
21263
|
+
for (s.children.push(e), Tc(s, i); t >= 0 && r[t].children.length > this._maxEntries; ) this._split(r, t),
|
|
21221
21264
|
t--;
|
|
21222
21265
|
this._adjustParentBBoxes(i, r, t);
|
|
21223
21266
|
}
|
|
21224
21267
|
_split(e, t) {
|
|
21225
21268
|
const n = e[t], i = n.children.length, r = this._minEntries;
|
|
21226
21269
|
this._chooseSplitAxis(n, r, i);
|
|
21227
|
-
const s = this._chooseSplitIndex(n, r, i), o =
|
|
21228
|
-
o.height = n.height, o.leaf = n.leaf,
|
|
21270
|
+
const s = this._chooseSplitIndex(n, r, i), o = Oc(n.children.splice(s, n.children.length - s));
|
|
21271
|
+
o.height = n.height, o.leaf = n.leaf, bc(n, this.toBBox), bc(o, this.toBBox), t ? e[t - 1].children.push(o) : this._splitRoot(n, o);
|
|
21229
21272
|
}
|
|
21230
21273
|
_splitRoot(e, t) {
|
|
21231
|
-
this.data =
|
|
21232
|
-
|
|
21274
|
+
this.data = Oc([ e, t ]), this.data.height = e.height + 1, this.data.leaf = !1,
|
|
21275
|
+
bc(this.data, this.toBBox);
|
|
21233
21276
|
}
|
|
21234
21277
|
_chooseSplitIndex(e, t, n) {
|
|
21235
21278
|
let i, r = 1 / 0, s = 1 / 0;
|
|
21236
21279
|
for (let o = t; o <= n - t; o++) {
|
|
21237
|
-
const t =
|
|
21280
|
+
const t = Ac(e, 0, o, this.toBBox), a = Ac(e, o, n, this.toBBox), l = Ic(t, a), h = Mc(t) + Mc(a);
|
|
21238
21281
|
l < r ? (r = l, i = o, s = h < s ? h : s) : l === r && h < s && (s = h, i = o);
|
|
21239
21282
|
}
|
|
21240
21283
|
return i || n - t;
|
|
21241
21284
|
}
|
|
21242
21285
|
_chooseSplitAxis(e, t, n) {
|
|
21243
|
-
const i = e.leaf ? this.compareMinX :
|
|
21286
|
+
const i = e.leaf ? this.compareMinX : wc, r = e.leaf ? this.compareMinY : Sc;
|
|
21244
21287
|
this._allDistMargin(e, t, n, i) < this._allDistMargin(e, t, n, r) && e.children.sort(i);
|
|
21245
21288
|
}
|
|
21246
21289
|
_allDistMargin(e, t, n, i) {
|
|
21247
21290
|
e.children.sort(i);
|
|
21248
|
-
const r = this.toBBox, s =
|
|
21249
|
-
let a =
|
|
21291
|
+
const r = this.toBBox, s = Ac(e, 0, t, r), o = Ac(e, n - t, n, r);
|
|
21292
|
+
let a = Pc(s) + Pc(o);
|
|
21250
21293
|
for (let i = t; i < n - t; i++) {
|
|
21251
21294
|
const t = e.children[i];
|
|
21252
|
-
|
|
21295
|
+
Tc(s, e.leaf ? r(t) : t), a += Pc(s);
|
|
21253
21296
|
}
|
|
21254
21297
|
for (let i = n - t - 1; i >= t; i--) {
|
|
21255
21298
|
const t = e.children[i];
|
|
21256
|
-
|
|
21299
|
+
Tc(o, e.leaf ? r(t) : t), a += Pc(o);
|
|
21257
21300
|
}
|
|
21258
21301
|
return a;
|
|
21259
21302
|
}
|
|
21260
21303
|
_adjustParentBBoxes(e, t, n) {
|
|
21261
|
-
for (let i = n; i >= 0; i--)
|
|
21304
|
+
for (let i = n; i >= 0; i--) Tc(t[i], e);
|
|
21262
21305
|
}
|
|
21263
21306
|
_condense(e) {
|
|
21264
21307
|
for (let t, n = e.length - 1; n >= 0; n--) 0 === e[n].children.length ? n > 0 ? (t = e[n - 1].children,
|
|
21265
|
-
t.splice(t.indexOf(e[n]), 1)) : this.clear() :
|
|
21308
|
+
t.splice(t.indexOf(e[n]), 1)) : this.clear() : bc(e[n], this.toBBox);
|
|
21266
21309
|
}
|
|
21267
21310
|
}
|
|
21268
|
-
function
|
|
21311
|
+
function vc(e, t, n) {
|
|
21269
21312
|
if (!n) return t.indexOf(e);
|
|
21270
21313
|
for (let i = 0; i < t.length; i++) if (n(e, t[i])) return i;
|
|
21271
21314
|
return -1;
|
|
21272
21315
|
}
|
|
21273
|
-
function
|
|
21274
|
-
|
|
21316
|
+
function bc(e, t) {
|
|
21317
|
+
Ac(e, 0, e.children.length, t, e);
|
|
21275
21318
|
}
|
|
21276
|
-
function
|
|
21277
|
-
r || (r =
|
|
21319
|
+
function Ac(e, t, n, i, r) {
|
|
21320
|
+
r || (r = Oc(null)), r.minX = 1 / 0, r.minY = 1 / 0, r.maxX = -1 / 0, r.maxY = -1 / 0;
|
|
21278
21321
|
for (let s = t; s < n; s++) {
|
|
21279
21322
|
const t = e.children[s];
|
|
21280
|
-
|
|
21323
|
+
Tc(r, e.leaf ? i(t) : t);
|
|
21281
21324
|
}
|
|
21282
21325
|
return r;
|
|
21283
21326
|
}
|
|
21284
|
-
function
|
|
21327
|
+
function Tc(e, t) {
|
|
21285
21328
|
return e.minX = Math.min(e.minX, t.minX), e.minY = Math.min(e.minY, t.minY), e.maxX = Math.max(e.maxX, t.maxX),
|
|
21286
21329
|
e.maxY = Math.max(e.maxY, t.maxY), e;
|
|
21287
21330
|
}
|
|
21288
|
-
function
|
|
21331
|
+
function wc(e, t) {
|
|
21289
21332
|
return e.minX - t.minX;
|
|
21290
21333
|
}
|
|
21291
|
-
function
|
|
21334
|
+
function Sc(e, t) {
|
|
21292
21335
|
return e.minY - t.minY;
|
|
21293
21336
|
}
|
|
21294
|
-
function
|
|
21337
|
+
function Mc(e) {
|
|
21295
21338
|
return (e.maxX - e.minX) * (e.maxY - e.minY);
|
|
21296
21339
|
}
|
|
21297
|
-
function
|
|
21340
|
+
function Pc(e) {
|
|
21298
21341
|
return e.maxX - e.minX + (e.maxY - e.minY);
|
|
21299
21342
|
}
|
|
21300
|
-
function
|
|
21343
|
+
function Ic(e, t) {
|
|
21301
21344
|
const n = Math.max(e.minX, t.minX), i = Math.max(e.minY, t.minY), r = Math.min(e.maxX, t.maxX), s = Math.min(e.maxY, t.maxY);
|
|
21302
21345
|
return Math.max(0, r - n) * Math.max(0, s - i);
|
|
21303
21346
|
}
|
|
21304
|
-
function
|
|
21347
|
+
function Cc(e, t) {
|
|
21305
21348
|
return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY;
|
|
21306
21349
|
}
|
|
21307
|
-
function
|
|
21350
|
+
function kc(e, t) {
|
|
21308
21351
|
return t.minX <= e.maxX && t.minY <= e.maxY && t.maxX >= e.minX && t.maxY >= e.minY;
|
|
21309
21352
|
}
|
|
21310
|
-
function
|
|
21353
|
+
function Oc(e) {
|
|
21311
21354
|
return {
|
|
21312
21355
|
children: e,
|
|
21313
21356
|
height: 1,
|
|
@@ -21318,16 +21361,16 @@
|
|
|
21318
21361
|
maxY: -1 / 0
|
|
21319
21362
|
};
|
|
21320
21363
|
}
|
|
21321
|
-
function
|
|
21364
|
+
function Fc(e, t, n, i, r) {
|
|
21322
21365
|
const s = [ t, n ];
|
|
21323
21366
|
for (;s.length; ) {
|
|
21324
21367
|
if ((n = s.pop()) - (t = s.pop()) <= i) continue;
|
|
21325
21368
|
const o = t + Math.ceil((n - t) / i / 2) * i;
|
|
21326
|
-
|
|
21369
|
+
gc(e, o, t, n, r), s.push(t, o, o, n);
|
|
21327
21370
|
}
|
|
21328
21371
|
}
|
|
21329
|
-
class
|
|
21330
|
-
constructor(e = [], t =
|
|
21372
|
+
class Rc {
|
|
21373
|
+
constructor(e = [], t = Ec) {
|
|
21331
21374
|
if (this.data = e, this.length = this.data.length, this.compare = t, this.length > 0) for (let e = (this.length >> 1) - 1; e >= 0; e--) this._down(e);
|
|
21332
21375
|
}
|
|
21333
21376
|
push(e) {
|
|
@@ -21361,12 +21404,12 @@
|
|
|
21361
21404
|
t[e] = r;
|
|
21362
21405
|
}
|
|
21363
21406
|
}
|
|
21364
|
-
function
|
|
21407
|
+
function Ec(e, t) {
|
|
21365
21408
|
return e < t ? -1 : e > t ? 1 : 0;
|
|
21366
21409
|
}
|
|
21367
|
-
var
|
|
21410
|
+
var Dc = {
|
|
21368
21411
|
exports: {}
|
|
21369
|
-
},
|
|
21412
|
+
}, Lc = function(e, t, n, i) {
|
|
21370
21413
|
var r = e[0], s = e[1], o = !1;
|
|
21371
21414
|
void 0 === n && (n = 0), void 0 === i && (i = t.length);
|
|
21372
21415
|
for (var a = (i - n) / 2, l = 0, h = a - 1; l < a; h = l++) {
|
|
@@ -21374,7 +21417,7 @@
|
|
|
21374
21417
|
u > s != d > s && r < (f - c) * (s - u) / (d - u) + c && (o = !o);
|
|
21375
21418
|
}
|
|
21376
21419
|
return o;
|
|
21377
|
-
},
|
|
21420
|
+
}, Hc = function(e, t, n, i) {
|
|
21378
21421
|
var r = e[0], s = e[1], o = !1;
|
|
21379
21422
|
void 0 === n && (n = 0), void 0 === i && (i = t.length);
|
|
21380
21423
|
for (var a = i - n, l = 0, h = a - 1; l < a; h = l++) {
|
|
@@ -21383,13 +21426,13 @@
|
|
|
21383
21426
|
}
|
|
21384
21427
|
return o;
|
|
21385
21428
|
};
|
|
21386
|
-
|
|
21387
|
-
return t.length > 0 && Array.isArray(t[0]) ?
|
|
21429
|
+
Dc.exports = function(e, t, n, i) {
|
|
21430
|
+
return t.length > 0 && Array.isArray(t[0]) ? Hc(e, t, n, i) : Lc(e, t, n, i);
|
|
21388
21431
|
};
|
|
21389
|
-
var
|
|
21390
|
-
|
|
21391
|
-
const
|
|
21392
|
-
function
|
|
21432
|
+
var Nc = Dc.exports.nested = Hc;
|
|
21433
|
+
Dc.exports.flat = Lc;
|
|
21434
|
+
const zc = 11102230246251565e-32, Vc = 134217729, Uc = (3 + 8 * zc) * zc;
|
|
21435
|
+
function Bc(e, t, n, i, r) {
|
|
21393
21436
|
let s, o, a, l, h = t[0], c = i[0], u = 0, f = 0;
|
|
21394
21437
|
c > h == c > -h ? (s = h, h = t[++u]) : (s = c, c = i[++f]);
|
|
21395
21438
|
let d = 0;
|
|
@@ -21403,57 +21446,57 @@
|
|
|
21403
21446
|
0 !== a && (r[d++] = a);
|
|
21404
21447
|
return 0 === s && 0 !== d || (r[d++] = s), d;
|
|
21405
21448
|
}
|
|
21406
|
-
function
|
|
21449
|
+
function Gc(e) {
|
|
21407
21450
|
return new Float64Array(e);
|
|
21408
21451
|
}
|
|
21409
|
-
const
|
|
21410
|
-
function
|
|
21452
|
+
const jc = 33306690738754716e-32, Wc = 22204460492503146e-32, Xc = 11093356479670487e-47, Yc = Gc(4), Zc = Gc(8), qc = Gc(12), $c = Gc(16), Jc = Gc(4);
|
|
21453
|
+
function Kc(e, t, n, i, r, s) {
|
|
21411
21454
|
const o = (t - s) * (n - r), a = (e - r) * (i - s), l = o - a;
|
|
21412
21455
|
if (0 === o || 0 === a || o > 0 != a > 0) return l;
|
|
21413
21456
|
const h = Math.abs(o + a);
|
|
21414
|
-
return Math.abs(l) >=
|
|
21457
|
+
return Math.abs(l) >= jc * h ? l : -function(e, t, n, i, r, s, o) {
|
|
21415
21458
|
let a, l, h, c, u, f, d, p, g, m, y, x, _, v, b, A, T, w;
|
|
21416
|
-
const
|
|
21417
|
-
v =
|
|
21418
|
-
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = P *
|
|
21419
|
-
p = P - d, f =
|
|
21420
|
-
y = b - T, u = b - y,
|
|
21421
|
-
y = _ - A, u = _ - y,
|
|
21422
|
-
|
|
21459
|
+
const S = e - r, M = n - r, P = t - s, I = i - s;
|
|
21460
|
+
v = S * I, f = Vc * S, d = f - (f - S), p = S - d, f = Vc * I, g = f - (f - I),
|
|
21461
|
+
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = P * M, f = Vc * P, d = f - (f - P),
|
|
21462
|
+
p = P - d, f = Vc * M, g = f - (f - M), m = M - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21463
|
+
y = b - T, u = b - y, Yc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
|
|
21464
|
+
y = _ - A, u = _ - y, Yc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Yc[2] = x - (w - u) + (y - u),
|
|
21465
|
+
Yc[3] = w;
|
|
21423
21466
|
let C = function(e, t) {
|
|
21424
21467
|
let n = t[0];
|
|
21425
21468
|
for (let i = 1; i < e; i++) n += t[i];
|
|
21426
21469
|
return n;
|
|
21427
|
-
}(4,
|
|
21470
|
+
}(4, Yc), k = Wc * o;
|
|
21428
21471
|
if (C >= k || -C >= k) return C;
|
|
21429
|
-
if (u = e -
|
|
21472
|
+
if (u = e - S, a = e - (S + u) + (u - r), u = n - M, h = n - (M + u) + (u - r),
|
|
21430
21473
|
u = t - P, l = t - (P + u) + (u - s), u = i - I, c = i - (I + u) + (u - s), 0 === a && 0 === l && 0 === h && 0 === c) return C;
|
|
21431
|
-
if (k =
|
|
21432
|
-
v = a * I, f =
|
|
21433
|
-
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = l *
|
|
21434
|
-
p = l - d, f =
|
|
21435
|
-
y = b - T, u = b - y,
|
|
21436
|
-
y = _ - A, u = _ - y,
|
|
21437
|
-
|
|
21438
|
-
const O =
|
|
21439
|
-
v =
|
|
21440
|
-
m = c - g, b = p * m - (v - d * g - p * g - d * m), A = P * h, f =
|
|
21441
|
-
p = P - d, f =
|
|
21442
|
-
y = b - T, u = b - y,
|
|
21443
|
-
y = _ - A, u = _ - y,
|
|
21444
|
-
|
|
21445
|
-
const F =
|
|
21446
|
-
v = a * c, f =
|
|
21447
|
-
m = c - g, b = p * m - (v - d * g - p * g - d * m), A = l * h, f =
|
|
21448
|
-
p = l - d, f =
|
|
21449
|
-
y = b - T, u = b - y,
|
|
21450
|
-
y = _ - A, u = _ - y,
|
|
21451
|
-
|
|
21452
|
-
const R =
|
|
21453
|
-
return
|
|
21474
|
+
if (k = Xc * o + Uc * Math.abs(C), C += S * c + I * a - (P * h + M * l), C >= k || -C >= k) return C;
|
|
21475
|
+
v = a * I, f = Vc * a, d = f - (f - a), p = a - d, f = Vc * I, g = f - (f - I),
|
|
21476
|
+
m = I - g, b = p * m - (v - d * g - p * g - d * m), A = l * M, f = Vc * l, d = f - (f - l),
|
|
21477
|
+
p = l - d, f = Vc * M, g = f - (f - M), m = M - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21478
|
+
y = b - T, u = b - y, Jc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
|
|
21479
|
+
y = _ - A, u = _ - y, Jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Jc[2] = x - (w - u) + (y - u),
|
|
21480
|
+
Jc[3] = w;
|
|
21481
|
+
const O = Bc(4, Yc, 4, Jc, Zc);
|
|
21482
|
+
v = S * c, f = Vc * S, d = f - (f - S), p = S - d, f = Vc * c, g = f - (f - c),
|
|
21483
|
+
m = c - g, b = p * m - (v - d * g - p * g - d * m), A = P * h, f = Vc * P, d = f - (f - P),
|
|
21484
|
+
p = P - d, f = Vc * h, g = f - (f - h), m = h - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21485
|
+
y = b - T, u = b - y, Jc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
|
|
21486
|
+
y = _ - A, u = _ - y, Jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Jc[2] = x - (w - u) + (y - u),
|
|
21487
|
+
Jc[3] = w;
|
|
21488
|
+
const F = Bc(O, Zc, 4, Jc, qc);
|
|
21489
|
+
v = a * c, f = Vc * a, d = f - (f - a), p = a - d, f = Vc * c, g = f - (f - c),
|
|
21490
|
+
m = c - g, b = p * m - (v - d * g - p * g - d * m), A = l * h, f = Vc * l, d = f - (f - l),
|
|
21491
|
+
p = l - d, f = Vc * h, g = f - (f - h), m = h - g, T = p * m - (A - d * g - p * g - d * m),
|
|
21492
|
+
y = b - T, u = b - y, Jc[0] = b - (y + u) + (u - T), x = v + y, u = x - v, _ = v - (x - u) + (y - u),
|
|
21493
|
+
y = _ - A, u = _ - y, Jc[1] = _ - (y + u) + (u - A), w = x + y, u = w - x, Jc[2] = x - (w - u) + (y - u),
|
|
21494
|
+
Jc[3] = w;
|
|
21495
|
+
const R = Bc(F, qc, 4, Jc, $c);
|
|
21496
|
+
return $c[R - 1];
|
|
21454
21497
|
}(e, t, n, i, r, s, h);
|
|
21455
21498
|
}
|
|
21456
|
-
function
|
|
21499
|
+
function Qc(e, t, n) {
|
|
21457
21500
|
t = Math.max(0, void 0 === t ? 2 : t), n = n || 0;
|
|
21458
21501
|
var i = function(e) {
|
|
21459
21502
|
for (var t = e[0], n = e[0], i = e[0], r = e[0], s = 0; s < e.length; s++) {
|
|
@@ -21461,20 +21504,20 @@
|
|
|
21461
21504
|
o[0] < t[0] && (t = o), o[0] > i[0] && (i = o), o[1] < n[1] && (n = o), o[1] > r[1] && (r = o);
|
|
21462
21505
|
}
|
|
21463
21506
|
var a = [ t, n, i, r ], l = a.slice();
|
|
21464
|
-
for (s = 0; s < e.length; s++)
|
|
21507
|
+
for (s = 0; s < e.length; s++) Nc(e[s], a) || l.push(e[s]);
|
|
21465
21508
|
return function(e) {
|
|
21466
|
-
e.sort(
|
|
21509
|
+
e.sort(uu);
|
|
21467
21510
|
for (var t = [], n = 0; n < e.length; n++) {
|
|
21468
|
-
for (;t.length >= 2 &&
|
|
21511
|
+
for (;t.length >= 2 && su(t[t.length - 2], t[t.length - 1], e[n]) <= 0; ) t.pop();
|
|
21469
21512
|
t.push(e[n]);
|
|
21470
21513
|
}
|
|
21471
21514
|
for (var i = [], r = e.length - 1; r >= 0; r--) {
|
|
21472
|
-
for (;i.length >= 2 &&
|
|
21515
|
+
for (;i.length >= 2 && su(i[i.length - 2], i[i.length - 1], e[r]) <= 0; ) i.pop();
|
|
21473
21516
|
i.push(e[r]);
|
|
21474
21517
|
}
|
|
21475
21518
|
return i.pop(), t.pop(), t.concat(i);
|
|
21476
21519
|
}(l);
|
|
21477
|
-
}(e), r = new
|
|
21520
|
+
}(e), r = new _c(16);
|
|
21478
21521
|
r.toBBox = function(e) {
|
|
21479
21522
|
return {
|
|
21480
21523
|
minX: e[0],
|
|
@@ -21489,16 +21532,16 @@
|
|
|
21489
21532
|
}, r.load(e);
|
|
21490
21533
|
for (var s, o = [], a = 0; a < i.length; a++) {
|
|
21491
21534
|
var l = i[a];
|
|
21492
|
-
r.remove(l), s =
|
|
21535
|
+
r.remove(l), s = au(l, s), o.push(s);
|
|
21493
21536
|
}
|
|
21494
|
-
var h = new
|
|
21495
|
-
for (a = 0; a < o.length; a++) h.insert(
|
|
21537
|
+
var h = new _c(16);
|
|
21538
|
+
for (a = 0; a < o.length; a++) h.insert(ou(o[a]));
|
|
21496
21539
|
for (var c = t * t, u = n * n; o.length; ) {
|
|
21497
|
-
var f = o.shift(), d = f.p, p = f.next.p, g =
|
|
21540
|
+
var f = o.shift(), d = f.p, p = f.next.p, g = lu(d, p);
|
|
21498
21541
|
if (!(g < u)) {
|
|
21499
21542
|
var m = g / c;
|
|
21500
|
-
(l =
|
|
21501
|
-
o.push(
|
|
21543
|
+
(l = eu(r, f.prev.p, d, p, f.next.next.p, m, h)) && Math.min(lu(l, d), lu(l, p)) <= m && (o.push(f),
|
|
21544
|
+
o.push(au(l, f)), r.remove(l), h.remove(f), h.insert(ou(f)), h.insert(ou(f.next)));
|
|
21502
21545
|
}
|
|
21503
21546
|
}
|
|
21504
21547
|
f = s;
|
|
@@ -21508,58 +21551,58 @@
|
|
|
21508
21551
|
} while (f !== s);
|
|
21509
21552
|
return y.push(f.p), y;
|
|
21510
21553
|
}
|
|
21511
|
-
function
|
|
21512
|
-
for (var a = new
|
|
21554
|
+
function eu(e, t, n, i, r, s, o) {
|
|
21555
|
+
for (var a = new Rc([], tu), l = e.data; l; ) {
|
|
21513
21556
|
for (var h = 0; h < l.children.length; h++) {
|
|
21514
|
-
var c = l.children[h], u = l.leaf ?
|
|
21557
|
+
var c = l.children[h], u = l.leaf ? hu(c, n, i) : nu(n, i, c);
|
|
21515
21558
|
u > s || a.push({
|
|
21516
21559
|
node: c,
|
|
21517
21560
|
dist: u
|
|
21518
21561
|
});
|
|
21519
21562
|
}
|
|
21520
21563
|
for (;a.length && !a.peek().node.children; ) {
|
|
21521
|
-
var f = a.pop(), d = f.node, p =
|
|
21522
|
-
if (f.dist < p && f.dist < g &&
|
|
21564
|
+
var f = a.pop(), d = f.node, p = hu(d, t, n), g = hu(d, i, r);
|
|
21565
|
+
if (f.dist < p && f.dist < g && ru(n, d, o) && ru(i, d, o)) return d;
|
|
21523
21566
|
}
|
|
21524
21567
|
(l = a.pop()) && (l = l.node);
|
|
21525
21568
|
}
|
|
21526
21569
|
return null;
|
|
21527
21570
|
}
|
|
21528
|
-
function
|
|
21571
|
+
function tu(e, t) {
|
|
21529
21572
|
return e.dist - t.dist;
|
|
21530
21573
|
}
|
|
21531
|
-
function
|
|
21532
|
-
if (
|
|
21533
|
-
var i =
|
|
21574
|
+
function nu(e, t, n) {
|
|
21575
|
+
if (iu(e, n) || iu(t, n)) return 0;
|
|
21576
|
+
var i = cu(e[0], e[1], t[0], t[1], n.minX, n.minY, n.maxX, n.minY);
|
|
21534
21577
|
if (0 === i) return 0;
|
|
21535
|
-
var r =
|
|
21578
|
+
var r = cu(e[0], e[1], t[0], t[1], n.minX, n.minY, n.minX, n.maxY);
|
|
21536
21579
|
if (0 === r) return 0;
|
|
21537
|
-
var s =
|
|
21580
|
+
var s = cu(e[0], e[1], t[0], t[1], n.maxX, n.minY, n.maxX, n.maxY);
|
|
21538
21581
|
if (0 === s) return 0;
|
|
21539
|
-
var o =
|
|
21582
|
+
var o = cu(e[0], e[1], t[0], t[1], n.minX, n.maxY, n.maxX, n.maxY);
|
|
21540
21583
|
return 0 === o ? 0 : Math.min(i, r, s, o);
|
|
21541
21584
|
}
|
|
21542
|
-
function
|
|
21585
|
+
function iu(e, t) {
|
|
21543
21586
|
return e[0] >= t.minX && e[0] <= t.maxX && e[1] >= t.minY && e[1] <= t.maxY;
|
|
21544
21587
|
}
|
|
21545
|
-
function
|
|
21588
|
+
function ru(e, t, n) {
|
|
21546
21589
|
for (var i, r, s, o, a = Math.min(e[0], t[0]), l = Math.min(e[1], t[1]), h = Math.max(e[0], t[0]), c = Math.max(e[1], t[1]), u = n.search({
|
|
21547
21590
|
minX: a,
|
|
21548
21591
|
minY: l,
|
|
21549
21592
|
maxX: h,
|
|
21550
21593
|
maxY: c
|
|
21551
|
-
}), f = 0; f < u.length; f++) if (i = u[f].p, r = u[f].next.p, s = e, i !== (o = t) && r !== s &&
|
|
21594
|
+
}), f = 0; f < u.length; f++) if (i = u[f].p, r = u[f].next.p, s = e, i !== (o = t) && r !== s && su(i, r, s) > 0 != su(i, r, o) > 0 && su(s, o, i) > 0 != su(s, o, r) > 0) return !1;
|
|
21552
21595
|
return !0;
|
|
21553
21596
|
}
|
|
21554
|
-
function
|
|
21555
|
-
return
|
|
21597
|
+
function su(e, t, n) {
|
|
21598
|
+
return Kc(e[0], e[1], t[0], t[1], n[0], n[1]);
|
|
21556
21599
|
}
|
|
21557
|
-
function
|
|
21600
|
+
function ou(e) {
|
|
21558
21601
|
var t = e.p, n = e.next.p;
|
|
21559
21602
|
return e.minX = Math.min(t[0], n[0]), e.minY = Math.min(t[1], n[1]), e.maxX = Math.max(t[0], n[0]),
|
|
21560
21603
|
e.maxY = Math.max(t[1], n[1]), e;
|
|
21561
21604
|
}
|
|
21562
|
-
function
|
|
21605
|
+
function au(e, t) {
|
|
21563
21606
|
var n = {
|
|
21564
21607
|
p: e,
|
|
21565
21608
|
prev: null,
|
|
@@ -21572,11 +21615,11 @@
|
|
|
21572
21615
|
return t ? (n.next = t.next, n.prev = t, t.next.prev = n, t.next = n) : (n.prev = n,
|
|
21573
21616
|
n.next = n), n;
|
|
21574
21617
|
}
|
|
21575
|
-
function
|
|
21618
|
+
function lu(e, t) {
|
|
21576
21619
|
var n = e[0] - t[0], i = e[1] - t[1];
|
|
21577
21620
|
return n * n + i * i;
|
|
21578
21621
|
}
|
|
21579
|
-
function
|
|
21622
|
+
function hu(e, t, n) {
|
|
21580
21623
|
var i = t[0], r = t[1], s = n[0] - i, o = n[1] - r;
|
|
21581
21624
|
if (0 !== s || 0 !== o) {
|
|
21582
21625
|
var a = ((e[0] - i) * s + (e[1] - r) * o) / (s * s + o * o);
|
|
@@ -21584,25 +21627,25 @@
|
|
|
21584
21627
|
}
|
|
21585
21628
|
return (s = e[0] - i) * s + (o = e[1] - r) * o;
|
|
21586
21629
|
}
|
|
21587
|
-
function
|
|
21588
|
-
var l, h, c, u, f = n - e, d = i - t, p = o - r, g = a - s, m = e - r, y = t - s, x = f * f + d * d, _ = f * p + d * g, v = p * p + g * g, b = f * m + d * y, A = p * m + g * y, T = x * v - _ * _, w = T,
|
|
21589
|
-
0 === T ? (h = 0, w = 1, u = A,
|
|
21590
|
-
u = A,
|
|
21591
|
-
w = x)) : u >
|
|
21630
|
+
function cu(e, t, n, i, r, s, o, a) {
|
|
21631
|
+
var l, h, c, u, f = n - e, d = i - t, p = o - r, g = a - s, m = e - r, y = t - s, x = f * f + d * d, _ = f * p + d * g, v = p * p + g * g, b = f * m + d * y, A = p * m + g * y, T = x * v - _ * _, w = T, S = T;
|
|
21632
|
+
0 === T ? (h = 0, w = 1, u = A, S = v) : (u = x * A - _ * b, (h = _ * A - v * b) < 0 ? (h = 0,
|
|
21633
|
+
u = A, S = v) : h > w && (h = w, u = A + _, S = v)), u < 0 ? (u = 0, -b < 0 ? h = 0 : -b > x ? h = w : (h = -b,
|
|
21634
|
+
w = x)) : u > S && (u = S, -b + _ < 0 ? h = 0 : -b + _ > x ? h = w : (h = -b + _,
|
|
21592
21635
|
w = x));
|
|
21593
|
-
var
|
|
21594
|
-
return
|
|
21636
|
+
var M = (1 - (c = 0 === u ? 0 : u / S)) * r + c * o - ((1 - (l = 0 === h ? 0 : h / w)) * e + l * n), P = (1 - c) * s + c * a - ((1 - l) * t + l * i);
|
|
21637
|
+
return M * M + P * P;
|
|
21595
21638
|
}
|
|
21596
|
-
function
|
|
21639
|
+
function uu(e, t) {
|
|
21597
21640
|
return e[0] === t[0] ? e[1] - t[1] : e[0] - t[0];
|
|
21598
21641
|
}
|
|
21599
|
-
const {PackUtil:
|
|
21600
|
-
class
|
|
21642
|
+
const {PackUtil: fu} = h();
|
|
21643
|
+
class du {
|
|
21601
21644
|
constructor(e, t) {
|
|
21602
21645
|
this.x = e, this.y = t;
|
|
21603
21646
|
}
|
|
21604
21647
|
clone() {
|
|
21605
|
-
return new
|
|
21648
|
+
return new du(this.x, this.y);
|
|
21606
21649
|
}
|
|
21607
21650
|
normalize() {
|
|
21608
21651
|
const e = this.length();
|
|
@@ -21615,7 +21658,7 @@
|
|
|
21615
21658
|
return Math.sqrt(this.x * this.x + this.y * this.y);
|
|
21616
21659
|
}
|
|
21617
21660
|
diff(e) {
|
|
21618
|
-
return new
|
|
21661
|
+
return new du(this.x - e.x, this.y - e.y);
|
|
21619
21662
|
}
|
|
21620
21663
|
distance(e) {
|
|
21621
21664
|
const t = this.x - e.x, n = this.y - e.y;
|
|
@@ -21628,48 +21671,48 @@
|
|
|
21628
21671
|
return this.x === e.x && this.y === e.y;
|
|
21629
21672
|
}
|
|
21630
21673
|
orthogonal() {
|
|
21631
|
-
return new
|
|
21674
|
+
return new du(this.y, -this.x);
|
|
21632
21675
|
}
|
|
21633
21676
|
}
|
|
21634
|
-
function
|
|
21677
|
+
function pu(e, t, n, i) {
|
|
21635
21678
|
const r = t.x * i.y - t.y * i.x, s = n.x - e.x, o = n.y - e.y, a = (s * i.y - o * i.x) / r;
|
|
21636
|
-
return new
|
|
21679
|
+
return new du(e.x + a * t.x, e.y + a * t.y);
|
|
21637
21680
|
}
|
|
21638
|
-
const
|
|
21639
|
-
function
|
|
21681
|
+
const gu = [], mu = [];
|
|
21682
|
+
function yu(e) {
|
|
21640
21683
|
if (Ee(e[0] && e[0].x)) {
|
|
21641
21684
|
const t = [];
|
|
21642
21685
|
let n = 0;
|
|
21643
|
-
for (let i = 0; i < e.length; i++)
|
|
21644
|
-
t.push(
|
|
21686
|
+
for (let i = 0; i < e.length; i++) mu[n] ? (mu[n][0] = e[i].x, mu[n][1] = e[i].y) : mu[n] = [ e[i].x, e[i].y ],
|
|
21687
|
+
t.push(mu[n]), n++;
|
|
21645
21688
|
e = t;
|
|
21646
21689
|
}
|
|
21647
21690
|
try {
|
|
21648
|
-
const t =
|
|
21691
|
+
const t = Qc(e, 1 / 0);
|
|
21649
21692
|
let n = [ 1 / 0, 1 / 0 ], i = [ -1 / 0, -1 / 0 ];
|
|
21650
21693
|
for (let e = 0; e < t.length; e++) t[e][0] < n[0] && (n[0] = t[e][0]), t[e][0] > i[0] && (i[0] = t[e][0]),
|
|
21651
21694
|
t[e][1] < n[1] && (n[1] = t[e][1]), t[e][1] > i[1] && (i[1] = t[e][1]);
|
|
21652
21695
|
const r = [];
|
|
21653
21696
|
let s = [], o = 0;
|
|
21654
|
-
for (let e = 0; e < t.length; e++) e === t.length - 1 && t[e][0] === t[0][0] && t[e][1] === t[0][1] || (
|
|
21655
|
-
|
|
21697
|
+
for (let e = 0; e < t.length; e++) e === t.length - 1 && t[e][0] === t[0][0] && t[e][1] === t[0][1] || (ql(r, t[e]),
|
|
21698
|
+
gu[o] ? (gu[o].x = r[0], gu[o].y = r[1]) : gu[o] = new du(r[0], r[1]), s.push(gu[o]),
|
|
21656
21699
|
o++);
|
|
21657
|
-
|
|
21700
|
+
fu.calculateSignedArea(s) < 0 && (s = s.reverse());
|
|
21658
21701
|
const a = function(e) {
|
|
21659
21702
|
let t, n = Number.MAX_VALUE;
|
|
21660
21703
|
const i = function(e, i, r, s, o, a, l, h) {
|
|
21661
|
-
var c =
|
|
21704
|
+
var c = pu(e, i, o, a), u = pu(r, s, o, a), f = pu(l, h, e, i), d = pu(l, h, r, s), p = c.distance(u) * c.distance(f);
|
|
21662
21705
|
0 !== p && p < n && (t = [ c, f, d, u ], n = p);
|
|
21663
21706
|
};
|
|
21664
21707
|
var r = [];
|
|
21665
21708
|
for (let t = 0; t < e.length; t++) r.push(e[(t + 1) % e.length].diff(e[t])), r[t].normalize();
|
|
21666
|
-
var s, o, a, l, h = new
|
|
21709
|
+
var s, o, a, l, h = new du(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY), c = new du(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
|
|
21667
21710
|
for (let t = 0; t < e.length; t++) {
|
|
21668
21711
|
var u = e[t];
|
|
21669
21712
|
u.x < h.x && (h.x = u.x, s = t), u.x > c.x && (c.x = u.x, o = t), u.y < h.y && (h.y = u.y,
|
|
21670
21713
|
l = t), u.y > c.y && (c.y = u.y, a = t);
|
|
21671
21714
|
}
|
|
21672
|
-
var f = new
|
|
21715
|
+
var f = new du(0, -1), d = new du(0, 1), p = new du(-1, 0), g = new du(1, 0);
|
|
21673
21716
|
for (let t = 0; t < e.length; t++) {
|
|
21674
21717
|
var m = [ Math.acos(f.dot(r[s])), Math.acos(d.dot(r[o])), Math.acos(p.dot(r[a])), Math.acos(g.dot(r[l])) ];
|
|
21675
21718
|
switch (m.indexOf(Math.min.apply(Math, m))) {
|
|
@@ -21703,10 +21746,10 @@
|
|
|
21703
21746
|
return null;
|
|
21704
21747
|
}
|
|
21705
21748
|
}
|
|
21706
|
-
const {DEFAULT_TEX_WIDTH:
|
|
21707
|
-
class
|
|
21749
|
+
const {DEFAULT_TEX_WIDTH: xu} = h();
|
|
21750
|
+
class _u extends ln {
|
|
21708
21751
|
static fromJSON(e) {
|
|
21709
|
-
return
|
|
21752
|
+
return Il(e, "ExtrudePolygonLayer", _u);
|
|
21710
21753
|
}
|
|
21711
21754
|
getPolygonOffsetCount() {
|
|
21712
21755
|
return 0;
|
|
@@ -21738,11 +21781,11 @@
|
|
|
21738
21781
|
return n && n.updateDataConfig(e, t), this;
|
|
21739
21782
|
}
|
|
21740
21783
|
}
|
|
21741
|
-
|
|
21784
|
+
_u.registerJSONType("ExtrudePolygonLayer"), _u.mergeOptions({
|
|
21742
21785
|
cullFace: !1,
|
|
21743
21786
|
castShadow: !0
|
|
21744
21787
|
});
|
|
21745
|
-
const
|
|
21788
|
+
const vu = {
|
|
21746
21789
|
polygonFill: {
|
|
21747
21790
|
type: "identity",
|
|
21748
21791
|
default: [ 1, 1, 1, 1 ],
|
|
@@ -21763,10 +21806,10 @@
|
|
|
21763
21806
|
default: [ 1, 1, 1, 1 ],
|
|
21764
21807
|
property: "_symbol_bottomPolygonFill"
|
|
21765
21808
|
}
|
|
21766
|
-
},
|
|
21809
|
+
}, bu = {
|
|
21767
21810
|
defaultAltitude: 20
|
|
21768
|
-
},
|
|
21769
|
-
|
|
21811
|
+
}, Au = e => 1 === e.properties.top;
|
|
21812
|
+
_u.registerRenderer("gl", class extends Ll {
|
|
21770
21813
|
constructor(...e) {
|
|
21771
21814
|
super(...e), this.GeometryTypes = [ r.Polygon, r.MultiPolygon ];
|
|
21772
21815
|
}
|
|
@@ -21803,8 +21846,8 @@
|
|
|
21803
21846
|
}
|
|
21804
21847
|
createPainter() {
|
|
21805
21848
|
const e = ln.get3DPainterClass("lit");
|
|
21806
|
-
this.painterSymbol = Fe({},
|
|
21807
|
-
const t = this.layer, n = Fe({},
|
|
21849
|
+
this.painterSymbol = Fe({}, vu), this.sidePainterSymbol = Fe({}, vu), this._defineSymbolBloom(this.painterSymbol, e.getBloomSymbol());
|
|
21850
|
+
const t = this.layer, n = Fe({}, bu, t.options.dataConfig || {});
|
|
21808
21851
|
t.options.material && (this.painterSymbol.material = t.options.material), t.options.sideMaterial ? this.sidePainterSymbol.material = t.options.sideMaterial : this.sidePainterSymbol.material = t.options.material;
|
|
21809
21852
|
const i = {
|
|
21810
21853
|
cullFace: t.options.cullFace
|
|
@@ -21829,9 +21872,9 @@
|
|
|
21829
21872
|
}
|
|
21830
21873
|
_renderMeshes(...e) {
|
|
21831
21874
|
const t = e[0], n = t.sceneFilter;
|
|
21832
|
-
t.sceneFilter = e => (!n || n(e)) &&
|
|
21875
|
+
t.sceneFilter = e => (!n || n(e)) && Au(e);
|
|
21833
21876
|
const i = super._renderMeshes(...e);
|
|
21834
|
-
t.sceneFilter = e => (!n || n(e)) &&
|
|
21877
|
+
t.sceneFilter = e => (!n || n(e)) && Au(e);
|
|
21835
21878
|
const r = this.painter;
|
|
21836
21879
|
this.painter = this.sidePainter;
|
|
21837
21880
|
const s = t.sceneFilter = e => (!n || n(e)) && (e => 1 === e.properties.side)(e);
|
|
@@ -21856,12 +21899,12 @@
|
|
|
21856
21899
|
}
|
|
21857
21900
|
_createPackData(e, t, n, i) {
|
|
21858
21901
|
const s = this.getMap();
|
|
21859
|
-
t =
|
|
21860
|
-
const o = this._extrudeCenter, a = 1 / 0, l = s.getZoom(), h = new r.Point(0, 0), c = new r.Coordinate(0, 0), u = Fe({},
|
|
21902
|
+
t = vu;
|
|
21903
|
+
const o = this._extrudeCenter, a = 1 / 0, l = s.getZoom(), h = new r.Point(0, 0), c = new r.Coordinate(0, 0), u = Fe({}, bu, this.layer.options.dataConfig);
|
|
21861
21904
|
if (u.uv = !0, u.top && (u.top = n), u.side && (u.side = i), !1 === u.top && !1 === u.side) return null;
|
|
21862
21905
|
if (!e.length) return null;
|
|
21863
|
-
const f = s.getGLRes(), d = s.getProjection().code, p = n ? this.painterSymbol && this.painterSymbol.material : this.sidePainterSymbol && this.sidePainterSymbol.material, g = p && p.textureWidth ||
|
|
21864
|
-
return
|
|
21906
|
+
const f = s.getGLRes(), d = s.getProjection().code, p = n ? this.painterSymbol && this.painterSymbol.material : this.sidePainterSymbol && this.sidePainterSymbol.material, g = p && p.textureWidth || xu, m = [ Ft(s, 1, c, f) / 100, Ft(s, 1, c, f, 1) / 100 ];
|
|
21907
|
+
return fc(e, u, a, h, g, s.getGLRes(), 1, 1, m, this._zScale, t, l, d, undefined, Float32Array, o);
|
|
21865
21908
|
}
|
|
21866
21909
|
updateMesh(e) {
|
|
21867
21910
|
const t = e[ir];
|
|
@@ -21880,11 +21923,11 @@
|
|
|
21880
21923
|
const n = [];
|
|
21881
21924
|
for (let e = 0; e < t.length; e++) {
|
|
21882
21925
|
const i = t[e] && t[e][0];
|
|
21883
|
-
n[e] =
|
|
21926
|
+
n[e] = yu(i);
|
|
21884
21927
|
}
|
|
21885
21928
|
e.getProperties()[lt] = n;
|
|
21886
21929
|
} else {
|
|
21887
|
-
const n =
|
|
21930
|
+
const n = yu(t[0]);
|
|
21888
21931
|
e.getProperties()[lt] = n;
|
|
21889
21932
|
}
|
|
21890
21933
|
}
|
|
@@ -21903,11 +21946,11 @@
|
|
|
21903
21946
|
getShadowMeshes() {
|
|
21904
21947
|
return this.painter ? this.painter.getShadowMeshes() : [];
|
|
21905
21948
|
}
|
|
21906
|
-
}),
|
|
21907
|
-
const {PackUtil:
|
|
21949
|
+
}), _u.registerRenderer("canvas", null);
|
|
21950
|
+
const {PackUtil: Tu, FilterUtil: wu, SYMBOLS_NEED_REBUILD_IN_VT: Su, SYMBOLS_NEED_REBUILD_IN_VECTOR: Mu} = h();
|
|
21908
21951
|
n.reshader.ShaderLib.register("vt_position_vert", "#ifdef HAS_TERRAIN_ALTITUDE\n attribute float aTerrainAltitude;\n#endif\nuniform float minAltitude;\n#ifdef HAS_ALTITUDE\n vec3 unpackVTPosition() {\n float altitude = aAltitude;\n #ifdef HAS_TERRAIN_ALTITUDE\n altitude += aTerrainAltitude * 100.0;\n #endif\n altitude += minAltitude * 100.0;\n return vec3(aPosition, altitude);\n }\n#else\n float position_modValue = 16384.0;\n float position_delta = 0.00001;\n vec3 unpackVTPosition() {\n float z = aPosition.z;\n vec2 pos = sign(aPosition.xy + position_delta) * mod(abs(aPosition.xy), position_modValue);\n vec2 highs = floor(abs(aPosition.xy) / position_modValue);\n float altitude = sign(z + position_delta) * (highs.x * 2.0 + highs.y) * pow(2.0, 15.0) + z;\n #ifdef HAS_TERRAIN_ALTITUDE\n altitude += aTerrainAltitude * 100.0;\n #endif\n altitude += minAltitude * 100.0;\n return vec3(pos, altitude);\n }\n#endif");
|
|
21909
21952
|
s.mat4.create();
|
|
21910
|
-
const
|
|
21953
|
+
const Pu = function(e, t) {
|
|
21911
21954
|
const n = e.toString(), i = n.indexOf("{") + 1, r = n.substring(0, i);
|
|
21912
21955
|
let s = `${r}\n (` + t.toString() + ")({});\n";
|
|
21913
21956
|
return s += "\n" + n.substring(r.length), s;
|
|
@@ -21915,21 +21958,21 @@
|
|
|
21915
21958
|
if (s.transcoders) {
|
|
21916
21959
|
const e = r.Map.VERSION;
|
|
21917
21960
|
if (e.indexOf("1.0.0-beta") >= 0 || e.indexOf("1.0.0-alpha") >= 0) {
|
|
21918
|
-
const e = s.transcoders.inject(
|
|
21961
|
+
const e = s.transcoders.inject(Pu);
|
|
21919
21962
|
r.registerWorkerAdapter("@maptalks/vt", e);
|
|
21920
21963
|
} else r.registerWorkerAdapter("@maptalks/vt", (function() {
|
|
21921
|
-
return s.transcoders.inject(
|
|
21964
|
+
return s.transcoders.inject(Pu);
|
|
21922
21965
|
}));
|
|
21923
|
-
} else r.registerWorkerAdapter("@maptalks/vt",
|
|
21924
|
-
e.ExtrudePolygonLayer =
|
|
21925
|
-
e.GLTFPhongPlugin =
|
|
21926
|
-
e.HeatmapPlugin =
|
|
21927
|
-
e.LinePainter = $i, e.LinePlugin =
|
|
21928
|
-
e.MapboxVectorTileLayer =
|
|
21929
|
-
e.NativePointPainter = Uo, e.PackUtil =
|
|
21930
|
-
e.PointLayer =
|
|
21931
|
-
e.TextPainter = Lo, e.TextPlugin =
|
|
21932
|
-
e.VectorTileLayer = en, e.VectorTileLayerRenderer = Ut, e.WaterPlugin =
|
|
21933
|
-
e.WireframePlugin =
|
|
21966
|
+
} else r.registerWorkerAdapter("@maptalks/vt", Pu);
|
|
21967
|
+
e.ExtrudePolygonLayer = _u, e.FillPainter = Xi, e.FillPlugin = Va, e.FilterUtil = wu,
|
|
21968
|
+
e.GLTFPhongPlugin = $a, e.GLTFStandardPlugin = Ja, e.GeoJSONVectorTileLayer = nl,
|
|
21969
|
+
e.HeatmapPlugin = Ka, e.IconPainter = js, e.IconPlugin = Ga, e.LineGradientPlugin = Ba,
|
|
21970
|
+
e.LinePainter = $i, e.LinePlugin = Ua, e.LineStringLayer = Ol, e.LitPlugin = Za,
|
|
21971
|
+
e.MapboxVectorTileLayer = el, e.NativeLinePainter = jo, e.NativeLinePlugin = Wa,
|
|
21972
|
+
e.NativePointPainter = Uo, e.PackUtil = Tu, e.PhongPainter = ra, e.PhongPlugin = Xa,
|
|
21973
|
+
e.PointLayer = Cl, e.PolygonLayer = El, e.SYMBOLS_NEED_REBUILD_IN_VECTOR = Mu, e.SYMBOLS_NEED_REBUILD_IN_VT = Su,
|
|
21974
|
+
e.TextPainter = Lo, e.TextPlugin = ja, e.TubePlugin = qa, e.Vector3DLayer = ln,
|
|
21975
|
+
e.VectorTileLayer = en, e.VectorTileLayerRenderer = Ut, e.WaterPlugin = Qa, e.WireframePainter = oa,
|
|
21976
|
+
e.WireframePlugin = Ya, "undefined" != typeof console && console.log("@maptalks/vt v0.106.0");
|
|
21934
21977
|
}));
|
|
21935
21978
|
//# sourceMappingURL=maptalks.vt.js.map
|