Phaser API Documentation

  Version: 
addBarrel([amount])

Description:

Adds a Barrel effect.

A barrel effect allows you to apply either a 'pinch' or 'expand' distortion to a Game Object. The amount of the effect can be modified in real-time.

Parameters:

name type arguments Default description
amount number <optional> 1

The amount of distortion applied to the barrel effect. A value of 1 is no distortion. Typically keep this within +- 1.

Returns:
Description:

The Barrel FX Controller.

Since: 3.60.0