mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 09:39:19 +01:00
JavaScript mode examples updated for Processing 1.4.0
This commit is contained in:
@@ -11,7 +11,7 @@ window.onload = function () {
|
||||
|
||||
// try to get the sketch instance from Processing.js
|
||||
function tryFindSketch () {
|
||||
var sketch = Processing.instances[0];
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchID());
|
||||
if ( sketch == undefined )
|
||||
return setTimeout( tryFindSketch, 200 ); // retry
|
||||
|
||||
|
||||
Reference in New Issue
Block a user