gradum-kit - v0.1.0
    Preparing search index...

    Type Alias StateInterpolator<Type, State, ClassType>

    StateInterpolator: (
        state: State,
        index: number,
        total: number,
        object: ClassType,
    ) => Type

    Type Parameters

    • Type

      The type of the configured value.

    • State extends KeyType

      The set of states the reifect can switch between.

    • ClassType extends object = Element

      The type of the attached object.

    Type Declaration

      • (state: State, index: number, total: number, object: ClassType): Type
      • Parameters

        • state: State

          The state the value is being computed for.

        • index: number

          The object's position among the attached objects.

        • total: number

          How many objects are attached in total.

        • object: ClassType

          The object the value is being computed for.

        Returns Type

        The value to use for that object in that state.

    Computes a value per attached object and per state, for configurations that vary along both axes. Use ReifectInterpolator when the value does not depend on the state.