function setTextureProperties(texture, data) {
  var offset = data.offset || {
    x: 0,
    y: 0
  };
  var repeat = data.repeat || {
    x: 1,
    y: 1
  };
  var anisotropy = data.anisotropy || three__WEBPACK_IMPORTED_MODULE_2__.Texture.DEFAULT_ANISOTROPY;
  var wrapS = texture.wrapS;
  var wrapT = texture.wrapT;
  var magFilter = FILTERING_TYPES[data.magFilter] || texture.magFilter;
  var minFilter = FILTERING_TYPES[data.minFilter] || texture.minFilter;

  // Set wrap mode to repeat only if repeat isn't 1/1. Power-of-two is required to repeat.
  if (repeat.x !== 1 || repeat.y !== 1) {
    wrapS = three__WEBPACK_IMPORTED_MODULE_2__.RepeatWrapping;
    wrapT = three__WEBPACK_IMPORTED_MODULE_2__.RepeatWrapping;
  }

  // Apply texture properties
  texture.offset.set(offset.x, offset.y);
  texture.repeat.set(repeat.x, repeat.y);
  if (texture.wrapS !== wrapS || texture.wrapT !== wrapT || texture.magFilter !== magFilter || texture.minFilter !== minFilter || texture.anisotropy !== anisotropy) {
    texture.wrapS = wrapS;
    texture.wrapT = wrapT;
    texture.magFilter = magFilter;
    texture.minFilter = minFilter;
    texture.generateMipmaps = minFilter !== three__WEBPACK_IMPORTED_MODULE_2__.NearestFilter && minFilter !== three__WEBPACK_IMPORTED_MODULE_2__.LinearFilter;
    texture.anisotropy = anisotropy;
    texture.needsUpdate = true;
  }
}
Set texture properties such as repeat and offset.

@param {THREE.Texture} texture - a Texture instance.
@param {object} data - With keys like `repeat`.