function* traverseAncestorsGenerator( object ) {

	const parent = object.parent;

	if ( parent !== null ) {

		yield parent;

		yield* traverseAncestorsGenerator( parent );

	}

}
Generator based alternative to {@link Object3D#traverseAncestors}.

@param {Object3D} object Object to traverse.
@yields {Object3D} Objects that passed the filter condition.