Skip to content

Commit

Permalink
Fix plugin initialization in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Nov 10, 2023
1 parent 071be54 commit 38bbb63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ use bevy_silk::prelude::*;

fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(ClothPlugin)
.add_plugins((DefaultPlugins, ClothPlugin))
// ... Add your resources and systems
.run();
}
Expand Down Expand Up @@ -170,14 +169,13 @@ use bevy_silk::prelude::*;

fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins((DefaultPlugins, ClothPlugin))
.insert_resource(ClothConfig {
gravity: Vec3::new(0.0, -9.81, 0.0),
friction: 0.02,
sticks_computation_depth: 5,
acceleration_smoothing: AccelerationSmoothing::default()
})
.add_plugin(ClothPlugin)
// ... Add your resources and systems
.run();
}
Expand All @@ -203,7 +201,7 @@ use bevy_silk::prelude::*;

fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins((DefaultPlugins, ClothPlugin))
.insert_resource(Winds {
wind_forces: vec![Wind::SinWave {
max_velocity: Vec3::new(10.0, 15.0, -5.0),
Expand All @@ -212,7 +210,6 @@ fn main() {
abs: false
}]
})
.add_plugin(ClothPlugin)
// ... Add your resources and systems
.run();
}
Expand Down
9 changes: 3 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
//!
//! fn main() {
//! App::new()
//! .add_plugins(DefaultPlugins)
//! .add_plugin(ClothPlugin)
//! .add_plugins((DefaultPlugins, ClothPlugin))
//! // ... Add your resources and systems
//! .run();
//! }
Expand Down Expand Up @@ -161,14 +160,13 @@
//!
//! fn main() {
//! App::new()
//! .add_plugins(DefaultPlugins)
//! .add_plugins((DefaultPlugins, ClothPlugin))
//! .insert_resource(ClothConfig {
//! gravity: Vec3::new(0.0, -9.81, 0.0),
//! friction: 0.02,
//! sticks_computation_depth: 5,
//! acceleration_smoothing: AccelerationSmoothing::default()
//! })
//! .add_plugin(ClothPlugin)
//! // ... Add your resources and systems
//! .run();
//! }
Expand All @@ -194,7 +192,7 @@
//!
//! fn main() {
//! App::new()
//! .add_plugins(DefaultPlugins)
//! .add_plugins((DefaultPlugins, ClothPlugin))
//! .insert_resource(Winds {
//! wind_forces: vec![Wind::SinWave {
//! max_velocity: Vec3::new(10.0, 15.0, -5.0),
Expand All @@ -203,7 +201,6 @@
//! abs: false
//! }]
//! })
//! .add_plugin(ClothPlugin)
//! // ... Add your resources and systems
//! .run();
//! }
Expand Down

0 comments on commit 38bbb63

Please sign in to comment.