IafViewer 2D-3D Features
Overview
The IafViewer offers a range of features for viewing 2D and 3D models.
The main features are as follows:
- Model composition - Control which part of a model to view
- Cutting planes - Select which parts of a model to make visible
- Animations - Animate 2D drawings to illustrate processes and workflows
- Annotations and measurements pane - Measure the distance between two points in a model
- Grid helpers - Add visual reference points and grids to 3D models
Click on a feature to view the relevant page.
Core components
{{view3d}} and {{view2d}} are top-level prop groups on {{IafViewerDBM}}. They decide how models are shown once {{modelComposition}} has decided which models belong in the session. See How prop groups fit together on the Enhanced Viewing Modes hub.
View3D props
View3D supplies 3D building visualization and renders one or more BIMPK models.
| Prop | Type | Purpose | Default |
|---|---|---|---|
view3d.enable | boolean | Enable/disable 3D viewer | true |
view3d.visible | boolean | Show or hide the enabled widget without turning the mode off. When false, the launcher can still open the widget if showLauncher is true. | true |
view3d.keepAlive | boolean | Keep the 3D viewer session alive (spawn and session activity). This is separate from the HTTP keep-alive. | false |
view3d.opacity | number | Model opacity (0.0 to 1.0) | 1.0 |
view3d.displayMode | enum | DEFAULT, SPLIT, FULLSCREEN, FIXED | FULLSCREEN |
view3d.showToolbar | boolean | Show/hide the 3D widget's own toolbar | false |
view3d.showLauncher | boolean | Show/hide the main-toolbar button that opens the 3D viewer | true |
view3d.alignment | enum | LEFT_TOP, LEFT_BOTTOM, RIGHT_TOP, RIGHT_BOTTOM. Applies only to SPLIT and FIXED. | RIGHT_TOP |
view3d.order | number | Display order when several widgets are shown | 1 |
view3d.margin | number | Margin around the widget | 0 |
view3d.renderingMode | enum | Draw mode, such as Shaded or Wireframe | Shaded |
view3d.onRenderingModeChange | function | (mode) => void when the rendering mode changes | — |
view3d.camera | object | Structured camera, aligned with aps.camera: enable, mode ('spherical' | 'absolute'), projection, fov, view, spherical, absolute | { enable: false } |
view3d.onCameraUpdate | object | { delayInMs, callback } — throttle and callback. To restore a camera, store the payload and assign it back to view3d.camera. | — |
view3d.rendering.ignoreSpaceTransparencyInGlass | boolean | In Glass mode, draws isolated spaceElementIds in the XRay Selected overlay. Set to false to keep authored space transparency. | true |
View2D props
View2D supplies 2D visualization for 2D plans and sheet viewers.
| Prop | Type | Purpose | Default |
|---|---|---|---|
view2d.enable | boolean | Enable/disable 2D viewer | true |
view2d.visible | boolean | Show or hide the enabled widget without turning the mode off. When false, the launcher can still open the widget if showLauncher is true. | true |
view2d.keepAlive | boolean | Keep the 2D viewer session alive | false |
view2d.fullscreen | boolean | Full-screen mode | false |
view2d.displayMode | enum | DEFAULT, SPLIT, FULLSCREEN, FIXED | DEFAULT |
view2d.showToolbar | boolean | Show/hide the 2D widget's own toolbar | true |
view2d.showLauncher | boolean | Show/hide the main-toolbar button that opens the 2D viewer | true |
view2d.alignment | enum | LEFT_TOP, LEFT_BOTTOM, RIGHT_TOP, RIGHT_BOTTOM. Applies only to SPLIT and FIXED. | LEFT_TOP |
view2d.order | number | Display order when several widgets are shown | 2 |
view2d.margin | number | Margin around the widget | 10 |
view2d.sheet | string | Name of the active 2D drawing sheet | undefined |
view2d.onSheetChange | function | ({ sheetIdx, sheetName, sheetNames, sheetIds }) => void when sheets load or the active sheet changes | — |
For the full prop reference with required flags, see IafViewer — View3d / View2d (mode object tables) and IafViewerDBM (DBM forwards the same props). For which models load into these views, see Model composition.
The IafViewerExView3dStandalone example in the IafViewer Examples view shows View3D with a configuration panel and the structured view3d.camera prop.