Browse Source

Update texture.ts

revert texture change
Trevor Baron 6 năm trước cách đây
mục cha
commit
534f8b8763
1 tập tin đã thay đổi với 2 bổ sung3 xóa
  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,
         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.
-SerializationHelper._TextureParser = Texture.Parse;
+SerializationHelper._TextureParser = Texture.Parse;