SpawnLocationOptions
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:73
Options for deterministic spawn coordinate selection and projection.
Properties
Section titled “Properties”candidates?
Section titled “candidates?”
optionalcandidates?: readonlyHexCoordinates[]
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:81
Explicit candidate coordinates to choose from instead of the whole shape.
count:
number
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:77
Number of spawn locations to return.
edgePadding?
Section titled “edgePadding?”
optionaledgePadding?:number
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:87
Number of outer rings/rows to avoid when selecting automatic candidates.
elevation?
Section titled “elevation?”
optionalelevation?:number
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:89
Elevation used when projecting spawn locations to world positions.
idPrefix?
Section titled “idPrefix?”
optionalidPrefix?:string
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:91
Prefix used for generated spawn ids.
minDistance?
Section titled “minDistance?”
optionalminDistance?:number
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:85
Minimum axial distance between returned spawn coordinates.
passable?
Section titled “passable?”
optionalpassable?: (coordinates) =>boolean
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:83
Predicate used to reject blocked or otherwise unsuitable coordinates.
Parameters
Section titled “Parameters”coordinates
Section titled “coordinates”Returns
Section titled “Returns”boolean
optionalseed?:string|number
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:79
Seed used when candidate order must be randomized.
shape:
GameboardShape
Defined in: packages/declarative-hex-worlds/src/coordinates/grid.ts:75
Board shape to select candidate spawn coordinates from.