Sfoglia il codice sorgente

Merge branch 'contextLossFixBlack' of https://github.com/TrevorDev/Babylon.js into contextLossFixBlack

Trevor Baron 6 anni fa
parent
commit
71cb77e3f7
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  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;