JirkaDellOro / FUDGE

Furtwangen University Didactic Game Editor
https://jirkadelloro.github.io/FUDGE
MIT License
33 stars 27 forks source link

deepsearch for childs & components #390

Closed MauriceHuchler closed 1 year ago

MauriceHuchler commented 1 year ago

ƒ.Node.getChildrenByName() & ƒ.Node.getComponentsByName() return the first layer of children / components. When building more complex graphs with nested nodes having multiple children its difficult to get the desired child or component.

Currently if you want to find deeper nodes you can just call ƒ.Node.getChildrenByName() again on the children. But imagine having a Node with very deep hierarchy. It would be messy to find the right depth for the desired node.

JirkaDellOro commented 1 year ago

use the iterator, like for (let node of branch.getIterator(...))

see https://jirkadelloro.github.io/FUDGE/Documentation/Reference/Core/classes/FudgeCore.Node.html#getIterator

JirkaDellOro commented 1 year ago

Wenn der Issue durch ist, bitte schließen