From f5f08be5052697e362ed28806750a5c173789ed5 Mon Sep 17 00:00:00 2001 From: Zutatensuppe Date: Sat, 17 Apr 2021 17:50:03 +0200 Subject: [PATCH] dont overdraw (no need for it) --- game/PuzzleGraphics.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/game/PuzzleGraphics.js b/game/PuzzleGraphics.js index 8953a3f..fd54444 100644 --- a/game/PuzzleGraphics.js +++ b/game/PuzzleGraphics.js @@ -165,8 +165,8 @@ async function createPuzzleTileBitmaps(img, tiles, info) { ctx.stroke(path) ctx.restore() - // Draw the path (border) in the color of the - // surrounding tile, this makes the tile look more realistic + // Redraw the path (border) in the color of the + // tile, this makes the tile look more realistic // ----------------------------------------------------------- // ----------------------------------------------------------- ctx2.clearRect(0, 0, tileDrawSize, tileDrawSize) @@ -176,14 +176,14 @@ async function createPuzzleTileBitmaps(img, tiles, info) { ctx2.globalCompositeOperation = 'source-in' ctx2.drawImage( img, - srcRect.x - tileMarginWidth - 50, - srcRect.y - tileMarginWidth - 50, - tileDrawSize + 100, - tileDrawSize + 100, - 0 - 50, - 0 - 50, - tileDrawSize + 100, - tileDrawSize + 100, + srcRect.x - tileMarginWidth, + srcRect.y - tileMarginWidth, + tileDrawSize, + tileDrawSize, + 0, + 0, + tileDrawSize, + tileDrawSize, ) ctx2.restore() ctx.drawImage(c2, 0, 0)