Esposter
    Preparing search index...

    Interface TintConfiguration

    interface TintConfiguration {
        isTinted: boolean;
        tint: number;
        tintBottomLeft: number;
        tintBottomRight: number;
        tintMode: TintModes;
        tintTopLeft: number;
        tintTopRight: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    isTinted: boolean

    Does this Game Object have a tint applied?

    Returns true if any of the four corner tint values differ from 0xffffff, or if the tintMode property is set to anything other than MULTIPLY. Returns false when all four tint values are 0xffffff and the tint mode is MULTIPLY, which is the default untinted state.

    tint: number

    The tint value being applied to the whole of the Game Object. Returns the value of tintTopLeft when read. When written, the same color value is applied to all four corner tint properties (tintTopLeft, tintTopRight, tintBottomLeft, and tintBottomRight) simultaneously.

    tintBottomLeft: number

    The tint value being applied to the bottom-left vertex of the Game Object. This value is interpolated from the corner to the center of the Game Object. The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.

    tintBottomRight: number

    The tint value being applied to the bottom-right vertex of the Game Object. This value is interpolated from the corner to the center of the Game Object. The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.

    tintMode: TintModes

    The tint mode to use when applying the tint to the texture.

    Available modes are:

    • Phaser.TintModes.MULTIPLY (default)
    • Phaser.TintModes.FILL
    • Phaser.TintModes.ADD
    • Phaser.TintModes.SCREEN
    • Phaser.TintModes.OVERLAY
    • Phaser.TintModes.HARD_LIGHT

    Note that in Phaser 3, tint mode and color were set at the same time. In Phaser 4 they are separate settings.

    tintTopLeft: number

    The tint value being applied to the top-left vertex of the Game Object. This value is interpolated from the corner to the center of the Game Object. The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.

    tintTopRight: number

    The tint value being applied to the top-right vertex of the Game Object. This value is interpolated from the corner to the center of the Game Object. The value should be set as a hex number, i.e. 0xff0000 for red, or 0xff00ff for purple.