소스 검색

Merge pull request #6060 from TrevorDev/guiMaterialCloneFix

pass buffer to new texture when cloning material if present
David Catuhe 6 년 전
부모
커밋
7f237bb44c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Materials/Textures/texture.ts

+ 1 - 1
src/Materials/Textures/texture.ts

@@ -548,7 +548,7 @@ export class Texture extends BaseTexture {
      */
     public clone(): Texture {
         return SerializationHelper.Clone(() => {
-            return new Texture(this._texture ? this._texture.url : null, this.getScene(), this._noMipmap, this._invertY, this.samplingMode);
+            return new Texture(this._texture ? this._texture.url : null, this.getScene(), this._noMipmap, this._invertY, this.samplingMode, undefined, undefined, this._texture ? this._texture._buffer : undefined);
         }, this);
     }