Phaser API Documentation

  Version: 
add(name, pipeline)

Description:

Adds a pipeline instance to this Pipeline Manager.

The name of the instance must be unique within this manager.

Make sure to pass an instance to this method, not a base class.

For example, you should pass it like this:

this.add('yourName', new CustomPipeline());`

and not like this:

this.add('yourName', CustomPipeline);`

To add a Post Pipeline, see addPostPipeline instead.

Parameters:

name type description
name string

A unique string-based key for the pipeline within the manager.

pipeline Phaser.Renderer.WebGL.WebGLPipeline

A pipeline instance which must extend WebGLPipeline.

Returns:
Description:

The pipeline instance that was passed.

Since: 3.50.0