Skip to content

Instantly share code, notes, and snippets.

@Meshiest
Created September 18, 2019 03:46
Show Gist options
  • Save Meshiest/da2e0b0bf9fdee2f09e1c79ca33052f0 to your computer and use it in GitHub Desktop.
Save Meshiest/da2e0b0bf9fdee2f09e1c79ca33052f0 to your computer and use it in GitHub Desktop.
Brickadia save reading via JS demo
<!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