chore(deps): upgrade Bevy 0.13 → 0.18

Three major versions of breaking changes:
- Bundles → Required Components (SpriteBundle, NodeBundle, ButtonBundle,
  TextBundle, Camera2dBundle removed; spawn tuples of components instead)
- Style merged into Node; TextStyle split into TextFont + TextColor
- Color API: rgb/rgba → srgb/srgba; Color::Rgba pattern matching replaced
  with .alpha()/.set_alpha(); .r()/.g()/.b() → .to_srgba().red/green/blue
- Time: delta_seconds() → delta_secs(); elapsed_seconds() → elapsed_secs()
- Query: get_single()/get_single_mut() → single()/single_mut() (now Result)
- Timer::finished() → Timer::is_finished()
- despawn_recursive() removed (despawn() is now recursive); despawn_descendants()
  removed — replaced with Children query iteration
- BorderColor(c) → BorderColor::all(c)
- WindowResolution: From<(f32,f32)> removed → cast to (u32,u32)
- flake.nix: added wayland to runtime libs (default-on in 0.18)

Tests pass (8/8), clippy clean, headless render verified showing start
menu, button, starfield, and player ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harald Hoyer 2026-05-06 21:26:48 +02:00
parent 7a4305677b
commit b2b564f690
11 changed files with 2746 additions and 1028 deletions

View file

@ -37,12 +37,12 @@ pub const ENEMY_BULLET_PLAYER_COLLISION_THRESHOLD: f32 =
// Tractor beam constants
pub const TRACTOR_BEAM_WIDTH: f32 = 20.0;
pub const TRACTOR_BEAM_DURATION: f32 = 3.0;
pub const TRACTOR_BEAM_COLOR: Color = Color::rgba(0.5, 0.0, 0.8, 0.6);
pub const TRACTOR_BEAM_COLOR: Color = Color::srgba(0.5, 0.0, 0.8, 0.6);
pub const CAPTURE_DURATION: f32 = 10.0; // How long the player stays captured
// Tractor beam visual constants
pub const BEAM_GLOW_WIDTH: f32 = 40.0;
pub const BEAM_GLOW_COLOR: Color = Color::rgba(0.3, 0.0, 0.5, 0.25);
pub const BEAM_CORE_COLOR: Color = Color::rgba(0.7, 0.2, 1.0, 0.7);
pub const BEAM_GLOW_COLOR: Color = Color::srgba(0.3, 0.0, 0.5, 0.25);
pub const BEAM_CORE_COLOR: Color = Color::srgba(0.7, 0.2, 1.0, 0.7);
pub const BEAM_PULSE_FREQ: f32 = 3.0;
pub const BEAM_PULSE_AMPLITUDE: f32 = 0.15;
@ -58,4 +58,4 @@ pub const STAR_Z_DEPTH: f32 = -10.0; // Behind all game entities
pub const EXPLOSION_DURATION: f32 = 0.4;
pub const EXPLOSION_BASE_SIZE: Vec2 = Vec2::new(15.0, 15.0);
pub const EXPLOSION_MAX_SIZE: Vec2 = Vec2::new(50.0, 50.0);
pub const EXPLOSION_COLOR: Color = Color::rgba(1.0, 0.6, 0.1, 1.0);
pub const EXPLOSION_COLOR: Color = Color::srgba(1.0, 0.6, 0.1, 1.0);