Browser-based generator that turns an image into a print-ready 3MF of a multicolor "clicker" — a 3D-printed pressable button built around a real Cherry MX mechanical switch. 100% client-side, deployed on GitHub Pages (no backend, no hosting cost).
Live site: https://vostoklabs.github.io/Clicker-Generator/
- Upload an image — it's quantized into a small color palette and traced into 2D regions.
- A geometry worker (the manifold-3d WASM kernel, off the main thread) builds a watertight, multicolor cap + body around a real MX switch socket/stem.
- three.js renders a live preview; export produces a print-ready multicolor 3MF.
All geometry is in millimeters, and every exported solid is watertight / manifold.
- Node.js 20 or newer (includes
npm). Check what you have with:node -v npm -v
- Git to clone the repo (or just download the ZIP from GitHub instead).
Option A — download the ZIP (easiest, no Git needed):
- Open the GitHub page.
- Click the green Code button → Download ZIP.
- Find the downloaded
.zip(usually in your Downloads folder) and extract / unzip it. You'll get a folder likeClicker-Generator-main.
Option B — clone with Git (if you have Git installed):
git clone https://github.com/vostoklabs/Clicker-Generator.gitAll the commands below have to be run from inside the project folder (the one that contains package.json). Pick whichever way is easiest for you:
Windows:
- Open the unzipped folder in File Explorer, then either:
- Click the address bar at the top, type
cmd, and press Enter — a Command Prompt opens already pointed at that folder. (My favorite — quickest way.) - Or right-click an empty area inside the folder and choose Open in Terminal (Windows 11) or Open PowerShell window here.
- Click the address bar at the top, type
- Or open Command Prompt / PowerShell from the Start menu and
cdinto the folder manually:(Tip: typecd "C:\Users\YourName\Downloads\Clicker-Generator-main"
cdwith a space, then drag the folder onto the window to paste its full path.)
macOS / Linux:
- Open the Terminal app and
cdinto the folder:(On macOS you can drag the folder onto the Terminal window to paste its path.)cd ~/Downloads/Clicker-Generator-main
To double-check you're in the right place, run dir (Windows) or ls (Mac/Linux) — you should see package.json and index.html in the listing.
In that terminal, install all the packages the project needs (they're listed in package.json):
npm installThis downloads everything into a new node_modules/ folder. It can take a minute or two the first time, and you'll see a progress log. You only need to do this once — or again later if you pull changes that update the dependencies.
If you get
'npm' is not recognized(Windows) orcommand not found: npm, Node.js isn't installed (or the terminal was open before you installed it). Install Node.js 20+, close the terminal, and reopen it.
npm run devVite starts a local web server and prints a URL:
➜ Local: http://localhost:5173/
Open that address in your browser (Ctrl+click the link, or copy-paste it) and the app loads. It hot-reloads automatically as you edit files, so you can leave it running.
When you're done, go back to the terminal and press Ctrl+C to stop the server.
npm run build # typecheck + production build -> dist/
npm run preview # serve the production build locally
npm run typecheck # type-check only, no buildStack: Vite + TypeScript + three.js, with manifold-3d (WASM) as the geometry kernel running in a Web Worker. three.js is display-only.
Pushing to main triggers .github/workflows/deploy.yml, which builds the static site and publishes dist/ to GitHub Pages.
One-time setup: in the repo, go to Settings → Pages → Source and select GitHub Actions. vite.config.ts uses base: './' (relative paths) so the build works at any Pages URL without reconfiguration.