Skip to main content
Version: Phaser v3.88.2

FXPipeline

The FXPipeline is a built-in pipeline that controls the application of FX Controllers during

the rendering process. It maintains all of the FX shaders, instances of Post FX Pipelines and

is responsible for rendering.

You should rarely interact with this pipeline directly. Instead, use the FX Controllers that

is part of the Game Object class in order to manage the effects.

Constructor

new FXPipeline(game)

Parameters

nametypeoptionaldescription
gamePhaser.GameNoA reference to the Phaser game instance.

Scope: static

Extends

Phaser.Renderer.WebGL.Pipelines.PreFXPipeline

Source: src/renderer/webgl/pipelines/FXPipeline.js#L15
Since: 3.60.0

Inherited Members

From Phaser.Renderer.WebGL.Pipelines.PreFXPipeline:

From Phaser.Renderer.WebGL.WebGLPipeline:


Public Members

barrel

barrel: Phaser.Renderer.WebGL.Pipelines.FX.BarrelFXPipeline

Description:

An instance of the Barrel Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L127
Since: 3.60.0


bokeh

bokeh: Phaser.Renderer.WebGL.Pipelines.FX.BokehFXPipeline

Description:

An instance of the Bokeh Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L145
Since: 3.60.0


circle

circle: Phaser.Renderer.WebGL.Pipelines.FX.CircleFXPipeline

Description:

An instance of the Circle Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L118
Since: 3.60.0


fxHandlers

fxHandlers: Array.<function()>

Description:

An array containing references to the methods that map to the FX CONSTs.

This array is intentionally sparse. Do not adjust.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L172
Since: 3.60.0


glow

glow: Phaser.Renderer.WebGL.Pipelines.FX.GlowFXPipeline

Description:

An instance of the Glow Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L64
Since: 3.60.0


gradient

gradient: Phaser.Renderer.WebGL.Pipelines.FX.GradientFXPipeline

Description:

An instance of the Gradient Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L109
Since: 3.60.0


pixelate

pixelate: Phaser.Renderer.WebGL.Pipelines.FX.PixelateFXPipeline

Description:

An instance of the Pixelate Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L82
Since: 3.60.0


shadow

shadow: Phaser.Renderer.WebGL.Pipelines.FX.ShadowFXPipeline

Description:

An instance of the Shadow Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L73
Since: 3.60.0


shine

shine: Phaser.Renderer.WebGL.Pipelines.FX.ShineFXPipeline

Description:

An instance of the Shine Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L100
Since: 3.60.0


source

source: Phaser.Renderer.WebGL.RenderTarget

Description:

The source Render Target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L183
Since: 3.60.0


swap

swap: Phaser.Renderer.WebGL.RenderTarget

Description:

The swap Render Target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L201
Since: 3.60.0


target

target: Phaser.Renderer.WebGL.RenderTarget

Description:

The target Render Target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L192
Since: 3.60.0


vignette

vignette: Phaser.Renderer.WebGL.Pipelines.FX.VignetteFXPipeline

Description:

An instance of the Vignette Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L91
Since: 3.60.0


wipe

wipe: Phaser.Renderer.WebGL.Pipelines.FX.WipeFXPipeline

Description:

An instance of the Wipe Post FX Pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L136
Since: 3.60.0


Inherited Methods

From Phaser.Events.EventEmitter:

From Phaser.Renderer.WebGL.Pipelines.PreFXPipeline:

From Phaser.Renderer.WebGL.WebGLPipeline:


Public Methods

destroy

<instance> destroy()

Description:

Destroys all shader instances, removes all object references and nulls all external references.

Overrides: Phaser.Renderer.WebGL.Pipelines.PreFXPipeline#destroy

Returns: Phaser.Renderer.WebGL.Pipelines.FXPipeline - This WebGLPipeline instance.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L585
Since: 3.60.0


onBarrel

<instance> onBarrel(config)

Description:

Runs the Barrel FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.BarrelNoThe Barrel FX controller.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L508
Since: 3.60.0


onBloom

<instance> onBloom(config, width, height)

Description:

Runs the Bloom FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.BloomNoThe Bloom FX controller.
widthnumberNoThe width of the target.
heightnumberNoThe height of the target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L430
Since: 3.60.0


onBlur

<instance> onBlur(config, width, height)

Description:

Runs the Blur FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.BlurNoThe Blur FX controller.
widthnumberNoThe width of the target.
heightnumberNoThe height of the target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L374
Since: 3.60.0


onBokeh

<instance> onBokeh(config)

Description:

Runs the Bokeh FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.BokehNoThe Bokeh FX controller.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L566
Since: 3.60.0


onCircle

<instance> onCircle(config, width, height)

Description:

Runs the Circle FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.CircleNoThe Circle FX controller.
widthnumberNoThe width of the target.
heightnumberNoThe height of the target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L487
Since: 3.60.0


onColorMatrix

<instance> onColorMatrix(config)

Description:

Runs the ColorMatrix FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.ColorMatrixNoThe ColorMatrix FX controller.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L469
Since: 3.60.0


onDisplacement

<instance> onDisplacement(config)

Description:

Runs the Displacement FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.DisplacementNoThe Displacement FX controller.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L527
Since: 3.60.0


onDraw

<instance> onDraw(target1, target2, target3)

Description:

Takes the currently bound Game Object and runs all of its pre-render effects,

using the given Render Target as the source.

Finally calls drawToGame to copy the result to the Game Canvas.

Parameters:

nametypeoptionaldescription
target1Phaser.Renderer.WebGL.RenderTargetNoThe source Render Target.
target2Phaser.Renderer.WebGL.RenderTargetNoThe target Render Target.
target3Phaser.Renderer.WebGL.RenderTargetNoThe swap Render Target.

Overrides: Phaser.Renderer.WebGL.Pipelines.PreFXPipeline#onDraw

Source: src/renderer/webgl/pipelines/FXPipeline.js#L211
Since: 3.60.0


onGlow

<instance> onGlow(config, width, height)

Description:

Runs the Glow FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.GlowNoThe Glow FX controller.
widthnumberNoThe width of the target.
heightnumberNoThe height of the target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L273
Since: 3.60.0


onGradient

<instance> onGradient(config)

Description:

Runs the Gradient FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.GradientNoThe Gradient FX controller.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L411
Since: 3.60.0


onPixelate

<instance> onPixelate(config, width, height)

Description:

Runs the Pixelate FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.PixelateNoThe Pixelate FX controller.
widthnumberNoThe width of the target.
heightnumberNoThe height of the target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L313
Since: 3.60.0


onShadow

<instance> onShadow(config)

Description:

Runs the Shadow FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.ShadowNoThe Shadow FX controller.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L294
Since: 3.60.0


onShine

<instance> onShine(config, width, height)

Description:

Runs the Shine FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.ShineNoThe Shine FX controller.
widthnumberNoThe width of the target.
heightnumberNoThe height of the target.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L353
Since: 3.60.0


onVignette

<instance> onVignette(config)

Description:

Runs the Vignette FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.VignetteNoThe Vignette FX controller.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L334
Since: 3.60.0


onWipe

<instance> onWipe(config)

Description:

Runs the Wipe FX controller.

Parameters:

nametypeoptionaldescription
configPhaser.FX.WipeNoThe Wipe FX controller.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L547
Since: 3.60.0


runDraw

<instance> runDraw()

Description:

Takes the source and target and runs a copy from source to target.

This will use the current shader and pipeline.

Source: src/renderer/webgl/pipelines/FXPipeline.js#L254
Since: 3.60.0