gymnasia 3.0.5

OpenAI Gymnasium environments in pure Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::render::draw::DrawList;

/// Environments that can produce a visual representation of their state.
///
/// [`DrawList`] is pure data with no rendering-backend dependency, so this
/// trait is always available regardless of feature flags.
pub trait Renderable {
    /// Produce draw commands representing the current visual state.
    /// The returned [`DrawList`] includes logical canvas width/height.
    fn draw_list(&self) -> DrawList;

    /// Target frames per second for human-mode display.
    fn render_fps(&self) -> u32 {
        30
    }
}