message: demo: Improve gltf demo usability
  We now automatically rescale the model so that the bounding box is
  reasonably sized. Also implement animation playback if any animations
  are in the scene.
diff: <script>
  var container;
  - var camera, scene, renderer;
  + var camera, scene, renderer, mixer, clock;
  var windowHalfX = window.innerWidth / 2;
  var windowHalfY = window.innerHeight / 2;
  - var timers = {};
  -
  - console.time = function(label) {
  - timers[label] = performance.now();
  - };
  -
  - console.timeEnd = function(label) {
  - var time = performance.now() - timers[label];
  - document.getElementById('info').append(label + " took " + time.toFixed(2) + " ms");
  - };
  -
  init();
  animate();
  scene = new THREE.Scene();
  - var ambientLight = new THREE.AmbientLight(0xcccccc, 0.2);
  + var ambientLight = new THREE.AmbientLight(0xcccccc, 0.3);
  scene.add(ambientLight);
  var pointLight = new THREE.PointLight(0xffffff, 0.8);
  scene.add(camera);
  var onProgress = function (xhr) {};
  - var onError = function () {};
  + var onError = function (e) {
  + console.log(e);
  + };
  var loader = new THREE.GLTFLoader()
  loader.setMeshoptDecoder(MeshoptDecoder)
  - loader.load('pirate.glb', function (gltf) { scene.add(gltf.scene); }, onProgress, onError);
  + loader.load('pirate.glb', function (gltf) {
  + var bbox = new THREE.Box3().setFromObject(gltf.scene);
  + var scale = 2 / (bbox.max.y - bbox.min.y);
  +
  + gltf.scene.scale.set(scale, scale, scale);
  + gltf.scene.position.set(0, 0, 0);
  +
  + scene.add(gltf.scene);
  +
  + mixer = new THREE.AnimationMixer(gltf.scene);
  +
  + if (gltf.animations.length) {
  + mixer.clipAction(gltf.animations[gltf.animations.length - 1]).play();
  + }
  + }, onProgress, onError);
  renderer = new THREE.WebGLRenderer();
  renderer.setPixelRatio(window.devicePixelRatio);
  container.appendChild(renderer.domElement);
  window.addEventListener('resize', onWindowResize, false);
  +
  + clock = new THREE.Clock();
  }
  function onWindowResize()
  function animate()
  {
  + if (mixer) {
  + mixer.update(clock.getDelta());
  + }
  +
  requestAnimationFrame(animate);
  render();
  }
  