mirror of
https://github.com/eliasstepanik/voxel-simulation.git
synced 2026-01-11 13:58:30 +00:00
Last small fixes
This commit is contained in:
parent
13a0b54364
commit
d93063a8ba
@ -29,7 +29,7 @@ pub fn setup(
|
|||||||
SphereMeshBuilder::new(radius, SphereKind::Ico { subdivisions: 100 })
|
SphereMeshBuilder::new(radius, SphereKind::Ico { subdivisions: 100 })
|
||||||
.build(),
|
.build(),
|
||||||
);
|
);
|
||||||
let material_handle = materials.add(StandardMaterial::from(Color::rgb(0.3, 0.6, 1.0)));
|
let material_handle = materials.add(StandardMaterial::from(Color::srgb(0.3, 0.6, 1.0)));
|
||||||
|
|
||||||
commands.entity(root.0).with_children(|parent| {
|
commands.entity(root.0).with_children(|parent| {
|
||||||
parent.spawn((
|
parent.spawn((
|
||||||
|
|||||||
@ -30,10 +30,10 @@ pub fn setup(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let mut tree = SparseVoxelOctree::new(octree_depth, octree_base_size, false, false, false);
|
let mut tree = SparseVoxelOctree::new(octree_depth, octree_base_size, false, false, false);
|
||||||
let color = Color::rgb(0.2, 0.8, 0.2);
|
let color = Color::srgb(0.2, 0.8, 0.2);
|
||||||
// How many random spheres?
|
// How many random spheres?
|
||||||
/*const NUM_SPHERES: usize = 5;
|
/*const NUM_SPHERES: usize = 5;
|
||||||
let mut rng = thread_rng();
|
let mut rng = threald_rng();
|
||||||
|
|
||||||
for _ in 0..NUM_SPHERES {
|
for _ in 0..NUM_SPHERES {
|
||||||
let center = Vec3::new(
|
let center = Vec3::new(
|
||||||
|
|||||||
@ -15,7 +15,7 @@ pub fn visualize_octree_system(
|
|||||||
gizmos.cuboid(
|
gizmos.cuboid(
|
||||||
Transform::from_translation(octree_tf.translation)
|
Transform::from_translation(octree_tf.translation)
|
||||||
.with_scale(Vec3::splat(octree.size)),
|
.with_scale(Vec3::splat(octree.size)),
|
||||||
Color::rgba(1.0, 1.0, 0.0, 0.15),
|
Color::srgba(1.0, 1.0, 0.0, 0.15),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Recursively draw children:
|
// Recursively draw children:
|
||||||
@ -62,7 +62,7 @@ fn visualize_recursive_center(
|
|||||||
// Draw the child bounding box
|
// Draw the child bounding box
|
||||||
gizmos.cuboid(
|
gizmos.cuboid(
|
||||||
Transform::from_translation(child_center).with_scale(Vec3::splat(child_size)),
|
Transform::from_translation(child_center).with_scale(Vec3::splat(child_size)),
|
||||||
Color::rgba(0.5, 1.0, 0.5, 0.15), // greenish
|
Color::srgba(0.5, 1.0, 0.5, 0.15), // greenish
|
||||||
);
|
);
|
||||||
|
|
||||||
// Recurse
|
// Recurse
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
use crate::plugins::ui::systems::ui_system::*;
|
use crate::plugins::ui::systems::ui_system::*;
|
||||||
use bevy::app::{App, FixedUpdate, Plugin, PreUpdate, Startup};
|
use bevy::app::{App, FixedUpdate, Plugin, PreUpdate, Startup};
|
||||||
use bevy::prelude::IntoSystemConfigs;
|
|
||||||
|
|
||||||
pub struct UiPlugin;
|
pub struct UiPlugin;
|
||||||
impl Plugin for UiPlugin {
|
impl Plugin for UiPlugin {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user