Skip to content

Itsyuka/osu-pp-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Osu Performance Calculator

Example

const request = require('request-promise');
const {Beatmap, Mods, Score} = require('osu-pp-calc');

async function main() {
	const beatmapOsu = await request.get(`https://osu.ppy.sh/osu/869222`);
	const beatmap = await Beatmap.read(beatmapOsu);
	const diffCalc = beatmap.difficultyCalculator(Mods.None);
	await diffCalc.calculate();
	const score = Score.from(beatmap);
	const ppCalc = diffCalc.performance(score);
	await ppCalc.calculate();
	console.log(
		'Calculated PP:', ppCalc.totalPerformanceValue.toFixed(2)
	);
}

main().then(e => proccess.exit()).catch(e => console.error(e))

License

Check the LICENSE file

Releases

No releases published

Packages

No packages published