build/postprocessing.esm.js
/**
	 * Updates this effect.
	 *
	 * @param {WebGLRenderer} renderer - The renderer.
	 * @param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass.
	 * @param {Number} [deltaTime] - The time between the last frame and the current one in seconds.
	 */
Updates this effect.
@param {WebGLRenderer} renderer - The renderer.
@param {WebGLRenderTarget} inputBuffer - A frame buffer that contains the result of the previous pass.
@param {Number} [deltaTime] - The time between the last frame and the current one in seconds.
Updates this effect . @param { WebGLRenderer } renderer - The renderer . @param { WebGLRenderTarget } inputBuffer - A frame buffer that contains the result of the previous pass . @param { Number } [ deltaTime ] - The time between the last frame and the current one in seconds .
update(renderer, inputBuffer, deltaTime) {
		const scene = this.scene;
		const camera = this.camera;
		const selection = this.selection;
		const pulse = this.uniforms.get("pulse");
		const background = scene.background;
		const mask = camera.layers.mask;
		if(selection.size > 0) {
			scene.background = null;
			pulse.value = 1.0;
			if(this.pulseSpeed > 0.0) {
				pulse.value = 0.625 + Math.cos(this.time * this.pulseSpeed * 10.0) * 0.375;
			}
			this.time += deltaTime;
			selection.setVisible(false);
			this.depthPass.render(renderer);
			selection.setVisible(true);
			camera.layers.set(selection.layer);
			this.maskPass.render(renderer, this.renderTargetMask);
			camera.layers.mask = mask;
			scene.background = background;
			this.outlinePass.render(renderer, null, this.renderTargetOutline);
			if(this.blur) {
				this.blurPass.render(renderer, this.renderTargetOutline, this.renderTargetBlurredOutline);
			}
		} else if(this.time > 0.0) {
			this.clearPass.render(renderer, this.renderTargetMask);
			this.time = 0.0;
		}
	}
update ( renderer , inputBuffer , deltaTime ) { const scene = this . scene ; const camera = this . camera ; const selection = this . selection ; const pulse = this . uniforms . get ( "pulse" ) ; const background = scene . background ; const mask = camera . layers . mask ; if ( selection . size > 0 ) { scene . background = null ; pulse . value = 1.0 ; if ( this . pulseSpeed > 0.0 ) { pulse . value = 0.625 + Math . cos ( this . time * this . pulseSpeed * 10.0 ) * 0.375 ; } this . time += deltaTime ; selection . setVisible ( false ) ; this . depthPass . render ( renderer ) ; selection . setVisible ( true ) ; camera . layers . set ( selection . layer ) ; this . maskPass . render ( renderer , this . renderTargetMask ) ; camera . layers . mask = mask ; scene . background = background ; this . outlinePass . render ( renderer , null , this . renderTargetOutline ) ; if ( this . blur ) { this . blurPass . render ( renderer , this . renderTargetOutline , this . renderTargetBlurredOutline ) ; } } else if ( this . time > 0.0 ) { this . clearPass . render ( renderer , this . renderTargetMask ) ; this . time = 0.0 ; } }
Updates this effect.
Updates this effect .
// Render a custom depth texture and ignore selected objects. // Compare the depth of the selected objects with the depth texture. // Restore the camera layer mask and the scene background. // Detect the outline.