Created
September 18, 2019 03:46
-
-
Save Meshiest/da2e0b0bf9fdee2f09e1c79ca33052f0 to your computer and use it in GitHub Desktop.
Brickadia save reading via JS demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<script src="https://cdn.jsdelivr.net/npm/brs-js/dist/dist.js"></script> | |
<input id="fileInput" type="file"> | |
<script> | |
fileInput.addEventListener('change', e => { | |
const file = e.target.files[0]; | |
if (file) { | |
file.arrayBuffer() | |
.then(buff => { | |
const save = BRS.read(new Uint8Array(buff)); | |
console.log(save); | |
}); | |
} | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment