mwg API
    Preparing search index...

    Function floatingTextAlpha

    • Opacity at normalised progress t (0 to 1), with hold of that life spent at full opacity.

      Pulled out of the container and exported so the curve is checked as arithmetic rather than through a rendered label - Label needs a DOM to measure text, and the split between what a thing is and how it is drawn is the same one Level/TileMap and ParticleEmitter's textureless mode already draw.

      Parameters

      • t: number
      • hold: number

      Returns number

      import { floatingTextAlpha } from '@datamoc/mw_games/two-d/ui';
      console.log(floatingTextAlpha(0.75, 0.5)); // 0.5