API Docs for: 2.2.1
Show:

ConvolutionFilter Class

The ConvolutionFilter class applies a matrix convolution filter effect. A convolution combines pixels in the input image with neighboring pixels to produce a new image. A wide variety of image effects can be achieved through convolutions, including blurring, edge detection, sharpening, embossing, and beveling. The matrix should be specified as a 9 point Array. See http://docs.gimp.org/en/plug-in-convmatrix.html for more info.

Constructor

ConvolutionFilter

(
  • matrix
  • width
  • height
)

Parameters:

  • matrix Array

    An array of values used for matrix transformation. Specified as a 9 point Array.

  • width Number

    Width of the object you are transforming

  • height Number

    Height of the object you are transforming

Item Index

Methods

Methods

syncUniforms

()

Syncs the uniforms between the class object and the shaders.

Properties

fragmentSrc

Array private

padding

Float

passes

Array an array of filter objects

An array of passes - some filters contain a few steps this array simply stores the steps in a liniear fashion. For example the blur filter has two passes blurX and blurY.

shaders

Array an array of shaders

uniforms

Object private