Optional options: Record<string, any> = {}Options object
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
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.
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 a map of uniform names to WebGLUniformLocation objects.
Intended to be overridden by subclasses.
The canvas context used to compile the shader program.
The shader program from which to take uniform locations.
A map of uniform names to uniform locations.
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 uniform data from this filter to its shader program on the GPU.
Intended to be overridden by subclasses.
The canvas context used to compile the shader program.
A map of shader uniform names to their locations.
Static fromGenerated using TypeDoc
Constructor