Log inGet started
World

EMBERLINE

Branchmain
Branchesmain
Commite3b1d97d67

README.md

bwbuffer — the CPU pixel buffer the BELL / WARDEN sheets are drawn into

A plain Luau array with the same method names a pixelArt canvas handle has — setPixel, getPixel, fillRect, fillEllipse, drawLine, clear — so Pixelkit.on(buffer) drives it unchanged and every emberline.pixelkit primitive (limb, blob, poly, ribbon, speck, outline, shadeLeft) works against it. A finished frame then lands on the real canvas in one fromRows call.

It exists because every op on a live handle crosses a typed wrapper and a component lookup, so a single getPixel costs about 7 µs. A 190-frame sheet whose outline pass alone reads 96×120 pixels per frame is minutes of work that way; through the buffer a whole frame costs about 5 ms.

Surface

  • M.hex("#rrggbb") / M.palette({ name = "#rrggbb" }) — colours in the shape the pixelArt palette wants.
  • M.new(w, h) — a buffer. Extra passes beyond pixelkit's: shadeEdge(map, depth, fromRight?) recolours the lit or shadow side of every row in one scan, and outline(color) reads a snapshot so the rim it writes never seeds more rim.
  • M.buildSheet(handle, { cell, palette, clips, order, drawPose }) — draws a whole sheet and returns the clip index ({ idle = { from, to, fps, loop } }). Idempotent: a rebuild trims the canvas back to one frame first, so building twice on the same handle yields one sheet rather than two.
  • M.drawStill(handle, cell, palette, draw) — one image, for a portrait bust.
  • M.pose(base, overrides) — a key pose is the base pose with a few joints moved. Every field is a number so Pixelkit.blend interpolates the table.
  • M.once(keys) / M.cycle(keys) — one-shot and looping clips. cycle tweens back to the first pose and drops the duplicate, so the last frame reads into the first with no stutter at the seam.