UVNode.js 300 B

123456789101112131415161718192021
  1. import AttributeNode from '../core/AttributeNode.js';
  2. class UVNode extends AttributeNode {
  3. constructor( index = 0 ) {
  4. super( null, 'vec2' );
  5. this.index = index;
  6. }
  7. getAttributeName( /*builder*/ ) {
  8. return 'uv' + ( this.index > 0 ? this.index + 1 : '' );
  9. }
  10. }
  11. export default UVNode;