Skip to content

Instantly share code, notes, and snippets.

@jywarren
Created October 14, 2012 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jywarren/3889063 to your computer and use it in GitHub Desktop.
Save jywarren/3889063 to your computer and use it in GitHub Desktop.
SpectralWorkbench.org macro: Save offline
setup: function() {
// code to run on startup
$W.add_button("My Button",function(){
window.open($W.canvas.toDataURL(),'_newtab').focus() // this may not work if popups are blocked
})
},
draw: function() {
// code to run every frame
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment