Phaser API Documentation

  Version: 
set(pipeline, [gameObject], [currentShader])

Description:

Sets the current pipeline to be used by the WebGLRenderer.

This method accepts a pipeline instance as its parameter, not the name.

If the pipeline isn't already the current one it will call WebGLPipeline.bind and then onBind.

You cannot set Post FX Pipelines using this method. To use a Post FX Pipeline, you should apply it to either a Camera, Container or other supporting Game Object.

Parameters:

name type arguments description
pipeline Phaser.Renderer.WebGL.WebGLPipeline

The pipeline instance to be set as current.

gameObject Phaser.GameObjects.GameObject <optional>

The Game Object that invoked this pipeline, if any.

currentShader Phaser.Renderer.WebGL.WebGLShader <optional>

The shader to set as being current.

Returns:
Description:

The pipeline that was set, or undefined if it couldn't be set.

Examples:
Since: 3.50.0