Renders the object offscreen with snapObjectPixels and draws the pixels into a canvas (a new one, or canvas). This is the cheapest output for a panel: no image encoding. Use canvas.toDataURL() when a data url is needed.
canvas
canvas.toDataURL()
the viewer's renderer
object to frame and render
see SnapObjectOptions. size defaults to 256
size
Optional
canvas to draw into, it is resized to the snapshot size
Renders the object offscreen with snapObjectPixels and draws the pixels into a canvas (a new one, or
canvas). This is the cheapest output for a panel: no image encoding. Usecanvas.toDataURL()when a data url is needed.