code: function setTextureParameters(textureType, texture, isPowerOfTwoImage) {
      var extension;
  
      if (isPowerOfTwoImage) {
        _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, paramThreeToGL(texture.wrapS));
  
        _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, paramThreeToGL(texture.wrapT));
  
        _gl.texParameteri(textureType, _gl.TEXTURE_MAG_FILTER, paramThreeToGL(texture.magFilter));
  
        _gl.texParameteri(textureType, _gl.TEXTURE_MIN_FILTER, paramThreeToGL(texture.minFilter));
      } else {
        _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE);
  
        _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE);
  
        if (texture.wrapS !== THREE.ClampToEdgeWrapping || texture.wrapT !== THREE.ClampToEdgeWrapping) ;
  
        _gl.texParameteri(textureType, _gl.TEXTURE_MAG_FILTER, filterFallback(texture.magFilter));
  
        _gl.texParameteri(textureType, _gl.TEXTURE_MIN_FILTER, filterFallback(texture.minFilter));
  
        if (texture.minFilter !== THREE.NearestFilter && texture.minFilter !== THREE.LinearFilter) ;
      }
  
      extension = extensions.get('EXT_texture_filter_anisotropic');
  
      if (extension) {
        if (texture.type === THREE.FloatType && extensions.get('OES_texture_float_linear') === null) return;
        if (texture.type === THREE.HalfFloatType && extensions.get('OES_texture_half_float_linear') === null) return;
  
        if (texture.anisotropy > 1 || properties.get(texture).__currentAnisotropy) {
          _gl.texParameterf(textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(texture.anisotropy, _this.getMaxAnisotropy()));
  
          properties.get(texture).__currentAnisotropy = texture.anisotropy;
        }
      }
    }
docs: Textures