Skip to content

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 ​

ParameterType
optionsCrossfadeOptions

Returns ​

CrossfadeTransition

Methods ​

cover() ​

ts
cover(ctx): Promise<void>;

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

Parameters ​

ParameterType
ctxTransitionContext

Returns ​

Promise<void>

Implementation of ​

Transition.cover


dispose() ​

ts
dispose(): void;

Defined in: src/transitions/CrossfadeTransition.ts:35

Returns ​

void

Implementation of ​

Transition.dispose


reveal() ​

ts
reveal(ctx): Promise<void>;

Defined in: src/transitions/CrossfadeTransition.ts:30

Parameters ​

ParameterType
ctxTransitionContext

Returns ​

Promise<void>

Implementation of ​

Transition.reveal

Released under the MIT License.