Переглянути джерело

Merge pull request #376 from jahow/patch-1

Transfer sampling mode to new texture when cloning an existing one
David Catuhe 10 роки тому
батько
коміт
b5f8c5b79f
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      Babylon/Materials/Textures/babylon.texture.ts

+ 2 - 2
Babylon/Materials/Textures/babylon.texture.ts

@@ -205,7 +205,7 @@
         }
 
         public clone(): Texture {
-            var newTexture = new BABYLON.Texture(this._texture.url, this.getScene(), this._noMipmap, this._invertY);
+            var newTexture = new BABYLON.Texture(this._texture.url, this.getScene(), this._noMipmap, this._invertY, this._samplingMode);
 
             // Base texture
             newTexture.hasAlpha = this.hasAlpha;
@@ -232,4 +232,4 @@
             return new Texture("data:" + name, scene, noMipmap, invertY, samplingMode, onLoad, onError, data);
         }
     }
-} 
+}