Node.js 538 B

12345678910111213141516171819202122
  1. import {Box} from "../Box";
  2. /**
  3. * Node objects can be connected between them to create graphs.
  4. *
  5. * Each node contains inputs, outputs and a set of attributes containing their state. Inputs can be connected to outputs of other nodes, and vice-versa.
  6. *
  7. * This class implements node basic functionality, the logic to connected node and define inputs/outputs of the nodes.
  8. *
  9. * @class Node
  10. */
  11. function Node()
  12. {
  13. Box.call(this);
  14. this.inputs = [];
  15. this.outputs = [];
  16. }
  17. Node.prototype = Object.create(Box.prototype);
  18. export {Node};