Live demos of Vectra in action — each one runs in a single file with no build step required
Every example is a self-contained page: open it, interact with the demo and read the annotated source code right below the canvas.
Demos import the compiled library from
lib/index.js directly in the browser, so you
can inspect and modify them without any bundler.
Two vectors added head‑to‑tail with their resultant drawn live — the red vector rotates to show how the sum changes.
demo vector canvas
Bouncing rectangles with their intersection, union and
point‑containment highlighted live — move the mouse to
test Rect.contains.
demo rect input
Drag sliders to compose translation, rotation and scale
into a Matrix3 and watch an arrow, its basis
vectors and the inverse transform update live.
demo matrix canvas