Skip to content

About

A local-first macOS workspace to inspect, debug, compare, and optimize GLB/glTF assets for Three.js.

Topics

Resources

Stars

21 stars

Watchers

0 watching

Forks

Repository files navigation

GLB Viewer

Shrink, inspect, and prepare GLB models for Three.js. A local-first Mac app that compresses textures to KTX2, optimizes geometry, and shows exactly what changed. Your models never leave your computer.

Download for Mac · User guide · Blender bridge

GLB Viewer inspecting an animated model

Install

  1. Download the DMG from the latest release: arm64 for Apple Silicon or x64 for Intel.
  2. Open it and drag GLB Viewer into Applications.
  3. Open the app. macOS will warn you the first time because builds aren't notarized by Apple yet.
  4. Go to System Settings → Privacy & Security and click Open Anyway.

If macOS still won't open it, run xattr -cr "/Applications/GLB Viewer.app" in Terminal.

Compress textures to KTX2

Convert each image to GPU-ready KTX2, or use WebP, PNG, or JPEG where that suits it better.

  • KTX2 with ETC1S or UASTC, with quality, effort, and mipmap controls
  • Per-texture settings, including maximum resolution
  • Channel viewer with pan, zoom, and RGBA debugging
  • Channel packing for combined texture maps

KTX2 settings for a texture

ETC1S encoding currently handles textures up to about 12 megapixels. Set a 4096 px texture to 2048 px before encoding.

See exactly what you saved

Get measured before and after sizes for the whole file and for every image.

  • Real output sizes, not estimates
  • Draco or Meshopt geometry compression
  • Project budgets and saved run history

Size report showing a model reduced from 3.94 MB to 2.92 MB

Compare before you export

Check the optimized model beside the original, with cameras and animation linked.

  • Mesh simplification with per-mesh overrides and LOD exports
  • Cleanup and instancing to cut resources and draw calls
  • glTF validation with actionable fixes
  • Three.js bundles with decoders, typed lookups, and a React Three Fiber component

Original and optimized models side by side

Build materials with live nodes

Wire procedural nodes, preview them on your model, and export them as TSL.

  • Noise, mapping, math, ramp, and Time nodes, plus physical glass, coat, and sheen inputs
  • Live WebGPU preview, with Three.js's WebGL 2 fallback
  • Blender add-on for watched exports with embedded material graphs, cameras, and lights

Materials node editor driving an animated noise material

The node editor translates supported Blender nodes. It isn't full Cycles parity or two-way sync. See Blender bridge and node editor for setup and supported nodes.

Inspect every detail

UV checker Texture library
UV checker view of the model Texture library and channel viewer
  • Surface views: material solo, UV checker, and UV layout
  • Geometry views: normals, bones, bone weights, face orientation, and cost heatmaps
  • Performance: draw calls, load timings, and memory estimates
  • Batch processing for whole folders

The app opens with this demo model so you can try every tool straight away: Littlest Tokyo by Glen Fox, CC Attribution, from the Three.js examples.

Development

  • Requires Node.js 22.12+ and npm.
  • Install: npm ci
  • Run: npm run desktop
  • Hot reload: npm run desktop:dev
  • Test: npm test
  • Blender integration: npm run test:blender (set BLENDER if needed; add BLENDER_UI_TEST=1 to exercise real Blender exports in the app after a build).
  • Package: npm run package:mac
  • Build DMG/ZIP: npm run dist:mac
  • Built with Electron, React, Three.js, and shadcn/ui.

Windows

Requires Windows 11, Node.js 22.12+ and npm. From the repository root in PowerShell, install dependencies and build the unpacked app:

npm ci
npm run package:win

Use npm run dist:win instead to build a portable executable in release. Build and launch with npm run desktop:win, or run the unpacked executable directly. Pass a model path as its argument to open that model:

& ".\release\win-unpacked\GLB Viewer.exe"
& ".\release\win-unpacked\GLB Viewer.exe" "C:\Models\model.glb"

Windows uses a standard window frame with an automatically hidden menu bar. It does not check for updates or auto-update. Builds are unsigned, so Windows SmartScreen may warn when opening the portable build.

Run the test suite with npm test. To test the packaged app, set SMOKE_APP_PATH to its executable; the Electron tests use it in place of the development build:

$env:SMOKE_APP_PATH = "$PWD\release\win-unpacked\GLB Viewer.exe"
node scripts/smoke-test.mjs
npm run test:open-file
# Or run the full suite against the packaged app:
npm test
Remove-Item Env:SMOKE_APP_PATH

The open-file test opens assets/samples/LittlestTokyo.glb by default. Set OPEN_FILE_TEST_GLB to test another model and OPEN_FILE_TEST_SHOT to choose the screenshot path.

Releases and updates

  • Version tags trigger tested Apple Silicon and Intel release builds.
  • In-app update checks find new GitHub releases.
  • Builds without Apple credentials are ad-hoc signed and use manual installation; automatic installation requires Apple signing credentials.
  • Presets, budgets, and history survive app updates.

License

GLB Viewer's original source code and documentation are available under the MIT License. Third-party dependencies and assets, including the Littlest Tokyo demo model, retain their own licenses.

About

A local-first macOS workspace to inspect, debug, compare, and optimize GLB/glTF assets for Three.js.

Topics

Resources

Stars

21 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages