فهرست منبع

fix: reset canvas transformation to not accumulate error on non-zero dPR

dwelle 4 سال پیش
والد
کامیت
add75b8c93
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      src/renderer/renderScene.ts

+ 1 - 0
src/renderer/renderScene.ts

@@ -207,6 +207,7 @@ export const renderScene = (
 
   const context = canvas.getContext("2d")!;
 
+  context.resetTransform();
   context.scale(scale, scale);
 
   // When doing calculations based on canvas width we should used normalized one