def _pause_anim(event, params):
 params['pause'] = (not params['pause'])

def _pause_anim ( event , params ) : params [ 'pause' ] = ( not params [ 'pause' ] )
pause or continue the animation on mouse click .