#[non_exhaustive]pub struct RenderFrame {
pub camera: Camera2D,
pub clear: Color,
pub sprites: Vec<SpriteDraw>,
pub tile_layers: Vec<TileLayerDraw>,
pub texts: TextList,
pub ui: UiList,
pub time: Duration,
}Expand description
Everything the renderer draws in a frame. Keep one and clear it each frame, so that its lists keep their capacity.
It is #[non_exhaustive], so that the fields that come with later tasks
break nothing: make it with RenderFrame::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.camera: Camera2DThe view of the world.
clear: ColorThe background, and the color of the bars around an upscaled image.
sprites: Vec<SpriteDraw>The sprites of the world, in any order.
tile_layers: Vec<TileLayerDraw>The tile layers of the world, in any order: each in the
TileLayers the renderer is given.
texts: TextListThe texts of the world, in any order.
ui: UiListThe UI: sprites and texts drawn on the output after the world is
scaled up into it, each in its UiView’s scale and
clip, by layer and depth and then in the order they are pushed.
time: DurationThe time animated tiles show. The shader reads it in whole milliseconds, which wrap after 2^32 (49.7 days).