From bae149e91d3cd83e30671ca5afe13c2452a00379 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Wed, 21 Aug 2019 17:36:33 +0800 Subject: [PATCH] fix(text): demo --- demos/point.html | 4 ++-- package.json | 2 +- src/geom/shader/text_frag.glsl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demos/point.html b/demos/point.html index 7913134ea6..c6e4e37bfb 100644 --- a/demos/point.html +++ b/demos/point.html @@ -63,7 +63,7 @@ }) .shape('name', 'text') .size(20) - .color('#FFF') + .color('#000') .style({ // fontFamily: 'Monaco, monospace', // 字体 fontWeight: 200, @@ -72,7 +72,7 @@ spacing: 2, // 字符间距 padding: [ 4, 4 ], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近 strokeColor: '#fff', // 描边颜色 - strokeWidth: 1, // 描边宽度 + strokeWidth: 4, // 描边宽度 opacity: 1.0 }) .render(); diff --git a/package.json b/package.json index 2553778e8a..af289a9994 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/l7", - "version": "1.3.0-beta.3", + "version": "1.3.0-beta.4", "description": "Large-scale WebGL-powered Geospatial Data Visualization", "main": "build/L7.js", "browser": "build/L7-min.js", diff --git a/src/geom/shader/text_frag.glsl b/src/geom/shader/text_frag.glsl index 58b50b4152..e6376d0e80 100644 --- a/src/geom/shader/text_frag.glsl +++ b/src/geom/shader/text_frag.glsl @@ -23,6 +23,6 @@ void main() { highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist); - gl_FragColor = mix(v_color * u_font_opacity, u_halo_color, smoothstep(0., .5, 1. - dist)) * alpha; + gl_FragColor = mix(v_color * u_font_opacity, u_halo_color, smoothstep(0., 0.5, 1. - dist)) * alpha; #pragma include "pick" } \ No newline at end of file