mirror of https://gitee.com/antv-l7/antv-l7
fix: fix line animate size
This commit is contained in:
parent
39258c5999
commit
c19ecd4b3f
|
@ -21,7 +21,6 @@ void main() {
|
||||||
gl_FragColor.a *= (blur * u_opacity);
|
gl_FragColor.a *= (blur * u_opacity);
|
||||||
if(u_line_type == LineTypeDash) {
|
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 *= 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) {
|
if(u_aimate.x == Animate) {
|
||||||
|
@ -29,7 +28,6 @@ void main() {
|
||||||
alpha = (alpha + u_aimate.w -1.0) / u_aimate.w;
|
alpha = (alpha + u_aimate.w -1.0) / u_aimate.w;
|
||||||
alpha = smoothstep(0., 1., alpha);
|
alpha = smoothstep(0., 1., alpha);
|
||||||
gl_FragColor.a *= alpha;
|
gl_FragColor.a *= alpha;
|
||||||
// gl_FragColor.a = fract(u_time);
|
|
||||||
}
|
}
|
||||||
gl_FragColor = filterColor(gl_FragColor);
|
gl_FragColor = filterColor(gl_FragColor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,7 @@ void main() {
|
||||||
if(u_aimate.x == Animate) {
|
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);
|
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 = (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 *= alpha * blur;
|
||||||
// gl_FragColor.a = fract(u_time);
|
|
||||||
}
|
}
|
||||||
// dash line
|
// dash line
|
||||||
if(u_line_type == LineTypeDash) {
|
if(u_line_type == LineTypeDash) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ export default class Arc2DLineDemo extends React.Component {
|
||||||
y1: 'lat2',
|
y1: 'lat2',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.size(1.2)
|
.size(4)
|
||||||
.shape('greatcircle')
|
.shape('greatcircle')
|
||||||
.color('rgb(13,64,140)')
|
.color('rgb(13,64,140)')
|
||||||
.animate({
|
.animate({
|
||||||
|
|
Loading…
Reference in New Issue