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.

transition(drawFn: any, duration_millis: any)
Parameters
drawFn (any) drawing function to call with the value
duration_millis (any) milliseconds for the total transition