Skip to content

Repository files navigation

osu-pp

npm version

A pure-JavaScript osu pp calculator that supports different eras of the game.

bun install osu-pp

Usage

import { readFile } from "node:fs/promises";
import { calculateScore } from "osu-pp";

const beatmap = await readFile("./beatmap.osu", "utf8");

const result = calculateScore({
    beatmap,
    rework: "sep2022",
    score: {
        ruleset_id: 0,
        beatmap_id: 123456,
        mods: [{ acronym: "" }],
        total_score: 1_000_000,
        legacy_total_score: 1_000_000,
        accuracy: 98.5,
        max_combo: 850,
    },
});

console.log(result.performance_attributes.pp);

Development

Please read CONTRIBUTING.md for more information.

About

A pure-JavaScript osu pp calculator that supports different eras of the game.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages