A soon to be full fledged system to allow parsing of beatmaps in .osu (or JSON built in), difficulty and performance calculations.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js 8.3.0+
In your project add the dependency
npm i osu-bpdpc
and require inside your javascript file
const BPDPC = require('osu-bpdpc');
or for specific elements using selective require
const {Beatmap} = require('osu-bpdpc');
const {Beatmap, Osu: {DifficultyCalculator, PerformanceCalculator}} = require('osu-bpdpc')
const request = require('request-promise-native')
request.get('https://osu.ppy.sh/osu/1262832').then(osu => {
let beatmap = Beatmap.fromOsu(osu)
let score = {
maxcombo: 476,
count50: 0,
count100: 3,
count300: 337,
countMiss: 0,
countKatu: 2,
countGeki: 71,
perfect: 1,
mods: 88,
pp: 725.814
}
let diffCalc = DifficultyCalculator.use(beatmap).setMods(score.mods).calculate()
let perfCalc = PerformanceCalculator.use(diffCalc).calculate(score)
console.log(perfCalc.totalPerformance)
})
This project is licensed under the MIT License - see the LICENSE file for details