Is there any reason why Object3D.traverseAncestors is not called on this, unlike Object3D.traverse ?
See original GitHub issueI expected Object3D.traverseAncestors
to behave like Object3D.traverse
in this regard. Has it been done like this intentionally for some reason ?
If you want I can add callback( this );
here :
https://github.com/mrdoob/three.js/blob/6400f2c9b6ee58e01c005a66f00c7cd1113752aa/src/core/Object3D.js#L494
Although it could potentially break a lot of things for such a trivial benefitā¦
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Object3D#traverse ā three.js docs
Like traverse, but the callback will only be executed for visible objects. Descendants of invisible objects are not traversed.
Read more >abort object3d.traverse in three.js - Stack Overflow
The processing basically continues until your callback returns true , at which point it triggers a cascade back up the traverse recursionĀ ...
Read more >Loop over all objects in a threejs scene with the Object3d ...
The way this works is I just call the traverse method off of the scene object, or any object based off the object3d...
Read more >Three.js Cleanup
For Object3D, if they aren't referenced they'll be garbage collected so there's no reason to free them. Just remove them from the scene....
Read more >aframe-vatiste-toolkit Documentation and Reference
Object3D as a glb file in a single function call. There's even a PhysX-based physics ... Object3D.traverse to find the first object where...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@felixmariotto Iāve made the experience that other users were confused by
traverseAncestors()
, too š . They thought the method just changes the direction of the traversal but apart from that behaves identical.This sentence actually meant that I agree that the current behaviour does make sense according the semantic of āancestorsā.