skspring-rs

Crates.ioskspring-rs
lib.rsskspring-rs
version0.1.0
sourcesrc
created_at2018-08-02 17:49:21.760792
updated_at2018-08-02 17:49:21.760792
descriptionPhysically-based damped springs model (for animation, mostly.)
homepage
repositoryhttps://github.com/Skrylar/skspring-rs
max_upload_size
id77167
size9,721
(Skrylar)

documentation

README

Physically Based Springs in Rust

A port of Ryan Juckett's damped spring models to Rust.

A DampedSpringController is created with_coefficients to specify the tension and angular velocity of a spring. The controller may then be used to update the position and velocity of any spring with similar characteristics.

Creating DampedSpringControllers requires solving differential equations for that particular model, so it is best to cache them for use by multiple springs of similar parameters.

Motivation

Damped spring models can be used in conjunction with interpolation systems to create fluid character animation out of few keyframes and a small amount of hand tuning:

https://www.gdcvault.com/play/1020583/Animation-Bootcamp-An-Indie-Approach

Physics-based animations are also useful for touch-based systems, as they allow the screen to appear more lifelike. Screens can be flung and rely on friction to slow them down, or spring models used to show toaster boxes or move scroll panels in to position.

Reference

http://www.ryanjuckett.com/programming/damped-springs/

Commit count: 6

cargo fmt