inputNodeModel.tsx 818 B

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