https://github.com/verekia/extract-glb
https://github.com/verekia/extract-glb
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/verekia/extract-glb
- Owner: verekia
- Created: 2025-07-22T16:54:41.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-22T17:34:47.000Z (3 months ago)
- Last Synced: 2025-07-22T19:11:30.402Z (3 months ago)
- Language: TypeScript
- Size: 129 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Extract GLB
Extracts truncated binary data of a GLB or GLTF + binary files, for educational/debugging purposes.
## Usage
Write the input file in `extract-glb.ts`, then run `bun extract-glb.ts` (or other runtimes that support TS).
## Result
See `cube.glb.json` for an example of result.
## Gltf.report Alternative
Alternatively, to list the content of an attribute such as `POSITION`, run the following snippet in the script tab of [gltf.report](https://gltf.report/):
```js
for (const mesh of document.getRoot().listMeshes()) {
for (const prim of mesh.listPrimitives()) {
const position = prim.getAttribute('POSITION');
console.log(position.getArray());
}
}
```## Disclaimer
Vibe-coded for myself. Use at your own risk.