WebGLMultisampleRenderTarget.js 763 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { WebGLRenderTarget } from './WebGLRenderTarget.js';
  2. /**
  3. * @author Mugen87 / https://github.com/Mugen87
  4. * @author Matt DesLauriers / @mattdesl
  5. */
  6. function WebGLMultisampleRenderTarget( width, height, options ) {
  7. WebGLRenderTarget.call( this, width, height, options );
  8. options = options || {};
  9. this.samples = options.samples !== undefined ? options.samples : 4;
  10. }
  11. WebGLMultisampleRenderTarget.prototype = Object.assign( Object.create( WebGLRenderTarget.prototype ), {
  12. constructor: WebGLMultisampleRenderTarget,
  13. isWebGLMultisampleRenderTarget: true,
  14. copy: function ( source ) {
  15. WebGLRenderTarget.prototype.copy.call( this, source );
  16. this.samples = source.samples;
  17. return this;
  18. }
  19. } );
  20. export { WebGLMultisampleRenderTarget };