19 lines
436 B
JavaScript
19 lines
436 B
JavaScript
import { World, Pico8, Group, Circle, Vector2 } from "../artworld/index.js";
|
|
let world = new World("mainCanvas");
|
|
window.world = world;
|
|
|
|
function* color_cycle() {
|
|
while (true) {
|
|
yield Pico8.RED;
|
|
yield Pico8.ORANGE;
|
|
yield Pico8.YELLOW;
|
|
}
|
|
}
|
|
let cycle = color_cycle();
|
|
|
|
let g = new Group(world);
|
|
for (let r = 20; r < 500; r += 20) {
|
|
new Circle(g).radius(r).fill(cycle.next().value).z(-r).strokeWeight(0);
|
|
}
|
|
world.draw();
|