@maptalks/vt 0.92.1 → 0.92.3
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.es.js +389 -373
- package/dist/maptalks.vt.js +636 -621
- package/package.json +5 -5
package/dist/maptalks.vt.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.92.
|
|
2
|
+
* @maptalks/vt v0.92.3
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2024 maptalks.org
|
|
5
5
|
*/
|
|
@@ -2276,13 +2276,14 @@ he.prototype._getTileZoom = function(e) {
|
|
|
2276
2276
|
schema: !1,
|
|
2277
2277
|
cascadeTiles: !0,
|
|
2278
2278
|
collision: !0,
|
|
2279
|
+
collisionBuffserSize: 0,
|
|
2279
2280
|
picking: !0,
|
|
2280
2281
|
pickingPoint: !0,
|
|
2281
2282
|
pickingGeometry: !1,
|
|
2282
2283
|
glyphSdfLimitPerFrame: 15,
|
|
2283
2284
|
tileLimitPerFrame: 1,
|
|
2284
|
-
loadingLimitOnInteracting:
|
|
2285
|
-
loadingLimit:
|
|
2285
|
+
loadingLimitOnInteracting: 5,
|
|
2286
|
+
loadingLimit: 0,
|
|
2286
2287
|
antialias: !1,
|
|
2287
2288
|
iconErrorUrl: null,
|
|
2288
2289
|
collisionFrameLimit: 1.5,
|
|
@@ -2549,6 +2550,7 @@ we.mergeOptions({
|
|
|
2549
2550
|
pickingPoint: !0,
|
|
2550
2551
|
renderer: "gl",
|
|
2551
2552
|
collision: !1,
|
|
2553
|
+
collisionBufferSize: 0,
|
|
2552
2554
|
textGamma: 1,
|
|
2553
2555
|
geometryEvents: !0,
|
|
2554
2556
|
styleScale: 1,
|
|
@@ -3244,7 +3246,8 @@ class Le extends t.renderer.CanvasRenderer {
|
|
|
3244
3246
|
});
|
|
3245
3247
|
}
|
|
3246
3248
|
cn() {
|
|
3247
|
-
if (this.ln && (this.On(this.ln[0], this.Xe), this.On(this.ln[1], this.Ye)
|
|
3249
|
+
if (this.ln && (this.On(this.ln[0], this.Xe), this.On(this.ln[1], this.Ye), this.ln[0] && this.Ze.prepareCollideIndex(this.ln[0].geometry),
|
|
3250
|
+
this.ln[1] && this.Ze.prepareCollideIndex(this.ln[1].geometry)), this.hn) for (let t = 0; t < this.hn.length; t++) this.On(this.hn[t], this.$e);
|
|
3248
3251
|
if (this.meshes) for (let t = 0; t < this.meshes.length; t++) this.On(this.meshes[t], this.Ge);
|
|
3249
3252
|
}
|
|
3250
3253
|
On(t, e) {
|
|
@@ -6521,6 +6524,10 @@ class nr extends Bi {
|
|
|
6521
6524
|
paint(t) {
|
|
6522
6525
|
this.isShadowIncludeChanged(t) && (this.shader.dispose(), this.br(t)), super.paint(t);
|
|
6523
6526
|
}
|
|
6527
|
+
isEnableStencil(t) {
|
|
6528
|
+
const e = this.layer.getRenderer();
|
|
6529
|
+
return !(!!(t && t.isRenderingTerrain && this.isTerrainSkin()) || !e.isEnableTileStencil || !e.isEnableTileStencil()) && "VectorTileLayer" === this.layer.getJSONType();
|
|
6530
|
+
}
|
|
6524
6531
|
init(t) {
|
|
6525
6532
|
const e = this.regl, i = this.canvas, s = {
|
|
6526
6533
|
x: (t, e) => e.viewport ? e.viewport.x : 0,
|
|
@@ -6529,18 +6536,18 @@ class nr extends Bi {
|
|
|
6529
6536
|
height: (t, e) => e.viewport ? e.viewport.height : i ? i.height : 1
|
|
6530
6537
|
};
|
|
6531
6538
|
this.renderer = new n.Renderer(e);
|
|
6532
|
-
const o =
|
|
6539
|
+
const o = this.layer.getRenderer(), a = {
|
|
6533
6540
|
viewport: s,
|
|
6534
6541
|
stencil: {
|
|
6535
|
-
enable: () =>
|
|
6542
|
+
enable: () => this.isEnableStencil(t),
|
|
6536
6543
|
func: {
|
|
6537
|
-
cmp: () =>
|
|
6538
|
-
ref: (t, e) =>
|
|
6544
|
+
cmp: () => o.isEnableTileStencil && o.isEnableTileStencil() ? "=" : "<=",
|
|
6545
|
+
ref: (t, e) => o.isEnableTileStencil && o.isEnableTileStencil() ? e.stencilRef : e.level
|
|
6539
6546
|
},
|
|
6540
6547
|
op: {
|
|
6541
6548
|
fail: "keep",
|
|
6542
6549
|
zfail: "keep",
|
|
6543
|
-
zpass: () =>
|
|
6550
|
+
zpass: () => o.isEnableTileStencil && o.isEnableTileStencil() ? "zero" : "replace"
|
|
6544
6551
|
}
|
|
6545
6552
|
},
|
|
6546
6553
|
depth: {
|
|
@@ -6565,7 +6572,7 @@ class nr extends Bi {
|
|
|
6565
6572
|
offset: this.getPolygonOffset()
|
|
6566
6573
|
}
|
|
6567
6574
|
};
|
|
6568
|
-
if (this.br(t,
|
|
6575
|
+
if (this.br(t, a), this.pickingFBO) {
|
|
6569
6576
|
const t = [];
|
|
6570
6577
|
this.picking = [ new n.FBORayPicking(this.renderer, {
|
|
6571
6578
|
vert: Gi,
|
|
@@ -6576,7 +6583,7 @@ class nr extends Bi {
|
|
|
6576
6583
|
return r.multiply(t, n.projViewMatrix, n.modelMatrix), t;
|
|
6577
6584
|
}
|
|
6578
6585
|
} ],
|
|
6579
|
-
extraCommandProps:
|
|
6586
|
+
extraCommandProps: a
|
|
6580
6587
|
}, this.pickingFBO, this.getMap()) ];
|
|
6581
6588
|
}
|
|
6582
6589
|
}
|
|
@@ -7281,59 +7288,64 @@ class br extends Bi {
|
|
|
7281
7288
|
isCollides(t) {
|
|
7282
7289
|
const e = this.layer, n = e.getMap(), i = n.getDevicePixelRatio();
|
|
7283
7290
|
if (a.scale(xr, t, 1 / i), n.isOffscreen(xr)) return -1;
|
|
7284
|
-
|
|
7291
|
+
const r = e.getCollisionIndex(), s = this.sceneConfig.collisionBufferSize || e.options.collisionBufferSize || 0;
|
|
7292
|
+
return s && (t = _r(xr, t, s)), +r.collides(t);
|
|
7285
7293
|
}
|
|
7286
7294
|
insertCollisionBox(t) {
|
|
7287
|
-
this.layer.getCollisionIndex().
|
|
7295
|
+
const e = this.layer, n = e.getCollisionIndex(), i = this.sceneConfig.collisionBufferSize || e.options.collisionBufferSize || 0;
|
|
7296
|
+
let r = t;
|
|
7297
|
+
i && (r = t.as = t.as || [], t = _r(r, t, i)), n.insertBox(r);
|
|
7288
7298
|
}
|
|
7289
7299
|
addCollisionDebugBox(t, e) {
|
|
7290
7300
|
if (t && t.length) if (Array.isArray(t[0])) for (let n = 0; n < t.length; n++) {
|
|
7291
7301
|
const i = t[n];
|
|
7292
|
-
this.
|
|
7293
|
-
} else this.
|
|
7302
|
+
this.ls(i, e);
|
|
7303
|
+
} else this.ls(t, e);
|
|
7294
7304
|
}
|
|
7295
|
-
|
|
7305
|
+
ls(t, e) {
|
|
7296
7306
|
if (!t) return;
|
|
7297
|
-
const n = this.
|
|
7307
|
+
const n = this.hs = this.hs || {
|
|
7298
7308
|
aPosition: [],
|
|
7299
7309
|
aVisible: [],
|
|
7300
7310
|
indices: []
|
|
7301
|
-
}, i = this.
|
|
7302
|
-
|
|
7303
|
-
const
|
|
7311
|
+
}, i = this.sceneConfig.collisionBufferSize || this.layer.options.collisionBufferSize || 0;
|
|
7312
|
+
i && (t = _r(xr, t, i));
|
|
7313
|
+
const r = this.getMap(), s = r.getDevicePixelRatio();
|
|
7314
|
+
if (a.scale(xr, t, 1 / s), r.isOffscreen(xr)) return;
|
|
7315
|
+
const o = n.aPosition.length / 2;
|
|
7304
7316
|
n.aPosition.push(t[0], t[1], t[2], t[1], t[2], t[3], t[0], t[3]), n.aVisible.push(e, e, e, e),
|
|
7305
|
-
n.indices.push(
|
|
7317
|
+
n.indices.push(o, o + 1, o + 1, o + 2, o + 2, o + 3, o + 3, o);
|
|
7306
7318
|
}
|
|
7307
7319
|
updateCollision(t) {
|
|
7308
|
-
super.updateCollision(t), this.Nr(), this.
|
|
7309
|
-
this.
|
|
7310
|
-
(this.getMap().isZooming() || this.
|
|
7320
|
+
super.updateCollision(t), this.Nr(), this.us(), this.cs && this.cs.length && (this.fs(),
|
|
7321
|
+
this.cs && (this.setToRedraw(), this.scene.addMesh(this.cs)));
|
|
7322
|
+
(this.getMap().isZooming() || this.cs && this.cs.length) && (this.ds(), this.ps(this.scene.getMeshes()));
|
|
7311
7323
|
}
|
|
7312
7324
|
paint(t) {
|
|
7313
7325
|
const e = super.paint(t);
|
|
7314
|
-
return this.
|
|
7326
|
+
return this.ms(t), !1 === this.Tr && this.setToRedraw(), e;
|
|
7315
7327
|
}
|
|
7316
7328
|
shouldIgnoreBackground() {
|
|
7317
|
-
return !this.getMap().isZooming() && !this.
|
|
7329
|
+
return !this.getMap().isZooming() && !this.cs;
|
|
7318
7330
|
}
|
|
7319
|
-
|
|
7331
|
+
us() {
|
|
7320
7332
|
const t = this.getMap(), e = t.isZooming();
|
|
7321
7333
|
if (!e && this.Br) {
|
|
7322
7334
|
const t = this.layer.getRenderer();
|
|
7323
|
-
this.
|
|
7324
|
-
} else e && !this.Br && (this.
|
|
7325
|
-
if (e) this.
|
|
7335
|
+
this.cs = this.scene.getMeshes().filter(e => !t.isForeground(e) && !e.properties.isLinePlacement);
|
|
7336
|
+
} else e && !this.Br && (this.ys = t.getResolution());
|
|
7337
|
+
if (e) this.gs && (clearTimeout(this.gs), delete this.Xr, delete this.gs), this.Xr = this.ys && t.getResolution() > this.ys; else if (this.Br && !this.gs) {
|
|
7326
7338
|
let {fadeOutDelay: t, fadingDuration: e} = this.sceneConfig;
|
|
7327
|
-
It(t) && (t = pr), It(e) && (e = fr), this.
|
|
7328
|
-
delete this.Xr, delete this.
|
|
7339
|
+
It(t) && (t = pr), It(e) && (e = fr), this.gs = setTimeout(() => {
|
|
7340
|
+
delete this.Xr, delete this.gs;
|
|
7329
7341
|
}, t + e + 1);
|
|
7330
7342
|
}
|
|
7331
7343
|
this.Br = e;
|
|
7332
7344
|
}
|
|
7333
|
-
|
|
7334
|
-
if (!this.
|
|
7335
|
-
this.os || this.
|
|
7336
|
-
const {aPosition: e, aVisible: i, indices: r} = this.
|
|
7345
|
+
ms(t) {
|
|
7346
|
+
if (!this.hs || !this.layer.options.debugCollision) return;
|
|
7347
|
+
this.os || this.vs();
|
|
7348
|
+
const {aPosition: e, aVisible: i, indices: r} = this.hs;
|
|
7337
7349
|
if (!this.rs) {
|
|
7338
7350
|
const t = new n.Geometry({
|
|
7339
7351
|
aPosition: [],
|
|
@@ -7342,15 +7354,15 @@ class br extends Bi {
|
|
|
7342
7354
|
positionSize: 2,
|
|
7343
7355
|
primitive: "lines"
|
|
7344
7356
|
});
|
|
7345
|
-
this.rs = new n.Mesh(t), this.
|
|
7357
|
+
this.rs = new n.Mesh(t), this.xs = new n.Scene, this.xs.addMesh(this.rs);
|
|
7346
7358
|
}
|
|
7347
7359
|
const s = this.rs.geometry;
|
|
7348
7360
|
s.updateData("aPosition", new Float32Array(e)), s.updateData("aVisible", new Uint8Array(i)),
|
|
7349
7361
|
s.setElements(r), this.os.render(this.ss, {
|
|
7350
7362
|
size: [ this.canvas.width, this.canvas.height ]
|
|
7351
|
-
}, this.
|
|
7363
|
+
}, this.xs, this.getRenderFBO(t)), delete this.hs;
|
|
7352
7364
|
}
|
|
7353
|
-
|
|
7365
|
+
vs() {
|
|
7354
7366
|
const t = this.regl;
|
|
7355
7367
|
this.os = new n.Renderer(t);
|
|
7356
7368
|
const e = this.canvas, i = {
|
|
@@ -7379,17 +7391,17 @@ class br extends Bi {
|
|
|
7379
7391
|
}
|
|
7380
7392
|
});
|
|
7381
7393
|
}
|
|
7382
|
-
|
|
7394
|
+
fs() {
|
|
7383
7395
|
let {fadeOutDelay: t, fadingDuration: e} = this.sceneConfig;
|
|
7384
7396
|
It(t) && (t = pr), It(e) && (e = fr);
|
|
7385
7397
|
const n = this.layer.getRenderer(), i = n.getCurrentTileZoom(), r = n.getFrameTimestamp(), s = [];
|
|
7386
|
-
for (let o = 0; o < this.
|
|
7387
|
-
const a = this.
|
|
7398
|
+
for (let o = 0; o < this.cs.length; o++) {
|
|
7399
|
+
const a = this.cs[o], l = a.properties.tile;
|
|
7388
7400
|
!a.Yr && n.isBackTile(l.id) && (a.Yr = r);
|
|
7389
7401
|
const h = l.z - i > 0 ? 2 * (l.z - i) - 1 : 2 * (i - l.z);
|
|
7390
7402
|
a.properties.level = h, n.isForeground(a) || a.Yr && r - a.Yr > t + e ? delete a.Yr : s.push(a);
|
|
7391
7403
|
}
|
|
7392
|
-
delete this.
|
|
7404
|
+
delete this.cs, s.length && (this.cs = s);
|
|
7393
7405
|
}
|
|
7394
7406
|
isEnableCollision() {
|
|
7395
7407
|
return this.layer.options.collision && !!this.sceneConfig.collision;
|
|
@@ -7400,7 +7412,7 @@ class br extends Bi {
|
|
|
7400
7412
|
isMeshUniquePlaced(t) {
|
|
7401
7413
|
return this.isMeshIterable(t);
|
|
7402
7414
|
}
|
|
7403
|
-
|
|
7415
|
+
ds() {
|
|
7404
7416
|
if (!this.isEnableUniquePlacement()) return;
|
|
7405
7417
|
const t = this.scene.getMeshes(), e = (t, e, n, i) => {
|
|
7406
7418
|
const {start: r, end: s} = e[0], o = t.geometry.properties, a = o.elements;
|
|
@@ -7420,29 +7432,29 @@ class br extends Bi {
|
|
|
7420
7432
|
this.isMeshUniquePlaced(i) && this.forEachBox(i, e);
|
|
7421
7433
|
}
|
|
7422
7434
|
}
|
|
7423
|
-
|
|
7435
|
+
ps(t) {
|
|
7424
7436
|
if (!this.isEnableUniquePlacement()) return;
|
|
7425
7437
|
const e = this.getMap().getZoom();
|
|
7426
|
-
let n = !this.
|
|
7427
|
-
if (!n) for (let e = 0; e < t.length; e++) if (!this.
|
|
7438
|
+
let n = !this.bs || this.As !== e;
|
|
7439
|
+
if (!n) for (let e = 0; e < t.length; e++) if (!this.bs[t[e].properties.meshKey]) {
|
|
7428
7440
|
n = !0;
|
|
7429
7441
|
break;
|
|
7430
7442
|
}
|
|
7431
7443
|
if (!n) return;
|
|
7432
|
-
this.
|
|
7444
|
+
this.As = e, this.ws = {}, this.bs = {}, t = t.sort(wr);
|
|
7433
7445
|
const i = this.getMap().getGLScale(), r = {};
|
|
7434
7446
|
for (let e = 0; e < t.length; e++) {
|
|
7435
7447
|
const n = t[e];
|
|
7436
7448
|
if (!n.geometry) continue;
|
|
7437
7449
|
const {meshKey: s} = n.properties;
|
|
7438
|
-
this.
|
|
7450
|
+
this.bs[s] = 1;
|
|
7439
7451
|
const {uniquePlacements: o} = n.geometry.properties;
|
|
7440
7452
|
if (o) for (let t = 0; t < o.length; t++) {
|
|
7441
7453
|
if (!o[t]) continue;
|
|
7442
7454
|
const {key: e, index: s} = o[t], a = this.Wr(n), l = Ar(e, i), h = r[l];
|
|
7443
7455
|
if (h) {
|
|
7444
7456
|
const t = h.length, e = h[t - 3].properties.meshKey, i = h[t - 2], r = h[t - 1];
|
|
7445
|
-
this.
|
|
7457
|
+
this.ws[e] = this.ws[e] || {}, this.ws[e][r] = 1, this._s(a, s, i, r), h.push(n, a, s);
|
|
7446
7458
|
} else r[l] = [ n, a, s ];
|
|
7447
7459
|
}
|
|
7448
7460
|
}
|
|
@@ -7455,16 +7467,16 @@ class br extends Bi {
|
|
|
7455
7467
|
}
|
|
7456
7468
|
}
|
|
7457
7469
|
}
|
|
7458
|
-
|
|
7470
|
+
_s(t, e, n, i) {
|
|
7459
7471
|
if (void 0 !== n[i]) if (void 0 === t[e]) t[e] = n[i]; else {
|
|
7460
7472
|
let r = t[e];
|
|
7461
7473
|
Math.abs(n[i]) > Math.abs(r) ? t[e] = n[i] : n[i] = t[e];
|
|
7462
7474
|
} else void 0 !== t[e] && (n[i] = t[e]);
|
|
7463
7475
|
}
|
|
7464
7476
|
jr(t, e) {
|
|
7465
|
-
return this.
|
|
7477
|
+
return this.ws && this.ws[t] && this.ws[t][e];
|
|
7466
7478
|
}
|
|
7467
|
-
|
|
7479
|
+
Ss(t, e) {
|
|
7468
7480
|
const {symbolIndex: n} = t.properties, i = n.type || 0;
|
|
7469
7481
|
let r = t.properties._collidesBoxes;
|
|
7470
7482
|
r || (r = t.properties._collidesBoxes = []);
|
|
@@ -7482,15 +7494,15 @@ class br extends Bi {
|
|
|
7482
7494
|
}
|
|
7483
7495
|
return s[o];
|
|
7484
7496
|
}
|
|
7485
|
-
|
|
7486
|
-
let e = this.
|
|
7487
|
-
if (e || (e = this.
|
|
7497
|
+
Ms(t) {
|
|
7498
|
+
let e = this.Ps;
|
|
7499
|
+
if (e || (e = this.Ps = []), !e[t]) {
|
|
7488
7500
|
e[t] = [];
|
|
7489
7501
|
for (let n = 0; n < t; n++) e[t][n] = {};
|
|
7490
7502
|
}
|
|
7491
7503
|
return e[t];
|
|
7492
7504
|
}
|
|
7493
|
-
|
|
7505
|
+
Ts(t) {
|
|
7494
7506
|
if (!t || !t.geometry) return !0;
|
|
7495
7507
|
if (!t.geometry.properties.glyphAtlas || !t.material.get("isHalo") || t.geometry.data.aTextHaloRadius && t.geometry.properties.hasHalo) return !1;
|
|
7496
7508
|
if (t.geometry.data.aTextHaloRadius && !t.geometry.properties.hasHalo) return !0;
|
|
@@ -7507,109 +7519,113 @@ function wr(t, e) {
|
|
|
7507
7519
|
return 0 === n ? t.properties.meshKey - e.properties.meshKey : n;
|
|
7508
7520
|
}
|
|
7509
7521
|
|
|
7510
|
-
|
|
7522
|
+
function _r(t, e, n) {
|
|
7523
|
+
return t[0] = e[0] - n, t[1] = e[1] - n, t[2] = e[2] + n, t[3] = e[3] + n, t;
|
|
7524
|
+
}
|
|
7525
|
+
|
|
7526
|
+
var Sr = "#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 vec2 aShape;\nattribute vec2 aTexCoord;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\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#ifdef HAS_MARKER_DX\nattribute float aMarkerDx;\n#else\nuniform float markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nattribute float aMarkerDy;\n#else\nuniform float markerDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float rotateWithMap;\n#endif\nuniform float flipY;\n#ifdef HAS_ROTATION\nattribute float aRotation;\n#else\nuniform float markerRotation;\n#endif\n#ifdef HAS_PAD_OFFSET\nattribute float aPadOffsetX;\nattribute float aPadOffsetY;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float markerPerspectiveRatio;\nuniform vec2 iconSize;\nuniform vec2 texSize;\nuniform vec2 canvasSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\nuniform float isRenderingTerrain;\n#include <vt_position_vert>\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vOpacity;\n#include <highlight_vert>\n#else\n#include <fbo_picking_vert>\n#endif\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_MARKER_WIDTH\nfloat d = aMarkerWidth;\n#else\nfloat d = markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nfloat e = aMarkerHeight;\n#else\nfloat e = markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nfloat f = aMarkerDx;\n#else\nfloat f = markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nfloat h = aMarkerDy;\n#else\nfloat h = markerDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nfloat i = aPitchAlign;\n#else\nfloat i = pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat j = aRotationAlign;\n#else\nfloat j = rotateWithMap;\n#endif\ngl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float k = gl_Position.w;\n float l;\n if(isRenderingTerrain == 1. && i == 1.) {\n l = 1.;\n } else {\n float m = (1. - cameraToCenterDistance / k) * markerPerspectiveRatio;\n l = clamp(.5 + .5 * (1. - m), .0, 4.);\n }\n#ifdef HAS_ROTATION\nfloat n = -aRotation / 9362. - mapRotation * j;\n#else\nfloat n = -markerRotation - mapRotation * j;\n#endif\nif(i == 1.) {\n n += mapRotation;\n }\n float o = sin(n);\n float u = cos(n);\n mat2 v = mat2(u, -1. * o, o, u);\n vec2 A = (aShape / 10.0);\n if(i == 1. && flipY == .0) {\n A *= vec2(1., -1.);\n }\n#ifdef HAS_PAD_OFFSET\nA = (A / iconSize * vec2(d, e) + vec2(aPadOffsetX - 1., aPadOffsetY)) * layerScale;\n#else\nA = A / iconSize * vec2(d, e) * layerScale;\n#endif\nA = v * A;\n if(i == .0) {\n vec2 B = A * 2. / canvasSize;\n gl_Position.xy += B * l * k;\n } else {\n float C;\n if(isRenderingTerrain == 1.) {\n C = 1.;\n } else {\n C = k / cameraToCenterDistance;\n }\n vec2 B = A;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(B, .0) * tileRatio / zoomScale * C * l, 1.);\n }\n gl_Position.xy += vec2(f, -h) * 2. / canvasSize * k;\n#ifndef PICKING_MODE\nvTexCoord = aTexCoord / texSize;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\nhighlight_setVarying();\n#else\n#ifdef ENABLE_COLLISION\nbool D = aOpacity == 255.;\n#else\nbool D = true;\n#endif\nfbo_picking_setData(gl_Position.w, D);\n#endif\n}";
|
|
7511
7527
|
|
|
7512
|
-
const
|
|
7528
|
+
const Mr = [], Pr = [], Tr = [], kr = [], Or = [], Ir = [];
|
|
7513
7529
|
|
|
7514
|
-
function
|
|
7530
|
+
function Fr(t, e, n, r, s, o, l, u, c, f, d, p, m, y) {
|
|
7515
7531
|
const {tileRatio: g, tileResolution: v} = c, x = g / (v / f.getResolution()) * (d / f.cameraToCenterDistance) * p;
|
|
7516
|
-
h.scale(n, n, x), h.scale(r, r, x), h.scale(s, s, x), h.scale(o, o, x), i.set(
|
|
7517
|
-
i.set(
|
|
7518
|
-
i.set(
|
|
7519
|
-
i.add(
|
|
7520
|
-
bi(s,
|
|
7521
|
-
h.set(
|
|
7532
|
+
h.scale(n, n, x), h.scale(r, r, x), h.scale(s, s, x), h.scale(o, o, x), i.set(Mr, n[0], n[1], m ? n[2] / y : 0),
|
|
7533
|
+
i.set(Pr, r[0], r[1], m ? r[2] / y : 0), i.set(Tr, s[0], s[1], m ? s[2] / y : 0),
|
|
7534
|
+
i.set(kr, o[0], o[1], m ? o[2] / y : 0), i.add(Mr, Mr, e), i.add(Pr, Pr, e), i.add(Tr, Tr, e),
|
|
7535
|
+
i.add(kr, kr, e), bi(n, Mr, l, f.width, f.height), bi(r, Pr, l, f.width, f.height),
|
|
7536
|
+
bi(s, Tr, l, f.width, f.height), bi(o, kr, l, f.width, f.height), h.set(Or, Math.min(n[0], r[0], s[0], o[0]), Math.min(n[1], r[1], s[1], o[1])),
|
|
7537
|
+
h.set(Ir, Math.max(n[0], r[0], s[0], o[0]), Math.max(n[1], r[1], s[1], o[1])), a.set(t, Or[0] + u[0], Or[1] + u[1], Ir[0] + u[0], Ir[1] + u[1]);
|
|
7522
7538
|
}
|
|
7523
7539
|
|
|
7524
|
-
function
|
|
7540
|
+
function Cr(t, e, n, i, r, s, o, l) {
|
|
7525
7541
|
1 !== l && (h.scale(n, n, l), h.scale(i, i, l), h.scale(r, r, l), h.scale(s, s, l)),
|
|
7526
|
-
h.set(
|
|
7527
|
-
a.set(t, e[0] +
|
|
7542
|
+
h.set(Or, Math.min(n[0], i[0], r[0], s[0]), Math.min(n[1], i[1], r[1], s[1])), h.set(Ir, Math.max(n[0], i[0], r[0], s[0]), Math.max(n[1], i[1], r[1], s[1])),
|
|
7543
|
+
a.set(t, e[0] + Or[0] + o[0], e[1] + Or[1] - o[1], e[0] + Ir[0] + o[0], e[1] + Ir[1] - o[1]);
|
|
7528
7544
|
}
|
|
7529
7545
|
|
|
7530
|
-
function
|
|
7546
|
+
function Er(t, e, n, i, r) {
|
|
7531
7547
|
e -= n * i, 1 === r && (e += n);
|
|
7532
7548
|
const s = Math.sin(e), o = Math.cos(e);
|
|
7533
7549
|
return u.set(t, o, -s, s, o);
|
|
7534
7550
|
}
|
|
7535
7551
|
|
|
7536
|
-
const
|
|
7552
|
+
const Dr = [], Rr = [], Lr = [], Nr = [], Hr = [], zr = [], Vr = [], Ur = [], jr = [ 1, -1 ], Br = [ 1, 1 ];
|
|
7537
7553
|
|
|
7538
|
-
function
|
|
7539
|
-
const o = e.material.uniforms, a = s.cameraToCenterDistance, l = e.geometry.properties, u = this.getSymbol(l.symbolIndex), c = e.geometry.desc.positionSize, f = l.aAnchor, d = i.set(
|
|
7554
|
+
function Gr(t, e, n, r, s) {
|
|
7555
|
+
const o = e.material.uniforms, a = s.cameraToCenterDistance, l = e.geometry.properties, u = this.getSymbol(l.symbolIndex), c = e.geometry.desc.positionSize, f = l.aAnchor, d = i.set(Dr, f[n * c], f[n * c + 1], 2 === c ? 0 : f[n * c + 2]), {aTerrainAltitude: p} = l;
|
|
7540
7556
|
if (p) {
|
|
7541
7557
|
const t = 100 * p[2 * n];
|
|
7542
7558
|
t && (d[2] += t);
|
|
7543
7559
|
}
|
|
7544
|
-
let m = bi(
|
|
7560
|
+
let m = bi(Rr, d, r, s.width, s.height);
|
|
7545
7561
|
const y = m[2];
|
|
7546
7562
|
let g = 1;
|
|
7547
7563
|
if (o.markerPerspectiveRatio) {
|
|
7548
7564
|
g = kt(.5 + .5 * (1 - (1 - a / y) * o.markerPerspectiveRatio), 0, 4);
|
|
7549
7565
|
}
|
|
7550
|
-
const {aShape: v, aMarkerDx: x, aMarkerDy: b, aMarkerWidth: A, aMarkerHeight: w, aPitchAlign: _, aRotationAlign: S, aRotation: M} = l, P = x ? x[n] : u.markerDx, T = b ? b[n] : u.markerDy, k = _ ? _[n] : o.pitchWithMap, O = S ? S[n] : o.rotateWithMap, I = h.set(
|
|
7551
|
-
let F = h.set(
|
|
7552
|
-
0 === o.flipY && 1 === k && (h.multiply(F, F,
|
|
7553
|
-
h.multiply(D, D,
|
|
7566
|
+
const {aShape: v, aMarkerDx: x, aMarkerDy: b, aMarkerWidth: A, aMarkerHeight: w, aPitchAlign: _, aRotationAlign: S, aRotation: M} = l, P = x ? x[n] : u.markerDx, T = b ? b[n] : u.markerDy, k = _ ? _[n] : o.pitchWithMap, O = S ? S[n] : o.rotateWithMap, I = h.set(Ur, P || 0, -(T || 0));
|
|
7567
|
+
let F = h.set(Nr, v[2 * n] / 10, v[2 * n + 1] / 10), C = h.set(Hr, v[2 * n + 2] / 10, v[2 * n + 3] / 10), E = h.set(zr, v[2 * n + 4] / 10, v[2 * n + 5] / 10), D = h.set(Vr, v[2 * n + 6] / 10, v[2 * n + 7] / 10);
|
|
7568
|
+
0 === o.flipY && 1 === k && (h.multiply(F, F, jr), h.multiply(C, C, jr), h.multiply(E, E, jr),
|
|
7569
|
+
h.multiply(D, D, jr));
|
|
7554
7570
|
const [R, L] = $i(e.geometry);
|
|
7555
7571
|
let N = A ? A[n] : u.markerWidth;
|
|
7556
7572
|
It(N) && (N = R || 15);
|
|
7557
7573
|
let H = w ? w[n] : u.markerHeight;
|
|
7558
7574
|
It(H) && (H = L || 15);
|
|
7559
|
-
const z = h.set(
|
|
7575
|
+
const z = h.set(Br, N / 2048, H / 2048);
|
|
7560
7576
|
h.mul(F, F, z), h.mul(C, C, z), h.mul(E, E, z), h.mul(D, D, z);
|
|
7561
7577
|
const V = -(M ? M[n] / 9362 : -(u.markerRotation || 0) * Math.PI / 180), U = s.getBearing() * Math.PI / 180;
|
|
7562
7578
|
if (U * O || V) {
|
|
7563
|
-
const t =
|
|
7579
|
+
const t = Er(Lr, V, U, O, k);
|
|
7564
7580
|
F = h.transformMat2(F, F, t), C = h.transformMat2(C, C, t), E = h.transformMat2(E, E, t),
|
|
7565
7581
|
D = h.transformMat2(D, D, t);
|
|
7566
7582
|
}
|
|
7567
|
-
1 === k ?
|
|
7568
|
-
h.multiply(E, E,
|
|
7583
|
+
1 === k ? Fr(t, d, F, C, E, D, r, I, o, s, y, g) : (h.multiply(F, F, jr), h.multiply(C, C, jr),
|
|
7584
|
+
h.multiply(E, E, jr), h.multiply(D, D, jr), Cr(t, m, F, C, E, D, I, g));
|
|
7569
7585
|
const j = this.getMap().getDevicePixelRatio();
|
|
7570
7586
|
return 1 !== j && (t[0] *= j, t[1] *= j, t[2] *= j, t[3] *= j), t;
|
|
7571
7587
|
}
|
|
7572
7588
|
|
|
7573
|
-
const
|
|
7589
|
+
const Wr = [], Xr = [], Yr = [], $r = [], qr = [], Jr = [], Kr = [ 1, -1 ];
|
|
7574
7590
|
|
|
7575
|
-
function
|
|
7591
|
+
function Zr(t, e, n, r, s, o, a, l, u) {
|
|
7576
7592
|
const c = r.material.uniforms, f = u.cameraToCenterDistance, d = r.geometry.properties, p = this.getSymbol(d.symbolIndex), m = "line" === p.textPlacement && !zt(p), y = n[2];
|
|
7577
7593
|
let g = 1;
|
|
7578
7594
|
if (c.textPerspectiveRatio) {
|
|
7579
7595
|
g = kt(.5 + .5 * (1 - (1 - f / y) * c.textPerspectiveRatio), 0, 4);
|
|
7580
7596
|
}
|
|
7581
|
-
const {aTextDx: v, aTextDy: x, aPitchAlign: b, aRotationAlign: A, aRotation: w} = r.geometry.properties, _ = v ? v[a] : p.textDx, S = x ? x[a] : p.textDy, M = b ? b[a] : c.pitchWithMap, P = A ? A[a] : c.rotateWithMap, T = h.set(
|
|
7597
|
+
const {aTextDx: v, aTextDy: x, aPitchAlign: b, aRotationAlign: A, aRotation: w} = r.geometry.properties, _ = v ? v[a] : p.textDx, S = x ? x[a] : p.textDy, M = b ? b[a] : c.pitchWithMap, P = A ? A[a] : c.rotateWithMap, T = h.set(Jr, _ || 0, -(S || 0));
|
|
7582
7598
|
if (m) {
|
|
7583
7599
|
const {aOffset: r, aShape: s} = d, o = r.length !== s.length;
|
|
7584
7600
|
let f, p, m, v;
|
|
7585
|
-
if (o ? (f = i.set(
|
|
7586
|
-
m = i.set(
|
|
7587
|
-
p = h.set(
|
|
7588
|
-
v = h.set(
|
|
7601
|
+
if (o ? (f = i.set(Xr, r[3 * a] / 10, r[3 * a + 1] / 10, r[3 * a + 2] / 10), p = i.set(Yr, r[3 * a + 3] / 10, r[3 * a + 4] / 10, r[3 * a + 5] / 10),
|
|
7602
|
+
m = i.set($r, r[3 * a + 6] / 10, r[3 * a + 7] / 10, r[3 * a + 8] / 10), v = i.set(qr, r[3 * a + 9] / 10, r[3 * a + 10] / 10, r[3 * a + 11] / 10)) : (f = h.set(Xr, r[2 * a] / 10, r[2 * a + 1] / 10),
|
|
7603
|
+
p = h.set(Yr, r[2 * a + 2] / 10, r[2 * a + 3] / 10), m = h.set($r, r[2 * a + 4] / 10, r[2 * a + 5] / 10),
|
|
7604
|
+
v = h.set(qr, r[2 * a + 6] / 10, r[2 * a + 7] / 10)), 1 === M) {
|
|
7589
7605
|
const n = lt(u.getResolution(), u);
|
|
7590
|
-
|
|
7591
|
-
} else h.multiply(f, f,
|
|
7592
|
-
|
|
7606
|
+
Fr(t, e, f, p, m, v, l, T, c, u, y, g, o, n);
|
|
7607
|
+
} else h.multiply(f, f, Kr), h.multiply(p, p, Kr), h.multiply(m, m, Kr), h.multiply(v, v, Kr),
|
|
7608
|
+
Cr(t, n, f, p, m, v, T, g);
|
|
7593
7609
|
} else {
|
|
7594
7610
|
const {aShape: i} = d;
|
|
7595
|
-
let r = h.set(
|
|
7596
|
-
0 === c.flipY && 1 === M && (h.multiply(r, r,
|
|
7597
|
-
h.multiply(v, v,
|
|
7611
|
+
let r = h.set(Xr, i[2 * a] / 10, -i[2 * a + 1] / 10), o = h.set(Yr, i[2 * a + 2] / 10, -i[2 * a + 3] / 10), f = h.set($r, i[2 * a + 4] / 10, -i[2 * a + 5] / 10), v = h.set(qr, i[2 * a + 6] / 10, -i[2 * a + 7] / 10);
|
|
7612
|
+
0 === c.flipY && 1 === M && (h.multiply(r, r, Kr), h.multiply(o, o, Kr), h.multiply(f, f, Kr),
|
|
7613
|
+
h.multiply(v, v, Kr));
|
|
7598
7614
|
const x = w ? w[a] / 9362 : (p.textRotation || 0) * Math.PI / 180, b = m ? 0 : u.getBearing() * Math.PI / 180;
|
|
7599
7615
|
if (x || b) {
|
|
7600
|
-
const t =
|
|
7616
|
+
const t = Er(Wr, x, b, P, M);
|
|
7601
7617
|
r = h.transformMat2(r, r, t), o = h.transformMat2(o, o, t), f = h.transformMat2(f, f, t),
|
|
7602
7618
|
v = h.transformMat2(v, v, t);
|
|
7603
7619
|
}
|
|
7604
7620
|
const A = s / 24;
|
|
7605
|
-
h.scale(r, r, A), h.scale(o, o, A), h.scale(f, f, A), h.scale(v, v, A), 1 === M ?
|
|
7621
|
+
h.scale(r, r, A), h.scale(o, o, A), h.scale(f, f, A), h.scale(v, v, A), 1 === M ? Fr(t, e, r, o, f, v, l, T, c, u, y, g) : Cr(t, n, r, o, f, v, T, g);
|
|
7606
7622
|
}
|
|
7607
7623
|
o = o || 0, t[0] -= o + 1, t[1] -= o + 1, t[2] += o + 1, t[3] += o + 1;
|
|
7608
7624
|
const k = this.getMap().getDevicePixelRatio();
|
|
7609
7625
|
return 1 !== k && (t[0] *= k, t[1] *= k, t[2] *= k, t[3] *= k), t;
|
|
7610
7626
|
}
|
|
7611
7627
|
|
|
7612
|
-
function
|
|
7628
|
+
function Qr(t, e, n) {
|
|
7613
7629
|
const r = e.geometry.desc.positionSize, {aAnchor: s, aAltitude: o, aTerrainAltitude: a} = e.geometry.properties, l = n * r;
|
|
7614
7630
|
if (o ? i.set(t, s[l], s[l + 1], o[n]) : 3 === r ? A.unpackPosition(t, s[l], s[l + 1], s[l + 2]) : i.set(t, s[l], s[l + 1], 0),
|
|
7615
7631
|
a) {
|
|
@@ -7619,7 +7635,7 @@ function Zr(t, e, n) {
|
|
|
7619
7635
|
return t;
|
|
7620
7636
|
}
|
|
7621
7637
|
|
|
7622
|
-
const
|
|
7638
|
+
const ts = {
|
|
7623
7639
|
textFill: [ 0, 0, 0, 1 ],
|
|
7624
7640
|
textOpacity: 1,
|
|
7625
7641
|
textPitchAlignment: 0,
|
|
@@ -7635,14 +7651,14 @@ const Qr = {
|
|
|
7635
7651
|
textRotation: 0
|
|
7636
7652
|
};
|
|
7637
7653
|
|
|
7638
|
-
function
|
|
7654
|
+
function es(t, e, i, r, s, o, a, l, h) {
|
|
7639
7655
|
const u = [];
|
|
7640
7656
|
if (e.isDisposed() || 0 === e.data.aPosition.length) return u;
|
|
7641
7657
|
const c = e.properties.glyphAtlas;
|
|
7642
7658
|
if (!c) return u;
|
|
7643
7659
|
if (0 === r.textSize || 0 === r.textOpacity) return u;
|
|
7644
7660
|
if (si(e, r, o), !e.properties.aCount) {
|
|
7645
|
-
|
|
7661
|
+
ns.call(this, e, a || h, l);
|
|
7646
7662
|
const {aTextSize: t, aTextDx: n, aTextDy: i, aPitchAlign: r, aRotationAlign: s, aRotation: o, aOverlap: u, aAltitude: c} = e.data;
|
|
7647
7663
|
if (t) {
|
|
7648
7664
|
const n = (ri + "aTextSize").trim();
|
|
@@ -7684,12 +7700,12 @@ function ts(t, e, i, r, s, o, a, l, h) {
|
|
|
7684
7700
|
texture: f,
|
|
7685
7701
|
texSize: [ c.width, c.height ]
|
|
7686
7702
|
};
|
|
7687
|
-
|
|
7703
|
+
is(e, d, s);
|
|
7688
7704
|
let p = !1;
|
|
7689
7705
|
s.textOpacity < 1 && (p = !0), e.properties.memorySize = e.getMemorySize(), e.generateBuffers(t, {
|
|
7690
7706
|
excludeElementsInVAO: !0
|
|
7691
7707
|
});
|
|
7692
|
-
const m = new n.Material(d,
|
|
7708
|
+
const m = new n.Material(d, ts), y = new n.Mesh(e, m, {
|
|
7693
7709
|
disableVAO: !0,
|
|
7694
7710
|
transparent: p,
|
|
7695
7711
|
castShadow: !1,
|
|
@@ -7707,8 +7723,8 @@ function ts(t, e, i, r, s, o, a, l, h) {
|
|
|
7707
7723
|
texSize: [ c.width, c.height ],
|
|
7708
7724
|
isHalo: 0
|
|
7709
7725
|
};
|
|
7710
|
-
|
|
7711
|
-
const r = new n.Material(t,
|
|
7726
|
+
is(e, t, s);
|
|
7727
|
+
const r = new n.Material(t, ts), o = new n.Mesh(e, r, {
|
|
7712
7728
|
disableVAO: !0,
|
|
7713
7729
|
transparent: p,
|
|
7714
7730
|
castShadow: !1,
|
|
@@ -7736,7 +7752,7 @@ function ts(t, e, i, r, s, o, a, l, h) {
|
|
|
7736
7752
|
}), u;
|
|
7737
7753
|
}
|
|
7738
7754
|
|
|
7739
|
-
function
|
|
7755
|
+
function ns(t, e, n) {
|
|
7740
7756
|
const i = this.getSymbol(t.properties.symbolIndex), r = "line" === t.properties.textPlacement && !zt(i), {aPosition: s, aShape: o} = t.data, a = s.length / t.desc.positionSize;
|
|
7741
7757
|
if (t.properties.aPickingId = t.data.aPickingId, t.properties.aCount = t.data.aCount,
|
|
7742
7758
|
delete t.data.aCount, (e || r) && (t.properties.aAnchor = s, t.properties.aShape = o),
|
|
@@ -7766,18 +7782,18 @@ function es(t, e, n) {
|
|
|
7766
7782
|
}
|
|
7767
7783
|
}
|
|
7768
7784
|
|
|
7769
|
-
function
|
|
7770
|
-
void 0 === e.isHalo && (e.isHalo = 1), Ct(e, "textOpacity", n, "textOpacity",
|
|
7771
|
-
Ct(e, "textFill", n, "textFill",
|
|
7772
|
-
Ct(e, "textHaloBlur", n, "textHaloBlur",
|
|
7773
|
-
Ct(e, "textHaloOpacity", n, "textHaloOpacity",
|
|
7774
|
-
Ct(e, "rotateWithMap", n, "textRotationAlignment",
|
|
7775
|
-
Ct(e, "pitchWithMap", n, "textPitchAlignment",
|
|
7776
|
-
Ct(e, "textSize", n, "textSize",
|
|
7777
|
-
Ct(e, "textDy", n, "textDy",
|
|
7785
|
+
function is(t, e, n) {
|
|
7786
|
+
void 0 === e.isHalo && (e.isHalo = 1), Ct(e, "textOpacity", n, "textOpacity", ts.textOpacity),
|
|
7787
|
+
Ct(e, "textFill", n, "textFill", ts.textFill, Rt()), Ct(e, "textHaloFill", n, "textHaloFill", ts.textHaloFill, Rt()),
|
|
7788
|
+
Ct(e, "textHaloBlur", n, "textHaloBlur", ts.textHaloBlur), Ct(e, "textHaloRadius", n, "textHaloRadius", ts.textHaloRadius),
|
|
7789
|
+
Ct(e, "textHaloOpacity", n, "textHaloOpacity", ts.textHaloOpacity), Ct(e, "textPerspectiveRatio", n, "textPerspectiveRatio", ts.textPerspectiveRatio, e => "line" === t.properties.textPlacement ? 1 : e),
|
|
7790
|
+
Ct(e, "rotateWithMap", n, "textRotationAlignment", ts.textRotationAlignment, t => +("map" === t)),
|
|
7791
|
+
Ct(e, "pitchWithMap", n, "textPitchAlignment", ts.textPitchAlignment, t => +("map" === t)),
|
|
7792
|
+
Ct(e, "textSize", n, "textSize", ts.textSize), Ct(e, "textDx", n, "textDx", ts.textDx),
|
|
7793
|
+
Ct(e, "textDy", n, "textDy", ts.textDy), Ct(e, "textRotation", n, "textRotation", ts.textRotation, t => t * Math.PI / 180);
|
|
7778
7794
|
}
|
|
7779
7795
|
|
|
7780
|
-
function
|
|
7796
|
+
function rs(t, e) {
|
|
7781
7797
|
const n = [];
|
|
7782
7798
|
return {
|
|
7783
7799
|
uniforms: [ {
|
|
@@ -7836,7 +7852,7 @@ function is(t, e) {
|
|
|
7836
7852
|
};
|
|
7837
7853
|
}
|
|
7838
7854
|
|
|
7839
|
-
function
|
|
7855
|
+
function ss(t, e) {
|
|
7840
7856
|
const n = g(e.textFill), i = g(e.textSize), r = g(e.textHaloFill), s = g(e.textHaloRadius), o = g(e.textHaloOpacity), a = g(e.textDx), l = g(e.textDy), h = g(e.textOpacity), u = y(e.textPitchAlignment), c = y(e.textRotationAlignment), f = g(e.textRotation), d = y(e.textAllowOverlapFn), m = y(e.textIgnorePlacement), v = {}, x = new Int16Array(1), b = new Uint16Array(1);
|
|
7841
7857
|
return [ {
|
|
7842
7858
|
attrName: "aTextFill",
|
|
@@ -7856,7 +7872,7 @@ function rs(t, e) {
|
|
|
7856
7872
|
type: Uint8Array,
|
|
7857
7873
|
width: 1,
|
|
7858
7874
|
evaluate: (e, n) => {
|
|
7859
|
-
let r = i(t.getZoom(), e) ||
|
|
7875
|
+
let r = i(t.getZoom(), e) || ts.textSize;
|
|
7860
7876
|
return p(r) && (r = this.evaluateInFnTypeConfig(r, n, t, e)), x[0] = r, x[0];
|
|
7861
7877
|
}
|
|
7862
7878
|
}, {
|
|
@@ -7964,25 +7980,25 @@ function rs(t, e) {
|
|
|
7964
7980
|
} ];
|
|
7965
7981
|
}
|
|
7966
7982
|
|
|
7967
|
-
const
|
|
7983
|
+
const os = [], as = [], ls = [], hs = [];
|
|
7968
7984
|
|
|
7969
|
-
function
|
|
7985
|
+
function us(t, e, n, i, r, s, o) {
|
|
7970
7986
|
t = 1 === t ? 1 : 0;
|
|
7971
7987
|
const a = this.getMap(), l = e.geometry.properties, h = this.getSymbol(l.symbolIndex), u = "line" === l.textPlacement && !zt(h), {aTextSize: c, aTextHaloRadius: f, aShape: d} = l;
|
|
7972
7988
|
let p = c ? c[n[r]] : e.properties.textSize;
|
|
7973
|
-
null == p && (p =
|
|
7974
|
-
const m = f ? f[n[r]] : e.properties.textHaloRadius, y =
|
|
7975
|
-
let v =
|
|
7989
|
+
null == p && (p = ts.textSize);
|
|
7990
|
+
const m = f ? f[n[r]] : e.properties.textHaloRadius, y = Qr(ls, e, n[r]), {aProjectedAnchor: g} = e.geometry.properties;
|
|
7991
|
+
let v = hs;
|
|
7976
7992
|
const x = 3 * n[r];
|
|
7977
|
-
g && -999999 !== g[x] ? (
|
|
7978
|
-
const b = i, {boxes: A, collision: w} = this.
|
|
7993
|
+
g && -999999 !== g[x] ? (hs[0] = g[x], hs[1] = g[x + 1], hs[2] = g[x + 2]) : v = bi(hs, y, o, a.width, a.height);
|
|
7994
|
+
const b = i, {boxes: A, collision: w} = this.Ss(e, r);
|
|
7979
7995
|
let _ = 0;
|
|
7980
7996
|
if (u || 1 === e.material.uniforms.rotateWithMap || h.textRotation) {
|
|
7981
7997
|
let i = 0;
|
|
7982
7998
|
for (let s = r; s < r + 6 * b; s += 6) {
|
|
7983
7999
|
const r = A[_] = A[_] || [];
|
|
7984
8000
|
_++;
|
|
7985
|
-
const l =
|
|
8001
|
+
const l = Zr.call(this, r, y, v, e, p, m, n[s], o, a);
|
|
7986
8002
|
if (!t) {
|
|
7987
8003
|
const e = this.isCollides(l);
|
|
7988
8004
|
1 === e ? t = 1 : -1 === e && i++;
|
|
@@ -7994,7 +8010,7 @@ function hs(t, e, n, i, r, s, o) {
|
|
|
7994
8010
|
for (let h = r; h < s; h += 6) {
|
|
7995
8011
|
const r = d[2 * n[h] + 1];
|
|
7996
8012
|
if (l !== r || h === s - 6) {
|
|
7997
|
-
const u = n[h === s - 6 ? h : h - 6], c =
|
|
8013
|
+
const u = n[h === s - 6 ? h : h - 6], c = Zr.call(this, os, y, v, e, p, m, i, o, a), f = Zr.call(this, as, y, v, e, p, m, u, o, a), d = A[_] = A[_] || [];
|
|
7998
8014
|
_++, d[0] = Math.min(c[0], f[0]), d[1] = Math.min(c[1], f[1]), d[2] = Math.max(c[2], f[2]),
|
|
7999
8015
|
d[3] = Math.max(c[3], f[3]), i = n[h], l = r, !t && this.isCollides(d) && (t = 1);
|
|
8000
8016
|
}
|
|
@@ -8003,29 +8019,29 @@ function hs(t, e, n, i, r, s, o) {
|
|
|
8003
8019
|
return w.collides = t, w;
|
|
8004
8020
|
}
|
|
8005
8021
|
|
|
8006
|
-
function
|
|
8022
|
+
function cs(t, e) {
|
|
8007
8023
|
const n = function(t, e) {
|
|
8008
8024
|
const {aPickingId: n, features: i} = t.geometry.properties, r = n[e];
|
|
8009
8025
|
return (i && i[r] && i[r].feature).label;
|
|
8010
8026
|
}(t, e);
|
|
8011
8027
|
return n ? function(t, e, n) {
|
|
8012
8028
|
if (!n) return null;
|
|
8013
|
-
const i = t.localTransform, r =
|
|
8014
|
-
a.set(
|
|
8015
|
-
const s = a.transformMat4(
|
|
8029
|
+
const i = t.localTransform, r = Qr(fs, t, e);
|
|
8030
|
+
a.set(ds, r[0], r[1], r[2], 1);
|
|
8031
|
+
const s = a.transformMat4(ds, ds, i);
|
|
8016
8032
|
let o = 0;
|
|
8017
8033
|
for (let t = 0; t < n.length; t++) o += n.charCodeAt(t);
|
|
8018
8034
|
return [ Math.floor(s[0]), Math.floor(s[1]), Math.floor(s[2]), o ];
|
|
8019
8035
|
}(t, e, n) : null;
|
|
8020
8036
|
}
|
|
8021
8037
|
|
|
8022
|
-
const
|
|
8038
|
+
const fs = [], ds = [];
|
|
8023
8039
|
|
|
8024
|
-
var
|
|
8040
|
+
var ps = "#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 vec2 aShape;\nattribute vec2 aTexCoord;\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 pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float rotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_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 texSize;\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 vSize;\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#ifdef HAS_TEXT_HALO_RADIUS\nattribute float aTextHaloRadius;\nvarying float vTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nattribute float aTextHaloOpacity;\nvarying float vTextHaloOpacity;\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 = pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat i = aRotationAlign;\n#else\nfloat i = rotateWithMap;\n#endif\nvec2 j = aShape / 10.0;\n if(h == 1. && flipY == .0) {\n j = j * vec2(1., -1.);\n }\n vec2 k = aTexCoord;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n float l = gl_Position.w;\n float m;\n if(isRenderingTerrain == 1. && h == 1.) {\n m = 1.;\n } else {\n float n = (1. - cameraToCenterDistance / l) * textPerspectiveRatio;\n m = clamp(.5 + .5 * (1. - n), .0, 4.);\n }\n#ifdef HAS_ROTATION\nfloat o = -aRotation / 9362. - mapRotation * i;\n#else\nfloat o = -textRotation - mapRotation * i;\n#endif\nif(h == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\no += mapRotation;\n#else\no -= mapRotation;\n#endif\n }\n float u = sin(o);\n float v = cos(o);\n mat2 A = mat2(v, -1. * u, u, v);\n j = A * (j / glyphSize * d);\n float B;\n if(isRenderingTerrain == 1.) {\n B = 1.;\n } else {\n B = l / cameraToCenterDistance;\n }\n if(h == .0) {\n vec2 C = j * 2. / canvasSize;\n gl_Position.xy += C * m * l;\n } else {\n float D;\n if(isRenderingTerrain == 1.) {\n D = tileRatio / zoomScale;\n } else {\n D = tileRatio / zoomScale * B * m;\n }\n vec2 C = j;\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c + vec3(C, .0) * D, 1.);\n }\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * l;\n#ifndef PICKING_MODE\nif(h == .0) {\n vGammaScale = mix(1., B, textPerspectiveRatio);\n } else {\n vGammaScale = B + mapPitch / 4.;\n }\n vTexCoord = k / texSize;\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vSize = 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#ifdef HAS_TEXT_HALO_RADIUS\nvTextHaloRadius = aTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nvTextHaloOpacity = aTextHaloOpacity;\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}", ms = "#define SHADER_NAME TEXT_FRAG\n#define HAS_HIGHLIGHT_COLOR_POINT 1\n#define SDF_PX 8.0\n#define DEVICE_PIXEL_RATIO 1.0\n#define EDGE_GAMMA 0.105 / DEVICE_PIXEL_RATIO\nprecision mediump float;\nuniform sampler2D texture;\nuniform float textOpacity;\nuniform highp float gammaScale;\nuniform int isHalo;\nuniform highp float textHaloBlur;\nuniform float alphaTest;\n#ifdef HAS_TEXT_HALO_OPACITY\nvarying float vTextHaloOpacity;\n#else\nuniform float textHaloOpacity;\n#endif\nuniform float layerOpacity;\nvarying vec2 vTexCoord;\nvarying float vSize;\nvarying float vGammaScale;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nvarying vec4 vTextFill;\n#else\nuniform vec4 textFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvarying vec4 vTextHaloFill;\n#else\nuniform vec4 textHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nvarying float vTextHaloRadius;\n#else\nuniform highp float textHaloRadius;\n#endif\n#include <highlight_frag>\nvoid main() {\n \n#ifdef HAS_TEXT_FILL\nvec4 c = vTextFill;\n#else\nvec4 c = textFill;\n#endif\nfloat d = vSize / 24.;\n lowp vec4 e = c;\n highp float f = EDGE_GAMMA / (d * gammaScale);\n lowp float h = 185. / 256.;\n if(isHalo == 1) {\n \n#ifdef HAS_TEXT_HALO_FILL\nvec4 i = vTextHaloFill;\n#else\nvec4 i = textHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nfloat j = vTextHaloRadius;\n#else\nfloat j = textHaloRadius;\n#endif\ne = i;\n f = (textHaloBlur * 1.19 / SDF_PX + EDGE_GAMMA) / (d * gammaScale);\n h = (6. - j / d) / SDF_PX;\n#ifdef HAS_TEXT_HALO_OPACITY\nfloat k = vTextHaloOpacity / 255.;\n#else\nfloat k = textHaloOpacity;\n#endif\ne *= k * 1.25;\n }\n float l = texture2D(texture, vTexCoord).a;\n highp float m = f * vGammaScale * .7;\n float n = clamp(smoothstep(h - m, h + m, l), .0, 1.);\n gl_FragColor = e * (n * textOpacity * vOpacity * layerOpacity);\n if(gl_FragColor.a < alphaTest) {\n discard;\n }\n gl_FragColor = highlight_blendColor(gl_FragColor);\n}";
|
|
8025
8041
|
|
|
8026
|
-
const
|
|
8042
|
+
const ys = new Uint16Array(1), gs = new Int8Array(1);
|
|
8027
8043
|
|
|
8028
|
-
function
|
|
8044
|
+
function vs(t, e, n) {
|
|
8029
8045
|
si(t, e, n), function(t) {
|
|
8030
8046
|
const {aMarkerWidth: e, aMarkerHeight: n, aMarkerDx: i, aMarkerDy: r, aPitchAlign: s, aRotationAlign: o, aRotation: a, aOverlap: l} = t.data;
|
|
8031
8047
|
if (e) {
|
|
@@ -8063,7 +8079,7 @@ function gs(t, e, n) {
|
|
|
8063
8079
|
}(t);
|
|
8064
8080
|
}
|
|
8065
8081
|
|
|
8066
|
-
function
|
|
8082
|
+
function xs(t, e) {
|
|
8067
8083
|
const n = g(e.markerWidth), i = g(e.markerHeight), r = g(e.markerDx), s = g(e.markerDy), o = g(e.markerOpacity), a = g(e.markerTextFit), l = y(e.markerPitchAlignment), h = y(e.markerRotationAlignment), u = g(e.markerRotation), c = y(e.markerAllowOverlapFn), f = y(e.markerIgnorePlacement), d = new Int16Array(1), m = new Uint16Array(1);
|
|
8068
8084
|
return [ {
|
|
8069
8085
|
attrName: "aMarkerWidth",
|
|
@@ -8164,7 +8180,7 @@ function vs(t, e) {
|
|
|
8164
8180
|
} ];
|
|
8165
8181
|
}
|
|
8166
8182
|
|
|
8167
|
-
function
|
|
8183
|
+
function bs(t, e, n, i) {
|
|
8168
8184
|
if (!n || !i || "none" === i) return;
|
|
8169
8185
|
const r = function(t, e, n) {
|
|
8170
8186
|
let i = t.properties.textFitFn;
|
|
@@ -8233,11 +8249,11 @@ function xs(t, e, n, i) {
|
|
|
8233
8249
|
if (!s) return [];
|
|
8234
8250
|
return n;
|
|
8235
8251
|
}(e, n);
|
|
8236
|
-
i.length && (e.properties.labelShape = i,
|
|
8252
|
+
i.length && (e.properties.labelShape = i, As.call(this, t, e, n));
|
|
8237
8253
|
}
|
|
8238
8254
|
}
|
|
8239
8255
|
|
|
8240
|
-
function
|
|
8256
|
+
function As(t, e) {
|
|
8241
8257
|
const n = this.getSymbolDef(e.properties.symbolIndex), i = n.markerTextFit, r = e.properties;
|
|
8242
8258
|
let s = "both" === i || "width" === i, o = "both" === i || "height" === i;
|
|
8243
8259
|
if (p(n.markerTextFit)) {
|
|
@@ -8280,22 +8296,22 @@ function bs(t, e) {
|
|
|
8280
8296
|
e.data.aMarkerHeight = new Uint16Array(u);
|
|
8281
8297
|
}
|
|
8282
8298
|
const c = this.getSymbolDef(e.properties.textGeo.properties.symbolIndex), f = g(c.textSize);
|
|
8283
|
-
|
|
8299
|
+
_s.call(this, t, e), (!p(c.textSize) || f.isZoomConstant && f.isFeatureConstant) && (r.isFitConstant = !0);
|
|
8284
8300
|
}
|
|
8285
8301
|
|
|
8286
|
-
const
|
|
8302
|
+
const ws = [ 0, 0, 0, 0 ];
|
|
8287
8303
|
|
|
8288
|
-
function
|
|
8304
|
+
function _s(t, e) {
|
|
8289
8305
|
const n = e.properties.textGeo;
|
|
8290
8306
|
if (!n) return;
|
|
8291
8307
|
const i = n.properties, r = e.properties;
|
|
8292
8308
|
if (r.isFitConstant || !r.labelShape || !r.labelShape.length) return;
|
|
8293
8309
|
const s = this.getSymbolDef(e.properties.symbolIndex), o = this.getSymbolDef(n.properties.symbolIndex).textSize;
|
|
8294
8310
|
let a;
|
|
8295
|
-
p(o) && (a = i.
|
|
8296
|
-
const l = s.markerTextFitPadding ||
|
|
8311
|
+
p(o) && (a = i.ks ? i.ks : i.ks = g(o));
|
|
8312
|
+
const l = s.markerTextFitPadding || ws;
|
|
8297
8313
|
let h;
|
|
8298
|
-
p(l) && (h = r.
|
|
8314
|
+
p(l) && (h = r.Os ? r.Os : r.Os = y(l));
|
|
8299
8315
|
const u = t.getZoom(), {fitIcons: c, fitWidthIcons: f, fitHeightIcons: d} = r, {aMarkerWidth: m, aMarkerHeight: v, labelShape: x} = r, b = r.elements || e.elements, {features: A, aPickingId: w} = r, _ = (t, e, n, i) => {
|
|
8300
8316
|
const s = x[4 * e], c = x[4 * e + 1], f = x[4 * e + 2], d = x[4 * e + 3];
|
|
8301
8317
|
if (!(s || c || f || d)) return;
|
|
@@ -8309,20 +8325,20 @@ function ws(t, e) {
|
|
|
8309
8325
|
if (p(k)) {
|
|
8310
8326
|
k = (S.fitPaddingFn = S.fitPaddingFn || y(k))(u, S);
|
|
8311
8327
|
}
|
|
8312
|
-
if (k = k ||
|
|
8328
|
+
if (k = k || ws, k[0] === k[2] && k[1] === k[3] || (P = r.aPadOffsetX, T = r.aPadOffsetY,
|
|
8313
8329
|
P || (P = r.aPadOffsetX = new Int8Array(m.length), T = r.aPadOffsetY = new Int8Array(m.length))),
|
|
8314
8330
|
m && n) {
|
|
8315
8331
|
const e = Math.abs((f - s) / 10 * M) + (k[1] + k[3] || 0);
|
|
8316
|
-
if (
|
|
8332
|
+
if (ys[0] = e, m[t] !== ys[0] && (Nt(m, ys[0], t, t + 4), m.dirty = !0), P) {
|
|
8317
8333
|
const e = (k[1] + k[3]) / 2 - k[3];
|
|
8318
|
-
|
|
8334
|
+
gs[0] = e, P[t] !== gs[0] && (Nt(P, e, t, t + 4), P.dirty = !0);
|
|
8319
8335
|
}
|
|
8320
8336
|
}
|
|
8321
8337
|
if (v && i) {
|
|
8322
8338
|
const e = Math.abs((d - c) / 10 * M) + (k[0] + k[2] || 0);
|
|
8323
|
-
if (
|
|
8339
|
+
if (ys[0] = e, v[t] !== ys[0] && (Nt(v, ys[0], t, t + 4), v.dirty = !0), T) {
|
|
8324
8340
|
const e = k[0] - (k[0] + k[2]) / 2;
|
|
8325
|
-
|
|
8341
|
+
gs[0] = e, T[t] !== gs[0] && (Nt(T, e, t, t + 4), T.dirty = !0);
|
|
8326
8342
|
}
|
|
8327
8343
|
}
|
|
8328
8344
|
};
|
|
@@ -8348,30 +8364,30 @@ function ws(t, e) {
|
|
|
8348
8364
|
S && (e.data.aPadOffsetX = S, e.data.aPadOffsetY = M);
|
|
8349
8365
|
}
|
|
8350
8366
|
|
|
8351
|
-
const
|
|
8367
|
+
const Ss = function(t) {
|
|
8352
8368
|
const e = this.layer.getRenderer();
|
|
8353
|
-
return !this.
|
|
8354
|
-
}, Ss = function(t) {
|
|
8355
|
-
const e = this.layer.getRenderer();
|
|
8356
|
-
return !(this.Ps(t) || e.isForeground(t) || !t.geometry.properties.iconAtlas || t.geometry.properties.isEmpty);
|
|
8369
|
+
return !this.Ts(t) && e.isForeground(t) && !!t.geometry.properties.iconAtlas && !t.geometry.properties.isEmpty;
|
|
8357
8370
|
}, Ms = function(t) {
|
|
8358
8371
|
const e = this.layer.getRenderer();
|
|
8359
|
-
return !this.
|
|
8372
|
+
return !(this.Ts(t) || e.isForeground(t) || !t.geometry.properties.iconAtlas || t.geometry.properties.isEmpty);
|
|
8360
8373
|
}, Ps = function(t) {
|
|
8361
8374
|
const e = this.layer.getRenderer();
|
|
8362
|
-
return !this.
|
|
8363
|
-
}, Ts =
|
|
8375
|
+
return !this.Ts(t) && e.isForeground(t) && !!t.geometry.properties.glyphAtlas;
|
|
8376
|
+
}, Ts = function(t) {
|
|
8377
|
+
const e = this.layer.getRenderer();
|
|
8378
|
+
return !this.Ts(t) && !e.isForeground(t) && !!t.geometry.properties.glyphAtlas;
|
|
8379
|
+
}, ks = [], Os = {
|
|
8364
8380
|
collides: -1
|
|
8365
|
-
},
|
|
8381
|
+
}, Is = [ 2048, 2048 ], Fs = r.identity([]), Cs = [];
|
|
8366
8382
|
|
|
8367
|
-
class
|
|
8383
|
+
class Es extends br {
|
|
8368
8384
|
static getBloomSymbol() {
|
|
8369
8385
|
return [ "markerBloom", "textBloom" ];
|
|
8370
8386
|
}
|
|
8371
8387
|
constructor(t, e, n, i, r, s) {
|
|
8372
8388
|
super(t, e, n, i, r, s), this.propAllowOverlap = "markerAllowOverlap", this.propIgnorePlacement = "markerIgnorePlacement",
|
|
8373
|
-
this.Zi = {}, this.isLabelCollides =
|
|
8374
|
-
this.
|
|
8389
|
+
this.Zi = {}, this.isLabelCollides = us.bind(this), this.Is = Ss.bind(this), this.Fs = Ms.bind(this),
|
|
8390
|
+
this.Cs = Ps.bind(this), this.Es = Ts.bind(this), this.Ds = [];
|
|
8375
8391
|
}
|
|
8376
8392
|
needToRefreshTerrainTileOnZooming() {
|
|
8377
8393
|
for (let t = 0; t < this.symbolDef.length; t++) {
|
|
@@ -8387,16 +8403,16 @@ class Cs extends br {
|
|
|
8387
8403
|
return super.isTerrainSkin() && this.needToRefreshTerrainTileOnZooming();
|
|
8388
8404
|
}
|
|
8389
8405
|
setTextShaderDefines(t) {
|
|
8390
|
-
this.
|
|
8406
|
+
this.Rs = t;
|
|
8391
8407
|
}
|
|
8392
8408
|
createFnTypeConfig(t, e) {
|
|
8393
8409
|
return {
|
|
8394
|
-
icon:
|
|
8395
|
-
text:
|
|
8410
|
+
icon: xs.call(this, t, e),
|
|
8411
|
+
text: ss.call(this, t, e)
|
|
8396
8412
|
};
|
|
8397
8413
|
}
|
|
8398
8414
|
startFrame(...t) {
|
|
8399
|
-
return this.
|
|
8415
|
+
return this.Ds.length = 0, super.startFrame(...t);
|
|
8400
8416
|
}
|
|
8401
8417
|
createGeometry(t, e) {
|
|
8402
8418
|
return t && t.empty && (t.data = {
|
|
@@ -8406,19 +8422,19 @@ class Cs extends br {
|
|
|
8406
8422
|
}
|
|
8407
8423
|
postCreateGeometry(t, e) {
|
|
8408
8424
|
const {geometry: n, symbolIndex: i} = t, r = this.getSymbolDef(i), s = this.getFnTypeConfig(i);
|
|
8409
|
-
if (this.
|
|
8410
|
-
|
|
8425
|
+
if (this.Ls(n)) n.properties.iconAtlas ? this.drawDebugAtlas(n.properties.iconAtlas) : n.properties.isEmpty = !0,
|
|
8426
|
+
vs(n, r, s.icon); else if (this.Ns(n) && zt(r)) {
|
|
8411
8427
|
const t = e[e.length - 1];
|
|
8412
8428
|
if (t) {
|
|
8413
8429
|
const {geometry: e, symbolIndex: s} = t;
|
|
8414
8430
|
if (e && s.index === i.index) {
|
|
8415
8431
|
const t = this.getMap(), i = r.markerTextFit;
|
|
8416
|
-
e.properties.textGeo = n,
|
|
8432
|
+
e.properties.textGeo = n, bs.call(this, t, e, n, i);
|
|
8417
8433
|
}
|
|
8418
8434
|
}
|
|
8419
8435
|
}
|
|
8420
8436
|
}
|
|
8421
|
-
|
|
8437
|
+
prepareCollideIndex(t) {
|
|
8422
8438
|
const {collideIds: e, elements: n, aCount: i} = t.properties;
|
|
8423
8439
|
if (!e) return;
|
|
8424
8440
|
const r = e, s = {};
|
|
@@ -8433,7 +8449,7 @@ class Cs extends br {
|
|
|
8433
8449
|
const s = this.isEnableCollision(), o = this.layer, {geometry: a, symbolIndex: l} = t;
|
|
8434
8450
|
a.properties.symbolIndex = l;
|
|
8435
8451
|
const h = this.getSymbolDef(l), u = this.getSymbol(l), c = this.getFnTypeConfig(l), f = [];
|
|
8436
|
-
if (this.
|
|
8452
|
+
if (this.Ls(a)) {
|
|
8437
8453
|
const t = function(t, e, i, r, s, o, a, l) {
|
|
8438
8454
|
if (e.isDisposed() || 0 === e.data.aPosition.length) return null;
|
|
8439
8455
|
const h = e.properties.iconAtlas;
|
|
@@ -8478,25 +8494,25 @@ class Cs extends br {
|
|
|
8478
8494
|
}(this.regl, a, e, 0, u, c.icon, o.options.collision, !s, this.isEnableUniquePlacement());
|
|
8479
8495
|
t && (t.positionMatrix = this.getAltitudeOffsetMatrix(), delete t.geometry.properties.glyphAtlas,
|
|
8480
8496
|
f.push(t));
|
|
8481
|
-
} else if (this.
|
|
8482
|
-
const t =
|
|
8497
|
+
} else if (this.Ns(a)) {
|
|
8498
|
+
const t = es.call(this, this.regl, a, e, h, u, c.text, o.options.collision, !s, this.isEnableUniquePlacement());
|
|
8483
8499
|
t.length && (t.forEach(t => {
|
|
8484
8500
|
t.positionMatrix = this.getAltitudeOffsetMatrix(), delete t.geometry.properties.iconAtlas;
|
|
8485
8501
|
}), f.push(...t));
|
|
8486
8502
|
}
|
|
8487
8503
|
return "line" === a.properties.markerPlacement && this.Hs(a, r), "line" === a.properties.markerPlacement && f.forEach(t => t.properties.isLinePlacement = !0),
|
|
8488
|
-
this.
|
|
8504
|
+
this.prepareCollideIndex(a), f;
|
|
8489
8505
|
}
|
|
8490
8506
|
Hs(t, e) {
|
|
8491
8507
|
const {collideIds: n} = t.properties, i = new Uint16Array(n.length);
|
|
8492
|
-
if (this.
|
|
8508
|
+
if (this.Ls(t)) {
|
|
8493
8509
|
let r = 0;
|
|
8494
8510
|
for (let t = 0; t < n.length; t += 4) i.fill(r++, t, t + 4);
|
|
8495
8511
|
t.properties.collideIds = i, t.properties.uniqueCollideIds = Ut(i), e.markerCollideMap = {
|
|
8496
8512
|
old: n,
|
|
8497
8513
|
new: i
|
|
8498
8514
|
};
|
|
8499
|
-
} else if (this.
|
|
8515
|
+
} else if (this.Ns(t)) {
|
|
8500
8516
|
const {collideIds: n, aCount: i} = t.properties;
|
|
8501
8517
|
if (!i) return;
|
|
8502
8518
|
if (e.markerCollideMap) {
|
|
@@ -8523,12 +8539,12 @@ class Cs extends br {
|
|
|
8523
8539
|
if (this.isEnableCollision() && t.length > 0) {
|
|
8524
8540
|
const e = new cr(t);
|
|
8525
8541
|
e.properties.uniqueCollideIds = t[0].geometry.properties.uniqueCollideIds, e.properties.meshKey = t[0].properties.meshKey,
|
|
8526
|
-
e.properties.level = t[0].properties.level, this.
|
|
8542
|
+
e.properties.level = t[0].properties.level, this.Ds.push(e);
|
|
8527
8543
|
}
|
|
8528
8544
|
for (let e = 0; e < t.length; e++) {
|
|
8529
8545
|
if (!this.isMeshIterable(t[e])) continue;
|
|
8530
8546
|
const n = t[e].geometry, {symbolIndex: i} = n.properties;
|
|
8531
|
-
zt(this.getSymbolDef(i)) &&
|
|
8547
|
+
zt(this.getSymbolDef(i)) && _s.call(this, this.getMap(), n);
|
|
8532
8548
|
}
|
|
8533
8549
|
const e = this.getMap().getZoom();
|
|
8534
8550
|
for (let n = 0; n < t.length; n++) {
|
|
@@ -8546,22 +8562,22 @@ class Cs extends br {
|
|
|
8546
8562
|
if (!this.isEnableCollision()) return;
|
|
8547
8563
|
super.updateCollision(t);
|
|
8548
8564
|
const e = this.scene.getMeshes();
|
|
8549
|
-
e && e.length ? (this.zs(t.timestamp), this.
|
|
8565
|
+
e && e.length ? (this.zs(t.timestamp), this.Ds = [], this.zr()) : this.zr();
|
|
8550
8566
|
}
|
|
8551
8567
|
callCurrentTileShader(t, e) {
|
|
8552
|
-
this.shader.filter = e.sceneFilter ? [ this.Os, e.sceneFilter ] : this.Os, this.callRenderer(this.shader, t, e),
|
|
8553
|
-
this.Vs.filter = e.sceneFilter ? [ this.Fs, e.sceneFilter ] : this.Fs, this.callRenderer(this.Vs, t, e);
|
|
8554
|
-
}
|
|
8555
|
-
callBackgroundTileShader(t, e) {
|
|
8556
8568
|
this.shader.filter = e.sceneFilter ? [ this.Is, e.sceneFilter ] : this.Is, this.callRenderer(this.shader, t, e),
|
|
8557
8569
|
this.Vs.filter = e.sceneFilter ? [ this.Cs, e.sceneFilter ] : this.Cs, this.callRenderer(this.Vs, t, e);
|
|
8558
8570
|
}
|
|
8571
|
+
callBackgroundTileShader(t, e) {
|
|
8572
|
+
this.shader.filter = e.sceneFilter ? [ this.Fs, e.sceneFilter ] : this.Fs, this.callRenderer(this.shader, t, e),
|
|
8573
|
+
this.Vs.filter = e.sceneFilter ? [ this.Es, e.sceneFilter ] : this.Es, this.callRenderer(this.Vs, t, e);
|
|
8574
|
+
}
|
|
8559
8575
|
isMeshIterable(t) {
|
|
8560
8576
|
return t && t.geometry && !t.geometry.properties.isEmpty && t.material && !t.material.get("isHalo") && this.isMeshVisible(t) && !(this.shouldIgnoreBackground() && !this.layer.getRenderer().isForeground(t));
|
|
8561
8577
|
}
|
|
8562
8578
|
zs() {
|
|
8563
8579
|
if (!this.isEnableCollision()) return;
|
|
8564
|
-
let t = this.
|
|
8580
|
+
let t = this.Ds;
|
|
8565
8581
|
t && t.length && this.Us(t);
|
|
8566
8582
|
}
|
|
8567
8583
|
js(t, e, n, i) {
|
|
@@ -8572,7 +8588,7 @@ class Cs extends br {
|
|
|
8572
8588
|
}
|
|
8573
8589
|
Us(t) {
|
|
8574
8590
|
const e = this.layer.getRenderer();
|
|
8575
|
-
t = t.sort(
|
|
8591
|
+
t = t.sort(Ds);
|
|
8576
8592
|
for (let n = 0; n < t.length; n++) {
|
|
8577
8593
|
const i = t[n];
|
|
8578
8594
|
if (!i || !i.meshes.length) continue;
|
|
@@ -8605,7 +8621,7 @@ class Cs extends br {
|
|
|
8605
8621
|
Xs(t, e, n, i) {
|
|
8606
8622
|
const s = this.getMap(), {collideBoxIndex: o} = t.meshes[0].geometry.properties;
|
|
8607
8623
|
if (!(o && o[e])) return !1;
|
|
8608
|
-
const a = r.multiply(
|
|
8624
|
+
const a = r.multiply(ks, s.projViewMatrix, t.meshes[0].localTransform);
|
|
8609
8625
|
let l, h = !1;
|
|
8610
8626
|
const u = t.meshes;
|
|
8611
8627
|
let c = 0;
|
|
@@ -8615,7 +8631,7 @@ class Cs extends br {
|
|
|
8615
8631
|
n[e] && c++;
|
|
8616
8632
|
}
|
|
8617
8633
|
if (!c) return !1;
|
|
8618
|
-
l = this.
|
|
8634
|
+
l = this.Ms(c);
|
|
8619
8635
|
let f = 0;
|
|
8620
8636
|
for (let t = 0; t < u.length; t++) {
|
|
8621
8637
|
const n = u[t];
|
|
@@ -8665,18 +8681,18 @@ class Cs extends br {
|
|
|
8665
8681
|
}
|
|
8666
8682
|
}
|
|
8667
8683
|
isBoxCollides(t, e, n, i, r, s) {
|
|
8668
|
-
if (this.
|
|
8669
|
-
if (t.geometry.properties.isEmpty) return
|
|
8684
|
+
if (this.Ns(t.geometry)) return us.call(this, 0, t, e, n, i, r, s);
|
|
8685
|
+
if (t.geometry.properties.isEmpty) return Os;
|
|
8670
8686
|
const {aTerrainAltitude: o} = t.geometry.properties;
|
|
8671
8687
|
if (o) {
|
|
8672
|
-
if (o[2 * e[i]] === xt) return
|
|
8688
|
+
if (o[2 * e[i]] === xt) return Os;
|
|
8673
8689
|
}
|
|
8674
|
-
const a = this.getMap(), {boxes: l, collision: h} = this.
|
|
8690
|
+
const a = this.getMap(), {boxes: l, collision: h} = this.Ss(t, i);
|
|
8675
8691
|
let u = 0, c = 0, f = 0;
|
|
8676
8692
|
for (let n = i; n < r; n += 6) {
|
|
8677
8693
|
const i = l[f] = l[f] || [];
|
|
8678
8694
|
f++;
|
|
8679
|
-
const r =
|
|
8695
|
+
const r = Gr.call(this, i, t, e[n], s, a);
|
|
8680
8696
|
if (!u) {
|
|
8681
8697
|
const t = this.isCollides(r);
|
|
8682
8698
|
1 === t ? u = 1 : -1 === t && c++;
|
|
@@ -8720,7 +8736,7 @@ class Cs extends br {
|
|
|
8720
8736
|
}
|
|
8721
8737
|
};
|
|
8722
8738
|
this.shader = new n.MeshShader({
|
|
8723
|
-
vert:
|
|
8739
|
+
vert: Sr,
|
|
8724
8740
|
frag: "#define SHADER_NAME MARKER\n#define HAS_HIGHLIGHT_COLOR_POINT 1\nprecision mediump float;\n#include <gl2_frag>\nuniform float alphaTest;\nuniform sampler2D iconTex;\nuniform lowp float markerOpacity;\nuniform lowp float blendSrcIsOne;\nuniform float layerOpacity;\n#include <highlight_frag>\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nvoid main() {\n vec4 c = texture2D(iconTex, vTexCoord) * markerOpacity * vOpacity * layerOpacity;\n if(c.a < .05) {\n discard;\n }\n glFragColor = c;\n glFragColor = highlight_blendColor(glFragColor);\n if(glFragColor.a < alphaTest) {\n discard;\n }\n glFragColor = highlight_blendColor(glFragColor);\n#if __VERSION__ == 100\ngl_FragColor = glFragColor;\n#endif\n}",
|
|
8725
8741
|
uniforms: [ {
|
|
8726
8742
|
name: "projViewModelMatrix",
|
|
@@ -8737,16 +8753,16 @@ class Cs extends br {
|
|
|
8737
8753
|
} ],
|
|
8738
8754
|
extraCommandProps: i
|
|
8739
8755
|
}), this.shader.version = 300;
|
|
8740
|
-
const {uniforms: s, extraCommandProps: o} =
|
|
8756
|
+
const {uniforms: s, extraCommandProps: o} = rs.call(this, e, this.sceneConfig), a = this.Rs || {};
|
|
8741
8757
|
if (this.Vs = new n.MeshShader({
|
|
8742
|
-
vert:
|
|
8743
|
-
frag:
|
|
8758
|
+
vert: ps,
|
|
8759
|
+
frag: ms,
|
|
8744
8760
|
uniforms: s,
|
|
8745
8761
|
extraCommandProps: o,
|
|
8746
8762
|
defines: a
|
|
8747
8763
|
}), this.pickingFBO) {
|
|
8748
8764
|
const t = new n.FBORayPicking(this.renderer, {
|
|
8749
|
-
vert: "#define PICKING_MODE 1\n" +
|
|
8765
|
+
vert: "#define PICKING_MODE 1\n" + Sr,
|
|
8750
8766
|
uniforms: [ {
|
|
8751
8767
|
name: "projViewModelMatrix",
|
|
8752
8768
|
type: "function",
|
|
@@ -8764,7 +8780,7 @@ class Cs extends br {
|
|
|
8764
8780
|
}, this.pickingFBO, this.getMap());
|
|
8765
8781
|
t.filter = t => !!t.geometry.properties.iconAtlas;
|
|
8766
8782
|
const e = new n.FBORayPicking(this.renderer, {
|
|
8767
|
-
vert: "#define PICKING_MODE 1\n" +
|
|
8783
|
+
vert: "#define PICKING_MODE 1\n" + ps,
|
|
8768
8784
|
uniforms: s,
|
|
8769
8785
|
extraCommandProps: o
|
|
8770
8786
|
}, this.pickingFBO, this.getMap());
|
|
@@ -8772,7 +8788,7 @@ class Cs extends br {
|
|
|
8772
8788
|
}
|
|
8773
8789
|
}
|
|
8774
8790
|
getUniformValues(e, n) {
|
|
8775
|
-
const i = n && n.isRenderingTerrainSkin, r = this.layer.getTileSize().width, s = i ?
|
|
8791
|
+
const i = n && n.isRenderingTerrainSkin, r = this.layer.getTileSize().width, s = i ? Fs : e.projViewMatrix, o = e.cameraToCenterDistance, a = h.set(Cs, e.width, e.height);
|
|
8776
8792
|
i && h.set(a, r, r);
|
|
8777
8793
|
const l = this.getBlendFunc(), u = t.Util.isFunction(l.src) ? l.src() : l.src;
|
|
8778
8794
|
return {
|
|
@@ -8782,7 +8798,7 @@ class Cs extends br {
|
|
|
8782
8798
|
projViewMatrix: s,
|
|
8783
8799
|
cameraToCenterDistance: o,
|
|
8784
8800
|
canvasSize: a,
|
|
8785
|
-
iconSize:
|
|
8801
|
+
iconSize: Is,
|
|
8786
8802
|
resolution: e.getResolution(),
|
|
8787
8803
|
glyphSize: 24,
|
|
8788
8804
|
gammaScale: 1,
|
|
@@ -8792,28 +8808,28 @@ class Cs extends br {
|
|
|
8792
8808
|
};
|
|
8793
8809
|
}
|
|
8794
8810
|
getUniqueEntryKey(t, e) {
|
|
8795
|
-
if (!this.
|
|
8811
|
+
if (!this.Ns(t.geometry)) return null;
|
|
8796
8812
|
const {elements: n} = t.geometry.properties;
|
|
8797
|
-
return
|
|
8813
|
+
return cs(t, n[e]);
|
|
8798
8814
|
}
|
|
8799
|
-
|
|
8815
|
+
Ls(t) {
|
|
8800
8816
|
const {symbolIndex: e} = t.properties;
|
|
8801
8817
|
return 0 === e.type;
|
|
8802
8818
|
}
|
|
8803
|
-
|
|
8819
|
+
Ns(t) {
|
|
8804
8820
|
const {symbolIndex: e} = t.properties;
|
|
8805
8821
|
return 1 === e.type;
|
|
8806
8822
|
}
|
|
8807
8823
|
}
|
|
8808
8824
|
|
|
8809
|
-
function
|
|
8825
|
+
function Ds(t, e) {
|
|
8810
8826
|
return t.properties.level - e.properties.level || t.properties.meshKey - e.properties.meshKey;
|
|
8811
8827
|
}
|
|
8812
8828
|
|
|
8813
|
-
const
|
|
8829
|
+
const Rs = [], Ls = [], Ns = [];
|
|
8814
8830
|
|
|
8815
|
-
function
|
|
8816
|
-
const {aGlyphOffset: m, aSegment: y, aTextDx: g, aTextDy: v, symbolIndex: x} = e.geometry.properties, b = this.getSymbol(x), A = g ? g[s] : b.textDx, w = v ? v[s] : b.textDy, _ = h.set(
|
|
8831
|
+
function Hs(t, e, n, r, s, o, a, l, u, c, f, d, p) {
|
|
8832
|
+
const {aGlyphOffset: m, aSegment: y, aTextDx: g, aTextDy: v, symbolIndex: x} = e.geometry.properties, b = this.getSymbol(x), A = g ? g[s] : b.textDx, w = v ? v[s] : b.textDy, _ = h.set(Ns, A || 0, w || 0), S = h.set(Rs, m[2 * s], m[2 * s + 1]), M = i.set(Ls, y[3 * s], y[3 * s + 1], y[3 * s + 2]);
|
|
8817
8833
|
return function(t, e, n, i, r, s, o, a, l, h, u, c, f, d, p, m, y, g) {
|
|
8818
8834
|
p || (p = i);
|
|
8819
8835
|
const v = e.geometry.properties.line, x = s[0] * c, b = f ? x - o : x + o;
|
|
@@ -8841,45 +8857,45 @@ function Ns(t, e, n, r, s, o, a, l, u, c, f, d, p) {
|
|
|
8841
8857
|
}(t, e, r, o, a, S, _[0], _[1], M[0], M[1], M[2], n / 24, u, l, c, f, d, p);
|
|
8842
8858
|
}
|
|
8843
8859
|
|
|
8844
|
-
const
|
|
8860
|
+
const zs = [], Vs = [];
|
|
8845
8861
|
|
|
8846
|
-
function
|
|
8862
|
+
function Us(t, e, n, r, s, o, a, l, u, c, f, d) {
|
|
8847
8863
|
const {aVertical: p} = n.geometry.properties, m = p[o];
|
|
8848
|
-
let y, g, v =
|
|
8864
|
+
let y, g, v = Hs.call(this, zs, n, r, s, o, l, u, c, !1);
|
|
8849
8865
|
if (!v) return null;
|
|
8850
|
-
if (i.copy(t, v), v =
|
|
8851
|
-
if (i.copy(e, v), d && (h.transformMat2(
|
|
8866
|
+
if (i.copy(t, v), v = Hs.call(this, Vs, n, r, s, a, l, u, c, !1), !v) return null;
|
|
8867
|
+
if (i.copy(e, v), d && (h.transformMat2(zs, zs, d), h.transformMat2(Vs, Vs, d)),
|
|
8852
8868
|
m) {
|
|
8853
|
-
const t = Math.abs(
|
|
8854
|
-
g =
|
|
8855
|
-
} else y = 0, g =
|
|
8869
|
+
const t = Math.abs(Vs[1] - zs[1]), e = Math.abs(Vs[0] - zs[0]) * f;
|
|
8870
|
+
g = zs[0] > Vs[0] ? 1 : 0, t > e ? (y = 1, g = zs[1] < Vs[1] ? 0 : 1) : y = 0;
|
|
8871
|
+
} else y = 0, g = zs[0] > Vs[0] ? 1 : 0;
|
|
8856
8872
|
return 2 * g + y;
|
|
8857
8873
|
}
|
|
8858
8874
|
|
|
8859
|
-
var
|
|
8875
|
+
var js = "#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 pitchWithMap;\n#endif\nuniform float zoomScale;\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float mapPitch;\nuniform vec2 texSize;\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 vSize;\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#ifdef HAS_TEXT_HALO_RADIUS\nattribute float aTextHaloRadius;\nvarying float vTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nattribute float aTextHaloOpacity;\nvarying float vTextHaloOpacity;\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 = pitchWithMap;\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 / texSize;\n vSize = 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#ifdef HAS_TEXT_HALO_RADIUS\nvTextHaloRadius = aTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nvTextHaloOpacity = aTextHaloOpacity;\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}";
|
|
8860
8876
|
|
|
8861
|
-
const
|
|
8877
|
+
const Bs = function(t) {
|
|
8862
8878
|
const e = this.layer.getRenderer();
|
|
8863
|
-
return !this.
|
|
8864
|
-
}, Bs = function(t) {
|
|
8865
|
-
const e = this.layer.getRenderer();
|
|
8866
|
-
return !this.Ps(t) && !e.isForeground(t) && "line" !== t.geometry.properties.textPlacement;
|
|
8879
|
+
return !this.Ts(t) && e.isTileNearCamera(t) && "line" !== t.geometry.properties.textPlacement;
|
|
8867
8880
|
}, Gs = function(t) {
|
|
8868
8881
|
const e = this.layer.getRenderer();
|
|
8869
|
-
return !this.
|
|
8882
|
+
return !this.Ts(t) && !e.isForeground(t) && "line" !== t.geometry.properties.textPlacement;
|
|
8870
8883
|
}, Ws = function(t) {
|
|
8884
|
+
const e = this.layer.getRenderer();
|
|
8885
|
+
return !this.Ts(t) && e.isTileNearCamera(t) && "line" === t.geometry.properties.textPlacement;
|
|
8886
|
+
}, Xs = function(t) {
|
|
8871
8887
|
const e = this.layer.getRenderer(), n = t.properties.tile.z, i = e.getCurrentTileZoom();
|
|
8872
|
-
return !this.
|
|
8873
|
-
},
|
|
8888
|
+
return !this.Ts(t) && !e.isForeground(t) && "line" === t.geometry.properties.textPlacement && n < i;
|
|
8889
|
+
}, Ys = [ 0, 0, 3 ], $s = [], qs = [], Js = [], Ks = [], Zs = [], Qs = [], to = [], eo = [], no = [ 1, -1 ], io = new Int16Array(3), ro = [], so = [], oo = [], ao = [], lo = [], ho = [], uo = [], co = {}, fo = {}, po = {}, mo = [], yo = [], go = r.identity([]), vo = [];
|
|
8874
8890
|
|
|
8875
|
-
class
|
|
8891
|
+
class xo extends br {
|
|
8876
8892
|
static getBloomSymbol() {
|
|
8877
8893
|
return [ "textBloom" ];
|
|
8878
8894
|
}
|
|
8879
8895
|
constructor(t, e, n, i, r, s) {
|
|
8880
8896
|
super(t, e, n, i, r, s), this.propAllowOverlap = "textAllowOverlap", this.propIgnorePlacement = "textIgnorePlacement",
|
|
8881
|
-
this.colorCache = {}, this.$s =
|
|
8882
|
-
this.Ks =
|
|
8897
|
+
this.colorCache = {}, this.$s = Bs.bind(this), this.qs = Gs.bind(this), this.Js = Ws.bind(this),
|
|
8898
|
+
this.Ks = Xs.bind(this), this.isLabelCollides = us.bind(this), this.Zs();
|
|
8883
8899
|
}
|
|
8884
8900
|
prepareRender(...t) {
|
|
8885
8901
|
super.prepareRender(...t);
|
|
@@ -8920,9 +8936,9 @@ class vo extends br {
|
|
|
8920
8936
|
const n = b.createExpression(e.textName, "string");
|
|
8921
8937
|
this.eo[t] = (t, e) => {
|
|
8922
8938
|
let i;
|
|
8923
|
-
|
|
8939
|
+
co.zoom = t, fo.properties = e;
|
|
8924
8940
|
try {
|
|
8925
|
-
i = n.evaluateWithoutErrorHandling(
|
|
8941
|
+
i = n.evaluateWithoutErrorHandling(co, fo, po, null, mo);
|
|
8926
8942
|
} catch (t) {
|
|
8927
8943
|
i = null;
|
|
8928
8944
|
}
|
|
@@ -8937,10 +8953,10 @@ class vo extends br {
|
|
|
8937
8953
|
return !1;
|
|
8938
8954
|
}
|
|
8939
8955
|
createFnTypeConfig(t, e) {
|
|
8940
|
-
return
|
|
8956
|
+
return ss(t, e);
|
|
8941
8957
|
}
|
|
8942
8958
|
isBloom(t) {
|
|
8943
|
-
return !!this.getSymbol(t.properties.symbolIndex)[
|
|
8959
|
+
return !!this.getSymbol(t.properties.symbolIndex)[xo.getBloomSymbol()[0]];
|
|
8944
8960
|
}
|
|
8945
8961
|
createGeometry(t, e, n) {
|
|
8946
8962
|
const i = t;
|
|
@@ -8955,7 +8971,7 @@ class vo extends br {
|
|
|
8955
8971
|
createMesh(t, e, {tileVectorTransform: n}) {
|
|
8956
8972
|
const i = this.isEnableCollision(), r = this.isEnableUniquePlacement(), {geometry: s, symbolIndex: o} = t;
|
|
8957
8973
|
s.properties.symbolIndex = o;
|
|
8958
|
-
const a = this.getSymbol(o), l = this.getSymbolDef(o), h = this.getFnTypeConfig(o), u =
|
|
8974
|
+
const a = this.getSymbol(o), l = this.getSymbolDef(o), h = this.getFnTypeConfig(o), u = es.call(this, this.regl, s, e, l, a, h, this.layer.options.collision, !i, r);
|
|
8959
8975
|
if (u.length) {
|
|
8960
8976
|
"line" === s.properties.textPlacement ? this.no = !0 : this.io = !0;
|
|
8961
8977
|
}
|
|
@@ -8983,7 +8999,7 @@ class vo extends br {
|
|
|
8983
8999
|
so() {
|
|
8984
9000
|
let t = this.scene.getMeshes();
|
|
8985
9001
|
if (!t || !t.length) return;
|
|
8986
|
-
const e = -this.getMap().getBearing() * Math.PI / 180, n = u.fromRotation(
|
|
9002
|
+
const e = -this.getMap().getBearing() * Math.PI / 180, n = u.fromRotation(Js, e), i = (t, e, n, i) => {
|
|
8987
9003
|
const {start: r, end: s, mesh: o, allElements: a} = e[0];
|
|
8988
9004
|
if (this.updateBoxCollisionFading(!0, o, e, n, i)) {
|
|
8989
9005
|
let e = t.count;
|
|
@@ -8991,7 +9007,7 @@ class vo extends br {
|
|
|
8991
9007
|
t.count = e;
|
|
8992
9008
|
}
|
|
8993
9009
|
}, r = this.isEnableCollision(), s = this.layer.getRenderer();
|
|
8994
|
-
t = t.sort(
|
|
9010
|
+
t = t.sort(Ao);
|
|
8995
9011
|
for (let e = 0; e < t.length; e++) {
|
|
8996
9012
|
const o = t[e];
|
|
8997
9013
|
if (!this.isMeshIterable(o)) continue;
|
|
@@ -9001,7 +9017,7 @@ class vo extends br {
|
|
|
9001
9017
|
continue;
|
|
9002
9018
|
}
|
|
9003
9019
|
const a = o.geometry, l = this.getSymbol(o.properties.symbolIndex);
|
|
9004
|
-
o.properties.textHaloRadius = It(l.textHaloRadius) ?
|
|
9020
|
+
o.properties.textHaloRadius = It(l.textHaloRadius) ? ts.textHaloRadius : l.textHaloRadius;
|
|
9005
9021
|
const h = o.properties.meshKey;
|
|
9006
9022
|
if ("line" === a.properties.textPlacement) {
|
|
9007
9023
|
if (!a.properties.line) continue;
|
|
@@ -9028,7 +9044,7 @@ class vo extends br {
|
|
|
9028
9044
|
return "line" !== this.getSymbol(t.properties.symbolIndex).textPlacement;
|
|
9029
9045
|
}
|
|
9030
9046
|
getUniqueEntryKey(t, e) {
|
|
9031
|
-
return
|
|
9047
|
+
return cs(t, e);
|
|
9032
9048
|
}
|
|
9033
9049
|
ao(t, e) {
|
|
9034
9050
|
const n = this.getMap(), i = t.geometry, s = i.properties;
|
|
@@ -9036,7 +9052,7 @@ class vo extends br {
|
|
|
9036
9052
|
if (!o) return;
|
|
9037
9053
|
const a = n.getPitch(), l = n.getBearing(), {lineTextPitch: h, lineTextBearing: u} = t.properties, c = 1 === t.material.uniforms.pitchWithMap, f = s.elements;
|
|
9038
9054
|
if (!c) {
|
|
9039
|
-
const e = r.multiply(
|
|
9055
|
+
const e = r.multiply($s, n.projViewMatrix, t.localTransform), i = o.id + "-" + e.join();
|
|
9040
9056
|
let a;
|
|
9041
9057
|
this.ro[i] ? o = this.ro[i] : (a = s.projectedLine = s.projectedLine || new Array(o.length),
|
|
9042
9058
|
o = this.lo(a, o, e, n.width, n.height), this.ro[i] = a);
|
|
@@ -9065,9 +9081,9 @@ class vo extends br {
|
|
|
9065
9081
|
}(t, e, n, i, r);
|
|
9066
9082
|
}
|
|
9067
9083
|
forEachBox(t, e) {
|
|
9068
|
-
const n = this.getMap(), i = r.multiply(
|
|
9084
|
+
const n = this.getMap(), i = r.multiply($s, n.projViewMatrix, t.properties.tileVectorTransform), {collideIds: s, aCount: o, features: a, elements: l} = t.geometry.properties, h = s;
|
|
9069
9085
|
if (!h) return;
|
|
9070
|
-
const u = this.isEnableUniquePlacement(), c = this.
|
|
9086
|
+
const u = this.isEnableUniquePlacement(), c = this.Ms(1);
|
|
9071
9087
|
c[0].allElements = l, c[0].mesh = t;
|
|
9072
9088
|
let f = 0, d = l[0], p = 0, m = h[d];
|
|
9073
9089
|
for (let n = 0; n <= l.length; n += 6) if (d = l[n], h[d] !== m || n === l.length) {
|
|
@@ -9088,59 +9104,59 @@ class vo extends br {
|
|
|
9088
9104
|
P || (P = v.properties.aProjectedAnchor = new Array(_.length / x * 3));
|
|
9089
9105
|
const T = v.properties.aTextSize, k = !u, O = e[n], I = O * x;
|
|
9090
9106
|
let F;
|
|
9091
|
-
F = v.data.aAltitude ? i.set(
|
|
9092
|
-
const C = bi(
|
|
9107
|
+
F = v.data.aAltitude ? i.set(Ks, _[I], _[I + 1], S[O]) : A.unpackPosition(Ks, _[I], _[I + 1], _[I + 2]);
|
|
9108
|
+
const C = bi(Zs, F, l, g.width, g.height), E = v.properties.aTerrainAltitude;
|
|
9093
9109
|
let D;
|
|
9094
9110
|
if (E) {
|
|
9095
9111
|
const t = E[O];
|
|
9096
9112
|
if (t === xt) return P[3 * O] = -999999, P[3 * O + 1] = -999999, P[3 * O + 2] = -999999,
|
|
9097
9113
|
!1;
|
|
9098
|
-
t ? (D = i.set(
|
|
9114
|
+
t ? (D = i.set(yo, ...F), D[2] = 100 * t, D = bi(D, D, l, g.width, g.height)) : D = C;
|
|
9099
9115
|
} else D = C;
|
|
9100
9116
|
const R = g.getDevicePixelRatio();
|
|
9101
|
-
if (a.scale(
|
|
9117
|
+
if (a.scale(vo, D, 1 / R), g.isOffscreen(vo)) return y || bo(w, e, n, s), P[3 * O] = -999999,
|
|
9102
9118
|
P[3 * O + 1] = -999999, P[3 * O + 2] = -999999, !1;
|
|
9103
9119
|
k && (F = C), P[3 * O] = D[0], P[3 * O + 1] = D[1], P[3 * O + 2] = D[2];
|
|
9104
9120
|
const L = k ? 1 : v.properties.tileExtent / this.layer.getTileSize().width;
|
|
9105
9121
|
let N = !0;
|
|
9106
|
-
const H = e[n], z = e[s - 1], V = T ? T[H] : t.properties.textSize, U = this.uo(t, V, o, H, z, F,
|
|
9107
|
-
if (null === U) return
|
|
9122
|
+
const H = e[n], z = e[s - 1], V = T ? T[H] : t.properties.textSize, U = this.uo(t, V, o, H, z, F, Ks, L, u);
|
|
9123
|
+
if (null === U) return bo(w, e, n, s), !1;
|
|
9108
9124
|
const j = z - H <= 3, B = Math.floor(U / 2), G = U % 2;
|
|
9109
9125
|
for (let a = n; a < s; a += 6) {
|
|
9110
9126
|
const u = e[a];
|
|
9111
9127
|
let f;
|
|
9112
|
-
if (f = B || a !== n || j || m ? B || a !== s - 6 || j || m ?
|
|
9128
|
+
if (f = B || a !== n || j || m ? B || a !== s - 6 || j || m ? Hs.call(this, qs, t, V, o, u, F, Ks, L, B, D, this.layer, l, p) : uo : ho,
|
|
9113
9129
|
!f) {
|
|
9114
|
-
N = !1, y ||
|
|
9130
|
+
N = !1, y || bo(w, e, n, s);
|
|
9115
9131
|
break;
|
|
9116
9132
|
}
|
|
9117
9133
|
let g = f[2];
|
|
9118
9134
|
G && (g -= Math.PI / 2);
|
|
9119
|
-
const v =
|
|
9135
|
+
const v = Er(Qs, g, 0, d.rotateWithMap, d.pitchWithMap), x = w.length > b.length;
|
|
9120
9136
|
let A;
|
|
9121
9137
|
if (x) {
|
|
9122
|
-
i.set(
|
|
9123
|
-
const t = i.normalize(
|
|
9138
|
+
i.set(ao, M[3 * u], M[3 * u + 1], 0);
|
|
9139
|
+
const t = i.normalize(ao, ao), e = -M[3 * u + 2];
|
|
9124
9140
|
if (e) {
|
|
9125
|
-
const n = c.setAxisAngle(
|
|
9126
|
-
r.fromTranslation(
|
|
9141
|
+
const n = c.setAxisAngle(ro, t, e);
|
|
9142
|
+
r.fromTranslation(so, Ys), r.fromQuat(oo, n), A = r.multiply(oo, oo, so);
|
|
9127
9143
|
}
|
|
9128
9144
|
}
|
|
9129
9145
|
for (let t = 0; t < 4; t++) {
|
|
9130
9146
|
const e = 2 * (u + t);
|
|
9131
|
-
h.set(
|
|
9132
|
-
p ? (h.multiply(
|
|
9133
|
-
h.add(
|
|
9147
|
+
h.set(to, b[e] / 10, b[e + 1] / 10), h.scale(to, to, V / 24), h.transformMat2(to, to, v),
|
|
9148
|
+
p ? (h.multiply(to, to, no), h.add(eo, to, f), x && (eo[2] = 0, A && i.transformMat4(eo, eo, A))) : (h.multiply(eo, f, no),
|
|
9149
|
+
h.add(eo, to, eo)), io[0] = 10 * eo[0], io[1] = 10 * eo[1], x && (io[2] = 10 * eo[2]);
|
|
9134
9150
|
const n = (x ? 3 : 2) * (u + t);
|
|
9135
|
-
(w[n] !==
|
|
9136
|
-
w[n] =
|
|
9151
|
+
(w[n] !== io[0] || w[n + 1] !== io[1] || x && w[n + 2] !== io[2]) && (w.dirty = !0,
|
|
9152
|
+
w[n] = io[0], w[n + 1] = io[1], x && (w[n + 2] = io[2]));
|
|
9137
9153
|
}
|
|
9138
9154
|
}
|
|
9139
9155
|
return N;
|
|
9140
9156
|
}
|
|
9141
9157
|
uo(t, e, n, i, r, s, o, a, l) {
|
|
9142
9158
|
const h = r - i <= 3, u = this.getMap();
|
|
9143
|
-
return h ? 0 :
|
|
9159
|
+
return h ? 0 : Us.call(this, ho, uo, t, e, n, i, r, s, o, a, u.width / u.height, l);
|
|
9144
9160
|
}
|
|
9145
9161
|
isBoxCollides(t, e, n, i, r, s) {
|
|
9146
9162
|
return this.isLabelCollides(0, t, e, n, i, r, s);
|
|
@@ -9159,28 +9175,28 @@ class vo extends br {
|
|
|
9159
9175
|
init() {
|
|
9160
9176
|
const t = this.regl;
|
|
9161
9177
|
this.renderer = new n.Renderer(t);
|
|
9162
|
-
const {uniforms: e, extraCommandProps: i} =
|
|
9178
|
+
const {uniforms: e, extraCommandProps: i} = rs.call(this, this.canvas, this.sceneConfig), r = this.canvas, s = {
|
|
9163
9179
|
x: (t, e) => e.viewport ? e.viewport.x : 0,
|
|
9164
9180
|
y: (t, e) => e.viewport ? e.viewport.y : 0,
|
|
9165
9181
|
width: (t, e) => e.viewport ? e.viewport.width : r ? r.width : 1,
|
|
9166
9182
|
height: (t, e) => e.viewport ? e.viewport.height : r ? r.height : 1
|
|
9167
9183
|
};
|
|
9168
9184
|
i.viewport = s, this.shader = new n.MeshShader({
|
|
9169
|
-
vert:
|
|
9170
|
-
frag:
|
|
9185
|
+
vert: ps,
|
|
9186
|
+
frag: ms,
|
|
9171
9187
|
uniforms: e,
|
|
9172
9188
|
extraCommandProps: i
|
|
9173
9189
|
});
|
|
9174
9190
|
let o = i;
|
|
9175
9191
|
if (this.layer.getRenderer().isEnableWorkAround("win-intel-gpu-crash") && (o = Tt({}, i),
|
|
9176
9192
|
o.stencil = Tt({}, i.stencil), o.stencil.enable = !0), this.oo = new n.MeshShader({
|
|
9177
|
-
vert:
|
|
9178
|
-
frag:
|
|
9193
|
+
vert: js,
|
|
9194
|
+
frag: ms,
|
|
9179
9195
|
uniforms: e,
|
|
9180
9196
|
extraCommandProps: o
|
|
9181
9197
|
}), this.pickingFBO) {
|
|
9182
9198
|
const t = new n.FBORayPicking(this.renderer, {
|
|
9183
|
-
vert: "#define PICKING_MODE 1\n" +
|
|
9199
|
+
vert: "#define PICKING_MODE 1\n" + ps,
|
|
9184
9200
|
uniforms: e,
|
|
9185
9201
|
extraCommandProps: {
|
|
9186
9202
|
viewport: this.pickingViewport
|
|
@@ -9191,7 +9207,7 @@ class vo extends br {
|
|
|
9191
9207
|
return "line" !== this.getSymbol(e).textPlacement;
|
|
9192
9208
|
};
|
|
9193
9209
|
const i = new n.FBORayPicking(this.renderer, {
|
|
9194
|
-
vert: "#define PICKING_MODE 1\n" +
|
|
9210
|
+
vert: "#define PICKING_MODE 1\n" + js,
|
|
9195
9211
|
uniforms: e,
|
|
9196
9212
|
extraCommandProps: {
|
|
9197
9213
|
viewport: this.pickingViewport
|
|
@@ -9201,7 +9217,7 @@ class vo extends br {
|
|
|
9201
9217
|
}
|
|
9202
9218
|
}
|
|
9203
9219
|
getUniformValues(t, e) {
|
|
9204
|
-
const n = e && e.isRenderingTerrainSkin, i = this.layer.getTileSize().width, r = n ?
|
|
9220
|
+
const n = e && e.isRenderingTerrainSkin, i = this.layer.getTileSize().width, r = n ? go : t.projViewMatrix, s = t.cameraToCenterDistance, o = h.set(lo, t.width, t.height);
|
|
9205
9221
|
n && h.set(o, i, i);
|
|
9206
9222
|
const a = lt(t.getResolution(), t);
|
|
9207
9223
|
return {
|
|
@@ -9223,7 +9239,7 @@ class vo extends br {
|
|
|
9223
9239
|
}
|
|
9224
9240
|
}
|
|
9225
9241
|
|
|
9226
|
-
function
|
|
9242
|
+
function bo(t, e, n, i) {
|
|
9227
9243
|
for (let r = n; r < i; r += 6) {
|
|
9228
9244
|
const n = e[r];
|
|
9229
9245
|
for (let e = 0; e < 4; e++) {
|
|
@@ -9233,20 +9249,20 @@ function xo(t, e, n, i) {
|
|
|
9233
9249
|
}
|
|
9234
9250
|
}
|
|
9235
9251
|
|
|
9236
|
-
function
|
|
9252
|
+
function Ao(t, e) {
|
|
9237
9253
|
const n = t.properties.level - e.properties.level;
|
|
9238
9254
|
return 0 === n ? t.properties.meshKey - e.properties.meshKey : n;
|
|
9239
9255
|
}
|
|
9240
9256
|
|
|
9241
|
-
var
|
|
9257
|
+
var wo = "#define SHADER_NAME NATIVE_POINT\n#include <gl2_vert>\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\n#ifdef HAS_COLOR\nattribute vec4 aColor;\nvarying vec4 vColor;\n#endif\nuniform mat4 positionMatrix;\nuniform mat4 projViewModelMatrix;\nuniform float markerSize;\n#ifdef PICKING_MODE\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n gl_Position = projViewModelMatrix * positionMatrix * vec4(c, 1.);\n gl_PointSize = markerSize;\n#ifdef HAS_COLOR\nvColor = aColor / 255.;\n#endif\n#ifdef PICKING_MODE\nfbo_picking_setData(gl_Position.w, true);\n#endif\n}";
|
|
9242
9258
|
|
|
9243
|
-
const
|
|
9259
|
+
const _o = {
|
|
9244
9260
|
markerFill: [ 0, 0, 0 ],
|
|
9245
9261
|
markerOpacity: 1,
|
|
9246
9262
|
markerSize: 10
|
|
9247
9263
|
};
|
|
9248
9264
|
|
|
9249
|
-
class
|
|
9265
|
+
class So extends Bi {
|
|
9250
9266
|
getPrimitive() {
|
|
9251
9267
|
return "points";
|
|
9252
9268
|
}
|
|
@@ -9264,7 +9280,7 @@ class _o extends Bi {
|
|
|
9264
9280
|
const a = {};
|
|
9265
9281
|
Ct(a, "markerOpacity", o, "markerOpacity", 1), Ct(a, "markerSize", o, "markerSize", 10),
|
|
9266
9282
|
Ct(a, "markerFill", o, "markerFill", "#000", Rt(this.colorCache, 3));
|
|
9267
|
-
const l = new n.Material(a,
|
|
9283
|
+
const l = new n.Material(a, _o);
|
|
9268
9284
|
l.createDefines = () => "square" !== o.markerType ? {
|
|
9269
9285
|
USE_CIRCLE: 1
|
|
9270
9286
|
} : null, l.appendDefines = t => ("square" !== o.markerType && (t.USE_CIRCLE = 1),
|
|
@@ -9296,7 +9312,7 @@ class _o extends Bi {
|
|
|
9296
9312
|
const t = this.regl;
|
|
9297
9313
|
this.renderer = new n.Renderer(t);
|
|
9298
9314
|
const e = [], i = {
|
|
9299
|
-
vert:
|
|
9315
|
+
vert: wo,
|
|
9300
9316
|
frag: "#define SHADER_NAME NATIVE_POINT\nprecision mediump float;\n#include <gl2_frag>\n#ifdef USE_CIRCLE\n#if __VERSION__ == 100\n#ifdef GL_OES_standard_derivatives\n#define STANDARD_DERIVATIVES_ENABLED 1\n#extension GL_OES_standard_derivatives : enable\n#endif\n#else\n#define STANDARD_DERIVATIVES_ENABLED 1\n#endif\n#endif\n#ifdef HAS_COLOR\nvarying vec4 vColor;\n#else\nuniform vec3 markerFill;\n#endif\nuniform float markerOpacity;\nuniform float layerOpacity;\nvoid main() {\n float c = 1.;\n#ifdef USE_CIRCLE\nfloat r = .0, d = .0;\n vec2 e = 2. * gl_PointCoord - 1.;\n r = dot(e, e);\n if(r > 1.) {\n discard;\n }\n#ifdef STANDARD_DERIVATIVES_ENABLED\nd = fwidth(r);\n c = 1. - smoothstep(1. - d, 1. + d, r);\n#endif\n#endif\n#ifdef HAS_COLOR\nvec4 f = vColor;\n#else\nvec4 f = vec4(markerFill, 1.);\n#endif\nglFragColor = f * markerOpacity * c * layerOpacity;\n#if __VERSION__ == 100\ngl_FragColor = glFragColor;\n#endif\n}",
|
|
9301
9317
|
uniforms: [ {
|
|
9302
9318
|
name: "projViewModelMatrix",
|
|
@@ -9329,7 +9345,7 @@ class _o extends Bi {
|
|
|
9329
9345
|
if (this.shader = new n.MeshShader(i), this.shader.version = 300, this.pickingFBO) {
|
|
9330
9346
|
const t = [];
|
|
9331
9347
|
this.picking = [ new n.FBORayPicking(this.renderer, {
|
|
9332
|
-
vert: "#define PICKING_MODE 1\n" +
|
|
9348
|
+
vert: "#define PICKING_MODE 1\n" + wo,
|
|
9333
9349
|
uniforms: [ {
|
|
9334
9350
|
name: "projViewModelMatrix",
|
|
9335
9351
|
type: "function",
|
|
@@ -9350,11 +9366,11 @@ class _o extends Bi {
|
|
|
9350
9366
|
}
|
|
9351
9367
|
}
|
|
9352
9368
|
|
|
9353
|
-
var
|
|
9369
|
+
var Mo = "#define SHADER_NAME NATIVE_LINE\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nuniform mat4 projViewModelMatrix;\n#ifndef PICKING_MODE\n#if defined(HAS_COLOR)\nattribute vec4 aColor;\nvarying vec4 vColor;\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n gl_Position = projViewModelMatrix * vec4(c, 1.);\n#ifndef PICKING_MODE\n#if defined(HAS_COLOR)\nvColor = aColor / 255.;\n#endif\n#else\nfbo_picking_setData(gl_Position.w, true);\n#endif\n}";
|
|
9354
9370
|
|
|
9355
|
-
const
|
|
9371
|
+
const Po = r.identity([]);
|
|
9356
9372
|
|
|
9357
|
-
class
|
|
9373
|
+
class To extends Bi {
|
|
9358
9374
|
constructor(t, e, n, i, r, s) {
|
|
9359
9375
|
if (super(t, e, n, i, r, s), this.primitive = "lines", p(this.symbolDef.lineColor)) {
|
|
9360
9376
|
const t = e.getMap(), n = y(this.symbolDef.lineColor);
|
|
@@ -9396,7 +9412,7 @@ class Po extends Bi {
|
|
|
9396
9412
|
return r.multiply(n, e.projViewMatrix, e.modelMatrix), n;
|
|
9397
9413
|
}
|
|
9398
9414
|
} ], l = this.sceneConfig.depthRange, h = {
|
|
9399
|
-
vert:
|
|
9415
|
+
vert: Mo,
|
|
9400
9416
|
frag: "#define SHADER_NAME NATIVE_LINE\nprecision mediump float;\nuniform float lineOpacity;\nuniform vec4 lineColor;\nuniform float layerOpacity;\n#if defined(HAS_COLOR)\nvarying vec4 vColor;\n#endif\nvoid main() {\n gl_FragColor = lineColor * lineOpacity;\n#if defined(HAS_COLOR)\ngl_FragColor *= vColor;\n#endif\ngl_FragColor *= layerOpacity;\n}",
|
|
9401
9417
|
uniforms: a,
|
|
9402
9418
|
defines: null,
|
|
@@ -9433,7 +9449,7 @@ class Po extends Bi {
|
|
|
9433
9449
|
}
|
|
9434
9450
|
};
|
|
9435
9451
|
this.shader = new n.MeshShader(h), this.pickingFBO && (this.picking = [ new n.FBORayPicking(this.renderer, {
|
|
9436
|
-
vert: "#define PICKING_MODE 1\n" +
|
|
9452
|
+
vert: "#define PICKING_MODE 1\n" + Mo,
|
|
9437
9453
|
uniforms: a,
|
|
9438
9454
|
extraCommandProps: {
|
|
9439
9455
|
viewport: this.pickingViewport
|
|
@@ -9443,7 +9459,7 @@ class Po extends Bi {
|
|
|
9443
9459
|
getUniformValues(t, e) {
|
|
9444
9460
|
const n = e && e.isRenderingTerrainSkin;
|
|
9445
9461
|
return {
|
|
9446
|
-
projViewMatrix: n ?
|
|
9462
|
+
projViewMatrix: n ? Po : t.projViewMatrix,
|
|
9447
9463
|
viewport: n && e && e.viewport
|
|
9448
9464
|
};
|
|
9449
9465
|
}
|
|
@@ -9452,9 +9468,9 @@ class Po extends Bi {
|
|
|
9452
9468
|
}
|
|
9453
9469
|
}
|
|
9454
9470
|
|
|
9455
|
-
const
|
|
9471
|
+
const ko = [ 0, 0 ], Oo = [ 1, 1, 1 ], Io = [ 1, 1, 1, 1 ], Fo = [ 0, 0 ], Co = [ 1, 1 ], Eo = [], Do = new t.Coordinate(0, 0), Ro = new t.Coordinate(0, 0), Lo = [], No = [];
|
|
9456
9472
|
|
|
9457
|
-
class
|
|
9473
|
+
class Ho extends Vi {
|
|
9458
9474
|
supportRenderMode(t) {
|
|
9459
9475
|
return this.isAnimating() ? "fxaa" === t || "fxaaAfterTaa" === t : "taa" === t || "fxaa" === t;
|
|
9460
9476
|
}
|
|
@@ -9471,9 +9487,9 @@ class No extends Vi {
|
|
|
9471
9487
|
if (!this.material) return this.setToRedraw(), null;
|
|
9472
9488
|
const {geometry: o, symbolIndex: a} = e, l = this.layer instanceof t.TileLayer, u = new n.Mesh(o, this.material);
|
|
9473
9489
|
if (this.sceneConfig.animation) {
|
|
9474
|
-
|
|
9490
|
+
Oo[2] = .01;
|
|
9475
9491
|
const t = [];
|
|
9476
|
-
r.fromScaling(t,
|
|
9492
|
+
r.fromScaling(t, Oo), r.multiply(t, i, t), i = t;
|
|
9477
9493
|
}
|
|
9478
9494
|
const c = this.getSymbolDef(a), f = this.getFnTypeConfig(a);
|
|
9479
9495
|
si(o, c, f);
|
|
@@ -9495,12 +9511,12 @@ class No extends Vi {
|
|
|
9495
9511
|
}
|
|
9496
9512
|
});
|
|
9497
9513
|
} else {
|
|
9498
|
-
Ct(u.uniforms, "polygonFill", m, "polygonFill",
|
|
9514
|
+
Ct(u.uniforms, "polygonFill", m, "polygonFill", Io, y), Ct(u.uniforms, "polygonOpacity", m, "polygonOpacity", 1);
|
|
9499
9515
|
const t = [];
|
|
9500
9516
|
Object.defineProperty(u.uniforms, "vertexColorsOfType", {
|
|
9501
9517
|
enumerable: !0,
|
|
9502
9518
|
get: () => {
|
|
9503
|
-
const e = y(m.bottomPolygonFill ||
|
|
9519
|
+
const e = y(m.bottomPolygonFill || Io), n = y(m.topPolygonFill || Io);
|
|
9504
9520
|
t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = n[0], t[5] = n[1], t[6] = n[2],
|
|
9505
9521
|
t[7] = n[3];
|
|
9506
9522
|
const i = u.geometry.properties.vertexColors;
|
|
@@ -9565,16 +9581,16 @@ class No extends Vi {
|
|
|
9565
9581
|
}), u.properties.symbolIndex = a, u;
|
|
9566
9582
|
}
|
|
9567
9583
|
fo(t, e, n, i, r, s) {
|
|
9568
|
-
if (1 === this.dataConfig.topUVMode) return
|
|
9584
|
+
if (1 === this.dataConfig.topUVMode) return ko;
|
|
9569
9585
|
const o = this.getMap(), a = this.getSymbol(e).material;
|
|
9570
9586
|
let l = n;
|
|
9571
|
-
!this.dataConfig.side && a && a.textureOrigin && (
|
|
9572
|
-
o.coordToPointAtRes(
|
|
9587
|
+
!this.dataConfig.side && a && a.textureOrigin && (Do.set(a.textureOrigin[0], a.textureOrigin[1]),
|
|
9588
|
+
o.coordToPointAtRes(Do, i, Ro), l = h.set(Lo, n[0] - Ro.x, n[1] - Ro.y));
|
|
9573
9589
|
const u = !!a && a.uvOffsetInMeter;
|
|
9574
|
-
let c = a && a.uvOffset ||
|
|
9590
|
+
let c = a && a.uvOffset || Fo;
|
|
9575
9591
|
const f = this.getUVOffsetAnim();
|
|
9576
9592
|
f && (c = this.getUVOffset(f));
|
|
9577
|
-
const d = a && a.uvScale ||
|
|
9593
|
+
const d = a && a.uvScale || Co;
|
|
9578
9594
|
let p = this.dataConfig.side ? 0 : l[0], m = this.dataConfig.side ? 0 : l[1];
|
|
9579
9595
|
const y = a && a.textureWidth || F, g = y * d[1] / d[0];
|
|
9580
9596
|
u && (p += c[0] / r, m += c[1] / r);
|
|
@@ -9587,7 +9603,7 @@ class No extends Vi {
|
|
|
9587
9603
|
super.callShader(t, e);
|
|
9588
9604
|
}
|
|
9589
9605
|
getShadowMeshes() {
|
|
9590
|
-
if (!this.isVisible()) return
|
|
9606
|
+
if (!this.isVisible()) return Eo;
|
|
9591
9607
|
this.shadowCount = this.scene.getMeshes().length;
|
|
9592
9608
|
const t = this.scene.getMeshes().filter(t => 0 === t.properties.level);
|
|
9593
9609
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -9601,7 +9617,7 @@ class No extends Vi {
|
|
|
9601
9617
|
return t.material && t.material.uvOffsetAnim;
|
|
9602
9618
|
}
|
|
9603
9619
|
getUVOffset(t) {
|
|
9604
|
-
const e = this.getSymbols()[0], n = e.material && e.material.uvOffset ||
|
|
9620
|
+
const e = this.getSymbols()[0], n = e.material && e.material.uvOffset || Fo, i = !!e.material && e.material.uvOffsetInMeter, r = performance.now() / 1e3, s = h.set(No, n[0], n[1]);
|
|
9605
9621
|
return s[0] = r * t[0], s[1] = r * t[0], i || (s[0] %= 1, s[1] %= 1), s;
|
|
9606
9622
|
}
|
|
9607
9623
|
needPolygonOffset() {
|
|
@@ -9618,7 +9634,7 @@ class No extends Vi {
|
|
|
9618
9634
|
_r(t, e) {
|
|
9619
9635
|
if (null !== e) {
|
|
9620
9636
|
const n = t.localTransform;
|
|
9621
|
-
0 === e && (e = .01),
|
|
9637
|
+
0 === e && (e = .01), Oo[2] = e, r.fromScaling(n, Oo), r.multiply(n, t.properties.tileTransform, n),
|
|
9622
9638
|
t.setLocalTransform(n);
|
|
9623
9639
|
} else t.setLocalTransform(t.properties.tileTransform);
|
|
9624
9640
|
t.material !== this.material && t.setMaterial(this.material), t.geometry.properties.maxAltitude <= 0 && (this.do = !0),
|
|
@@ -9673,29 +9689,29 @@ class No extends Vi {
|
|
|
9673
9689
|
updateSymbol(t, e) {
|
|
9674
9690
|
let n = !1;
|
|
9675
9691
|
t && t.material && (n = function(t, e) {
|
|
9676
|
-
for (const n in e) if (
|
|
9692
|
+
for (const n in e) if (Vo[n] && e[n] !== t[n] && (!t[n] || !e[n])) return !0;
|
|
9677
9693
|
return !1;
|
|
9678
9694
|
}(this.symbolDef[0].material || {}, t.material));
|
|
9679
9695
|
const i = super.updateSymbol(t, e);
|
|
9680
9696
|
return t && t.material && this.ri(t.material), n || i;
|
|
9681
9697
|
}
|
|
9682
9698
|
Qi(t, e) {
|
|
9683
|
-
return
|
|
9699
|
+
return zo(t) !== zo(e);
|
|
9684
9700
|
}
|
|
9685
9701
|
}
|
|
9686
9702
|
|
|
9687
|
-
function
|
|
9703
|
+
function zo(t) {
|
|
9688
9704
|
if (!t || !t.material) return !1;
|
|
9689
9705
|
for (const e in t.material) if (e.indexOf("Texture") > 0 && t.material[e]) return !0;
|
|
9690
9706
|
return !1;
|
|
9691
9707
|
}
|
|
9692
9708
|
|
|
9693
|
-
const
|
|
9709
|
+
const Vo = {
|
|
9694
9710
|
normalTexture: 1,
|
|
9695
9711
|
bumpTexture: 1
|
|
9696
9712
|
};
|
|
9697
9713
|
|
|
9698
|
-
class
|
|
9714
|
+
class Uo extends Ho {
|
|
9699
9715
|
createGeometry(t) {
|
|
9700
9716
|
const e = t.data, i = this.getSymbols()[0];
|
|
9701
9717
|
if (i.material && i.material.extrusionOpacity) {
|
|
@@ -9827,9 +9843,9 @@ class Vo extends No {
|
|
|
9827
9843
|
}
|
|
9828
9844
|
}
|
|
9829
9845
|
|
|
9830
|
-
const
|
|
9846
|
+
const jo = [ 1, 1, 1 ];
|
|
9831
9847
|
|
|
9832
|
-
class
|
|
9848
|
+
class Bo extends Vi {
|
|
9833
9849
|
createGeometry(t) {
|
|
9834
9850
|
const {data: e, indices: i} = t, r = new n.Geometry(e, i, 0, {
|
|
9835
9851
|
primitive: "lines"
|
|
@@ -9844,9 +9860,9 @@ class jo extends Vi {
|
|
|
9844
9860
|
createMesh(t, e) {
|
|
9845
9861
|
const {geometry: i} = t, s = new n.Mesh(i);
|
|
9846
9862
|
if (s.castShadow = !1, this.sceneConfig.animation) {
|
|
9847
|
-
|
|
9863
|
+
jo[2] = .01;
|
|
9848
9864
|
const t = [];
|
|
9849
|
-
r.fromScaling(t,
|
|
9865
|
+
r.fromScaling(t, jo), r.multiply(t, e, t), e = t;
|
|
9850
9866
|
}
|
|
9851
9867
|
return s.setLocalTransform(e), s.properties.symbolIndex = {
|
|
9852
9868
|
index: 0
|
|
@@ -9855,7 +9871,7 @@ class jo extends Vi {
|
|
|
9855
9871
|
addMesh(t, e) {
|
|
9856
9872
|
if (!t.length) return this;
|
|
9857
9873
|
let n;
|
|
9858
|
-
null !== e ? (0 === e && (e = .01), n = t[0].localTransform,
|
|
9874
|
+
null !== e ? (0 === e && (e = .01), n = t[0].localTransform, jo[2] = e, r.fromScaling(n, jo),
|
|
9859
9875
|
r.multiply(n, t[0].properties.tileTransform, n)) : n = t[0].properties.tileTransform;
|
|
9860
9876
|
for (let e = 0; e < t.length; e++) t[e].setLocalTransform(n);
|
|
9861
9877
|
return this.scene.addMesh(t), this;
|
|
@@ -9912,9 +9928,9 @@ class jo extends Vi {
|
|
|
9912
9928
|
}
|
|
9913
9929
|
}
|
|
9914
9930
|
|
|
9915
|
-
const {getPBRUniforms:
|
|
9931
|
+
const {getPBRUniforms: Go} = n.pbr.PBRUtils;
|
|
9916
9932
|
|
|
9917
|
-
class
|
|
9933
|
+
class Wo extends Ho {
|
|
9918
9934
|
constructor(...t) {
|
|
9919
9935
|
super(...t), this.yo = new n.ResourceLoader, this.scene.sortFunction = this.sortByCommandKey;
|
|
9920
9936
|
}
|
|
@@ -10089,7 +10105,7 @@ class Go extends No {
|
|
|
10089
10105
|
return this.shader;
|
|
10090
10106
|
}
|
|
10091
10107
|
getUniformValues(t, e) {
|
|
10092
|
-
const {iblTexes: n, dfgLUT: i} = this.getIBLRes(), r =
|
|
10108
|
+
const {iblTexes: n, dfgLUT: i} = this.getIBLRes(), r = Go(t, n, i, e && e.ssr, e && e.jitter);
|
|
10093
10109
|
return this.setIncludeUniformValues(r, e), r;
|
|
10094
10110
|
}
|
|
10095
10111
|
To(t) {
|
|
@@ -10102,11 +10118,11 @@ class Go extends No {
|
|
|
10102
10118
|
}
|
|
10103
10119
|
}
|
|
10104
10120
|
|
|
10105
|
-
var
|
|
10121
|
+
var Xo = "#include <gl2_vert>\n#define EXTRUDE_SCALE 63.0\n#define EXTRUDE_MOD 64.0\n#define MAX_LINE_DISTANCE 65535.0\nuniform mat4 projViewModelMatrix;\nuniform vec2 centiMeterToLocal;\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec4 aTubeNormal;\n#ifdef HAS_LINE_WIDTH\nattribute float aLineWidth;\n#else\nuniform float lineWidth;\n#endif\n#include <vt_position_vert>\n#ifdef PICKING_MODE\n#include <fbo_picking_vert>\n#else\nuniform mat4 modelViewMatrix;\nuniform mat3 modelNormalMatrix;\nuniform mat4 modelMatrix;\n#if defined(HAS_PATTERN)\nuniform float resolution;\nuniform float tileResolution;\nuniform float tileRatio;\nattribute float aLinesofar;\nvarying highp float vLinesofar;\nattribute vec4 aTexInfo;\nvarying vec4 vTexInfo;\nvarying float vNormalY;\nvarying float vPatternHeight;\nattribute float aNormalDistance;\n#if defined(HAS_PATTERN_ANIM)\nattribute float aLinePatternAnimSpeed;\nvarying float vLinePatternAnimSpeed;\n#endif\n#if defined(HAS_PATTERN_GAP)\nattribute float aLinePatternGap;\nvarying float vLinePatternGap;\n#endif\n#endif\n#ifdef HAS_COLOR\nattribute vec4 aColor;\nvarying vec4 vColor;\n#endif\n#ifdef HAS_OPACITY\nattribute float aOpacity;\n#endif\nvarying float vOpacity;\nvarying vec3 vModelNormal;\nvarying vec4 vViewVertex;\nvarying vec3 vModelVertex;\n#endif\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\n#include <vsm_shadow_vert>\n#endif\n#include <highlight_vert>\nvoid main() {\n \n#ifdef HAS_LINE_WIDTH\nfloat c = aLineWidth;\n#else\nfloat c = lineWidth;\n#endif\nfloat d = c / 2.;\n vec3 e = aTubeNormal.xyz / EXTRUDE_SCALE;\n vec3 f = unpackVTPosition();\n vec4 h = vec4(f, 1.);\n h.xy += e.xy * d * centiMeterToLocal;\n h.z += e.z * d;\n gl_Position = projViewModelMatrix * h;\n#ifdef PICKING_MODE\nfbo_picking_setData(gl_Position.w, true);\n#else\nvViewVertex = modelViewMatrix * h;\n vec3 i = normalize(e);\n vModelNormal = modelNormalMatrix * i;\n vModelVertex = (modelMatrix * h).xyz;\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\nshadow_computeShadowPars(h);\n#endif\n#ifdef HAS_COLOR\nvColor = aColor / 255.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_PATTERN\nfloat j = tileResolution / resolution;\n float k = aLinesofar - d * centiMeterToLocal.y * aNormalDistance / EXTRUDE_SCALE;\n vLinesofar = k / tileRatio * j;\n vTexInfo = vec4(aTexInfo.xy, aTexInfo.zw + 1.);\n vPatternHeight = c * centiMeterToLocal.x / tileRatio * j;\n vNormalY = aTubeNormal.w / EXTRUDE_SCALE;\n#if defined(HAS_PATTERN_ANIM)\nvLinePatternAnimSpeed = aLinePatternAnimSpeed / 127.;\n#endif\n#if defined(HAS_PATTERN_GAP)\nvLinePatternGap = aLinePatternGap / 10.0;\n#endif\n#endif\nhighlight_setVarying();\n#endif\n}";
|
|
10106
10122
|
|
|
10107
|
-
const {getPBRUniforms:
|
|
10123
|
+
const {getPBRUniforms: Yo} = n.pbr.PBRUtils;
|
|
10108
10124
|
|
|
10109
|
-
class
|
|
10125
|
+
class $o extends Bi {
|
|
10110
10126
|
needToRedraw() {
|
|
10111
10127
|
return super.needToRedraw() || this.isAnimating();
|
|
10112
10128
|
}
|
|
@@ -10177,7 +10193,7 @@ class Yo extends Bi {
|
|
|
10177
10193
|
if (this.renderer = new n.Renderer(e), this.createShader(t), this.pickingFBO) {
|
|
10178
10194
|
const t = [];
|
|
10179
10195
|
this.picking = [ new n.FBORayPicking(this.renderer, {
|
|
10180
|
-
vert: "#define PICKING_MODE 1\n" +
|
|
10196
|
+
vert: "#define PICKING_MODE 1\n" + Xo,
|
|
10181
10197
|
uniforms: [ {
|
|
10182
10198
|
name: "projViewModelMatrix",
|
|
10183
10199
|
type: "function",
|
|
@@ -10205,7 +10221,7 @@ class Yo extends Bi {
|
|
|
10205
10221
|
return r.multiply(n, e.projViewMatrix, e.modelMatrix), n;
|
|
10206
10222
|
}
|
|
10207
10223
|
}), this.shader = new n.pbr.StandardShader({
|
|
10208
|
-
vert:
|
|
10224
|
+
vert: Xo,
|
|
10209
10225
|
uniforms: e,
|
|
10210
10226
|
defines: this.To(i),
|
|
10211
10227
|
extraCommandProps: this.getExtraCommandProps()
|
|
@@ -10254,7 +10270,7 @@ class Yo extends Bi {
|
|
|
10254
10270
|
};
|
|
10255
10271
|
}
|
|
10256
10272
|
getUniformValues(t, e) {
|
|
10257
|
-
const {iblTexes: n, dfgLUT: i} = this.getIBLRes(), r =
|
|
10273
|
+
const {iblTexes: n, dfgLUT: i} = this.getIBLRes(), r = Yo(t, n, i, null, e && e.jitter), s = t.projViewMatrix, o = t.viewMatrix;
|
|
10258
10274
|
return r.projViewMatrix = s, r.viewMatrix = o, r.resolution = t.getResolution(),
|
|
10259
10275
|
r.currentTime = this.layer.getRenderer().getFrameTimestamp() || 0, this.setIncludeUniformValues(r, e),
|
|
10260
10276
|
r;
|
|
@@ -10336,7 +10352,7 @@ class Yo extends Bi {
|
|
|
10336
10352
|
}
|
|
10337
10353
|
}
|
|
10338
10354
|
|
|
10339
|
-
const
|
|
10355
|
+
const qo = [], Jo = [], Ko = [], Zo = [], Qo = [], ta = [ 0, 0, 0 ], ea = [ 0, 0, 0 ], na = [ 1, 1, 1 ], ia = [], ra = [ 1, 1, 1, 1 ], sa = [], oa = [ 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1 ], aa = t => class extends t {
|
|
10340
10356
|
constructor(t, e, i, r, s, o) {
|
|
10341
10357
|
super(t, e, i, r, s, o), this.ko = !1, this.scene.sortFunction = this.sortByCommandKey,
|
|
10342
10358
|
this.Oo = new n.GLTFManager(t), this.Io(), this.Fo();
|
|
@@ -10361,7 +10377,7 @@ const $o = [], qo = [], Jo = [], Ko = [], Zo = [], Qo = [ 0, 0, 0 ], ta = [ 0, 0
|
|
|
10361
10377
|
};
|
|
10362
10378
|
}
|
|
10363
10379
|
getFnTypeConfig() {
|
|
10364
|
-
return
|
|
10380
|
+
return ia;
|
|
10365
10381
|
}
|
|
10366
10382
|
createMesh(t, e, {tileTranslationMatrix: s, tileExtent: o}, {timestamp: a}) {
|
|
10367
10383
|
if (!this.ko) return null;
|
|
@@ -10394,8 +10410,8 @@ const $o = [], qo = [], Jo = [], Ko = [], Zo = [], Qo = [ 0, 0, 0 ], ta = [ 0, 0
|
|
|
10394
10410
|
let d = 0;
|
|
10395
10411
|
o.forEach(t => {
|
|
10396
10412
|
const {geometry: n, nodeMatrix: i} = t;
|
|
10397
|
-
r.multiply(
|
|
10398
|
-
const s = r.multiply(
|
|
10413
|
+
r.multiply(sa, oa, i), r.multiply(sa, f, sa);
|
|
10414
|
+
const s = r.multiply(sa, _, sa), o = n.boundingBox.copy();
|
|
10399
10415
|
o.transform(s);
|
|
10400
10416
|
const a = this.zo(o, e);
|
|
10401
10417
|
Math.abs(a) > Math.abs(d) && (d = a);
|
|
@@ -10414,15 +10430,15 @@ const $o = [], qo = [], Jo = [], Ko = [], Zo = [], Qo = [ 0, 0, 0 ], ta = [ 0, 0
|
|
|
10414
10430
|
k.properties.startTime = a, T.HAS_SKIN = 1;
|
|
10415
10431
|
}
|
|
10416
10432
|
w && (k.setUniform("morphWeights", w), T.HAS_MORPH = 1), k.setUniform("hasAlpha", S.alphaMode && "BLEND" === S.alphaMode.toUpperCase()),
|
|
10417
|
-
Ct(k.uniforms, "polygonFill", e, "markerFill",
|
|
10433
|
+
Ct(k.uniforms, "polygonFill", e, "markerFill", ra, Rt(this.colorCache)), Ct(k.uniforms, "polygonOpacity", e, "markerOpacity", 1);
|
|
10418
10434
|
const O = [];
|
|
10419
10435
|
k.setPositionMatrix(() => {
|
|
10420
10436
|
const e = this.Uo(t, m, M);
|
|
10421
|
-
r.multiply(O,
|
|
10422
|
-
const n = r.identity(
|
|
10437
|
+
r.multiply(O, oa, e), this.Ho(f), r.multiply(O, f, O), r.multiply(O, _, O);
|
|
10438
|
+
const n = r.identity(sa);
|
|
10423
10439
|
if (0 !== d && (r.fromTranslation(n, p), r.multiply(O, n, O)), Ht(c)) {
|
|
10424
10440
|
const t = l.getGLScale() / l.getGLScale(c);
|
|
10425
|
-
return i.set(
|
|
10441
|
+
return i.set(qo, t, t, t), r.fromScaling(n, qo), r.multiply(n, n, O);
|
|
10426
10442
|
}
|
|
10427
10443
|
return O;
|
|
10428
10444
|
});
|
|
@@ -10494,7 +10510,7 @@ const $o = [], qo = [], Jo = [], Ko = [], Zo = [], Qo = [ 0, 0, 0 ], ta = [ 0, 0
|
|
|
10494
10510
|
n && this.setToRedraw(!0), super.prepareRender(t);
|
|
10495
10511
|
}
|
|
10496
10512
|
getShadowMeshes() {
|
|
10497
|
-
if (!this.isVisible()) return
|
|
10513
|
+
if (!this.isVisible()) return ia;
|
|
10498
10514
|
this.shadowCount = this.scene.getMeshes().length;
|
|
10499
10515
|
return this.scene.getMeshes().filter(t => 0 === t.properties.level);
|
|
10500
10516
|
}
|
|
@@ -10521,13 +10537,13 @@ const $o = [], qo = [], Jo = [], Ko = [], Zo = [], Qo = [ 0, 0, 0 ], ta = [ 0, 0
|
|
|
10521
10537
|
const n = P[0], s = P[1], p = i.set(M, n * m - T, -s * m - k, (P[2] + g) * y - O), v = l && l[e] || 0, x = h && h[e] || 0;
|
|
10522
10538
|
if (v || x) {
|
|
10523
10539
|
r.fromRotation(I, x, C);
|
|
10524
|
-
const t = i.set(
|
|
10540
|
+
const t = i.set(qo, n, s, 0), e = i.normalize(t, i.cross(t, t, C));
|
|
10525
10541
|
r.rotate(I, I, v, e);
|
|
10526
|
-
const o = r.fromTranslation(
|
|
10542
|
+
const o = r.fromTranslation(sa, p);
|
|
10527
10543
|
r.multiply(I, o, I);
|
|
10528
10544
|
} else r.fromTranslation(I, p);
|
|
10529
10545
|
if (F) {
|
|
10530
|
-
const t = this.Ho(
|
|
10546
|
+
const t = this.Ho(sa, f, c, e);
|
|
10531
10547
|
r.multiply(I, I, t);
|
|
10532
10548
|
}
|
|
10533
10549
|
d("instance_vectorA", e, I, 0), d("instance_vectorB", e, I, 1), d("instance_vectorC", e, I, 2),
|
|
@@ -10547,11 +10563,11 @@ const $o = [], qo = [], Jo = [], Ko = [], Zo = [], Qo = [ 0, 0, 0 ], ta = [ 0, 0
|
|
|
10547
10563
|
let l = o.translationX || 0, h = o.translationY || 0, u = o.translationZ || 0, c = o.rotationX || 0, f = o.rotationY || 0, d = o.rotationZ || 0, p = o.scaleX || 1, m = o.scaleY || 1, y = o.scaleZ || 1;
|
|
10548
10564
|
const g = n && n[r], v = e && e[g], x = s.getZoom(), b = v && v.feature && v.feature.properties, A = this.Xo(x, b);
|
|
10549
10565
|
this.Yo && (l = this.Yo(x, b)), this.$o && (h = this.$o(x, b)), this.qo && (u = this.qo(x, b));
|
|
10550
|
-
const w = i.set(
|
|
10566
|
+
const w = i.set(Jo, l * a, h * a, u * a);
|
|
10551
10567
|
this.Jo && (c = this.Jo(x, b)), this.Ko && (f = this.Ko(x, b)), this.Zo && (d = this.Zo(x, b));
|
|
10552
|
-
const _ = i.set(
|
|
10568
|
+
const _ = i.set(Ko, c, f, d);
|
|
10553
10569
|
this.Qo && (p = this.Qo(x, b)), this.ta && (m = this.ta(x, b)), this.ea && (y = this.ea(x, b));
|
|
10554
|
-
const S = i.set(
|
|
10570
|
+
const S = i.set(Zo, p * A, m * A, y * A);
|
|
10555
10571
|
return this.na(t, w, _, S);
|
|
10556
10572
|
}
|
|
10557
10573
|
Xo(t, e) {
|
|
@@ -10634,31 +10650,31 @@ const $o = [], qo = [], Jo = [], Ko = [], Zo = [], Qo = [ 0, 0, 0 ], ta = [ 0, 0
|
|
|
10634
10650
|
delete this.jo;
|
|
10635
10651
|
}
|
|
10636
10652
|
na(t, e, n, s) {
|
|
10637
|
-
const o = i.set(
|
|
10653
|
+
const o = i.set(qo, ...e || ta), a = n || ea, l = s || na, h = c.fromEuler(Qo, a[0], a[1], a[2]);
|
|
10638
10654
|
return r.fromRotationTranslationScale(t, h, o, l);
|
|
10639
10655
|
}
|
|
10640
10656
|
};
|
|
10641
10657
|
|
|
10642
|
-
class
|
|
10658
|
+
class la extends(aa(Uo)){
|
|
10643
10659
|
getMaterialClazz(t) {
|
|
10644
10660
|
return t.diffuseFactor ? n.PhongSpecularGlossinessMaterial : n.PhongMaterial;
|
|
10645
10661
|
}
|
|
10646
10662
|
}
|
|
10647
10663
|
|
|
10648
|
-
class
|
|
10664
|
+
class ha extends(aa(Wo)){
|
|
10649
10665
|
getMaterialClazz(t) {
|
|
10650
10666
|
return t.specularGlossinessTexture || t.diffuseTexture ? n.pbr.StandardSpecularGlossinessMaterial : n.pbr.StandardMaterial;
|
|
10651
10667
|
}
|
|
10652
10668
|
}
|
|
10653
10669
|
|
|
10654
|
-
const {getPBRUniforms:
|
|
10670
|
+
const {getPBRUniforms: ua} = n.pbr.PBRUtils, ca = {
|
|
10655
10671
|
color: [ 2.0303, 2.028, 2.028 ],
|
|
10656
10672
|
direction: [ 0, -.2717, -1 ]
|
|
10657
|
-
},
|
|
10673
|
+
}, fa = {
|
|
10658
10674
|
index: 0
|
|
10659
|
-
},
|
|
10675
|
+
}, da = [ 0, 0, 0 ], pa = [ 2, 2 ];
|
|
10660
10676
|
|
|
10661
|
-
class
|
|
10677
|
+
class ma extends Bi {
|
|
10662
10678
|
supportRenderMode(t) {
|
|
10663
10679
|
return "fxaa" === t || "fxaaBeforeTaa" === t;
|
|
10664
10680
|
}
|
|
@@ -10673,7 +10689,7 @@ class pa extends Bi {
|
|
|
10673
10689
|
}
|
|
10674
10690
|
needToRedraw() {
|
|
10675
10691
|
if (super.needToRedraw()) return !0;
|
|
10676
|
-
return this.getSymbol(
|
|
10692
|
+
return this.getSymbol(fa).animation;
|
|
10677
10693
|
}
|
|
10678
10694
|
createMesh(t, e) {
|
|
10679
10695
|
const {geometry: i} = t;
|
|
@@ -10682,7 +10698,7 @@ class pa extends Bi {
|
|
|
10682
10698
|
castShadow: !1,
|
|
10683
10699
|
picking: !0
|
|
10684
10700
|
});
|
|
10685
|
-
return r.properties.symbolIndex =
|
|
10701
|
+
return r.properties.symbolIndex = fa, r.setLocalTransform(e), r;
|
|
10686
10702
|
}
|
|
10687
10703
|
callShader(t, e) {
|
|
10688
10704
|
super.callShader(t, e), this.transformWater();
|
|
@@ -10693,13 +10709,13 @@ class pa extends Bi {
|
|
|
10693
10709
|
this._r(t, e), super.addMesh(...arguments);
|
|
10694
10710
|
}
|
|
10695
10711
|
_r(t) {
|
|
10696
|
-
const e = this.getSymbol(
|
|
10712
|
+
const e = this.getSymbol(fa).ssr;
|
|
10697
10713
|
for (let n = 0; n < t.length; n++) t[n].ssr = e ? 1 : 0;
|
|
10698
10714
|
}
|
|
10699
10715
|
paint(t) {
|
|
10700
10716
|
t.states && t.states.includesChanged && (this.shader.dispose(), this.aa.dispose(),
|
|
10701
10717
|
this.br(t));
|
|
10702
|
-
const e = !!t.ssr && this.getSymbol(
|
|
10718
|
+
const e = !!t.ssr && this.getSymbol(fa).ssr, n = this.aa, i = n.shaderDefines;
|
|
10703
10719
|
if (e) {
|
|
10704
10720
|
const e = Tt({}, i, t.ssr.defines);
|
|
10705
10721
|
n.shaderDefines = e;
|
|
@@ -10876,24 +10892,24 @@ class pa extends Bi {
|
|
|
10876
10892
|
};
|
|
10877
10893
|
}
|
|
10878
10894
|
oa(t, e) {
|
|
10879
|
-
const {iblTexes: n, dfgLUT: i} = this.getIBLRes(), r =
|
|
10895
|
+
const {iblTexes: n, dfgLUT: i} = this.getIBLRes(), r = ua(t, n, i, e && e.ssr, e && e.jitter), s = t.getLightManager();
|
|
10880
10896
|
let o = s && s.getDirectionalLight() || {};
|
|
10881
|
-
const l = s && s.getAmbientLight() || {}, h = this.getSymbol(
|
|
10897
|
+
const l = s && s.getAmbientLight() || {}, h = this.getSymbol(fa), u = this.ma = this.ma || [], c = this.ya = this.ya || [];
|
|
10882
10898
|
a.set(c, .09, h.uvScale || 3, .03, -.5);
|
|
10883
10899
|
Tt(r, {
|
|
10884
10900
|
ambientColor: l.color || [ .2, .2, .2 ],
|
|
10885
10901
|
viewMatrix: t.viewMatrix,
|
|
10886
|
-
lightDirection: o.direction ||
|
|
10887
|
-
lightColor: o.color ||
|
|
10902
|
+
lightDirection: o.direction || ca.direction,
|
|
10903
|
+
lightColor: o.color || ca.color,
|
|
10888
10904
|
camPos: t.cameraPosition,
|
|
10889
10905
|
timeElapsed: h.animation ? (this.layer.getRenderer().getFrameTimestamp() || 0) / (1 / (h.waterSpeed || 1) * 1e4) : 0,
|
|
10890
10906
|
normalTexture: this.fa || this.ca,
|
|
10891
10907
|
heightTexture: this.pa || this.ca,
|
|
10892
10908
|
waveParams: c,
|
|
10893
|
-
waterDir:
|
|
10909
|
+
waterDir: ya(u, h.waterDirection || 0),
|
|
10894
10910
|
waterBaseColor: h.waterBaseColor || [ .1451, .2588, .4863, 1 ],
|
|
10895
10911
|
contrast: h.contrast || 1,
|
|
10896
|
-
hsv: h.hsv ||
|
|
10912
|
+
hsv: h.hsv || da
|
|
10897
10913
|
});
|
|
10898
10914
|
const f = this.layer.getRenderer();
|
|
10899
10915
|
return r.layerOpacity = f.ne(), this.setIncludeUniformValues(r, e), e && e.ssr && e.ssr.renderUniforms && Tt(r, e.ssr.renderUniforms),
|
|
@@ -10915,68 +10931,68 @@ class pa extends Bi {
|
|
|
10915
10931
|
transformWater() {
|
|
10916
10932
|
const t = this.getMap(), e = s.getGroundTransform(this.ha.localTransform, t);
|
|
10917
10933
|
this.ha.setLocalTransform(e);
|
|
10918
|
-
const n = t._get2DExtentAtRes(t.getGLRes()), i = n.getWidth(), r = n.getHeight(), o = t.cameraLookAt, a = o[0] - i, l = o[1] + r, h = a /
|
|
10934
|
+
const n = t._get2DExtentAtRes(t.getGLRes()), i = n.getWidth(), r = n.getHeight(), o = t.cameraLookAt, a = o[0] - i, l = o[1] + r, h = a / pa[0], u = l / pa[1], c = h % 1, f = u % 1, d = .3737 * h % 1, p = .3737 * u % 1, m = i / pa[0] * 2, y = r / pa[1] * 2;
|
|
10919
10935
|
this.ha.setUniform("uvOffset", [ c, f ]), this.ha.setUniform("noiseUvOffset", [ d, p ]),
|
|
10920
10936
|
this.ha.setUniform("uvScale", [ m, -y ]);
|
|
10921
10937
|
}
|
|
10922
10938
|
}
|
|
10923
10939
|
|
|
10924
|
-
function
|
|
10940
|
+
function ya(t, e) {
|
|
10925
10941
|
var n;
|
|
10926
10942
|
return n = e, e = Math.PI * n / 180, t[0] = Math.sin(e), t[1] = Math.cos(e), t;
|
|
10927
10943
|
}
|
|
10928
10944
|
|
|
10929
|
-
const
|
|
10930
|
-
|
|
10931
|
-
ya.registerAt(he);
|
|
10932
|
-
|
|
10933
|
-
const ga = ei("line", or);
|
|
10945
|
+
const ga = ei("fill", nr);
|
|
10934
10946
|
|
|
10935
10947
|
ga.registerAt(he);
|
|
10936
10948
|
|
|
10937
|
-
const va = ei("line
|
|
10949
|
+
const va = ei("line", or);
|
|
10938
10950
|
|
|
10939
10951
|
va.registerAt(he);
|
|
10940
10952
|
|
|
10941
|
-
const xa = ei("
|
|
10953
|
+
const xa = ei("line-gradient", ar);
|
|
10942
10954
|
|
|
10943
10955
|
xa.registerAt(he);
|
|
10944
10956
|
|
|
10945
|
-
const ba = ei("
|
|
10957
|
+
const ba = ei("icon", Es);
|
|
10946
10958
|
|
|
10947
10959
|
ba.registerAt(he);
|
|
10948
10960
|
|
|
10949
|
-
const Aa = ei("
|
|
10961
|
+
const Aa = ei("text", xo);
|
|
10950
10962
|
|
|
10951
10963
|
Aa.registerAt(he);
|
|
10952
10964
|
|
|
10953
|
-
ei("native-
|
|
10954
|
-
|
|
10955
|
-
const wa = ei("phong", Vo);
|
|
10965
|
+
const wa = ei("native-line", To);
|
|
10956
10966
|
|
|
10957
10967
|
wa.registerAt(he);
|
|
10958
10968
|
|
|
10959
|
-
|
|
10969
|
+
ei("native-point", So).registerAt(he);
|
|
10970
|
+
|
|
10971
|
+
const _a = ei("phong", Uo);
|
|
10960
10972
|
|
|
10961
10973
|
_a.registerAt(he);
|
|
10962
10974
|
|
|
10963
|
-
const Sa = ei("
|
|
10975
|
+
const Sa = ei("wireframe", Bo);
|
|
10964
10976
|
|
|
10965
10977
|
Sa.registerAt(he);
|
|
10966
10978
|
|
|
10967
|
-
const Ma = ei("
|
|
10979
|
+
const Ma = ei("lit", Wo);
|
|
10968
10980
|
|
|
10969
10981
|
Ma.registerAt(he);
|
|
10970
10982
|
|
|
10971
|
-
const Pa = ei("
|
|
10983
|
+
const Pa = ei("tube", $o);
|
|
10972
10984
|
|
|
10973
10985
|
Pa.registerAt(he);
|
|
10974
10986
|
|
|
10975
|
-
const Ta = ei("gltf-
|
|
10987
|
+
const Ta = ei("gltf-phong", la);
|
|
10976
10988
|
|
|
10977
10989
|
Ta.registerAt(he);
|
|
10978
10990
|
|
|
10979
|
-
const ka = ei("
|
|
10991
|
+
const ka = ei("gltf-lit", ha);
|
|
10992
|
+
|
|
10993
|
+
ka.registerAt(he);
|
|
10994
|
+
|
|
10995
|
+
const Oa = ei("heatmap", class extends Bi {
|
|
10980
10996
|
createFnTypeConfig(t, e) {
|
|
10981
10997
|
const n = g(e.heatmapWeight), i = new Int16Array(1);
|
|
10982
10998
|
return [ {
|
|
@@ -11040,14 +11056,14 @@ const ka = ei("heatmap", class extends Bi {
|
|
|
11040
11056
|
}
|
|
11041
11057
|
});
|
|
11042
11058
|
|
|
11043
|
-
|
|
11059
|
+
Oa.registerAt(he);
|
|
11044
11060
|
|
|
11045
|
-
const
|
|
11061
|
+
const Ia = ei("water", ma);
|
|
11046
11062
|
|
|
11047
|
-
|
|
11063
|
+
Ia.registerAt(he), we.registerPainter("lit", Wo), we.registerPainter("icon", Es),
|
|
11048
11064
|
we.registerPainter("fill", nr), we.registerPainter("line", or), we.registerPainter("line-gradient", ar),
|
|
11049
|
-
we.registerPainter("water",
|
|
11050
|
-
he.VERSION = "0.92.
|
|
11065
|
+
we.registerPainter("water", ma), we.registerPainter("tube", $o), n.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"),
|
|
11066
|
+
he.VERSION = "0.92.3", we.VERSION = "0.92.3";
|
|
11051
11067
|
|
|
11052
11068
|
if (e.mat4.create(), e.transcoders) {
|
|
11053
11069
|
const n = t.Map.VERSION;
|
|
@@ -11059,6 +11075,6 @@ if (e.mat4.create(), e.transcoders) {
|
|
|
11059
11075
|
}));
|
|
11060
11076
|
} else t.registerWorkerAdapter("@maptalks/vt", q);
|
|
11061
11077
|
|
|
11062
|
-
export { $n as ExtrudePolygonLayer, nr as FillPainter,
|
|
11078
|
+
export { $n as ExtrudePolygonLayer, nr as FillPainter, ga as FillPlugin, Ta as GLTFPhongPlugin, ka as GLTFStandardPlugin, ve as GeoJSONVectorTileLayer, Oa as HeatmapPlugin, Es as IconPainter, ba as IconPlugin, xa as LineGradientPlugin, or as LinePainter, va as LinePlugin, $e as LineStringLayer, Ma as LitPlugin, ye as MapboxVectorTileLayer, To as NativeLinePainter, wa as NativeLinePlugin, So as NativePointPainter, Uo as PhongPainter, _a as PhongPlugin, Ye as PointLayer, Je as PolygonLayer, xo as TextPainter, Aa as TextPlugin, Pa as TubePlugin, we as Vector3DLayer, he as VectorTileLayer, Jt as VectorTileLayerRenderer, Ia as WaterPlugin, Bo as WireframePainter, Sa as WireframePlugin };
|
|
11063
11079
|
|
|
11064
|
-
"undefined" != typeof console && console.log("@maptalks/vt v0.92.
|
|
11080
|
+
"undefined" != typeof console && console.log("@maptalks/vt v0.92.3");
|