diff --git a/src/vvlib/mod.rs b/src/vvlib/mod.rs index 09e8632..b6f55d0 100644 --- a/src/vvlib/mod.rs +++ b/src/vvlib/mod.rs @@ -34,6 +34,12 @@ pub mod intersections; pub mod obb; pub mod octtree; +pub const RANDOM_SPACE: f32 = 25.; // size of the random possibility space. +pub const INTERVAL: f32 = 0.3; // how often to add ^ that many and remove ^ that many random locations +pub const SCALE_OF_FIELD: f32 = 0.05; // how big to make the oct-tree render +pub const ADDITION_THROTTLE: usize = 5; // divided by total to edit to nerf addition so there are a notable amount of empty spaces (makes the shape more interesting, higher it is) +pub const TOTAL_TO_EDIT: usize = 100_000; // how many to initialize with, how many to add and how many to remove every interval + pub mod constants { use bevy::math::Vec3; pub const CORNER_3D: f32 = 0.866025; @@ -525,9 +531,9 @@ pub fn iterate_voxels( for (mut model, mut counter) in &mut query { let mut rng = rand::thread_rng(); while counter.count > 0 { - let x: f32 = rng.gen_range(-10.0..10.0); - let y: f32 = rng.gen_range(-10.0..10.0); - let z: f32 = rng.gen_range(-10.0..10.0); + let x: f32 = rng.gen_range(-RANDOM_SPACE..RANDOM_SPACE); + let y: f32 = rng.gen_range(-RANDOM_SPACE..RANDOM_SPACE); + let z: f32 = rng.gen_range(-RANDOM_SPACE..RANDOM_SPACE); let vec = Vec3::new(x.round(), y.round(), z.round()); let r: f32 = rng.gen_range(0.0..1.0); let g: f32 = rng.gen_range(0.0..1.0); @@ -547,22 +553,27 @@ pub fn occasional_change( time: Res