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: function (x: number): void, duration_millis: number)
Parameters
drawFn (function (x: number): void) drawing function to call with the value
duration_millis (number) milliseconds for the total transition