From 8ee508f8ad83cba39c7c63804126dce9335966e7 Mon Sep 17 00:00:00 2001 From: Mirko Pecora Date: Wed, 6 Nov 2024 11:24:49 +0100 Subject: [PATCH] fix: canvas image color with alpha --- src/core/renderers/canvas/CanvasCoreRenderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/renderers/canvas/CanvasCoreRenderer.ts b/src/core/renderers/canvas/CanvasCoreRenderer.ts index 0fb82473..f9d5bd80 100644 --- a/src/core/renderers/canvas/CanvasCoreRenderer.ts +++ b/src/core/renderers/canvas/CanvasCoreRenderer.ts @@ -169,7 +169,7 @@ export class CanvasCoreRenderer extends CoreRenderer { if (ctxTexture) { const image = ctxTexture.getImage(color); - ctx.globalAlpha = alpha; + ctx.globalAlpha = color.a ?? alpha; if (frame) { ctx.drawImage( image,