turn a glb of your room into a 3d interactive home assistant control dashbord
  • JavaScript 79.6%
  • CSS 13.5%
  • HTML 6.7%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-03 11:18:04 -04:00
shared init 2026-10-02 21:44:17 -04:00
vendor init 2026-10-02 21:44:17 -04:00
viewer init 2026-10-02 21:44:17 -04:00
editor.css init 2026-10-02 21:44:17 -04:00
editor.js init 2026-10-02 21:44:17 -04:00
index.html ini 2026-10-02 21:44:19 -04:00
README.md init 2026-10-02 21:44:17 -04:00
serve.sh fixed url 2026-10-03 11:18:04 -04:00
zip.js init 2026-10-02 21:44:17 -04:00

GLB Scene Builder — 3D Home Assistant environments

Build interactive 3D Home Assistant scenes from any .glb model. Upload a model, click meshes to select them, bind several meshes to one device, map it to a Home Assistant entity, add behaviors per mesh (spin, glow, color change, show/hide, pulse), then export a static bundle.

Run it

./serve.sh
# open http://localhost:8123/editor.html

ES modules don't run from file://, so serve over http (any static server works).

Workflow

  1. Upload GLB (button or drag & drop).
  2. Click a mesh in the viewport to select it — selection is always exactly one mesh.
  3. New device from selection (or add the mesh to an existing device).
  4. Set the device kind (light, fan, switch, media_player, generic), type the HA entity_id, choose active when states.
  5. Add behaviors. Each behavior can target all of the device's meshes or only specific ones — e.g. bulb mesh glows blue while shade mesh shifts color.
  6. Preview with the per-device simulate toggles (off / on / playing).
  7. Setup tab: enter your HA URL + long-lived token once. The editor uses it for entity autocomplete, and the export bakes it in so the viewer auto-connects.
  8. Export bundle — downloads a .zip containing only static files.

Export bundle layout

index.html      viewer shell
app.js          viewer logic
viewer.css      viewer styles
config.js       your devices, behaviors, mesh mapping (+ baked HA creds)
model.glb       your model
shared/         ha client, behavior engine, Music Assistant browser
vendor/         three.js (no CDN needed)

Drop it on any static host and open index.html. No build step, no server code.

Viewer features

  • Bottom dock lists every device; click a card to expand all its controls:
    • light: on/off, color, brightness, color temperature, effects list
    • fan: on/off, speed, preset modes
    • media_player: play/pause, volume, prev/next, browse library (Music Assistant: artists, albums, tracks, playlists, radio, search — play anything on the player)
    • switch/generic: on/off
  • Tap a 3D object to toggle it. ⌖ focuses the camera on a device.
  • Dock filters (All / Lights / Fans / Media / Other), auto-rotate, reset view.
  • Settings (gear via the connection pill) can override the baked credentials.

Notes

  • Mesh mapping uses GLB node names with an index-path fallback, so it survives Blender renames that only change spacing.
  • Behaviors clone materials per device — shared materials elsewhere in the model are never affected.
  • Baked credentials are readable in the exported files. Only share the bundle with people you trust; uncheck the bake option to ship without them.