#rotation #sprite #blit #game

rotsprite

Rotate sprites using the rotsprite algorithm

5 releases

0.1.4 Apr 7, 2023
0.1.3 Feb 19, 2020
0.1.2 Feb 18, 2020
0.1.1 Feb 18, 2020
0.1.0 Feb 8, 2020

#74 in Rendering

Download history 10/week @ 2023-12-11 19/week @ 2023-12-18 1/week @ 2023-12-25 98/week @ 2024-01-08 43/week @ 2024-01-15 3/week @ 2024-01-22 29/week @ 2024-01-29 33/week @ 2024-02-05 38/week @ 2024-02-12 39/week @ 2024-02-19 63/week @ 2024-02-26 86/week @ 2024-03-04 91/week @ 2024-03-11 23/week @ 2024-03-18 67/week @ 2024-03-25

268 downloads per month
Used in 4 crates (3 directly)

AGPL-3.0-or-later

63KB
447 lines

rotsprite

Rust implementation/library of the RotSprite algorithm.

CI Version Rust Documentation License

Works with many types of pixel buffers.

Large Small

Left Picture Middle Picture Right Picture
Source Image Rotated 30° using RotSprite Rotated 30° using naive rotation

Example

Demos

WASM Demo

Web: https://tversteeg.nl/rotsprite/window

Uses the ["blit"] feature flag.

Local

cargo run --example window

Credits

RotSprite algorithm - Xenowhirl
Pixel Art - Redshrike

Dependencies

~2.5MB
~56K SLoC