Triangle.js Docs
    Preparing search index...

    Interface Events

    interface Events {
        "falling.lock": LockRes;
        "falling.lock.pre": undefined;
        "falling.new": { isHold: boolean; piece: Engine.Mino };
        "garbage.cancel": { amount: number; iid: number; size: number };
        "garbage.confirm": { frame: number; gameid: number; iid: number };
        "garbage.receive": { amount: number; iid: number; originalAmount: number };
        "garbage.tank": {
            amount: number;
            column: number;
            iid: number;
            size: number;
        };
        "queue.add": Engine.Mino[];
    }
    Index

    Properties

    "falling.lock": LockRes

    Fired whenever a piece locks.

    "falling.lock.pre": undefined

    Fires right before a piece locks

    "falling.new": { isHold: boolean; piece: Engine.Mino }

    Fires whenever a new piece spawns.

    "garbage.cancel": { amount: number; iid: number; size: number }

    Fired immediately after garbage is cancelled.

    Type Declaration

    • amount: number

      The amount of garbage that was cancelled

    • iid: number

      The garbage's interaction id

    • size: number

      The width of the would-be garbage

    "garbage.confirm": { frame: number; gameid: number; iid: number }

    Fired when garbage is confirmed (interaction_confirm ige). This starts the cancel timer (usually 20 frames)

    Type Declaration

    • frame: number

      The frame to start timer at

    • gameid: number

      The sender's game id

    • iid: number

      The garbage's interaction id

    "garbage.receive": { amount: number; iid: number; originalAmount: number }

    Fired when garbage is recieved, immediately after it is added to the garbage queue

    Type Declaration

    • amount: number

      The amount added to the garbage queue after passthrough canceling

    • iid: number

      The garbage's interaction id

    • originalAmount: number

      The original amount recieved before passthrough cancelling

    "garbage.tank": { amount: number; column: number; iid: number; size: number }

    Fired immediately after garbage is tanked.

    Type Declaration

    • amount: number

      The height of the garbage column

    • column: number

      The garbage's spawn column (0-indexed)

    • iid: number

      The garbage's interaction id

    • size: number

      The width of the garbage column

    "queue.add": Engine.Mino[]

    Fired whenever a new set of pieces is added to the queue.