Skip to content

1681-engine / index / Transition

Interface: Transition ​

Defined in: src/transitions/Transition.ts:19

A way from one scene to the next, in two halves around the swap: cover hides the old scene (resolves when the screen is fully covered, or the old frame is captured), the scenes change underneath — an async onEnter may load for as long as it needs — and reveal shows the new one. dispose runs afterwards whatever happened.

Both halves are driven by the stage's tweens, so they follow its timeScale and stop while the engine is paused.

Methods ​

cover() ​

ts
cover(ctx): Promise<void>;

Defined in: src/transitions/Transition.ts:20

Parameters ​

ParameterType
ctxTransitionContext

Returns ​

Promise<void>


dispose() ​

ts
dispose(): void;

Defined in: src/transitions/Transition.ts:22

Returns ​

void


reveal() ​

ts
reveal(ctx): Promise<void>;

Defined in: src/transitions/Transition.ts:21

Parameters ​

ParameterType
ctxTransitionContext

Returns ​

Promise<void>

Released under the MIT License.