PixelInfo: Readonly<{
    batteryLevel: number;
    colorway: PixelColorway;
    currentFace: number;
    currentFaceIndex: number;
    dieType: PixelDieType;
    firmwareDate: Date;
    isCharging: boolean;
    ledCount: number;
    name: string;
    pixelId: number;
    rollState: PixelRollState;
    rssi: number;
    systemId: string;
}>

Common accessible values for all Pixel implementations.

Type declaration

  • batteryLevel: number

    The Pixel battery level (percentage).

  • colorway: PixelColorway

    The Pixel color.

  • currentFace: number

    The value of the die face that is currently facing up.

    • This value is always an integer number.
    • D10 returns values ranging from 0 to 9 included.
    • D00 returns 0, 10, 20, ..., 90.
    • Fudge die returns +1, 0 and -1.
  • currentFaceIndex: number

    The 0-based index of the die face that is currently facing up.

    Indices are continuous and follow the numerical order of the die faces values.

    A D20 die will have face indices ranging from 0 to 19.
    Index 0 corresponds to face 1 and index 19 to face 20.

    D10 and D00 share the same face indices but have different face values.
    Index 0 corresponds to face 0 of both dice types.
    Index 9 corresponds to face 9 for a D10 and to face 90 for a D00.

    The fudge die returns the following indices:
    - O and 5 for the "+" face .
    - 1 and 4 for the "-" face.
    - 2 and 3 for the "blank" face.
  • dieType: PixelDieType

    The Pixel die type.

  • firmwareDate: Date

    The Pixel firmware build date.

  • isCharging: boolean

    Whether the Pixel battery is charging or not. Set to 'true' if fully charged but still on charger.

  • ledCount: number

    The number of LEDs of the Pixel.

  • name: string

    The Pixels die name.

  • pixelId: number

    The unique Pixel id of the device.

  • rollState: PixelRollState

    The Pixel roll state.

  • rssi: number

    The last RSSI value measured by the Pixel.

  • systemId: string

    The unique id assigned by the system to the Pixel Bluetooth peripheral.