code: function imageFromFile(file, options) {
    const tex = ctx.texture2D({
      data: [0, 0, 0, 0],
      width: 1,
      height: 1,
      pixelFormat: ctx.PixelFormat.RGBA8,
      encoding: options.encoding,
      wrap: ctx.Wrap.Repeat,
      flipY: true,
      min: ctx.Filter.LinearMipmapLinear,
      mipmap: true,
      aniso: 16
    })
    io.loadImage(
      file,
      function(err, image) {
        if (err) throw err
        ctx.update(tex, {
          data: image,
          width: image.width,
          height: image.height,
          mipmap: true,
          min: ctx.Filter.LinearMipmapLinear
        })
      },
      true
    )
    return tex
  }
docs: Utils