Browse Source

WebGLRenderTarget: Clean up.

Mr.doob 4 years ago
parent
commit
268aeae388
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/renderers/WebGLRenderTarget.js

+ 1 - 4
src/renderers/WebGLRenderTarget.js

@@ -27,10 +27,7 @@ class WebGLRenderTarget extends EventDispatcher {
 
 		this.texture = new Texture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );
 
-		this.texture.image = {};
-		this.texture.image.width = width;
-		this.texture.image.height = height;
-		this.texture.image.depth = 1;
+		this.texture.image = { width: width, height: height, depth: 1 };
 
 		this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;
 		this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;