Animation hang

It looks like this was the culprit. 

while( nextKey.time < currentTime  ) {

It's possible that the nextKey.time SHOULD be in the past, because we have looped over the end. 

replaced with 

//if(nextKey.index < prevKey.index ) then we have wrapped over the end, and nextKey.time < currentTime will loop forever
while( nextKey && nextKey.time < currentTime  && nextKey.index > prevKey.index) {