In-game tools · function
treeShape
A tree as a comparable string: structure, text, geometry and name, but never identity.
Explained in In-game tools.
function treeShape(node: UiNode, depth?: number): stringimport { treeShape } from '@driftengine/tools';Parameters
| Parameter | Type | Description |
|---|---|---|
node | UiNode | |
depth? | number |
In depth
What it deliberately leaves out is object identity, because a panel that reuses its pooled
rows and one that rebuilt them are the same panel as far as the contract is concerned — the
whole point of pooling is that nobody downstream can tell. What it deliberately includes is
hidden, because a pooled row that is not showing is exactly how a panel shrinks, and two trees
differing only there are showing different things.