Giter Club home page Giter Club logo

beatsaver-viewer's Introduction

beatsaver-viewer

Web-based viewer for BeatSaver maps, built with A-Frame and JavaScript.

CLICK TO VIEW

https://supermedium.com/beatsaver-viewer/?id=811-535&difficulty=Expert

The viewer works within a normal web browser and can be embedded on any webpage. It can also be previewed within VR headsets on browsers that support VR (e.g., Supermedium).

Featured on BeastSaber and the unofficial Beat Saber Songs site!

Usage

You can visit or link the viewer directly.

Or if you have a site, you can I-Frame the viewer and pass a query parameter containing the song ID and difficulty:

<iframe src="https://supermedium.com/beatsaver-viewer/?id=811-535&difficulty=Expert">

To directly preview a BeatSaver ZIP file, use the ?zip parameter in the URL:

https://supermedium.com/beatsaver-viewer/?zip={zipURL}

Note the ZIP must be served with CORS header. An easy way to do this is to prepend https://cors-anywhere.herokuapp.com/ to your ZIP URL:

https://supermedium.com/beatsaver-viewer/?zip=https://cors-anywhere.herokuapp.com/{YOUR_FULL_ZIP_URL}

To directly link to a seeked time, use the ?time parameter in the URL (seconds):

https://supermedium.com/beatsaver-viewer/?time=15

Roadmap

  • Safari support (BeatSaver currently serves OGGs which are not supported)
  • Custom saber viewer

Community

The BeatSaver viewer is an unofficial community project and not officially affiliated with Beat Saber.

It is adopted officially by the community on the Discord though, used as the official tool for sharing maps online and featured on BeastSaber:

Development

Built with A-Frame, a web framework that we created for building VR experiences. And JavaScript.

npm install
npm run start

Then head to localhost:9999 in your browser.

beatsaver-viewer's People

Contributors

feiss avatar luludotdev avatar mstrodl avatar ngokevin avatar rorekk avatar thatrobotdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

beatsaver-viewer's Issues

Bringing awareness to a collection of issues

Hello, this is Megalon from the Beat Saber Modding Group Discord.
I've recently learned that the mapping community within our Discord server has several complaints about the beatsaver-viewer, and have started building their own tool as a replacement.
However, most of the issues don't appear to be listed here in the issues for this repo, so I've posted them below.

1. No audio plays and no notes appear when specifying a zip file
2. Skips notes if too many appear in the song
3. VR starts randomly
4. No mapping extensions support, causes walls to stretch across the entire screen
5. NJS is not calculated properly, makes high NPS maps unreadable
6. Can’t view any game modes besides standard
7. Can’t see custom difficulty labels
8. Walls are buggy in general

The above text was taken directly from a message by Rabbit#0001, the developer of the new tool that is being built.

Are you aware of these issues?

Allow skipping forward/back when the song is stopped

Currently when you click anywhere on the seekbar when the song is not playing, an exception is displayed in the console:

build.js:145 Uncaught DOMException: Failed to execute 'stop' on 'AudioScheduledSourceNode': cannot call stop without calling start first.

Scene File For Unity !!!

Hi,
When I download the project , and Open it in Unity,
I cant see any scene file to run and test it on unity !!!

The current color scheme is not colorblind friendly

With the current Red / Green color scheme, it is very difficult for red/green colorblind users to distinguish between the different colored blocks. Red / Green is the most common form of color deficiency.

The issue with Beatsaver Viewer currently is that the shade (brightness and saturation) of red and green used are too similar to each other that they are hard to distinguish. If one was a dark red, and the other a light green, it would be easier to tell them apart, but ideally a different color scheme should be used.

If Red / Blue is not possible, Red / Black or maybe Purple / Yellow would work well.

Possible solutions:

  • Let users select from a series of preset colors
  • Let users define their own colors
  • Apply a filter to shift the hue of everything on screen

Thanks for making this app by the way! It's really awesome and I just want everyone to be able to use it!

Add support for "&time=" URL parameter to open a map at specified time

It would be super helpful to be able to create a link which opens a song at a given position.
Mostly for doing beatmap reviews - pointing people to specified pattern or showing them their mistakes.
Would be similar to &difficulty=ExpertPlus

Example - open a map at 3:40 position:

https://supermedium.com/beatsaver-viewer/?id=11645-12388&time=220

Also add a link: Copy map URL at current time

Loading Local ZIP File Breaks

Console errors produced:
[WDS] Disconnected!
...
TypeError: NetworkError when attempting to fetch resource.

It tries to get the API details from beatsaver.com but when it fails does not fall back correctly to the local ?zip parameter.

Since the API changes went in using the /?zip=song.zip parameter no longer works.
I found a work-around by telling fetchData to just return fetchZip directly instead of doing the network call, and removing the "Already fetching" check of the fetchZip method.

This wouldn't affect most people, since it's probably not a highly used feature. I'm using it because I've been working on an auto-map generator (based on an audio file and peek times). It produces the zip with files and use beatsaver-viewer to quickly iterate and see results.

Thanks, I've been following your updates to this and really appreciate this tool!

"Ear rape" when switching Difficulty

Not sure if this was intentional or not, but when you change difficulty e.g. from ExpertPlus to Expert, it looks like hundred "collision sounds" are played simultaneously, thus causing a loud noise.

Edit: same happens when you click anywhere on the timeline (skipping also doesn't work).

Example songs:
https://supermedium.com/beatsaver-viewer/?id=4412-3669
https://supermedium.com/beatsaver-viewer/?id=517-321

Browser: Google Chrome, version 71.0.3578.98 (Official Build) (64-bit)
OS: Windows 10 Pro 64bit, build 1809

Made me flinch the first time it happened, lol.

Support Safari.

BeatSaver provides OGGs. Either find some way to get those as MP3s...or use ogv.js emscripten player and have a completely different codepath for Safari that doesn't use buffers and no audio visualizer..

Would be easier to just scrape and convert to MP3s. Perhaps can script it and store on S3.

Lighting events hitting too early.

Kolezan: "The lighting events displayed in the maps seem to play earlier than intended, about two beats ahead. It's not exactly two beats, so it seems to be a fixed offset. I haven't figured out the exact offset though, but if you need to know I can figure it out."

Difficulty stays on lowest setting

When I preview a map on bsaber.com, the map difficulty doesn't change from the lowest difficulty even if I manually select harder ones. The same thing happens when I view the map on supermedium.com.

Soundcloud-style comments.

From @elliottate, requested several times on Discord.

I would store them in Firebase as like comments with records being:

{id: songId, comments: []}

And comments would have:

{user, comment, time}

Sort the comments by time, keep track of the song position, when the song passes the time of the next comment, display the comment (in HTML/CSS or VR?).

Should be contained within an A-Frame component src/components/comment.js (even if it's only 2D).

Wall display issue

All the walls in D.A.N.C.E. are vertical, but they all show as Horizontal: https://bsaber.com/songs/11661/

Check 1:51 for example.

They are only on the top two lanes, despite being small in width; the previewer may be seeing that there's nothing walling off the bottom row and assuming it's a full top block from that. Just a theory...

Reported notes jumping or some slight sync issues?

From BennyDaBeast:

Heyo! Was listening to a song in the Beat Saber viewer, and noticed that there's an odd syncing issue. Sometimes with double notes (a beat that uses both hands), the notes will be slightly off and I'll hear two distinct hits. Happened when I was listening to Some Nights by Fun. Sometimes when I watch closely I'll even see them jump a little, especially when other notes get hit. The closest notes get hit, and I'll see the notes down the track jump. Hope this helps!

Beatsaver viewer thinks chrome is safari/ios

So this is the first time I'm using your viewer and any song I open on bsaber.com or even your Click To View button on the main GitHub screen shows me the beat saber map with a sign that says ios and safari support coming soon! we need to convert songs to mp3 firs. I am using the Chrome Browser Version 72.0.3626.109 (Official Build) (64-bit)

The VR mode should be optional (breaks Chrome and is annoying)

The new VR mode that was added at some point launches SteamVR every time I try to preview a song in Firefox, which is annoying. In Chrome, the viewer doesn't load at all and throws a bunch of JS errors. It used to work in Chrome just fine.
I think the VR mode should be a separate button that needs to be pressed for it to activate

Passing A Zip URL Not Working

I tried to pass a zip url like this:

https://supermedium.com/beatsaver-viewer/?zip=https://cors-anywhere.herokuapp.com/https://www.dropbox.com/s/a9i42wtyqtfe8xg/2d3e1bc0-215e-47b3-9d8a-4a505794f4ac.zip?dl=1

But it stuck at the downloading step. The console outputs an error below:

Uncaught TypeError: Cannot read property 'buffer' of undefined
    at ZipLoader.extractAsText (build.js:266)
    at ZipLoader.extractAsJSON (build.js:266)
    at build.js:259
    at Array.forEach (<anonymous>)
    at build.js:259
    at Array.forEach (<anonymous>)
    at i.processFiles (build.js:259)
    at ZipLoader.<anonymous> (build.js:259)
    at ZipLoader.dispatch (build.js:266)
    at XMLHttpRequest.xhr.onload (build.js:266)

The site doesn't seem to be working for me at all

dragging and dropping zip files seems to totally break it. it says downloading and hangs there forever. same thing happens when I use the search function and pick a song that way, or manually change the song id in the url. the only thing that seems to work is the first song that is on there when I click on the link (beat it - michael jackson). am I doing something wrong? or is this project no longer functional? thanks

"Unexpected token" for JSON files with non-UTF-8 encoding

Some songs can't be previewed and display an error:

Uncaught SyntaxError: Unexpected token � in JSON at position 0
    at JSON.parse (<anonymous>)
    at ZipLoader.extractAsJSON (build.js:274)
    at Object.keys.forEach.filename (build.js:96)
    at Array.forEach (<anonymous>)
    at ZipLoader.loader.on (build.js:96)
    at ZipLoader.dispatch (build.js:274)
    at XMLHttpRequest.xhr.onload (build.js:274)

This is due to non-UTF-8 encoding in .json files (checked with Notepad++).

Examples of UCS-2 LE BOM in info.json:

  1. https://supermedium.com/beatsaver-viewer/?id=5239-4638
  2. https://supermedium.com/beatsaver-viewer/?id=10606-11164
  3. https://supermedium.com/beatsaver-viewer/?id=10880-11495

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.