Skip to content

five-on-it / apps/client/src/ui/minimap-draw

apps/client/src/ui/minimap-draw ​

What the maps draw, on a canvas, knowing nothing of React: the city's static layer, drawn once per level into an offscreen canvas at about two pixels a metre (staticLayer: the ground lighter the higher it stands, the districts tinted by their themes, the roads along their centre lines, the footprints of the buildings, structures and props in their colours, the nail strips, the game's restricted zones and race gates), the garages' and the shops' pins (drawPins), the moving markers (drawMarkers) and the labels' candidates (labelCandidates: map-labels.ts places and writes them). The corner map (Minimap.tsx) copies the window of the static layer round the player, the full map (FullMap.tsx) the whole of it; both draw the rest over it in CSS px.

Interfaces ​

Variables ​

Functions ​