traverse method
callback
- A function with as first argument an object3D object.
Executes the callback on this object and all descendants.
Note: Modifying the scene graph inside the callback is discouraged.
Implementation
void traverse(Function(Object3D) callback) {
callback(this);
final children = this.children;
for (int i = 0, l = children.length; i < l; i++) {
children[i].traverse(callback);
}
}