Skip to content

Commit

Permalink
Merge pull request #13 from johanhelsing/bevy-0.14
Browse files Browse the repository at this point in the history
Upgrade to bevy 0.14
  • Loading branch information
johanhelsing authored Jul 10, 2024
2 parents 5df134f + 7447ff2 commit 49a1ffd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ repository = "https://github.com/johanhelsing/noisy_bevy"
version = "0.6.0"

[dependencies]
bevy = { version = "0.13", default-features = false, features = [
bevy = { version = "0.14", default-features = false, features = [
"bevy_asset",
"bevy_render"
] }

[dev-dependencies]
bevy = { version = "0.13", default-features = false, features = [
bevy = { version = "0.14", default-features = false, features = [
"bevy_sprite",
"bevy_winit",
"x11", # github actions runners don't have libxkbcommon installed, so can't use wayland
] }
rand = "0.8"
bevy_egui = { version = "0.25", default-features = false, features = ["default_fonts"] }
bevy_pancam = { version = "0.11", features = ["bevy_egui"] }
bevy_egui = { version = "0.28", default-features = false, features = ["default_fonts"] }
bevy_pancam = { version = "0.12", features = ["bevy_egui"] }
insta = "1.21"
4 changes: 2 additions & 2 deletions assets/examples/asteroid_background.wgsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import noisy_bevy::fbm_simplex_2d_seeded
#import bevy_sprite::mesh2d_functions::{
get_model_matrix,
get_world_from_local,
mesh2d_position_local_to_clip,
}

Expand All @@ -25,7 +25,7 @@ struct VertexOutput {
fn vertex(vertex: Vertex) -> VertexOutput {
var out: VertexOutput;
// Project the world position of the mesh into screen position
let model = get_model_matrix(vertex.instance_index);
let model = get_world_from_local(vertex.instance_index);
out.clip_position = mesh2d_position_local_to_clip(model, vec4<f32>(vertex.position, 1.0));
out.object_position = vertex.position.xy;
return out;
Expand Down
2 changes: 1 addition & 1 deletion examples/asteroids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn expand_asteroids(
if ((x * x + y * y) as f32) < (params.radius + o).powi(2) {
asteroid.spawn(SpriteBundle {
sprite: Sprite {
color: Color::GRAY,
color: Color::WHITE.with_luminance(0.2),
custom_size: Some(Vec2::splat(1.)),
..default()
},
Expand Down
2 changes: 1 addition & 1 deletion examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn setup(mut commands: Commands) {
// spawn a corresponding tile with a color thats more white the higher the height
commands.spawn(SpriteBundle {
sprite: Sprite {
color: Color::WHITE * height * 0.03,
color: Color::WHITE.with_luminance(height * 0.03),
custom_size: Some(Vec2::splat(1.)),
..default()
},
Expand Down

0 comments on commit 49a1ffd

Please sign in to comment.