diff --git a/src/drawShapes.js b/src/drawShapes.js index 0cecd99..dcd5882 100644 --- a/src/drawShapes.js +++ b/src/drawShapes.js @@ -41,7 +41,7 @@ const DEFAULTS = { red: 255, blue: 255, green: 255, - alpha: 0.8, + alpha: 0.9, }, }, body: { @@ -211,7 +211,7 @@ export default class DrawShapes { }); } - pips (context, scale, x, y, cell) { + pips (context, scale, x, y, cell, alpha = 1) { const {tileStyle, orientation, pips} = cell; if (this.pipVertices[tileStyle] @@ -225,7 +225,9 @@ export default class DrawShapes { const scaleWidth = (scale * 2) * cell.scale; const scaleHeight = (scale * 2) * cell.scale; + context.globalAlpha = alpha; context.drawImage(this.pipCache.pips[pips], x - (scaleWidth / 2), y - (scaleHeight / 2), scaleWidth, scaleHeight); + context.globalAlpha = 1; } }