mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 21:29:17 +01:00
JavaScript mode examples updated for Processing 1.4.0
This commit is contained in:
@@ -12,7 +12,7 @@ window.onload = function () {
|
||||
|
||||
// this is called (repeatedly) to find the sketch
|
||||
function getSketchInstance() {
|
||||
var s = Processing.instances[0];
|
||||
var s = Processing.getInstanceById(getProcessingSketchID());
|
||||
if ( s == undefined ) {
|
||||
setTimeout(getSketchInstance, 200); // try again a bit later
|
||||
|
||||
|
||||
Reference in New Issue
Block a user