vector2PropertyTabComponent.tsx 811 B

123456789101112131415161718192021
  1. import * as React from "react";
  2. import { GlobalState } from '../../../globalState';
  3. import { Vector2LineComponent } from '../../../sharedComponents/vector2LineComponent';
  4. import { InputBlock } from 'babylonjs/Materials/Node/Blocks/Input/inputBlock';
  5. interface IVector2PropertyTabComponentProps {
  6. globalState: GlobalState;
  7. inputBlock: InputBlock;
  8. }
  9. export class Vector2PropertyTabComponent extends React.Component<IVector2PropertyTabComponentProps> {
  10. render() {
  11. return (
  12. <Vector2LineComponent globalState={this.props.globalState} label="Value" target={this.props.inputBlock} propertyName="value" onChange={() => {
  13. this.props.globalState.onUpdateRequiredObservable.notifyObservers();
  14. }}></Vector2LineComponent>
  15. );
  16. }
  17. }