@deviva-draw/engine
v0.12.0
Published
Framework-agnostic whiteboard core: element model, scene store, history, renderer, geometry, tools
Maintainers
Readme
@deviva-draw/engine
Framework-agnostic whiteboard core for Deviva Draw: the
element model, scene store, history (undo/redo), renderer, geometry, and input/tools state
machine. No DOM/React dependency required at the type level — bring your own <canvas> and
pointer events, or use @deviva-draw/react
for a ready-made <DevivaDraw/> component.
Install
npm install @deviva-draw/engineMinimal example
import { Scene, createRectangleElement } from "@deviva-draw/engine";
const scene = new Scene();
scene.addElement(
createRectangleElement({ x: 0, y: 0, width: 100, height: 80 }),
);
console.log(scene.getElements());Rendering, input handling, persistence (local storage/PNG/SVG export), and E2E-encrypted share
links are all exposed from the same entry point — see the
repository for the full API surface and the
packages/react source for a complete integration.
License
MIT
