Skip to content

Latest commit

 

History

History
 
 

offscreen-canvas

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

OffScreenCanvas

Utility to render on a non displayed canvas and extract data from it.

Installation

npm install @pencil.js/offscreen-canvas

Examples

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;