Simple handling of layer opacity in webgl points layer

Now the layer opacity is simply handled by a CSS property on the layer DOM element. As such it does not have to be
taken into account in shaders.
This commit is contained in:
Olivier Guyot
2018-12-07 00:16:32 +01:00
parent a6989af00a
commit f177a2bcd5
2 changed files with 12 additions and 8 deletions

View File

@@ -43,8 +43,7 @@ export const ShaderType = {
export const DefaultUniform = {
PROJECTION_MATRIX: 'u_projectionMatrix',
OFFSET_SCALE_MATRIX: 'u_offsetScaleMatrix',
OFFSET_ROTATION_MATRIX: 'u_offsetRotateMatrix',
OPACITY: 'u_opacity'
OFFSET_ROTATION_MATRIX: 'u_offsetRotateMatrix'
};
/**
@@ -130,7 +129,7 @@ export const DefaultAttrib = {
* Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.
* You can also change their value along the way like so:
* ```js
* this.context.setUniformFloatValue(DefaultUniform.OPACITY, layerState.opacity);
* this.context.setUniformFloatValue('u_value', valueAsNumber);
* ```
*
* ### Defining post processing passes