Skip to content

1681-engine / pixel / puffPixels

Function: puffPixels() ​

ts
function puffPixels(frame, colors?): object;

Defined in: src/pixel/lifeArt.ts:95

One puff of smoke at frame (0..PUFF_FRAMES-1): a ragged blob, light on its up-left and dark on its down-right, that grows as it climbs. Its corner pixels come and go by a fixed hash, so it is no clean ellipse, and the last two frames lose every other pixel on a checkerboard, the way every effect dithers out. Pure.

Parameters ​

ParameterTypeDefault value
framenumberundefined
colorsreadonly [string, string, string]LIFE_COLORS.smoke

Returns ​

object

h ​

ts
h: number;

px ​

ts
px: LifePixel[];

w ​

ts
w: number;

Released under the MIT License.