Update readme, types
This commit is contained in:
parent
58c03592fd
commit
c0c01e978a
@ -1,7 +1,6 @@
|
|||||||
# Beat Saber Overlay
|
# Beat Saber Overlay
|
||||||
|
|
||||||
Simple Beat Saber stream overlay for [twitch.tv/iza_k](https://www.twitch.tv/iza_k)
|
Simple Beat Saber stream overlay for [twitch.tv/iza_k](https://www.twitch.tv/iza_k)
|
||||||
|
|
||||||
Requires [BeatSaberPlus](https://github.com/hardcpp/BeatSaberPlus)
|
Requires [BeatSaberPlus](https://github.com/hardcpp/BeatSaberPlus)
|
||||||
|
|
||||||
### Preview
|
### Preview
|
||||||
@ -11,7 +10,7 @@ Requires [BeatSaberPlus](https://github.com/hardcpp/BeatSaberPlus)
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. Go to [bs-overlay.netlify.app](https://bs-overlay.netlify.app/)
|
1. Go to [bs-overlay.netlify.app](https://bs-overlay.netlify.app/)
|
||||||
2. Click anywhere on page to show settings
|
2. Click anywhere on page to show settings (saved in URL)
|
||||||

|

|
||||||
3. Copy URL
|
3. Copy URL
|
||||||
4. OBS Studio: Add Source > Browser > paste URL
|
4. OBS Studio: Add Source > Browser > paste URL
|
||||||
|
|||||||
2
index.js
2
index.js
@ -82,7 +82,7 @@ const bsrKey = document.getElementById("bsrKey");
|
|||||||
let timeMultiplier = 1;
|
let timeMultiplier = 1;
|
||||||
let duration = 0;
|
let duration = 0;
|
||||||
|
|
||||||
/** @param {MapInfoChanged} data */
|
/** @param {MapInfo} data */
|
||||||
async function updateMapInfo(data) {
|
async function updateMapInfo(data) {
|
||||||
const custom = data.level_id.startsWith("custom_level_");
|
const custom = data.level_id.startsWith("custom_level_");
|
||||||
const wip = custom && data.level_id.endsWith("WIP");
|
const wip = custom && data.level_id.endsWith("WIP");
|
||||||
|
|||||||
2
types.d.ts
vendored
2
types.d.ts
vendored
@ -61,7 +61,7 @@ interface ScoreEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type BeatSaberPlusEvent = HandshakeEvent | GameStateEvent | ResumeEvent | PauseEvent | MapInfoChangedEvent | ScoreEvent;
|
type BeatSaberPlusEvent = HandshakeEvent | GameStateEvent | ResumeEvent | PauseEvent | MapInfoChangedEvent | ScoreEvent;
|
||||||
type MapInfoChanged = MapInfoChangedEvent["mapInfoChanged"];
|
type MapInfo = MapInfoChangedEvent["mapInfoChanged"];
|
||||||
type Score = ScoreEvent["scoreEvent"];
|
type Score = ScoreEvent["scoreEvent"];
|
||||||
|
|
||||||
interface Document {
|
interface Document {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user