ScreenNode.js 594 B

1234567891011121314151617181920212223242526
  1. import { InputNode } from '../core/InputNode.js';
  2. import { TextureNode } from './TextureNode.js';
  3. function ScreenNode( uv ) {
  4. TextureNode.call( this, undefined, uv );
  5. }
  6. ScreenNode.prototype = Object.create( TextureNode.prototype );
  7. ScreenNode.prototype.constructor = ScreenNode;
  8. ScreenNode.prototype.nodeType = 'Screen';
  9. ScreenNode.prototype.getUnique = function () {
  10. return true;
  11. };
  12. ScreenNode.prototype.getTexture = function ( builder, output ) {
  13. return InputNode.prototype.generate.call( this, builder, output, this.getUuid(), 't', 'renderTexture' );
  14. };
  15. export { ScreenNode };