Skip to content

Instantly share code, notes, and snippets.

@Gazzell
Created January 28, 2020 12:36
Show Gist options
  • Save Gazzell/5adfaf41c470edd38bc8d06ff8f159e1 to your computer and use it in GitHub Desktop.
Save Gazzell/5adfaf41c470edd38bc8d06ff8f159e1 to your computer and use it in GitHub Desktop.
print PIXI hierarchy
function printHierarchy(node, padding="") {
let newPadding = padding;
if (node.name) {
newPadding += " |";
console.log(`${padding}-${node.name}`);
}
node.children.forEach(child => printHierarchy(child, newPadding));
}
printHierarchy(APP.safeGetChildByName(""));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment