1/** 2 * @author alteredq / http://alteredqualia.com/ 3 */ 4 5THREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clearAlpha ) { 6 7 THREE.Pass.call( this ); 8 9 this.scene = scene; 10 this.camera = camera; 11 12 this.overrideMaterial = overrideMaterial; 13 14 this.clearColor = clearColor; 15 this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0; 16 17 this.clear = true; 18 this.clearDepth = false; 19 this.needsSwap = false; 20 21}; 22 23THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 24 25 constructor: THREE.RenderPass, 26 27 render: function ( renderer, writeBuffer, readBuffer, deltaTime, maskActive ) { 28 29 var oldAutoClear = renderer.autoClear; 30 renderer.autoClear = false; 31 32 this.scene.overrideMaterial = this.overrideMaterial; 33 34 var oldClearColor, oldClearAlpha; 35 36 if ( this.clearColor ) { 37 38 oldClearColor = renderer.getClearColor().getHex(); 39 oldClearAlpha = renderer.getClearAlpha(); 40 41 renderer.setClearColor( this.clearColor, this.clearAlpha ); 42 43 } 44 45 if ( this.clearDepth ) { 46 47 renderer.clearDepth(); 48 49 } 50 51 renderer.render( this.scene, this.camera, this.renderToScreen ? null : readBuffer, this.clear ); 52 53 if ( this.clearColor ) { 54 55 renderer.setClearColor( oldClearColor, oldClearAlpha ); 56 57 } 58 59 this.scene.overrideMaterial = null; 60 renderer.autoClear = oldAutoClear; 61 } 62 63} );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.