mwg API
    Preparing search index...

    Function packTintAdd

    • the additive half of lerp(texel, colour, strength); pair with a tint of 1 - strength

      Parameters

      • color: number
      • strength: number

      Returns number

      import { packTintAdd, TintedSprite } from '@datamoc/mw_games/two-d/render';

      declare const rat: TintedSprite;

      rat.colorAdd = packTintAdd(0x00ff00, 0.5); // half-way to green, the additive half of lerpTint
      rat.tint = 0x808080; // pair with 1 - strength (here 0.5) for the multiply half