~starkingdoms/starkingdoms

ref: d38879d908c92d0cf37432bf754340d4b58e05e4 starkingdoms/client/src/rendering/mod.rs -rw-r--r-- 287 bytes
d38879d9 — c0repwn3r [wip] spacetime build - add built spritesheets 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
use std::error::Error;
use async_trait::async_trait;

pub mod renderer;

#[async_trait]
pub trait Renderer {
    async fn get(canvas_element_id: &str) -> Result<Self, Box<dyn Error>> where Self: Sized;
    async fn render_frame(&self, time_delta_ms: f64) -> Result<(), Box<dyn Error>>;
}