decodeFromPath ( decodePath ) // Do your stuff with score info and replay. Import from 'osu-parsers' const decodePath = 'path/to/your/file.osr' const decoder = new ScoreDecoder ( ) const encoder = new ScoreEncoder ( ) const score = await decoder. There is also a support for partial beatmap decoding which allows you to skip unnecessary sections. If you want to decode beatmap without storyboard, you can pass false as the second parameter to any of the methods. There are 4 ways to read data using this decoders:īy default, beatmap decoder will decode both beatmap and storyboard. To get correct beatmap data, beatmap objects should be converted using one of the supported rulesets. Note that plain beatmap objects can't be used to get max combo, star rating and performance as they don't have ruleset specific data. osu files and convert them to the objects of plain Beatmap type. osr - fully supported (decoding/encoding)īeatmap decoder is used to read. osb - fully supported (decoding/encoding) osu - fully supported (decoding/encoding) This package comes with built-in LZMA codec as it is required for replay processing.Īll classes and their typings can be found in osu-classes package which is a peer dependency and must be installed separately.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
September 2023
Categories |