Browse Source

Fix clearRect for [0, 0.5]

Christopher Chedeau 5 years ago
parent
commit
ee7dc953bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/index.js

+ 1 - 1
src/index.js

@@ -326,7 +326,7 @@ context.translate(0.5, 0.5);
 function drawScene() {
   ReactDOM.render(<App />, rootElement);
 
-  context.clearRect(0, 0, canvas.width, canvas.height);
+  context.clearRect(-0.5, -0.5, canvas.width, canvas.height);
 
   elements.forEach(element => {
     element.draw(rc, context);