Changed default number of scenes and added utility methods to IconCreatorPlugin
This commit is contained in:
parent
1ff7a7a23e
commit
2e1e050f46
@ -2,7 +2,7 @@ use bevy::{app::{Plugin, Startup, Update}, math::Vec3};
|
|||||||
|
|
||||||
use crate::{created_icons::CreatedIcons, register_types::RegisterTypesPlugin, setup::setup_icon_creation_scenes, state::IconCreatorState, update::{update_give_work_to_scenes, update_icon_creator_scenes, update_replace_images_on_ui_images, update_set_render_layers_recursively}};
|
use crate::{created_icons::CreatedIcons, register_types::RegisterTypesPlugin, setup::setup_icon_creation_scenes, state::IconCreatorState, update::{update_give_work_to_scenes, update_icon_creator_scenes, update_replace_images_on_ui_images, update_set_render_layers_recursively}};
|
||||||
|
|
||||||
const DEFAULT_SCENES_AMOUNT: u8 = 1;
|
const DEFAULT_SCENES_AMOUNT: u8 = 2;
|
||||||
const DEFAULT_WORLD_POSITION_FOR_ROOT: Vec3 = Vec3 { x: 0.0, y: -300.0, z: 0.0 };
|
const DEFAULT_WORLD_POSITION_FOR_ROOT: Vec3 = Vec3 { x: 0.0, y: -300.0, z: 0.0 };
|
||||||
const DEFAULT_RENDER_LAYER: u8 = 21;
|
const DEFAULT_RENDER_LAYER: u8 = 21;
|
||||||
const DEFAULT_LIGHT_INTENSITY: f32 = 14_000.0;
|
const DEFAULT_LIGHT_INTENSITY: f32 = 14_000.0;
|
||||||
@ -13,7 +13,7 @@ pub struct IconCreatorPlugin {
|
|||||||
///
|
///
|
||||||
/// A higher value will mean more performance impact but more capacity to render multiple textures at once.
|
/// A higher value will mean more performance impact but more capacity to render multiple textures at once.
|
||||||
///
|
///
|
||||||
/// Default is 1
|
/// Default is 2
|
||||||
scenes: u8,
|
scenes: u8,
|
||||||
/// The global coordinates of the Root of the scenes.
|
/// The global coordinates of the Root of the scenes.
|
||||||
///
|
///
|
||||||
@ -58,4 +58,20 @@ impl IconCreatorPlugin {
|
|||||||
light_intensity,
|
light_intensity,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pub fn with_scenes(mut self, scenes: u8) -> Self {
|
||||||
|
self.scenes = scenes;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
pub fn with_world_pos(mut self, world_pos: Vec3) -> Self {
|
||||||
|
self.world_pos = world_pos;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
pub fn with_render_layer(mut self, render_layer: u8) -> Self {
|
||||||
|
self.render_layer = render_layer;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
pub fn with_light_intensity(mut self, light_intensity: f32) -> Self {
|
||||||
|
self.light_intensity = light_intensity;
|
||||||
|
self
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user