Function

useTimelineCanvasLayer

Wires an app-owned canvas to timeline geometry and redraw events. Drawing is imperative and scheduled through requestAnimationFrame so dense visual layers do not push scroll or zoom updates through React state.

Signature

Type Definition
useTimelineCanvasLayer(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseTimelineCanvasLayerOptions<TrackKind>): TimelineCanvasLayerHandle

Type parameters

NameConstraintDefaultDescription
TrackKindNonestringNo type parameter summary yet.

Parameters

NameTypeDescription
canvasRefRefObject<HTMLCanvasElement | null>Ref for the app-owned canvas element to size and draw.
optionsUseTimelineCanvasLayerOptions<TrackKind>Drawing callback, geometry overrides, and redraw behavior.

Returns

Imperative handle for manually scheduling redraws.