File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/core/renderers/canvas Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -122,10 +122,11 @@ export class CanvasCoreRenderer extends CoreRenderer {
122122 const textureType = texture ?. type ;
123123 assertTruthy ( textureType , 'Texture type is not defined' ) ;
124124
125- // The Canvas2D renderer only supports image and color textures
125+ // The Canvas2D renderer only supports image and color textures and subTexture images
126126 if (
127127 textureType !== TextureType . image &&
128- textureType !== TextureType . color
128+ textureType !== TextureType . color &&
129+ textureType !== TextureType . subTexture
129130 ) {
130131 return ;
131132 }
@@ -185,7 +186,11 @@ export class CanvasCoreRenderer extends CoreRenderer {
185186 ctx . clip ( path ) ;
186187 }
187188
188- if ( textureType === TextureType . image && ctxTexture ) {
189+ if (
190+ ( textureType === TextureType . image ||
191+ textureType === TextureType . subTexture ) &&
192+ ctxTexture
193+ ) {
189194 const image = ctxTexture . getImage ( color ) ;
190195 ctx . globalAlpha = color . a ?? alpha ;
191196 if ( frame ) {
You can’t perform that action at this time.
0 commit comments