big commit

This commit is contained in:
りき萌 2024-02-18 23:37:31 +01:00
parent aff885cf17
commit b506f5a219
22 changed files with 692 additions and 556 deletions

View file

@ -1,5 +1,9 @@
export const internals = {
body: document.createElement("body"),
resetBody() {
this.body.replaceChildren();
}
};
export function body() {
@ -19,4 +23,13 @@ export class Sketch {
addElement(this.canvas);
}
animate(draw) {
let animationCallback;
animationCallback = () => {
draw();
requestAnimationFrame(animationCallback);
};
animationCallback();
}
}