@maptalks/vt 0.117.0 → 0.117.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/maptalks.vt.d.ts +1 -1
- package/dist/maptalks.vt.es.js +52 -43
- package/dist/maptalks.vt.es.js.map +1 -1
- package/dist/maptalks.vt.gpu.es.js +52 -43
- package/dist/maptalks.vt.js +52 -43
- package/dist/maptalks.vt.js.map +1 -1
- package/package.json +5 -5
package/dist/maptalks.vt.d.ts
CHANGED
package/dist/maptalks.vt.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.117.
|
|
2
|
+
* @maptalks/vt v0.117.1
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2025 maptalks.org
|
|
5
5
|
*/
|
|
@@ -17435,7 +17435,7 @@ const As = o.ShaderLib.get("mesh_picking_vert"), Ts = o.WgslShaderLib.get("mesh_
|
|
|
17435
17435
|
if (!this._ready) return null;
|
|
17436
17436
|
const h = this.getMap(), {geometry: c} = e, {positionSize: u, features: f} = c;
|
|
17437
17437
|
if (!c.data.aPosition || 0 === c.data.aPosition.length) return null;
|
|
17438
|
-
"native-line" === this.dataConfig.type && this._arrangeAlongLine(0, c, r);
|
|
17438
|
+
"native-line" === this.dataConfig.type && this._arrangeAlongLine(0, c, r, f);
|
|
17439
17439
|
const {aPosition: d} = c.data;
|
|
17440
17440
|
let p = d.length / u;
|
|
17441
17441
|
const g = {
|
|
@@ -17531,43 +17531,46 @@ const As = o.ShaderLib.get("mesh_picking_vert"), Ts = o.WgslShaderLib.get("mesh_
|
|
|
17531
17531
|
positionSize: u
|
|
17532
17532
|
}, S;
|
|
17533
17533
|
}
|
|
17534
|
-
_arrangeAlongLine(e, t) {
|
|
17535
|
-
const {tileExtent:
|
|
17536
|
-
let
|
|
17537
|
-
const
|
|
17538
|
-
|
|
17539
|
-
const
|
|
17534
|
+
_arrangeAlongLine(e, t, n) {
|
|
17535
|
+
const {tileExtent: r, z: o} = t.properties, {data: a, positionSize: l} = t;
|
|
17536
|
+
let h = this._calGLTFScale(e);
|
|
17537
|
+
const c = this._getMeterScale();
|
|
17538
|
+
h = s.scale([], h, c);
|
|
17539
|
+
const u = {
|
|
17540
17540
|
gapLength: this.dataConfig.gapLength || 0,
|
|
17541
17541
|
direction: this.dataConfig.direction || 0,
|
|
17542
17542
|
scaleVertex: !0
|
|
17543
|
-
},
|
|
17544
|
-
let
|
|
17545
|
-
|
|
17546
|
-
|
|
17547
|
-
|
|
17548
|
-
|
|
17543
|
+
}, f = this._gltfPack[0][0], {aPosition: d, aAltitude: p, aPickingId: g} = a, m = new i(0, 0, 0), y = new i(0, 0, 0), x = [], _ = p ? [] : x, v = [], A = [], T = [], S = [], b = [], P = [], w = this.layer.getTileSize().width / r * this.layer.getRenderer().getTileGLScale(o), I = this.layer.getRenderer().getZScale();
|
|
17544
|
+
let M = g[0];
|
|
17545
|
+
const C = [];
|
|
17546
|
+
for (let e = 0; e < d.length - l; e += l) {
|
|
17547
|
+
const t = g[e / l + 1];
|
|
17548
|
+
if (t !== M) {
|
|
17549
|
+
M = t;
|
|
17549
17550
|
continue;
|
|
17550
17551
|
}
|
|
17551
|
-
|
|
17552
|
-
const [
|
|
17553
|
-
let
|
|
17554
|
-
|
|
17555
|
-
const [
|
|
17556
|
-
|
|
17557
|
-
|
|
17558
|
-
|
|
17559
|
-
const
|
|
17560
|
-
|
|
17561
|
-
|
|
17552
|
+
p ? s.set(b, d[e], d[e + 1], p[e / l]) : Ss.unpackPosition(b, d[e], d[e + 1], d[e + 2]);
|
|
17553
|
+
const [i, r, o] = b;
|
|
17554
|
+
let a = e + l;
|
|
17555
|
+
p ? s.set(P, d[a], d[a + 1], p[a / l]) : Ss.unpackPosition(P, d[a], d[a + 1], d[a + 2]);
|
|
17556
|
+
const [c, O, k] = P, R = g[e / l], F = m.set(i * w, r * w, o * I), E = y.set(c * w, O * w, k * I), D = F.distanceTo(E);
|
|
17557
|
+
this._getSymbolRotationScaleMatrix(C, n, g, e / l);
|
|
17558
|
+
const H = f.arrangeAlongLine(F, E, D, h, 1, C, u);
|
|
17559
|
+
for (let e = 0; e < H.length; e++) {
|
|
17560
|
+
const t = H[e];
|
|
17561
|
+
m.set(i, r, o), y.set(c, O, k);
|
|
17562
|
+
const n = zs(m, y, t.t);
|
|
17563
|
+
x.push(n.x, n.y), _.push(n.z), v.push(R), A.push(-t.rotationZ * Math.PI / 180),
|
|
17564
|
+
T.push(t.rotationXY * Math.PI / 180), S.push(...t.scale);
|
|
17562
17565
|
}
|
|
17563
17566
|
}
|
|
17564
17567
|
t.data = {
|
|
17565
|
-
aPosition: new
|
|
17566
|
-
aPickingId: new
|
|
17567
|
-
aZRotation:
|
|
17568
|
-
aXYRotation:
|
|
17569
|
-
aScaleXYZ:
|
|
17570
|
-
},
|
|
17568
|
+
aPosition: new d.constructor(x),
|
|
17569
|
+
aPickingId: new g.constructor(v),
|
|
17570
|
+
aZRotation: A,
|
|
17571
|
+
aXYRotation: T,
|
|
17572
|
+
aScaleXYZ: S
|
|
17573
|
+
}, p && (t.data.aAltitude = new p.constructor(_));
|
|
17571
17574
|
}
|
|
17572
17575
|
_calGLTFScale(e) {
|
|
17573
17576
|
const t = this.getSymbols()[e], n = [ 1, 1, 1 ], i = t.modelHeight;
|
|
@@ -17673,17 +17676,23 @@ const As = o.ShaderLib.get("mesh_picking_vert"), Ts = o.WgslShaderLib.get("mesh_
|
|
|
17673
17676
|
}
|
|
17674
17677
|
return this._meterScale;
|
|
17675
17678
|
}
|
|
17676
|
-
|
|
17677
|
-
|
|
17678
|
-
|
|
17679
|
-
|
|
17680
|
-
|
|
17681
|
-
|
|
17682
|
-
|
|
17683
|
-
|
|
17684
|
-
|
|
17685
|
-
|
|
17686
|
-
|
|
17679
|
+
_getSymbolRotationScaleMatrix(e, t, n, i) {
|
|
17680
|
+
return this._getSymbolTRSMatrix(e, t, n, i, !0);
|
|
17681
|
+
}
|
|
17682
|
+
_getSymbolTRSMatrix(e, t, n, i, r) {
|
|
17683
|
+
const o = this.getMap(), a = this.symbolDef[0], l = this._getMeterScale();
|
|
17684
|
+
let h = a.translationX || 0, c = a.translationY || 0, u = a.translationZ || 0;
|
|
17685
|
+
r && (h = c = u = 0);
|
|
17686
|
+
let f = a.rotationX || 0, d = a.rotationY || 0, p = a.rotationZ || 0, g = a.scaleX || 1, m = a.scaleY || 1, y = a.scaleZ || 1;
|
|
17687
|
+
const x = n && n[i], _ = t && t[x], v = o.getZoom(), A = _ && _.feature && _.feature.properties, T = this._getModelHeightScale(v, A);
|
|
17688
|
+
r || (this._txFn && (h = this._txFn(v, A)), this._tyFn && (c = this._tyFn(v, A)),
|
|
17689
|
+
this._tzFn && (u = this._tzFn(v, A)));
|
|
17690
|
+
const S = s.set(Ps, h * l, c * l, u * l);
|
|
17691
|
+
this._rxFn && (f = this._rxFn(v, A)), this._ryFn && (d = this._ryFn(v, A)), this._rzFn && (p = this._rzFn(v, A));
|
|
17692
|
+
const b = s.set(ws, f, d, p);
|
|
17693
|
+
this._sxFn && (g = this._sxFn(v, A)), this._syFn && (m = this._syFn(v, A)), this._szFn && (y = this._szFn(v, A));
|
|
17694
|
+
const P = s.set(Is, g * T, m * T, y * T);
|
|
17695
|
+
return this._getGLTFMatrix(e, S, b, P);
|
|
17687
17696
|
}
|
|
17688
17697
|
_getModelHeightScale(e, t) {
|
|
17689
17698
|
const n = this.symbolDef[0];
|
|
@@ -20910,5 +20919,5 @@ if (r.transcoders) {
|
|
|
20910
20919
|
|
|
20911
20920
|
export { la as BillBoardPainter, wa as BillBoardPlugin, Th as ExtrudePolygonLayer, Bn as FillPainter, fa as FillPlugin, Mh as FilterUtil, Ta as GLTFPhongPlugin, Sa as GLTFStandardPlugin, Oa as GeoJSONVectorTileLayer, ba as HeatmapPlugin, Wr as IconPainter, ga as IconPlugin, pa as LineGradientPlugin, Yn as LinePainter, da as LinePlugin, ll as LineStringLayer, va as LitPlugin, Ma as MapboxVectorTileLayer, Yo as NativeLinePainter, ya as NativeLinePlugin, Wo as NativePointPainter, Ih as PackUtil, cs as PhongPainter, xa as PhongPlugin, ol as PointLayer, sl as PointLayerRenderer, fl as PolygonLayer, Oh as SYMBOLS_NEED_REBUILD_IN_VECTOR, Ch as SYMBOLS_NEED_REBUILD_IN_VT, ua as TerrainFlatMaskPainter, Ia as TerrainFlatMaskPlugin, zo as TextPainter, ma as TextPlugin, Aa as TubePlugin, vt as Vector3DLayer, ft as VectorTileLayer, Qe as VectorTileLayerRenderer, Pa as WaterPlugin, fs as WireframePainter, _a as WireframePlugin, L as getVectorPacker };
|
|
20912
20921
|
|
|
20913
|
-
"undefined" != typeof console && console.log("@maptalks/vt v0.117.
|
|
20922
|
+
"undefined" != typeof console && console.log("@maptalks/vt v0.117.1");
|
|
20914
20923
|
//# sourceMappingURL=maptalks.vt.es.js.map
|