bga-dice
    Preparing search index...

    Class DiceManager<T>

    Type Parameters

    • T
    Index

    Constructors

    Properties

    animationManager: any

    Methods

    • Parameters

      Returns void

    • Parameters

      • die: T

      Returns HTMLDivElement

    • Returns number

    • Parameters

      • die: T

        the die informations

      Returns HTMLElement

      the HTML element of an existing die

    • Parameters

      • die: T

        the die informations

      Returns string

      the id for a die element

    • Return the die face. Default: the face will be set to die.face.

      Parameters

      • die: T

        the die informations

      Returns number

      the die face

    • Returns the stock containing the die.

      Parameters

      • die: T

        the die informations

      Returns DiceStock<T>

      the stock containing the die

    • Returns number

    • Parameters

      • die: T

        the die informations

      Returns string | number

      the id for a die

    • Returns number

      the default perspective for all stocks.

    • Returns string

      the class to apply to selectable dice. Default 'bga-dice_selectable-die'.

    • Returns string

      the class to apply to selected dice. Default 'bga-dice_selected-die'.

    • Returns number

    • Returns string

      the type of the dice, either set in the settings or by using a default name if there is only 1 type.

    • Returns string

      the class to apply to selectable dice. Default 'bga-dice_disabled-die'.

    • Place some dice based on the autoPlace settings of each stock.

      Parameters

      • dice: T[]

      Returns Promise<Promise<boolean>[]>

    • Place a die based on the autoPlace settings of each stock.

      Parameters

      • die: T

      Returns Promise<boolean>

    • Remove a die.

      Parameters

      Returns Promise<boolean>

    • Update the die informations. Used when a change visible face.

      Parameters

      • die: T

        the die informations

      • OptionalupdateData: boolean

      Returns void