1681-engine / pixel / pixelPaint / spark
Function: spark() ​
ts
function spark(
g,
x,
y,
color,
size,
frame?
): void;Defined in: src/pixel/pixelParticles.ts:15
A spark of size 1 (one pixel, glinting every third frame), 2 (a plus with a lit centre) or 3 (a four-point star whose arms twinkle with frame), shaded from color's ramp, on the 1-px world grid.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
g | Graphics | undefined |
x | number | undefined |
y | number | undefined |
color | number | undefined |
size | 1 | 2 | 3 | undefined |
frame | number | 0 |
Returns ​
void