fromEncoding method

dynamic fromEncoding(
  1. dynamic encoding
)

Implementation

fromEncoding(encoding) {
  var method = null;

  if (encoding == LinearEncoding) {
    method = 'Linear';
  } else if (encoding == sRGBEncoding) {
    method = 'sRGB';
  }

  this.method = 'LinearTo' + method;

  return this;
}