Created
December 13, 2017 10:04
-
-
Save Viroide/32cd49405acf2ffff1db97be56a6484a to your computer and use it in GitHub Desktop.
print PIXI hierarchy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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