update pastel fade

This commit is contained in:
Michael Sippel 2024-07-31 19:17:11 +02:00
parent c5ddb6fc4f
commit f8148462d2
Signed by: senvas
GPG key ID: 060F22F65102F95C

View file

@ -18,14 +18,15 @@ impl ColorGrid for PastelFade {
fn get(&self, p: &Vector2<f32>) -> Rgb<f32> {
let inputs = self.inputs.read().unwrap().clone();
let i = ( inputs.t.as_millis() as f32 / (inputs.wheel as f32*inputs.cycle_len.as_millis() as f32) ) % 1.0;
let i = ( 5.0 + 0.7 * inputs.t.as_millis() as f32 / (16.0*inputs.cycle_len.as_millis() as f32) ) % 1.0;
Rgb::from_color(
&Hsv::<f32, Turns<f32>>::new(
Turns( i ),
0.5,
1.0
0.8
)
)
}
}