Repeatedly calls the given function with increasing values from 0 to 1, by rescheduling animation frame after completion. Value is calculated from the elapsed time with 0 being the beginning time of the transition and 1 corresponding to the duration given.