Skip to content

1681-engine / index / DitherWipeTransition

Class: DitherWipeTransition ​

Defined in: src/transitions/DitherWipeTransition.ts:43

A pixel-friendly wipe: the screen fills with an ordered-dither pattern whose density sweeps across it, in hard whole cells rather than a smooth gradient. The screen is cut into bands along the direction of travel, each a tiling sprite of one dither level, so a frame costs a texture swap per band rather than a rect per cell (a 1080p screen at 2-px cells is half a million cells). Bands are whole tiles wide so the pattern runs on unbroken.

Implements ​

Constructors ​

Constructor ​

ts
new DitherWipeTransition(options?): DitherWipeTransition;

Defined in: src/transitions/DitherWipeTransition.ts:50

Parameters ​

ParameterType
optionsDitherWipeOptions

Returns ​

DitherWipeTransition

Methods ​

cover() ​

ts
cover(ctx): Promise<void>;

Defined in: src/transitions/DitherWipeTransition.ts:52

Parameters ​

ParameterType
ctxTransitionContext

Returns ​

Promise<void>

Implementation of ​

Transition.cover


dispose() ​

ts
dispose(): void;

Defined in: src/transitions/DitherWipeTransition.ts:69

Returns ​

void

Implementation of ​

Transition.dispose


reveal() ​

ts
reveal(ctx): Promise<void>;

Defined in: src/transitions/DitherWipeTransition.ts:62

Parameters ​

ParameterType
ctxTransitionContext

Returns ​

Promise<void>

Implementation of ​

Transition.reveal

Released under the MIT License.