Browse Source

WebGLMultisampleRenderTarget: Added samples to options

Mugen87 6 năm trước cách đây
mục cha
commit
4c7ab771ab
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/renderers/WebGLMultisampleRenderTarget.js

+ 3 - 1
src/renderers/WebGLMultisampleRenderTarget.js

@@ -9,7 +9,9 @@ function WebGLMultisampleRenderTarget( width, height, options ) {
 
 	WebGLRenderTarget.call( this, width, height, options );
 
-	this.samples = 4;
+	options = options || {};
+
+	this.samples = options.samples !== undefined ? options.samples : 4;
 
 }