mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
JavaScript mode examples updated for Processing 1.4.0
This commit is contained in:
@@ -4,7 +4,7 @@ window.onload = function () {
|
||||
}
|
||||
|
||||
function tryFindSketch() {
|
||||
var sketch = Processing.instances[0];
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchID());
|
||||
if ( sketch == undefined )
|
||||
return setTimeout(tryFindSketch, 200); // retry soon
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ window.onload = function () {
|
||||
|
||||
// find sketch instance
|
||||
function tryFindSketch () {
|
||||
var sketch = Processing.instances[0];
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchID());
|
||||
if ( sketch == undefined )
|
||||
setTimeout( tryFindSketch, 200 ); // try again in 0.2 secs
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user