Files
processing4/javascript/examples/Environment/DocumentObjectModel/nodeTree/forrest.js
2011-06-15 06:42:24 +00:00

14 lines
287 B
JavaScript

// wait for document to load
window.onload = function () {
tryFindSketch();
}
function tryFindSketch () {
var sketch = Processing.instances[0];
if ( sketch == undefined )
return setTimeout(tryFindSketch, 200);
sketch.setTree( document.body.parentNode );
}