cvkg-anim
cvkg-anim (Project Sleipnir) provides physics-based animation and transition systems for CVKG using a 4th-order Runge-Kutta (RK4) solver.
What This Crate Does
- Provides spring physics animation via
SleipnirSolver - Defines keyframe-based animations via
Animationenum - Implements rubber-banding physics for scroll/drag via
RubberBand - Provides motion controller for lifecycle events via
Motion
What This Crate Does NOT Do
- Does not provide rendering (see cvkg-render-gpu)
- Does not provide layout (see cvkg-layout)
- Does not handle user input directly
Public API Overview
SleipnirSolver
/// Spring parameters for physics-based animation
/// RK4 physics solver for spring animations
Animation Enum
RubberBand
/// Elastic resistance for scroll/drag boundaries
Motion Controller
/// Motion controller for lifecycle events
Usage Example
use ;
use Duration;
// Create a snappy spring animation
let params = snappy;
let mut solver = new;
// Animate over time at 60 FPS
let dt = 1.0 / 60.0;
for _ in 0..60
Known Limitations
- Solver assumes constant dt; variable framerates may produce inconsistent results
- No built-in animation sequencing; use
SequenceorParallelmanually - Keyframe interpolation uses linear easing only; no custom easing functions