feat: replace SVG room fills with tile-based room rendering in FarmCanvas #16
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
Modify
FarmCanvas.jsxto render room interiors using tile sprites from the LimeZu tileset instead of colored SVG rectangles.Current State
FarmCanvas.jsxrenders rooms as<rect>fills withROOM_STYLEScolor palette. Furniture is drawn as simple colored<rect>elements. The office has a 24x16 tile grid with 6 rooms.Task
tileLoader.jsinFarmCanvas.jsx<rect>room fills with individual<image>elements for each tile position:renderFurniture()SVG<rect>items with actual furniture tile sprites (desks, chairs, tables, monitors, sofas from the tileset)Technical Notes
<image>elements inside the existing SVG withimageRendering="pixelated"andhrefpointing to the sprite regionstileLoaderand render tiles atpx(room.x + tileCol), py(room.y + tileRow)width={px(24)} height={px(16)}wherepx(n) = n * TILE * SCALE(TILE=32, SCALE=2 → 64px per tile)public/office/tiles/for servingnpm run devAcceptance Criteria