0.8.0 • Published 6 years ago

pp-calculator v0.8.0

Weekly downloads
39
License
-
Repository
github
Last release
6 years ago

Osu Beatmap Parser, Difficulty and Performance Calculator

A soon to be full fledged system to allow parsing of beatmaps in .osu (or JSON built in), difficulty and performance calculations.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Node.js 8+

Installing

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');

Example

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)
})

License

This project is licensed under the MIT License - see the LICENSE file for details

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago