Propose a change
Name Last commit message Last updated
bin renderer: --shade flag 6d ago
cache Publish 1.0.0 6d ago
screenshots Publish 1.0.0 6d ago
favicon.svg Publish 1.0.0 6d ago
hero-picker Publish 1.0.0 6d ago
install.sh Publish 1.0.0 6d ago
package.json Publish 1.0.0 6d ago
page.json Set visibility: public 6d ago
README.md Initial commit: app/hero-picker 6d ago
SKILL.md Publish 1.0.0 6d ago
ui.html Publish 1.0.0 6d ago
uninstall.sh Publish 1.0.0 6d ago

Hero Picker

Point it at one or more molecule GLBs and pick each board's thumbnail orientation with three bars — Z spin, X tilt, Y tilt — in a Hydrogen webview tab. The flat image rotates live as an approximation; True render preview runs the bundled studio renderer (room-environment lighting, ACES tone mapping, PBR material inference, grey backdrop) at the chosen angles, and Save hero writes a 1200 × 630 hero PNG ready for a wiki page.

The bars map one-to-one to renderer flags, so a picked orientation is always reproducible from the CLI:

bin/glb2png.mjs <board.glb> --view studio --spin -45 --tiltx 10 --tilty 0

Hero Picker UI

Run

hero-picker <board.glb> [more.glb ...] [--port 8848] [--out-dir .]

Then open the printed URL in a Hydrogen webview tab (adom-cli hydrogen webview open-or-refresh --name "Hero Picker" --url <url>). Base renders take ~15 s per board; the UI polls until they appear.

A saved hero looks like this (Control Panel: Workcell at spin 40, tiltx -75, tilty 5):

Example saved hero

API

Every UI action has a matching endpoint (JSON {status, data, hints[]}):

Route Does
GET /api/boards Board list + base-render readiness
POST /api/preview {board, spin, tiltx, tilty} True render at 700 px, returns image URL
POST /api/save {board, spin, tiltx, tilty} Full render, saves <out-dir>/<board>-hero.png (1200×630)

Install

adom-wiki pkg install caleb/hero-picker && bash ~/project/adom_modules/caleb/hero-picker/install.sh

Needs Node 20+ (npm i puppeteer happens in install.sh) and python3 + Pillow.

Bundled renderer

bin/glb2png.mjs is an extended adom-glb2png with --view studio|studio2, --spin, --tiltx, --tilty — headless three.js with a Draco loader, logarithmic depth buffer (kills soldermask/pour z-fighting), and studio material inference (gold → metallic, soldermask → semi-gloss).