GeezerVison is showing github.com — JavaScript mode examples updated for Processing 1.4.0 · Variablefrog/processing@e84ace1
File treeExpand file treeCollapse file tree Open diff view settings Libraries/Box2D/simpleBox2D
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: javascript/examples/Environment/DocumentObjectModel/colorFinder/jsinterface.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 14 | 14 |
| 15 | 15 | // Get the instance. We just use the first one. Another way would be to use | 16 | 16 | // the automaticaly generated ID "colorFinder", see <canvas> in index.html | 17 | | - var mySketchInstance = Processing.instances[0]; | | 17 | + var mySketchInstance = Processing.getInstanceById( getProcessingSketchID() ); | 18 | 18 |
| 19 | 19 | if ( mySketchInstance == undefined ) { // means it has not started | 20 | 20 | setTimeout( makeTheLink, 200 ); // try again later | |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/Environment/DocumentObjectModel/nodeTree/forrest.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,7 +5,7 @@ window.onload = function () { | 5 | 5 | } | 6 | 6 |
| 7 | 7 | function tryFindSketch () { | 8 | | - var sketch = Processing.instances[0]; | | 8 | + var sketch = Processing.getInstanceById( getProcessingSketchID() ); | 9 | 9 | if ( sketch == undefined ) | 10 | 10 | setTimeout(tryFindSketch, 200); // retry after 0.2 secs | 11 | 11 | else | |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/Environment/DocumentObjectModel/selectionFlower/selectionmonitor.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ window.onload = function () { | 12 | 12 |
| 13 | 13 | // this is called (repeatedly) to find the sketch | 14 | 14 | function getSketchInstance() { | 15 | | - var s = Processing.instances[0]; | | 15 | + var s = Processing.getInstanceById(getProcessingSketchID()); | 16 | 16 | if ( s == undefined ) { | 17 | 17 | setTimeout(getSketchInstance, 200); // try again a bit later | 18 | 18 |
| |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/Environment/Input/fileReader/reader.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ window.onload = function () { | 4 | 4 | } | 5 | 5 |
| 6 | 6 | function tryFindSketch() { | 7 | | - var sketch = Processing.instances[0]; | | 7 | + var sketch = Processing.getInstanceById(getProcessingSketchID()); | 8 | 8 | if ( sketch == undefined ) | 9 | 9 | return setTimeout(tryFindSketch, 200); // retry soon | 10 | 10 |
| |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/Environment/Input/lockedIn/promt.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ window.onload = function () { | 6 | 6 |
| 7 | 7 | // find sketch instance | 8 | 8 | function tryFindSketch () { | 9 | | - var sketch = Processing.instances[0]; | | 9 | + var sketch = Processing.getInstanceById(getProcessingSketchID()); | 10 | 10 | if ( sketch == undefined ) | 11 | 11 | setTimeout( tryFindSketch, 200 ); // try again in 0.2 secs | 12 | 12 | else | |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/HTML5/Audio/blobb/snd.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ window.onload = function () { | 4 | 4 | var audioNode = document.getElementsByTagName("audio")[0]; | 5 | 5 |
| 6 | 6 | function tryFindSketch () { | 7 | | - var sketch = Processing.instances[0]; | | 7 | + var sketch = Processing.getInstanceById(getProcessingSketchID()); | 8 | 8 | if ( sketch == undefined ) | 9 | 9 | setTimeout(tryFindSketch,200); // retry | 10 | 10 | else | |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/HTML5/DragDrop/wordDroppings/drag_drop.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ window.onload = function () { | 6 | 6 |
| 7 | 7 | // try and find the sketch | 8 | 8 | function tryLinkSketch() { | 9 | | - var sketch = Processing.instances[0]; | | 9 | + var sketch = Processing.getInstanceById( getProcessingSketchID() ); | 10 | 10 | if ( sketch == undefined ) | 11 | 11 | setTimeout(tryLinkSketch, 200); /*try again later*/ | 12 | 12 | else { | |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/HTML5/Input/colorRange/inteface.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ window.onload = function () { | 6 | 6 | } | 7 | 7 |
| 8 | 8 | function tryFindSketch () { | 9 | | - var sketch = Processing.instances[0]; | | 9 | + var sketch = Processing.getInstanceById(getProcessingSketchID()); | 10 | 10 | if ( sketch == undefined ) | 11 | 11 | return setTimeout(tryFindSketch, 200); // try again .. | 12 | 12 |
| |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/HTML5/Input/variableInputs/interface.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -3,7 +3,7 @@ window.onload = function () { | 3 | 3 | } | 4 | 4 |
| 5 | 5 | function tryFindSketch () { | 6 | | - var sketch = Processing.instances[0]; | | 6 | + var sketch = Processing.getInstanceById(getProcessingSketchID()); | 7 | 7 | if ( sketch == undefined ) return setTimeout(tryFindSketch, 200); | 8 | 8 |
| 9 | 9 | var controller = new Controller(sketch,"form-form"); | |
Collapse file Copy file name to clipboardExpand all lines: javascript/examples/HTML5/Video/charmyDance/charmyDance.pde +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 13 | 13 | * <video width="480" height="360" style="display:none"> | 14 | 14 | * <source src="charmy.mp4" /> | 15 | 15 | * <source src="charmy.ogv" /> | | 16 | + * <source src="charmy.webm" /> | 16 | 17 | * </video> | 17 | 18 | */ | 18 | 19 |
| 19 | 20 | Video video; | 20 | 21 | PImage frame; | 21 | | - float fSec = 1/25.0; | 22 | | - int fMillis = int(1000 * fSec); | 23 | | - int ts = 0; | 24 | 22 |
| 25 | 23 | void setup () | 26 | 24 | { | |
|