Skip to content

five-on-it / apps/client/src/ui/studio/edits / removeElement

Function: removeElement() ​

removeElement(spec, selection): object

Defined in: apps/client/src/ui/studio/edits.ts:275

A spec without the selected element (the spawn stays: a city needs one).

Parameters ​

spec ​

climate? ​

"none" | "temperate" | "meadow" | "forest" | "alpine" | "farmland" | "steppe" | "desert" | "autumn" | "coast" = ...

clock? ​

{ pace?: number; start?: string; } = ...

clock.pace? ​

number = ...

clock.start? ​

string = ...

districts ​

object[] = ...

grids? ​

object[] = ...

hills? ​

object[] = ...

name ​

string = ...

parks? ​

object[] = ...

places? ​

object[] = ...

roads? ​

object[] = ...

roundabouts? ​

object[] = ...

seed? ​

number = ...

size? ​

number = ...

spawn ​

{ near?: [number, number] | { at: [number, number]; grid: string; } | { arm: number; roundabout: string; } | { at: number | "start" | "end"; road: string; } | { hill: string; }; road: string; } = ...

spawn.near? ​

[number, number] | { at: [number, number]; grid: string; } | { arm: number; roundabout: string; } | { at: number | "start" | "end"; road: string; } | { hill: string; } = ...

spawn.road ​

string = ...

template ​

"city" = ...

water? ​

object[] = ...

selection ​

Selection

Returns ​

object

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[]