mirror of https://gitee.com/antv-l7/antv-l7
fix(layer): 新图层透明度
This commit is contained in:
parent
1145eff9c7
commit
e18a8644b3
|
@ -5,4 +5,5 @@ varying vec2 v_texCoord;
|
|||
void main() {
|
||||
vec4 color = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y));
|
||||
gl_FragColor = color;
|
||||
gl_FragColor.a *= u_opacity;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ void main() {
|
|||
gl_FragColor = v_color;
|
||||
// anti-alias
|
||||
// float blur = 1.0 - smoothstep(u_blur, 1., length(v_normal.xy));
|
||||
// gl_FragColor.a *= u_opacity * blur ;
|
||||
gl_FragColor.a *= u_opacity;
|
||||
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;
|
||||
|
|
|
@ -41,7 +41,7 @@ export default class LineDemo extends React.Component {
|
|||
.shape('line')
|
||||
.color('#f00')
|
||||
.style({
|
||||
opacity: 1.0,
|
||||
opacity: 0.5,
|
||||
});
|
||||
|
||||
scene.addLayer(polygonLayer);
|
||||
|
|
Loading…
Reference in New Issue