traverseAncestors method
void
traverseAncestors(
- dynamic callback(
- Object3D?
inherited
callback
- A function with as first argument an object3D object.
Executes the callback on all ancestors.
Note: Modifying the scene graph inside the callback is discouraged.
Implementation
void traverseAncestors(Function(Object3D?) callback) {
final parent = this.parent;
if (parent != null) {
callback(parent);
parent.traverseAncestors(callback);
}
}