2 releases

0.1.1 Jan 8, 2020
0.1.0 Oct 12, 2019

#224 in Simulation

Apache-2.0

26KB
464 lines

Gravitas

Gravitas is a collection of equations for making UI elements move in response to touch gestures.

There are also implementations for Java and JavaScript (which has some interactive examples).


lib.rs:

Gravitas is a collection of equations for making UI elements move in response to touch gestures.

There are also implementations for Java and JavaScript (which has some interactive examples).

Each simulation models a single value and generally has a setup function that takes the initial position and velocity. Normally you would compute these in response to a touch gesture ending. All of the simulations are parametric over time and have been algebraically integrated (rather than using a numerical integration method at runtime). The advantage of algebraic integration is lower CPU overhead, and no odd behavior if frames are dropped.

No runtime deps