Interface

UseTimelineViewportResult

Result returned by `useTimelineViewport`.

Signature

Type Definition
Interface UseTimelineViewportResult

Properties

NameSignatureDescription
durationduration: RationalTime | undefinedExplicit timeline duration, or undefined when duration follows content bounds.
maxContentTimemaxContentTime: RationalTimeMaximum timeline content time used for playback and scroll bounds.
maxScrollLeftmaxScrollLeft: numberMaximum horizontal scroll offset for the current viewport and content duration.
maxScrollTopmaxScrollTop: numberMaximum vertical scroll offset for the current viewport and track stack.
scrollLeftscrollLeft: numberCurrent horizontal timeline scroll offset in pixels.
scrollTopscrollTop: numberCurrent vertical timeline scroll offset in pixels.
setDuration(duration: RationalTime | undefined): TimelineCommandResultSets an explicit timeline duration, or clears it when passed undefined.
setScrollLeft(scrollLeft: number): TimelineCommandResultSets horizontal scroll offset, with final clamping delegated to the engine.
setScrollTop(scrollTop: number): TimelineCommandResultSets vertical scroll offset, with final clamping delegated to the engine.
setViewportHeight(height: number): TimelineCommandResultStores the measured timeline viewport height in the engine.
setViewportWidth(width: number): TimelineCommandResultStores the measured timeline viewport width in the engine.
setZoomScale(zoomScale: number): TimelineCommandResultSets zoom scale, with final clamping delegated to the engine.
viewportDurationSecondsviewportDurationSeconds: numberRaw viewport duration in seconds represented by the current width and zoom.
viewportDurationTimeviewportDurationTime: RationalTimeRaw viewport duration represented by the current width and zoom.
viewportHeightviewportHeight: numberMeasured timeline viewport height in pixels.
viewportWidthviewportWidth: numberMeasured timeline viewport width in pixels.
visibleDurationSecondsvisibleDurationSeconds: numberVisible viewport duration in seconds for display-only UI.
visibleDurationTimevisibleDurationTime: RationalTimeVisible viewport duration, clamped to content bounds.
visibleEndSecondsvisibleEndSeconds: numberVisible viewport end time in seconds for display-only UI.
visibleEndTimevisibleEndTime: RationalTimeVisible viewport end time, clamped to content bounds.
visibleStartSecondsvisibleStartSeconds: numberVisible viewport start time in seconds for display-only UI.
visibleStartTimevisibleStartTime: RationalTimeVisible viewport start time.
zoomScalezoomScale: numberCurrent zoom scale in pixels per second.