beatsaber-overlay/AGENTS.md

1.3 KiB

AGENTS.md

Static OBS/browser overlay that reads Beat Saber Plus Song Overlay events over WebSocket (ws://localhost:2947/socket).

Files of interest

  • index.html — Page shell: markup for map info, time bar, score, settings dialog; pulls index.css and index.js.
  • index.js — Connects to BS+ WebSocket, parses JSON events (gameState, mapInfo, pause, resume, score), updates DOM; optional BeatSaver API fetch for custom maps; reads/writes settings from URL hash.
  • index.css — Layout, theming, visibility toggles driven by body classes and CSS variables from settings.
  • types.d.ts — JSDoc typedefs for BS+ payloads and events (editor/IDE hints only).
  • jsconfig.json — JS project roots/path so editors resolve modules and types.d.ts.
  • images/ — Cover fallback (unknown.svg), characteristic icons under images/characteristic/ (filenames match BS+ characteristic strings).
  • README.md — User-facing usage (hosted URL, OBS, local file://, BS+ module).
  • dprint.json — Formatter config for the repo.
  • .editorconfig — Basic indent/charset rules for editors.

Out of scope here

Beat Saber Plus itself (game mod) exposes the socket; this repo is only the HTML/CSS/JS client.