import { app, Color } from "../module/mod.mjs";
const view = (app, model) => {
let pen = app.pen();
model.iteration += 0.05;
pen.background()
.color(Color.fromHex(0x141414ff));
for(let i = 0; i < 20; i++) {
pen.arc()
.xy(300, 300)
.radius(20 * i / 2)
.start(0)
.end(Math.PI * (2 - i / model.iteration))
.nofill()
.color(Color.fromBytes(255, 255, i * 20));
}
let titleText = pen.text()
.size(16)
.text("Forest Chamomile")
.color(Color.Yellow);
titleText.xy(300 - titleText.measureWidth() / 2, 540);
let text = pen.text()
.size(14)
.text("made with amelia by birdboat00")
.color(Color.White);
text.xy(300 - text.measureWidth() / 2, 560);
pen.plot();
};
const model = (app) => {
return {
iteration: 10
}
}
app()
.size(600, 600)
.parent("example")
.view(view)
.model(model)
.run();