ContextRealityModels Class
A list of ContextRealityModels attached to a DisplayStyleSettings. The list may be presented to the user with the name and description of each model. The list is automatically synchronized with the underlying JSON representation provided by the input ContextRealityModelsContainer.
see DisplayStyleSettings.contextRealityModels.
Methods
Name | Description | |
---|---|---|
constructor(args: ContextRealityModelsArgs): ContextRealityModels | Construct a new list of reality models from its JSON representation. | |
constructor(container: ContextRealityModelsContainer, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel): ContextRealityModels | Construct a new list of reality models from its JSON representation. | |
add(props: ContextRealityModelProps): ContextRealityModel | Append a new reality model to the list. | |
clear(): void | Remove all reality models from the list. | |
delete(model: ContextRealityModel): boolean | Remove the specified reality model from the list. | |
populate(): void | Populate the list of ContextRealityModels.models from the container that was supplied to the constructor. | |
replace(toReplace: ContextRealityModel, replaceWith: ContextRealityModelProps): ContextRealityModel | Replace a reality model in the list. | |
update(toUpdate: ContextRealityModel, updateProps: Partial<ContextRealityModelProps>): ContextRealityModel | Change selected properties of a reality model. |
Properties
Name | Type | Description | |
---|---|---|---|
models Accessor ReadOnly | undefined | The read-only list of reality models. | |
onAppearanceOverridesChanged Readonly | BeEvent<(model: ContextRealityModel, newOverrides: undefined | FeatureAppearance) => void> | Event dispatched just before ContextRealityModel.appearanceOverrides is modified for one of the reality models. | |
onChanged Readonly | BeEvent<(previousModel: undefined | ContextRealityModel, newModel: undefined | ContextRealityModel) => void> | Event dispatched when a model is ContextRealityModels.added, ContextRealityModels.deleted, ContextRealityModels.replaced, or ContextRealityModels.updated. | |
onDisplaySettingsChanged Readonly | BeEvent<(model: ContextRealityModel, newSettings: RealityModelDisplaySettings) => void> | Event dispatched just before ContextRealityModel.displaySettings is modified for one of the reality models. | Beta |
onPlanarClipMaskChanged Readonly | BeEvent<(model: ContextRealityModel, newSettings: undefined | PlanarClipMaskSettings) => void> | Event dispatched just before ContextRealityModel.planarClipMaskSettings is modified for one of the reality models. |
Defined in
Last Updated: 30 November, 2023