Top band: each warp thread's color, with the shaft it is threaded on. Arrows mark the threads lifted for the current pick; the weft passes under them and over the rest.
Each step is one executed statement (statements inside repeat appear once per pass). The yellow bar in the editor marks the statement just executed.
Original cloths written in LOOM. Click one to load it into the editor.
| Program | Result |
|---|
Each program is run live in this page by the same engine used by cli.js, and its output compared character-for-character to the expected output.
A LOOM program is one statement per line; // starts a comment.
loom 24 16— width (warp threads) and height (picks). Must come first.palette a=#1b3a5c b=#f2e8cf— one-letter color names.warp a b*3 (a b)*2 mirror(a b c)— warp colors, repeated across the width.thread 1-4orthread mirror(1-4)— which shaft (1–8) each warp thread hangs on.treadle 1 12— name a lift: treadle 1 raises shafts 1 and 2.pick b 13,pick b t1,pick b *,pick b -,pick b !1— weave one row with weft color b.shuttle r o ythenpick 1— picks without a color take the next shuttle color.cross 2 5swaps two warp threads;drift 1/drift -1rotates all of them.maxfloat 3— error if any thread floats over more than 3 others (the cloth would be loose).repeat 4 {…}— repeat a block.
Output is a grid of color letters; . marks rows never woven. The first error stops the program and is reported as error line L: message.