diff --git a/src/core/renderers/canvas/CanvasCoreRenderer.ts b/src/core/renderers/canvas/CanvasCoreRenderer.ts index 8d6f3a6f..cb480d95 100644 --- a/src/core/renderers/canvas/CanvasCoreRenderer.ts +++ b/src/core/renderers/canvas/CanvasCoreRenderer.ts @@ -122,10 +122,11 @@ export class CanvasCoreRenderer extends CoreRenderer { const textureType = texture?.type; assertTruthy(textureType, 'Texture type is not defined'); - // The Canvas2D renderer only supports image and color textures + // The Canvas2D renderer only supports image and color textures and subTexture images if ( textureType !== TextureType.image && - textureType !== TextureType.color + textureType !== TextureType.color && + textureType !== TextureType.subTexture ) { return; } @@ -185,7 +186,11 @@ export class CanvasCoreRenderer extends CoreRenderer { ctx.clip(path); } - if (textureType === TextureType.image && ctxTexture) { + if ( + (textureType === TextureType.image || + textureType === TextureType.subTexture) && + ctxTexture + ) { const image = ctxTexture.getImage(color); ctx.globalAlpha = color.a ?? alpha; if (frame) {