UVNode.js 354 B

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