diff --git a/bevy_nannou_draw/src/draw/mod.rs b/bevy_nannou_draw/src/draw/mod.rs index e4ca3846e..fc3df9c81 100644 --- a/bevy_nannou_draw/src/draw/mod.rs +++ b/bevy_nannou_draw/src/draw/mod.rs @@ -16,7 +16,7 @@ use bevy::utils::{HashMap, HashSet}; use lyon::path::PathEvent; use uuid::Uuid; -use crate::draw::instanced::{Instanced}; +use crate::draw::instanced::Instanced; use crate::draw::mesh::MeshExt; use crate::draw::render::RenderPrimitive; use crate::render::DefaultNannouMaterial; diff --git a/bevy_nannou_draw/src/render.rs b/bevy_nannou_draw/src/render.rs index 43372767d..5abc89b03 100644 --- a/bevy_nannou_draw/src/render.rs +++ b/bevy_nannou_draw/src/render.rs @@ -10,9 +10,11 @@ use bevy::render::extract_component::{ExtractComponent, ExtractComponentPlugin}; use bevy::render::extract_instances::ExtractInstancesPlugin; use bevy::render::extract_resource::{ExtractResource, ExtractResourcePlugin}; use bevy::render::render_asset::RenderAssetPlugin; -use bevy::render::{render_resource as wgpu, RenderApp}; -use bevy::render::render_resource::{AsBindGroup, BlendState, PolygonMode, SpecializedMeshPipelines}; +use bevy::render::render_resource::{ + AsBindGroup, BlendState, PolygonMode, SpecializedMeshPipelines, +}; use bevy::render::view::{NoFrustumCulling, RenderLayers}; +use bevy::render::{render_resource as wgpu, RenderApp}; use bevy::window::WindowRef; use lyon::lyon_tessellation::{FillTessellator, StrokeTessellator}; @@ -361,7 +363,7 @@ fn update_draw_mesh( let mesh = meshes.add(mesh); let mat_id = last_mat.expect("No material set for instanced draw command"); // TODO: off by one??? - for _ in range.start..range.end-1 { + for _ in range.start..range.end - 1 { commands.spawn(( UntypedMaterialId(mat_id), mesh.clone(), diff --git a/bevy_nannou_isf/src/asset.rs b/bevy_nannou_isf/src/asset.rs index b7427436d..46ed9804c 100644 --- a/bevy_nannou_isf/src/asset.rs +++ b/bevy_nannou_isf/src/asset.rs @@ -82,7 +82,6 @@ impl AssetLoader for IsfLoader { for (name, import) in &isf.imported { let image = load_context.load::(import.path.clone()); imported_images.insert(name.clone(), image); - } Ok(Isf { isf, diff --git a/examples/compute/game_of_life.rs b/examples/compute/game_of_life.rs index d4853d41a..c9e2ea536 100644 --- a/examples/compute/game_of_life.rs +++ b/examples/compute/game_of_life.rs @@ -1,7 +1,7 @@ mod particle_mouse; -use nannou::prelude::*; use nannou::prelude::bevy_render::texture::{ImageSampler, ImageSamplerDescriptor}; +use nannou::prelude::*; const DISPLAY_FACTOR: u32 = 4; const SIZE: (u32, u32) = (1280 / DISPLAY_FACTOR, 720 / DISPLAY_FACTOR); diff --git a/nannou/src/app.rs b/nannou/src/app.rs index 88f748a9f..a41d6a712 100644 --- a/nannou/src/app.rs +++ b/nannou/src/app.rs @@ -57,7 +57,7 @@ use crate::prelude::render::NannouMesh; use crate::prelude::NannouMaterialPlugin; use crate::render::{ compute::{Compute, ComputeModel, ComputePlugin, ComputeShaderHandle, ComputeState}, - NannouRenderNode, RenderApp, RenderPlugin + NannouRenderNode, RenderApp, RenderPlugin, }; use crate::window::WindowUserFunctions; use crate::{camera, geom, light, window}; @@ -252,13 +252,12 @@ where pub fn new(model: ModelFn) -> Self { let mut app = bevy::app::App::new(); app.add_plugins(( - DefaultPlugins - .set(WindowPlugin { - // Don't spawn a window by default, we'll handle this ourselves - primary_window: None, - exit_condition: ExitCondition::OnAllClosed, - ..default() - }), + DefaultPlugins.set(WindowPlugin { + // Don't spawn a window by default, we'll handle this ourselves + primary_window: None, + exit_condition: ExitCondition::OnAllClosed, + ..default() + }), #[cfg(feature = "egui")] bevy_egui::EguiPlugin, NannouPlugin, diff --git a/nannou/src/prelude.rs b/nannou/src/prelude.rs index 42eb248bd..052c12cf4 100644 --- a/nannou/src/prelude.rs +++ b/nannou/src/prelude.rs @@ -9,8 +9,8 @@ pub use bevy::tasks::*; pub use bevy_egui::egui; pub use crate::frame::*; -pub use crate::render::*; pub use crate::render::compute::*; +pub use crate::render::*; pub use crate::wgpu; pub use crate::wgpu::util::{BufferInitDescriptor, DeviceExt}; pub use bevy_nannou::prelude::*; diff --git a/nannou/src/render/mod.rs b/nannou/src/render/mod.rs index 9002e95ef..9cefc5c37 100644 --- a/nannou/src/render/mod.rs +++ b/nannou/src/render/mod.rs @@ -7,8 +7,7 @@ use bevy::ecs::query::QueryItem; pub use bevy::prelude::*; use bevy::render::extract_resource::ExtractResource; use bevy::render::render_graph::{ - NodeRunError, RenderGraphApp, RenderGraphContext, RenderLabel, ViewNode, - ViewNodeRunner, + NodeRunError, RenderGraphApp, RenderGraphContext, RenderLabel, ViewNode, ViewNodeRunner, }; use bevy::render::render_resource::SpecializedComputePipeline; use bevy::render::renderer::RenderContext; @@ -144,4 +143,4 @@ where Ok(()) } -} \ No newline at end of file +}