walk method
Implementation
Iterable<(SceneNode, int)> walk() sync* {
Iterable<(SceneNode, int)> visit(SceneNode n, int depth) sync* {
yield (n, depth);
for (var c in n.children) {
yield* visit(c, depth + 1);
}
}
yield* visit(root, 0);
}