Monorepo for Aesthetic.Computer
aesthetic.computer
Aesthetic Computer Programming Basics#
Writing and publishing a piece on aesthetic.computer involves
programming against an easy to learn JavaScript API while using
the VS Code extension.
Follow the setup guide to get started.
Graphics#
wipe()
- wipe() Yields a random color
- wipe(colorName) Such as "red" or "hotpink" (CSS)
- wipe(red, green, blue) Each from 0-255
- wipe(gray) Grayscale from 0-255
- wipe(paletteName) Try "rainbow"
ink()
- ink() Chooses a random color
- wipe(colorName) Such as "red" or "hotpink" (CSS)
- ink(red, green, blue) Each from 0-255
- ink(red, green, blue, trans) Including transparency
- ink(gray) Grayscale from 0-255
- ink(gray, trans) Grayscale with transparency
- ink(paletteName) Try "rainbow"
line or box.
point()
- point() Paint a random point
- point(x, y) At specific coordinates
x, y.
line()
- line() Paints a random line
- line(Ax, Ay, Bx, By) From 0 on up starting at top left
A to B.
box()
- box() A random box
- box(x, y, size) Square from top left corner
- box(x, y, w, h) Rectangle from top left corner
- box(x, y, size, mode) Square with
mode - box(x, y, w, h, mode) Rectangle with
mode mode
center - paints a box from the center
outline - paints the outline of a box
inline - the opposite of outline
(thicken with
: like outline:4)
combine modes with
* like outline*center or inline:3*center
circle()
- circle() A random circle
- circle(x, y, radius) Circle from center
- circle(x, y, radius, filled) Set to
falsefor outline - circle(x, y, radius, filled, thickness) Set outline thickness
oval()
- oval() A random oval
- oval(x, y, w, h) Oval from center with width & height
- oval(x, y, w, h, filled) Set to
falsefor outline - oval(x, y, radius, filled, thickness) Set outline thickness
shape()
- shape() A random shape
- shape(x, y, x, y, ...) Shape from a list of points
- shape({ points: [x, y, ...], filled: false }) Outline only
poly()
- poly() A random scribble
- poly([[x, y], [x, y], ...]) Line from a list of points
flood()
- flood() Fill a random location.
- flood(x, y) Line from a list of points
write()
- write("text") A word in a random location
- write("text", x, y) Or at specific coordinates