I have developed programs in Khan Academy\'s Computer Programming lessons that I would like to run outside of Khan Academy. How can that be done?
ADDON to the answer of Robert:
Processing.js uses radians as default for angle values, Khan Academy JS uses degrees. If you add following lines to Robert's code above (before the with statement), then you can use the rotate commands as they come from KA.
var rotateFn = processing.rotate;
processing.rotate = function(angle) {
rotateFn(processing.radians(angle));
}