glb/gltf optimizer. i got tired of spammy online compressors, so i built my own.
glob.mp4
glob is a logic engine for shrinking 3d assets. i built it because 50mb glb files shouldn't exist on the web.
- mesh decimation: removes polygons using
meshoptimizer. drops weight without losing silhouette. - draco compression: google's geometry compression for minimal footprint.
- model sharing: generate persistent share links with interactive 3D previews and stats.
- texture resizing: auto-scale textures to 1k/2k/4k limits. saves vram.
- bulk processing: queue 10 files. get them back optimized.
- globber tier: $8/mo via polar. 500mb limits, 48h retention, persistent vault.
flowchart LR
A[Upload] --> B(Welding)
B --> C(Decimation)
C --> D(Quantization)
D --> E(Draco)
E --> F[Optimized GLB]
- ingest: parses buffer into document object.
- weld: merges duplicate vertices. essential before simplification.
- decimate: collapses edges based on target ratio.
- quantize: reduces bit-depth of attributes.
- compress: applies draco for final reduction.
- frontend: react, vite, tailwind, shadcn, three.js
- backend: express, node, gltf-transform
- deploy: vercel (frontend +
/api) - infra: supabase (db), cloudflare r2 (model storage), clerk (auth), polar (billing)
- note:
render.yamlexists if you want a long-running api
you can run glob on your own infrastructure. it's a standard node/vite stack.
- clone:
git clone https://github.com/microck/glob.git - deps:
npm install - env: rename
.env.exampleto.envand fill in the blanks. - run:
npm run devandnpm run api:dev
you'll need accounts for:
- supabase: database. run migrations in
api/supabase. - clerk: auth. create an app and get keys.
- cloudflare r2: object storage. create a bucket.
- polar: payments. strictly optional if you strip the billing code.
o'saasy license. use it for internal tools or personal projects. don't use this code to launch a competing 3d optimization service.