Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ickshonpe/bevy_fixed_sprites
Bevy sprites that don't rotate or scale with their transform
https://github.com/ickshonpe/bevy_fixed_sprites
Last synced: 24 days ago
JSON representation
Bevy sprites that don't rotate or scale with their transform
- Host: GitHub
- URL: https://github.com/ickshonpe/bevy_fixed_sprites
- Owner: ickshonpe
- License: mit
- Created: 2022-10-03T23:29:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-06T16:01:46.000Z (about 2 years ago)
- Last Synced: 2024-03-14T19:54:32.199Z (9 months ago)
- Language: Rust
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bevy_fixed_sprites
[![crates.io](https://img.shields.io/crates/v/bevy_fixed_sprites)](https://crates.io/crates/bevy_fixed_sprites)
[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/ickshonpe/bevy_fixed_sprites)
[![crates.io](https://img.shields.io/crates/d/bevy_fixed_sprites)](https://crates.io/crates/bevy_fixed_sprites)Bevy sprites that have their own transform independent of the bevy transform hierarchy.
![image](/assets/example.png)
Each sprite's `Transform` has the same scale and rotation.
Supports Bevy 0.8
#
### Cargo
```toml
[dependency]
bevy_fixed_sprites = 0.2
```### Plugin
You need to add the `FixedSpritePlugin` to your Bevy App before you can draw a
`FixedSprite````rust
use bevy_fixed_sprites::*;
app.add_plugin(FixedSpritesPlugin);
```### Usage
For bevy_fixed_sprites' equivalents to regular bevy sprites use:
* `bevy::sprite::Sprite` -> `bevy_fixed_sprites::FixedSprite`
* `bevy::sprite::SpriteBundle` -> `bevy_fixed_sprites::FixedSpriteBundle`
* `bevy::sprite::TextureAtlasSprite` -> `bevy_fixed_sprites::FixedTextureAtlasSprite`
* `bevy::sprite::SpriteSheetBundle` -> `bevy_fixed_sprites::FixedSpriteSheetBundle`### Examples
```
cargo run --example fixed_sprite
cargo run --example hierarchy
```