Options
All
  • Public
  • Public/Protected
  • All
Menu

@kionell/osu-pp-calculator

Index

Functions

  • applyCustomCircleSize(beatmap: IBeatmap, mods: ModCombination, stats: IBeatmapCustomStats): void
  • Overwrites circle size of a beatmap with custom one.

    Parameters

    • beatmap: IBeatmap

      A beatmap.

    • mods: ModCombination

      Mod combination.

    • stats: IBeatmapCustomStats

      Custom difficulty stats.

    Returns void

  • Overwrites difficulty stats of a beatmap with custom difficulty stats.

    Parameters

    • beatmap: IBeatmap

      A beatmap.

    • mods: ModCombination

      Mod combination.

    • stats: IBeatmapCustomStats

      Custom difficulty stats.

    Returns void

  • Calculates difficulty attributes by ID, custom file or IBeatmap object.

    Parameters

    Returns DifficultyAttributes

    Calculated difficulty attributes.

  • Calculates difficulty attributes by ID, custom file or IBeatmap object.

    Parameters

    Returns PerformanceAttributes

    Calculated difficulty attributes.

  • createBeatmapInfo(beatmap?: IBeatmap, hash?: string): IBeatmapInfo
  • Converts IBeatmap object to beatmap information.

    Parameters

    • Optional beatmap: IBeatmap

      IBeatmap object.

    • Optional hash: string

      Beatmap MD5 hash.

    Returns IBeatmapInfo

    Converted beatmap info.

  • downloadFile(path?: string, options?: IDownloadEntryOptions): Promise<DownloadResult>
  • Downloads an osu! file by ID or URL.

    Parameters

    • Optional path: string

      Path to the file save location.

    • Optional options: IDownloadEntryOptions

      Download options.

    Returns Promise<DownloadResult>

    Download result.

  • getMaxCombo(beatmap?: IBeatmap): number
  • Tries to get max combo of a beatmap.

    Parameters

    • Optional beatmap: IBeatmap

      IBeatmap object.

    Returns number

    Max combo of a beatmap or 0.

  • getMods(beatmap?: IBeatmap): ModCombination | null
  • Tries to get mod combination from IBeatmap object.

    Parameters

    • Optional beatmap: IBeatmap

      IBeatmap object.

    Returns ModCombination | null

    Mod combination or null.

  • getRulesetById(rulesetId?: number): IRuleset
  • Creates a new ruleset instance by its ID.

    Parameters

    • Optional rulesetId: number

      Ruleset ID.

    Returns IRuleset

    Ruleset instance.

  • getRulesetIdByName(rulesetName?: string): GameMode
  • getTotalHits(beatmap?: IBeatmap): number
  • Calculates total hits of a beatmap.

    Parameters

    • Optional beatmap: IBeatmap

      IBeatmap object.

    Returns number

    Total hits of a beatmap or 0.

  • toCombination(input?: string | number, rulesetId?: number): ModCombination
  • Converts unknown input to mod combination.

    Parameters

    • Optional input: string | number

      Original input.

    • Optional rulesetId: number

      Target ruleset ID.

    Returns ModCombination

    Mod combination.

  • toDifficultyMods(mods?: string | number, rulesetId?: number): ModCombination
  • Filters mods from combination to get only difficulty mods.

    Parameters

    • Optional mods: string | number

      Original mods.

    • Optional rulesetId: number

      Target ruleset ID.

    Returns ModCombination

    Difficulty mods.

  • toScoreInfo(data?: IScoreInfo | IJsonableScoreInfo): ScoreInfo
  • Converts score information object to score information instance.

    Parameters

    • Optional data: IScoreInfo | IJsonableScoreInfo

    Returns ScoreInfo

    Converted score information.