copy method

Texture copy(
  1. Texture source
)

Implementation

Texture copy(Texture source) {
  name = source.name;

  this.source = source.source;

  mapping = source.mapping;

  wrapS = source.wrapS;
  wrapT = source.wrapT;

  magFilter = source.magFilter;
  minFilter = source.minFilter;

  anisotropy = source.anisotropy;

  format = source.format;
  internalFormat = source.internalFormat;
  type = source.type;

  offset.setFrom(source.offset);
  repeat.setFrom(source.repeat);
  center.setFrom(source.center);
  rotation = source.rotation;

  matrixAutoUpdate = source.matrixAutoUpdate;
  matrix.setFrom(source.matrix);

  generateMipmaps = source.generateMipmaps;
  premultiplyAlpha = source.premultiplyAlpha;
  flipY = source.flipY;
  unpackAlignment = source.unpackAlignment;
  encoding = source.encoding;

  userData = json.decode(json.encode(source.userData));

  return this;
}