import * as React from "react"; import { Observable } from "babylonjs/Misc/observable"; import { PropertyChangedEvent } from "../../../propertyChangedEvent"; import { Color3LineComponent } from "../../lines/color3LineComponent"; import { GlobalState } from '../../../globalState'; import { IInspectable, InspectableType } from 'babylonjs/Misc/iInspectable'; import { CheckBoxLineComponent } from '../../lines/checkBoxLineComponent'; import { SliderLineComponent } from '../../lines/sliderLineComponent'; import { Vector3LineComponent } from '../../lines/vector3LineComponent'; import { QuaternionLineComponent } from '../../lines/quaternionLineComponent'; import { LineContainerComponent } from '../../lineContainerComponent'; import { TextInputLineComponent } from '../../lines/textInputLineComponent'; import { LockObject } from './lockObject'; interface ICustomPropertyGridComponentProps { globalState: GlobalState; target: any, lockObject: LockObject; onPropertyChangedObservable?: Observable; } export class CustomPropertyGridComponent extends React.Component { constructor(props: ICustomPropertyGridComponentProps) { super(props); this.state = { mode: 0 }; } renderInspectable(inspectable: IInspectable) { switch (inspectable.type) { case InspectableType.Checkbox: return ( ) case InspectableType.Slider: return ( ) case InspectableType.Vector3: return ( ) case InspectableType.Quaternion: return ( ) case InspectableType.Color3: return ( ) case InspectableType.String: return ( ) } return null; } render() { let inspectables: IInspectable[] = this.props.target.inspectableCustomProperties; if (!inspectables || inspectables.length === 0) { return null; } return ( { inspectables.map(inspectable => { return this.renderInspectable(inspectable); }) } ); } }