@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
|
@@ -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
|
package/dist/maptalks.vt.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
|
*/
|
|
@@ -18768,7 +18768,7 @@
|
|
|
18768
18768
|
if (!this._ready) return null;
|
|
18769
18769
|
const s = this.getMap(), {geometry: l} = e, {positionSize: h, features: c} = l;
|
|
18770
18770
|
if (!l.data.aPosition || 0 === l.data.aPosition.length) return null;
|
|
18771
|
-
"native-line" === this.dataConfig.type && this._arrangeAlongLine(0, l, o);
|
|
18771
|
+
"native-line" === this.dataConfig.type && this._arrangeAlongLine(0, l, o, c);
|
|
18772
18772
|
const {aPosition: u} = l.data;
|
|
18773
18773
|
let f = u.length / h;
|
|
18774
18774
|
const d = {
|
|
@@ -18864,43 +18864,46 @@
|
|
|
18864
18864
|
positionSize: h
|
|
18865
18865
|
}, A;
|
|
18866
18866
|
}
|
|
18867
|
-
_arrangeAlongLine(e, i) {
|
|
18868
|
-
const {tileExtent:
|
|
18869
|
-
let
|
|
18870
|
-
const
|
|
18871
|
-
|
|
18872
|
-
const
|
|
18867
|
+
_arrangeAlongLine(e, i, r) {
|
|
18868
|
+
const {tileExtent: o, z: a} = i.properties, {data: s, positionSize: l} = i;
|
|
18869
|
+
let h = this._calGLTFScale(e);
|
|
18870
|
+
const c = this._getMeterScale();
|
|
18871
|
+
h = n.vec3.scale([], h, c);
|
|
18872
|
+
const u = {
|
|
18873
18873
|
gapLength: this.dataConfig.gapLength || 0,
|
|
18874
18874
|
direction: this.dataConfig.direction || 0,
|
|
18875
18875
|
scaleVertex: !0
|
|
18876
|
-
},
|
|
18877
|
-
let
|
|
18878
|
-
|
|
18879
|
-
|
|
18880
|
-
|
|
18881
|
-
|
|
18876
|
+
}, f = this._gltfPack[0][0], {aPosition: d, aAltitude: p, aPickingId: g} = s, m = new t.Coordinate(0, 0, 0), y = new t.Coordinate(0, 0, 0), x = [], _ = p ? [] : x, v = [], A = [], T = [], b = [], S = [], w = [], M = this.layer.getTileSize().width / o * this.layer.getRenderer().getTileGLScale(a), P = this.layer.getRenderer().getZScale();
|
|
18877
|
+
let I = g[0];
|
|
18878
|
+
const C = [];
|
|
18879
|
+
for (let e = 0; e < d.length - l; e += l) {
|
|
18880
|
+
const t = g[e / l + 1];
|
|
18881
|
+
if (t !== I) {
|
|
18882
|
+
I = t;
|
|
18882
18883
|
continue;
|
|
18883
18884
|
}
|
|
18884
|
-
|
|
18885
|
-
const [i,
|
|
18886
|
-
let
|
|
18887
|
-
|
|
18888
|
-
const [
|
|
18889
|
-
|
|
18890
|
-
|
|
18891
|
-
|
|
18892
|
-
const
|
|
18893
|
-
|
|
18894
|
-
|
|
18885
|
+
p ? n.vec3.set(S, d[e], d[e + 1], p[e / l]) : Vs.unpackPosition(S, d[e], d[e + 1], d[e + 2]);
|
|
18886
|
+
const [i, o, a] = S;
|
|
18887
|
+
let s = e + l;
|
|
18888
|
+
p ? n.vec3.set(w, d[s], d[s + 1], p[s / l]) : Vs.unpackPosition(w, d[s], d[s + 1], d[s + 2]);
|
|
18889
|
+
const [c, O, k] = w, R = g[e / l], F = m.set(i * M, o * M, a * P), E = y.set(c * M, O * M, k * P), D = F.distanceTo(E);
|
|
18890
|
+
this._getSymbolRotationScaleMatrix(C, r, g, e / l);
|
|
18891
|
+
const H = f.arrangeAlongLine(F, E, D, h, 1, C, u);
|
|
18892
|
+
for (let e = 0; e < H.length; e++) {
|
|
18893
|
+
const t = H[e];
|
|
18894
|
+
m.set(i, o, a), y.set(c, O, k);
|
|
18895
|
+
const n = nl(m, y, t.t);
|
|
18896
|
+
x.push(n.x, n.y), _.push(n.z), v.push(R), A.push(-t.rotationZ * Math.PI / 180),
|
|
18897
|
+
T.push(t.rotationXY * Math.PI / 180), b.push(...t.scale);
|
|
18895
18898
|
}
|
|
18896
18899
|
}
|
|
18897
18900
|
i.data = {
|
|
18898
|
-
aPosition: new
|
|
18899
|
-
aPickingId: new
|
|
18900
|
-
aZRotation:
|
|
18901
|
-
aXYRotation:
|
|
18902
|
-
aScaleXYZ:
|
|
18903
|
-
},
|
|
18901
|
+
aPosition: new d.constructor(x),
|
|
18902
|
+
aPickingId: new g.constructor(v),
|
|
18903
|
+
aZRotation: A,
|
|
18904
|
+
aXYRotation: T,
|
|
18905
|
+
aScaleXYZ: b
|
|
18906
|
+
}, p && (i.data.aAltitude = new p.constructor(_));
|
|
18904
18907
|
}
|
|
18905
18908
|
_calGLTFScale(e) {
|
|
18906
18909
|
const t = this.getSymbols()[e], i = [ 1, 1, 1 ], r = t.modelHeight;
|
|
@@ -19006,17 +19009,23 @@
|
|
|
19006
19009
|
}
|
|
19007
19010
|
return this._meterScale;
|
|
19008
19011
|
}
|
|
19009
|
-
|
|
19010
|
-
|
|
19011
|
-
|
|
19012
|
-
|
|
19013
|
-
|
|
19014
|
-
|
|
19015
|
-
|
|
19016
|
-
|
|
19017
|
-
|
|
19018
|
-
|
|
19019
|
-
|
|
19012
|
+
_getSymbolRotationScaleMatrix(e, t, n, i) {
|
|
19013
|
+
return this._getSymbolTRSMatrix(e, t, n, i, !0);
|
|
19014
|
+
}
|
|
19015
|
+
_getSymbolTRSMatrix(e, t, i, r, o) {
|
|
19016
|
+
const a = this.getMap(), s = this.symbolDef[0], l = this._getMeterScale();
|
|
19017
|
+
let h = s.translationX || 0, c = s.translationY || 0, u = s.translationZ || 0;
|
|
19018
|
+
o && (h = c = u = 0);
|
|
19019
|
+
let f = s.rotationX || 0, d = s.rotationY || 0, p = s.rotationZ || 0, g = s.scaleX || 1, m = s.scaleY || 1, y = s.scaleZ || 1;
|
|
19020
|
+
const x = i && i[r], _ = t && t[x], v = a.getZoom(), A = _ && _.feature && _.feature.properties, T = this._getModelHeightScale(v, A);
|
|
19021
|
+
o || (this._txFn && (h = this._txFn(v, A)), this._tyFn && (c = this._tyFn(v, A)),
|
|
19022
|
+
this._tzFn && (u = this._tzFn(v, A)));
|
|
19023
|
+
const b = n.vec3.set(Gs, h * l, c * l, u * l);
|
|
19024
|
+
this._rxFn && (f = this._rxFn(v, A)), this._ryFn && (d = this._ryFn(v, A)), this._rzFn && (p = this._rzFn(v, A));
|
|
19025
|
+
const S = n.vec3.set(Bs, f, d, p);
|
|
19026
|
+
this._sxFn && (g = this._sxFn(v, A)), this._syFn && (m = this._syFn(v, A)), this._szFn && (y = this._szFn(v, A));
|
|
19027
|
+
const w = n.vec3.set(Ws, g * T, m * T, y * T);
|
|
19028
|
+
return this._getGLTFMatrix(e, b, S, w);
|
|
19020
19029
|
}
|
|
19021
19030
|
_getModelHeightScale(e, t) {
|
|
19022
19031
|
const n = this.symbolDef[0];
|
|
@@ -22808,6 +22817,6 @@
|
|
|
22808
22817
|
e.SYMBOLS_NEED_REBUILD_IN_VT = Tf, e.TerrainFlatMaskPainter = Il, e.TerrainFlatMaskPlugin = Wl,
|
|
22809
22818
|
e.TextPainter = ns, e.TextPlugin = Fl, e.TubePlugin = Nl, e.Vector3DLayer = fn,
|
|
22810
22819
|
e.VectorTileLayer = rn, e.VectorTileLayerRenderer = Wt, e.WaterPlugin = Gl, e.WireframePainter = Cs,
|
|
22811
|
-
e.WireframePlugin = Hl, e.getVectorPacker = h, "undefined" != typeof console && console.log("@maptalks/vt v0.117.
|
|
22820
|
+
e.WireframePlugin = Hl, e.getVectorPacker = h, "undefined" != typeof console && console.log("@maptalks/vt v0.117.1");
|
|
22812
22821
|
}));
|
|
22813
22822
|
//# sourceMappingURL=maptalks.vt.js.map
|