Skip to content

LazyScene beta ​

Interface of @v12-engine/client/app

ts
export interface LazyScene<A extends object = {}> extends Scene<A>

A scene whose code is fetched when it is first opened: an import() of the module that makes it. The list of scenes and a menu fetch none of the game it plays, its engine or its art's code. The scene it fetches has the same id, and is kept for the next time it is opened; what it names is said as it is made (names), checked before it is fetched. lazyScene makes one

lazyScene('dev', 'Dev sandbox', () = import('./dev').then((module) = module.devScene))

Members ​

fetch ​

ts
fetch(): Promise<Scene<A>>;

The scene itself: what the module fetched makes