Struct adi_screen::Sprite
[−]
[src]
#[must_use]pub struct Sprite(_);
Sprite represents anything that is rendered onto the screen.
Methods
impl Sprite
[src]
fn create(
window: &mut Window,
v: &[f32],
style: Style,
instances: u32
) -> Sprite
window: &mut Window,
v: &[f32],
style: Style,
instances: u32
) -> Sprite
Create a sprite. window is the window. v is sprite's vertices. Format: x, y, z, 1.0, r, g, b, a, Format: x, y, z, 1.0, texture coordinate x, texture coordinate y, 1.0, 1.0, style is the Style that will initially be applied to each of the sprite's instances. instances is the initial number of instances this sprite should have.
fn style(&self, window: &mut Window, i: usize, style: &Style)
Change the style of self to style for instance i.
fn vertices(&mut self, window: &mut Window, v: &[f32])
Change the vertices of self to v.