Input event types

interface InputEvents {
    agentDeselected: {
        agent: Agent;
    };
    agentSelected: {
        agent: Agent;
        position: Position;
    };
    contextMenu: {
        agent?: Agent;
        position: Position;
    };
    dragEnd: {
        endPos: Position;
    };
    dragStart: {
        startPos: Position;
    };
    multipleSelected: {
        agents: Agent[];
    };
    selectionCleared: void;
}

Properties

agentDeselected: {
    agent: Agent;
}

Type declaration

agentSelected: {
    agent: Agent;
    position: Position;
}

Type declaration

contextMenu: {
    agent?: Agent;
    position: Position;
}

Type declaration

dragEnd: {
    endPos: Position;
}

Type declaration

dragStart: {
    startPos: Position;
}

Type declaration

multipleSelected: {
    agents: Agent[];
}

Type declaration

selectionCleared: void