Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ManevilleF committed Jul 12, 2024
1 parent 54f8bec commit a8ec83e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ For example you can pin some cloth vertices to the cloth entity's
`GlobalTransform`:

```rust
use bevy::color::{Color, palettes::css::*};
use bevy::color::{palettes::css::*, Color};
use bevy_silk::prelude::*;

let cloth = ClothBuilder::new()
Expand All @@ -116,8 +116,7 @@ For more anchoring options, for example to specify a custom entity to pin
the vertices to:

```rust
use bevy::prelude::*;
use bevy::color::palettes::css::*;
use bevy::{color::palettes::css::*, prelude::*};
use bevy_silk::prelude::*;

fn spawn(mut commands: Commands) {
Expand Down Expand Up @@ -149,7 +148,10 @@ fn spawn(mut commands: Commands) {
// Adds a single pinned vertex id
.with_anchored_vertex_id(10, anchor_to_self)
// Adds pinned vertex colors using an Iterator
.with_anchored_vertex_colors([Color::from(WHITE), Color::from(BLACK)].into_iter(), anchor_to_a)
.with_anchored_vertex_colors(
[Color::from(WHITE), Color::from(BLACK)].into_iter(),
anchor_to_a,
)
// Adds a single pinned vertex color
.with_anchored_vertex_color(Color::from(YELLOW), anchor_to_self)
// Adds pinned vertex positions
Expand Down
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
//! `GlobalTransform`:
//!
//! ```rust
//! use bevy::color::{Color, palettes::css::*};
//! use bevy::color::{palettes::css::*, Color};
//! use bevy_silk::prelude::*;
//!
//! let cloth = ClothBuilder::new()
Expand All @@ -105,8 +105,7 @@
//! the vertices to:
//!
//! ```rust
//! use bevy::prelude::*;
//! use bevy::color::palettes::css::*;
//! use bevy::{color::palettes::css::*, prelude::*};
//! use bevy_silk::prelude::*;
//!
//! fn spawn(mut commands: Commands) {
Expand Down Expand Up @@ -138,7 +137,10 @@
//! // Adds a single pinned vertex id
//! .with_anchored_vertex_id(10, anchor_to_self)
//! // Adds pinned vertex colors using an Iterator
//! .with_anchored_vertex_colors([Color::from(WHITE), Color::from(BLACK)].into_iter(), anchor_to_a)
//! .with_anchored_vertex_colors(
//! [Color::from(WHITE), Color::from(BLACK)].into_iter(),
//! anchor_to_a,
//! )
//! // Adds a single pinned vertex color
//! .with_anchored_vertex_color(Color::from(YELLOW), anchor_to_self)
//! // Adds pinned vertex positions
Expand Down

0 comments on commit a8ec83e

Please sign in to comment.