Skip to content

Instantly share code, notes, and snippets.

@oampo
Created January 19, 2012 10:30
Show Gist options
  • Save oampo/1639302 to your computer and use it in GitHub Desktop.
Save oampo/1639302 to your computer and use it in GitHub Desktop.
XHR for WebGL file export
var data = this.canvas.toDataURL();
var request = new Request({
url: 'http://127.0.0.1:8080',
onFailure: function(xhr) {
console.error(xhr);
}
});
url = request.send('data=' + data + '&frame=' + this.frameCount);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment