DisplayStyle3dSettings Class

Provides access to the settings defined by a DisplayStyle3d or DisplayStyle3dState, and ensures that the style's JSON properties are kept in sync.

Extends

Methods

Name Description
constructor(jsonProperties: { styles?: DisplayStyle3dSettingsProps }, options?: DisplayStyleSettingsOptions): DisplayStyle3dSettings Construct a new DisplayStyleSettings from an ElementProps.jsonProperties.  
clearSunTime(): void Clear the solar time point stored in this.lights.solarLight.  
getPlanProjectionSettings(modelId: string): undefined | PlanProjectionSettings Get the plan projection settings associated with the specified model, if defined.  
is3d(): this is DisplayStyle3dSettings    
setPlanProjectionSettings(modelId: string, settings: undefined | PlanProjectionSettings): void Set or clear the plan projection settings associated with the specified model.  
setSunTime(timePoint: number, location: IModel | Cartographic): void Adjust the solar light direction based on a date and time at a geographic location.  

Inherited methods

Name Inherited from Description
addExcludedElements(id: string | Iterable<string>): void DisplayStyleSettings Add one or more elements to the set of elements not to be displayed.
clearExcludedElements(): void DisplayStyleSettings Remove all elements from the set of elements not to be displayed.
dropExcludedElement(id: string): void DisplayStyleSettings Remove an element from the set of elements not to be displayed.
dropExcludedElements(id: string | Iterable<string>): void DisplayStyleSettings Remove one or more elements from the set of elements not to be displayed.
dropModelAppearanceOverride(id: string): void DisplayStyleSettings Remove any appearance overrides applied to a Model by this style.
dropSubCategoryOverride(id: string): void DisplayStyleSettings Remove any SubCategoryOverride applied to a SubCategoryAppearance by this style.
getModelAppearanceOverride(id: string): undefined | FeatureAppearance DisplayStyleSettings Obtain the override applied to a Model by this style.
getSubCategoryOverride(id: string): undefined | SubCategoryOverride DisplayStyleSettings Obtain the override applied to a SubCategoryAppearance by this style.
overrideModelAppearance(modelId: string, ovr: FeatureAppearance): void DisplayStyleSettings Customize the way a Model is drawn by this display style.
overrideSubCategory(id: string, ovr: SubCategoryOverride): void DisplayStyleSettings Customize the way geometry belonging to a SubCategory is drawn by this display style.

Properties

Name Type Description
ambientOcclusionSettings Accessor AmbientOcclusion.Settings The settings that control how ambient occlusion is displayed.  
hiddenLineSettings Accessor HiddenLine.Settings The settings that control how visible and hidden edges are displayed.  
lights Accessor LightSettings    
planProjectionSettings Accessor ReadOnly undefined | Iterable<[string, PlanProjectionSettings]> An iterator over all of the defined plan projection settings.  
solarShadows Accessor SolarShadowSettings The settings that control how solar shadows are displayed.  
sunTime Accessor ReadOnly undefined | number The time point from which the solar light direction was derived, in UNIX milliseconds.  
thematic Accessor ThematicDisplay The settings that control thematic display.  

Inherited properties

Name Type Inherited from Description
_json ProtectedReadonly DisplayStyleSettingsProps DisplayStyleSettings  
analysisFraction Accessor number DisplayStyleSettings A value in [0..1] indicating the current point in animation of the DisplayStyleSettings.analysisStyle, where 0 corresponds to the beginning of
the animation and 1 to the end.
analysisStyle Accessor undefined | AnalysisStyle DisplayStyleSettings Settings controlling the display of analytical models.
backgroundColor Accessor ColorDef DisplayStyleSettings The background color.
backgroundMap Accessor BackgroundMapSettings DisplayStyleSettings Settings controlling display of the background map within the view.
clipStyle Accessor ClipStyle DisplayStyleSettings The style applied to the view's ClipVector.
contextRealityModels Accessor ReadOnly ContextRealityModels DisplayStyleSettings Reality models to be displayed in the view.
excludedElementIds Accessor ReadOnly OrderedId64Iterable DisplayStyleSettings The set of elements that will not be drawn by this display style.
excludedElements Accessor ReadOnly Set<string> DisplayStyleSettings The set of elements that will not be drawn by this display style.
hasModelAppearanceOverride Accessor ReadOnly boolean DisplayStyleSettings Returns true if model appearance overrides are defined by this style.
hasSubCategoryOverride Accessor ReadOnly boolean DisplayStyleSettings Returns true if an SubCategoryOverrides are defined by this style.
modelAppearanceOverrides Accessor ReadOnly Map<string, FeatureAppearance> DisplayStyleSettings The overrides applied by this style.
monochromeColor Accessor ColorDef DisplayStyleSettings The color used to draw geometry in monochrome mode.
monochromeMode Accessor MonochromeMode DisplayStyleSettings The style in which DisplayStyleSettings.monochromeColor is applied.
onAmbientOcclusionSettingsChanged Readonly BeEvent<(newSettings: AmbientOcclusion.Settings) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.ambientOcclusionSettings property.
onAnalysisFractionChanged Readonly BeEvent<(newFraction: number) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.analysisFraction property.
onAnalysisStyleChanged Readonly BeEvent<(newStyle: undefined | Readonly<AnalysisStyle>) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.analysisStyle property.
onApplyOverrides Readonly BeEvent<(overrides: Readonly<DisplayStyleSettingsProps>) => void> DisplayStyleSettings Event raised by DisplayStyleSettings.applyOverrides just before the overrides are applied.
onBackgroundColorChanged Readonly BeEvent<(newColor: ColorDef) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.backgroundColor property.
onBackgroundMapChanged Readonly BeEvent<(newMap: BackgroundMapSettings) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.backgroundMap property.
onClipStyleChanged Readonly BeEvent<(newStyle: ClipStyle) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.clipStyle property.
onEnvironmentChanged Readonly BeEvent<(newProps: Readonly<EnvironmentProps>) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.environment property.
onExcludedElementsChanged Readonly BeEvent<() => void> DisplayStyleSettings Event raised when the contents of DisplayStyleSettings.excludedElementIds changes.
onHiddenLineSettingsChanged Readonly BeEvent<(newSettings: HiddenLine.Settings) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.hiddenLineSettings property.
onLightsChanged Readonly BeEvent<(newLights: LightSettings) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.lights property.
onModelAppearanceOverrideChanged Readonly BeEvent<(modelId: string, newAppearance: undefined | FeatureAppearance) => void> DisplayStyleSettings Event raised just before changing the appearance override for a model.
onMonochromeColorChanged Readonly BeEvent<(newColor: ColorDef) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.monochromeColor property.
onMonochromeModeChanged Readonly BeEvent<(newMode: MonochromeMode) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.monochromeMode property.
onOverridesApplied Readonly BeEvent<(overrides: Readonly<DisplayStyleSettingsProps>) => void> DisplayStyleSettings Event raised by DisplayStyleSettings.applyOverrides after the overrides are applied.
onPlanarClipMaskChanged Readonly BeEvent<(modelId: string, newSettings: undefined | PlanarClipMaskSettings) => void> DisplayStyleSettings Event raised just before adding or removing an entry from DisplayStyleSettings.planarClipMasks.
onPlanProjectionSettingsChanged Readonly BeEvent<(modelId: string, newSettings: undefined | PlanProjectionSettings) => void> DisplayStyleSettings Event raised just before changing the plan projection settings for a model.
onRenderTimelineChanged Readonly BeEvent<(newRenderTimeline: undefined | string) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.renderTimeline property.
onSolarShadowsChanged Readonly BeEvent<(newSettings: SolarShadowSettings) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.solarShadows property.
onSubCategoryOverridesChanged Readonly BeEvent<(subCategoryId: string, newOverrides: undefined | SubCategoryOverride) => void> DisplayStyleSettings Event raised when the SubCategoryOverrides change.
onThematicChanged Readonly BeEvent<(newThematic: ThematicDisplay) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.thematic property.
onTimePointChanged Readonly BeEvent<(newTimePoint: undefined | number) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.timePoint property.
onViewFlagsChanged Readonly BeEvent<(newFlags: Readonly<ViewFlags>) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.viewFlags property.
onWhiteOnWhiteReversalChanged Readonly BeEvent<(newSettings: WhiteOnWhiteReversalSettings) => void> DisplayStyleSettings Event raised just prior to assignment to the DisplayStyleSettings.whiteOnWhiteReversal property.
planarClipMasks Accessor ReadOnly Map<string, PlanarClipMaskSettings> DisplayStyleSettings Planar clip masks to be applied to persistent reality models (See: SpatialModelState.isRealityModel.
The key for each entry is the Id of the model to which the mask settings apply.
renderTimeline Accessor undefined | string DisplayStyleSettings The Id of a RenderTimeline element containing a RenderSchedule.Script used to animate the view.
subCategoryOverrides Accessor ReadOnly Map<string, SubCategoryOverride> DisplayStyleSettings The overrides applied by this style.
timePoint Accessor undefined | number DisplayStyleSettings The point in time reflected by the view, in UNIX seconds.
This identifies a point on the timeline of the style's RenderSchedule.Script, if any; it may also affect display of four-dimensional reality models.
viewFlags Accessor ViewFlags DisplayStyleSettings Flags controlling various aspects of the display style. To change the style's view flags, do something like:
```ts
const flags = settings.viewFlags.clone();
flags.renderMode = RenderMode.SmoothShade; // or any other alterations.
settings.viewFlags = flags;
@note Don't modify this object directly - clone it and modify the clone, then pass the clone to the setter.
whiteOnWhiteReversal Accessor WhiteOnWhiteReversalSettings DisplayStyleSettings Settings controlling how white-on-white reversal is applied.

Defined in

Last Updated: 12 June, 2024