#osu #decode #storyboard #parse #parser

rosu-storyboard

Library to de- and encode osu! storyboards

2 releases

0.1.1 Mar 11, 2024
0.1.0 Feb 27, 2024

#1336 in Parser implementations

Download history 130/week @ 2024-02-24 16/week @ 2024-03-02 155/week @ 2024-03-09 93/week @ 2024-03-16 6/week @ 2024-03-23 17/week @ 2024-03-30 1/week @ 2024-04-06

125 downloads per month

MIT license

79KB
2K SLoC

crates.io docs

rosu-storyboard

Library to de- and encode osu! storyboards.

Usage

Based on rosu-map's DecodeBeatmap trait, the Storyboard struct provides a way to decode .osu or .osb files.

use rosu_storyboard::Storyboard;
use rosu_storyboard::element::ElementKind;

let path = "./resources/Himeringo - Yotsuya-san ni Yoroshiku (RLC) [Winber1's Extreme].osu";
let storyboard = Storyboard::from_path(path).unwrap();

let first_bg_elem = &storyboard.layers["Background"].elements[0];
assert!(matches!(first_bg_elem.kind, ElementKind::Sprite(_)));

lib.rs:

Library to de- and encode osu! storyboards.

Usage

Based on rosu-map's DecodeBeatmap trait, the Storyboard struct provides a way to decode .osu or .osb files.

use rosu_storyboard::Storyboard;
use rosu_storyboard::element::ElementKind;

let path = "./resources/Himeringo - Yotsuya-san ni Yoroshiku (RLC) [Winber1's Extreme].osu";
let storyboard = Storyboard::from_path(path).unwrap();

let first_bg_elem = &storyboard.layers["Background"].elements[0];
assert!(matches!(first_bg_elem.kind, ElementKind::Sprite(_)));

Dependencies

~240KB