Initial Commit
This commit is contained in:
commit
20f333c931
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
env
|
||||
/target
|
||||
rustc-ice-*
|
||||
*.DS_Store
|
3961
Cargo.lock
generated
Normal file
3961
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
13
Cargo.toml
Normal file
13
Cargo.toml
Normal 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" }
|
3
src/lib.rs
Normal file
3
src/lib.rs
Normal file
@ -0,0 +1,3 @@
|
||||
mod markers;
|
||||
mod plugin;
|
||||
mod queue;
|
3
src/markers/mod.rs
Normal file
3
src/markers/mod.rs
Normal 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
39
src/plugin.rs
Normal 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
7
src/queue.rs
Normal file
@ -0,0 +1,7 @@
|
||||
use bevy::ecs::system::Resource;
|
||||
|
||||
|
||||
#[derive(Resource, Default, Debug, Clone)]
|
||||
pub struct IconCreatorQueue {
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user