pub struct ScrollPhysics {
pub boundary: ScrollBoundaryMode,
pub snap_mode: ScrollSnapMode,
pub snap_extent: f32,
pub deceleration_per_ms: f32,
pub spring_omega: f32,
pub wheel_smooth_tau: f32,
}Expand description
Optional per-container scroll physics overrides (nv.scroll_physics, sparse, 0 B when absent).
Attach via nv_table: on any scroll container (VirtualList, paging carousel, bottom sheet)
to customize bounce, snapping, deceleration, return spring stiffness, or smooth-wheel easing
independently from ancestor containers.
Fields§
§boundary: ScrollBoundaryModeBoundary resistance override (Inherit | Clamp | Bounce).
snap_mode: ScrollSnapModeSnap-point mode override (Inherit | None | Page | FixedExtent).
snap_extent: f32Item extent in logical px for ScrollSnapMode::FixedExtent (<= 0.0 = inherit/viewport).
deceleration_per_ms: f32Per-millisecond momentum deceleration factor in (0.0, 1.0) (<= 0.0 = inherit).
spring_omega: f32Critically-damped return/snap spring angular frequency in rad/s (<= 0.0 = inherit).
wheel_smooth_tau: f32Smooth-wheel exponential easing time constant in seconds (< 0.0 = inherit; 0.0 = instant).
Implementations§
Source§impl ScrollPhysics
impl ScrollPhysics
Sourcepub const BOUNDARY: Prop<ScrollPhysics, ScrollBoundaryMode>
pub const BOUNDARY: Prop<ScrollPhysics, ScrollBoundaryMode>
Boundary resistance override (Inherit | Clamp | Bounce).
Sourcepub const SNAP_MODE: Prop<ScrollPhysics, ScrollSnapMode>
pub const SNAP_MODE: Prop<ScrollPhysics, ScrollSnapMode>
Snap-point mode override (Inherit | None | Page | FixedExtent).
Sourcepub const SNAP_EXTENT: Prop<ScrollPhysics, f32>
pub const SNAP_EXTENT: Prop<ScrollPhysics, f32>
Item extent in logical px for ScrollSnapMode::FixedExtent (<= 0.0 = inherit/viewport).
Sourcepub const DECELERATION_PER_MS: Prop<ScrollPhysics, f32>
pub const DECELERATION_PER_MS: Prop<ScrollPhysics, f32>
Per-millisecond momentum deceleration factor in (0.0, 1.0) (<= 0.0 = inherit).
Sourcepub const SPRING_OMEGA: Prop<ScrollPhysics, f32>
pub const SPRING_OMEGA: Prop<ScrollPhysics, f32>
Critically-damped return/snap spring angular frequency in rad/s (<= 0.0 = inherit).
Sourcepub const WHEEL_SMOOTH_TAU: Prop<ScrollPhysics, f32>
pub const WHEEL_SMOOTH_TAU: Prop<ScrollPhysics, f32>
Smooth-wheel exponential easing time constant in seconds (< 0.0 = inherit; 0.0 = instant).