Awesome
gbx.js
Current development for v1: https://github.com/thaumictom/gbx.js/pull/5
a slim, fast and easy to set up Gamebox (GBX) parser written in vanilla JavaScript
- gbx.js parses the headers asynchronously, while it stays read-only
- supported versions range from Maniaplanet to Trackmania®
- currently only
*.Map.Gbx
and*.Replay.Gbx
files are supported - just 1.8kB minified and gzipped
Getting started
Installing
Install via npm with $ npm install gbx
and import it with import GBX from 'gbx';
Or instead include it in your HTML:
<script src="https://cdn.jsdelivr.net/npm/gbx"></script>
Basic usage
Create a new GBX instance, provide it with data either of a file type object or an Uint8Array and use the parsed data points after parsing.
let myGBX = new GBX({
data: buffer,
onParse: function(metadata) {
console.log(metadata)
}
})
Further reading
- gbx.js Wiki
- gbx-net, a more complete and more in-depth read & write GBX parser library written in C#