Skip to content

Commit

Permalink
Fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
tychedelia committed Aug 31, 2024
1 parent 2055d1d commit 7a9eb75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions bevy_nannou_draw/src/draw/instanced.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! A shader that renders a mesh multiple times in one draw call.

use bevy::render::mesh::allocator::MeshAllocator;
use bevy::render::mesh::RenderMeshBufferInfo;
use bevy::render::render_phase::ViewSortedRenderPhases;
use bevy::{
core_pipeline::core_3d::Transparent3d,
Expand All @@ -13,7 +15,7 @@ use bevy::{
prelude::*,
render::{
extract_component::{ExtractComponent, ExtractComponentPlugin},
mesh::{RenderMesh, MeshVertexBufferLayoutRef},
mesh::{MeshVertexBufferLayoutRef, RenderMesh},
render_asset::RenderAssets,
render_phase::{
AddRenderCommand, DrawFunctions, PhaseItem, PhaseItemExtraIndex, RenderCommand,
Expand All @@ -25,8 +27,6 @@ use bevy::{
Render, RenderApp, RenderSet,
},
};
use bevy::render::mesh::allocator::MeshAllocator;
use bevy::render::mesh::RenderMeshBufferInfo;
use bytemuck::{Pod, Zeroable};
use rayon::prelude::*;

Expand Down Expand Up @@ -167,7 +167,6 @@ fn queue_instanced(
) {
let draw_custom = transparent_3d_draw_functions.read().id::<DrawInstanced>();


for (view_entity, view, msaa) in &mut views {
let msaa_key = MeshPipelineKey::from_msaa_samples(msaa.samples());
let Some(transparent_phase) = transparent_render_phases.get_mut(&view_entity) else {
Expand Down
6 changes: 3 additions & 3 deletions nannou/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use bevy::input::mouse::MouseWheel;
use bevy::prelude::*;
use bevy::render::camera::RenderTarget;
use bevy::render::view::cursor::CursorIcon;
use bevy::render::view::RenderLayers;
use bevy::render::view::screenshot::{save_to_disk, Screenshot};
use bevy::render::view::RenderLayers;
use bevy::window::{CursorGrabMode, PrimaryWindow, WindowLevel, WindowMode, WindowRef};

use bevy_nannou::prelude::render::NannouCamera;
Expand Down Expand Up @@ -913,8 +913,8 @@ impl<'a, 'w> Window<'a, 'w> {
/// Saves a screenshot of the window to the given path.
pub fn save_screenshot<P: AsRef<Path> + 'static>(&mut self, path: P) {
let mut world = self.app.component_world_mut();
world.spawn(Screenshot::window(self.entity))
world
.spawn(Screenshot::window(self.entity))
.observe(save_to_disk(path));

}
}

0 comments on commit 7a9eb75

Please sign in to comment.