Skip to content

Commit 6da642b

Browse files
committed
Set alpha in dynamic layer canvas renderer
Set it directly because of the explicit save/restore commands throw the renderer's internal alpha out-of-sync
1 parent 320c090 commit 6da642b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

v3/src/gameobjects/tilemap/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var DynamicTilemapLayerCanvasRenderer = function (renderer, gameObject, interpol
4242
ctx.scale(tile.flipX ? -1 : 1, tile.flipY ? -1 : 1);
4343
}
4444

45-
renderer.setAlpha(gameObject.alpha * tile.alpha);
45+
ctx.globalAlpha = gameObject.alpha * tile.alpha;
4646

4747
ctx.drawImage(
4848
image,

0 commit comments

Comments
 (0)