render: add a frame parameter to all shaders
This commit is contained in:
@@ -21,8 +21,8 @@ struct IdleShader {
|
||||
}
|
||||
|
||||
impl Shader for IdleShader {
|
||||
fn draw(&self, coords: &VirtualCoordinates) -> RGB8 {
|
||||
Hsv::new_srgb(self.frame.wrapping_add(coords.x).wrapping_add(coords.y), 255, 255).into_rgb8()
|
||||
fn draw(&self, coords: &VirtualCoordinates, frame: u8) -> RGB8 {
|
||||
Hsv::new_srgb(frame.wrapping_add(coords.x).wrapping_add(coords.y), 255, 255).into_rgb8()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ struct TestShader {
|
||||
}
|
||||
|
||||
impl Shader for TestShader {
|
||||
fn draw(&self, coords: &VirtualCoordinates) -> RGB8 {
|
||||
fn draw(&self, coords: &VirtualCoordinates, _frame: usize) -> RGB8 {
|
||||
match self.pattern {
|
||||
Pattern::Red => RGB8::new(255, 0, 0),
|
||||
Pattern::Green => RGB8::new(0, 255, 0),
|
||||
|
Reference in New Issue
Block a user