Skip to content

Commit

Permalink
Move vfx colors to color palette
Browse files Browse the repository at this point in the history
  • Loading branch information
haihala committed Jul 28, 2024
1 parent a823ee4 commit 16def05
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
18 changes: 11 additions & 7 deletions client/lib/src/assets/materials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ use bevy::{
render::render_resource::{AsBindGroup, ShaderRef},
};
use characters::FlashRequest;
use wag_core::{
BLOCK_EFFECT_BASE_COLOR, BLOCK_EFFECT_EDGE_COLOR, CLASH_SPARK_BASE_COLOR,
CLASH_SPARK_EDGE_COLOR, HIT_SPARK_BASE_COLOR, HIT_SPARK_EDGE_COLOR, HIT_SPARK_MID_COLOR,
};

#[derive(Asset, TypePath, AsBindGroup, Debug, Clone)]
pub struct HitSparkMaterial {
Expand All @@ -25,9 +29,9 @@ impl HitSparkMaterial {
impl Default for HitSparkMaterial {
fn default() -> Self {
Self {
edge_color: LinearRgba::rgb(1.0, 0.2, 0.05),
mid_color: LinearRgba::rgb(1.0, 1.0, 0.1),
base_color: LinearRgba::rgb(1.0, 1.0, 1.0),
edge_color: HIT_SPARK_EDGE_COLOR.into(),
mid_color: HIT_SPARK_MID_COLOR.into(),
base_color: HIT_SPARK_BASE_COLOR.into(),
start_time: 0.0,
}
}
Expand Down Expand Up @@ -62,8 +66,8 @@ impl BlockEffectMaterial {
impl Default for BlockEffectMaterial {
fn default() -> Self {
Self {
edge_color: LinearRgba::rgb(0.1, 0.2, 1.0),
base_color: LinearRgba::rgb(1.0, 1.0, 1.0),
edge_color: BLOCK_EFFECT_EDGE_COLOR.into(),
base_color: BLOCK_EFFECT_BASE_COLOR.into(),
speed: 1.5,
start_time: 0.0,
}
Expand Down Expand Up @@ -100,8 +104,8 @@ impl ClashSparkMaterial {
impl Default for ClashSparkMaterial {
fn default() -> Self {
Self {
edge_color: LinearRgba::rgb(0.9, 0.1, 0.9),
base_color: LinearRgba::rgb(1.0, 0.5, 1.0),
edge_color: CLASH_SPARK_EDGE_COLOR.into(),
base_color: CLASH_SPARK_BASE_COLOR.into(),
speed: 1.2,
start_time: 0.0,
}
Expand Down
11 changes: 11 additions & 0 deletions client/wag_core/src/color_palette.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ pub const HIT_FLASH_COLOR: Color = Color::WHITE;
pub const GI_PARRY_FLASH_COLOR: Color = Color::Srgba(ALICE_BLUE);
pub const TRACK_SPIKES_FLASH_COLOR: Color = Color::Srgba(YELLOW);

// Shader effects
pub const HIT_SPARK_BASE_COLOR: Color = Color::WHITE;
pub const HIT_SPARK_MID_COLOR: Color = Color::srgb(1.0, 1.0, 0.1);
pub const HIT_SPARK_EDGE_COLOR: Color = Color::srgb(1.0, 0.2, 0.05);

pub const BLOCK_EFFECT_BASE_COLOR: Color = Color::WHITE;
pub const BLOCK_EFFECT_EDGE_COLOR: Color = Color::srgb(0.1, 0.2, 1.0);

pub const CLASH_SPARK_BASE_COLOR: Color = Color::srgb(1.0, 0.5, 1.0);
pub const CLASH_SPARK_EDGE_COLOR: Color = Color::srgb(0.9, 0.1, 0.9);

// Player colors
pub const MIZUKI_ALT_SHIRT_COLOR: Color = Color::WHITE;
pub const MIZUKI_ALT_JEANS_COLOR: Color = Color::Srgba(MIDNIGHT_BLUE);
Expand Down

0 comments on commit 16def05

Please sign in to comment.