mwg API
    Preparing search index...

    Class TransitionRunner

    Plays one transition: owns the under and over layers, advances with update(dt) in real time and tells its onDone once. Game runs one of these around a scene change; it is exported so a game with its own compositing can run a transition the same way.

    import { Container2D as Container } from '@datamoc/mwg/two-d/render';
    import { TransitionRunner, dissolve } from '@datamoc/mwg/two-d/render';

    const incoming = new Container();
    const runner = new TransitionRunner({ transition: dissolve(), duration: 0.5 }, { width: 800, height: 600 }, null, incoming);
    // put runner.under, incoming and runner.over on the stage, in that order
    while (!runner.update(1 / 60)) continue;
    console.log(runner.done); // true
    Index
    over: Container = ...
    pause: boolean
    under: Container = ...