var Potion = require('potion');

var app = Potion.init(document.querySelector('.game'), {
  configure: function() {
    this.assets.load('text', 'textfile.txt');
    this.assets.load('image', 'bunny.png');
    this.assets.load('json', 'data.json');

    for (var i=0; i<1000; i++) {
      this.assets.load(function(done) {
        setTimeout(function() {
          done('1');
        }, i/100);
      });
    }
  },

  render: function() {
    app.video.ctx.font = '20px sans-serif';
    app.video.ctx.fillText(app.assets.get('textfile.txt'), 10, 30);

    app.video.ctx.drawImage(app.assets.get('bunny.png'), 10, 50);

    var data = app.assets.get('data.json');
    for (var i=0; i<data.squares; i++) {
      var x = i * (data.size + data.padding) + 10;
      var y = 100;

      app.video.ctx.fillRect(x, y, data.size, data.size);
    }
  }
});

@@ -246,46 +246,44 @@
 ');%0A
-%0A
   
-  for (var i=0; i%3C1000; i++
+%7D,%0A%0A  mousedown: function(
 ) %7B%0A    
   th
@@ -278,22 +278,19 @@
 ) %7B%0A    
-  this
+app
 .assets.
@@ -298,44 +298,29 @@
 oad(
-function(done) %7B%0A        setTimeout(
+'json', 'data.json', 
 func
@@ -316,32 +316,36 @@
 json', function(
+data
 ) %7B%0A          do
@@ -342,52 +342,76 @@
     
-   
- done('1');%0A        %7D, i/100
+console.log('Reloaded data.json');%0A      console.log(data
 );%0A
-  
     %7D);%0A
     
@@ -406,22 +406,16 @@
     %7D);%0A
-    %7D%0A
   %7D,%0A%0A  

add runtime asset loading in examples