API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classWangSet
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
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
new(options: WangSetOptions): WangSet getTileId(mask: number): number | undefined isMember(localTileId: number): boolean tilesetIndex: number type: "blob" | "edge" blobMap: ReadonlyMap<number, number> members: ReadonlySet<number>