The camera that owns this filter.
Optionaltexture: Textures.TextureThe texture to apply to the view. Default '__WHITE'.
OptionalblendMode: BlendModesThe blend mode to apply to the view. Default Phaser.BlendModes.NORMAL.
Optionalamount: numberThe amount of the blend effect to apply to the view. At 0, the original image is preserved. At 1, the blend texture is fully applied. The expected range is 0 to 1, but you can go outside that range for different effects. Default 1.
Optionalcolor: number[]The color to apply to the blend texture. Each value corresponds to a color channel in RGBA. The expected range is 0 to 1, but you can go outside that range for different effects. Default [1, 1, 1, 1].
Toggle this boolean to enable or disable this filter, without removing and adding it from the Game Object.
ReadonlyallowIf true, this filter will be permitted to draw to the base texture.
This can be unwanted if, for example, the filter doesn't actually
draw anything.
This is an internal flag used by the renderer. You should not modify this value directly.
The amount of the blend effect to apply to the view. At 0, the original image is preserved. At 1, the blend texture is fully applied.
The blend mode to apply to the view. This supports blend modes not otherwise available in WebGL.
A reference to the Camera that owns this filter.
The color to apply to the blend texture. Each value corresponds to a color channel in RGBA. The expected range is 0 to 1, but you can go outside that range for different effects.
The padding currently being used by this filter.
This is set and used during rendering using getPadding.
It is necessary for filters being used in an external list.
You should not modify this value directly.
The underlying texture used for the mask.
Whether this filter controller will be destroyed when the FilterList that owns it is destroyed. If you enable this, you must ensure that you clean up the filter controller at an appropriate time. This allows you to reuse a controller for multiple objects; this is not recommended unless you know what you're doing. It tends to work best with external filters.
Padding override. This is on by default. If this is set,
the filter will use this padding instead of calculating it.
Prefer using setPaddingOverride instead of modifying this directly.
The ID of the RenderNode that this filter uses.
Destroys this Controller and nulls any references it holds.
Returns the padding required for this filter,
and sets currentPadding to the result.
Most filters don't need extra padding,
but some might sample beyond the texture size, such as a blur.
The bounds are encoded as a Rectangle. To enlarge the bounds, the top and left values should be negative, and the bottom and right values should be positive.
Sets the active state of this filter.
A disabled filter will not be used.
true to enable this filter, or false to disable it.
Sets the padding override.
If this is set, the filter will use this padding instead of calculating them.
it Call setPaddingOverride(null) to clear the override.
Call setPaddingOverride() to set the padding to 0.
Optionalleft: numberThe top padding. Default 0.
Optionaltop: numberThe top padding. Default 0.
Optionalright: numberThe right padding. Default 0.
Optionalbottom: numberThe bottom padding. Default 0.
Sets the texture used for the blend.
Optionaltexture: stringThe unique string-based key of the texture to use for displacement, which must exist in the Texture Manager. Default '__WHITE'.
The Blend Filter Controller.
This filter controller manages the blend effect for a Camera. A blend effect allows you to apply another texture to the view using a specific blend mode. This supports blend modes not otherwise available in WebGL.
A Blend effect is added to a Camera via the FilterList component: