import * as React from "react"; import { Observable } from "babylonjs/Misc/observable"; import { DirectionalLight } from "babylonjs/Lights/directionalLight"; import { PropertyChangedEvent } from "../../../../propertyChangedEvent"; import { CommonLightPropertyGridComponent } from "./commonLightPropertyGridComponent"; import { LineContainerComponent } from "../../../lineContainerComponent"; import { Color3LineComponent } from "../../../../../sharedUiComponents/lines/color3LineComponent"; import { Vector3LineComponent } from "../../../../../sharedUiComponents/lines/vector3LineComponent"; import { CommonShadowLightPropertyGridComponent } from "./commonShadowLightPropertyGridComponent"; import { LockObject } from "../../../../../sharedUiComponents/tabs/propertyGrids/lockObject"; import { GlobalState } from '../../../../globalState'; import { CheckBoxLineComponent } from "../../../../../sharedUiComponents/lines/checkBoxLineComponent" import { ShadowGenerator } from 'babylonjs/Lights/Shadows/shadowGenerator'; import { CascadedShadowGenerator } from 'babylonjs/Lights/Shadows/cascadedShadowGenerator'; interface IDirectionalLightPropertyGridComponentProps { globalState: GlobalState, light: DirectionalLight, lockObject: LockObject, onPropertyChangedObservable?: Observable } export class DirectionalLightPropertyGridComponent extends React.Component { constructor(props: IDirectionalLightPropertyGridComponentProps) { super(props); } render() { const light = this.props.light; const generator = light.getShadowGenerator() as (ShadowGenerator | CascadedShadowGenerator) || null; const hideAutoCalcShadowZBounds = generator instanceof CascadedShadowGenerator; return (
{ !hideAutoCalcShadowZBounds && }
); } }