bga-dice
    Preparing search index...

    Interface AutoPlaceSettings<T>

    interface AutoPlaceSettings<T> {
        addSettings?: (die: T) => AddDieSettings;
        removeSettings?: (die: T) => RemoveDieSettings;
    }

    Type Parameters

    • T
    Index

    Properties

    addSettings?: (die: T) => AddDieSettings

    The add dice settings, for example if you want to set an animation from an invisible point (can be the player mini panel) Will only be called if the die match a stock with the "autoPlace" setting.

    Type declaration

      • (die: T): AddDieSettings
      • Parameters

        • die: T

          the die to add

        Returns AddDieSettings

        the settings to add the die. { fromElement: originElement } will add a slide in animation

    removeSettings?: (die: T) => RemoveDieSettings

    The remove settings, when a die does not match any stock with the "autoPlace" setting.

    Type declaration

      • (die: T): RemoveDieSettings
      • Parameters

        • die: T

          the die to remove

        Returns RemoveDieSettings

        the settings to remove the die. {} will simply remove the die from it's current stock without any error. { slideTo: destinationElement } will add an animation before removing the die.