Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ten3roberts/ezy
Eazy to use tweening library for Rust
https://github.com/ten3roberts/ezy
Last synced: 27 days ago
JSON representation
Eazy to use tweening library for Rust
- Host: GitHub
- URL: https://github.com/ten3roberts/ezy
- Owner: ten3roberts
- Created: 2022-02-01T11:47:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-12T21:20:39.000Z (almost 3 years ago)
- Last Synced: 2024-11-11T23:43:46.829Z (about 1 month ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ezy
## Ezy
Rust eazy to use tweening library
Tweens are created separate from instantiation, which fixes the *jump* at the
start if the tween start does not match the current value.The trait [Lerp](crate::Lerp) describes how a value is interpolated.
If feature `glam` is enabled, `Lerp` is available for Vec and Quat (using Slerp)
### Example
```rust
use std::time::Duration;
use ezy::*;
let mut val = 0.0;// Go to `1.0` under 2 seconds
let tween = Tween::new(1.0, Duration::from_secs(2))let mut anim = tween.start(val);
// Update tween
anim.progress(&mut val, Duration::from_millis(200))
```License: MIT