Skip to main content

Module physics

Module physics 

Source
Expand description

Per-OS physics constants used by the scroll, drag, and press primitives.

Values sourced from NSScrollView (macOS) and IInertiaProcessor (Windows); see PHYSICS.md.

Constantsยง

INERTIA_DECAY
Inertia decay (1/s). Higher = stops faster. Per-OS.
LINE_HEIGHT_PX
Lines-per-wheel-detent -> pixels conversion (used by the winit bridge to normalize MouseScrollDelta::LineDelta).
RUBBER_BAND_STIFFNESS
Rubber-band stiffness applied when scroll position exceeds bounds. Higher = stiffer pullback. Macs use rubber-band; Windows/Linux clamp.