Skip to main content

Crate rusty_skelform_macroquad

Crate rusty_skelform_macroquad 

Source
Expand description

SkelForm runtime for Macroquad.

§Usage

use macroquad::prelude::*;
use rusty_skelform_macroquad::{animate, load_skelform_armature};

#[macroquad::main("Demo")]
async fn main() {
    // Load SkelForm armature.
    let (armature, tex) = load_skelform_armature("path_to_export", 0);

    // Start a timer to use for the animation.
    let time = std::time::Instant::now();

    loop {
        // Play first animation.
        animate(&armature, &tex, 0, Some(time), true, true, None);

        next_frame().await;
    }
}

Note that animate() may have different parameters as of this publishing.

Structs§

ConstructOptions

Functions§

animate
Process bones to be used for animation(s).
construct
draw
Draw the provided bones with Macroquad.
load
Load a SkelForm armature. The file to load is the zip that is provided by SkelForm export.