The camera that owns this filter.
OptionalwipeWidth: number
The width of the wipe effect. This value is normalized in the range 0 to 1. Default 0.1.
Optionaldirection: number
The direction of the wipe effect. Either 0 (left to right, or top to bottom) or 1 (right to left, or bottom to top). Set in conjunction with the axis property. Default 0.
Optionalaxis: number
The axis of the wipe effect. Either 0 (X) or 1 (Y). Set in conjunction with the direction property. Default 0.
Optionalreveal: number
Is this a reveal (1) or a wipe (0) effect? Reveal shows the input in wiped areas; wipe shows the input in unwiped areas. Default 0.
OptionalwipeTexture: string | Texture
Texture or texture key to use where the input texture is not shown. The default texture is blank. Use another texture for a wipe transition. Default '__DEFAULT'.
Toggle this boolean to enable or disable this filter, without removing it from and re-adding it to the Camera's filter list.
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 axis of the wipe effect. Either 0 (X) or 1 (Y). Set in conjunction with the direction property.
A reference to the Camera that owns this filter.
The padding currently being used by this filter.
This is read during rendering via getPadding, and may be updated by subclass implementations.
It is necessary for filters being used in an external list.
You should not modify this value directly.
The direction of the wipe effect. Either 0 (left to right, or top to bottom) or 1 (right to left, or bottom to top). Set in conjunction with the axis property.
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 progress of the Wipe effect. This value is normalized to the range 0 to 1.
Adjust this value to make the wipe transition (e.g. via a Tween).
The ID of the RenderNode that this filter uses.
Is this a reveal (1) or a wipe (0) effect? Reveal shows the input in wiped areas; wipe shows the input in unwiped areas.
The texture to use where the input is removed. The default texture '__DEFAULT' is blank. Use another texture for a wipe transition.
The width of the wipe effect. This value is normalized in the range 0 to 1.
Destroys this Controller and nulls any references it holds.
Returns the raw padding required for this filter.
This is typically not what you want to call; use getPaddingCeil instead.
Values from this method are not rounded, which can cause quality loss.
Override this method when creating a Filter that requires extra room, e.g. a blur or glow effect.undefined
The padding required by this filter.
Returns the rounded padding required for this filter.
Most filters don't need extra padding, but some may sample beyond the texture boundaries, such as a blur or glow effect.
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.
This method calls getPadding() to get the raw padding values,
and uses Math.ceil() to set the values of paddingOverride
and currentPadding.undefined
The rounded padding required by this filter.
Sets the active state of this filter.
A disabled filter will not be used.
true to enable this filter, or false to disable it.
This filter instance.
Set the wipe effect to run bottom to top.undefined
Set the wipe effect to run left to right.undefined
Sets the padding override.
If this is set, the filter will use this padding instead of calculating it.
Call setPaddingOverride(null) to clear the override.
Call setPaddingOverride() to set the padding to 0.
Optionalleft: number | null
The left padding. Default 0.
Optionaltop: number
The top padding. Default 0.
Optionalright: number
The right padding. Default 0.
Optionalbottom: number
The bottom padding. Default 0.
Sets the progress of the wipe effect, controlling how far along the transition has advanced. A value of 0 means the transition has not started, and 1 means it is complete. You would typically drive this via a Tween rather than setting it directly.
Progress, normalized to the range 0-1.
Configures this filter to run as a reveal effect, where the input is gradually
uncovered as the transition progresses. Also resets the texture to the default
blank texture and resets progress to 0.
Use setWipeEffect for the opposite behavior.undefined
Set the wipe effect to run right to left.undefined
Set the texture to use where the input is removed. The default texture is blank, so the input is just hidden.
Optionaltexture: string | Texture
Texture or texture key to use for regions where the input is removed. Default '__DEFAULT'.
Set the wipe effect to run top to bottom.undefined
Configures this filter to run as a wipe effect, where the input is removed
as the transition progresses. Also resets progress to 0.
Use setRevealEffect for the opposite behavior.undefined
Set the width of the wipe effect.
The width of the wipe effect. This value is normalized in the range 0 to 1.
The Wipe Filter Controller.
This controller manages the wipe effect for a Camera.
The wipe or reveal effect is a visual technique that gradually uncovers or conceals elements in the game, such as images, text, or scene transitions. This effect is often used to create a sense of progression, reveal hidden content, or provide a smooth and visually appealing transition between game states.
You can set both the direction and the axis of the wipe effect. The following combinations are possible:
It is up to you to set the
progressvalue yourself, e.g. via a Tween, in order to transition the effect.A Wipe effect is added to a Camera via the FilterList component: