Classes
- AlphaFilter
- BlurFilter
- BlurFilterPass
- ColorBlend
- ColorBurnBlend
- ColorDodgeBlend
- ColorMatrixFilter
- DarkenBlend
- DifferenceBlend
- DisplacementFilter
- DivideBlend
- ExclusionBlend
- Filter
- HardLightBlend
- HardMixBlend
- LightenBlend
- LinearBurnBlend
- LinearDodgeBlend
- LinearLightBlend
- LuminosityBlend
- NoiseFilter
- PinLightBlend
- SubtractBlend
Interface Definitions
-
Options for AlphaFilter
Properties:
Name Type Default Description alpha
number 1
Amount of alpha from 0 to 1, where 0 is transparent
-
Options for BlurFilter
Properties:
Name Type Default Description kernelSize
number 5
The kernelSize of the blur filter.Options: 5, 7, 9, 11, 13, 15.
quality
number 4
The quality of the blur filter.
strength
number 8
The strength of the blur filter.
strengthX
number 8
The horizontal strength of the blur.
strengthY
number 8
The vertical strength of the blur.
-
Options for BlurFilterPass
Properties:
Name Type Description horizontal
boolean Do pass along the x-axis (
true
) or y-axis (false
). -
Options for DisplacementFilter
-
The options to use when creating a new filter.
Properties:
Name Type Description antialias
FilterAntialias | boolean If true the filter will make use of antialiasing. Although it looks better this can have a performance impact. If set to 'inherit', the filter will detect the antialiasing of the render target and change this automatically. Definitely don't set this to true if the render target has antialiasing set to false. As it will antialias, but you won't see the difference. (default 'off')
This can be a boolean or FilterAntialias string.
blendMode
BLEND_MODES optional blend mode used by the filter when rendering (defaults to 'normal')
blendRequired
boolean If this is set to true, the filter system will grab a snap shot of the area being rendered to and pass this into the shader. This is useful for blend modes that need to be aware of the pixels they are rendering to. Only use if you need that data, otherwise its an extra gpu copy you don't need! (default false)
clipToViewport
boolean If this is set to true, the filter system will clip filter texture into viewport This is useful for filters that applied to whole texture. (default true)
padding
number the amount of pixels to pad the container with when applying the filter. For example a blur extends the container out as it blurs, so padding is applied to ensure that extra detail is rendered as well without clipping occurring. (default 0)
resolution
number | "inherit" the resolution the filter should be rendered at. The lower the resolution, the more performant the filter will be, but the lower the quality of the output. (default 1) If 'inherit', the resolution of the render target is used. Consider lowering this for things like blurs filters
-
Options for NoiseFilter
Properties:
Name Type Description noise
number The amount of noise to apply, this value should be in the range (0, 1].
seed
number A seed value to apply to the random noise generation.
Math.random()
is a good value to use.
Type Definitions
Various blend modes supported by Pixi
5x4 matrix for transforming RGBA color and alpha
The antialiasing mode of the filter. This can be either:
on
- the filter is always antialiased regardless of the render target settingsoff
- (default) the filter is never antialiased regardless of the render target settingsinherit
- the filter uses the antialias settings of the render target