Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 762 Bytes

readme.md

File metadata and controls

25 lines (16 loc) · 762 Bytes

OffScreenCanvas

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

Examples

// This will override the native OffscreenCanvas class !
import { OffScreenCanvas, Circle } from "pencil.js";

const offScreen = new OffScreenCanvas(width, height);
offScreen.add(new Circle([0, 0], radius));

const imageData = offScreen.getImageData();

OffscreenCanvasOptions

Inherit from ContainerOptions.

Name Type Default Comment
fill Color or String null Background color
opacity Number 1 Global opacity