API Docs for: 2.0.0
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

Methods

syncUniforms

()

Syncs the uniforms between the class object and the shaders.

Properties

fragmentSrc

Array private

height

Number

Height of the object you are transforming

matrix

Array

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

padding

Number

passes

Array an array of filter objects private

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 private

uniforms

Object private

width

Number

Width of the object you are transforming