math docs
    Preparing search index...

    Function fromResponse

    • Converts a SwiftUI-style response — the spring's natural period, in seconds — to the smoothTime that update/damp consume. dampingRatio is the orthogonal second dial and is passed to update unchanged.

      Yields the same stiffness/damping as SwiftUI's Spring(response:dampingFraction:):

      spring3.update(state, target, spring.fromResponse(0.5), 0.3, delta); // bouncy, ~0.5s period
      

      Parameters

      • response: number

      Returns number