GLB File Viewer Online
View GLB 3D model files directly in your browser. Free online viewer with orbit controls, wireframe mode, and model inspection. No upload required.
Drag & drop a .glb file here
or click to browse · max 100 MB
About
GLB is the binary container format for glTF 2.0 (GL Transmission Format), the ISO/IEC standard for runtime 3D asset delivery. A single .glb file packs the JSON scene descriptor and all binary buffers (vertex positions, normals, texture coordinates, indices) into one contiguous blob. Misinterpreting accessor component types or byte strides during parsing corrupts geometry silently. Getting the node transform hierarchy wrong (applying T × R × S in incorrect order) produces invisible or inverted meshes. This tool parses the raw binary, reconstructs the scene graph, and renders via WebGL 2 with Phong shading. It handles accessor types 5120 - 5126 (BYTE through FLOAT), all primitive modes, and quaternion node rotations. Limitation: embedded textures and morph targets are not rendered. Skinned meshes display in bind pose only. Models exceeding 100 MB are rejected to prevent browser tab crashes.
Formulas
The GLB binary layout follows a strict structure. The file begins with a 12-byte header:
Header = magic (4 bytes, 0x46546C67) + version (4 bytes) + length (4 bytes)
Each subsequent chunk has an 8-byte preamble: chunkLength (4 bytes) + chunkType (4 bytes).
Node local transform matrix is composed as:
Mlocal = T ⋅ R ⋅ S
where T = translation matrix from 3-vector, R = rotation matrix from unit quaternion q = (x, y, z, w), S = scale matrix from 3-vector.
Quaternion to rotation matrix conversion:
R = 1−2(y2+z2)2(xy−wz)2(xz+wy)2(xy+wz)1−2(x2+z2)2(yz−wx)2(xz−wy)2(yz+wx)1−2(x2+y2)
Phong illumination per fragment:
I = ka + kd ⋅ max(0, n ⋅ l) + ks ⋅ max(0, r ⋅ v)ns
where n = surface normal, l = light direction, r = reflection vector, v = view direction, ns = shininess exponent.
Reference Data
| glTF Accessor Component Type | GL Enum | Byte Size | JS Typed Array |
|---|---|---|---|
| BYTE | 5120 | 1 | Int8Array |
| UNSIGNED_BYTE | 5121 | 1 | Uint8Array |
| SHORT | 5122 | 2 | Int16Array |
| UNSIGNED_SHORT | 5123 | 2 | Uint16Array |
| UNSIGNED_INT | 5125 | 4 | Uint32Array |
| FLOAT | 5126 | 4 | Float32Array |
| glTF Accessor Types & Component Counts | |||
| SCALAR | - | 1 component | Index buffers, weights |
| VEC2 | - | 2 components | Texture coordinates |
| VEC3 | - | 3 components | Positions, normals |
| VEC4 | - | 4 components | Tangents, colors, quaternions |
| MAT2 | - | 4 components | Rare |
| MAT3 | - | 9 components | Rare |
| MAT4 | - | 16 components | Joint matrices |
| Primitive Modes | |||
| POINTS | 0 | Point cloud rendering | |
| LINES | 1 | Line segments (pairs) | |
| LINE_LOOP | 2 | Connected line loop | |
| LINE_STRIP | 3 | Connected line strip | |
| TRIANGLES | 4 | Default face mode | |
| TRIANGLE_STRIP | 5 | Shared-edge strip | |
| TRIANGLE_FAN | 6 | Fan from first vertex | |