code: function update () {
      const bestSpeed = (target - current) * springK
      currentSpeed = linearlyApproach(currentSpeed, bestSpeed, acceleration)
      current += currentSpeed
      if (Math.abs(current - target) < 0.1) {
        current = target
      }
    }
docs: Animation update logic.