3D Web · Exercise 1 of 4Next
Intermediate
Read a .glb header
The code fetches the bike's .glb file. Read its 12-byte header with the DataView: the 4 letters at the start (the magic), the version (bytes 4–7) and the total length (bytes 8–11), both little-endian.
Put them in window.glb = { magic, version, length }.
What Check tests
- The magic is glTF
- The version is 2
- The length is the file's real size
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Press Run to see the page.
Console
Nothing printed yet.