r then = 0;
  function render(time) {
    var now = time * 0.001;
    var elapsedTime = now - then;
    then = now;
    app.render(elapsedTime);
    requestAnimationFrame(render);
  }
  requestAnimationFrame(render);
}

main();
</script>




