MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / projectObject

Function projectObject

Three.js/js/Three66.js:8089–8129  ·  view source on GitHub ↗
( object )

Source from the content-addressed store, hash-verified

8087 };
8088
8089 var projectObject = function ( object ) {
8090
8091 if ( object.visible === false ) return;
8092
8093 if ( object instanceof THREE.Light ) {
8094
8095 _renderData.lights.push( object );
8096
8097 } else if ( object instanceof THREE.Mesh || object instanceof THREE.Line || object instanceof THREE.Sprite ) {
8098
8099 if ( object.frustumCulled === false || _frustum.intersectsObject( object ) === true ) {
8100
8101 _object = getNextObjectInPool();
8102 _object.id = object.id;
8103 _object.object = object;
8104
8105 if ( object.renderDepth !== null ) {
8106
8107 _object.z = object.renderDepth;
8108
8109 } else {
8110
8111 _vector3.setFromMatrixPosition( object.matrixWorld );
8112 _vector3.applyProjection( _viewProjectionMatrix );
8113 _object.z = _vector3.z;
8114
8115 }
8116
8117 _renderData.objects.push( _object );
8118
8119 }
8120
8121 }
8122
8123 for ( var i = 0, l = object.children.length; i < l; i ++ ) {
8124
8125 projectObject( object.children[ i ] );
8126
8127 }
8128
8129 };
8130
8131 var projectGraph = function ( root, sortObjects ) {
8132

Callers 1

projectGraphFunction · 0.70

Calls 1

getNextObjectInPoolFunction · 0.70

Tested by

no test coverage detected