five-on-it / apps/client/src/ui/studio/StudioMap / StudioMapProps
Interface: StudioMapProps
Defined in: apps/client/src/ui/studio/StudioMap.tsx:45
What the map is given.
Properties
drawing
drawing:
Pt[]
Defined in: apps/client/src/ui/studio/StudioMap.tsx:52
The points of a road or river being drawn.
handles
handles:
Handle[]
Defined in: apps/client/src/ui/studio/StudioMap.tsx:49
picking
picking:
boolean
Defined in: apps/client/src/ui/studio/StudioMap.tsx:54
Whether a click on an element selects it (the select tool); else it is the tool's, as on the ground.
pins
pins:
Pin[]
Defined in: apps/client/src/ui/studio/StudioMap.tsx:50
plan
plan:
CityPlan|undefined
Defined in: apps/client/src/ui/studio/StudioMap.tsx:47
selection
selection:
Selection|undefined
Defined in: apps/client/src/ui/studio/StudioMap.tsx:48
spec
spec:
object
Defined in: apps/client/src/ui/studio/StudioMap.tsx:46
climate?
optionalclimate?:"none"|"temperate"|"meadow"|"forest"|"alpine"|"farmland"|"steppe"|"desert"|"autumn"|"coast"
clock?
optionalclock?:object
clock.pace?
optionalpace?:number
clock.start?
optionalstart?:string
districts
districts:
object[]
grids?
optionalgrids?:object[]
hills?
optionalhills?:object[]
name
name:
string
parks?
optionalparks?:object[]
places?
optionalplaces?:object[]
roads?
optionalroads?:object[]
roundabouts?
optionalroundabouts?:object[]
seed?
optionalseed?:number
size?
optionalsize?:number
spawn
spawn:
object
spawn.near?
optionalnear?: [number,number] | {at: [number,number];grid:string; } | {arm:number;roundabout:string; } | {at:number|"start"|"end";road:string; } | {hill:string; }
spawn.road
road:
string
template
template:
"city"
water?
optionalwater?:object[]
Methods
onDrag()
onDrag(
path,to,done):void
Defined in: apps/client/src/ui/studio/StudioMap.tsx:60
A handle dragged to a point; done once it is let go.
Parameters
path
to
done
boolean
Returns
void
onGround()
onGround(
at):void
Defined in: apps/client/src/ui/studio/StudioMap.tsx:56
A click on the ground (the tool's), in the game's frame.
Parameters
at
Returns
void
onHover()
onHover(
at):void
Defined in: apps/client/src/ui/studio/StudioMap.tsx:62
The pointer over the map, in the game's frame (the coordinates shown).
Parameters
at
Pt | undefined
Returns
void
onSelect()
onSelect(
selection):void
Defined in: apps/client/src/ui/studio/StudioMap.tsx:58
A click on an element: it is selected.
Parameters
selection
Returns
void