You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
497 B
JavaScript

import { SelectInput, LabelElement } from 'flow';
import { BaseNodeEditor } from '../BaseNodeEditor.js';
import { uv } from 'three/tsl';
export class UVEditor extends BaseNodeEditor {
constructor() {
const node = uv();
super( 'UV', node, 200 );
const optionsField = new SelectInput( [ '0', '1', '2', '3' ], 0 ).onChange( () => {
node.index = Number( optionsField.getValue() );
this.invalidate();
} );
this.add( new LabelElement( 'Channel' ).add( optionsField ) );
}
}