mcut
@mcut/timeline

nearestSnapTarget

Generated TypeScript API reference for the public mcut SDK.

mcut SDK


mcut SDK / timeline/src / nearestSnapTarget

Function: nearestSnapTarget()

function nearestSnapTarget(
   timeMs,
   targets,
   thresholdMs): SnapTarget | null;

Defined in: packages/timeline/src/snap.ts:80

Nearest target to timeMs within thresholdMs (ties: the earlier one).

Parameters

timeMs

number

targets

readonly SnapTarget[]

thresholdMs

number

Returns

SnapTarget | null

On this page