The alpha value of the Game Object, between 0 (fully transparent) and 1 (fully opaque).
This is a global value that impacts the entire Game Object. Setting it also updates
all four corner alpha values (alphaTopLeft, alphaTopRight, alphaBottomLeft,
alphaBottomRight) to the same value. The input is clamped to the range [0, 1].
The alpha value starting from the bottom-left of the Game Object. This value is interpolated from the corner to the center of the Game Object.
The alpha value starting from the bottom-right of the Game Object. This value is interpolated from the corner to the center of the Game Object.
The alpha value starting from the top-left of the Game Object. This value is interpolated from the corner to the center of the Game Object.
The alpha value starting from the top-right of the Game Object. This value is interpolated from the corner to the center of the Game Object.
Clears all alpha values associated with this Game Object.
Immediately sets the alpha levels back to 1 (fully opaque).undefined
This Game Object instance.
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.
If your game is running under WebGL you can optionally specify four different alpha values, each of which
correspond to the four corners of the Game Object. Under Canvas only the topLeft value given is used.
OptionaltopLeft: number
The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. Default 1.
OptionaltopRight: number
The alpha value used for the top-right of the Game Object. WebGL only.
OptionalbottomLeft: number
The alpha value used for the bottom-left of the Game Object. WebGL only.
OptionalbottomRight: number
The alpha value used for the bottom-right of the Game Object. WebGL only.
This Game Object instance.
Provides methods and properties for managing the alpha (opacity) of a Game Object. Alpha values range from 0 (fully transparent) to 1 (fully opaque).
Under WebGL, alpha can be set independently for each of the four corners of the Game Object, allowing gradient transparency effects. Under Canvas, only a single global alpha value is used.
This component is designed to be applied as a mixin to Game Objects and should not be used directly.