Expand description
spring() — Rust port of Remotion’s spring animation.
Computes a physically-based spring animation value at a given frame.
Matches Remotion’s spring-utils.ts using constant-time frame evaluation
and bounded, thread-local settling-duration caches.
§Example
use rust_motion_animation::spring::{spring, SpringConfig};
let config = SpringConfig::default(); // damping=10, mass=1, stiffness=100
let value = spring(15, 30.0, config);
println!("frame 15 spring value: {value:.4}");Structs§
- Spring
Config - Configuration for the spring physics model.
- Spring
Options - Playback controls for
spring_with_options.
Enums§
- Spring
Error - Invalid input or a spring that cannot be evaluated within the work limit.
Functions§
- measure_
spring - Measure natural settling time using Remotion 4.0.495’s 20-frame rest window.
- spring
- Compute the spring value at
frame(0-indexed). - spring_
with_ options - Evaluate a spring with fractional/negative frames, range, delay and reversal.