@novartc/novartc-ucp-whiteboard
v1.0.2
Published
NovaRTC UCP Whiteboard SDK
Readme
NovaRTC UCP Whiteboard SDK
@novartc/novartc-ucp-whiteboard provides a Yjs-backed whiteboard plugin for the core UCP SDK.
import { UCPClient } from "@novartc/novartc-ucp-sdk";
import { whiteboardPlugin } from "@novartc/novartc-ucp-whiteboard";
const client = new UCPClient("https://your-api-server.com");
client.use(whiteboardPlugin());
const whiteboard = client.whiteboard;For freehand tools, create a pen shape with attrs.points, then append sampled points with whiteboard.appendShapePoints(shapeId, points). This preserves points as a Yjs array so collaborators receive incremental strokes instead of repeated whole-array replacements.
Canvas-independent geometry, hit testing, shape factories, and document stores are available from @novartc/novartc-ucp-whiteboard/ui-core for custom renderers.
