Utility to render on a non displayed canvas and extract data from it.
npm install @pencil.js/offscreen-canvas
import OffScreenCanvas from "@pencil.js/offscreen-canvas";
const circle = new Circle([0, 0], radius);
const offScreen = new OffScreenCanvas(width, height);
offScreen.render(circle);
// or
circle.render(offScreen);
const imageData = offScreen.imageData;