Skip to content

Instantly share code, notes, and snippets.

@Kethku
Created March 8, 2019 07:17
Show Gist options
  • Save Kethku/e707052b28a7a0be6d7e822e4ebed1d4 to your computer and use it in GitHub Desktop.
Save Kethku/e707052b28a7a0be6d7e822e4ebed1d4 to your computer and use it in GitHub Desktop.
SCRIPT-8
const size = range(128)
const d = 1
const rects = flatten(size.map(x => size.map(y => [x, y, d, d])))
let counter = 0;
draw = () => {
counter++
rects.forEach(rect => {
rectFill(...rect, rect[0] + (rect[1] * counter) / 100)
})
}
{
"lines": [
12,
0,
0,
0,
0,
0,
0,
0
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment