Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bevy 0.14 #17

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Bevy 0.14 (#17)
* Physics improvements (#16)

## 0.8.0

* Bevy 0.13 support (#15)
Expand Down
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,22 @@ debug = ["bevy/bevy_gizmos", "bevy/bevy_render"]
[dependencies]

[dependencies.bevy]
version = "0.13"
version = "0.14"
default-features = false

[dev-dependencies]

[dev-dependencies.bevy]
version = "0.13"
version = "0.14"
features = [
"bevy_render",
"bevy_winit",
"bevy_color",
"bevy_core_pipeline",
"bevy_sprite",
"bevy_pbr",
"x11",
"multi-threaded",
"multi_threaded",
"tonemapping_luts",
# Faster compilation
"dynamic_linking",
Expand Down
7 changes: 5 additions & 2 deletions examples/2d_cloth.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use bevy::prelude::*;
use bevy::{
color::palettes::css::{RED, WHITE},
prelude::*,
};
use bevy_verlet::prelude::*;

fn main() {
Expand Down Expand Up @@ -27,7 +30,7 @@ fn setup(mut commands: Commands) {
let mut cmd = commands.spawn((
SpriteBundle {
sprite: Sprite {
color: if j == 0 { Color::RED } else { Color::WHITE },
color: if j == 0 { RED.into() } else { WHITE.into() },
custom_size: Some(Vec2::splat(10.)),
..Default::default()
},
Expand Down
9 changes: 6 additions & 3 deletions examples/3d_cloth.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use bevy::prelude::*;
use bevy::{
color::palettes::css::{RED, WHITE},
prelude::*,
};
use bevy_verlet::prelude::*;

fn main() {
Expand Down Expand Up @@ -29,8 +32,8 @@ fn setup(
transform: Transform::from_xyz(-50., 0., -50.).looking_at(Vec3::ZERO, Vec3::Y),
..Default::default()
});
let material = materials.add(Color::WHITE);
let fixed_material = materials.add(Color::RED);
let material = materials.add(Color::from(WHITE));
let fixed_material = materials.add(Color::from(RED));
let mesh = meshes.add(Cuboid::new(1., 1., 1.));
let stick_length: f32 = 2.;
let (origin_x, origin_y) = (-5., 10.);
Expand Down
13 changes: 8 additions & 5 deletions examples/3d_line.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use bevy::prelude::*;
use bevy::{
color::palettes::css::{RED, WHITE},
prelude::*,
};
use bevy_verlet::prelude::*;

fn main() {
Expand Down Expand Up @@ -32,8 +35,8 @@ fn setup_free_line(
mut materials: ResMut<Assets<StandardMaterial>>,
mut meshes: ResMut<Assets<Mesh>>,
) {
let material = materials.add(Color::WHITE);
let fixed_material = materials.add(Color::RED);
let material = materials.add(Color::from(WHITE));
let fixed_material = materials.add(Color::from(RED));
let mesh = meshes.add(Cuboid::new(1., 1., 1.));
let stick_length: f32 = 2.;
let points_count = 10;
Expand Down Expand Up @@ -71,8 +74,8 @@ fn setup_fixed_line(
mut materials: ResMut<Assets<StandardMaterial>>,
mut meshes: ResMut<Assets<Mesh>>,
) {
let material = materials.add(Color::WHITE);
let fixed_material = materials.add(Color::RED);
let material = materials.add(Color::from(WHITE));
let fixed_material = materials.add(Color::from(RED));
let mesh = meshes.add(Cuboid::new(1., 1., 1.));
let stick_length: f32 = 2.;
let points_count = 20;
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#![warn(
clippy::nursery,
clippy::pedantic,
clippy::unwrap_used,
nonstandard_style,
rustdoc::broken_intra_doc_links
)]
Expand Down Expand Up @@ -69,6 +70,7 @@ use systems::{
pub mod prelude {
pub use crate::{components::*, config::*, VerletPlugin};
}

/// Plugin for Verlet physics
#[derive(Debug, Copy, Clone, Default)]
pub struct VerletPlugin {
Expand Down
Loading