Explorar o código

Merge pull request #6060 from TrevorDev/guiMaterialCloneFix

pass buffer to new texture when cloning material if present
David Catuhe %!s(int64=6) %!d(string=hai) anos
pai
achega
7f237bb44c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
     }