Open
Description
toBuffer
is very handy for blitting a canvas into some other graphics system:
const buffer = canvas.toBuffer('raw')
// blit buffer here
It would be really nice to pass in an existing buffer as an optional parameter, so it could be re-filled on each toBuffer
invocation.
That would cut down on gc pressure quite a bit, especially in a tight render loop.