private clearCanvas method
This commit is contained in:
parent
9b8a7575c2
commit
d826bc2426
@ -12,9 +12,13 @@ export class Scene {
|
|||||||
this.setScreenSize(width, height);
|
this.setScreenSize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#clearCanvas() {
|
||||||
|
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
||||||
|
}
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
// clear canvas
|
// clear canvas
|
||||||
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
this.#clearCanvas();
|
||||||
|
|
||||||
// fill canvas
|
// fill canvas
|
||||||
this.context.fillStyle = '#523c4e';
|
this.context.fillStyle = '#523c4e';
|
||||||
|
Loading…
Reference in New Issue
Block a user