Class ColorizedTexture

Defines a colorized texture within a Mod.

ColorizedTexture

Constructors

Properties

blackTexture: Canvas
whiteTexture: Canvas

Methods

  • Creates a colorized image by interpolating each color channel from black's channel value to white's channel value

    Parameters

    • name: string

      Image output name

    • r: number

      Red coefficient

    • g: number

      Green coefficient

    • b: number

      Blue coefficient

    • a: number = 0.5

      Alpha coefficient (default 0.5)

    Returns Canvas

  • Creates a colorized texture from two image files.

    Parameters

    • whiteSource: string

      The path for the white variant image.

    • blackSource: string

      The path for the black variant image.

    Returns ColorizedTexture

    The colorized texture.

    Static

    Memberof

    ColorizedTexture

Generated using TypeDoc