UNPKG

@tokens-studio/graph-engine

Version:

An execution engine to handle Token Studios generators and resolvers

24 lines 731 B
import { Node } from '../../programmatic/node.js'; import { NumberSchema, Vec2Schema } from '../../schemas/index.js'; export default class NodeDefinition extends Node { static title = 'Create vector2'; static type = 'studio.tokens.vector2.create'; static description = 'Allows you to create a vector2'; constructor(props) { super(props); this.addInput('x', { type: NumberSchema }); this.addInput('y', { type: NumberSchema }); this.addOutput('value', { type: Vec2Schema }); } execute() { const { x, y } = this.getAllInputs(); this.outputs.value.set([x, y]); } } //# sourceMappingURL=create.js.map