diff --git a/assets/atlas.png b/assets/atlas.png new file mode 100644 index 0000000..4e572ad Binary files /dev/null and b/assets/atlas.png differ diff --git a/assets/atlas.svg b/assets/atlas.svg new file mode 100644 index 0000000..27d9b44 --- /dev/null +++ b/assets/atlas.svg @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/lofpara_atlas.rs b/src/lofpara_atlas.rs new file mode 100644 index 0000000..542b35f --- /dev/null +++ b/src/lofpara_atlas.rs @@ -0,0 +1,18 @@ +use bevy::prelude::*; + +#[derive(Resource)] +pub struct LofparaAtlas(TextureAtlasLayout); + +pub struct LofparaAtlasPlugin; + +impl Plugin for LofparaAtlasPlugin { + fn build(&self, app: &mut App) { + let mut atlas = TextureAtlasLayout::new_empty(UVec2::new(1920, 1080)); + //Card, index = 0 + atlas.add_texture(URect::new(0, 0, 258, 363)); + //Cardholder, index = 1 + atlas.add_texture(URect::new(259, 0, 166, 166)); + + app.insert_resource(LofparaAtlas(atlas)); + } +} diff --git a/src/main.rs b/src/main.rs index e7a11a9..cff54c9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,9 @@ +use bevy::prelude::*; + +use crate::lofpara_atlas::LofparaAtlasPlugin; + +mod lofpara_atlas; + fn main() { - println!("Hello, world!"); + App::new().add_plugins((DefaultPlugins, LofparaAtlasPlugin)); }