Decoration Editor
A small editor where I place crowns, sleep Zs and speech bubbles on every avatar pose by eye. It saves straight into the repo. Part of the Box of Cards work.
TS · React · Vite · NodeJs · MaterialUi · HMR
Placed by Eye
Every avatar pose has its own spot for the crown, the sleep Zs, the speech bubble and the ponder question mark. Typing coordinates and reloading until a tilted crown sits level would have taken days. With the editor it took one to two hours.
A click on the stage puts the decoration under the cursor, then dragging and the keyboard fine-tune it. Undo takes back a whole drag at once. When one pose fits, I copy it onto every pose of that avatar. The editor uses the same geometry as the game, so what I see here is what players see on the board.
Placed Against Its Neighbors
The crown shares the head with the sleep Zs and the speech bubble, so I can show several decorations at once and place them against each other.
Autosave Into the Repo, Without a Reload
Every change saves straight into a JSON file the game imports. Vite reloads the whole page when a JSON file changes, which threw away whatever I was placing. So a small Vite plugin writes the file and tells Vite to ignore that change. The editor only runs on my machine and never ships to players.