UNPKG

@tokens-studio/graph-engine

Version:

An execution engine to handle Token Studios generators and resolvers

24 lines 724 B
import { Node } from '../../programmatic/node.js'; import { NumberSchema } from '../../schemas/index.js'; export default class NodeDefinition extends Node { static title = 'Sine'; static type = 'studio.tokens.math.sin'; static description = 'Sin node allows you to get the sin of a number.'; constructor(props) { super(props); this.addInput('value', { type: { ...NumberSchema, default: 0 } }); this.addOutput('value', { type: NumberSchema }); } execute() { const value = this.inputs.value.value; this.outputs.value.set(Math.sin(value)); } } //# sourceMappingURL=sin.js.map