Texture constructor

Texture([
  1. dynamic image,
  2. int? mapping,
  3. int? wrapS,
  4. int? wrapT,
  5. int? magFilter,
  6. int? minFilter,
  7. int? format,
  8. int? type,
  9. int? anisotropy,
  10. int? encoding,
])

Implementation

Texture(
    [image,
    int? mapping,
    int? wrapS,
    int? wrapT,
    int? magFilter,
    int? minFilter,
    int? format,
    int? type,
    int? anisotropy,
    int? encoding]) {
  source = Source(image);
  this.mapping = mapping ?? Texture.defaultMapping;

  this.wrapS = wrapS ?? ClampToEdgeWrapping;
  this.wrapT = wrapT ?? ClampToEdgeWrapping;

  this.magFilter = magFilter ?? LinearFilter;
  this.minFilter = minFilter ?? LinearMipmapLinearFilter;

  this.anisotropy = anisotropy ?? 1;

  this.format = format ?? RGBAFormat;
  internalFormat = null;
  this.type = type ?? UnsignedByteType;
  this.encoding = encoding ?? LinearEncoding;
}