Create a new Viewer3d.
The ObjectStateManager manages all object related state such as visibility, color and selection
Optional
loadProgressHandler: LoadProgressHandlerAn object that get's specific methods called when there is progress to be reported
Optional
settings: Viewer3dSettingsOptional settings
Readonly
bimReadonly
clientReadonly
containerReadonly
modelReadonly
objectReadonly
settingsAdd a GIS Layer to the viewer
Add a listener for mode updates
{@inheritDoc @bimworks/viewercommon!ObjectStateListener.colorChanged}
The current viewer mode, either LOCAL (Using local coordinates) or GEO (Using geo coordinates)
Get a reference to the SectionPlanes component which can be used for creating/modifying/removing section planes and boxes
The current selection mode
Called then the given object is being hovered on
The Qid of the object being hovered over
The Qid of the previous objects that was being hovered over
The screenspace location of the hover event. This can be useful to for example place a popup/tooltip at that location. Screenspace location is x, y coordinate between 0, 0 and canvas width,height
Whether the given type is currently visible, see also setShowType and resetTypes
Remove listener for mode updates
Reset the information about shown/hidden types which can be changed with setShowType
Will take a screenshot of the contents of the Viewer3d.
Optional
options: ScreenshotOptionsOptional options object
A Blob
Set the current viewer mode, either LOCAL (Using local coordinates) or GEO (Using geo coordinates)
A boolean indicating whether the mode was changed. Note that you can only switch to GEO mode if all loaded models are georeferenced. Also note than when nothing was changed as the result of calling this method, it also returns false
Change the way multiselection is done (only applicable when ObjectStateManager's multiSelect is on). The default mode is SHIFT
The new multiselection mode
Set the selection mode. Currently there are 2 modes, the default mode is SELECTION_DIRECT_PICKING.
The new selection mode
Change how the selection state is visualized
The type of visualization to use for selection, currently this can be either WireframeSelectionVisualization or NoneSelectionVisualization
Show/hide a specific type, this overrules any visibility state of objects in the ObjectStateManager. The main reason for this method to exist is to hide common types such as IFCOPENINGELEMENT by default
To reset these to the defaults, see resetTypes
The (IFC) type in all uppercase, examples: "IFCSPACE", "IFCOPENINGELEMENT"
Whether to enable/disable the given type
Stops the viewer. When the viewer is stopped, the view is not updated anymore. Any changes to the viewer will be accumulated and become visible as soon as the viewer is started again The main reason for stopping the viewer would be for performance, for example when the viewer is currently hidden
Toggle whether (generated) door openings are rendered. This only works for models that have been processed when the repository setting features.generate_door_openings
had been enabled.
Some models contains door opening direction geometry as IFC lines, in those cases it's best to disabled rendering generated door openings.
True when enabled
Fit the given object into view.
The Qids of the objects to fit
Optional
options: ViewFitOptionsTo provide a buffer around the objects. A percentage, where 0 means no buffer and 100 means only buffer
Fit the given models into view.
The models to fit
Optional
options: ViewFitOptionsTo provide a buffer around the objects. A percentage, where 0 means no buffer and 100 means only buffer
A 3D BIM viewer based on WebGL2. Minimal example:
Example