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

Constructors 1
new(options: WangSetOptions): WangSet
Methods 2
getTileId(mask: number): number | undefined
isMember(localTileId: number): boolean
Properties 4
tilesetIndex: number
type: "blob" | "edge"
blobMap: ReadonlyMap<number, number>
members: ReadonlySet<number>
Source