| Crates.io | portal_figure |
| lib.rs | portal_figure |
| version | 0.1.1 |
| created_at | 2025-11-27 07:43:04.796333+00 |
| updated_at | 2025-11-28 01:20:19.794053+00 |
| description | A library of data relating to figures from the Skylanders series of video games. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1953272 |
| size | 74,899 |
A library of data relating to figures from the Skylanders series of video games.
This crate is built from source: https://github.com/peabnuts123/libportalfigure
cargo add portal_figure
use portal_figure::{PORTAL_FIGURES, PortalFigure, SPYRO, find_figure};
fn main() {
// Use `find_figure()` to look up figure data by Figure ID + Variant ID
let figure: &PortalFigure = find_figure(0x1ce, 0x3000).expect("Couldn't find figure");
println!(
"{} (figure_id='0x{:x}') (variant_id='0x{:x}')",
figure.name, figure.figure_id, figure.variant_id
);
// Individually exported figure data
println!(
"Spyro (figure_id='0x{:x}') (variant_id='0x{:x}')",
SPYRO.figure_id, SPYRO.variant_id
);
// `PORTAL_FIGURES` is a &[PortalFigure] of all figures
let all_spyros = PORTAL_FIGURES
.iter()
.filter(|figure| figure.name.to_lowercase().contains("spyro"))
.collect::<Vec<&PortalFigure>>();
println!("All Spyro figures:");
for figure in all_spyros {
println!(
"{} (figure_id='0x{:x}') (variant_id='0x{:x}')",
figure.name, figure.figure_id, figure.variant_id
);
}
}