Initial Commit

This commit is contained in:
Franklin 2024-03-22 12:25:42 +01:00
commit 20f333c931
8 changed files with 4035 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
env
/target
rustc-ice-*
*.DS_Store

3961
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

13
Cargo.toml Normal file
View File

@ -0,0 +1,13 @@
[package]
name = "bevy_icon_creator"
version = "0.1.0"
edition = "2021"
authors = ["Franklin E. Blanco"]
description = "A plugin to automatically create Icons from entities in bevy"
license = "MIT"
readme = "README.md"
[lib]
[dependencies]
bevy = { version = "0.13.1" }

5
Readme.md Normal file
View File

@ -0,0 +1,5 @@
# bevy_icon_creator
by Franklin E. Blanco
## A

3
src/lib.rs Normal file
View File

@ -0,0 +1,3 @@
mod markers;
mod plugin;
mod queue;

3
src/markers/mod.rs Normal file
View File

@ -0,0 +1,3 @@
/// The root of all the scenes that will be generated from this plugin.
pub struct IconCreatorRootMarker;

39
src/plugin.rs Normal file
View File

@ -0,0 +1,39 @@
use bevy::{app::Plugin, math::Vec3};
const DEFAULT_WORLD_POSITION_FOR_ROOT: Vec3 = Vec3 { x: 4000.0, y: -300.0, z: 4000.0 };
/// Either use `IconCreatorPlugin::default()` or `IconCreatorPlugin::with_config(scenes)`
pub struct IconCreatorPlugin {
/// Value indicating the amount of scenes that this library will create to be able to generate textures.
///
/// A higher value will mean more performance impact but more capacity to render multiple textures at once.
///
/// Default is 1
scenes: u8,
/// The global coordinates of the Root of the scenes.
///
/// Default is Vec3 { x: 4000.0, y: -300.0, z: 4000.0 }
world_pos: Vec3,
}
impl Default for IconCreatorPlugin {
fn default() -> Self {
Self { scenes: 1, world_pos: DEFAULT_WORLD_POSITION_FOR_ROOT }
}
}
impl IconCreatorPlugin {
pub fn with_config(scenes: u8, world_pos: Vec3) -> Self {
Self {
scenes,
world_pos,
}
}
}
impl Plugin for IconCreatorPlugin {
fn build(&self, app: &mut bevy::prelude::App) {
}
}

7
src/queue.rs Normal file
View File

@ -0,0 +1,7 @@
use bevy::ecs::system::Resource;
#[derive(Resource, Default, Debug, Clone)]
pub struct IconCreatorQueue {
}