pcs[i].length;j++)
              klampt_frontend.rpc(rpcs[i][j]);
          }
        }
      }
    }
    klampt_frontend.render();
    animationIndex = ind;
  }

  function animate()
  {
    if(!animating) return;
    if(lastAnimateTime == null) {
      lastAnimateTime = performance.now();
    }
    else {
      var curTime = performance.now();
      if(curTime - lastAnimateTime < 20)  { //max 50fps
        setTimeout(animate,20- (curTime - lastAnimateTime));
        return;
      }
      animationTime += 