mwg API
    Preparing search index...

    Variable XP_AUTOTILE_PATTERNSConst

    XP_AUTOTILE_PATTERNS: readonly XpAutotilePattern[] = ...

    The standard XP autotile pattern table (48 patterns). An XP autotile image is a 96 by 128 template: a 6-column grid of 16px mini-blocks, and each baked pattern assembles four of them. tile % 48 selects the pattern; tile / 48 (floored) selects which of the map's autotile images.

    Miniblock entries are 0-based here (block n sits at (n % 6) * 16, (n / 6) * 16). Learned from real XP autotile images and map data rather than assumed: the 6 by 8 mini-grid fits the measured 96 by 128 template exactly, and the neighbor table below reproduces baked map patterns.

    import { XP_AUTOTILE_PATTERNS, XP_NEIGHBORS_TO_PATTERN } from '@datamoc/mwg/two-d/render';

    console.log(XP_AUTOTILE_PATTERNS.length); // 48 - one entry per baked pattern
    console.log(XP_AUTOTILE_PATTERNS[0]); // [26,27,32,33] - the filled interior tile
    console.log(XP_NEIGHBORS_TO_PATTERN.length); // 256 - one entry per 8-neighbour mask
    console.log(XP_NEIGHBORS_TO_PATTERN[255]); // 0 - surrounded on all sides is the interior