ajnor is an open-source creative-coding toolkit for JavaScript.
It is lightweight, functional and fast. It allows you to create your starry nightsky in squint.
Currently the following commands are supported:
- Background (bg)
- Rectangle (rect)
- Circle (circle)
- Arcs (arc)
- Lines (line)
- Polygons (poly)
- Text (text)
- BlendMode (bm)
ajnor requires a browser that supports ECMAScript modules.
ajnor is lightweight and modular and is written in modern JavaScript.
Use it directly by downloading it from GitHub:
import { ... } from "/path/to/ajnor/mod.mjs"
or import it from jsDelivr:
import { ... } from "https://cdn.jsdelivr.net/gh/birdboat00/ajnor/src/mod.mjs"
Draw a rectangle:
import * as a from "../src/mod.mjs"
a.mksketch({
size: a.szsquare(400),
parent: "example",
view: (cv) => {
a.plot(cv, a.pipe(a.mkpen())
.to(a.bg, { color: a.colblack() })
.to(a.rect, { p: a.pt(20, 20), w: 360, h: 360, color: a.colwhite() }).value
)
}
})
I just started working on this library and there is still a lot of work to be done. Feel free to help out!
ajnor is licensed under the 0BSD license.