Repository navigation
v0.4.0
Pixel light, and checks for framing and texture size (2026-11-11).
- Pixel light: the light now follows the style. Hard retro cuts it with
light.steps(four flat tones, a 4x4
ordered dither only where it fades out, dark below a floor), so a frame keeps to a few dozen colours instead of
the hundreds a smooth bloom gives; soft and painterly stay smooth, and the owner can swap either way. A prompt
asking for a pixel feel gets hard retro or stepped light recommended. Feedback from pixel artists was that smooth
glow over crisp sprites "doesn't check the pixel vibe". - Colour count:
ex.colours(frame)counts a frame's distinct colours, every draft prints the median, and
ex.check(..., max_colours=N)flags a frame over N (48 with stepped light). - Preview page: a
caster.chainsegment withwalkmoves the body over the segment, and one withportalcuts
the body at the first rift line and shows it past the second, so a step through a rift plays with the caster.
Parts placed with anoffsetare no longer drawn a second time on the body. - Framing check:
ex.checknow fails a draft whose drawing sits to one side of its cell, so most of every frame
ships empty (ex.framing: the box holding 96 % of the colour, the px to cut from each side and the share of the
sheet that saves; over a third fails,trim=Noneswitches it off). Measured on the 17 examples whose sheets could be read: the
two arrow rains score 49 and 50 %, every other one 24 % or less. - Texture budget:
ex.checkfails sheets that decode to more than 128 MB (ex.memory_mb; a full 4096 px page each
for colour and light), withmax_mbto raise or lift it once the owner accepts the size.ex.writestill notes
anything over 64 MB. Existing drafts keep the kit they were drawn with, so none of them changes. - Craft gates: repeated parts in three sizes and grouped, one field or shade map per mass, one alpha per
translucent layer, clumped noise for surface texture, the subject centred in its cell. drafts/hoa_cong_v2: the fire attack redrawn to those gates on the current kit. Seven fire sites in three sizes
in place of a flame per 6 px column, the big fires between the palisade and the tents so the tents read against
them, smoke as one shade map at one alpha, clumped holes and embers, and a 240 px cell in place of 320 (41 MB
decoded, was 55).- Tests:
test_shapes.pydraws with every helper inkit/fxkit.pyandkit/fxlib.pyand with the mockup caster
(each draws, draws the same twice, keeps to its shades). Coverage 72 to 89 %, withcaster.pynow counted; the
CI floor moves from 60 to 80 %. - README demo: Shrinking the Earth (
caster_sword_suc_dia_thanh_thon.gif) in one row with the two caster gifs.