|
@@ -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 );
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|