Overview
omdCanvas extends the capabilities of omdDisplay by providing a 2D surface where multiple equations, visualizations, and other objects can coexist and be manipulated freely.
Basic Usage
import { omdCanvas } from '@teachinglab/omd';
const canvas = new omdCanvas({
width: 800,
height: 600,
expressions: [
'y = x^2',
'y = 2x + 1'
]
});
canvas.attachTo('#canvas-root');
Capabilities
- Multi-Object Management: Handle dozens of independent math objects.
- Spatial Organization: Objects can be positioned absolutely or relatively.
- Tools & Gestures: Built-in support for selection, drawing, and manipulation tools.