dont overdraw (no need for it)
This commit is contained in:
parent
40ecc33457
commit
f5f08be505
1 changed files with 10 additions and 10 deletions
|
|
@ -165,8 +165,8 @@ async function createPuzzleTileBitmaps(img, tiles, info) {
|
||||||
ctx.stroke(path)
|
ctx.stroke(path)
|
||||||
ctx.restore()
|
ctx.restore()
|
||||||
|
|
||||||
// Draw the path (border) in the color of the
|
// Redraw the path (border) in the color of the
|
||||||
// surrounding tile, this makes the tile look more realistic
|
// tile, this makes the tile look more realistic
|
||||||
// -----------------------------------------------------------
|
// -----------------------------------------------------------
|
||||||
// -----------------------------------------------------------
|
// -----------------------------------------------------------
|
||||||
ctx2.clearRect(0, 0, tileDrawSize, tileDrawSize)
|
ctx2.clearRect(0, 0, tileDrawSize, tileDrawSize)
|
||||||
|
|
@ -176,14 +176,14 @@ async function createPuzzleTileBitmaps(img, tiles, info) {
|
||||||
ctx2.globalCompositeOperation = 'source-in'
|
ctx2.globalCompositeOperation = 'source-in'
|
||||||
ctx2.drawImage(
|
ctx2.drawImage(
|
||||||
img,
|
img,
|
||||||
srcRect.x - tileMarginWidth - 50,
|
srcRect.x - tileMarginWidth,
|
||||||
srcRect.y - tileMarginWidth - 50,
|
srcRect.y - tileMarginWidth,
|
||||||
tileDrawSize + 100,
|
tileDrawSize,
|
||||||
tileDrawSize + 100,
|
tileDrawSize,
|
||||||
0 - 50,
|
0,
|
||||||
0 - 50,
|
0,
|
||||||
tileDrawSize + 100,
|
tileDrawSize,
|
||||||
tileDrawSize + 100,
|
tileDrawSize,
|
||||||
)
|
)
|
||||||
ctx2.restore()
|
ctx2.restore()
|
||||||
ctx.drawImage(c2, 0, 0)
|
ctx.drawImage(c2, 0, 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue