1681-engine / pixel / pixelPaint / tail
Function: tail() ​
ts
function tail(
g,
x,
y,
vx,
vy,
len,
color,
thick?
): void;Defined in: src/pixel/pixelParticles.ts:35
A particle's trail: len px back from its head (x, y) against its velocity (vx, vy), glint to shade, its far half broken into every other pixel. thick 2 lays a second row under it on the shaded side (down, or right for a trail running straight up or down) a tone deeper, so the trail has a body; 3 adds a lit row on the up-left side over its near half. Light comes from the up-left, as on the rest of the art.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
g | Graphics | undefined |
x | number | undefined |
y | number | undefined |
vx | number | undefined |
vy | number | undefined |
len | number | undefined |
color | number | undefined |
thick | number | 1 |
Returns ​
void