API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceWangSetOptions

@codexo/exojs-tilemap / tilemap / stable

Options for constructing a WangSet.

4
props
0
methods
0
events
Import
import { WangSetOptions } from '@codexo/exojs-tilemap'

Options for constructing a WangSet.

Properties4
blobMap: ReadonlyMap<number, number> | Record<number, number>
Map from Wang bitmask to local tile ID within the tileset. For blob mode (8-neighbor), keys are 0-255; the 47 valid combinations of the blob encoding must be covered at minimum. For edge mode (4-neighbor), keys are 0-15. Accepts either a ReadonlyMap or a plain Record<number, number>.
members?: Iterable<number, any, any>
Extra local tile IDs that count as belonging to this Wang group, beyond the variant IDs already present as blobMap *values*. Membership is what autoTile / refreshCell use to decide whether a neighbouring cell is "part of the terrain". Because every value in blobMap is itself a member, group membership stays stable no matter which variant a cell currently shows - that is what makes incremental refreshCell correct. Add the *base* tile ID you paint with here if it is not already one of the blobMap variants.
tilesetIndex: number
Which TileSet contains the Wang tiles (index into the layer's tilesets array).
type?: "blob" | "edge"
Whether this is a blob (8-neighbor, default) or edge (4-neighbor) Wang set.
Source