Skip to content

1681-engine / pixel / Evaporation

Class: Evaporation ​

Defined in: src/pixel/Evaporation.ts:55

A dead body evaporating: it breaks into its own pixels, which let go top rows first, rise, scatter a little and give out, while the body itself is hidden by the caller. Every particle is one whole world pixel in a colour read off the body's last frame, painted at 12 fps like every other effect; it pales up its own ramp as it rises and steps its alpha down instead of melting, so it stays pixel art the whole way. A cloud is one PixelLayer (a pooled texture) rather than a Graphics of up to 1,400 rects.

Constructors ​

Constructor ​

ts
new Evaporation(scene, track): Evaporation;

Defined in: src/pixel/Evaporation.ts:59

Parameters ​

ParameterType
sceneStage
track(object) => void

Returns ​

Evaporation

Methods ​

play() ​

ts
play(
   d, 
   big, 
   now
): void;

Defined in: src/pixel/Evaporation.ts:64

Parameters ​

ParameterType
dDeathPixels
bigboolean
nownumber

Returns ​

void


update() ​

ts
update(now): void;

Defined in: src/pixel/Evaporation.ts:117

Parameters ​

ParameterType
nownumber

Returns ​

void

Released under the MIT License.