Skip to content

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? ​

optional climate?: "none" | "temperate" | "meadow" | "forest" | "alpine" | "farmland" | "steppe" | "desert" | "autumn" | "coast"

clock? ​

optional clock?: object

clock.pace? ​

optional pace?: number

clock.start? ​

optional start?: string

districts ​

districts: object[]

grids? ​

optional grids?: object[]

hills? ​

optional hills?: object[]

name ​

name: string

parks? ​

optional parks?: object[]

places? ​

optional places?: object[]

roads? ​

optional roads?: object[]

roundabouts? ​

optional roundabouts?: object[]

seed? ​

optional seed?: number

size? ​

optional size?: number

spawn ​

spawn: object

spawn.near? ​

optional near?: [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? ​

optional water?: 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 ​

PointPath

to ​

Pt

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 ​

Pt

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 ​

Selection

Returns ​

void