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.

@see DisplayStyleSettingsProps for the JSON representation of these settings.

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.  
getRealityModelDisplaySettings(modelId: string): undefined | RealityModelDisplaySettings Get any settings that override how the reality model with the specified Id is displayed.  
getSubCategoryOverride(id: string): undefined | SubCategoryOverride Obtain the override applied to a SubCategoryAppearance by this style.  
is3d(): this is DisplayStyle3dSettings Returns true if this is a 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.  
setRealityModelDisplaySettings(modelId: string, settings: undefined | RealityModelDisplaySettings): void Change the settings that control how the reality model with the specified Id is displayed.  
toJSON(): DisplayStyleSettingsProps Convert these settings to their JSON representation.  
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 floating point 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 color displayed in the view background - by default, ColorDef.black.  
backgroundMap Accessor BackgroundMapSettings Settings controlling display of the background map within views of geolocated models.  
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.  
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.  
mapImagery Accessor MapImagerySettings Settings defining the map imagery layers to be displayed within the view.  
modelAppearanceOverrides Accessor ReadOnly Map<string, FeatureAppearance> The overrides applied by this style.  
monochromeColor Accessor ColorDef The color used to draw geometry when ViewFlags.monochrome is enabled - by default, ColorDef.white.  
monochromeMode Accessor MonochromeMode The style in which DisplayStyleSettings.monochromeColor is applied when ViewFlags.monochrome is enabled - by default, MonochromeMode.Scaled.  
onAmbientOcclusionSettingsChanged Readonly BeEvent<(newSettings: AmbientOcclusion.Settings) => void> Event raised just prior to assignment to the DisplayStyle3dSettings.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<(newEnv: Readonly<Environment>) => void> Event raised just prior to assignment to the DisplayStyle3dSettings.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 DisplayStyle3dSettings.hiddenLineSettings property.  
onLightsChanged Readonly BeEvent<(newLights: LightSettings) => void> Event raised just prior to assignment to the DisplayStyle3dSettings.lights property.  
onMapImageryChanged Readonly BeEvent<(newImagery: Readonly<MapImagerySettings>) => void> Event raised just prior to assignment to the DisplayStyleSettings.mapImagery 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.  
onRealityModelDisplaySettingsChanged Readonly BeEvent<(modelId: string, newSettings: undefined | RealityModelDisplaySettings) => void> Event raised just before DisplayStyleSettings.setRealityModelDisplaySettings changes the display settings for a reality model.  
onRenderTimelineChanged Readonly BeEvent<(newRenderTimeline: undefined | string) => void> Event raised just prior to assignment to the DisplayStyleSettings.renderTimeline property.  
onScheduleScriptPropsChanged Readonly BeEvent<(newProps: undefined | ) => void> Event raised just prior to assignment to the scheduleScriptProps property.  
onSolarShadowsChanged Readonly BeEvent<(newSettings: SolarShadowSettings) => void> Event raised just prior to assignment to the DisplayStyle3dSettings.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 DisplayStyle3dSettings.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.  
scheduleScriptProps Accessor undefined | RenderSchedule.ScriptProps JSON representation of a RenderSchedule.Script embedded in the display style describing how to animate the contents of the view over time.  
subCategoryOverrides Accessor ReadOnly Map<string, SubCategoryOverride> The overrides applied by this style.  
timePoint Accessor undefined | number The point in time currently reflected by the view, expressed in seconds in the Unix epoch.  
viewFlags Accessor ViewFlags Flags controlling various aspects of the display style.  
whiteOnWhiteReversal Accessor WhiteOnWhiteReversalSettings Settings controlling how white-on-white reversal is applied when ViewFlags.whiteOnWhiteReversal is enabled.  

Defined in

Last Updated: 15 March, 2024