bga-dice
    Preparing search index...

    Interface DieStockSettings<T>

    interface DieStockSettings<T> {
        autoPlace?: (card: T) => boolean;
        dieClickEventFilter?: DieClickEventFilter;
        perspective?: number;
        selectableDieClass?: string;
        selectedDieClass?: string;
        sort?: SortFunction<T>;
        unselectableDieClass?: string;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    autoPlace?: (card: T) => boolean

    Say if a given card should be placed on this stock, based on card properties. For example, every card with location === 'hand' and location_arg == this.player_id should go to the current player hand. If unset, all cards on this stock must be added manually on this stock.

    Type declaration

      • (card: T): boolean
      • Parameters

        • card: T

          the card to place on a stock

        Returns boolean

        true if the card should be placed on this stock.

    dieClickEventFilter?: DieClickEventFilter

    The filter on die click event. Use setting from manager is unset.

    perspective?: number

    Perspective effect on Stock elements. Default 1000px. Can be overriden on each stock.

    selectableDieClass?: string

    The class to apply to selectable dice. Use class from manager is unset.

    selectedDieClass?: string

    The class to apply to selected dice. Use class from manager is unset.

    sort?: SortFunction<T>

    Indicate the die sorting (unset means no sorting, new dice will be added at the end). For example, use sort: sortFunction('type', '-type_arg') to sort by type then type_arg (in reversed order if prefixed with -). Be sure you typed the values correctly! Else '11' will be before '2'.

    unselectableDieClass?: string

    The class to apply to selectable dice. Use class from manager is unset.