DisplayStyleSettings Class

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

Extended by

Methods

Name Description
constructor(jsonProperties: { styles?: DisplayStyleSettingsProps }, options?: DisplayStyleSettingsOptions): DisplayStyleSettings Construct a new DisplayStyleSettings from an ElementProps.jsonProperties.  
addExcludedElements(id: string | Iterable<string>): void Add one or more elements to the set of elements not to be displayed.  
applyOverrides(overrides: DisplayStyleSettingsProps): void Selectively override some of these settings.  
clearExcludedElements(): void Remove all elements from the set of elements not to be displayed.  
dropExcludedElement(id: string): void Remove an element from the set of elements not to be displayed.  
dropExcludedElements(id: string | Iterable<string>): void Remove one or more elements from the set of elements not to be displayed.  
dropModelAppearanceOverride(id: string): void Remove any appearance overrides applied to a Model by this style.  
dropSubCategoryOverride(id: string): void Remove any SubCategoryOverride applied to a SubCategoryAppearance by this style.  
getModelAppearanceOverride(id: string): undefined | FeatureAppearance Obtain the override applied to a Model by this style.  
getSubCategoryOverride(id: string): undefined | SubCategoryOverride Obtain the override applied to a SubCategoryAppearance by this style.  
is3d(): this is DisplayStyle3dSettings    
overrideModelAppearance(modelId: string, ovr: FeatureAppearance): void Customize the way a Model is drawn by this display style.  
overrideSubCategory(id: string, ovr: SubCategoryOverride): void Customize the way geometry belonging to a SubCategory is drawn by this display style.  
toOverrides(options?: DisplayStyleOverridesOptions): DisplayStyleSettingsProps Serialize a subset of these settings to JSON, such that they can be applied to another DisplayStyleSettings to selectively override those settings.  

Properties

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

Defined in

Last Updated: 11 June, 2024