PIXI.filters.AlphaFilter

class AlphaFilter extends PIXI.Filter

Simplest filter - applies alpha.

Use this instead of Container's alpha property to avoid visual layering of individual elements. AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains. If elements are not opaque, they will blend with each other anyway.

Very handy if you want to use common features of all filters:

  1. Assign a blendMode to this filter, blend all elements inside display object with background.

  2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter.

Constructor


new PIXI.filters.AlphaFilter(alpha: number) → {}
Parameters:
Name Type Default Description
alpha number 1.0

Amount of alpha from 0 to 1, where 0 is transparent

Summary


Properties from AlphaFilter

number
alpha = 1

Properties inherited from Filter

boolean
autoFit = true
PIXI.BLEND_MODES
blendMode = PIXI.BLEND_MODES.NORMAL
boolean
enabled

If enabled is true the filter is applied, if false it will not.

boolean
legacy
PIXI.MSAA_QUALITY
multisample

The samples of the filter.

number
padding
number
resolution
PIXI.State
state

The WebGL state the filter requires to render.

Properties inherited from Shader

PIXI.Program
program

Program that the shader uses.

Dict<any>
uniforms

Methods inherited from Filter

void
apply(filterManager: PIXI.FilterSystem, input: PIXI.RenderTexture, output: PIXI.RenderTexture, clearMode: PIXI.CLEAR_MODES, _currentState: object)

Public Properties


alpha AlphaFilter.ts:30
alpha: number = 1

Coefficient for alpha multiplication


Powered by webdoc!