artworld/examples/liskov.js
2025-03-12 23:51:24 -05:00

11 lines
282 B
JavaScript

import { World, Rect, Arc, Line, Circle, Random } from "../artworld/index.js";
let world = new World("mainCanvas");
let types = [Rect, Line, Circle, Arc];
for (let i = 0; i < 100; i++) {
let Cls = Random.choice(types);
new Cls(world).random().strokeWeight(2);
}
world.draw();