mwg API
    Preparing search index...

    Class MwlPresentation<Id>

    Instantiates compiled MWL presentation using existing Pixi widgets. The controller owns state and actions; context switches restyle the same views without rebuilding procedural adapters. Kept off the root barrel so a game pays for this runtime only when it imports the subpath.

    import { MwlPresentation } from '@datamoc/mwg/two-d/presentation';
    import type { CompiledPresentation } from '@datamoc/mwg/mwl/presentation';
    import { Node2D } from '@datamoc/mwg/two-d/render';
    declare const data: CompiledPresentation;
    const ui = new MwlPresentation(data, 'game', { parent: new Node2D(), state: () => ({}), actions: {} });
    ui.resize(800, 600);
    ui.update(1 / 60);
    ui.destroy();

    Type Parameters

    • Id extends string = string
    Index
    camera: Camera
    root: Container<ContainerChild> = ...
    windows: WindowStack
    • Looks up an instance by its compiled path; repeats add their stable key to the path.

      Parameters

      Returns Container<ContainerChild> | null