[][src]Trait valora::Artist

pub trait Artist: Sized {
    fn setup(gpu: Gpu, world: World, rng: &mut StdRng) -> Result<Self>;
fn paint(&mut self, ctx: Context, canvas: &mut Canvas); }

A trait for types which paint canvases.

Required methods

fn setup(gpu: Gpu, world: World, rng: &mut StdRng) -> Result<Self>

Constructs the artist.

This would be a place to compile any GLSL or construct any expensive resources needed across the whole composition.

fn paint(&mut self, ctx: Context, canvas: &mut Canvas)

Paints a single frame.

Loading content...

Implementors

Loading content...