function* traverseGenerator( object ) {

	yield object;

	const children = object.children;

	for ( let i = 0, l = children.length; i < l; i ++ ) {

		yield* traverseGenerator( children[ i ] );

	}

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

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