@tamb/gamegrid
    Preparing search index...

    Variable gridEventsEnumConst

    gridEventsEnum: {
        BOUNDARY: string;
        BOUNDARY_X: string;
        BOUNDARY_Y: string;
        CREATED: string;
        DESTROYED: string;
        MOVE_BLOCKED: string;
        MOVE_COLLISION: string;
        MOVE_DETTACH: string;
        MOVE_DOWN: string;
        MOVE_LAND: string;
        MOVE_LEFT: string;
        MOVE_RIGHT: string;
        MOVE_UP: string;
        RENDERED: string;
        WRAP: string;
        WRAP_X: string;
        WRAP_Y: string;
    } = ...

    String names of bubbling CustomEvents emitted by GameGrid.

    Type Declaration

    • Every dispatch funnels through the internal helper fireGameGridEvent; detail matches IGameGridEventDetail (always carries gameGridInstance).
    • Prefer IOptions.eventTarget (or attach on a bubbled ancestor) when running multiple grids on one page.
    const target = gg.options.eventTarget ?? window;
    target.addEventListener(gridEventsEnum.MOVE_LAND, (event: GameGridDOMEvent) => {
    const { gameGridInstance } = event.detail;
    console.log(gameGridInstance.getState());
    });