diff --git a/demo/.DS_Store b/demo/.DS_Store index 3f28a4c..bcf4d3f 100644 Binary files a/demo/.DS_Store and b/demo/.DS_Store differ diff --git a/demo/Cargo.toml b/demo/Cargo.toml index 1462778..c611347 100644 --- a/demo/Cargo.toml +++ b/demo/Cargo.toml @@ -12,6 +12,10 @@ bevy_egui = "0.25.0" egui = "0.26.2" egui-gizmo = { path = ".." } +[dependencies.bevy_infinite_grid] +git = "https://github.com/XYCaptain/bevy_infinite_grid.git" +rev = "1e5259a52a7dfaca65402c2c57c1d81c2bc443e9" + [dependencies.bevy_math] version = "0.12.1" features = ["mint"] diff --git a/demo/src/main.rs b/demo/src/main.rs index 0f3abb7..ffb4058 100644 --- a/demo/src/main.rs +++ b/demo/src/main.rs @@ -3,6 +3,7 @@ use bevy::render::render_asset::RenderAssetUsages; use bevy::render::texture::{CompressedImageFormats, ImageFormat, ImageSampler, ImageType}; use bevy::window::PresentMode; use bevy_egui::{egui, EguiContexts, EguiPlugin}; +use bevy_infinite_grid::{InfiniteGridBundle, InfiniteGridPlugin, InfiniteGridSettings}; use egui::color_picker::Alpha; use egui::{pos2, Align2, Color32, FontId, LayerId, Ui, Widget}; @@ -29,6 +30,7 @@ fn main() { })) .insert_resource(ClearColor(Color::BLACK)) .add_plugins(EguiPlugin) + .add_plugins(InfiniteGridPlugin) .add_systems(Startup, setup) .add_systems(Startup, setup_camera) .add_systems(Update, update) @@ -82,14 +84,14 @@ fn setup( commands.insert_resource(AmbientLight { color: Color::WHITE, - brightness: 0.2, + brightness: 300., }); let cube_handle = meshes.add(Cuboid { half_size: Vec3::ONE, }); let cube_material_handle = materials.add(StandardMaterial { base_color_texture: Some(texture_handle.clone()), - unlit: true, + // unlit: true, ..default() }); @@ -102,6 +104,14 @@ fn setup( ..default() }, )); + + commands.spawn(InfiniteGridBundle { + settings: InfiniteGridSettings { + shadow_color: None, + ..default() + }, + ..default() + }); } fn update(