build/postprocessing.esm.js
/**
	 * Replaces the current renderer with the given one.
	 *
	 * The auto clear mechanism of the provided renderer will be disabled. If the
	 * new render size differs from the previous one, all passes will be updated.
	 *
	 * By default, the DOM element of the current renderer will automatically be
	 * removed from its parent node and the DOM element of the new renderer will
	 * take its place.
	 *
	 * @param {WebGLRenderer} renderer - The new renderer.
	 * @param {Boolean} updateDOM - Indicates whether the old canvas should be replaced by the new one in the DOM.
	 * @return {WebGLRenderer} The old renderer.
	 */
Replaces the current renderer with the given one.
The auto clear mechanism of the provided renderer will be disabled. If the
new render size differs from the previous one, all passes will be updated.

By default, the DOM element of the current renderer will automatically be
removed from its parent node and the DOM element of the new renderer will
take its place.

@param {WebGLRenderer} renderer - The new renderer.
@param {Boolean} updateDOM - Indicates whether the old canvas should be replaced by the new one in the DOM.
@return {WebGLRenderer} The old renderer.
Replaces the current renderer with the given one . The auto clear mechanism of the provided renderer will be disabled . If the new render size differs from the previous one all passes will be updated . By default the DOM element of the current renderer will automatically be removed from its parent node and the DOM element of the new renderer will take its place . @param { WebGLRenderer } renderer - The new renderer . @param { Boolean } updateDOM - Indicates whether the old canvas should be replaced by the new one in the DOM . @return { WebGLRenderer } The old renderer .
replaceRenderer(renderer, updateDOM = true) {
		const oldRenderer = this.renderer;
		if(oldRenderer !== null && oldRenderer !== renderer) {
			const oldSize = oldRenderer.getSize(new Vector2());
			const newSize = renderer.getSize(new Vector2());
			const parent = oldRenderer.domElement.parentNode;
			this.renderer = renderer;
			this.renderer.autoClear = false;
			if(!oldSize.equals(newSize)) {
				this.setSize();
			}
			if(updateDOM && parent !== null) {
				parent.removeChild(oldRenderer.domElement);
				parent.appendChild(renderer.domElement);
			}
			this.enableExtensions();
		}
		return oldRenderer;
	}
replaceRenderer ( renderer , updateDOM = true ) { const oldRenderer = this . renderer ; if ( oldRenderer !== null && oldRenderer !== renderer ) { const oldSize = oldRenderer . getSize ( new Vector2 ( ) ) ; const newSize = renderer . getSize ( new Vector2 ( ) ) ; const parent = oldRenderer . domElement . parentNode ; this . renderer = renderer ; this . renderer . autoClear = false ; if ( ! oldSize . equals ( newSize ) ) { this . setSize ( ) ; } if ( updateDOM && parent !== null ) { parent . removeChild ( oldRenderer . domElement ) ; parent . appendChild ( renderer . domElement ) ; } this . enableExtensions ( ) ; } return oldRenderer ; }
Replaces the current renderer with the given one.
Replaces the current renderer with the given one .