rendertarget resizable
@@ -39,9 +39,14 @@ THREE.WebGLRenderTarget.prototype = {
setSize: function ( width, height ) {
- this.width = width;
- this.height = height;
+ if ( this.width !== width || this.height !== height ) {
+ this.width = width;
+ this.height = height;
+
+ this.dispose();
+ }
},
clone: function () {