Interface

TimelineGeometry

Clip lookup and viewport geometry for a timeline engine.

Signature

Type Definition
Interface TimelineGeometry

Methods

NameSignatureDescription
getClipgetClip(clipId: string): TimelineClipEntry<string> | undefinedLocates a clip and returns its containing track and indexes.
getClipAtPointgetClipAtPoint(input: ClipHitTestInput): ClipHitTestResult | nullHit-tests timeline clips in viewport coordinates, matching canvas track layout. Clip bodies remain selectable even when their track is locked or the clip is non-editable; edge/body edit regions are only reported when the clip can be edited.
getClipRectgetClipRect(clipId: string, geometry: TimelineInteractionGeometry = {}): ClipViewportRect | nullReturns the current viewport rectangle for a clip, matching canvas track layout.
getClipRectsgetClipRects(options: TimelineInteractionGeometry = {}): TimelineClipRect<string>[]Returns viewport rectangles for every clip in track order. This is the canonical geometry source for DOM clip rendering and custom canvas layers. Pointer hit testing keeps a direct low-allocation path.
getTrackAtPointgetTrackAtPoint(input: TrackHitTestInput): TimelineTrackHitTestResult<string> | nullHit-tests timeline tracks in viewport coordinates, matching canvas layout.
getTrackRectsgetTrackRects(options: TimelineTrackGeometryOptions = {}): TimelineTrackRect[]Returns viewport rectangles for every track row in track order.
getVisibleTimelineClipsgetVisibleTimelineClips(options: VisibleTimelineClipOptions = {}): VisibleTimelineClip<string>[]Returns clips intersecting the current horizontal viewport, plus optional overscan. The returned visible ranges map clipped viewport pixels back to timeline and source-media times so custom renderers can draw cached thumbnails, waveforms, annotations, or heatmaps without duplicating timeline math.