import * as React from "react"; import { Observable, StandardMaterial, BaseTexture } from "babylonjs"; import { PropertyChangedEvent } from "../../../../propertyChangedEvent"; import { LineContainerComponent } from "../../../lineContainerComponent"; import { Color3LineComponent } from "../../../lines/color3LineComponent"; import { SliderLineComponent } from "../../../lines/sliderLineComponent"; import { CommonMaterialPropertyGridComponent } from "./commonMaterialPropertyGridComponent"; import { TextureLinkLineComponent } from "../../../lines/textureLinkLineComponent"; interface IStandardMaterialPropertyGridComponentProps { material: StandardMaterial, onSelectionChangedObservable?: Observable, onPropertyChangedObservable?: Observable } export class StandardMaterialPropertyGridComponent extends React.Component { constructor(props: IStandardMaterialPropertyGridComponentProps) { 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.diffuseTexture && } { material.specularTexture && } { material.reflectionTexture && } { material.refractionTexture && } { material.emissiveTexture && } { material.bumpTexture && } { material.opacityTexture && } { material.ambientTexture && } { material.lightmapTexture && }
); } }