UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

75 lines 3.44 kB
/** @packageDocumentation * @module DisplayStyles */ import { NonFunctionPropertiesOf } from "@itwin/core-bentley"; import { Atmosphere } from "./Atmosphere"; import { GroundPlane, GroundPlaneProps } from "./GroundPlane"; import { SkyBox, SkyBoxProps } from "./SkyBox"; /** JSON representation of an [[Environment]]. * @see [[DisplayStyle3dSettingsProps.environment]]. * @public * @extensions */ export interface EnvironmentProps { /** See [[Environment.ground]] and [[Environment.displayGround]]. */ ground?: GroundPlaneProps; /** See [[Environment.sky]] and [[Environment.displaySky]]. */ sky?: SkyBoxProps; /** @beta See [[Environment.atmosphere]] and [[Environment.displayAtmosphere]]. */ atmosphere?: Atmosphere.Props; } /** A type containing all of the properties of [[Environment]] with none of the methods and with the `readonly` modifiers removed. * @see [[Environment.create]] and [[Environment.clone]]. * @public */ export type EnvironmentProperties = NonFunctionPropertiesOf<Environment>; /** As part of a [[DisplayStyle3dSettings]], controls the display of a [[SkyBox]] and [[GroundPlane]] to simulate the * outdoor environment. * @see [[DisplayStyle3dSettings.environment]]. * @public */ export declare class Environment { /** If true, the sky box will be displayed. * Default: false. * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleSkyBox]] to change this. */ readonly displaySky: boolean; /** If true, the ground plane will be displayed. * Default: false. * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleGroundPlane]] to change this. */ readonly displayGround: boolean; /** * @beta * If true, the atmosphere will be displayed. Enabling this will override any color information provided to the sky box. * Default: false. * @see [[withDisplay]] or [[DisplayStyle3dSettings.toggleAtmosphere]] to change this. */ readonly displayAtmosphere: boolean; /** Describes how the sky box should be drawn. */ readonly sky: SkyBox; /** Describes how the ground plane should be drawn. */ readonly ground: GroundPlane; /** @beta Describes how the atmosphere should be drawn */ readonly atmosphere: Atmosphere.Settings; protected constructor(props?: Partial<EnvironmentProperties>); /** Default settings without a ground plane, sky box, or atmosphere displayed. */ static readonly defaults: Environment; /** Create a new Environment. Any properties not specified by `props` will be initialized to their default values. */ static create(props?: Partial<EnvironmentProperties>): Environment; /** Create a copy of this environment, changing the `displayGround`, `displaySky` and/or `displayAtmosphere` flags. */ withDisplay(display: { sky?: boolean; ground?: boolean; atmosphere?: boolean; }): Environment; /** Convert to JSON representation. */ toJSON(): EnvironmentProps; /** Create from JSON representation. */ static fromJSON(props?: EnvironmentProps): Environment; /** Create a copy of this environment, identical except for any properties specified by `changedProps`. * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values. */ clone(changedProps?: Partial<EnvironmentProperties>): Environment; } //# sourceMappingURL=Environment.d.ts.map