Same as getChild(name), except that it first walks all the way up the hierarchy to the eldest grandparent, so that children can be found anywhere.
(String target)
| 2107 | * hierarchy to the eldest grandparent, so that children can be found anywhere. |
| 2108 | */ |
| 2109 | public PShape findChild(String target) { |
| 2110 | if (parent == null) { |
| 2111 | return getChild(target); |
| 2112 | |
| 2113 | } else { |
| 2114 | return parent.findChild(target); |
| 2115 | } |
| 2116 | } |
| 2117 | |
| 2118 | |
| 2119 | // can't be just 'add' because that suggests additive geometry |