WebGLRenderTarget.js 991 字节
Newer Older
1 2 3 4
/**
 * @author szimek / https://github.com/szimek/
 */

5
THREE.WebGLRenderTarget = function ( width, height, options ) {
6 7 8 9 10 11

	this.width = width;
	this.height = height;

	options = options || {};

12 13
	this.wrapS = options.wrapS !== undefined ? options.wrapS : THREE.ClampToEdgeWrapping;
	this.wrapT = options.wrapT !== undefined ? options.wrapT : THREE.ClampToEdgeWrapping;
14

15 16
	this.magFilter = options.magFilter !== undefined ? options.magFilter : THREE.LinearFilter;
	this.minFilter = options.minFilter !== undefined ? options.minFilter : THREE.LinearMipMapLinearFilter;
17

18 19 20
	this.offset = new THREE.Vector2( 0, 0 );
	this.repeat = new THREE.Vector2( 1, 1 );

21
	this.format = options.format !== undefined ? options.format : THREE.RGBAFormat;
22
	this.type = options.type !== undefined ? options.type : THREE.UnsignedByteType;
23

M
Mikael Emtinger 已提交
24 25
	this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
	this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : true;
26 27

};