feat: improve tractor beam visual with 2-layer glow and pulse animation
Replace the single static rectangle with a 2-layer beam (outer glow + inner core) and sinusoidal opacity pulse. Add per-frame beam height tracking to follow boss position. Include 8 unit tests for pure math functions (beam height calculation, pulse alpha). Refs: GAL-33
This commit is contained in:
parent
db061820b9
commit
52b0919d3f
4 changed files with 375 additions and 162 deletions
|
|
@ -39,6 +39,12 @@ 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 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_PULSE_FREQ: f32 = 3.0;
|
||||
pub const BEAM_PULSE_AMPLITUDE: f32 = 0.15;
|
||||
|
||||
// Starfield constants
|
||||
pub const STAR_COUNT: usize = 150;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue