0.9.4 • Published 4 years ago
osu-parse v0.9.4
osu-parse
An ECMAScript 6 NPM module for parsing .OSU files into JSON.
Install
npm i osu-parse
Usage
// Require the module
const OSUJSON = require('osu-parse');
// Load the file to string however you like
const fs = require('fs');
let file = fs.readFileSync('./STYX_HELIX.osu', 'utf8');
// Then call 'ParseOSUFileAsync' it will return a promise for you to handle
let p = OSUJSON.ParseOSUFileAsync(file);
p.then(output => {
console.log(output);
})
.catch(err => {
throw new Error(err);
});
This is a fork from Slynchy/OSZLoader. In this fork, bezier curves passthrough points are stored in the same way, but as a list to account for multiple bezier passthroughs to properly parse complex shapes.