Phaser API Documentation

  Version: 
Filter
Namespace: AlphaSingle
Phaser.GameObjects.Components.AlphaSingle

Members

<private> _alpha: number
Focus
Focus

Description:

Private internal value. Holds the global alpha value.

Type:
number
Default: 1
Since: 3.0.0
Focus
Focus
alpha: number
Focus
Focus

Description:

The alpha value of the Game Object.

This is a global value, impacting the entire Game Object, not just a region of it.

Type:
number
Since: 3.0.0
Focus
Focus

Methods

clearAlpha()
Focus
Focus

Description:

Clears all alpha values associated with this Game Object.

Immediately sets the alpha levels back to 1 (fully opaque).

Returns:
Description:

This Game Object instance.

Since: 3.0.0
Focus
Focus
setAlpha([value])
Focus
Focus

Description:

Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.

Parameters:

name type arguments Default description
value number <optional> 1

The alpha value applied across the whole Game Object.

Returns:
Description:

This Game Object instance.

Since: 3.0.0
Focus
Focus