big commit
This commit is contained in:
parent
aff885cf17
commit
b506f5a219
22 changed files with 692 additions and 556 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue