| Crates.io | rusty_skelform_macroquad |
| lib.rs | rusty_skelform_macroquad |
| version | 0.2.2 |
| created_at | 2025-07-08 02:14:42.5475+00 |
| updated_at | 2026-01-05 19:39:27.978943+00 |
| description | SkelForm Macroquad runtime |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1741971 |
| size | 1,127,498 |
Library for running SkelForm animations in Macroquad.
A basic character example is included in /examples.
in the /examples folder:
cargo run --example basic
use rusty_skelform_macroquad as skf_mq;
skf_mq::load() - loads .skf file and returns armature & textures, to be
used laterskf_mq::animate() - transforms the armature's bones based on the
animation(s)skf_mq::construct() - provides the bones from this armature that are ready
for useskf_mq::draw() - draws the bones on-screen, with the provided style(s)let (mut armature, textures) = skf_mq::load("armature.skf")
This should only be called once (eg; before main game loop), and armature and
textures should be kept for later use.
# use `skf_mq.time_frame()` to get the animation frame based on time (1000 = 1 second)
time: std::time::Instant = std::time::Instant::now();
let time_frame = skf_mq::time_frame(time, &armature.animations[0], false, true);
skf_mq::animate(
&mut armature.bones,
&vec![&armature.animations[0]],
&vec![time_frame],
&vec![0],
);
Note: not needed if armature is statilc
let options = skf_mq::ConstructOptions {
position: Vec2::new(screen_width()/2, screen_height()/2),
..Default::default()
};
let mut final_bones = skf_mq::construct(&armature, options);
Modifications to the armature (eg; aiming at cursor) may be done before or after construction.
skf_mq::draw(
&mut final_bones,
&textures,
&vec![&armature.styles[0]],
);