Object3D log function

It was recently decided not to include logging functions in the core library.

However it’s useful functionality so here is a copy of the proposed log function (author: @WestLangley).

function log( object3D ) {

    object3D .traverse( function ( obj ) {

        var s = '|___';
	
        var obj2 = obj;

	while ( obj2.parent !== null ) {

	    s = '\t' + s;

	    obj2 = obj2.parent;

	}

	console.log( s + obj.name + ' <' + obj.type + '>' );

    } );

},
2 Likes