Skip to content

Instantly share code, notes, and snippets.

@xeolabs
Created October 17, 2009 06:54
Show Gist options
  • Select an option

  • Save xeolabs/212273 to your computer and use it in GitHub Desktop.

Select an option

Save xeolabs/212273 to your computer and use it in GitHub Desktop.
var graph = SceneJs.graph(
SceneJs.node({
preVisit: function(nodeContext) {
var graphContext = nodeContext.getGraphContext();
graphContext.counter++;
}
})
);
var graphContext = { counter: 0 };
while (graphContext.counter < 10) {
graph.traverse(graphContext);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment