Browse Source

Update textureTools.ts

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

+ 3 - 2
src/Misc/textureTools.ts

@@ -4,6 +4,7 @@ import { RenderTargetTexture } from "../Materials/Textures/renderTargetTexture";
 import { PassPostProcess } from "../PostProcesses/passPostProcess";
 import { Constants } from "../Engines/constants";
 import { Scene } from "../scene";
+import { Nullable } from "../types";
 
 /**
  * Class used to host texture specific utilities
@@ -99,7 +100,7 @@ export class TextureTools {
             while (--len >= 0) {
                 var val = pixels[len];
                 if (val < 0) {
-                    val = 0; 
+                    val = 0;
                 } else if (val > 1) {
                     val = 1;
                 }
@@ -134,7 +135,7 @@ export class TextureTools {
 
             ctx2.translate(0, height);
             ctx2.scale(1, -1);
-            ctx2.drawImage(canvas, 0, 0)
+            ctx2.drawImage(canvas, 0, 0);
 
             return canvas2.toDataURL('image/png');
         }