code: function getTextureFromData(gl, data, opts) {
    if (data instanceof Texture2D) {
      return data;
    }
    return new Texture2D(gl, Object.assign({data}, opts));
  }
docs: /*
  Convert image data into texture
  @returns {Texture2D} texture