Optional
settings: ObjectStateManagerSettingsAdd the provided objects to the currently pickable set of objects
Either a query or Iterable of Qid
Optional
force: booleanWhether to force this change, when forced, any viewer-specific settings are overruled
Optional
type: stringAlways "BIM"
Add a set of objects to the selected set
Optional
type: stringAdd the provided objects to the currently visible set of objects *
Either a query or Iterable of Qid *
Optional
force: booleanWhether to force this change, when forced, any viewer-specific settings are overruled *
Optional
type: stringAlways "BIM"
Change the color of a given set of objects. When changing the colors of multiple sets of objects, use the more efficient changeColorMulti method.
A Promise that triggers when all connected listeners have applied the change
Change the colors of a given set of objects.
A ColorChangeMap that contains color change information potentialle for many different colors/qids
A Promise that triggers when all connected listeners have applied the change
The ModelManager connected to this ObjectStateManager
Highlight certain objects
This will be removed in the future, as it is to opinionated and can easily be constructed using the changeColorMulti method.
Change the state of the given qid to being hovered on. In the Viewer3d this will give the object a green glow
The Qid of the object being hovered over
Optional
screenspaceLocation: vec2The screen space location of the hover event. This is not relevant/available in all situations and can be null
Remove objects from the set of pickable objects
Either a query or Iterable of Qid
Optional
force: booleanWhether to force this change, when forced, any viewer-specific settings are overruled
Optional
type: stringAlways "BIM"
Remove the provided objects from the current selection
Optional
type: stringRemove objects from the set of visible objects
Either a query or Iterable of Qid
Optional
force: booleanWhether to force this change, when forced, any viewer-specific settings are overruled
Optional
type: stringAlways "BIM"
Resets the internal ObjectStateManager state to the default state, which means:
All of these changes trigger the regular listeners and therefore the connected viewers.
A query or iterable of Qids, the objects to reset color
A Promise that triggers when all connected listeners have applied the change
Optional
hideOpenings: booleanChange the labels of objects. Depending on the viewer labels are visualized differently.
An array of Label
Update the set of pickable objects, replacing any previous pickable state
Either a query or Iterable of Qid
Optional
force: booleanWhether to force this change, when forced, any viewer-specific settings are overruled
Optional
type: stringAlways "BIM"
Replace the currently selected set by the provided set of objects
Optional
type: stringUpdate the set of visible objects, replacing any previous visibily state
Either a query or Iterable of Qid
Optional
force: booleanWhether to force this change, when forced, any viewer-specific settings are overruled
Optional
type: stringAlways "BIM"
Calling this method will update all connected viewers in a way that all of them are afterwards showing at least all of the queried objects.
A query or iterable of Qids, the objects to reset color
An instance of ObjectStateManager keeps track of all the viewer-related state and distributes this state to other components, usually viewers. This state includes:
Most applications will have one ObjectStateManager, but you can have more. The most common scenatio is to have one ObjectStateManager, one Viewer3d and one Viewer2d. Both viewers being connected to the same ObjectStateManager so that the state is kept in sync.