1681-engine / index / CrossfadeTransition
Class: CrossfadeTransition ​
Defined in: src/transitions/CrossfadeTransition.ts:15
The old scene's last frame laid over the new scene and faded out. Two live scenes cannot both be drawn (the old one is gone once the new one enters), so the old frame is captured into one screen-sized render texture, freed when the transition ends. The new scene's onEnter runs under the still frame, so a long load reads as a pause.
Implements ​
Constructors ​
Constructor ​
ts
new CrossfadeTransition(options?): CrossfadeTransition;Defined in: src/transitions/CrossfadeTransition.ts:19
Parameters ​
| Parameter | Type |
|---|---|
options | CrossfadeOptions |
Returns ​
CrossfadeTransition
Methods ​
cover() ​
ts
cover(ctx): Promise<void>;Defined in: src/transitions/CrossfadeTransition.ts:21
Parameters ​
| Parameter | Type |
|---|---|
ctx | TransitionContext |
Returns ​
Promise<void>
Implementation of ​
dispose() ​
ts
dispose(): void;Defined in: src/transitions/CrossfadeTransition.ts:35
Returns ​
void
Implementation of ​
reveal() ​
ts
reveal(ctx): Promise<void>;Defined in: src/transitions/CrossfadeTransition.ts:30
Parameters ​
| Parameter | Type |
|---|---|
ctx | TransitionContext |
Returns ​
Promise<void>