Checks a resolved autotile layout once, up front. Throws naming the first problem: a bad slot, an empty shape table, an empty animation cycle, a cycle kind outside its slot's kinds, a bad XP index, or a frame count below one.
import { assertAutotileLayout, RPGM_FLOOR_AUTOTILE_TABLE,} from '@datamoc/mwg/two-d/render';assertAutotileLayout({ format: 'rpgm-mv', slot: 0, table: RPGM_FLOOR_AUTOTILE_TABLE, cycles: [[0, 1, 2]] });assertAutotileLayout({ format: 'rpgm-xp', index: 2, frames: 1, single: false }); Copy
import { assertAutotileLayout, RPGM_FLOOR_AUTOTILE_TABLE,} from '@datamoc/mwg/two-d/render';assertAutotileLayout({ format: 'rpgm-mv', slot: 0, table: RPGM_FLOOR_AUTOTILE_TABLE, cycles: [[0, 1, 2]] });assertAutotileLayout({ format: 'rpgm-xp', index: 2, frames: 1, single: false });
Checks a resolved autotile layout once, up front. Throws naming the first problem: a bad slot, an empty shape table, an empty animation cycle, a cycle kind outside its slot's kinds, a bad XP index, or a frame count below one.