Files
processing4/javascript/examples/Environment/Input/lockedIn/promt.js
2011-06-10 20:27:11 +00:00

17 lines
342 B
JavaScript

window.onload = function () {
tryFindSketch();
}
function tryFindSketch () {
var sketch = Processing.instances[0];
if ( sketch == undefined )
return setTimeout( tryFindSketch, 200 ); // try again in 0.2 secs
sketch.setJS( this );
}
function promtForInput ( msg, def ) {
return window.prompt( msg, def );
}