summaryrefslogtreecommitdiff
path: root/src/render/graphics.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/graphics.js')
-rw-r--r--src/render/graphics.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/render/graphics.js b/src/render/graphics.js
index de98633..6a199f0 100644
--- a/src/render/graphics.js
+++ b/src/render/graphics.js
@@ -3,10 +3,9 @@ game.graphics = (
(context) => {
context.imageSmoothingEnabled = false;
const clear = () => {
- context.clearRect(0, 0, game.width, game.height);
+ context.clearRect(0, 0, game.canvas.width, game.canvas.height);
};
- // Maybe this should be a component?
const Sprite = ({image, spriteX, spriteY, spriteWidth, spriteHeight, timePerFrame, cols, rows, numFrames, drawFunction}) => {
timePerFrame = timePerFrame ?? 100;
numFrames = numFrames ?? 1;