# Bevy Mod Transform2d [![Crates.io](https://img.shields.io/crates/v/bevy_mod_transform2d.svg)](https://crates.io/crates/bevy_mod_transform2d) ![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg) A 2D Transform component for [Bevy](https://github.com/bevyengine/bevy). ## Usage Run `cargo add bevy_mod_transform2d`. Or add the dependency to your `Cargo.toml` ```toml [dependencies] bevy_mod_transform2d = "0.6" ``` Example: ```rust use bevy::prelude::*; use bevy_mod_transform2d::prelude::*; fn main() { App::new() .add_plugins(( DefaultPlugins, // Add the Transform2dPlugin Transform2dPlugin, )) .add_systems(Startup, setup) .add_systems(Update, orbit) .run(); } fn setup(mut commands: Commands) { commands.spawn(Camera2dBundle::default()); commands.spawn(( SpriteBundle { sprite: Sprite { custom_size: Some(Vec2::splat(50.)), ..default() }, ..default() }, // Add a Transform2d component Transform2d::from_xy(200., 0.), )); } // Make the sprite orbit the center fn orbit(mut query: Query<&mut Transform2d, With>, time: Res