mwg API
    Preparing search index...

    Function tileProgress

    • One tile's progress when the whole transition is at progress: tiles start spread across the first stagger of the time, according to their delay from tileDelays, and each then takes the rest of it, so the last tile finishes exactly as the transition does.

      Parameters

      • delay: number
      • progress: number
      • stagger: number

      Returns number

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

      console.log(tileProgress(0, 0.5, 0.5)); // 1: the first tile is already done
      console.log(tileProgress(1, 0.5, 0.5)); // 0: the last one has not started