rotsprite icon indicating copy to clipboard operation
rotsprite copied to clipboard

🔄 Rust library for sprite rotation

trafficstars

rotsprite

Build Status Crates.io Documentation License: AGPL-3.0-or-later Downloads

Documentation

Pixel Art rotation algorithms that works with many types of pixel buffers.

This library allows you to rotate pixel art using the rotsprite algorithm.

Feature Flags

blit

Implement the [crate::RotSprite] trait for [blit::BlitBuffer], making it easy to get a rotated copy of a blit buffer.

Large Small

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

Demos

WASM Demo

Web: https://tversteeg.nl/rotsprite

Uses the ["blit"] feature flag.

Local

cargo run --example window

Credits

RotSprite algorithm - Xenowhirl
Pixel Art - Redshrike