Calculate actual timing windows

This commit is contained in:
nise.moe 2024-03-10 15:59:33 +01:00
parent f6db550edb
commit 19e48b1e79

View File

@ -1,7 +1,7 @@
import { Vector2 } from "osu-classes";
import {Vector2} from "osu-classes";
import p5 from "p5";
import { loadImageAsync } from "@/utils";
import { Md5 } from "ts-md5";
import {loadImageAsync} from "@/utils";
import {Md5} from "ts-md5";
import {Judgements, OsuRenderer} from "@/osu/OsuRenderer";
export class Drawer {
@ -69,11 +69,10 @@ export class Drawer {
let width = 512;
let height = 384;
// TODO: Calculate real values
// @https://osu.ppy.sh/wiki/en/Beatmap/Overall_difficulty
let hitWindow300 = 50;
let hitWindow100 = 100;
let hitWindow50 = 150;
let hitWindow300 = 80 - 6 * OsuRenderer.beatmap.difficulty.overallDifficulty;
let hitWindow100 = 140 - 8 * OsuRenderer.beatmap.difficulty.overallDifficulty;
let hitWindow50 = 200 - 10 * OsuRenderer.beatmap.difficulty.overallDifficulty;
let barWidth = 512 * 0.8; // Width of the error bar, 80% of canvas width
let barHeight = 20; // The height of the error bar