Function getSpringDuration

  • The spring easing function will only look smooth at certain durations, with certain parameters. This functions returns the optimal duration to create a smooth springy animation based on physics

    Returns

    (optional) optimal duration for spring easings

    Note: Be very careful of only setting some of the spring parameters, it can cause errors if you are not careful

    Based on a function of the same name in animejs

    Parameters

    • spring-parameters: number[] = []

      mass = mass of object

      • stiffness = stiffness of spring
      • damping = amount to dampen spring motion
      • velocity = initial velocity of spring

    Returns number

Generated using TypeDoc