Canvas 2D frontend with real pixel art sprites + HTML overlay cards #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Replace the CSS pixel-art frontend with a Canvas 2D rendered farm + HTML overlay for agent detail cards.
Assets Ready
assets/sprites/agent-{id}.png— 9 distinct 32x32 pixel art agent sprites:Also:
agent-{id}-sheet.png— 4-frame walk cycle sprite sheets.Technical Approach
Files to Create/Modify
src/frontend/App.jsx— Canvas-based farm container + HTML overlaysrc/frontend/FarmCanvas.jsx— Canvas 2D rendering (buildings, paths, agent sprites)src/frontend/AgentCard.jsx— HTML overlay card (click agent to inspect)src/frontend/store.js— keep/update Zustand storesrc/frontend/WebSocketClient.js— keep as-issrc/frontend/src/farm.css— update for overlay stylessrc/frontend/index.html— updatesrc/frontend/package.json— remove three/fiber/drei depsDesign Requirements
Build
Run
cd src/frontend && npx vite build— must succeed.✅ Complete
Replaced CSS pixel-art frontend with Canvas 2D farm + HTML overlay.
What was done:
public/directory), lerp-based smooth movement, vertical bob for idle, sparkle particles for working, "..." bubble for thinking, red tint + "!" for blocked, grayscale+opacity for offlineBuild: ✅ passes (
npx vite build)Deployed: ✅ service restarted, serving from
src/frontend/dist/Commit:
9275854— feat(frontend): Canvas 2D farm with real pixel art sprites and HTML overlay cards