1. 25 11月, 2010 2 次提交
    • A
      Merge remote branch 'remotes/upstream/master' · 812af5dc
      alteredq 提交于
      812af5dc
    • A
      Added load progress callback to binary loader. · e5ddb133
      alteredq 提交于
      Turns out it is working better over the real web than on localhost (where it seems loading is too fast for Chrome to pick up UI changes, so it queues them and shows them all just after loading is already finished).
      
      Still not working properly - getting length of full content, this seems to be unreliable across browser / server combination.
      
      Instead passing to callback JSON object with both total and loaded bytes, so this can be handled in the application layer:
      
      { total: bytes_total, loaded: bytes_loaded }
      
      To be used e.g. like this:
      
      loader.loadBinary( url, function( geometry ) { createScene( geometry ) }, path, updateProgress );
      
      function updateProgress( progress ) {
      
          var message = "Loaded ";
      
          if ( progress.total ) {
      
              message += ( 100 * progress.loaded / progress.total ).toFixed(0) + "%";
      
          } else {
      
              message += ( progress.loaded / 1000 ).toFixed(2) + " KB";
      
          }
      
          $( "status" ).innerHTML = message;
      
      }
      e5ddb133
  2. 24 11月, 2010 14 次提交
  3. 23 11月, 2010 11 次提交
  4. 22 11月, 2010 11 次提交
  5. 21 11月, 2010 2 次提交