diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-02 16:04:13 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-02 16:04:13 -0600 |
commit | 5a55b5fa0c678ff03842d2adec8543e754546718 (patch) | |
tree | 4f615829acc10045d81a9d553c757a14792bf81a /src/render | |
parent | 4d34b0b4b890e957030fbf6e3c8e1d4a02d2a627 (diff) | |
download | bbiy-5a55b5fa0c678ff03842d2adec8543e754546718.tar.gz bbiy-5a55b5fa0c678ff03842d2adec8543e754546718.zip |
Grid system & simple physics
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/graphics.js | 3 |
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; |