adding cyclic behavior to particle demo