mwg API
    Preparing search index...

    Function openAnimationFrame

    • What a window opening (or closing, run backwards) looks like at progress: its scale, opacity and how far it is still pushed down by a slide. Closing never overshoots.

      Parameters

      Returns { alpha: number; offset: number; scale: number }

      import { openAnimationFrame } from '@datamoc/mwg/two-d/render';

      console.log(openAnimationFrame('pop', 0).scale); // 0
      console.log(openAnimationFrame('pop', 1).scale); // 1
      console.log(openAnimationFrame('slide', 0.5).offset > 0); // true: still sliding up