Skip to content

Commit 7420ba6

Browse files
committed
fmt
1 parent 25afe12 commit 7420ba6

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

crates/processing_render/src/geometry/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ pub fn end(
419419
.ok_or(ProcessingError::GeometryNotFound)?;
420420

421421
if let Some(mesh) = meshes.get(&geometry.handle) {
422-
println!("End geometry: {} vertices, {} indices",
422+
println!(
423+
"End geometry: {} vertices, {} indices",
423424
mesh.count_vertices(),
424425
mesh.indices().map(|i| i.len()).unwrap_or(0)
425426
);
@@ -438,7 +439,7 @@ pub fn sphere(
438439
let state = state_query
439440
.get(entity)
440441
.map_err(|_| ProcessingError::GraphicsNotFound)?;
441-
442+
442443
let geometry = state
443444
.running_geometry
444445
.as_ref()
@@ -480,7 +481,9 @@ pub fn sphere(
480481
{
481482
let normal_matrix = transform.matrix3;
482483
for normal in new_normals {
483-
let transformed = normal_matrix.mul_vec3(Vec3::from_array(*normal)).normalize();
484+
let transformed = normal_matrix
485+
.mul_vec3(Vec3::from_array(*normal))
486+
.normalize();
484487
normals.push(transformed.to_array());
485488
}
486489
}
@@ -528,7 +531,7 @@ pub fn sphere(
528531
// Need to upgrade to U32
529532
let existing: Vec<u32> = indices.iter().map(|&i| i as u32).collect();
530533
mesh.insert_indices(Indices::U32(
531-
existing.into_iter().chain(new_indices).collect()
534+
existing.into_iter().chain(new_indices).collect(),
532535
));
533536
} else {
534537
indices.extend(new_indices.iter().map(|&i| i as u16));
@@ -538,4 +541,4 @@ pub fn sphere(
538541
}
539542

540543
Ok(())
541-
}
544+
}

examples/particles.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod glfw;
22

33
use glfw::GlfwContext;
44
use processing::prelude::*;
5-
use processing_render::{render::command::DrawCommand};
5+
use processing_render::render::command::DrawCommand;
66

77
fn main() {
88
match sketch() {
@@ -39,13 +39,13 @@ fn sketch() -> error::Result<()> {
3939
graphics,
4040
DrawCommand::BackgroundColor(bevy::color::Color::srgb(0.1, 0.1, 0.15)),
4141
)?;
42-
42+
4343
geometry_begin(graphics)?;
44-
44+
4545
graphics_record_command(graphics, DrawCommand::PushMatrix)?;
4646
geometry_sphere(graphics, 10.)?;
4747
graphics_record_command(graphics, DrawCommand::PopMatrix)?;
48-
48+
4949
let geometry = geometry_end(graphics)?;
5050
graphics_record_command(graphics, DrawCommand::Geometry(geometry))?;
5151
graphics_end_draw(graphics)?;

0 commit comments

Comments
 (0)