@antv/l7-layers 2.25.2 → 2.25.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/es/line/models/arc_3d.js
CHANGED
|
@@ -31,8 +31,8 @@ export default class Arc3DModel extends BaseModel {
|
|
|
31
31
|
}
|
|
32
32
|
this.texture = createTexture2D({
|
|
33
33
|
data: this.iconService.getCanvas(),
|
|
34
|
-
mag: gl.
|
|
35
|
-
min: gl.
|
|
34
|
+
mag: gl.LINEAR,
|
|
35
|
+
min: gl.LINEAR,
|
|
36
36
|
premultiplyAlpha: false,
|
|
37
37
|
width: 1024,
|
|
38
38
|
height: this.iconService.canvasHeight || 128
|
|
@@ -34,7 +34,9 @@ void main() {
|
|
|
34
34
|
|
|
35
35
|
highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
// 根据 stroke 的 alpha 值调整混合权重,避免透明 stroke 影响文本颜色
|
|
38
|
+
float stroke_mix_factor = smoothstep(0., 0.5, 1.- dist) * v_stroke_color.a;
|
|
39
|
+
outputColor = mix(v_color, v_stroke_color, stroke_mix_factor);
|
|
38
40
|
|
|
39
41
|
outputColor.a *= alpha;
|
|
40
42
|
// 作为 mask 模板时需要丢弃透明的像素
|
|
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
2
2
|
import { aProjectFlat } from '@antv/l7-utils';
|
|
3
3
|
import { vec2 } from 'gl-matrix';
|
|
4
4
|
const tmp = vec2.create();
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
5
|
const capEnd = vec2.create();
|
|
7
6
|
const lineA = vec2.create();
|
|
8
7
|
const lineB = vec2.create();
|
|
@@ -304,9 +303,11 @@ export default class ExtrudePolyline {
|
|
|
304
303
|
distanceRadio) {
|
|
305
304
|
normals.push(normal[0], normal[1], 0);
|
|
306
305
|
normals.push(normal[0], normal[1], 0);
|
|
307
|
-
|
|
306
|
+
// 修复:正确处理 z 坐标,当 point[2] 不存在时使用 0,但保留传入的高度值
|
|
307
|
+
const z = point[2] !== undefined ? point[2] : 0;
|
|
308
|
+
positions.push(point[0], point[1], z, distanceRadio, -thickness, z);
|
|
308
309
|
this.complex.indexes.push(this.currentIndex);
|
|
309
|
-
positions.push(point[0], point[1],
|
|
310
|
+
positions.push(point[0], point[1], z, distanceRadio, thickness, z);
|
|
310
311
|
this.complex.indexes.push(this.currentIndex);
|
|
311
312
|
this.currentIndex++;
|
|
312
313
|
}
|
|
@@ -38,8 +38,8 @@ class Arc3DModel extends _BaseModel.default {
|
|
|
38
38
|
}
|
|
39
39
|
this.texture = createTexture2D({
|
|
40
40
|
data: this.iconService.getCanvas(),
|
|
41
|
-
mag: _l7Core.gl.
|
|
42
|
-
min: _l7Core.gl.
|
|
41
|
+
mag: _l7Core.gl.LINEAR,
|
|
42
|
+
min: _l7Core.gl.LINEAR,
|
|
43
43
|
premultiplyAlpha: false,
|
|
44
44
|
width: 1024,
|
|
45
45
|
height: this.iconService.canvasHeight || 128
|
|
@@ -34,7 +34,9 @@ void main() {
|
|
|
34
34
|
|
|
35
35
|
highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
// 根据 stroke 的 alpha 值调整混合权重,避免透明 stroke 影响文本颜色
|
|
38
|
+
float stroke_mix_factor = smoothstep(0., 0.5, 1.- dist) * v_stroke_color.a;
|
|
39
|
+
outputColor = mix(v_color, v_stroke_color, stroke_mix_factor);
|
|
38
40
|
|
|
39
41
|
outputColor.a *= alpha;
|
|
40
42
|
// 作为 mask 模板时需要丢弃透明的像素
|
|
@@ -13,7 +13,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
var _l7Utils = require("@antv/l7-utils");
|
|
14
14
|
var _glMatrix = require("gl-matrix");
|
|
15
15
|
const tmp = _glMatrix.vec2.create();
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17
16
|
const capEnd = _glMatrix.vec2.create();
|
|
18
17
|
const lineA = _glMatrix.vec2.create();
|
|
19
18
|
const lineB = _glMatrix.vec2.create();
|
|
@@ -315,9 +314,11 @@ class ExtrudePolyline {
|
|
|
315
314
|
distanceRadio) {
|
|
316
315
|
normals.push(normal[0], normal[1], 0);
|
|
317
316
|
normals.push(normal[0], normal[1], 0);
|
|
318
|
-
|
|
317
|
+
// 修复:正确处理 z 坐标,当 point[2] 不存在时使用 0,但保留传入的高度值
|
|
318
|
+
const z = point[2] !== undefined ? point[2] : 0;
|
|
319
|
+
positions.push(point[0], point[1], z, distanceRadio, -thickness, z);
|
|
319
320
|
this.complex.indexes.push(this.currentIndex);
|
|
320
|
-
positions.push(point[0], point[1],
|
|
321
|
+
positions.push(point[0], point[1], z, distanceRadio, thickness, z);
|
|
321
322
|
this.complex.indexes.push(this.currentIndex);
|
|
322
323
|
this.currentIndex++;
|
|
323
324
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-layers",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.3",
|
|
4
4
|
"description": "L7's collection of built-in layers",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "https://github.com/orgs/antvis/people",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"earcut": "^2.2.1",
|
|
27
27
|
"eventemitter3": "^4.0.0",
|
|
28
28
|
"gl-matrix": "^3.1.0",
|
|
29
|
-
"@antv/l7-core": "2.25.
|
|
30
|
-
"@antv/l7-maps": "2.25.
|
|
31
|
-
"@antv/l7-source": "2.25.
|
|
32
|
-
"@antv/l7-utils": "2.25.
|
|
29
|
+
"@antv/l7-core": "2.25.3",
|
|
30
|
+
"@antv/l7-maps": "2.25.3",
|
|
31
|
+
"@antv/l7-source": "2.25.3",
|
|
32
|
+
"@antv/l7-utils": "2.25.3"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/earcut": "^2.1.0",
|