Expand description
Kinetic Momentum Scrolling, Touch Physics, Rubber-Banding, and Scrollbar Geometry.
Provides a 120 FPS inertial physics simulation with exponential velocity decay, critically damped overscroll spring recovery, and draggable scrollbar state machines.
Structs§
- Kinetic
Scroll Controller - Interactive 2D Kinetic Momentum Scroll Controller.
- Scroll
Axis - State machine for a single 1D scrolling dimension (horizontal or vertical).
Constants§
- DEFAULT_
FRICTION - Deceleration constant $\lambda$ for exponential velocity decay ($v(t) = v_0 e^{-\lambda t}$).
- REST_
VELOCITY_ THRESHOLD - Velocity cutoff threshold in pixels per second.
- RUBBER_
BAND_ MAX_ LIMIT - Maximum rubber-band displacement limit in pixels.
- SPRING_
DAMPING - Damped harmonic spring damping coefficient (critically damped: $2 \sqrt{k \cdot m}$).
- SPRING_
STIFFNESS - Damped harmonic spring stiffness coefficient for boundary snapback.