phaser - v4.0.0-rc.4
    Preparing search index...

    Provides methods used for setting the alpha property of a Game Object. Should be applied as a mixin and not used directly.

    interface AlphaSingle {
        alpha: number;
        clearAlpha(): this;
        setAlpha(value?: number): this;
    }

    Implemented by

    Index

    Properties

    Methods

    Properties

    alpha: number

    The alpha value of the Game Object.

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

    Methods

    • Clears all alpha values associated with this Game Object.

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

      Returns this

    • 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

      • Optionalvalue: number

        The alpha value applied across the whole Game Object. Default 1.

      Returns this