inputNodeModel.tsx 876 B

1234567891011121314151617181920212223242526272829
  1. import * as React from "react";
  2. import { DefaultNodeModel } from '../defaultNodeModel';
  3. import { NodeMaterialConnectionPoint } from 'babylonjs/Materials/Node/nodeMaterialBlockConnectionPoint';
  4. import { GlobalState } from '../../../globalState';
  5. import { InputPropertyTabComponentProps } from './inputNodePropertyComponent';
  6. /**
  7. * Generic node model which stores information about a node editor block
  8. */
  9. export class InputNodeModel extends DefaultNodeModel {
  10. public connection?: NodeMaterialConnectionPoint;
  11. /**
  12. * Constructs the node model
  13. */
  14. constructor() {
  15. super("input");
  16. }
  17. renderProperties(globalState: GlobalState) {
  18. if (!this.connection) {
  19. return null;
  20. }
  21. return (
  22. <InputPropertyTabComponentProps globalState={globalState} inputNode={this} />
  23. );
  24. }
  25. }