lerp anyway
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Andre Henriques 2023-06-26 19:11:03 +01:00
parent 304a00f49b
commit 6a6e171f62

View File

@ -343,7 +343,14 @@ impl Render {
self.last = data.clone();
}
let lerp_data: Vec<RGB<f64>> = data
.iter()
.zip(&self.last)
.map(|(d, l)| l.lerp(d, delta as f64))
.collect();
if (time - self.last_update) < 33 {
self.last = lerp_data;
return;
}
@ -351,11 +358,6 @@ impl Render {
self.last_update = time;
let lerp_data: Vec<RGB<f64>> = data
.iter()
.zip(&self.last)
.map(|(d, l)| l.lerp(d, delta as f64))
.collect();
//println!("d:{:?}\n l:{:?}", data[25], lerp_data[25]);