mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
Updated JS mode examples, changed convenience function to have same camel case as Processing.getInstanceById()
This commit is contained in:
@@ -4,7 +4,7 @@ window.onload = function () {
|
||||
var audioNode = document.getElementsByTagName("audio")[0];
|
||||
|
||||
function tryFindSketch () {
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchID());
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchId());
|
||||
if ( sketch == undefined )
|
||||
setTimeout(tryFindSketch,200); // retry
|
||||
else
|
||||
|
||||
@@ -6,7 +6,7 @@ window.onload = function () {
|
||||
|
||||
// try and find the sketch
|
||||
function tryLinkSketch() {
|
||||
var sketch = Processing.getInstanceById( getProcessingSketchID() );
|
||||
var sketch = Processing.getInstanceById( getProcessingSketchId() );
|
||||
if ( sketch == undefined )
|
||||
setTimeout(tryLinkSketch, 200); /*try again later*/
|
||||
else {
|
||||
|
||||
@@ -6,7 +6,7 @@ window.onload = function () {
|
||||
}
|
||||
|
||||
function tryFindSketch () {
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchID());
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchId());
|
||||
if ( sketch == undefined )
|
||||
return setTimeout(tryFindSketch, 200); // try again ..
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ window.onload = function () {
|
||||
}
|
||||
|
||||
function tryFindSketch () {
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchID());
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchId());
|
||||
if ( sketch == undefined ) return setTimeout(tryFindSketch, 200);
|
||||
|
||||
var controller = new Controller(sketch,"form-form");
|
||||
|
||||
@@ -3,7 +3,7 @@ window.onload = function () {
|
||||
video['loop'] = true;
|
||||
|
||||
function tryFindSketch () {
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchID());
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchId());
|
||||
if ( sketch == undefined )
|
||||
return setTimeout(tryFindSketch, 200); // retry in 0.2 secs
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ window.onload = function () {
|
||||
|
||||
// try to find the Processing sketch instance, or retry
|
||||
function tryFindSketch () {
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchID());
|
||||
var sketch = Processing.getInstanceById(getProcessingSketchId());
|
||||
if ( sketch == undefined )
|
||||
setTimeout(tryFindSketch, 200); // retry in 0.2 secs
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user