
const RenderUtils = {

	renderTargetToCanvas: function ( renderer, renderTarget ) {

		const width = Math.floor( renderTarget.width );
		const height = Math.floor( renderTarget.height );

		const bSize = width * height * 4;
		const buffer = new Uint8ClampedArray( bSize );

		renderer.readRenderTargetPixels( renderTarget, 0, 0, width, height, buffer );

		// invert image
		const line = width * 4;
		const invertedBuffer = new Uint8ClampedArray( bSize );

		let dst = bSize;
		let end = 0;

		for ( let i = 0; i < bSize; i += line ) {

			dst -= line;
			end += line;

			invertedBuffer.set( buffer.subarray( i, end ), dst );

		}

		const id = new ImageData( invertedBuffer, width, height );

		const canvas = document.createElement( 'canvas' );
		const canvasCtx = canvas.getContext( '2d' );

		canvas.width = width;
		canvas.height = height;

		canvasCtx.putImageData( id, 0, 0 );

		return canvas;

	}

};

export { RenderUtils };
@@ -1,8 +1,64 @@
+import %7B OrthographicCamera, Vector3 %7D from '../Three';%0A
 %0Aconst R
@@ -956,16 +956,506 @@
 vas;%0A%0A%09%7D
+,%0A%0A%09makePlanCamera: function ( container, survey ) %7B%0A%0A%09%09let width  = container.clientWidth;%0A%09%09let height = container.clientHeight;%0A%0A%09%09const range = survey.combinedLimits.getSize( new Vector3() );%0A%0A%09%09const scaleX = width / range.x;%0A%09%09const scaleY = height / range.y;%0A%0A%09%09if ( scaleX %3C scaleY ) %7B%0A%0A%09%09%09height = height * scaleX / scaleY;%0A%0A%09%09%7D else %7B%0A%0A%09%09%09width = width * scaleY / scaleX;%0A%0A%09%09%7D%0A%0A%09%09return new OrthographicCamera( -width / 2, width / 2, height / 2, -height / 2, -10000, 10000 );%0A%0A%09%7D%0A
 %0A%0A%7D;%0A%0Aex

add new helper function