Browse Source

Update textureTools.ts

aWeirdo 4 years ago
parent
commit
8e2d15923c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Misc/textureTools.ts

+ 2 - 1
src/Misc/textureTools.ts

@@ -124,7 +124,8 @@ export class TextureTools {
         }
 
         var imageData = ctx.createImageData(width, height);
-        imageData.data.set(pixels as ArrayLike<number>);
+        var castData = <any>imageData.data;
+        castData.set(pixels);
         ctx.putImageData(imageData, 0, 0);
 
         if (internalTexture.invertY) {