use std::error::Error;
use async_trait::async_trait;
#[cfg(all(feature = "renderer-playercentric", feature = "renderer-canvascentric"))]
compile_error!("Mutually exclusive features renderer-playercentric and renderer-canvascentric selected");
#[cfg(not(any(feature = "renderer-playercentric", feature = "renderer-canvascentric")))]
compile_error!("Required feature renderer not selected");
#[cfg(feature = "renderer-canvascentric")]
#[path = "renderer_canvascentric.rs"]
pub mod renderer;
#[cfg(feature = "renderer-playercentric")]
#[path = "renderer_playercentric.rs"]
pub mod renderer;
pub mod util;
#[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>>;
}