From 38bbb6376211e91bf5a3ee07e06904a2c643bbca Mon Sep 17 00:00:00 2001 From: Joona Aalto Date: Fri, 10 Nov 2023 19:56:24 +0200 Subject: [PATCH] Fix plugin initialization in docs --- README.md | 9 +++------ src/lib.rs | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d9d7685..a8a764c 100644 --- a/README.md +++ b/README.md @@ -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(); } @@ -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(); } @@ -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), @@ -212,7 +210,6 @@ fn main() { abs: false }] }) - .add_plugin(ClothPlugin) // ... Add your resources and systems .run(); } diff --git a/src/lib.rs b/src/lib.rs index a331de9..c39c5ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,8 +37,7 @@ //! //! fn main() { //! App::new() -//! .add_plugins(DefaultPlugins) -//! .add_plugin(ClothPlugin) +//! .add_plugins((DefaultPlugins, ClothPlugin)) //! // ... Add your resources and systems //! .run(); //! } @@ -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(); //! } @@ -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), @@ -203,7 +201,6 @@ //! abs: false //! }] //! }) -//! .add_plugin(ClothPlugin) //! // ... Add your resources and systems //! .run(); //! }