Browse Source

Update texture.ts

revert texture change
Trevor Baron 6 years ago
parent
commit
534f8b8763
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/Materials/Textures/texture.ts

+ 2 - 3
src/Materials/Textures/texture.ts

@@ -701,8 +701,7 @@ export class Texture extends BaseTexture {
      */
      */
     public static CreateFromBase64String(data: string, name: string, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE,
     public static CreateFromBase64String(data: string, name: string, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE,
         onLoad: Nullable<() => void> = null, onError: Nullable<() => void> = null, format: number = Constants.TEXTUREFORMAT_RGBA): Texture {
         onLoad: Nullable<() => void> = null, onError: Nullable<() => void> = null, format: number = Constants.TEXTUREFORMAT_RGBA): Texture {
-        var texture = new Texture("data:" + name, scene, noMipmap, invertY, samplingMode, onLoad, onError, data, false, format);
-        return texture;
+        return new Texture("data:" + name, scene, noMipmap, invertY, samplingMode, onLoad, onError, data, false, format);
     }
     }
 
 
     /**
     /**
@@ -731,4 +730,4 @@ export class Texture extends BaseTexture {
 }
 }
 
 
 // References the dependencies.
 // References the dependencies.
-SerializationHelper._TextureParser = Texture.Parse;
+SerializationHelper._TextureParser = Texture.Parse;