UNPKG

@tokens-studio/graph-engine

Version:

An execution engine to handle Token Studios generators and resolvers

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