Class

SnapIndex

Binary-searchable timeline snap target index.

Signature

Type Definition
Class SnapIndex

Properties

NameSignatureDescription
sizesize: numberNumber of targets currently indexed.

Constructors

NameSignatureDescription
constructorconstructor(): SnapIndexNo constructor summary yet.

Methods

NameSignatureDescription
buildbuild(targets: TimelineSnapTarget[]): voidRebuilds the index from a complete snap target list.
clearclear(): voidRemoves all indexed targets while retaining allocated storage for reuse.
findNearestfindNearest(time: RationalTime, thresholdSeconds: number): TimelineSnapResult | nullFinds the best target within a threshold.