提交 563e0f5f 编写于 作者: M Mr.doob

WebGLRenderTarget: Added copy().

上级 54c94bf0
......@@ -52,32 +52,39 @@ THREE.WebGLRenderTarget.prototype = {
},
clone: function () {
copy: function ( source ) {
this.width = source.width;
this.height = source.height;
this.wrapS = source.wrapS;
this.wrapT = source.wrapT;
var tmp = new THREE.WebGLRenderTarget( this.width, this.height );
this.magFilter = source.magFilter;
this.minFilter = source.minFilter;
tmp.wrapS = this.wrapS;
tmp.wrapT = this.wrapT;
this.anisotropy = source.anisotropy;
tmp.magFilter = this.magFilter;
tmp.minFilter = this.minFilter;
this.offset.copy( source.offset );
this.repeat.copy( source.repeat );
tmp.anisotropy = this.anisotropy;
this.format = source.format;
this.type = source.type;
tmp.offset.copy( this.offset );
tmp.repeat.copy( this.repeat );
this.depthBuffer = source.depthBuffer;
this.stencilBuffer = source.stencilBuffer;
tmp.format = this.format;
tmp.type = this.type;
this.generateMipmaps = source.generateMipmaps;
tmp.depthBuffer = this.depthBuffer;
tmp.stencilBuffer = this.stencilBuffer;
this.shareDepthFrom = source.shareDepthFrom;
tmp.generateMipmaps = this.generateMipmaps;
return this;
tmp.shareDepthFrom = this.shareDepthFrom;
},
clone: function () {
return tmp;
return new THREE.WebGLRenderTarget().copy( this );
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册