one of the beatmap preview of all time
npm install @rel-packages/osu-beatmap-previewvibecoded osu! beatmap preview using lazer and this as reference.
created to be used on osu-stuff
- preview for standard and mania modes
- basic configurable skin (colors, animations, toggles)
- canvas backend (not the most performant due to the nature of canvas)
- beatmap parser (.osu, .osz files)
- hidden
- hard rock
- double time
- half time
- nightcore
- easy
- fade in
``typescript
import { BeatmapPlayer, get_available_mods } from "osu-beatmap-preview";
const player = new BeatmapPlayer({ canvas });
await player.load(oszFile);
player.play();
// get mods for current gamemode
const mods = get_available_mods("standard");
`
`typescript`
player.set_skin({
combo_colors: ["255,0,0", "0,255,0"],
enable_slider_ball: false,
enable_hit_animations: true,
follow_circle_color: "#ff8800",
...
});
`typescript``
player.on("play", () => console.log("playing"));
player.on("pause", () => console.log("paused"));
player.on("seek", (time) => console.log("seeked to", time));
player.on("timeupdate", (time, duration) => {});