added more logs to test
This commit is contained in:
parent
8c4c736555
commit
81b4de3690
@ -11,6 +11,7 @@ mod utils;
|
|||||||
use animations::Animation;
|
use animations::Animation;
|
||||||
use r2d2::PooledConnection;
|
use r2d2::PooledConnection;
|
||||||
use utils::ApiResponse;
|
use utils::ApiResponse;
|
||||||
|
use render::Lerp;
|
||||||
|
|
||||||
use rocket::{State, serde::json::serde_json::json};
|
use rocket::{State, serde::json::serde_json::json};
|
||||||
|
|
||||||
@ -124,6 +125,10 @@ fn ligth_controll(
|
|||||||
render.remove_animation(ani.ok().unwrap());
|
render.remove_animation(ani.ok().unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
println!("aaa");
|
||||||
|
|
||||||
|
println!("aaa {}", 0.lerp(&255));
|
||||||
|
|
||||||
render.render();
|
render.render();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -298,13 +298,13 @@ impl Render {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
trait Lerp {
|
pub trait Lerp {
|
||||||
fn lerp(self, other: &Self) -> Self;
|
fn lerp(self, other: &Self) -> Self;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Lerp for u8 {
|
impl Lerp for u8 {
|
||||||
fn lerp(self, other: &Self) -> Self {
|
fn lerp(self, other: &Self) -> Self {
|
||||||
((self as f64) + (((*other as f64) - (self as f64)) * 0.2)) as u8
|
((self as f64) + (((*other as f64) - (self as f64)) * 0.1)) as u8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user