Skip to content

Commit d508831

Browse files
committedDec 22, 2023
doc(ColorLayer): Update doc on effect_type and effect_parameter
1 parent 04cad6c commit d508831

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed
 

‎src/Layer/ColorLayer.js

+17-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,23 @@ import { deprecatedColorLayerOptions } from 'Core/Deprecated/Undeprecator';
2727
* @property {number} opacity - property to adjust transparency, opacity is between 0. and 1.
2828
* @property {boolean} transparent - specify if the layer could be transparent.
2929
* @property {boolean} noTextureParentOutsideLimit - don't parent texture if it's outside limit.
30-
* @property {number} effect_type - type effect to apply on raster color.
31-
* if `effect_type` equals:
32-
* * `0`: no special effect.
33-
* * `1`: light color to invisible effect.
34-
* * `2`: white color to invisible effect.
35-
* * `3`: custom shader effect (defined `ShaderChunk.customBodyColorLayer` and `ShaderChunk.customHeaderColorLayer`).
36-
* @property {number} effect_parameter - amount value used with effect applied on raster color.
30+
* @property {number} effect_type - type effect to apply on the raster color.
31+
* If `effect_type` equals:
32+
* * `0`: no effect.
33+
* * `1`: light color to invisible effect: transparency effect is stronger for
34+
* light colors (whose distance is closer to white). This effect can be
35+
* amplified by `effect_parameter`.
36+
* * `2`: white color to invisible effect: white color is considered as
37+
* transparent.
38+
* * `3`: custom shader effect: set `ShaderChunk.customBodyColorLayer` and
39+
* `ShaderChunk.customHeaderColorLayer` to add your own glsl code in
40+
* respectively the color layer function body and at top-level.
41+
* @property {number} effect_parameter - value used as parameter of certain type
42+
* of effects. If `effect_type` equals:
43+
* * `0`: unused.
44+
* * `1`: used to amplify the transparency effect.
45+
* * `2`: unused.
46+
* * `3`: could be used by your own glsl code.
3747
*/
3848
class ColorLayer extends RasterLayer {
3949
/**

0 commit comments

Comments
 (0)
Please sign in to comment.