● REC
Your shit goes here ctrl+enter = COMPILE...
speed: 1x scale: step: freeze:
-- fps f: 0
x: -, y: - rgba: -
x, y pixel coords
i linear index (y*W+x)
t ms since start (affected by speed/freeze)
dt ms since last frame
mx, my mouse on canvas (pixel coords)
W, H canvas width / height (both 256)
W2, H2 half width / half height (center)
width, height aliases for W / H
frame frame count since run
pixels Uint8ClampedArray RGBA (current frame)
bin {} persistent object, cleared on compile
log(...) print to log panel
warn(...) yellow log
rgb(r,g,b) return color
rgba(r,g,b,a) return color w/ alpha
hex("rrggbb") return color from hex string
setPixel(x,y,r,g,b,a?) direct write
getPixel(x,y) [r,g,b,a] from prev frame
fill(color) fill whole canvas
fill(x,y,w,h,color) fill rect region
return null skip default write (used with setPixel/fill)