three
Version:
JavaScript 3D library
24 lines (13 loc) • 462 B
JavaScript
import { NumberInput, Element } from '../../libs/flow.module.js';
import { BaseNode } from '../core/BaseNode.js';
import { FloatNode } from 'three-nodes/Nodes.js';
export class FloatEditor extends BaseNode {
constructor() {
const node = new FloatNode();
super( 'Float', 1, node, 150 );
const field = new NumberInput().setTagColor( 'red' ).onChange( () => {
node.value = field.getValue();
} );
this.add( new Element().add( field ) );
}
}