Phaser API Documentation

  Version: 
Only webGL setPadding([padding])

Description:

Sets the amount of extra padding to be applied to this Game Object when it is being rendered by a PreFX Pipeline.

Lots of FX require additional spacing added to the texture the Game Object uses, for example a glow or shadow effect, and this method allows you to control how much extra padding is included in addition to the texture size.

You do not need to set this if you're only using Post FX.

Parameters:

name type arguments description
padding number <optional>

The amount of padding to add to this Game Object.

Returns:
Description:

This Game Object instance.

Since: 3.60.0