EMBERLINE
- ..
- .metadata17 B
- README.md2.3 KB
- init.luau29.0 KB
- motion.module
README.md
emberline.art.magkite
The drawing kit MAG and KITE are made with, and the shared motion library
(emberline.art.magkite.motion) that supplies the thirty-three clips every
fighter in this game performs the same way.
What is in here
- An index-buffer rasteriser.
Ink.buffer(w, h, palette)gives a plain Luau array of palette indices withpx / rect / blob / limb / poly / line / ribbon / speck / burston it, plus the finishing passes —volume(per-run shading, so an arm crossing a coat gets its own rounding),grit(deterministic wear that does not crawl between frames) andoutline. A finished frame goes into the canvas in one call:handle:addFrame(cells). - A 2D skeleton.
Ink.solve(pose, style)turns a flat table of joint angles into sheet-space joint positions, with squash and stretch anchored at the ground line.Ink.bodydraws it back to front, taking the costume from the style's hooks (behind,armBack,torsoOver,face,armFront,front). - Cloth.
Ink.chain/Ink.flow/Ink.settlewrappixelkit.followso a coat tail, a scarf and a lantern chain lead into a movement a frame late and keep travelling after the body has stopped. - Clip assembly.
Ink.clip(key poses throughpixelkit.tween),Ink.cycleClip(a loop that WRAPS, for the idle and the walks) andInk.buildSheet, which writes every clip into a canvas and returns the clip index keyed byRules.CLIPS. Ink.auditSheetdraws the whole sheet into a padded buffer and reports which clips put ink outside the 96x120 cell. A raster primitive clamps silently, so a pose that over-reaches loses pixels rather than failing; this is how those are found.
Angles
Degrees, positive turning toward screen-right, which is the way every sheet in
this game faces. aSh* is an upper arm from straight down, aEl* is the
FOREARM's own angle measured the same way (not a flexion — you pose an arm by
deciding where the fist points), lHip* is a thigh from straight down, and
lKn* IS relative, because a knee is a hinge that bends one way.
Reach
The cell is 96 wide and a fighter stands on its centre line, so a fully
extended limb lands within a few pixels of the edge. Any pose that throws a leg
out front pulls the root back with x to buy the room.