ISample
interface
Internal
Internal data-point shape used by the velocity composable. A sample records a timestamp (t) and a distance (d) to compute pointer velocity for inertia-scroll calculations.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- trequirednumber
- Timestamp of the sample in milliseconds (typically performance.now()).
- drequirednumber
- Distance covered (in pixels) since the previous sample — used to derive instantaneous velocity.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
ISample in the velocity composable context