Browse Source

Add resizing support to AfterimagePass

Olli Etuaho 6 năm trước cách đây
mục cha
commit
9e402e577b
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      examples/js/postprocessing/AfterimagePass.js

+ 7 - 0
examples/js/postprocessing/AfterimagePass.js

@@ -78,6 +78,13 @@ THREE.AfterimagePass.prototype = Object.assign( Object.create( THREE.Pass.protot
 
 		}
 
+	},
+
+	setSize: function ( width, height ) {
+
+		this.textureComp.setSize( width, height );
+		this.textureOld.setSize( width, height );
+
 	}
 
 } );