NewboO

Results 15 comments of NewboO

@yaustar What if you don't know if the script or component you want is the direct parent or higher in the hierarchy? What if the parent doesn't have the script...

All the parents, same as Unity though "*InParents" would be more accurate indeed.

I included the suggestion to avoid empty arrays, and also applied it to `find` function. However, using a `this[]` type feels really off. In your example, it would indeed return...

Function names are now pluralized as `*InParents` for clarity and are also non-recursive. The `results` parameter has been removed again by using another way to have a single const array...

I added `forEachParent` and used it in `findParents` the same way `find` is now using `forEach`. I already did `findOneParent` but it was named `findOneInParents`, I changed its name for...

Imo, what's more important than aligning with another game engine (or even with a javascript library) is both the consistency and the symmetry between finding among descendants and finding among...

> IMO it would be nice/intuitive that `GraphNode` would follow the rest of the JS world, but it would also break a bunch of projects in the meantime... Is there...

> Also, including own node in search, with returning a single result - will lead to unwanted cases where in order to ignore own node - need to start from...

So let's try another solution by adding a parameter to let the user choose to include self node in the search. It's true by default for `GraphNode.forEach`, `GraphNode.find`, `GraphNode.findOne`, `GraphNode.findByName`,...

I'm puzzled, how is the following (which was modified just 8 months ago) ```javascript findByTag() { const query = arguments; const results = []; const queryNode = (node, checkNode) =>...