This commit is contained in:
SArpnt 2024-03-12 15:05:16 -04:00
parent a36406d8eb
commit 82bf59690b
Signed by: SArpnt
SSH key fingerprint: SHA256:iDMeic8KkqqEsN4wODlgsk1d/oW1ojZ/cu/MEWyfLBw

View file

@ -1,9 +1,9 @@
# bytebeat-composer
modern bytebeat player with a library of many formulas from around the internet.
originally forked from [StephanShi's website](https://github.com/SthephanShinkufag/bytebeat-composer) to fix bugs and add features, now maintained independently with different codebases.
originally forked from [StephanShi's website](https://github.com/SthephanShinkufag/bytebeat-composer) to fix bugs and add features, now maintained independently.
afaik this was the first bytebeat program that didn't have any major playback bugs (the two common ones are being unable to access functions like `escape`, and editing strings like `"sin"`)
afaik this was the first bytebeat program that didn't have any major playback bugs (the two common ones are being unable to access functions like `escape`, and editing strings like `"sin"`).
this program also works well with storing persistent variables, in this example `b` is used to store persistent variables
```js
this.b??={a:0,b:0}, // this, window, and globalThis are all the same in this context
@ -80,7 +80,7 @@ any messages recieved will be in this format:
## dead links
if any previously working links stop working, LET ME KNOW. link compatibility is supposed to stay permenantly.\
if any previously working links stop working, LET ME KNOW. link compatibility is supposed to stay permenantly.
if i'm unavalible or you're in a hurry, you can decode the links manually:
- links prefixed with `#v3b64` are the oldest, to decode:
@ -89,7 +89,11 @@ if i'm unavalible or you're in a hurry, you can decode the links manually:
4. inflate to string with deflate (you can use a tool like fflate or pako)
5. parse with JSON
- links prefixed with `#v4` have essentially the same process. the only differences are the prefix and the absence of base64 padding.
- links prefixed with `#5` are the latest, and the process needed to decode *all of them* might change. this one isn't particularly easy to explain, you're best off checking the source code. search for `location.hash` and you should find it pretty quickly. commit 8acb6ab should work if the latest one doesn't.
newer formats are complicated, so i'll only provide commit hashes and the code locations.
- `#5`: commit 8acb6ab, grep for "location.hash"
- `#6` is the latest, and may even change. first version is in a36406d src/url/mod.ts
## building
@ -97,9 +101,20 @@ if i'm unavalible or you're in a hurry, you can decode the links manually:
install pnpm
```sh
pnpm i
pnpm run
pnpm i --prod
pnpm run build
```
view the scripts and run what you need.
build will create the webpage files, serve will let you view the webpage easily.
output is in \_site, you can start a webserver there.
for actual development work:
```sh
pnpm i
pnpm run serve
```
please make some changes before uploading anywhere, and avoid github if you can.
microsoft has been scraping repositories to use for their github copilot crap,
and i'd rather not have my code used in that.
i would also like to hear about any projects you make with my code!