Canvas stage

Frame-driven canvas drawing with export parity.

0:00 / 0:01

Customize

120

Installation

pnpm odori add component canvas-stage

Edit the source in videos/components/canvas-stage/. Use odori diff to compare upstream changes and odori update to apply updates.

Timing contract

Use these durations and content limits when composing a scene. Run odori test to check your video.

Family
Media
Recommended duration
150 frames · 5s
Minimum duration
30 frames · 1s
Entrance
0 frames
Exit
0 frames
Reduced motion
the field holds its first frame
Requires
Odori
Content limits
count ≤ 600

Props

PropTypeDefaultRequired
drawThe draw call. Receives the 2D context and the frame it is drawing.CanvasDraw——
widthCanvas size in composition pixels. Defaults to the whole frame.number——
heightnumber——
countParticles drawn by the built-in field, when no draw is supplied.number120—
seedSeed for the built-in field, so two videos can differ on purpose.string"field"—

Related components

All components