public void updateMorphTime ( float delta ) { offset += delta ; if ( offset < 0 ) { int index = shapes . indexOf ( current ) ; if ( index < 0 ) { index = shapes . size ( ) - 1 ; } int nframe = rational ( index + 1 ) ; setFrame ( index , nframe , offset ) ; offset += 1 ; } else if ( offset > 1 ) { int index = shapes . indexOf ( next ) ; if ( index < 1 ) { index = 0 ; } int nframe = rational ( index + 1 ) ; setFrame ( index , nframe , offset ) ; offset -= 1 ; } else { pointsDirty = true ; } }
Update the morph time and hence the curent frame