fix: fix line animate size

This commit is contained in:
thinkinggis 2020-01-08 18:12:23 +08:00
parent 5f632878f9
commit 9a934e604c
3 changed files with 1 additions and 6 deletions

View File

@ -21,7 +21,6 @@ void main() {
gl_FragColor.a *= (blur * u_opacity);
if(u_line_type == LineTypeDash) {
gl_FragColor.a *= blur * (1.0- step(v_dash_array.x, mod(v_distance_ratio, v_dash_array.x +v_dash_array.y)));
// gl_FragColor.a =
}
if(u_aimate.x == Animate) {
@ -29,7 +28,6 @@ void main() {
alpha = (alpha + u_aimate.w -1.0) / u_aimate.w;
alpha = smoothstep(0., 1., alpha);
gl_FragColor.a *= alpha;
// gl_FragColor.a = fract(u_time);
}
gl_FragColor = filterColor(gl_FragColor);
}

View File

@ -30,10 +30,7 @@ void main() {
if(u_aimate.x == Animate) {
float alpha =1.0 - fract( mod(1.0- v_distance_ratio, u_aimate.z)* (1.0/ u_aimate.z) + u_time / u_aimate.y);
alpha = (alpha + u_aimate.w -1.0) / u_aimate.w;
alpha = smoothstep(0., 1., alpha);
float alpha2 = exp(-abs(v_side));
gl_FragColor.a *= alpha * blur;
// gl_FragColor.a = fract(u_time);
}
// dash line
if(u_line_type == LineTypeDash) {

View File

@ -33,7 +33,7 @@ export default class Arc2DLineDemo extends React.Component {
y1: 'lat2',
},
})
.size(1.2)
.size(4)
.shape('greatcircle')
.color('rgb(13,64,140)')
.animate({