PixelEventMap: Readonly<{
    battery: BatteryEvent;
    dataTransfer: Readonly<{
        totalBytes: number;
        type: "preparing" | "starting" | "completed";
    } | {
        error:
            | "timeout"
            | "outOfMemory"
            | "disconnected"
            | "unknown";
        type: "failed";
    } | {
        type: "progress";
    } & DataTransferProgress>;
    messageReceived: MessageOrType;
    messageSend: MessageOrType;
    remoteAction: number;
    roll: number;
    rollState: RollEvent;
    statusChanged: PixelStatusEvent;
    userMessage: UserMessageEvent;
}>

Event map for Pixel class. This is the list of supported events where the property name is the event name and the property type the event data type. Call Pixel.addEventListener to subscribe to an event.

Type declaration

  • battery: BatteryEvent

    Battery state changed notification.

  • dataTransfer: Readonly<{
        totalBytes: number;
        type: "preparing" | "starting" | "completed";
    } | {
        error:
            | "timeout"
            | "outOfMemory"
            | "disconnected"
            | "unknown";
        type: "failed";
    } | {
        type: "progress";
    } & DataTransferProgress>

    Data transfer.

  • messageReceived: MessageOrType

    Message received notification.

  • messageSend: MessageOrType

    Message send notification.

  • remoteAction: number

    Remote action request.

  • roll: number

    Roll result notification.

  • rollState: RollEvent

    Roll state changed notification.

  • statusChanged: PixelStatusEvent

    Pixel status changed notification.

  • userMessage: UserMessageEvent

    User message request.