Canvas magnifier

A magnifying lens over your content.

0:00 / 0:01

Customize

460
2.4

Installation

pnpm odori add component canvas-magnifier

Edit the source in videos/components/canvas-magnifier/. 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
120 frames · 4s
Minimum duration
30 frames · 1s
Entrance
14 frames
Exit
0 frames
Reduced motion
the lens is open in place from the first frame
Requires
Odori
Content limits
none

Props

PropTypeDefaultRequired
childrenWhat is being magnified. Rendered once, at full size, underneath.ReactNode——
pathWhere the lens sits, in composition pixels. Accepts an authored path.CursorStop[]——
xStatic position, when the lens does not move.number960—
ynumber540—
sizeLens diameter in composition pixels.number460—
zoomHow much larger the detail appears.number2.4—
entranceFramesFrames the lens takes to open.number14—

Related components

All components