Constructor
Optional options: Record<string, any> = {}Options object
Color to remove, in any format understood by Color.
distance to actual color, as value up or down from each r,g,b between 0 and 1
Optional Private mainName of the parameter that can be changed in the filter. Some filters have more than one parameter and there is no mainParameter
For color to remove inside distance, use alpha channel for a smoother deletion NOT IMPLEMENTED YET
Private vertexArray of attributes to send with buffers. do not modify
Static defaultsStatic typeThe class type. Used to identify which class this is.
This is used for serialization purposes and internally it can be used
to identify classes. As a developer you could use instance of Class
but to avoid importing all the code and blocking tree shaking we try
to avoid doing that.
Filter type
Apply this filter to the input image data provided.
Determines whether to use WebGL or Canvas2D based on the options.webgl flag.
Applies filter to canvas element
Canvas element to apply filter to
Apply this filter using webgl.
If needed by a 2d filter, this functions can create an helper canvas to be used remember that options.targetCanvas is available for use till end of chain.
Compile this filter's shader program.
The GL canvas context to use for shader compilation.
fragmentShader source for compilation
vertexShader source for compilation
Return a map of attribute names to WebGLAttributeLocation objects.
The canvas context used to compile the shader program.
The shader program from which to take attribute locations.
A map of attribute names to attribute locations.
Protected getReturn WebGL uniform locations for this filter's shader.
The GL canvas context used to compile this filter's shader.
This filter's compiled shader program.
Generic isNeutral implementation for one parameter based filters. Used only in image applyFilters to discard filters that will not have an effect on the image Other filters may need their own version ( ColorMatrix, HueRotation, gamma, ComposedFilter )
Optional options: anyRetrieves the cached shader.
the compiled program shader
Send attribute data from this filter to its shader program on the GPU.
The canvas context used to compile the shader program.
A map of shader attribute names to their locations.
Send data from this filter to its shader program's uniforms.
The GL canvas context used to compile this filter's shader.
A map of string uniform names to WebGLUniformLocation objects
Static fromGenerated using TypeDoc
Remove white filter class
Example