Skip to main content
Version: Phaser v4.0.0

FilterWipe

This RenderNode renders the Wipe filter effect, which creates a directional transition that sweeps across the screen to reveal or hide a second texture. The wipe can travel along either axis and in either direction, with a configurable edge softness (wipe width). It is used by the Phaser.Filters.Wipe filter controller to produce scene transitions or in-game reveal effects. See Phaser.Filters.Wipe.

Constructor

new FilterWipe(manager)

Parameters

nametypeoptionaldescription
managerPhaser.Renderer.WebGL.RenderNodes.RenderNodeManagerNoThe manager that owns this RenderNode.

Scope: static

Extends

Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader

Source: src/renderer/webgl/renderNodes/filters/FilterWipe.js#L12
Since: 4.0.0

Inherited Methods

From Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader:

From Phaser.Renderer.WebGL.RenderNodes.RenderNode:


Public Methods

setupTextures

<instance> setupTextures(controller, textures, _drawingContext)

Description:

Binds the wipe reveal texture to texture slot 1, making it available to the fragment shader as the secondary sampler that will be blended in as the wipe progresses.

Parameters:

nametypeoptionaldescription
controllerPhaser.Filters.WipeNoThe filter controller providing the wipe texture.
texturesArray.<WebGLTexture>NoThe texture array for this render node. Index 1 is set to the reveal texture.
_drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe current drawing context (unused).

Overrides: Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader#setupTextures

Source: src/renderer/webgl/renderNodes/filters/FilterWipe.js#L37
Since: 4.0.0


setupUniforms

<instance> setupUniforms(controller, _drawingContext)

Description:

Uploads the wipe shader uniforms derived from the filter controller. Sets the secondary texture sampler unit, and passes a vec4 containing the current progress (0–1), the wipe edge softness width, the wipe direction (1 or -1), and the axis (0 for horizontal, 1 for vertical). Also uploads the reveal flag, which determines whether the wipe uncovers the secondary texture (reveal) or covers it (hide).

Parameters:

nametypeoptionaldescription
controllerPhaser.Filters.WipeNoThe filter controller providing wipe parameters.
_drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe current drawing context (unused).

Overrides: Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader#setupUniforms

Source: src/renderer/webgl/renderNodes/filters/FilterWipe.js#L54
Since: 4.0.0


Inherited Members

From Phaser.Renderer.WebGL.RenderNodes.BaseFilterShader:

From Phaser.Renderer.WebGL.RenderNodes.RenderNode: