js mode example: render node tree graph

This commit is contained in:
fjenett
2011-06-15 06:42:24 +00:00
parent 9f982b8e4c
commit 574513b926
2 changed files with 101 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
// 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 );
}