replace Method

Replace a reality model in the list.

replace(toReplace: ContextRealityModel, replaceWith: ContextRealityModelProps): ContextRealityModel

throws Error if toReplace is not present in the list

note The replacement occupies the same index in the list as toReplace did.

Parameter Type Description
toReplace ContextRealityModel The reality model to be replaced.
replaceWith ContextRealityModelProps The JSON representation of the replacement reality model.

Returns - ContextRealityModel

the newly-created reality model that replaced toReplace.

Defined in

Last Updated: 11 June, 2024