API reference

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

C

classWangSet

@codexo/exojs-tilemap / tilemap / stable

Describes a Wang autotile set: a mapping from a neighbor bitmask to a local tile ID within a specific tileset. Blob bitmask bit layout (powers of 2): - Bit 0 (1): Top-left - Bit 1 (2): Top - Bit 2 (4): Top-right - Bit 3 (8): Left - Bit 4 (16): Right - Bit 5 (32): Bottom-left - Bit 6 (64): Bottom - Bit 7 (128): Bottom-right Diagonal (corner) bits are only set when both adjacent cardinal directions are also set - reducing 256 raw combinations to 47 meaningful blob states. Edge bitmask bit layout: - Bit 0 (1): Top - Bit 1 (2): Right - Bit 2 (4): Bottom - Bit 3 (8): Left

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

Describes a Wang autotile set: a mapping from a neighbor bitmask to a local tile ID within a specific tileset.

Blob bitmask bit layout (powers of 2): - Bit 0 (1): Top-left - Bit 1 (2): Top - Bit 2 (4): Top-right - Bit 3 (8): Left - Bit 4 (16): Right - Bit 5 (32): Bottom-left - Bit 6 (64): Bottom - Bit 7 (128): Bottom-right

Diagonal (corner) bits are only set when both adjacent cardinal directions are also set - reducing 256 raw combinations to 47 meaningful blob states.

Edge bitmask bit layout: - Bit 0 (1): Top - Bit 1 (2): Right - Bit 2 (4): Bottom - Bit 3 (8): Left

Constructors1
Methods2
getTileId(mask: number): number | undefined
Look up the local tile ID for a given neighbor bitmask. Returns undefined if the mask has no mapping in this set.
isMember(localTileId: number): boolean
Whether a local tile ID belongs to this Wang group. True for every variant the set produces plus any explicit WangSetOptions.members. Used as the default, variant-stable neighbour-membership test by autoTile and refreshCell.
Properties4
tilesetIndex: number
Index of the tileset that contains the Wang tiles.
type: "blob" | "edge"
The Wang mode: 'blob' (8-neighbor) or 'edge' (4-neighbor).
blobMap: ReadonlyMap<number, number>
Read-only view of the full bitmask → tile-ID mapping.
members: ReadonlySet<number>
Read-only view of the local tile IDs that count as group members.
Source