import * as React from "react"; import { Observable, PBRMaterial, BaseTexture } from "babylonjs"; import { PropertyChangedEvent } from "../../../../propertyChangedEvent"; import { LineContainerComponent } from "../../../lineContainerComponent"; import { Color3LineComponent } from "../../../lines/color3LineComponent"; import { CheckBoxLineComponent } from "../../../lines/checkBoxLineComponent"; import { SliderLineComponent } from "../../../lines/sliderLineComponent"; import { CommonMaterialPropertyGridComponent } from "./commonMaterialPropertyGridComponent"; import { TextureLinkLineComponent } from "../../../lines/textureLinkLineComponent"; interface IPBRMaterialPropertyGridComponentProps { material: PBRMaterial, onSelectionChangedObservable?: Observable, onPropertyChangedObservable?: Observable } export class PBRMaterialPropertyGridComponent extends React.Component { constructor(props: IPBRMaterialPropertyGridComponentProps) { super(props); } renderTextures() { const material = this.props.material; if (material.getActiveTextures().length === 0) { return null; } const onDebugSelectionChangeObservable = new BABYLON.Observable(); return ( ) } render() { const material = this.props.material; return (
{this.renderTextures()} { material.bumpTexture && } { material.ambientTexture && } { material.reflectionTexture && }
); } }