Skip to content

Commit

Permalink
Fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
tychedelia committed Sep 7, 2024
1 parent 62c7c0e commit b97adf9
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bevy_nannou_draw/src/draw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 5 additions & 3 deletions bevy_nannou_draw/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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(),
Expand Down
1 change: 0 additions & 1 deletion bevy_nannou_isf/src/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ impl AssetLoader for IsfLoader {
for (name, import) in &isf.imported {
let image = load_context.load::<Image>(import.path.clone());
imported_images.insert(name.clone(), image);

}
Ok(Isf {
isf,
Expand Down
2 changes: 1 addition & 1 deletion examples/compute/game_of_life.rs
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
15 changes: 7 additions & 8 deletions nannou/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -252,13 +252,12 @@ where
pub fn new(model: ModelFn<M>) -> 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,
Expand Down
2 changes: 1 addition & 1 deletion nannou/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
5 changes: 2 additions & 3 deletions nannou/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -144,4 +143,4 @@ where

Ok(())
}
}
}

0 comments on commit b97adf9

Please sign in to comment.