import * as React from "react"; import { PaneComponent, IPaneComponentProps } from "../paneComponent"; import { Mesh, TransformNode, Material, StandardMaterial, Texture, PBRMaterial, Scene, FreeCamera, ArcRotateCamera, HemisphericLight, PointLight, BackgroundMaterial, AnimationGroup } from "babylonjs"; import { MaterialPropertyGridComponent } from "./propertyGrids/materials/materialPropertyGridComponent"; import { StandardMaterialPropertyGridComponent } from "./propertyGrids/materials/standardMaterialPropertyGridComponent"; import { TexturePropertyGridComponent } from "./propertyGrids/materials/texturePropertyGridComponent"; import { PBRMaterialPropertyGridComponent } from "./propertyGrids/materials/pbrMaterialPropertyGridComponent"; import { ScenePropertyGridComponent } from "./propertyGrids/scenePropertyGridComponent"; import { HemisphericLightPropertyGridComponent } from "./propertyGrids/lights/hemisphericLightPropertyGridComponent"; import { PointLightPropertyGridComponent } from "./propertyGrids/lights/pointLightPropertyGridComponent"; import { FreeCameraPropertyGridComponent } from "./propertyGrids/cameras/freeCameraPropertyGridComponent"; import { ArcRotateCameraPropertyGridComponent } from "./propertyGrids/cameras/arcRotateCameraPropertyGridComponent"; import { MeshPropertyGridComponent } from "./propertyGrids/meshes/meshPropertyGridComponent"; import { TransformNodePropertyGridComponent } from "./propertyGrids/meshes/transformNodePropertyGridComponent"; import { BackgroundMaterialPropertyGridComponent } from "./propertyGrids/materials/backgroundMaterialPropertyGridComponent"; import { Control } from "babylonjs-gui/2D/controls/control"; import { ControlPropertyGridComponent } from "./propertyGrids/gui/controlPropertyGridComponent"; import { TextBlockPropertyGridComponent } from "./propertyGrids/gui/textBlockPropertyGridComponent"; import { TextBlock } from "babylonjs-gui/2D/controls/textBlock"; import { InputText } from "babylonjs-gui/2D/controls/inputText"; import { InputTextPropertyGridComponent } from "./propertyGrids/gui/inputTextPropertyGridComponent"; import { ColorPicker, Image, Slider, ImageBasedSlider } from "babylonjs-gui"; import { ColorPickerPropertyGridComponent } from "./propertyGrids/gui/colorPickerPropertyGridComponent"; import { AnimationGroupGridComponent } from "./propertyGrids/animationGroupPropertyGridComponent"; import { LockObject } from "./propertyGrids/lockObject"; import { ImagePropertyGridComponent } from "./propertyGrids/gui/imagePropertyGridComponent"; import { SliderPropertyGridComponent } from "./propertyGrids/gui/sliderPropertyGridComponent"; import { ImageBasedSliderPropertyGridComponent } from "./propertyGrids/gui/imageBasedSliderPropertyGridComponent"; export class PropertyGridTabComponent extends PaneComponent { private _timerIntervalId: number; private _lockObject = new LockObject(); constructor(props: IPaneComponentProps) { super(props); } timerRefresh() { if (!this._lockObject.lock) { this.forceUpdate(); } } componentWillMount() { this._timerIntervalId = window.setInterval(() => this.timerRefresh(), 500); } componentWillUnmount() { window.clearInterval(this._timerIntervalId); } render() { const entity = this.props.selectedEntity; if (!entity) { return (